Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

4.  Use the mouse and draw a ROI (Region of Interest) with only the white square inside (Figure 19).  The RGB values and Ratio values will only be calculated for the pixels inside the ROI (Figure 20). Place the cursor in the white square, right-click and draw a rectangle by dragging diagonally.  Release the mouse when you have selected most of the white bar. The rectangle (marked in green) should only have the white color and nothing else inside.

Image RemovedImage Added

Figure 19. Selecting the ROI of the White square.

...

6. Go to the Rates and Exposure tab and set the Green Lock to Off. That step allows you to adjust the exposure intervals (Figure 21).  

Image Added
Image RemovedFigure 21. Set Green Lock off.

...

Info
titleWeakest RGB Channel

It is helpful to know which RGB channel has the lowest intensity because this channel will be the limiting factor when setting exposures.  To find which channel is the weakest remove all gains and set identical exposure values for the RGB channels.  The intensities will look like the figure below. Onboard our weakest channel is Blue. 

Image RemovedImage Added



7. Start with the blue channel (the weakest channel), increase the Exposure Interval time until its Blue value is near 240.  

8. Adjust the green exposure interval until the blue/green ratio is near 1.000 (+/-0.005). 

9. Adjust the red exposure interval until the red/green ratio is near 1.000 (+/-0.005). 

Info
titleNeutral Balance - is the Xrite color checker neutrally balanced?

It is important to note that the RGB values for the White square are R=240, G=242 and B=235 for the 2019 Xrite color checker standard. Thus the ratios for B/G and R/G are not 1.000 (as we say to achieve in steps 8 and 9 above).

B/G = 0.97, R/G = 0.99 (Xrite color checker v. 2019)

Previous color standards used onboard had balanced RGB values, meaning the R, G and B were equal, hence achieving B/G and R/G rations of near 1.000 was the goal. With the 2019 Xrite color checker these values are not balanced for white so achieving 1.000 may not be the ideal ratio for color balancing. 

What ratio is best to use needs to be tested. It may not make any difference, but when time allows we should test update this User Guide if improvement is found in the calibration curve.

If you cannot get the blue channel to 240, you have several correction options:

1) Lower the lights for increased illumination.

2) Open up the f-stop for more light.

3) Increase the line rate (slower scan speeds) so that you can increase the exposure period.

4) Use gains to amplify the signals.

10. Click Lights Off. Once you have initially roughed in the RGB channels for the White Color Checker square, it is time to look at the black (dark) corrections.


If you cannot get the blue channel to 240, you have several correction options:

1) Lower the lights for increased illumination.

2) Open up the f-stop for more light.

3) Increase the line rate (slower scan speeds) so that you can increase the exposure period.

4) Use gains to amplify the signals.

Using gains to amplify the signal is generally the simplest choice because the other options are often not practical or desirable. The down side of using gains is that they amplify both signal and electrical noise.  Amplifying noise is not good so use gains sparingly.  In the next section will we discuss how to use the gains but remember you will likely move back forth between setting exposures and gains to optimize the camera.  It is an iterative process.

...


Info
titleWhat are gains?

What is the difference between regular gain and the black gains? Think in terms of a linear calibration where the regular gain sets the slope (multiple) and black gain sets the offset (addition).  So changes in the the regular gain value will have little affect on dark colors but changes in the black gain will offset all colors equally.  The gains labeled "Master" are applied to all channels while the red and blue apply corrections to only those channels.

Working with the White Side

1) Open the Gains-Black-Shades-Flat tab. 

2) Adjust the Master Gain until the the weak channel is in the 240-245 range. 

3) If the other channels are two high, you can apply negative gains to those channel until the ratios back to 1 or you can re-adjust the exposures .  The later method is preferred. 

Once you have initially roughed in the RGB channels for the White ColorCheck square, its time to look at the dark side .

Image Removed

Figure 32. Pixel Black Auto Correction

Working With the Dark Side

1) Turn on the lights

2) Click the START GRAB button

3) Move the camera over the black square on the ColorChecker standard. 

4) Use the mouse and draw a ROI (Region of Interest) with only the black square inside.  The RGB values and Ratio values will only be calculated for the pixels inside the ROI.

5) Adjust the Master Back value unit the Green value is near 15. 40 is a good starting point

...

Neutral Balance - is the Xrite color checker neutrally balanced?

Note that the RGB values for the White square are R=240, G=242 and B=235 for the 2019 Xrite color checker standard. Thus the ratios for B/G and R/G are not 1.000 (as we describe to achieve in steps 8 and 9 above).

B/G = 0.97, R/G = 0.99 (Xrite color checker v. 2019)

Previous color standards used onboard had balanced RGB values, meaning the R, G and B were equal, hence achieving B/G and R/G rations of near 1.000 was the goal. With the 2019 Xrite color checker these values are not balanced for white so achieving 1.000 may not be the ideal ratio for color balancing. 

What ratio is best to use needs to be tested. It may not make any difference, but when time allows we should test update this User Guide if any difference is found in the calibration curve.


Setting Gains


Info
titleWhat are gains?

What is the difference between regular gain and the black gains? Think in terms of a linear calibration where the regular gain sets the slope (multiple) and black gain sets the offset (addition).  So changes in the the regular gain value will have little affect on dark colors but changes in the black gain will offset all colors equally.  The gains labeled "Master" are applied to all channels while the red and blue apply corrections to only those channels.

White Balance via Master Gain Correction

1. Open the Gains-Black-Shades-Flat tab (Figure 22). 

