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;
}
};
}
Aggregations