MCPcopy Create free account
hub / github.com/creatale/node-dv / points

Method points

deps/opencv/modules/core/src/matrix.cpp:4261–4275  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4259////////////////////// RotatedRect //////////////////////
4260
4261void RotatedRect::points(Point2f pt[]) const
4262{
4263 double _angle = angle*CV_PI/180.;
4264 float b = (float)cos(_angle)*0.5f;
4265 float a = (float)sin(_angle)*0.5f;
4266
4267 pt[0].x = center.x - a*size.height - b*size.width;
4268 pt[0].y = center.y + b*size.height - a*size.width;
4269 pt[1].x = center.x + a*size.height - b*size.width;
4270 pt[1].y = center.y - b*size.height - a*size.width;
4271 pt[2].x = 2*center.x - pt[0].x;
4272 pt[2].y = 2*center.y - pt[0].y;
4273 pt[3].x = 2*center.x - pt[1].x;
4274 pt[3].y = 2*center.y - pt[1].y;
4275}
4276
4277Rect RotatedRect::boundingRect() const
4278{

Callers 7

cvBoxPointsFunction · 0.80
BlockPolygonMethod · 0.80
TraceBlockOnReducedPixFunction · 0.80
containsMethod · 0.80
overlapMethod · 0.80
get_lineMethod · 0.80
render_maskMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected