Main About Questions BGR Test BGR Tutorial Calibration Files CSV Correction
Home

Laser galvanometer image distortion correction : SLA and engraving


Tutorial for finding BGR thresholds

1) Click the link below to open a website to analyze the pixels.

Image Color Picker

2) Click the "User Your Image" button.

3) Open the photo of your tests. The 1 test is good to use to start.

4) Checking the laser path to get the laser path lower bound.

4a) To the right of the enlarged photos is a smaller section that shows the RGB values. We are looking for the BGR values, so the first three numbers (the only ones we need) are in the opposite order.

4b) To update the values in the above area, use your cursor to click on different pixels on the picture. The RBG values of the pixel will be updated in the circled section above when parts of the photo are clicked.

4c) Now that you have a photo set up on the Color Picker, you can check for the different BGR values for your image path.

5) Picking the lower bound for the laser path.

5a) Most likely your upper bound for the laser path will be 255 for all BGR values, so determining the lower bound is the most difficult part of this process. If the lower bound is too low, more nodes will be picked up than exist. If the lower bound is too high, not enough nodes will be picked up.

5b) The best strategy is to check the edges of the laser path in several spots on the domain. The lower bound must account for the laser path in dark areas, but it also should not include outside the laser path in the bright areas. The next several steps will outline how to pick the BGR values for the laser path and black circles then show how to test those values on the website.

5c) The following photos will show what this process “looks” like.

5d) Based on these sorts of checks you can get a certain understanding of what the lower bound would be. For this example, the lower bound BGR is going to be 250(Blue), 160(Green), and 105(Red). We will use these values once we have an upper bound for the black dots.

6) Picking the upper bound for the black dots.

6a) Similar to above, use the website to click and check the edges of the circles to find an upper bound of the printed. Make sure to check all the circles in lighter parts of the domain.

6b) As you can see in the last photo, the top right corner is bright, because of this, we will use 65,65,65 for our BGR values of this example.

7)Test BGR predictions

7a) Go back to the BGR test page.

BGR Threshold Test

7b) Click the choose file button and pick the photo you were using with Color Picker

7c) Submit the values for domain length and grid space. (Both should be the same as the values you used for getting the calibration files on http://imagecorrection.pythonanywhere.com/calfiles/ )

7d) Submit the BGR values for the values you believe they are at the moment.

7a) Click “Generate Check”. The test will take about 25 seconds.

8) Analyzing the results

8a) Open the downloaded results.zip file.

8b) Check the number of nodes and circles detected by opening the result.txt file.

8c) There should always be 8 circles, but the expected number of nodes can be determined with the following equation: Expected # of Nodes = ( ( (Length of the edge of the Printing Domain) / Gridspace ) + 1 )^2

For example: ( (130)/(10) + 1 )^2 = 14^2 = 196

8d) You can and should also check the result.png file which has the nodes shown. If the nodes are not predicted accurately, then adjust the lower bound of the Laser path to be larger.

8e) If the right amount of nodes or circles are not found with the BGR values submitted, follow steps 4-10 again to try and find which of your BGR values need to be changed. If nodes are missing, test the BGR values in that area. If circles are missing, check the BGR values on those circles.

9) Now that you have BGR values, you can run the correction test on the home page.

Home

9a) If you get a red text message that one of your photos has something wrong with its extraction, then use that photo to update your BGR values by going through steps 4-10. Once you have update BGR values with the other photo, test those values with a photo that was working with the other BGR values. As long as the photos are not drastically different, this process is doable.