Borrar filtros
Borrar filtros

Cropping a face from an Image

3 visualizaciones (últimos 30 días)
Oliver Ferenczi
Oliver Ferenczi el 7 de Feb. de 2020
Comentada: KSSV el 7 de Feb. de 2020
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

Respuesta aceptada

KSSV
KSSV el 7 de Feb. de 2020
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 comentarios
Oliver Ferenczi
Oliver Ferenczi el 7 de Feb. de 2020
How do I make it crop to the same size every time?
KSSV
KSSV el 7 de Feb. de 2020
You got the output rect ..use that to crop to the same size and location.....
I2 = imcrop(I,rect);

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Computer Vision Toolbox en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by