Versions Compared

Key

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

...

  1. Rotate the lights to the desired rough angle to the camera (usually ~30° to the camera axis for sediment cores). Fine-tune the light position by observing the camera output using MAX.
  2. Manually turn on one line light at a time to full power by pressing the "+" button on the light controller until you reach 100%.
  3. Loosen the brackets on both sides of the light mounts and make small position adjustments until the brightest image is achieved.
  4. Turn off the light by pressing the "–" button and press Select to enable the other light.
  5. Repeat Steps 2–4 for the second light.

Calibration

The laboratory technician calibrates the system when needed by adjusting camera settings and analyzing an imaged Kodak Q13 grayscale standardMacBeth Color Standard.  These lights obtain nearly uniform illumination intensity from the core’s surface (half or whole round) to the bottom of the liner by a combination of high intensity, overlapping large diameter light source, close coupling to the imaged surface and the “line” image plane.  The bottom edge of the brass led mount should be set between 2 and 4-cm from the image surface.  For uneven hard rock cores the height can be set higher but illumination intensity will drop, exposure times lengthen, f-stop opened and scanning speed reduced.  Note, any height change to the lights requires re-calibration. Heat is removed from the leds and transferred to the surrounding air via the copper heat pipes. While these to get hot they are not a burn hazard.  However they are very delicate and bend at the slightest touch, so use care when working with the camera lens.

*Method based on Instructions sent by Bill Mills. BILL! Please review, correct, and update!

For more detailed information on the theory behind the calibration please refer to the Advanced SHIL Calibration page

Safety Concerns

  • These lights get hot and can damage or burn surfaces if left stationary and on for over 20-secs. This is not an issue during normal imaging operations and will not heat the core surface at all.  BUT during calibration process when the lights are stationary you must use the manual power switch to turn the lights on and off.  Do not use the plastic Gray card but use the cardboard instead.
  • Never look at the leds directly! Even the reflected light can be painful!  When working under the track make sure that the power is off.
  • NOTE: if you are concerned with the heat dissipation, you can use our FLIR cameras to confirm that everything is ok.

...

  • Color Standard values vary based on the standard and the manufacturer of the standard. Verify the values of the MacBeth Color Standard before starting. Check the grayscale card to determine what the percentage of gray. The target calibration values will vary based on the percentage of gray. Target values depend on the percent grayscale card. Max value 255. If using a 50% grayscale card target red and green value is 127, a 25% grayscale card target value is 64, etc.
  • Set camera f/stop to 16.

Camera Corrections

1.Disable the motor that moves the camera. In the IMS control panel select Motion and then Drive Disable from the dropdown menu (Figure 19). The user can now manually move the camera to the desired spot.

Image Removed

Figure 19. IMS commands to disable the drive

2. Back in the IMS control panel go to Instruments > JAI Camera Settings (Figure 20). The lights turn on automatically when the JAI Camera Setup window opens.

Image Removed

Figure 20. Selecting JAI Camera Setup

3. Confirm the camera f-stop is set to 16. If not, change it to 16.

4. The lights will turn on when the JAI Camera Window opens. Due to the intensity and heat produced by the LEDs it is best to turn off the lights until ready. Turn off the lights in the software window (Figure 21) or with the physical power switch located behind the monitor (Figure 22). Note if the lights are turned off by the harware switch, the lights cannot then be turned on the software command.

Image RemovedFigure 21: Software commands to turn the Lights On or Off.

Image Removed

Figure 22: Hardware Switch to turn power on or off to the lights.

Reset Gains and Corrections

1.Select the Gains-Black-Shade-Flat tab (Figure 23).

Image Removed

Figure 23: JAI Camera Setup Window showing the Gains-Black-Shade-Flat tab. The Gains-Black-Shade-Flat tab is outlined in red.

2. Click the Clear All Gains, Clear Black Gains, Remove Pixel Black Correction, Remove Shading Correction, and Remove Pixel Gain Correction (Figure 24). You will notice all values in the Master and Black gains to zero.

Image Removed

Figure 24: The five clear and remove buttons of interest are outlined in red.

3. In Master Black field, enter 40.

Color Balancing the Camera

1.Make sure the lens is focused. To focus the camera the lights need to be on and the camera over the section grayscale card or calibration card.

2. Grab the calibration standard and remove from liner (Figure 32). Calibration Standard is located in drawer PP-2B.

Image Removed

Figure 32: The calibration standard in its cover.

3. Put the Calibration Standard in the track (Figure 33). The color square must be oriented as pictured below.

Image Removed

Figure 33: Color standard in track in correct orientation.

4. Select the tab RATES and EXPOSURE (Figure 34).

Image Removed

Figure 34: Rates and Exposure window, the tab is highlighted in red.

5. On the Green Lock control select OFF (Figure 35). The other exposures are now adjustable.

Image Removed

Figure 35: Green Lock control highlighted in red and set to off.

6. Set the Line Trigger Interval until the Max Image Scan Speed is 8 for now. Adjust values by clicking in the field and typing values. We’ll come back to this value later.

7. Turn on lights.

8. Click the Start Grab (Figure 36).

Image Removed

Figure 36: Start Grab button highlighted in red.

9. Move the camera over the Macbeth color standard until you see the white, dark blue, orange and brown color bars in the image. Place the cursor in the white square, right-click and draw a rectangle by dragging diagonally.  Release the mouse when you have select most of the white bar. The rectangle (marked in green) should only have the white color and nothing else inside (Figure 37).

