[Scilab-users] ?==?utf-8?q? creating ROI from mouse clicks

Philipp Mühlmann p.muehlmann at gmail.com
Fri Mar 11 10:11:52 CET 2016


Thanks, but wouldn't this limit the ROI shape to be a rectangle?

My purpose would be to have a ROI of any possible shape one can get with
mouse clicks, having the mouse positions "connected" via straight lines.

I'd like to have a look inside of "rubberbox.sci" or even "xfpoly.sci" to
maybe adjust it to my needs...but I can't find it.

There is also an imroi-function coming with SIP-Toolbox.
But this also deals only with rectangles and ellipses

BR
Philipp


2016-03-11 8:59 GMT+01:00 Antoine Monmayrant <amonmayr at laas.fr>:

>
> Le Vendredi 11 Mars 2016 06:39 CET, Philipp Mühlmann <
> p.muehlmann at gmail.com> a écrit:
>
> > Dear all,
> >
> > how can I use mouse clicks to create a region of interest (ROI) for image
> > processing without using IPD toolbox?
> >
> >
> > My current aproach is something like this:
> >
> >
> >
> > 1.) display an 2-D array, e.g.: a grayscale image
> >
> > 2.) use xclick to get mouse coordinates
> >
> > 3.) use xfpoly to draw a mask image based on the points clicked with the
> > mouse
> >      --> mask image has same size as 2D-array in 1.)
> >      --> mask image starts as zeros only
> >      --> xfpoly will fill the polygons white =ROI
> >      --> result is a 2D array containing only "0" and "1" --> can be
> saved
> > as b/w image
> >
> > 4.) use xs2bmp to save the mask image temporarily
> >
> > 5.) use "ReadImage" from IPD-toolbox to load the temporary image and
> delete
> > this temporary image afterwards
> >
> > 6.) now the mask can be applied onto the original image such as:
> > result_image = input_image .* mask_image;
> >
> >
> >
> > I'd prefer to get already the position of the area filled by xfpoly in
> step
> > 3.) as a variable.
> > This would prevent the need of the temporary image and the need of using
> > IPD.
>
> Hi,
>
> I am not sure this corresponds to what you are looking for, but an
> alternative to xclick could be rubberbox:
>
> [final_rect, btn] = rubberbox()
>
>
> Antoine
>
>
> >
> > Any idea?
> >
> > BR
> > Philipp
> >
> > --
> > There we have the salad.
>
>
>
>
>
>
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users
>



-- 
There we have the salad.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20160311/c4c4ddd7/attachment.htm>


More information about the users mailing list