Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Upgrade CameraX to 1.4.0-beta02 #2986

Merged
merged 10 commits into from
Jun 13, 2024
Merged

feat: Upgrade CameraX to 1.4.0-beta02 #2986

merged 10 commits into from
Jun 13, 2024

Conversation

mrousavy
Copy link
Owner

What

Upgrades CameraX on Android to beta02. Changes:

Version 1.4.0-beta02

June 12, 2024

androidx.camera:camera-*:1.4.0-beta02 is released. Version 1.4.0-beta02 contains these commits.

API Changes

Similar to VideoCapture, add setMirrorMode for Preview use case. It will support mirror mode ON and OFF for Preview stream via OutputConfiguration.setMirrorMode from API 33 and above, for older APIs, it will be no-op. (I821f4)
Bug Fixes

Fixed the issue that apps can't take pictures successfully on Samsung Tab A8 when ImageCapture selects 1920x1080 under Preview + VideoCapture + ImageCapture UseCase combination. (I5a463, b/336925549)
Fixed persistent recording may fail to continue recording after switching camera. (Icb0a1)
Version 1.4.0-beta01

May 14, 2024

androidx.camera:camera-*:1.4.0-beta01 is released. Version 1.4.0-beta01 contains these commits.

API Changes

Added ZoomGestureDetector.ZoomEvent to encapsulates the states of a zoom gesture. (I84cdf)
Bug Fixes

Fixed a bug that still capture and tap-to-focus do not use the repeating request FPS/stabilization mode values which may recreate capture session and cause latency issues or Preview freeze in some devices. (I7dc0b)
Fixed a bug where High Resolutions can not be selected when CameraEffect is enabled on some devices. (e.g. 4000x3000 on Samsung A32 5G). (Ie3ed3, b/337336152)
Fixed a crash when taking picture with Preview, ImageCapture and VideoCapture(UHD) are bound on Pixel 4XL API29. (I5b288)
Support virtual devices: Context passed into ProcessCameraProvider will preserve the device ID to ensure the functionality in a virtual device environment. (I5ba48)
Version 1.4.0-alpha05

April 17, 2024

androidx.camera:camera-*:1.4.0-alpha05 is released. Version 1.4.0-alpha05 contains these commits.

New Features

Converted ProcessCameraProvider into Kotlin implementation. (I46d4f)
Added ImageCapture.takePicture suspend functions to allow it to be called in a Kotlin-idiomatic way. (I920be)
API Changes

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. (I5de50)
Add PhysicalCameraInfo in CameraInfo to query physical camera information and add physical camera id setter/getter in CameraSelector (Ic5b90)
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. (I890bb)
New RetryPolicy API empowers developers to customize retry behavior for CameraX initialization. (I36dd2)
Enable creation of ImageCaptureLatencyEstimate object to assist with testability (Iaba99)
Add a ImageAnalysis#COORDINATE_SYSTEM_SENSOR. When this is used, the MlKitAnalyzer returns coordinates in the camera sensor coordinate system. (I3ec61)
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. (I28e1a)
Added ProcessCameraProvider.awaitInstance which is a suspending version of ProcessCameraProvider.getInstance (Ib22b9)
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. (I947ab)
Make camera-viewfinder-core API more generic so it can be used by camera-viewfinder and camera-viewfinder-compose. (I1e295)
Add getSurface function to ViewfinderSurfaceRequest. (I781a0)
Use camera-viewfinder-core in camera-viewfinder and deprecate ViewfinderSurfaceRequest and CameraViewfinder. (I6198c)
Added ZoomGestureDetector that interprets scaling gestures specifically configured for pinch-to-zoom activity. (Ifafbf)
Bug Fixes

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. (I81f72, b/330091012)
Fixed an issue that queued takePicture request might fail to run if the current request is failed. (Ie0801)
Make the invalid JPEG data check applied to Vivo X60 and X60 Pro devices. This can fix abnormally large image issue on these devices. (I82247, b/288828159)
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. (I8d6eb, b/309005680)
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. (Ic2a65, b/288828159)
Removed ImageAnalysis support on CameraX Extensions as many OEMs' Extensions implementations don't work with ImageAnalysis well and might cause inconsistent issues. (I2d926)

ful changelog here

Changes

Tested on

Related issues

Copy link

vercel bot commented Jun 13, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-native-vision-camera ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 13, 2024 1:16pm

@mrousavy mrousavy merged commit 036ecc5 into main Jun 13, 2024
5 checks passed
@mrousavy mrousavy deleted the feat/upgrade-camera branch June 13, 2024 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant