Agora Java API Reference for Android
Static Public Member Functions | List of all members
io.agora.rtc.video.CoordinatesTransform Class Reference

Static Public Member Functions

static RectF normalizedFaceRect (Rect rect, int displayOrientation, boolean isMirror)
 
static Rect sensorToNormalizedPreview (Rect transformRect, int previewWidth, int previewHeight, Rect cropRegion)
 

Detailed Description

Created by chenfeifei on 2017/12/12.

Member Function Documentation

◆ sensorToNormalizedPreview()

static Rect io.agora.rtc.video.CoordinatesTransform.sensorToNormalizedPreview ( Rect  transformRect,
int  previewWidth,
int  previewHeight,
Rect  cropRegion 
)
static

Transform the sensor coordinate from device to NormalizedPreview(-1000, 1000). Center point is (0, 0).

Parameters
transformRectthe sensor rect.
previewWidththe camera device preview width.
previewHeightthe camera device preview height.
cropRegionthe sensor crop region.
Returns
the rect mapping to (-1000, 1000).