MCPcopy Create free account
hub / github.com/KAlO2/PerfectShow / ImgShapeToRoiFrame

Function ImgShapeToRoiFrame

jni/stasm/faceroi.cpp:118–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116}
117
118Shape ImgShapeToRoiFrame( // return shape in ROI frame
119 const Shape& shape, // in: shape in image frame
120 const DetectorParameter& detpar_roi, // in: detpar wrt the ROI
121 const DetectorParameter& detpar) // in
122{
123 Shape outshape(ShiftShape(shape, detpar_roi.x - detpar.x,
124 detpar_roi.y - detpar.y));
125 if (Valid(detpar.rot) && detpar.rot)
126 {
127 const MAT rotmat = getRotationMatrix2D(cv::Point2f(float(detpar_roi.x),
128 float(detpar_roi.y)),
129 -detpar.rot,
130 1.);
131 TransformShapeInPlace(outshape, rotmat);
132 }
133 return outshape;
134}
135
136// In StartShapeAndRoi we selected a ROI and possibly rotated that ROI.
137// The search was done on that ROI. Now de-adjust the search results

Callers 1

PinnedStartShapeAndRoiFunction · 0.85

Calls 3

ShiftShapeFunction · 0.85
ValidFunction · 0.85
TransformShapeInPlaceFunction · 0.85

Tested by

no test coverage detected