Search in sources :

Example 16 with PixelTransformAffine_F32

use of boofcv.alg.distort.PixelTransformAffine_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

PixelTransformAffine_F32 (boofcv.alg.distort.PixelTransformAffine_F32)16 Affine2D_F32 (georegression.struct.affine.Affine2D_F32)13 PixelTransform2_F32 (boofcv.struct.distort.PixelTransform2_F32)6 Test (org.junit.Test)5 GrayU8 (boofcv.struct.image.GrayU8)3 Polygon2D_F64 (georegression.struct.shapes.Polygon2D_F64)3 Affine2D_F64 (georegression.struct.affine.Affine2D_F64)2 Homography2D_F64 (georegression.struct.homography.Homography2D_F64)2 ArrayList (java.util.ArrayList)2 BlurStorageFilter (boofcv.abst.filter.blur.BlurStorageFilter)1 PixelTransformHomography_F32 (boofcv.alg.distort.PixelTransformHomography_F32)1 InterpolatePixelS (boofcv.alg.interpolate.InterpolatePixelS)1 GrayF32 (boofcv.struct.image.GrayF32)1 EllipseRotated_F64 (georegression.struct.curve.EllipseRotated_F64)1 Homography2D_F32 (georegression.struct.homography.Homography2D_F32)1 Point2D_F64 (georegression.struct.point.Point2D_F64)1 Point2D_I32 (georegression.struct.point.Point2D_I32)1 Se2_F32 (georegression.struct.se.Se2_F32)1 InvertibleTransformSequence (georegression.transform.InvertibleTransformSequence)1 FastQueue (org.ddogleg.struct.FastQueue)1