How to extract constant size roi image from an images in a dataset

1 次查看(过去 30 天)
In my dataset I need to extract the region of interest from an image to extract features from that image. But the problem is that the roi is different in size in terms of height and width. I want to extract the roi such that the quality of the roi does not degrade and all rois are of same size.
  6 个评论
shivasmic
shivasmic 2019-4-14
Actually ROI is been cropped using the coordinates from the bounding box function. But as can understand these coordinates vary from image to image. Yes I want to crop the grayscale roi using the same coordinates but such that the height and width remains same for each and every ROI image. Note: roi can be anywhere in the image not necessarily in the middle.
Image Analyst
Image Analyst 2019-4-14
Not sure what this means "Actually ROI is been cropped". Has it been cropped, or it still needs to be cropped?
Is the non-gray part of the image (i.e. the color image) the same size or not?
If they all have "the same coordinates" and you know the height and width, because they're constants ("the height and width remains same for each and every ROI" as you said), then why not just use imcrop()
croppedImage = imcrop(rgbImage, [col1, row1, width, height]);

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Image Segmentation and Analysis 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by