Image Removed

Figure 37: The grab window is highlighted in red. A green square is drawn in the white color square of the appropriate row.

10. Above the image you will see controls for the average RED, GREEN and BLUE values for all of the pixels within the rectangle. You will also see the ratio values for RED/GREEN and GREEN/BLUE.

11. Adjust the Red Exposure value until the RED value is 245.

12. Adjust the Green Exposure value until the RED/GREEN value is 1.

13. Adjust the Blue Exposure value until the GREEN/BLUE value is 1. Congratulations you just White Balance the upper limit of the camera, but you are not done.

14. Select the tab GAINS-BLACK-SHADE-FLAT and do the following:

15. Move the camera over the Macbeth color standard until you see the black, blue, gold and cyan color bars in the image. Place the cursor in the black square, right-click and draw a rectangle by dragging diagonally.  Release the mouse when you have select most of the black bar.

16. Adjust the Master Black gain until the GREEN value is around 15.

17. Adjust the Red Black gain until the RED/GREEN value is 1.

18. Adjust the Blue Black gain until the GREEN/BLUE value is 1.

Setting the Line Rate

The rules:

  • Exposure intervals for the Red, Green and Blue channels is a function of the light intensity of the LEDs.
  • Led intensity for the three channels is a function of the LED spectrum. Cold lights 65K are very blue while warm lights 55k are reddish. Neutral light is preferred where RGB are nearly equal but all leds are variable.  Generally red is the lowest intensity and will require the longest exposure time.  That is why in the above procedure we start with red, but you should always start with lowest intensity channel.
  • Intensity is also a function of the F-stop. The smallest F-Top is preferred because it gives the greatest depth of focus but also lowers the intensity.
  • Intensity is also a function of how closely coupled the lights are to the core surface but for practical reasons we need to keep a minimum clearance for safe operations.
  • Don’t forget to check that all of the lights are evenly illuminated or even on. One led can fail without affecting these other.  Don’t ever look at the leds directly!
  • Line rate must be greater (20us) than the red, green and blue exposure rates set in the above procedure.
  • The shorter the line rates the faster the image can be scanned.
  • If you move the track faster than the scan rate you will see dropped lies in your image.

So you must balance all of these setting to obtain the best scanning rate.  That means the above White balance procedure described above may have to be repeated as you adjust light position, f-stop etcetera.

Note: when you adjust the Line Rate interval it will automatically adjust the speed of the track to a scan speed that will not cause dropped lines.  You can override this value in the Motion Control Setup  …be careful.

Apply Corrections

We apply three corrections. Find information regarding each correction below:

  • Pixel Black Auto Correction: The pixel black level represents extra energy in the camera independent of a light source and is a consistent pattern in the sensor. To correct for this the light source must be turned off, the lens cap put on, and the camera internal correction circuit collects a few lines of data. An average is taken across the line, and pixels are either added to or subtracted from in order for each pixel to have the average value. (Vendor Manual Reference)
  • Shading Correction - Flat Method -: Shading effects can come from an uneven distribution of light and along the outer edge of the camera lens. Shading is corrected for by averaging the signal across a group of eight pixels to represent the line.
  • 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 (with the lights at no more than 80% of max) 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.
Black Gain Correction

1.Turn off the lights. Lens can be focused or unfocused (doesn’t matter).

2. Take the lens cap (Figure 29) and place on lens (Figure 30). The lens cap is located in drawer PP-2B.

Image Removed

Figure 29: Lens cap for the camera

Image Removed

Figure 30: Lens Cap being put on camera

3. Click the Pixel Black Auto Correction. The RGB lines in the Profile graph should be uniform (Figure 31). (Note: half the time a separate window window pops up to confirm lens cap is on, then user clicks 'Proceed' to apply correction. Inconsistency reported in Confluence)

Image Removed

Figure 31: Grab and Profile after the Pixel Black Correction applied.

Shading Correction
  1. Place the gray card on the tray make sure that it is level and perpendicular to the camera’s axis.  The card should be positioned at the height of the core surface.  This is an important step.  If the card is placed closer to the camera your calibration will be off.
  2. Turn on the lights, with the same method used to turn off the lights, and move the camera over the gray card.
  3. Unfocus the lens on the camera (Figure 25). Look at the Profile graph and rotate the lens’ focus until the RGB lines are smooth , then rotate the lens’ focus until the RGB lines are noisy showing the maximum difference between the low and high values. The camera is now focus.

Image Removed

Figure 25: The lens being unfocused.

If you haven’t set the camera’s height now the times to so!  See the section Camera Height Adjustment at the end.

4. Now move the camera over the gray card and make sure to de-focus the lens until the RGB line on the Profile graph just become smooth and no more (but still variable) (Figure 26).  The RGB lines should appear “bowed” evenly across profile and centered in the image.  If not check the orientation of the grayscale card.  This very important! 

Image Removed

Figure 26: Grayscale card are corresponding RGB Profile visible.

5. 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 27).

Image RemovedFigure 27: Grab and profile after the Shading Correction has been applied.

Pixel Gain Correction

1.The camera’s lens should still be de-focused and grayscale card flat and illuminated.

2. Click the Pixel Gain Correction - Flat Method button.  This will take several seconds, don’t click anything else until it is done.  The RGB lines should still be flat and the individual RGB are the same (may not be equal to each other) (Figure 28).

