Search in sources :

Example 16 with Se2_F64

use of georegression.struct.se.Se2_F64 in project BoofCV by lessthanoptimal.

the class TestSquaresIntoRegularClusters method createSquare.

private Polygon2D_F64 createSquare(double x, double y, double yaw, double width) {
    Se2_F64 motion = new Se2_F64(x, y, yaw);
    double r = width / 2;
    Polygon2D_F64 poly = new Polygon2D_F64(4);
    poly.get(0).setTo(-r, r);
    poly.get(1).setTo(r, r);
    poly.get(2).setTo(r, -r);
    poly.get(3).setTo(-r, -r);
    for (int i = 0; i < 4; i++) {
        SePointOps_F64.transform(motion, poly.get(i), poly.get(i));
    }
    return poly;
}
Also used : Se2_F64(georegression.struct.se.Se2_F64) Polygon2D_F64(georegression.struct.shapes.Polygon2D_F64)

Aggregations

Se2_F64 (georegression.struct.se.Se2_F64)16 Test (org.junit.jupiter.api.Test)7 Affine2D_F64 (georegression.struct.affine.Affine2D_F64)6 ModelManagerSe2_F64 (georegression.fitting.se.ModelManagerSe2_F64)3 SquareNode (boofcv.alg.fiducial.calib.squares.SquareNode)2 PlanePtPixel (boofcv.struct.sfm.PlanePtPixel)2 Point2D_F64 (georegression.struct.point.Point2D_F64)2 Rectangle2D_I32 (georegression.struct.shapes.Rectangle2D_I32)2 ArrayList (java.util.ArrayList)2 Ransac (org.ddogleg.fitting.modelset.ransac.Ransac)2 Test (org.junit.Test)2 WrapImageMotionPtkSmartRespawn (boofcv.abst.sfm.d2.WrapImageMotionPtkSmartRespawn)1 PointTrack (boofcv.abst.tracker.PointTrack)1 CameraPlaneProjection (boofcv.alg.sfm.overhead.CameraPlaneProjection)1 DistancePlane2DToPixelSq (boofcv.alg.sfm.robust.DistancePlane2DToPixelSq)1 GenerateSe2_PlanePtPixel (boofcv.alg.sfm.robust.GenerateSe2_PlanePtPixel)1 AssociatedPair (boofcv.struct.geo.AssociatedPair)1 GrayF32 (boofcv.struct.image.GrayF32)1 ModelManagerAffine2D_F64 (georegression.fitting.affine.ModelManagerAffine2D_F64)1 ModelManagerHomography2D_F64 (georegression.fitting.homography.ModelManagerHomography2D_F64)1