Hello Peterguy,
Thanks for your answer.
However, my problem can not be solve with those convertion functions. it is quite complicated to explain. Therefore, I have attatched 3 example images . They are 16-bit UNSIGNDED images which actually 12-bit image but shifted to the left 4 bits(to make 12-bit image to 16-bit image). Therefore , the value of the darkest pixel should be 0 , the value of the brightest pixel should be 65520( or FFF0).
The image"dark4m1.tif" is a dark image..
The image"White250m.tif" is a bright image...
The image"BlackWhite.tif" is a bright image(White250m.tif), but I change the first pixels Black and the second pixel to Gray..
After you use IMAQimageToArray.vi , you will see that....
For
"dark4m1.tif", IMAQimageToArray.vi will give the value for the darkest pixels = 0 . If you look at the HEX code of the image, you will find the darkest pixel value = 0.
For "White250m.tif" ,IMAQimageToArray.vi will give the value for the brightest pixels = 32752. If you look at the HEX code of the image, you will find the bright pixels value = FFF0 which is 65520
The range of Black to White from the HEX code is 0-65520, but the range of Black to White from IMAQImageToArray is 0-32752. !!! ?????????????????.....
Now, consider the last image.
Then ,from the HEX code of the image,you will see Black pixel = 0,Gray = 32768( HEX=8000) White = 65520 (FFF0). However, the pixel value from IMAQImageToArray.VI will be ....Black pixel = -31280, Gray =0, White = 32752 ......!!!!!! ...???????? now, IMAQimageToArray does not give Black=0 anymore....
The problem is that ..... if I get an array from IMAQimageToArray which has range from 0-3275 , How can I know that the image
is Black(0)-Gray(8000) or Gray(8000)-White(FFF0)....?
Thank you,
Kritsada