Building a classifier and applying to live data
We can design our classifier in the familiar way, by defining classes, painting labels, and building a model. The plastic samples included with each perClass Mira Stage are marked with a letter followed by a number, the letter describes the material, and the number its variant.
In our example, we want to distinguish different plastic materials, irrespective of color. Therefore, we define "background" and material classes "A", "B", "C", "D", and "E".
Then, we paint the labels and create a model by pressing Model search
.
We can see that all different variants of material A can be separated from different white plastics B-E. This demonstrates the unique value of spectral imaging where we may base our interpretation on material composition, and not on appearance.
In order to demonstrate how our solution works live, we assign the Cycle scanning area command to button A in the Stage panel. When pressing the A button of the stage, the stage will start cycling from the minimum position to the maximum position.
If we now start the camera again, then the toolbar will enable the Decisions button in addition to Raw and Corrected buttons. With these buttons we can choose how we want to see the live data stream.
After selecting Decisions, the Camera panel will also show a classifier speed (red).
This concludes our acquisition tutorial, we have learned how to acquire references, record scans, define models, and run the full correction and modeling pipeline on a live data stream.