Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

vision software THRESHOLD

Sorry, I am not authorized to give images outside the organization. I understand, it makes debug harder. Here's some more info. The frequency of the source is such that each image frame has 2 fields (one odd and one even) and every 3rd frame has no image for the source. Does it help any?

Thanks,

Ekramul

  

0 Kudos
Message 11 of 16
(1,944 Views)
Hmm, I'm afraid I don't quite follow.

Is it possible for you to make a fake/dummy image, such as a randomly generated pattern or MS-Paint drawn picture and convert it into an interlaced TIFF? Something that couldn't possibly have any internal value and therefore wouldn't need to be controlled by your organization? And what program are you using that is generating these interlaced TIFFs to begin with?
0 Kudos
Message 12 of 16
(1,927 Views)
Hi Vijay,
Here's a test image that you have requested for. This is actually a .tif image, renamed as .gif so that the attahcement will go.
Thanks,
Ekramul
0 Kudos
Message 13 of 16
(1,898 Views)
Hi Ekramul,
I renamed the file to a .TIF and loaded it up into a LabVIEW image display, a LabVIEW-called WinDraw display, and a CWIMAQViewer (called in the VB example found in National Instruments\Vision\Examples\MSVB\1. Getting Started\ which was upgraded to Visual Studio 2005), and all 3 of those display methods zoomed in and out properly at multiple zoom levels without displaying the effects you've described.

Have you tried updating your dispaly device's video drivers to possibly fix this?
0 Kudos
Message 14 of 16
(1,875 Views)

Thanks, Vijay. I am not sure what upgrade you are talking about. We get these images to various sources and we basically analyze the location (center of mass) of the center spot with respect to the four corner lights. The central spot is the interlaced, whereas the corner lights are not. Please try again and this time makes sure you are looking at the center light. In zoom level 0, you will clearly notice the image is interlaced. You will also notice that the last three digits of the label at the top is made up by superimposing some numbers. Now, zoom out (shift-click zoom) and you will see the lines in the central spot is gone and the last three digits are clear (reads 315 in this case). This is the effect I am talking about. Please try this and let me know the outcomes.

I have another question -- The regions drawn on the image are locatable by hovering the mouse on it. How can I programmatically extract this located region object?

Vijay, I am really thankful to you for all your assistance

Ekramul  

 

0 Kudos
Message 15 of 16
(1,871 Views)
I think I understand what your'e asking better now...

If you separate the interlaced image the way I described before (using the CWIMAQVision.InterlaceSeparate) into two separate image buffers, you'll see the Odd/Even fields come out separately, where one set of fields clearly shows no dot and does have the 298 in the time, while the other shows the center dot and has a 315.

The effect you're seeing upon zooming is related to what particular algorithm the CWIMAQViewer uses to resample the image for display. Obviously, the image will look fine at 1x zoom, but when you tell it to zoom to 0.5x, it has to choose what pixels to display and how it wants to approximates the resized display. In this case, zooming out to 0.5X means cutting the each dimension in half, to where two adjacent pixels are now displayed as one single pixel; this is calculated for both the horizontal and vertical dimensions. Different algorithms exist for doing this - do you choose the top-most or left-most pixel each time you have to resize down? Do you average the two pixels together to make a single output pixel? Do you take a weighted average of even more pixels around them to make the transition to the next pixel smoother?

Similarly, scaling an image up (or zooming in on it) might also use different interpolation methods to "fill in" the new pixels you create by expanding your image. Terms such as zero-order/nearest neighbor interpolation and bicubic interpolation are explained in good detail on the following third-party page. Oftentimes, the rougher methods of interpolation are used in order to reduce processing time and provide more responsive or smoother zooming. Since you are not actually changing the image itself when zooming, most graphics packages use the rougher methods without worrying about losing picture information.

Each software program can have a different way of handling this. If you load the TIFF file into any of the following picture viewers - Windows Picture & Fax Viewer (the default program in WinXP for previewing images), Photoshop, Irfanview, or GIMP, they may all give slightly different results when zoomed in or out. Similarly, if you actually perform resampling to resize the image down in any of those programs, you may get slightly different results. In LabVIEW's case, it appears to be tossing out every other field and just displaying the odd field lines (and I assume tossing out every other column too), resulting in an image which looks a lot like when you separate out just the odd fields.

***

Edit: To answer your question on regions of interest specified on the viewer panel, you can use the CWIMAQViewer.Regions property to view this. Also check out the CWIMAQRegions data type. See the NI Vision for Visual Basic help in Start » Programs » National Instruments » Vision » Documentation » NI Vision  (it is not located in the NI-IMAQ documentation directory). for more info. The description for CWIMAQRegions is as follows:

CWIMAQRegions
CWIMAQRegions is a collection of CWIMAQRegion objects. Every CWIMAQViewer control has a CWIMAQRegions collection associated with it, which you can use to add and manipulate region objects on the viewer. In addition, you can create a CWIMAQRegions object that is not associated with a CWIMAQViewer control.


Message Edited by VGA CD-ROM on 05-27-2008 11:40 PM
0 Kudos
Message 16 of 16
(1,859 Views)