Selecting rectangular region of interest.

5 次查看(过去 30 天)
I tried using imcrop to select a rectangular region of interest but for some reason it didn't work when I used another image (different size). I tried using the roipoly function to select the region of interest and that worked every time. However, I need to restrict it to a rectangular region of interest. Is there any way I can do this using 'roipoly'?

采纳的回答

Image Analyst
Image Analyst 2013-1-23
imrect() will work with every image. You must have passed in initial coordinates that were beyond the edges of your new image, or some other kind of invalid usage. I can't tell unless you tell me the error message.
If you don't want imrect(), then you can use rbbox() (for "rubber band box"). There is an example for using it in the help for rbbox().
  1 个评论
Con
Con 2013-1-23
I tried using imrect but it showed this error:
Undefined function or method 'fftn' for input arguments of type
'imrect'.
What I'm trying to do is take the fourier transform of just this region. rbbox() takes the transform, but it's the same every time, no matter what region is selected.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Migrate GUIDE Apps 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by