Tabnine Logo
Frame$Builder.setRotation
Code IndexAdd Tabnine to your IDE (free)

How to use
setRotation
method
in
com.google.android.gms.vision.Frame$Builder

Best Java code snippets using com.google.android.gms.vision.Frame$Builder.setRotation (Showing top 12 results out of 315)

origin: googlesamples/android-vision

/**
 * Creates a new frame based on the original frame, with additional width on the right to
 * increase the size to avoid the bug in the underlying face detector.
 */
private Frame padFrameRight(Frame originalFrame, int newWidth) {
  Frame.Metadata metadata = originalFrame.getMetadata();
  int width = metadata.getWidth();
  int height = metadata.getHeight();
  Log.i(TAG, "Padded image from: " + width + "x" + height + " to " + newWidth + "x" + height);
  ByteBuffer origBuffer = originalFrame.getGrayscaleImageData();
  int origOffset = origBuffer.arrayOffset();
  byte[] origBytes = origBuffer.array();
  // This can be changed to just .allocate in the future, when Frame supports non-direct
  // byte buffers.
  ByteBuffer paddedBuffer = ByteBuffer.allocateDirect(newWidth * height);
  int paddedOffset = paddedBuffer.arrayOffset();
  byte[] paddedBytes = paddedBuffer.array();
  Arrays.fill(paddedBytes, (byte) 0);
  for (int y = 0; y < height; ++y) {
    int origStride = origOffset + y * width;
    int paddedStride = paddedOffset + y * newWidth;
    System.arraycopy(origBytes, origStride, paddedBytes, paddedStride, width);
  }
  return new Frame.Builder()
      .setImageData(paddedBuffer, newWidth, height, ImageFormat.NV21)
      .setId(metadata.getId())
      .setRotation(metadata.getRotation())
      .setTimestampMillis(metadata.getTimestampMillis())
      .build();
}
origin: googlesamples/android-vision

.setImageData(paddedBuffer, width, newHeight, ImageFormat.NV21)
.setId(metadata.getId())
.setRotation(metadata.getRotation())
.setTimestampMillis(metadata.getTimestampMillis())
.build();
origin: googlesamples/android-vision

.setId(mPendingFrameId)
.setTimestampMillis(mPendingTimeMillis)
.setRotation(mRotation)
.build();
origin: thegenuinegourav/Questor

.setId(mPendingFrameId)
.setTimestampMillis(mPendingTimeMillis)
.setRotation(mRotation)
.build();
origin: peekler/GDG

.setId(mPendingFrameId)
.setTimestampMillis(mPendingTimeMillis)
.setRotation(mRotation)
.build();
origin: adafruit/Bluefruit_LE_Connect_Android

.setId(mPendingFrameId)
.setTimestampMillis(mPendingTimeMillis)
.setRotation(mRotation)
.build();
origin: TrustWallet/trust-wallet-android-source

.setId(mPendingFrameId)
.setTimestampMillis(mPendingTimeMillis)
.setRotation(mRotation)
.build();
origin: EzequielAdrianM/Camera2Vision

.setId(mPendingFrameId)
.setTimestampMillis(mPendingTimeMillis)
.setRotation(getDetectorOrientation(mSensorOrientation))
.build();
origin: EzequielAdrianM/Camera2Vision

.setId(mPendingFrameId)
.setTimestampMillis(mPendingTimeMillis)
.setRotation(mRotation)
.build();
origin: EdwardvanRaak/MaterialBarcodeScanner

.setId(mPendingFrameId)
.setTimestampMillis(mPendingTimeMillis)
.setRotation(mRotation)
.build();
origin: googlesamples/android-vision

.setId(mPendingFrameId)
.setTimestampMillis(mPendingTimeMillis)
.setRotation(rotation)
.build();
origin: googlesamples/android-vision

.setId(mPendingFrameId)
.setTimestampMillis(mPendingTimeMillis)
.setRotation(mRotation)
.build();
com.google.android.gms.visionFrame$BuildersetRotation

Popular methods of Frame$Builder

  • <init>
  • build
  • setId
  • setImageData
  • setTimestampMillis
  • setBitmap

Popular in Java

  • Finding current android device location
  • setScale (BigDecimal)
  • findViewById (Activity)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • From CI to AI: The AI layer in your organization
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