Cropping a face from an Image

조회 수: 1 (최근 30일)
Oliver Ferenczi
Oliver Ferenczi 2020년 2월 7일
댓글: KSSV 2020년 2월 7일
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일
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개)

카테고리

Help CenterFile Exchange에서 Computer Vision Toolbox에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by