Hi, so im able to create a bounding box around the faces in an image. Now I would like to crop the image so that I am just left with the images from within the bounding boxes using imcrop. I have so far been unable to do this.
Thank you

 採用された回答

KSSV
KSSV 2020 年 2 月 7 日

1 投票

I = imread('cameraman.tif');
[J, rect] = imcrop(I);
Perform the crop operation by double-clicking in the crop rectangle or selecting Crop Image on the context menu.
imshow(J) ;

2 件のコメント

Oliver Ferenczi
Oliver Ferenczi 2020 年 2 月 7 日
How do I make it crop to the same size every time?
KSSV
KSSV 2020 年 2 月 7 日
You got the output rect ..use that to crop to the same size and location.....
I2 = imcrop(I,rect);

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeComputer Vision Toolbox についてさらに検索

製品

リリース

R2019b

質問済み:

2020 年 2 月 7 日

コメント済み:

2020 年 2 月 7 日

Community Treasure Hunt

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

Start Hunting!

Translated by