Search in sources :

Example 21 with Affine2D_F32

use of georegression.struct.affine.Affine2D_F32 in project BoofCV by lessthanoptimal.

the class FactoryStitchingTransform method createAffine_F64.

public static StitchingTransform<Affine2D_F64> createAffine_F64() {
    return new StitchingTransform<Affine2D_F64>() {

        Affine2D_F32 input_F32 = new Affine2D_F32();

        @Override
        public PixelTransform2_F32 convertPixel(Affine2D_F64 input, PixelTransform2_F32 output) {
            ConvertFloatType.convert(input, input_F32);
            if (output != null) {
                ((PixelTransformAffine_F32) output).set(input_F32);
            } else {
                PixelTransformAffine_F32 a = new PixelTransformAffine_F32();
                a.set(input_F32);
                output = a;
            }
            return output;
        }

        @Override
        public Homography2D_F64 convertH(Affine2D_F64 input, Homography2D_F64 output) {
            if (output == null)
                output = new Homography2D_F64();
            output.set(input.a11, input.a12, input.tx, input.a21, input.a22, input.ty, 0, 0, 1);
            return output;
        }
    };
}
Also used : Affine2D_F64(georegression.struct.affine.Affine2D_F64) Affine2D_F32(georegression.struct.affine.Affine2D_F32) PixelTransformAffine_F32(boofcv.alg.distort.PixelTransformAffine_F32) Homography2D_F64(georegression.struct.homography.Homography2D_F64) PixelTransform2_F32(boofcv.struct.distort.PixelTransform2_F32)

Aggregations

Affine2D_F32 (georegression.struct.affine.Affine2D_F32)21 PixelTransformAffine_F32 (boofcv.alg.distort.PixelTransformAffine_F32)13 Test (org.junit.Test)11 PixelTransform2_F32 (boofcv.struct.distort.PixelTransform2_F32)6 GrayU8 (boofcv.struct.image.GrayU8)3 Polygon2D_F64 (georegression.struct.shapes.Polygon2D_F64)3 Affine2D_F64 (georegression.struct.affine.Affine2D_F64)2 Homography2D_F32 (georegression.struct.homography.Homography2D_F32)2 Homography2D_F64 (georegression.struct.homography.Homography2D_F64)2 RectangleLength2D_F32 (georegression.struct.shapes.RectangleLength2D_F32)2 RectangleLength2D_I32 (georegression.struct.shapes.RectangleLength2D_I32)2 ArrayList (java.util.ArrayList)2 PixelTransformHomography_F32 (boofcv.alg.distort.PixelTransformHomography_F32)1 InterpolatePixelS (boofcv.alg.interpolate.InterpolatePixelS)1 GrayF32 (boofcv.struct.image.GrayF32)1 ImageGray (boofcv.struct.image.ImageGray)1 Planar (boofcv.struct.image.Planar)1 EllipseRotated_F64 (georegression.struct.curve.EllipseRotated_F64)1 Point2D_F32 (georegression.struct.point.Point2D_F32)1 Point2D_F64 (georegression.struct.point.Point2D_F64)1