MATLAB Answers

Crop resulting image in Cascade object Detector

1 view (last 30 days)
AKG
AKG on 14 Sep 2020
Answered: Mahesh Taparia on 17 Sep 2020
I have trained positive and negative images in image labeller app and properly marked the ROIs. When the testing is done, the detector is detecting the ROI.What I want is to crop the resulting image thus showing only the ROI of the test image. How can this be done?

  0 Comments

Sign in to comment.

Answers (1)

Mahesh Taparia
Mahesh Taparia on 17 Sep 2020
Hi
The detector is returning the coordinates of the bounding box which is present in the image. It may be in the format of (x,y,h,w). You can store the image content of this bounding box into other variable and save it. For example:
newI=testI(x:x+w,y:y+h,:);

  0 Comments

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!

Translated by