2. Increase the Master Gain until the the Blue value near 240. 

3. If the other Red and Green values are too high as a result of increasing the Master Gain, you can apply negative gains to those channel until the R/G and B/G ratios are back to near 1.000 or you can re-adjust the exposures.  Re-adjusting the exposures is preferred. 

Once you have initially roughed in the RGB channels for the White Color Checker square, it is time to look at the black (dark) corrections.

Image Added

Figure 22. Adjusting Master Gain to bring the Blue values up to 240.

Setting the Black (Dark) Values

1. Turn on the lights.

2. Click the START GRAB button.

3. Move the camera over the black square on the ColorChecker standard. 

4. Use the mouse and draw a ROI (Region of Interest) with only the black square inside.  The RGB values and Ratio values will only be calculated for the pixels inside the ROI (Figure 23).

5. Adjust the Master Black value unit the Green value is near 15. 40 is a good starting value for  and we  increasing to 60 works best.

6. Adjust the Red Black and Blue Black Gains until the ratio are close to 1.000 +/- 0.05. The RGB values of the Black square is balanced (R=50, G=50, B=50) so achieving a ratio of 1.000 is best.

Keep an eye on the histogram graph on the bottom left corner (Figure 22). We want all the colors to overlay each other pretty closely. Adjusting the RedGain and BlueGain will move the colors (histograms) in the graph in the lower left, move until they are over lapping.

Image Added

Figure 23. Adjusting Master Black, RedBlack and BlueBlack to reach RGB values of 15 for black square.


Adjusting gains likely changed the RGB values in the White square of the Xrite Color checker. Move the camera back over the white square. Draw an ROI box in the white square. If the values aren't near 240 go back to the Rates and Exposure tab and adjust the the gains values. Check back in the Black square and see its still about 15. Adjust the gains and/or exposure intervals until the Black RGBs read near 15 and White RGBs read near 240. This is a balancing act and can be tedious. Remember do not let the temperature to go about 39°C white doing the balancing.


Info
titleThe Problem with Black

The issue with black is that there is very little energy at this level and noise makes up a significant % of the value.  The next issue is that the cameras response from bright to dark objects is non-linear.  The ColorChecker value is actually near 50 but do not try to obtain that value by jacking up the gain.  It just doesn't work!  By convention we aim for RGB values of ~15.

Getting a white balance is also difficult.  Once you set the green to 15 move the camera so that you are view the next color just above the dark black and use the red and blue black gains to get a good white balance.

Finalizing Exposure and Gain Settings.

You will need go back and repeat the process starting at the section  "CHANGING EXPOSURE VALUES" to achieve balanced neutral colors from white to black. But before you do so, this is a good point to first correct Pixel Shading and Pixel Flat.

...

red and blue black gains to get a good white balance.


Pixel Black, Shading and Flat Corrections

...

Pixel Gain Correction - Flat Method: Each pixel has a different response to a fixed light source. To correct for this non-uniformity a couple lines of data are calculated and the average response of the pixels are calculated. Then each pixel has a correction factor applied to bring all pixels to the average level. The Pixel Gain Correction also corrects for some shading effects and should be done after the shading correction (Note: the order of pixel gain and shading correction is debated, it is suggested to do it in the order above)

Info
titleImage Streaking

Image striking is caused when used a non-uniform standard for the Pixel Gain Correction correction or just from dirt.  Until we found the silicone sheets we would have to defocus the lens to mitigate this issues.  If see streaks chack your target material and repeat this correction.

...

Pixel Black Auto Correction

1

...

. The new light set up makes adding a lens cap difficult so it has been decided and tested that the pixel black auto correction can be done without the cap. But Ensure the lights are off.

2

...

.  With lights off click Pixel Black Auto Correction. The RGB lines in the Profile graph should be uniform (Figure

...

24). 


Figure 3424. Pixel Black Correction applied.

Shading Correction

...

  1. Take the heat resistant gray silicone mat and wooden board from the SHIL calibration drawer. Clean off any dust with a piece of tape (Figure

...

  1. 25). Dust will cause unwanted artifacts in the image. The mat must be clean and flat on the track.

...

  1. Place the heat resistant gray silicone mat on the track. Make sure that it is level and perpendicular to the camera’s axis.

...

  1. Click Lights On, and move the camera over the gray mat.

...

  1. Note for Tech: previously we defocused the lens to preform the Shading correction. That is no longer needed because the silicone mat is even in color/texture.


Figure 3525. The Gray silicone mat being cleaned with tape.

5) . The RGB lines should first appear “bowed” evenly across profile and centered in the image (Figure 3626).  If not check the orientation of the gray mat, it needs to be flat and perpendicular to the camera.  This very important. A wooden holder was designed to hold the mat, it should be in the SHIL calibration drawer. 


Figure 3626. Grayscale card corresponding RGB Profile visible.


6) . Click the Shading Correction - Flat Method button. This can take a few seconds, don’t click anything else until it is done. The RGB lines should now be flat (Figure 3727).


Figure 3727. Image grab and profile after the Shading Correction has been applied.

...

.


Pixel Gain Correction

1

...

. Make sure gray silicone mat is flat.

2

...

. Click Lights ON

3

...

. Click the Pixel Gain Correction - Flat Method button and move the camera slowly back and forth. This averages the pixels and helps eliminate streaking in the image. This will take several seconds, don’t click anything else until it is done.  When its done the RGB lines should still be flat and the individual RGB the same, but may not be equal to each other.


IMAGE Calibration (Correction)

...