11-19-2008 06:31 AM
I am using Labview 8.6 to display some images, (from data imported from CSV files). I need to blow the images up to make individual pixels easier to see, I am using the "zoomfactor" image property to enlarge them, this works very well in terms of speed and ease of programming, but there is another problem:
Labview uses an antialiasing filter to smooth the image when resizing, that would be good for most situations, but is a hinderance for me. I need to zoom in to inspect pixel level defects in imaging arrays, so I need to be able to zoom by interger factors without any filtering. Is there any way to disable filtering in the zoomfactor property?
I know I could write a fairly simple vi to expand the image into a larger array, but that has disadvantages; it would involve creating these large arrays in memory, and that process has to be repeated every time the image is updated, that could cause issues with memory management and performance. The zoomfactor property is a very elegant way to deal with the problem, there just needs to be a way to disable the antialiasing filter. Can anyone help?
Luke
11-19-2008 06:57 AM - edited 11-19-2008 06:58 AM
Hi, Luke,
Assumed, that you're using IMAQ Vision, and under "zoomfactor image property" you mean ZoomInteger property of the Image Display. If so, then I can't recognize any "antialiazing filter" on zoomed image:
Andrey.
11-19-2008 07:39 AM
Andrey,
Thank you for your reply. I do not have IMAQ Vision, I am using the property node of a standard picture indicator, the property is called "zoomfactor". Attached is an example of the antialiased output. "ZoomInterger" sounds like exactly what I need, but it doesn't seem to be part of the base package. That seems kind of odd, since it is in principle a more "basic" function than the filtered zoom. Is there any way around this without buying IMAQ?
Luke
11-20-2008 09:41 AM - edited 11-20-2008 09:45 AM
Hi Luke,
I tried the same thing in the normal picture controls and see no difference. Please see the image, I have zoomed with paint (so no filter) and zoomed with the picture control and they appear to be the same. Can you demonstrate what you are seeing?
Regards,
11-20-2008 10:02 AM - edited 11-20-2008 10:03 AM
Hi, James,
16x16 - it too easy... Try to increase the size up to 512x512. See difference:
Andrey.
11-20-2008 10:54 AM - edited 11-20-2008 10:56 AM
This gets even stranger, sometimes it does it and sometimes it doesn't. It seems to me to depend on what is wired to the colour map input of the "draw unflattened pixmap" block. See the attached image and vi. In this case, the image is a constant 100x100 array (just random noise). Each time the vi runs the vi generates a random colour table variable. Try running the vi. several times, sometimes the output is filtered, sometimes it is not!
If you change the value of the float constant to 256, then the filtering turns off. My guess is it is something to do with whether Labview thinks it is drawing a palleted or 24-bit colour image, and that depends on the contents of the colour table.
Clearly there is some sense behind this somewhere, it would be very good to know what it driving this so that I could reliably make it filter or not filter.
Thanks for the input so far.
Luke
11-20-2008 11:37 AM
You're right, this effect depends from the size and from palette at the same time.
Andrey.
11-21-2008 06:07 AM
I wonder whether Labview uses the system graphics driver to carry out the zoom. Who would know about this kind of thing?
Luke
11-21-2008 06:44 AM
Hi,
I have attempted to contact someone regarding this that may have more of an understanding of the underlying functionality of this control and will let you know once I hear anything back.
Regards,
11-27-2008 07:55 AM
Hi,
Just to let you know we are still looking into this. I appears to be related to the ratio of the size of the image and the zoom factor but we are trying to work it out a bit more precisely that that.
Regards,