An individual pixel in a grey-scale image can have a grey value ranging from 0 through 255. As an acquisition FIFO captures an image, it can remap the grey value of any pixel to a different grey value through the use of a lookup table.
A lookup table is a 256-element array corresponding to the pixel values 0 through 255, where array element [0] corresponds to grey value 0, element [1] corresponds to grey value 1, and so on until element [255] which corresponds to grey value 255.
An acquisition FIFO using a lookup table evaluates each pixel in the image buffer and changes the grey value based upon the value for the corresponding element in the array. For example, if table element [50] has the value 75, any pixel with a grey value of 50 is given the new grey value of 75 before the image is made available for analysis by any other vision tool.
An Acquisition Fifo actually uses a lookup table regardless of whether you have set explicit values for the elements in the array. By default, however, an acquisition FIFO uses an identity lookup table, which does not change the grey values in the image. In an identity lookup table, element [0] is set to 0, element [1] is set to 1, and so on.
Using the ICogAcqLookupTable methods, you can set any 256-element array you define to be the new lookup table in your Visual Basic or C++ vision application. Similarly, the AcqFIFO Edit Control allows you to modify the current lookup table or load an external XML file containing the contents of the new lookup table. The following figure shows a portion of an XML lookup table that reverses the original values of the image buffer, causing dark features to appear light and light features to appear dark in each captured image:
<?xml version="1.0"?> <LUT> <val id="0">255</val> <val id="1">254</val> <val id="2">253</val> <val id="3">252</val> <val id="4">251</val> <val id="5">250</val> <val id="6">249</val> <val id="7">248</val> <val id="8">247</val> <val id="9">246</val> <val id="10">245</val> <val id="11">244</val> . . . <val id="254">1</val> <val id="255">0</val> </LUT>
As another example, you might generate a new lookup table and choose a specific grey value as the midpoint between light and dark features in an image, and then map all darker pixels to some low value and all lighter values to some high value. This essentially binarizes each acquired image so that all features appear as either black or white.
Finally, dual-tap cameras support two lookup tables. The ICogAcqLookupTable interface supports the methods and property for determining how many lookup tables are available and how to set the values for a particular lookup table. If you are using the AcqFIFO edit control, however, both lookup tables use the values of the single lookup table you load. In addition, be aware that the MVS-8100L frame grabber does not support the use of lookup tables.