public class

YuvCameraConfigurator

extends CameraConfigurator
java.lang.Object
   ↳ com.sap.cloud.mobile.fiori.camera.CameraConfigurator
     ↳ com.sap.cloud.mobile.fiori.ocr.YuvCameraConfigurator

Class Overview

A concrete subtype of CameraConfigurator class. This class configures the FioriCamera to receives frames in YUV_FORMAT and then processes the image to convert the format to RGB, rotate the image and crop the image as per the user defined CameraFrameView.

Summary

Public Constructors
YuvCameraConfigurator(Context context, ImageReadyForDetectionListener<Bitmap> imageReadyForDetectionListener)
Public Methods
void cropImageUsing(Rect cropped, Rect original)
Set the rect to be cropped.
void destroy()
Destroys this object and release any references that might cause leak
List<Surface> getTargetSurfaces()
Return the list of Surface to be used to receive the frames from Camera.
boolean shouldOpenCamera(CameraCharacteristics characteristics)
Select which camera should FioriCamera class use to present the preview.
[Expand]
Inherited Methods
From class com.sap.cloud.mobile.fiori.camera.CameraConfigurator
From class java.lang.Object

Public Constructors

public YuvCameraConfigurator (Context context, ImageReadyForDetectionListener<Bitmap> imageReadyForDetectionListener)

Public Methods

public void cropImageUsing (Rect cropped, Rect original)

Set the rect to be cropped.

Parameters
cropped rect of the bounded box from CameraFrameView
original size of the complete CameraFrameView

public void destroy ()

Destroys this object and release any references that might cause leak

public List<Surface> getTargetSurfaces ()

Return the list of Surface to be used to receive the frames from Camera. For example if you wish to run an optical character recognition you could provide ImageReader as surface and FioriCamera will configure the CameraCaptureSession to send the frames to all surfaces along with preview.

public boolean shouldOpenCamera (CameraCharacteristics characteristics)

Select which camera should FioriCamera class use to present the preview. FioriCamera class will call this callback with CameraCharacteristics of the available cameras, in the order received from CameraManager. Once the callback selects a Camera by returning true,FioriCamera will try tto open the selected Camera.