making canvas frame equal bilaterally

1 view (last 30 days)
Hassan Aleem
Hassan Aleem on 26 Nov 2015
Commented: Hassan Aleem on 26 Nov 2015
I have a set of images, frontal portraits, however the subjects are not centered in the canvas, for example there is more background to the left of the person than to the right. Is there already a tool or a way to make the canvas equal around an object (essentially cropping the canvas from left/right at different amounts until the distance from the face (lets say nose) to the boundaries is equidistant.

Answers (1)

Walter Roberson
Walter Roberson on 26 Nov 2015
Once you know where the nose is, you can determine the distance to the two edges and from there figure out where to crop the image.
  1 Comment
Hassan Aleem
Hassan Aleem on 26 Nov 2015
is there a way to have the function ask me to click on the image and then record the location of that pixel? this way i could click on the nose, it would save that info and I could do the rest from there

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!