Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
how to get middle point from an image

Subject: how to get middle point from an image

From: dwi arliani

Date: 24 Feb, 2011 03:30:21

Message: 1 of 2

hi all,, this is my second question..
first, I want to say thank you to this forum, because it's really interactive and responsive to others problem .. :)

the problem is, i have an image with 640 x 480 pixel, and i want to create the bounding box as for a face detection..
what i want is, to get the middle point from this image, and then create a rectangle around it to make a bounding box for a face detection..

i got the concept from my friend, he is using java to make this bounding box,
 top = (int)midPoint.y - eyeDistance;
 left = (int)midPoint.x - eyeDistance;
 right = (int)midPoint.x + eyeDistance;
 bottom = (int)midPoint.y + eyeDistance;

how to get the middle point first before i can make the bounding box..??
thanks.. :)

Subject: how to get middle point from an image

From: ImageAnalyst

Date: 24 Feb, 2011 03:38:24

Message: 2 of 2

[rows columns numberOfColorChannels] = size(imageArray);

midPointX = columns / 2;
midPointY = rows / 2;

But there is no guarantee that a face will be at that location, unless
you're doing it on a live image and you are instructing your subject
to put their face there.

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us