Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

IMAQ: "not an image" errors using IMAQdx Snap

Solved!
Go to solution

Hi everyone,

 

I have a strange error which I don't understand. The part of the VI is attached.

Basically, I take a few pictures (10 to 20) of a region of interest and average them into a single one, which I want to save and post-process.More particularly, I want to retrieve the grayscale value of each pixel.

The problem is that the results is "not an Image". I can visualize it, but not save it to disk or do any filtering or else (like edge detection). I add a "cast image" module to try to force it but it does no good.

 

I am quite new in Labview so I suppose the error is evident but I just can't find it ! I compared my VI with existing without success.

Also, my method for averaging a ROI may be improved, do not hesitated to propose more efficient designs.

 

Thanks in advance for your help,

 

0 Kudos
Message 1 of 14
(4,625 Views)

Hi,

 

the BMP Version of IMAQ Write File 2.vi doesnt accept a 16 Bit Grayscale image. If you need the 16 Bits you could safe it to a .tiff file.

0 Kudos
Message 2 of 14
(4,618 Views)

Hi,

 

Thanks for the hint.

My problem is still not solved though, tiff file don't work and I can't use the image neither...

0 Kudos
Message 3 of 14
(4,605 Views)

Hmm,

 

most of the image processing should work with an U16 Grayscale image. Could you describe more accurately what your image post processing shall do?

0 Kudos
Message 4 of 14
(4,593 Views)

Hello,

 

can you attach the .vi example (possibly for Labview 2013 or before)?

 

Looking at your averaging procedure, I have a comment regarding your image bit depth - you can only store values from 0-65535 (so 65536 values) per pixel, so if your addition will reach the maximum value, the pixel(s) value(s) will overflow...

 

Best regards,

K


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
0 Kudos
Message 5 of 14
(4,588 Views)

Hi all,

 

Here is my VI. It is so far composed of 2 tabs, one with live view and some info, and a second on which I want to add some post-processing.

As suggested by Klemen, I changed the averaging to divide the images first before adding them. No change, I still have a "not an image" error when I try to use it.

The post processing I want to add is first to save it, then to do edge detection. Both give me the errror, though the image is well shown on the second tab.

Later I plan to add some more sophisticated Matlab-based processing, but first I need to save the image.

 

Thanks for your attention !

0 Kudos
Message 6 of 14
(4,586 Views)

By the way, I tried to save the image directly from the display, it sort of worked but the file is not in any format recognized by window and cannot be read even by ImageJ.

(thus, I cannot attached it)

 

0 Kudos
Message 7 of 14
(4,580 Views)

Hello,

 

I did not say that the image bit depth is the cause of the problems, but rather a programming error.

 

You've saved the .vi for 2014, so I cannot open your attachment (have Labview 2013 as mentioned in my previous post).

 

P.S.: If you plan to use Matlab, why not do the acquisition also in Matlab?

 

Best regards,

K


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
0 Kudos
Message 8 of 14
(4,579 Views)

The idea is to have an easy to use interface for people who don't know anything about matlab.

The VI in v12 is attached.

 

0 Kudos
Message 9 of 14
(4,576 Views)

Hello,

 

you can do easy to use interface in Matlab also. Easy to code, that's another thing - Labview GUI is easier to do in my opinion.

 

I still do not understand your averaging procedure - you are now dividing each image pixel with an integer before you add the images?

 

Anyway, put an IMAQ Cast right after the IMAQdx Snap and cast the image to U16 prior to IMAQ Extract.

 

Best regards,

K


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
0 Kudos
Message 10 of 14
(4,569 Views)