Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Save image in PNG save all black image

I am using Labview 7.0 with IMAQ-1394 1.5.3. I am able to Grab and snap images fine, both from labview and Max. But when I try to save the image displayed on the image indicator it saves an image of the same size with all black pixels. It does exactly the same thing when I try to save the image from MAX. I probed the error connections but I don't see any error between the vi. I tried the same vi on another PC which has LV 7 as well as 7.1 and the same vi works fine. What do I have missing? IS my Win2k missing any image related dll? If that's the case how come LV didn't flag for an error? Thanks for the help in advance.
0 Kudos
Message 1 of 5
(4,709 Views)
I have not seen this problem, but here are some ideas.

Is your color palette correct? If you don't wire one, I think it uses grayscale, but if you have an incorrect one, I am not sure what it does.

Is Use bit depth set correctly? (read the help file on this one, I'm not too sure if it should be true or false).

I hope that it is as simple as that.

Bob
0 Kudos
Message 2 of 5
(4,700 Views)
I have seen this before when trying to save a 16-bit image. IMAQ was saving it correctly but my viewer was not capable of handling a 16 bit image. I would try using something like Paintshop Pro or GIMP.

Hope that helps

Mike
0 Kudos
Message 3 of 5
(4,694 Views)
I had a similar problem, viewing png-images, which I saved with Max-Explorer.

In this case the image format was 16-bit grayscale, but the format of my camera was only 12-Bit.
With a standard viewer the pictures were nearly completely black, because the grayscale was adapted to 16-Bit (~64000) but only values up to 12-Bit (~4000) were in the picture.

Just shifting the pixel-values (by multiplying with 16) before saving could solve this problem.

Holger
0 Kudos
Message 4 of 5
(4,691 Views)
I've saved 16bit png's before, you just need the right viewer to see the data. Nothing out there, as far as I can tell, can handle 16bit pngs except Matlab. Is there a reason why you are not saving as tiff? From my experience, the acquisition goes a lot faster since there is no compression involved.

You should also keep in mind that image data is saved as signed integers. Depending on your camera, this will be either 8bit or 16bit. If your camera has a native 12bit resolution, you will see image data in the upper 8bit range (data offset by a value of 2^15). Although, for png's I think data starts from 0. Either way, in order to see your image you'll need to normalize your histogram to the appropriate range.

Message Edited by wpang on 05-02-2005 05:59 PM

0 Kudos
Message 5 of 5
(4,675 Views)