LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Calibrating an array of grayscale pixel data

If I obtain an array from a grayscale picture which shows the grayscale pixel values from 0-255, how do I calibrate this onto another array so I can use the new data within an equation. For my project each value of grayscale is equivalent to a temperature. For example the value of intensity 20 is equivalent to 2380K, 40~1920K How can I do this. Please help!
0 Kudos
Message 1 of 4
(2,898 Views)
Hi,

I'm sorry I didn't reply to your original thread, like I said.

If you have a 2d array of 8-bit values, make two for loops inside each
other. For each value, do the calibration operation you like to do. The
fastest way is to make a 1d array of values outside the two for loops, and
in the two for loops, look each gray scale value up in the 1d array.

If you are looking up the original values from the bitmap in the lookup
table of the bitmap, you could modify the original lookup table to reflect
the calibrated values. This will save processor time.

Hope it helps,

Wiebe.

"mepgkas" wrote in message
news:506500000008000000916D0000-1031838699000@exchange.ni.com...
> If I obtain an array from a grayscale picture which shows the
> grayscale pixel val
ues from 0-255, how do I calibrate this onto
> another array so I can use the new data within an equation. For my
> project each value of grayscale is equivalent to a temperature. For
> example the value of intensity 20 is equivalent to 2380K, 40~1920K How
> can I do this. Please help!
0 Kudos
Message 2 of 4
(2,898 Views)
I have this program that was modified for me. I am not sure how I need to do what you say. Is mine from a look up table? Can you help from looking at the program?
0 Kudos
Message 3 of 4
(2,898 Views)
> If I obtain an array from a grayscale picture which shows the
> grayscale pixel values from 0-255, how do I calibrate this onto
> another array so I can use the new data within an equation. For my
> project each value of grayscale is equivalent to a temperature. For
> example the value of intensity 20 is equivalent to 2380K, 40~1920K How
> can I do this. Please help!

If the relationship between int8 pixel value and the temperature is
linear, you can do this pretty easily in the intensity graph.

The intensity graph takes a 2D array of numerics and maps them to colors
through the Z Scale. The Z Scale defaults to displaying the numbers as
is, but by using the Offset and Multiplier for the Z scale, you can give
a linear function to map the pixel values to
another numeric range.

Greg McKaskle
0 Kudos
Message 4 of 4
(2,898 Views)