-
Notifications
You must be signed in to change notification settings - Fork 2
Lego Reader Project
To use this project is necessary to install processing.video.* and java.util.Collections. This library is in processing libraries list.
- Double click on
LegoReader.pde - Press the play button
- Make some configuration to set up the scanning according to the size of the grid, the type of lego block, the lighting conditions as detailed below:
1. Keyboard functionality in principal canvas LegoReader: arrows let reduce the image color noise.
| Key | Funcionality |
|---|---|
| UP | Increment brightness level in 1 |
| DOWN | Decrease brightness level in 1 |
| RIGHT | Increment saturation level in 1 |
| LEFT | Decrease saturation level in 1 |
| + | Add a new pattern grid column and row in the mesh |
| - | Delete a pattern grid column and row in the mesh |
| s | Save perspective points, brightness level, contrast level and color levels configurations |
| r | Turn on/off the corner detection algorithm |
| f | Turn on/off flip option |
2. Keyboard functionality in ColorRange Change colors ranges.
| Key | Funcionality |
|---|---|
| w | Change to calibration mode for white |
| b | Change to calibration mode for black |
| o | Change to calibration mode for other colors |
2. Keyboard functionality in Patterns Change number of patterns.
| Key | Funcionality |
|---|---|
| UP | Add a new pattern |
| DOWN | Delete the last pattern |
3. Perspective correction: The four points represent the control perspective coordinates. To change points coordinates, pressed and dragged the mouse. This four points are goint to work as the new (0,0)/ (width,0) / (width,height) / (0,height) points on the second canvas
4. Color calibration: Once on calibration mode, to change the parameters is needed to press and drag the color line to the new parameters.
Modify white parameters(s-saturation, b-brightness) and yellow bias on white(s-saturation, Hmin/Hmax - hue range permitted for yellow)
5. n-blocks: On Lego Reader the nblocks variable that set the number of blocks of the mesh. So, if more or less blocks is needed press the button "+" or "-" respectively.
6. Patterns: Show patterns that are being read in the moment. To change the color pattern, you need to click inside on the square cell of the pattern. Once you choose the parameters press 's' to save the new patterns.
7. Final Results: The final processing is seen in canvasColor