Tabnine Logo
FDistort.transform
Code IndexAdd Tabnine to your IDE (free)

How to use
transform
method
in
boofcv.abst.distort.FDistort

Best Java code snippets using boofcv.abst.distort.FDistort.transform (Showing top 6 results out of 315)

origin: org.boofcv/boofcv-ip

/**
 * Used to manually specify a transform.  From output to input
 */
public FDistort transform( Point2Transform2_F32 outputToInput ) {
  return transform( new PointToPixelTransform_F32(outputToInput));
}
origin: org.boofcv/boofcv-ip

/**
 * Applies a distortion which will rotate the input image by the specified amount.
 */
public FDistort rotate( double angleInputToOutput ) {
  PixelTransform2_F32 outputToInput = DistortSupport.transformRotate(input.width/2,input.height/2,
      output.width/2,output.height/2,(float)angleInputToOutput);
  return transform(outputToInput);
}
origin: org.boofcv/boofcv-ip

/**
 * <p>Applies a distortion which will rescale the input image into the output image.  You
 * might want to consider using {@link #scaleExt()} instead since it sets the border behavior
 * to extended, which is probably what you want to do.</p>
 *
 * NOTE: Checks to see if it can recycle the previous transform and update it with a new affine model
 * to avoid declaring new memory.
 */
public FDistort scale() {
  if( outputToInput != null && outputToInput instanceof PixelTransformAffine_F32 ) {
    PixelTransformAffine_F32 affine = (PixelTransformAffine_F32)outputToInput;
    DistortSupport.transformScale(output, input, affine);
    return this;
  } else {
    return transform(DistortSupport.transformScale(output, input, null));
  }
}
origin: org.boofcv/boofcv-geo

/**
 * Constructor which specifies the characteristics of the undistorted image
 *
 * @param width Width of undistorted image
 * @param height Height of undistorted image
 * @param imageType Type of undistorted image
 */
public RemovePerspectiveDistortion( int width , int height , ImageType<T> imageType ) {
  this(width,height);
  output = imageType.createImage(width,height);
  distort = new FDistort(imageType);
  distort.output(output);
  distort.interp(InterpolationType.BILINEAR).transform(transform);
}
origin: org.boofcv/geo

/**
 * Constructor which specifies the characteristics of the undistorted image
 *
 * @param width Width of undistorted image
 * @param height Height of undistorted image
 * @param imageType Type of undistorted image
 */
public RemovePerspectiveDistortion( int width , int height , ImageType<T> imageType ) {
  output = imageType.createImage(width,height);
  distort = new FDistort(imageType);
  distort.output(output);
  distort.interp(InterpolationType.BILINEAR).transform(homography);
  for (int i = 0; i < 4; i++) {
    associatedPairs.add( new AssociatedPair());
  }
  associatedPairs.get(0).p1.set(0,0);
  associatedPairs.get(1).p1.set(output.width-1,0);
  associatedPairs.get(2).p1.set(output.width-1,output.height-1);
  associatedPairs.get(3).p1.set(0,output.height-1);
}
origin: org.boofcv/boofcv-ip

/**
 * Affine transform from input to output
 */
public FDistort affine(double a11, double a12, double a21, double a22,
            double dx, double dy) {
  PixelTransformAffine_F32 transform;
  if( outputToInput != null && outputToInput instanceof PixelTransformAffine_F32 ) {
    transform = (PixelTransformAffine_F32)outputToInput;
  } else {
    transform = new PixelTransformAffine_F32();
  }
  Affine2D_F32 m = new Affine2D_F32();
  m.a11 = (float)a11;
  m.a12 = (float)a12;
  m.a21 = (float)a21;
  m.a22 = (float)a22;
  m.tx = (float)dx;
  m.ty = (float)dy;
  m.invert(transform.getModel());
  return transform(transform);
}
boofcv.abst.distortFDistorttransform

Javadoc

Used to manually specify a transform. From output to input

Popular methods of FDistort

  • <init>
    Constructor
  • apply
    Applies the distortion.
  • interp
    Specifies the interpolation used by type.
  • scaleExt
    Scales the image and sets the border to BorderType#EXTENDED. This is normally what you want to do wh
  • interpNN
    Sets interpolation to use nearest-neighbor
  • affine
  • border
    Sets how the interpolation handles borders.
  • input
    Changes the input image. The previous distortion is thrown away only if the input image has a differ
  • output
    Changes the output image. The previous distortion is thrown away only if the output image has a diff
  • scale
    Applies a distortion which will rescale the input image into the output image. You might want to con
  • borderExt
    Sets the border to EXTEND.
  • init
    Specifies the input and output image and sets interpolation to BILINEAR, black image border, cache i
  • borderExt,
  • init,
  • rotate

Popular in Java

  • Reactive rest calls using spring rest template
  • setScale (BigDecimal)
  • findViewById (Activity)
  • compareTo (BigDecimal)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • JTable (javax.swing)
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now