cropping
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
sir, i am doing a project in face detection process. in that i draw an rectangular box in a face region. but i have to crop the rectangular part automatically. plz help me
0 Kommentare
Antworten (2)
Arturo Moncada-Torres
am 24 Jun. 2011
Face detection is a big, big topic. Assuming you are extracting the information you wish (the rectangular part) of an image and that you know the coordinates, it would be something like this:
I = imread('imageExample.jpg');
rectangularPart = I(topRow:bottomRow, leftCol:rightCol);
Is this what you are looking for?
0 Kommentare
Alex Taylor
am 24 Jun. 2011
Chitra,
If you have the Image Processing Toolbox, you can also use the function imcrop:
You'd want to use the syntax:
I2 = imcrop(I, rect);
Simple indexing like Arturo suggested is also a good way to go.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Matrix Indexing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!