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

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

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

origin: org.boofcv/boofcv-ip

/**
 * Scales the image and sets the border to {@link BorderType#EXTENDED}. This is normally what you want
 * to do when scaling an image.  If you don't use an extended border when you hit the right and bottom
 * boundaries it will go outside the image bounds and if a fixed value of 0 is used it will average towards
 * zero.
 */
public FDistort scaleExt() {
  return scale().borderExt();
}
origin: org.boofcv/demonstrations

private void applyScaling() {
  scaledImage.reshape(panel.getWidth(), panel.getHeight());
  if( scaledImage.width <= 0 || scaledImage.height <= 0 ) {
    return;
  }
  if( latestImage.width != 0 && latestImage.height != 0 ) {
    new FDistort(latestImage, scaledImage).interp(interpType).border(BorderType.EXTENDED).scale().apply();
    BufferedImage out = ConvertBufferedImage.convertTo(scaledImage, null, true);
    panel.setImageUI(out);
    panel.repaint();
  }
}
boofcv.abst.distortFDistortscale

Javadoc

Applies a distortion which will rescale the input image into the output image. You might want to consider using #scaleExt() instead since it sets the border behavior to extended, which is probably what you want to do.

NOTE: Checks to see if it can recycle the previous transform and update it with a new affine model to avoid declaring new memory.

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
  • transform
    Used to manually specify a transform. From output to input
  • 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
  • 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

  • Reading from database using SQL prepared statement
  • onCreateOptionsMenu (Activity)
  • getContentResolver (Context)
  • findViewById (Activity)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • Github Copilot alternatives
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