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

1 visualizzazione (ultimi 30 giorni)
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 Commenti
shivasmic
shivasmic il 14 Apr 2019
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 il 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]);

Accedi per commentare.

Risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by