Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to Get Rect from point

Hi

I'm using function Point detectFace(Mat frame, Point priorCenter) to detect face in a video frame

the function gives a Mat object contains detected face , function link

I"m calling this function inside another function , my question is how can I get a rect from the output of this function ?

This is how I'm calling the function

    Point priorCenter(0, 0);
    priorCenter = detectFace(matCapturedGrayImage, priorCenter);

    Rect face (priorCenter.x, priorCenter.y, priorCenter.width(), priorCenter. height());

it is not correct , I need help

Thanks