LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I need a ROI of FIXED Size

Hi,

      I am working on image processing. In my present work I need to crop ROIs from images but the size of ROI should be same for all. So I have to fixed the dimension of ROI through block diagram coding so that all the cropped ROI finally will be of same size.
I able to find a way to create a ROI of a given size, movable on the image using Convert Rectangle to ROI vi. But the rectangle is till resizable. Is there anyway to fixed the size?
Please help me out.

Thanks

 

0 Kudos
Message 1 of 19
(3,947 Views)

You can check ROI size after it has been moved (check image event mouse up) and discard size changes.

Or

You can track position of user specified ROI-point and overlay rectangle on image to show user the resulting processing ROI. There is a little confusion: ROI on the image display is only user interface and ROI as region of interest for processing.

0 Kudos
Message 2 of 19
(3,919 Views)

@Alexander_Sobolev wrote:

You can check ROI size after it has been moved (check image event mouse up) and discard size changes.

Or

You can track position of user specified ROI-point and overlay rectangle on image to show user the resulting processing ROI. There is a little confusion: ROI on the image display is only user interface and ROI as region of interest for processing.


Thanks for your support and response.
Please see the attached image file. How to reset the rectangle size if anyway altered by user?
I am also not getting any way to find the ROI-point, can you please help me?

 

0 Kudos
Message 3 of 19
(3,883 Views)

Please attach the VI, not a picture.

 

If the size is really critical, I would make the user set the width, height, and left and top offset using numeric controls.

0 Kudos
Message 4 of 19
(3,872 Views)

@Gregory wrote:

Please attach the VI, not a picture.

 

If the size is really critical, I would make the user set the width, height, and left and top offset using numeric controls.


pleasesee the attachment... my requirement is keeping the ROI size fixed, not the image size is my concern.

 

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

You can do something like this, run ROIsample.vi. You do have to have an ROI drawn already, but this was something I was specifically asked for by one of my users.

0 Kudos
Message 6 of 19
(3,854 Views)

You could allow users to define only point ROI and draw the fixed size rectangle as an overlay.

It will up to you to translate the point to a rectanglurar ROI whenever needed.

 

Marco

 

 

0 Kudos
Message 7 of 19
(3,847 Views)

@Gregory wrote:

You can do something like this, run ROIsample.vi. You do have to have an ROI drawn already, but this was something I was specifically asked for by one of my users.


Thanks gregoryj. As I am using labview 2012 can't open your files. Can you please save them in compatible mode and re-share?
Thanks for your support.

0 Kudos
Message 8 of 19
(3,825 Views)

@MarcoMauri wrote:

You could allow users to define only point ROI and draw the fixed size rectangle as an overlay.

It will up to you to translate the point to a rectanglurar ROI whenever needed.

 

Marco

 

 


Thanks Marco, but I can't extract mouse information fron that vi I am using. Can you help in that?

0 Kudos
Message 9 of 19
(3,822 Views)

Hi!

 

Try this one.

 

I'm capturing the mouse click and creating on the fly a rectangular ROI of a given size.

 

Regards,

Marco

 

p.s. change the X and Y size of a ROI to a value different from 0... I forgot to update  the default value.

0 Kudos
Message 10 of 19
(3,798 Views)