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,
Solved! Go to Solution.
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.
Thanks for the hint.
My problem is still not solved though, tiff file don't work and I can't use the image neither...
most of the image processing should work with an U16 Grayscale image. Could you describe more accurately what your image post processing shall do?
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...
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 !
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)
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?
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.
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.