Image Removed

Figure 28: Grab and Profile after the Pixel Gain Correction has been applied.

Create Correction Curve

1.Click the Save button and leave the JAI Camera Utility.

2. Go to Motion > Drive Enable, to re-enable the motor (Figure 38).

Image Removed

Figure 38: Drive enable control highighted.

3. Go to IMS Main Panel Select DAQ > Image Capture Motion Setup (Figure 39). In this window confirm that speed is set lower than the speed calculated by the Line Trigger Interval

Image Removed

Figure 39: Image Scan Setup Window.

4. Click Start. Scan the STND Color label on the aluminum track behind the monitor (Figure 40).

Image Removed

Figure 40: Standard barcode.

5. Check the Color Checker Standard box (Figure 41). This does not apply a correction to image. 

Image Removed

Figure 41: ColorChecker Standard Box highlighted in red.

6. In the main IMS window click on Instuments and select IMAGE Correction (Figure 42).

Image Removed

Figure 42: Image Correction selection highlighted.

7. The main Image Correction window opens (Figure 43). Note the three main areas in the window:

Image Removed

Figure 43: Image Correction Window.

A. Graph panel: Main graphical viewing area on the left side of the screen. 

Uncorrected Tab: Shows the measured Red, green, and blue values of the gray scale color squares.

Applied Corrections Tab: Applies polynomial fit corrections to the RGB lines.

B. Image Viewing Panels: Area in upper right portion of the screen that displays the original and corrected test image and color checker with RGB values.

Original: Displays the uploaded tiff.

Corrected: Displays the uploaded tiff with corrections applied.

Color Checker: Displays the known values of the MacBeth Color Checker values

C. Correction Panel: Panel in the lower right portion of the screen that allows user to apply corrections to the image

TIFF Correction: Shows tiff red, green, and blue polynomial fit.

JPEG Correction: Shows brightness, contrast, and gamma settings.

Instructions: Shows instructions to follow in this window.

8. Make sure TIFF Correction Mode is selected in the upper right corner and the TIFF Corrections tab is selected in the bottom right corner (Figure 44).

Image Removed

Figure 44: Tiff correction Mode button and Tiff Correction tab both highlighted in red.

9. Open the tiff image just taken (Figures 45, 46).

Image Removed

Figure 45: Open Test Image Window with all images displayed.

Image Removed

Figure 46: The tiff image loaded into the Original Window.

10. In the ORIGINAL image control create a selection rectangle (right-click drag) of the MacBeth card and click CROP (Figure 47). Repeat as necessary until the card fills the entire image.

Image Removed

Figure 47: Green crop square drawn around the color squares. 

