12-16-2015 06:23 AM
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
12-16-2015 10:50 AM
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.
12-17-2015 09:27 AM
@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?
12-17-2015 09:43 AM
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.
12-17-2015 10:37 AM
@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.
12-17-2015 11:03 AM
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.
12-17-2015 11:12 AM
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
12-17-2015 09:30 PM
@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.
12-17-2015 09:31 PM
@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?
12-18-2015 01:21 AM - edited 12-18-2015 01:25 AM
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.