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

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

Best Java code snippets using com.google.android.gms.vision.Frame$Builder.setTimestampMillis (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

.setId(metadata.getId())
.setRotation(metadata.getRotation())
.setTimestampMillis(metadata.getTimestampMillis())
.build();
origin: googlesamples/android-vision

    mPreviewSize.getHeight(), ImageFormat.NV21)
.setId(mPendingFrameId)
.setTimestampMillis(mPendingTimeMillis)
.setRotation(mRotation)
.build();
origin: thegenuinegourav/Questor

    mPreviewSize.getHeight(), ImageFormat.NV21)
.setId(mPendingFrameId)
.setTimestampMillis(mPendingTimeMillis)
.setRotation(mRotation)
.build();
origin: peekler/GDG

    mPreviewSize.getHeight(), ImageFormat.NV21)
.setId(mPendingFrameId)
.setTimestampMillis(mPendingTimeMillis)
.setRotation(mRotation)
.build();
origin: adafruit/Bluefruit_LE_Connect_Android

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

    mPreviewSize.getHeight(), ImageFormat.NV21)
.setId(mPendingFrameId)
.setTimestampMillis(mPendingTimeMillis)
.setRotation(mRotation)
.build();
origin: EzequielAdrianM/Camera2Vision

.setImageData(ByteBuffer.wrap(quarterNV21(mPendingFrameData, mPreviewSize.getWidth(), mPreviewSize.getHeight())), mPreviewSize.getWidth()/4, mPreviewSize.getHeight()/4, ImageFormat.NV21)
.setId(mPendingFrameId)
.setTimestampMillis(mPendingTimeMillis)
.setRotation(getDetectorOrientation(mSensorOrientation))
.build();
origin: EzequielAdrianM/Camera2Vision

.setImageData(quarterNV21(mPendingFrameData, previewW, previewH), previewW/4, previewH/4, ImageFormat.NV21)
.setId(mPendingFrameId)
.setTimestampMillis(mPendingTimeMillis)
.setRotation(mRotation)
.build();
origin: EdwardvanRaak/MaterialBarcodeScanner

    mPreviewSize.getHeight(), ImageFormat.NV21)
.setId(mPendingFrameId)
.setTimestampMillis(mPendingTimeMillis)
.setRotation(mRotation)
.build();
origin: googlesamples/android-vision

    previewSize.getHeight(), ImageFormat.NV21)
.setId(mPendingFrameId)
.setTimestampMillis(mPendingTimeMillis)
.setRotation(rotation)
.build();
origin: googlesamples/android-vision

    mPreviewSize.getHeight(), ImageFormat.NV21)
.setId(mPendingFrameId)
.setTimestampMillis(mPendingTimeMillis)
.setRotation(mRotation)
.build();
com.google.android.gms.visionFrame$BuildersetTimestampMillis

Popular methods of Frame$Builder

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

Popular in Java

  • Making http requests using okhttp
  • getResourceAsStream (ClassLoader)
  • runOnUiThread (Activity)
  • addToBackStack (FragmentTransaction)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • JFileChooser (javax.swing)
  • Top Sublime Text 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