<div dir="ltr"><div><div>Thanks, but wouldn't this limit the ROI shape to be a rectangle?</div><div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div>There is also an imroi-function coming with SIP-Toolbox.</div><div>But this also deals only with rectangles and ellipses</div><div><br></div><div>BR</div><div>Philipp</div></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-03-11 8:59 GMT+01:00 Antoine Monmayrant <span dir="ltr"><<a href="mailto:amonmayr@laas.fr" target="_blank">amonmayr@laas.fr</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Le Vendredi 11 Mars 2016 06:39 CET, Philipp Mühlmann <<a href="mailto:p.muehlmann@gmail.com">p.muehlmann@gmail.com</a>> a écrit:<br>
<br>
> Dear all,<br>
><br>
> how can I use mouse clicks to create a region of interest (ROI) for image<br>
> processing without using IPD toolbox?<br>
><br>
><br>
> My current aproach is something like this:<br>
><br>
><br>
><br>
> 1.) display an 2-D array, e.g.: a grayscale image<br>
><br>
> 2.) use xclick to get mouse coordinates<br>
><br>
> 3.) use xfpoly to draw a mask image based on the points clicked with the<br>
> mouse<br>
> --> mask image has same size as 2D-array in 1.)<br>
> --> mask image starts as zeros only<br>
> --> xfpoly will fill the polygons white =ROI<br>
> --> result is a 2D array containing only "0" and "1" --> can be saved<br>
> as b/w image<br>
><br>
> 4.) use xs2bmp to save the mask image temporarily<br>
><br>
> 5.) use "ReadImage" from IPD-toolbox to load the temporary image and delete<br>
> this temporary image afterwards<br>
><br>
> 6.) now the mask can be applied onto the original image such as:<br>
> result_image = input_image .* mask_image;<br>
><br>
><br>
><br>
> I'd prefer to get already the position of the area filled by xfpoly in step<br>
> 3.) as a variable.<br>
> This would prevent the need of the temporary image and the need of using<br>
> IPD.<br>
<br>
Hi,<br>
<br>
I am not sure this corresponds to what you are looking for, but an alternative to xclick could be rubberbox:<br>
<br>
[final_rect, btn] = rubberbox()<br>
<br>
<br>
Antoine<br>
<br>
<br>
><br>
> Any idea?<br>
><br>
> BR<br>
> Philipp<br>
><br>
> --<br>
> There we have the salad.<br>
<br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
users mailing list<br>
<a href="mailto:users@lists.scilab.org">users@lists.scilab.org</a><br>
<a href="http://lists.scilab.org/mailman/listinfo/users" target="_blank" rel="noreferrer">http://lists.scilab.org/mailman/listinfo/users</a><br>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">There we have the salad.</div>
</div>