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
No, detectMultiscale has as output a vector of cv::Rect, why do you want to transform it to cv::Point then turn it back to cv::Rect? What is wrong with the Rects in the vector? Why not changing the function so it returns a Rect instead of Point?
I have posted earlier about the shaky face and eye, this function solves the problem with smooth detection and gives a Mat that contains detected face , I need to get rect to pass it to another function .
You should return a cv::Rect of the face that is computed from that point and the w and h used for drawing the ellipse. Point has no width and height