Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Why am in not getting a picture in LabVIEW?

The problem that I am having is that I get a picture in MAX but I do not get a picture in LabVIEW. I can't even get any information comming in on the U8 pixel readout. Nothing seems to come in. I don't know why. I have a KLI-2113 Tri-linear image sensor. It is a line scan camera. I can see that the IMAQ board is doing something because if I don't have it on and I try to start the VI "Acquire Image and Save Pixels Without Vision.vi", I get an error, no external pixel clock message. I know that it recognizes the board. I don't know why I get an image in MAX but not in LabVIEW. Can anyone help me out?

Thanks,

Brian
Download All
0 Kudos
Message 1 of 4
(3,378 Views)
You mentioned that you are able to acquire images in MAX, but not LabVIEW. What type of images are you looking at? Are they 8-bit or 16-bit? The issue may be that the image comming in from your camera is 16-bit, so no info would be displayed for the U8 (8-bit). Try the attatched example and see if you have any better luck- It allows 16bit images as well. If your image comming in is 12, or 10 bits, it is still stored as a 16bit image, but it is stored as the lower bits, so it may be necisarry to shift the bits as well.
Message 2 of 4
(3,378 Views)
I love you man, Finally, after 3 months I am able to see a picture using LabVIEW. I really appreciate your help, thanks a million. Also, you said, "If your image comming in is 12, or 10 bits, it is still stored as a 16bit image, but it is stored as the lower bits, so it may be necisarry to shift the bits as well." How do I "shift bits"?

Thanks again,

Brian
0 Kudos
Message 3 of 4
(3,378 Views)
If you buy the vision toolkit, there are functions that will do this for you, but otherwise, you can look at the code I sent you. The function you want to look at is called Display Image. In this function it treats the incomming image differently depending on if it is an 8bit or a 16bit image. If it is a 16bit image, it use the # to shift input to logically shift shift each pixel value before truncating to 8 bits. so if your binary data looked like this:
00000011 10100111
it could shift left by 6 to get this:
11101001 11000000
and then trucate the lowest 8 (which is the least signifigant data) bits to finally output:
11101001
0 Kudos
Message 4 of 4
(3,378 Views)