public class

FritzVisionImage

extends Object
java.lang.Object
   ↳ ai.fritz.vision.inputs.FritzVisionImage

Class Overview

FritzVisionImage is a standard input class for FritzVisionPredictors.

Summary

Public Methods
void drawOnCanvas(Canvas canvas)
Draw the image onto a canvas.
static FritzVisionImage fromBitmap(Bitmap bitmap)
Convert a bitmap to a FritzVisionImage.
static FritzVisionImage fromBitmap(Bitmap bitmap, int rotation)
static FritzVisionImage fromMediaImage(Image image, int rotation)
Convert from a media image to a bitmap.
Bitmap getBitmap()
Get bitmap
int getHeight()
int getWidth()
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public void drawOnCanvas (Canvas canvas)

Draw the image onto a canvas.

public static FritzVisionImage fromBitmap (Bitmap bitmap)

Convert a bitmap to a FritzVisionImage.

Parameters
bitmap the bitmap to convert.
Returns
  • a FritzVisionImage object.

public static FritzVisionImage fromBitmap (Bitmap bitmap, int rotation)

public static FritzVisionImage fromMediaImage (Image image, int rotation)

Convert from a media image to a bitmap.

TODO: Need to test this out with other formats other than YUV_420. https://developer.android.com/reference/android/media/Image

Parameters
rotation - rotation depending on the camera and the device rotation. See getImageRotationFromCamera(Activity, String)
Returns
  • FritzVisionImage

public Bitmap getBitmap ()

Get bitmap

Returns
  • the bitmap

public int getHeight ()

public int getWidth ()