Versions Compared

Key

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

...

The laboratory technician calibrates the system when needed by adjusting camera settings and analyzing an imaged Kodak Q13 grayscale standard.
Calibration adjustments are performed using an iterative process of imaging a ruler placed crosswise on the track then counting the pixels between millimeter marks, moving the camera up or down, and repeating. See <LINK> [Author: Where is this procedure documented?] for details on this procedure

*Method based on SHIL Calibration Video. BILL! Please review, correct, and update with screenshots during process!*

Glossary of terms:

Gain: a digital camera setting that controls the amplification of the signal from the camera sensor. It should be noted that this amplifies the whole signal, including any associated background noise.

Gamma: a digital camera setting that controls the grayscale reproduced on the image. An image gamma of unity (Figures 3a - 3b) indicates that the camera sensor is precisely reproducing the object gray scale (linear response). A gamma setting much greater than unity results in a silhouetted image in black and white.

White Balance: a camera setting that adjusts the color balance of light the you’re shooting in so that it appears a neutral white, and it’s used to counteract the orange/yellow color of artificial light.

Knee: sets the knee point and slope for video signal compression to prevent over-exposure by limiting signals in high intensity areas of the subject to the dynamic range of your camera, it adjusts the contrast of a picture. Bill Mills: On the SHIL, we tend to not use it. The TIFF correction that gets done on the raw images seems to be good enough.

Image Added

Before Starting:

  • 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.
  • The light array should be calibrated before doing the camera configuration. If installing new lights or a new camera this will be an iterative process adjusting lights and camera.

Calibration

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. The user can now manually move the camera to the desired spot.

Image Added


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

Image Added


3. Select the Rates and Exposures tab. 

Image Added

There are four main areas in this window:

  • Left Exposure Interval panel:
      • Line Trigger Interval: Interval that sets the Max Image Scan Speed. The target Max Image Scan speed is 8.33 cm/sec. Adjust the Line Trigger Values to achieve 8.33 cm/sec
      • Red Exposure Interval: Sets the red exposure level
      • Green Exposure Interval: Sets the green exposure level
      • Blue Exposure Level: Sets the blue exposure level
  • Left Histogram Graph: Displays histograms of the red, green, and blue curves
  • Right RGB Values panel: Displays current absolute R, G, and B values of the image and the current image
  • Right Profile Graph: Displays the profile curve of the RGB values

4. Place a flat (not bowed), clean gray scale card (standard) and place  under the lights/camera. Be careful on how long you leave the card under the lights. The intense lights can damage it.

5. Look at the Red, green, and blue values in the right corner. If using a 50% grayscale card the red, green, and blue values should be approximately 127. The 'red/green' and 'blue/green' ratios should be approximately 1. If the values are off adjust the exposure levels in the left exposure interval panel and this changes the value of the pixel in the right hand panel. To make changes:

    1. Click the Green Lock arrow so it displays 'Off'. Now the Red and Blue Exposure Intervals will no longer be grayed out.
    2. Place the cursor in the white box displaying the Red Exposure value. Use arrow keys on the keyboard or type in values to adjust exposure values. While adjusting the exposure watch the red pixel value in the right panel. Adjust the exposure until the pixel value is 127.
    3. Repeat step b for green and blue values

You will notice the histogram and profile graphs roughly overlay one another.

6. Select the Lights tab (FIGURE XX). Select Lights OFF All Banks. The lights will now turn off

Image Added

















7.  Select the Gains-Black-Shade-Flat tab.

