Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Using IMAQ create, set-up, acquire and windraw to save image without color map

Hi,

Attached is my VI (using labview 8.5) and am not sure where it is getting the color info from, but it saves the image as jpeg/bmp/tiff with colormap (confirmed by imread in matlab). Can someone help me save these images without colormap info.

 

Thanks

0 Kudos
Message 1 of 10
(5,428 Views)

Hey Maverick269,

 

So in the example you posted the image type being provided to the 'IMAQ Create' VI looks like it is being coerced from '8-bit' to some other type. This typically happens when an image type is selected that is not compatible with the current video stream. I deleted the 'Image Type' constants wired into the IMAQ Create VI and replaced it with a fresh control which then correctly displayed the compatible. When you set the IMAQ Create VI to one of these other image types do you still see color data in the final saved image?

 

I hope this helps!

 

Andy C.

Applications Engineer

National Instruments 

0 Kudos
Message 2 of 10
(5,402 Views)

Hi Andy,

Thanks for your help.

Can you explain as what you mean by creating the control again? Do you mean to recreate IMAQ create again and redo the connections for the image type terminal? If that is the case, I tried that and it still shows a red coercion dot. Do you have any other suggestions on this issue?

 

Is there any way to save/convert the image back to just grayscale image?

0 Kudos
Message 3 of 10
(5,399 Views)

Take a look at this screenshot for an illustration. I deleted the image type constant connected to the image type terminal of the top IMAQ Create VI and replaced it with a new constant. This changed the available image types and removed the coercion dot.

 

Capture.JPG

 

Let us know what happens when you try to save images using one of these formats.

 

Andy C.

Applications Engineer

National Instruments 

0 Kudos
Message 4 of 10
(5,396 Views)

Hi,

When I try a different image format, like 16 bits, Float, Complex or RGB chunky etc. I get an error number 1074396078 in IMAQ grab acquire.vi

 

When I try Grayscale I16, the coercion dot still appears, but does not give an error. Although it still saves the image with color map.

 

I just checked that I am running my program in labview 8.5 but am using the labview 6.5 version IMAQ create. Does this have anything to do with the image types available for IMAQ create?

 

Please let me know.

 

Thanks

 

0 Kudos
Message 5 of 10
(5,385 Views)

That error code indicates an invalid image type--that is, the selected image type is not compatible with either the camera or some other setting of your hardware. Can you describe the other hardware you're using to interface with this camera?

 

Andy C.

Applications Engineer

National Instruments 

0 Kudos
Message 6 of 10
(5,375 Views)

I am using PCI 1409 as the framegrabber and SONY xc-55 camera with 12.5 mm focal length for the lens. Please let me know if you need any further information to help me on this issue.

 

Thanks

0 Kudos
Message 7 of 10
(5,373 Views)

Can you post a sample image that you have acquired using this code?

 

Andy C.

Applications Engineer

National Instruments 

0 Kudos
Message 8 of 10
(5,364 Views)

Hi Andy,

I am unable to post my images here in forum. Mine are jpeg or tiff images. Can you give me your email id so I can email them to you?

 

Thanks

N

0 Kudos
Message 9 of 10
(5,337 Views)

If you're still having trouble feel free to give us a call and open a service request. You can reach our support line at 1-866-275-6964. Give us a call and one of our engineers will be glad to look into this with you.

 

Cheers,

 

Andy C.

Applications Engineer

National Instruments 

0 Kudos
Message 10 of 10
(5,324 Views)