Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Adjusting Contrast/Brightnes/Gamma

Why can I not use the BCGLookup-function on an image which I have created from an array.
The array is 2D, 512x512 values.
(Using the array-to-image function)

I get a "Wrong image type"-error. But I am able to display the same image.
0 Kudos
Message 1 of 3
(3,519 Views)
Hi Sondre,

BCGLookup will only work with 8-bit image types. So, you want to make sure that the 2D array you're passing in are U8. To change the data type, right click on the numeric array and click on representation and change to U8.

Another thing is that the Destination image type has to be 8-bit too.

You can see how this function is used with the shipping example that is available (BCGLookup Example.vi) You can then replace the Open image part with an (array-to-image function).

Hope this helps.

Ken Sun
Applications Engineering
National Instruments
Message 2 of 3
(3,519 Views)
Well, my image is 16-bit. I have tried to make my own adjustings. It works, but my problem is that it is very slow. (Uses aprox. 2 seconds per image with brightness adjusting, replacing every pixel in the image with a new value. (On a P3-800, 128MB)) I wanted a slider and an imediatly respons. (As in the BCG-example) Converting the image to 8 bit was not a good idea either.
Thanx anyway.
0 Kudos
Message 3 of 3
(3,519 Views)