What’s New

CameraX 1.4.0-alpha05

1.4.0-alpha05

Version 1.4.0-alpha05

Converted ProcessCameraProvider into Kotlin implementation. Added ImageCapture.takePicture suspend functions to allow it to be called in a Kotlin-idiomatic way. Add output format APIs to ImageCapture, and add getSupportedOutputFormats method to ImageCaptureCapabilities for querying device capability. The default output format value is OUTPUT_FORMAT_JPEG, which captures SDR images in JPEG format. When the device supports Ultra HDR and the output format is set to OUTPUT_FORMAT_JPEG_ULTRA_HDR, CameraX will capture Ultra HDR compressed images using the JPEG/R image format. The format is backwards compatible with SDR JPEG format and supports HDR rendering of content. This means that on older apps or devices, images appear seamlessly as regular JPEG; on apps and devices that have been updated to fully support the format, images appear as HDR. Add PhysicalCameraInfo in CameraInfo to query physical camera information and add physical camera id setter/getter in CameraSelector Replace CameraController#COORDINATE_SYSTEM_VIEW_REFERENCED with ImageAnalysis#COORDINATE_SYSTEM_VIEW_REFERENCED. The value of the constant remains the same. This is for consolidating all the constants into one place. New RetryPolicy API empowers developers to customize retry behavior for CameraX initialization. Enable creation of ImageCaptureLatencyEstimate object to assist with testability Add a ImageAnalysis#COORDINATE_SYSTEM_SENSOR. When this is used, the MlKitAnalyzer returns coordinates in the camera sensor coordinate system. Exposed extensions metadata API. New CameraExtensionsInfo and CameraExtensionsControl interfaces allow applications to monitor and adjust extension strength settings. Applications can obtain the CameraExtensionsInfo or CameraExtensionsControl instance via the newly added ExtensionsManager#getCameraExtensionsInfo() or ExtensionsManager#getCameraExtensionsControl() methods. Added ProcessCameraProvider.awaitInstance which is a suspending version of ProcessCameraProvider.getInstance Add a PreviewView#getSensorToViewTransform() API. The Matrix represents the transformation from camera sensor coordinates to the PreviewView's coordinates. This can be used to transform coordinates from one UseCase to another. For example, transforming the coordinates of detected objects in ImageAnalysis to PreviewView overlay. Make camera-viewfinder-core API more generic so it can be used by camera-viewfinder and camera-viewfinder-compose. Add getSurface function to ViewfinderSurfaceRequest. Use camera-viewfinder-core in camera-viewfinder and deprecate ViewfinderSurfaceRequest and CameraViewfinder. Added ZoomGestureDetector that interprets scaling gestures specifically configured for pinch-to-zoom activity. Fixed ImageAnalysis' resolution selection issue related to the analyzer default target resolution setting: target resolution was incorrectly kept as 640x480 even if applications has set a different analyzer default resolution setting. If applications encounter this issue (1.3.0 ~ 1.3.2) and can't upgrade to use the newer version releases which contain the solution, directly setting a ResolutionSelector with the preferred resolution and a matching AspectRatioStrategy to the ImageAnalysis UseCase can workaround this issue. Fixed an issue that queued takePicture request might fail to run if the current request is failed. Make the invalid JPEG data check applied to Vivo X60 and X60 Pro devices. This can fix abnormally large image issue on these devices. Fixed the incorrect JPEG image metadata issue on Samsung A24 devices. With the fix, CameraX can successfully save the JPEG image, or correct Bitmap objects can be returned when calling the ImageProxy.toBitmap() function on Samsung A24 devices. Make the invalid JPEG data check applied to all Samsung devices if the captured image is larger than 10 MB. This can fix abnormally large iamge issue on Samsung devices. Removed ImageAnalysis support on CameraX Extensions as many OEMs' Extensions implementations don't work w

View original

Discussion