11. Again create another selection rectangle over the image but do not release the mouse. Move the lower corner of the rectangle until small white boxes appear over the color squares.  Make sure the boxes are in the center of the squares. Release the mouse.  The pixels in the squares will be averaged and used for the RGB values in the calibration (Figure 48). (not quite how it works right now, white squares don't show up until mouse is released, error reported in confluence)

Image Removed

Figure 48: Final crop square drawn around color squares.

12. Look in the TIFF Correction tab and set the LUT polynomial order values for the RGB channels. Adjust these values to create the lowest residual error with the smoothest curve in the UNCORRECTED image tab. Should be around 4.  Make sure that the curve does not wave about if it does the order values need to be lowered. Also check the corrected ROI and MacBeth values should be very close.  Make sure that the white does not exceed the MacBeth value.  If you are unable to produce a reasonable correction curve, it may be necessary to redo your white balance correction and start over.

This correction is applied to both the TIFF and JPEG image but for the JPEG image you can also apply a Brightness, Contrast and Gamma correction.  This is done at the photographer’s discretion. With better balanced leds on the new light system I did not use the correction and left the values at their mid-points.

Camera Height Adjustment

  • Move the camera so it is just on the edge of the grayscale card at the end on the tray. On this card are mm and cm marks on the edge. 
  • Click the GRAB button and watch the image as you make slow camera position adjustments until the centimeter lines show up on the image graph as sharp spikes.
  • The graph as two cursors, use the mouse and drag one cursor aligning it with the spike. Take the second cursor and do the same with an adjacent spike. Just above the Profile graph there is a control labelled Pixel Delta this value should be between 198 and 202 pixels.  If not, adjust the camera (not lights up and down refocusing after every move until you get within the range.  Warning this can be very tedious!

Check on Calibrated Computer

1.Take, crop, and save another test image now that all corrections have been applied. Use the same procedure to take an image as described in the section: Take an Image

2. Copy the image to a shared network folder to view on a calibrated computer screen in the Imaging Office.

Adjusting JPEG Correction

Situations may arise where a JPEG correction should be applied. In the instance of very white or very dark cores, the TIFF images may look good but the JPEG images may look washed out or too dark to view details. JPEG corrections do not alter TIFF image settings. To apply a JPEG Correction follow the steps below:

1. Take the MacBeth Color Checker Standard and place on SHIL Imaging Track

2. Click Start in IMS (Figure 49).

Image Removed

Figure 49. Sample Information Window

3. In the Sample Information window, check the box for Color Checker Standard (Figure 50). Checking this box produces an uncorrected image. Click back in the Sample Information bar and scan the Color Checker Label mounted on the track behind the computer.

Image Removed

Figure 50. Color Checker box outlined in red and selected

4. Click Take an Picture

5. Adjust green crop box as necessary. When satisfied select Crop Image and then Save Image (Figure 51)

Image Removed

Figure 51. Crop and Save Window

6. Close out of the Sample Information Window. In the IMS start area go to Instruments > JPEG Correction (Figure 52)

Image Removed

Figure 52. Selecting Image Correction Window

7. The main window opens (Figure 53).

Image Removed

Figure 53. Main Image Correction Window

8. On the right side of the screen select Open Test Image. The IMAGE folder will appear. Select the Image just taken. Make sure to select the .tif image and not the .jpg. With the mouse, hoover over the file and check the extension is .tif. Select the appropriate file and click Open (Figure 54). As of writing this, keep TIFF Corection selected while opening Test Image, will receive an IMS error message if select JPEG Correction and then try to load in test image

Image Removed

Figure 54. Selecting Appropriate test image. Callouts to button and .tif image

9. The image loads into main window in the Original section (Figure 55)

Image Removed

Figure 55. Test Image loaded into Original window

10. Now select JPEG Correction Mode (Figure 56). 

Image Removed

Figure 56. JPEG Correction selected

11. With the square tool selected draw a box around the color squares (Figure 57). This creates a crop area to focus in on the color boxes. Select crop when the box looks about right. For now the box can be approximate. 

Image Removed

Figure 57. Crop Box drawn around test image

12. With the square tool still selected, draw another box around the squares (Figure 48). This time get the green box very close to the edge of the colored squares. Small white boxes will appear in the color squares. Adjust the green rectangle so the white boxes are approximately in the center of the squares. 

Image Removed

Figure 58. Crop box drawn with white boxes centered in color squares

13. In the BCG Correction Window, make sure JPEG Correction is selected. Adjust the Brightness, Contrast, and Gamma Settings. The Corrected color squares will update as the settings are changed. 

Check Calibration

The first step of calibrating is to see if you actually need to by taking an image of the color standard and comparing the observed RGB values and comparing with the expected RGB values.

Take an Image

1. Grab the calibration standard and remove from liner (Figure XX). Calibration Standard is located in drawer PP-2B.

Image Added

Figure XX: The calibration standard in its cover.

2. Put the Calibration Standard in the track (Figure XX). The color square must be oriented as pictured below.

Image Added

Figure XX: Color standard in track in correct orientation.

3. Open IMS and Click Start.

4. Scan the STND Color label on the aluminum track behind the monitor (Figure XX). Check the ColorChecker Standard box. With this box selected no corrections are applied to the image so we are able to assess the raw image quality.

Image Added

5. Click Take A Picture.

6. When the image has finished click Crop and then Save. We user the uncropped image so the crop here is not important.

7. On the main IMS panel select Instruments and Camera: Image Correction

Image Added

8. Select Open Test Image and select the image you just took. It does not matter if the JPEG or TIFF file is loaded - at this point not tested to confirm it doesn't matter if a jpeg is loaded and used to perform the tiff correction.


Image Added

9. The image loads into both the Original and Corrected windows. With the rectangular box selected, draw a box loosely around the color checker card as illustrated above, then click Crop. Draw a box around the Color Checker squares again and this time making sure to only have squares in the box. This time white squares will appear inside each square. Adjust the box to get those white squares close to the center of the color squares.

Check TIFF and JPEG Corrections

Here we check and can adjust our TIFF and JPEG Corrections. You may find you only need to slightly tweak the values and the calibration is good. However if the image appears streaky, a physical change has happened to the Camera or lights, the RGB values between corrected and expected are far off, or the graphs of either the tiff or jpeg don't look good, you will need to recalibrate.

1.Check the TIFF Correction (Figure XX). Select TIFF Correction Mode and look at the Uncorrected Image tab. The goal is to have line as straight as possible. Adjust the Red, Green, and Blue polynomial orders to achieve the lowest residual value while still keeping a relatively straight line in the graph.

Image Added

2. Check the JPEG Correction (Figure XX). Select the JPEG Correction Mode in the top right of the screen, JPEG Corrections in the bottom right box, and look at the Applied Corrections tab. We want a linear relationship between the measured and given values. Adjust the Brightness, Contrast, and Gamma levels to achieve this. Each setting adjusts the line in different ways and there are many different ways to adjust the values to achieve a linear relationship

Image Added

3. If the values all look good and there are no streaking issues in the images, you can click Save and no further adjustments are needed. However if you have determined it doesn't look good, click cancel and you can proceed to the following section and calibrate.

Setup the Track and Camera

1.Disable the motor that moves the camera. In the IMS control panel select Motion and then Drive Disable from the dropdown menu (Figure 19). The user can now manually move the camera to the desired spot.

Image Added

Figure 19. IMS commands to disable the drive


2. Back in the IMS control panel go to Instruments > JAI Camera Settings (Figure 20). The lights turn on automatically when the JAI Camera Setup window opens.

Image Added

Figure 20. Selecting JAI Camera Setup

3. Confirm the camera f-stop is set to 16. If not, change it to 16.

4. The lights will turn on when the JAI Camera Window opens. Due to the intensity and heat produced by the LEDs it is best to turn off the lights until ready. Turn off the lights in the software window (Figure 21) or with the physical power switch located behind the monitor (Figure 22). Note if the lights are turned off by the harware switch, the lights cannot then be turned on the software command.

Image AddedFigure 21: Software commands to turn the Lights On or Off.

Image Added

Figure 22: Hardware Switch to turn power on or off to the lights.


Color Balance the Camera

Reset Gains and Corrections

1.Select the Gains-Black-Shade-Flat tab (Figure 23).

Image Added

Figure 23: JAI Camera Setup Window showing the Gains-Black-Shade-Flat tab. The Gains-Black-Shade-Flat tab is outlined in red.

2. Click the Clear All Gains, Clear Black Gains, Remove Pixel Black Correction, Remove Shading Correction, and Remove Pixel Gain Correction (Figure 24). You will notice all values in the Master and Black gains to zero.

Image Added

Figure 24: The five clear and remove buttons of interest are outlined in red.

3. In Master Black field, enter 40. Not sure if this is still true. 


Color Balancing the Camera - New Method using QP101 v4

Color Balancing is currently being done using the QP101 v4 gray scale card. The MacBeth Color standard cards on board have all been damaged by the LED lights, changing the RGB values. The MacBeth Method is still retained in a below section. We have a lot of QP Cards on board, they are more heat resistant than the MacBeth card, and much cheaper to replace

Adjust Exposure

The exposure intervals we set relate to how long the camera can pick up values for each color band. Try not to keep the lights on for longer than ~ 20 seconds and then keep them off for ~ a minute. As the lights warm up the RGB values change, particularly the blue value, and change most rapidly in the first minute of the lights warming up. Since the SHIL is often used after being off for a bit, we are trying to calibrate to represent the measuring conditions as best we can. Right now we do not have a defined procedure for keeping the lights on/off during calibration.

1.Select the tab RATES and EXPOSURE (Figure XX).

Image Added

Figure :

2. On the Green Lock control select OFF (Figure ). The other exposures are now adjustable.

3. Set the Line Trigger Interval until the Max Image Scan Speed is 8 for now. Adjust values by clicking in the field and typing values. The Line Trigger Value must be greater than the

4. Move the camera carriage over about where the QP Card is on the track.

5. Click the Start Grab (Figure 36).

6. Turn on lights, but only keep them for ~20 seconds and then turn off for ~ 1 minute. 

7. Move the Camera if necessary to see the QP Card in the image grab window. Draw a green ROI box in the light gray area. Now the Red, Green, and Blue values above the image grab window show the values inside your square. The RGB value of the QP Card v4 is 235. Adjust the Red, Green, and Blue Exposure times until each value is 235. Remember to turn off the lights regularly!

Adjust Gains

1.Select the Gains-Clack-Shade-Flat tab.

2. Click Start Grab.

3. Turn the lights on.

4. Draw the green ROI box on the dark square.

5. Adjust the Master Black Value until the RGB values are ~40. Qualitatively this is what's been found to produce a nice image. Please note that the RGB value of the QP Card v4 for this square is 80. Remember to turn off the lights regularly!

6. You can also adjust the RedBlack and BlueBlack values to adjust those specific channels.

7. Adjusting the gain likely changed the RGB values in the light gray card. Draw an ROI box in the light gray square. If the values aren't 235 go back to the Exposure tab and adjust the the values until you hit 235. Check back in the dark gray square and see its still around 40.

8. Keep an eye on the graph on the bottom left corner. We want all the colors to overlay eachother pretty closely.

9. When the colors all seem well balanced you can move on to the next step. How long the lights have been will affect the color balance. If the lights have gotten quite warm and everything looks even, then when the lights are 'cold' the blue channel will be lower than the others.

Apply Corrections

We apply three corrections. Only do the corrections after you have finished adjusting the exposure and gain. Find information regarding each correction below:

  • Pixel Black Auto Correction: The pixel black level represents extra energy in the camera independent of a light source and is a consistent pattern in the sensor. To correct for this the light source must be turned off, the lens cap put on, and the camera internal correction circuit collects a few lines of data. An average is taken across the line, and pixels are either added to or subtracted from in order for each pixel to have the average value. (Vendor Manual Reference)
  • Shading Correction - Flat Method -: Shading effects can come from an uneven distribution of light and along the outer edge of the camera lens. Shading is corrected for by averaging the signal across a group of eight pixels to represent the line.
  • 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 (with the lights at no more than 80% of max) 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.

After discussion with JAI we learned the order of corrections should be Pixel Black, Shading, and Pixel Gain. Previously our order was Shading, Pixel Gain, and Pixel Black. The order has been updated here. We were also to told to do all exposure and gain adjustments before doing these three camera corrections. This manual has been updated to reflect those changes.

Black Gain Correction

1.Turn off the lights.

2. Take the lens cap (Figure 29) and place on lens (Figure 30). The lens cap is located in drawer PP-2B.

Image Added

Figure 29: Lens cap for the camera

Image Added

Figure 30: Lens Cap being put on camera

3. Click the Pixel Black Auto Correction. The RGB lines in the Profile graph should be uniform (Figure 31). (Note: half the time a separate window window pops up to confirm lens cap is on, then user clicks 'Proceed' to apply correction. Inconsistency reported in Confluence)

Image Added

Figure 31: Grab and Profile after the Pixel Black Correction applied.

Shading Correction

  1. Place the gray card on the tray make sure that it is level and perpendicular to the camera’s axis.  The card should be positioned at the height of the core surface.  This is an important step.  If the card is placed closer to the camera your calibration will be off.
  2. Turn on the lights, with the same method used to turn off the lights, and move the camera over the gray card.
  3. Unfocus the lens on the camera just a little bit (Figure 25). Look at the Profile graph and rotate the lens’ focus until the RGB lines are smooth.

Image Added

Figure 25: The lens being unfocused.

If you haven’t set the camera’s height now the times to so!  See the section Camera Height Adjustment at the end.

4. Now move the camera over the gray card and make sure to de-focus the lens until the RGB line on the Profile graph just become smooth and no more (but still variable) (Figure 26).  The RGB lines should appear “bowed” evenly across profile and centered in the image.  If not check the orientation of the grayscale card.  This very important! 

Image Added

Figure 26: Grayscale card are corresponding RGB Profile visible.

5. 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 27).

Image AddedFigure 27: Grab and profile after the Shading Correction has been applied.

Pixel Gain Correction

1.The camera’s lens should still be de-focused and grayscale card flat and illuminated.

2. Click the Pixel Gain Correction - Flat Method button.  This will take several seconds, don’t click anything else until it is done.  The RGB lines should still be flat and the individual RGB are the same (may not be equal to each other) (Figure 28).

Image Added

Figure 28: Grab and Profile after the Pixel Gain Correction has been applied.


Create Correction Curve

1.Click the Save button and leave the JAI Camera Utility.

2. Go to Motion > Drive Enable, to re-enable the motor (Figure 38).

Image Added

Figure 38: Drive enable control highighted.

3. Go to IMS Main Panel Select DAQ > Image Capture Motion Setup (Figure 39). In this window confirm that speed is set lower than the speed calculated by the Line Trigger Interval

Image Added

Figure 39: Image Scan Setup Window.


4. Click Start. Scan the STND Color label on the aluminum track behind the monitor (Figure 40).

Image Added

Figure 40: Standard barcode.

5. Check the Color Checker Standard box (Figure 41). This does not apply a correction to image. 

Image Added

Figure 41: ColorChecker Standard Box highlighted in red.


6. In the main IMS window click on Instuments and select IMAGE Correction (Figure 42).

Image Added

Figure 42: Image Correction selection highlighted.

7. The main Image Correction window opens (Figure 43). Note the three main areas in the window:

Image Added

Figure 43: Image Correction Window.

A. Graph panel: Main graphical viewing area on the left side of the screen. 

Uncorrected Tab: Shows the measured Red, green, and blue values of the gray scale color squares.

Applied Corrections Tab: Applies polynomial fit corrections to the RGB lines.

B. Image Viewing Panels: Area in upper right portion of the screen that displays the original and corrected test image and color checker with RGB values.

Original: Displays the uploaded tiff.

Corrected: Displays the uploaded tiff with corrections applied.

Color Checker: Displays the known values of the MacBeth Color Checker values

C. Correction Panel: Panel in the lower right portion of the screen that allows user to apply corrections to the image

TIFF Correction: Shows tiff red, green, and blue polynomial fit.

JPEG Correction: Shows brightness, contrast, and gamma settings.

Instructions: Shows instructions to follow in this window.


8. Make sure TIFF Correction Mode is selected in the upper right corner and the TIFF Corrections tab is selected in the bottom right corner (Figure 44).

Image Added

Figure 44: Tiff correction Mode button and Tiff Correction tab both highlighted in red.

9. Open the tiff image just taken (Figures 45, 46).

Image Added

Figure 45: Open Test Image Window with all images displayed.

Image Added

Figure 46: The tiff image loaded into the Original Window.

10. In the ORIGINAL image control create a selection rectangle (right-click drag) of the MacBeth card and click CROP (Figure 47). Repeat as necessary until the card fills the entire image.

Image Added

Figure 47: Green crop square drawn around the color squares. 

11. Again create another selection rectangle over the image but do not release the mouse. Move the lower corner of the rectangle until small white boxes appear over the color squares.  Make sure the boxes are in the center of the squares. Release the mouse.  The pixels in the squares will be averaged and used for the RGB values in the calibration (Figure 48). (not quite how it works right now, white squares don't show up until mouse is released, error reported in confluence)

Image Added

Figure 48: Final crop square drawn around color squares.

12. Look in the TIFF Correction tab and set the LUT polynomial order values for the RGB channels. Adjust these values to create the lowest residual error with the smoothest curve in the UNCORRECTED image tab. Should be around 4.  Make sure that the curve does not wave about if it does the order values need to be lowered. Also check the corrected ROI and MacBeth values should be very close.  Make sure that the white does not exceed the MacBeth value.  If you are unable to produce a reasonable correction curve, it may be necessary to redo your white balance correction and start over.

This correction is applied to both the TIFF and JPEG image but for the JPEG image you can also apply a Brightness, Contrast and Gamma correction.  This is done at the photographer’s discretion. With better balanced leds on the new light system I did not use the correction and left the values at their mid-points.

Camera Height Adjustment

  • Move the camera so it is just on the edge of the grayscale card at the end on the tray. On this card are mm and cm marks on the edge. 
  • Click the GRAB button and watch the image as you make slow camera position adjustments until the centimeter lines show up on the image graph as sharp spikes.
  • The graph as two cursors, use the mouse and drag one cursor aligning it with the spike. Take the second cursor and do the same with an adjacent spike. Just above the Profile graph there is a control labelled Pixel Delta this value should be between 198 and 202 pixels.  If not, adjust the camera (not lights up and down refocusing after every move until you get within the range.  Warning this can be very tedious!

Check on Calibrated Computer

1.Take, crop, and save another test image now that all corrections have been applied. Use the same procedure to take an image as described in the section: Take an Image

2. Copy the image to a shared network folder to view on a calibrated computer screen in the Imaging Office.

Adjusting JPEG Correction

Situations may arise where a JPEG correction should be applied. In the instance of very white or very dark cores, the TIFF images may look good but the JPEG images may look washed out or too dark to view details. JPEG corrections do not alter TIFF image settings. To apply a JPEG Correction follow the steps below:

1. Take the MacBeth Color Checker Standard and place on SHIL Imaging Track

2. Click Start in IMS (Figure 49).

Image Added

Figure 49. Sample Information Window

3. In the Sample Information window, check the box for Color Checker Standard (Figure 50). Checking this box produces an uncorrected image. Click back in the Sample Information bar and scan the Color Checker Label mounted on the track behind the computer.

Image Added

Figure 50. Color Checker box outlined in red and selected

4. Click Take an Picture

5. Adjust green crop box as necessary. When satisfied select Crop Image and then Save Image (Figure 51)

Image Added

Figure 51. Crop and Save Window

6. Close out of the Sample Information Window. In the IMS start area go to Instruments > JPEG Correction (Figure 52)

Image Added

Figure 52. Selecting Image Correction Window

7. The main window opens (Figure 53).

Image Added

Figure 53. Main Image Correction Window

8. On the right side of the screen select Open Test Image. The IMAGE folder will appear. Select the Image just taken. Make sure to select the .tif image and not the .jpg. With the mouse, hoover over the file and check the extension is .tif. Select the appropriate file and click Open (Figure 54). As of writing this, keep TIFF Corection selected while opening Test Image, will receive an IMS error message if select JPEG Correction and then try to load in test image

Image Added

Figure 54. Selecting Appropriate test image. Callouts to button and .tif image

9. The image loads into main window in the Original section (Figure 55)

Image Added

Figure 55. Test Image loaded into Original window

10. Now select JPEG Correction Mode (Figure 56). 

Image Added

Figure 56. JPEG Correction selected

11. With the square tool selected draw a box around the color squares (Figure 57). This creates a crop area to focus in on the color boxes. Select crop when the box looks about right. For now the box can be approximate. 

Image Added

Figure 57. Crop Box drawn around test image

12. With the square tool still selected, draw another box around the squares (Figure 48). This time get the green box very close to the edge of the colored squares. Small white boxes will appear in the color squares. Adjust the green rectangle so the white boxes are approximately in the center of the squares. 


Image Added

Figure 58. Crop box drawn with white boxes centered in color squares

13. In the BCG Correction Window, make sure JPEG Correction is selected. Adjust the Brightness, Contrast, and Gamma Settings. The Corrected color squares will update as the settings are changed. 

14. The Applied Corrections Graph should be a straight line and the ROI Corrected Box should have values near 250. These may change depending on the instance of extreme colors, extremely white or extremely dark cores, in which the settings may have be tweaked more to get a user friendly consumer image.  

Color Balacing Camera - Old Method MacBeth Color Checker Card

1.Make sure the lens is focused. To focus the camera the lights need to be on and the camera over the section grayscale card or calibration card.


3. Put the Calibration Standard in the track (Figure 33). The color square must be oriented as pictured below.

Image Added

Figure 33: Color standard in track in correct orientation.

4. Select the tab RATES and EXPOSURE (Figure 34).

Image Added

Figure 34: Rates and Exposure window, the tab is highlighted in red.

5. On the Green Lock control select OFF (Figure 35). The other exposures are now adjustable.

Image Added

Figure 35: Green Lock control highlighted in red and set to off.

6. Set the Line Trigger Interval until the Max Image Scan Speed is 8 for now. Adjust values by clicking in the field and typing values. We’ll come back to this value later.

7. Turn on lights.

8. Click the Start Grab (Figure 36).

Image Added

Figure 36: Start Grab button highlighted in red.

9. Move the camera over the Macbeth color standard until you see the white, dark blue, orange and brown color bars in the image. Place the cursor in the white square, right-click and draw a rectangle by dragging diagonally.  Release the mouse when you have select most of the white bar. The rectangle (marked in green) should only have the white color and nothing else inside (Figure 37).

Image Added

Figure 37: The grab window is highlighted in red. A green square is drawn in the white color square of the appropriate row.

10. Above the image you will see controls for the average RED, GREEN and BLUE values for all of the pixels within the rectangle. You will also see the ratio values for RED/GREEN and GREEN/BLUE.

11. Adjust the Red Exposure value until the RED value is 245.

12. Adjust the Green Exposure value until the RED/GREEN value is 1.

13. Adjust the Blue Exposure value until the GREEN/BLUE value is 1. Congratulations you just White Balance the upper limit of the camera, but you are not done.

14. Select the tab GAINS-BLACK-SHADE-FLAT and do the following:

15. Move the camera over the Macbeth color standard until you see the black, blue, gold and cyan color bars in the image. Place the cursor in the black square, right-click and draw a rectangle by dragging diagonally.  Release the mouse when you have select most of the black bar.

16. Adjust the Master Black gain until the GREEN value is around 15.

17. Adjust the Red Black gain until the RED/GREEN value is 1.

18. Adjust the Blue Black gain until the GREEN/BLUE value is 1.

Setting the Line Rate

The rules:

  • Exposure intervals for the Red, Green and Blue channels is a function of the light intensity of the LEDs.
  • Led intensity for the three channels is a function of the LED spectrum. Cold lights 65K are very blue while warm lights 55k are reddish. Neutral light is preferred where RGB are nearly equal but all leds are variable.  Generally red is the lowest intensity and will require the longest exposure time.  That is why in the above procedure we start with red, but you should always start with lowest intensity channel.
  • Intensity is also a function of the F-stop. The smallest F-Top is preferred because it gives the greatest depth of focus but also lowers the intensity.
  • Intensity is also a function of how closely coupled the lights are to the core surface but for practical reasons we need to keep a minimum clearance for safe operations.
  • Don’t forget to check that all of the lights are evenly illuminated or even on. One led can fail without affecting these other.  Don’t ever look at the leds directly!
  • Line rate must be greater (20us) than the red, green and blue exposure rates set in the above procedure.
  • The shorter the line rates the faster the image can be scanned.
  • If you move the track faster than the scan rate you will see dropped lies in your image.


So you must balance all of these setting to obtain the best scanning rate.  That means the above White balance procedure described above may have to be repeated as you adjust light position, f-stop etcetera.

Note: when you adjust the Line Rate interval it will automatically adjust the speed of the track to a scan speed that will not cause dropped lines.  You can override this value in the Motion Control Setup  …be careful.

1.Make sure the lens is focused. To focus the camera the lights need to be on and the camera over the section grayscale card or calibration card.

2. Put the Calibration Standard in the track (Figure 33). The color square must be oriented as pictured below.

Image Added

Figure 33: Color standard in track in correct orientation.

3. Select the tab RATES and EXPOSURE (Figure 34).

Image Added

Figure 34: Rates and Exposure window, the tab is highlighted in red.

4. On the Green Lock control select OFF (Figure 35). The other exposures are now adjustable.

Image Added

Figure 35: Green Lock control highlighted in red and set to off.

5. Set the Line Trigger Interval until the Max Image Scan Speed is 8 for now. Adjust values by clicking in the field and typing values. We’ll come back to this value later.

6. Turn on lights.

7. Click the Start Grab (Figure 36).

Image Added

Figure 36: Start Grab button highlighted in red.

8. Move the camera over the Macbeth color standard until you see the white, dark blue, orange and brown color bars in the image. Place the cursor in the white square, right-click and draw a rectangle by dragging diagonally.  Release the mouse when you have select most of the white bar. The rectangle (marked in green) should only have the white color and nothing else inside (Figure 37).

Image Added

Figure 37: The grab window is highlighted in red. A green square is drawn in the white color square of the appropriate row.

9. Above the image you will see controls for the average RED, GREEN and BLUE values for all of the pixels within the rectangle. You will also see the ratio values for RED/GREEN and GREEN/BLUE.

10. Adjust the Red Exposure value until the RED value is 245.

11. Adjust the Green Exposure value until the RED/GREEN value is 1.

12. Adjust the Blue Exposure value until the GREEN/BLUE value is 1. Congratulations you just White Balance the upper limit of the camera, but you are not done.

13. Select the tab GAINS-BLACK-SHADE-FLAT and do the following:

14. Move the camera over the Macbeth color standard until you see the black, blue, gold and cyan color bars in the image. Place the cursor in the black square, right-click and draw a rectangle by dragging diagonally.  Release the mouse when you have select most of the black bar.

15. Adjust the Master Black gain until the GREEN value is around 15.

16. Adjust the Red Black gain until the RED/GREEN value is 1.

17. Adjust the Blue Black gain until the GREEN/BLUE value is 1.

Setting the Line Rate

The rules:

  • Exposure intervals for the Red, Green and Blue channels is a function of the light intensity of the LEDs.
  • Led intensity for the three channels is a function of the LED spectrum. Cold lights 65K are very blue while warm lights 55k are reddish. Neutral light is preferred where RGB are nearly equal but all leds are variable.  Generally red is the lowest intensity and will require the longest exposure time.  That is why in the above procedure we start with red, but you should always start with lowest intensity channel.
  • Intensity is also a function of the F-stop. The smallest F-Top is preferred because it gives the greatest depth of focus but also lowers the intensity.
  • Intensity is also a function of how closely coupled the lights are to the core surface but for practical reasons we need to keep a minimum clearance for safe operations.
  • Don’t forget to check that all of the lights are evenly illuminated or even on. One led can fail without affecting these other.  Don’t ever look at the leds directly!
  • Line rate must be greater (20us) than the red, green and blue exposure rates set in the above procedure.
  • The shorter the line rates the faster the image can be scanned.
  • If you move the track faster than the scan rate you will see dropped lies in your image.


So you must balance all of these setting to obtain the best scanning rate.  That means the above White balance procedure described above may have to be repeated as you adjust light position, f-stop etcetera.

Note: when you adjust the Line Rate interval it will automatically adjust the speed of the track to a scan speed that will not cause dropped lines.  You can override this value in the Motion Control Setup  …be careful.14. The Applied Corrections Graph should be a straight line and the ROI Corrected Box should have values near 250. These may change depending on the instance of extreme colors, extremely white or extremely dark cores, in which the settings may have be tweaked more to get a user friendly consumer image.  

LIMS Integration

Sample and Analysis Components

...