Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

how to make zoom window on image?

Hello,

I'm trying to make a zoom window which zoom in where the window places on image. Is there any way to do it ?

Im using IMAQ create and IMAQ read file to show the .jpg image.

I uploaded an example image. 


Yasemin Barutçu
Electrical And Electronics Engineer
0 Kudos
Message 1 of 11
(6,093 Views)

Hi,

 

I believe the example below achieves what you are attempting to do. A region of interest (ROI) is created using the IMAQ Select Rectangle and IMAQ Extract functions and the ROI is then expanded using the IMAQ Expand function.

 

Is this what you were looking to do? Let me know if you have questions on these functions and how they are used.

 

Matt
NI Community Team
National Instruments
0 Kudos
Message 2 of 11
(6,075 Views)

But Im using the Labview2009. I couldnt open your vi. Could you please send me the vi which is compatible with 2009.


Yasemin Barutçu
Electrical And Electronics Engineer
0 Kudos
Message 3 of 11
(6,070 Views)

I have an image on the screen. On this image I want to zoom in where I want by using a zoom in window. What I want is a like windows magnifiying glass. In magnifiying glass there is a square window. In this window the display zoom in where the mouse pointer is at the screen. To help understand I am sending a photo of magnifying glass.magnifier.jpg


Yasemin Barutçu
Electrical And Electronics Engineer
0 Kudos
Message 4 of 11
(6,067 Views)

Hi,

 

Attached is the example saved in LabVIEW 2009. It is a relatively simple example that allows the user to choose a zoom factor then select a region of interest and zoom in on that region. It may not be exactly what you are looking for, but it should be a good jumping off point. Were you hoping to have that "zoom area" continuously follow the mouse?

Matt
NI Community Team
National Instruments
0 Kudos
Message 5 of 11
(6,055 Views)

Duplicating the magnifying glass effect is fairly easy.

 

Create two image display windows.  The first one should fit the entire image fullsize (or even zoomed out).  The second one will display the zoomed portion of the image.  Display your image in both windows.  Set the zoom factor you want in each window.

 

Quick and dirty method:  Use a while loop with a 100 msec delay.  Read the current mouse position from the first image using a property node (Last Mouse Position).  Use that position to set the image center property on the second image (Image Center Position).

 

For more finesse, you should create a loop with a event structure that checks for mouse motion in the first image.  Whenever the mouse moves, copy the mouse position property to the image center property.

 

I just tested it in LV 2010.  I assume the same properties are available in LV 2009, even if the names change slightly.

 

Bruce

Bruce Ammons
Ammons Engineering
Message 6 of 11
(6,052 Views)

I got this error. I couldnt use extract and expand function 😕

vision_error.png


Yasemin Barutçu
Electrical And Electronics Engineer
0 Kudos
Message 7 of 11
(6,032 Views)

Hi,

 

This is a problem with the Vision Development Module (VDM). Do you have VDM installed? The Vision Acquisition Software and its functions (IMAQ Create, IMAQ Read, etc.) are only the functions to obtain images. VDM is required to manipulate and analyze these images in LabVIEW. The differences between Vision Acquisition Software and Vision Development Module are explained in this Knowledge Base Article

 

VDM is an add-on module and to use its functions you need be licensed for it and have it installed. If you are licensed, you can download the Vision Development Module

 

I hope that information is helpful!

Matt
NI Community Team
National Instruments
0 Kudos
Message 8 of 11
(6,021 Views)

You don't need the VDM to use my method.  It only uses two property nodes of the image display window, which is part of LabVIEW.

 

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 9 of 11
(6,017 Views)

I did this example with your help. Thank you very much. And then the other step how could I make a zoom window? on the image?


Yasemin Barutçu
Electrical And Electronics Engineer
0 Kudos
Message 10 of 11
(6,012 Views)