Ask Your Question

Mohammad Rafi Ahadi's profile - activity

2015-02-06 10:53:56 -0600 answered a question crop detected face image using four points in opencv java

OpenCV has region of interest functions which you may find useful. If you are using the cv::Mat then you could use something like the following.

// Take your Final Detected Image image;

// These values need to be your determined face rect values cv::Rect myROI(x, y,width, height);

// Crop the full image to that image contained by the rectangle myROI // Note that this doesn't copy the data cv::Mat croppedImage = image(myROI);