From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

digital zooming upto 4X in steps of 1X

Hi all,

 

I am trying to implement digital zoom algorithm using any interpolation technique up to 4X in steps of 1X for an image size of 640X480 image. I need to zoom only specific region of interest of entire image. Kindly let me know how this can be acheived using NI vision development module.

 

 

With best regards,

Sri

 

 

 

0 Kudos
Message 1 of 19
(5,045 Views)

How do you select the roi? manually? or from some other processing like pattern matching? have you tried the property node zoom for the image?

0 Kudos
Message 2 of 19
(5,043 Views)

Please try this

0 Kudos
Message 3 of 19
(5,039 Views)

Hello,

 

how about something like this (please see the attachment, saved for LV2010).

Select the ROI (currently manual ROI selection) on the original image and "Zoom"  to extract the selected subimage and resample to original size. You can repeat the process, as the original image gets updated with the currently zoomed portion of the image.

 

The interpolation is Labview default (zero or bilinear).

 

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 4 of 19
(5,035 Views)

Hi,

 

There is change in my application.

I need to zoom up to 4X factor in steps of 1X  for the image from centre and not any roi (region of interest based). So please let me know how this can be done.

 

with regards,

sri

0 Kudos
Message 5 of 19
(4,923 Views)

If you dont select the ROI then i think it will default to your image centre

0 Kudos
Message 6 of 19
(4,916 Views)

@SriSwathi wrote:

Hi,

 

There is change in my application.

I need to zoom up to 4X factor in steps of 1X  for the image from centre and not any roi (region of interest based). So please let me know how this can be done.

 

with regards,

sri


I don't understand - was the attached application helpful or you wanted something else?

 

If it was, then just create a ROI based on the image center with the desired offset. Find the center of the image, and get the top-left coordinates by subtraction and bottom-right with addition with respect to the image center. Then create the ROI from the coordinates using rectangle to ROI. Interpolate with the created ROI, repeat...

 

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 7 of 19
(4,907 Views)

Hi,

 

I actually wanted an real time zoom in function, wherein i have to zoom from centre of the image/frame. I could not understand the how to zooming  in steps of 1X up to 4X. Please help me out i have tried Imaq resample etc.

 

with best regards,

sri

0 Kudos
Message 8 of 19
(4,879 Views)

Resample is not Zoom. Did you try the programs suggested above?

0 Kudos
Message 9 of 19
(4,877 Views)

Hello,

 

you cannot zoom from the center of the image as in camera, since the camera uses so-called optical zoom. Here, we are talking about digital zoom (the optical parameters don't change and the image quality is reduced by interpolation). In this case, you need to specify the portion of the image to enlarge and resample.

 

Have you seen the example in one of te previous posts? Just modify the ROI, so that its center coincides with the image center.

 

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 19
(4,876 Views)