Domanda

In this post OpenCV: Shift/Align face image relative to reference Image (Image Registration), there is a function called

void alignImage(vector<Rect> faceROIstore, vector<Mat> faceIMGstore)

Can somebody explain the meaning of the parameters and how these will be used in the code please?

My second question is: can this function be used to align 2 face images of the same person?

È stato utile?

Soluzione

From OpenCV: Shift/Align face image relative to reference Image (Image Registration), you can easily found that:

  • vector<Rect> faceROIstore is a vector containing all face ROI regions.
  • vector<Mat> faceIMGstore is a vector containing all the corresponding face images.

To get the face ROI region of the image, you can do as follows:

Mat face_roi = faceIMGstore[i](faceROIstore[i]); // face ROI region of i-th image

For your second question: Yes, it can be used to align 2 face images no matter the face images are from the same person or two different persons. They works under the same idea.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top