Image Added

  • White Balance Gain Correction:
  • 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. (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.

8. Click Pixel Black Auto Correction.

9. Go back to the Lights tab and select Lights on to Saved Levels (For the JAI Camera Setup, use 100% lights.)

10. Place the same grayscale card back underneath the lights as flat as possible. Tilt in the card changes the shape of the pixel value profile and shape/location of the histogram. It is important to use a flat grayscale card to accurately calibrate. 

11. Defocus the lens of the camera manually. In the image grab window you will see the card grains go away and the image will become a smooth gray. This changes the profile graph from a relatively straight line to a bowl shape as shown in the camera manual (CV manual, page 12, 6.4.)

12. Then click Shading Correction - Flat Method - button. This corrects the bowl-shape to a flat line as seen in the pixel profile graph.

13. Now Click the Pixel Gain Correction – Flat Method – button

14. At this point check the red, green, and blue pixel values. If they have jumped around adjust the Master Gain Setting to get the values close to 127. When close to 127 click White Balance. The lines now completely overlap each other smoothly.

Check Against Macbeth Color Standard

Correcting the White Value

1.Place the Macbeth Color Standard on the track against the top edge. The standard should be flat and level in the track. The color values will change on the degree of tilt.

2. Next, physically move camera/lights over the color standard.

Image Added

3. Use courser to draw rectangle around the white field in the field of view of the camera (top right window). The red, green, and blue pixel values reflect the values inside the rectangle. If no rectangle is drawn the values will reflect the entire image. In the lower right window, you will see the color lines. If the lines are angled (left to right or right to left), move the color standard to line it up in the holder. The lines might be drifted out of the window/field of view.

4. Click on the Charts tab. Click on a color box and the manufacturer provided red, green, and blue values will populate. This provides a way to compare expected values with measured values and allows the user to make additional adjustments.

Image Added

5. Click in the white box to see what the values should be. Compare those values with the values recorded by the camera in the upper right window. If the values do not match there are two options to correct:

a. Option 1: Go to the Gains-Black-Shade-Flat tab. Adjust the Master Gain Value and watch the red, green, and blue pixel values in the upper right window.

b. Option 2: Go the Rates and Exposure tab. Adjust the exposure of the color(s) that are not correct until the value is approximately the same as the manufacturer value.

Either option is appropriate. Ideally not more gain than necessary is used


13. Use the “Chart” screen and click on white to see what the values should be. Then use the gain in the “Gains/Black/Shade/Flat screen” to slowly reduce the Master gain for “all gains”. When you do that, the color lines in the lower right window will drift back into the field of view. Just like before, you want to adjust the lines of green, red and blue to end up on top of each other by adjusting the values in the “Rates and Exposure” screen.

Correct the Black Value

1. Physically move camera/lights until you see the black square in the image grab window. Use cursor to draw rectangle around in the black box.

2. Go back to the Charts tab. Click in the black color square and compare the manufacturer red, green, and blue values with the measured values. If the values do not match go to Gains-Black-Shade-Flat tab. The target red, green, and blue value are different than the manufacturer values. If adjusted to the manufacturer values the core images tend to be too dark. For this reason we aim for red, green, and blue values of 15.

3. In the Gains-Black-Shade-Flat tab adjust the Master Black value until the pixel values in the upper right window are approximately 15.

4. When you are done with the black gain, check the white gain again. Move the camera so it is over the white square in the Macbeth Color Standard and draw a rectangle in the white square.

5. In the Charts tab click in the white color box. Compare the manufacturer values with the measured values from the camera. If the values do not match follow one of the two methods explained in Step 5 of Correcting the White Value

6. Click Save in the bottom right corner

TIFF Image Corrections

Setting up for Image Capture

1.With a target underneath the camera, manually refocus the camera lens.

2. In the main IMS Panel select Motion > Drive Enable to re-enable the motor.

Image Added

3. Go to IMS Main Panel Select DAQ > Image Capture Setup. In this window confirm that speed is set lower than the speed calculated by the Line Trigger Interval (typically 8.33 cm/sec). Current speed setting is 7.0 cm/sec

Image Added

Take an Image

1. In the IMS Main Panel click Start and the Sample Information Window will open

Image Added

2. Put cursor in the 'Scan' box and scan the STND COLOR and LIG label posted on the track above the desk.

Image Added


3. Check the ColorChecker Standard box in the lower left corner. This produces a raw TIFF image without corrections applied.

Image Added

4. Click Take A Picture in the lower right corner. The lights will turn and image the standard.

5. Adjust the green crop box the image to include all the ColorChecker color squares.

Image Added

6. When satisfied with the crop box click Crop Image and then the green Save button. A new Sample Information window will pop up. Click Cancel to close out of the window.

Image Correction


1. In the IMS Main Panel go to Instruments > CAMERA: IMAGE Correction

Image Added


2. The main Image Correction Window opens. Make sure, TIFF correction is selected. Always select and process TIFF before JPEG.

Image Added

The Image Correction Window allows users to compare a test image of the standard with known values of the standards. There are three main areas in the window:

  • Graph panel: Main graphical viewing area on the left side of the screen. 
    1. Uncorrected Tab: Shows the measured Red, green, and blue values of the gray scale color squares.
    2. Applied Corrections Tab: Applies polynomial fit corrections to the RGB lines.
  • Image Viewing Panels: Area in upper right portion of the screen that displays the original and corrected test image and color shecker with RGB values.
    1. Original
    2. Corrected
    3. Color Checker
  • Correction Panel: Panel in the lower right portion of the screen that allows user to apply corrections to the image
    1. TIFF Correction
    2. JPEG Correction
    3. Instructions:

2. Click Open Test Image and navigate to the ColorChecker Standard Image just taken. Select the TIFF file.

Image Added

3. The entire image will load into the Original and Corrected panel but for this application we only need the color squares. Click on the square tool next to the Original panel and draw a box around the color squares in the image.

Image Added

4.  Click Crop. Now just the color squares are seen in the Original Panel. The new cropped image will also update in the Corrected panel.

5. With the 'Square' tool still selected draw another, tighter box around the image and click Crop

6.  With the 'Square' Tool draw another box but this time you will see white tick mark boxes over the colored boxes. Adjust the box so the white tick marks are in the center of the squares. The white box should always be in the top left, make sure the color checker is not in the holder upside down.

7. Now we will be using the gray-scale color squares, outlined in red below, to check and compare RGB values. The goal is to get the corrected image grey scale RGB values as close as possible to the ColorChecker Manufacturer gray scale RGB values.

Image Added










8. In the BCG Correction Window select the TIFF Correction tab. In the large graph window on the left select the Uncorrected Image tab.

Image Added

  • RED Poly / R residue:
  • GRN Poly / G residue:
  • BLU Poly / B residue:

9. Try to get the residuals low (the smaller the better), while having a curve fits good as possible (see bad example, good example).

10. In order to line up the TIFF – JPEG Image correction, the end members of white and black cannot be at the extremes (250, 0), otherwise the correction will not be able work.

11. Once the grey/white/black are fitted as close as possible, check that the screen “applied corrections” shows a good linear fit.

12. Then check all the other colors for applied corrections.

13. Original and corrected should be within a couple of values of the number. If that does not work, go back to the previous corrections and tart over (white balance etc.).

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.


LIMS Integration

Sample and Analysis Components

...