- 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 view (last 30 days)
Show older comments
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 Comments
Image Analyst
on 14 Apr 2019
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]);
Answers (0)
See Also
Categories
Find more on Image Segmentation and Analysis in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!