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

Function RoiShapeToImgFrame

jni/stasm/faceroi.cpp:140–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138// to undo the effects of searching on the ROI, not on the actual image.
139
140Shape RoiShapeToImgFrame( // return shape in image frame
141 const Shape& shape, // in: shape in roi frame
142 const Image& face_roi, // in
143 const DetectorParameter& detpar_roi, // in: detpar wrt the ROI
144 const DetectorParameter& detpar) // in: detpar wrt the image
145{
146 Shape outshape(shape.clone());
147 if (IsLeftFacing(detpar.eyaw))
148 outshape = FlipShape(outshape, face_roi.cols);
149 if (Valid(detpar.rot) && detpar.rot)
150 {
151 const MAT rotmat =
152 getRotationMatrix2D(cv::Point2f(float(detpar_roi.x),
153 float(detpar_roi.y)),
154 detpar.rot, 1.);
155 TransformShapeInPlace(outshape, rotmat);
156 }
157 return ShiftShape(outshape, detpar.x - detpar_roi.x,
158 detpar.y - detpar_roi.y);
159}
160
161void PossiblySetRotToZero( // this is to avoid rotating the image unnecessarily
162 double& rot) // io

Callers 2

stasm_search_auto_extFunction · 0.85
stasm_search_pinnedFunction · 0.85

Calls 5

IsLeftFacingFunction · 0.85
FlipShapeFunction · 0.85
ValidFunction · 0.85
TransformShapeInPlaceFunction · 0.85
ShiftShapeFunction · 0.85

Tested by

no test coverage detected