- Is the ROI rectangular or not?
- If rectangular, what should be row1, row2, column1, and column2 in each differently-shaped image? Would these change depending on the image size? If not rectangular, how would you determine its shape?
- Why are your ROIs of different size?
- Why do you think the quality of the ROI would degrade if the image is extracted from it or you're just processing withing the ROI? I don't see any reason why it would, as long as you don't resize it.
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 个评论
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 Center 和 File Exchange 中查找有关 Image Segmentation and Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!