mrousavy / react-native-vision-camera

📸 A powerful, high-performance React Native Camera library.
https://react-native-vision-camera.com
MIT License
6.93k stars 1.02k forks source link

✨ Expose Camera Intrinsic Parameters #3032

Open pvedula7 opened 1 week ago

pvedula7 commented 1 week ago

What feature or enhancement are you suggesting?

Exposing camera intrinsic parameters to JS. This thread: https://github.com/mrousavy/react-native-vision-camera/issues/2998 referenced grabbing calibration where @mrousavy said was lots of lines of code, but exposing only intrinsic should be easier since we do not need the access the calibration data classes.

Android exposes it in CameraCharacteristics.LENS_INTRINSIC_CALIBRATION here IOS has an isCameraIntrinsicMatrixDeliveryEnabled on AVCaptureConnection and available in the CMBuffer cameraIntrinsicMatrix

Why? Intrinsic parameters are necessary for any kind of 2D to 3D CV techniques such as point clouds. The are the most valuable part of calibration data as extrinsic parameters are affected by several other factors.

What Platforms whould this feature/enhancement affect?

iOS, Android

Alternatives/Workarounds

N/A at the moment

Additional information

maintenance-hans[bot] commented 1 week ago

Guten Tag, Hans here.

[!NOTE] New features, bugfixes, updates and other improvements are all handled mostly by @mrousavy in his free time. To support @mrousavy, please consider 💖 sponsoring him on GitHub 💖. Sponsored issues will be prioritized.

mrousavy commented 1 week ago

Hey - good feature request.

As Hans said, I work on this in my free time and at the moment Camera intrinsic data delivery has a very low priority for me.

If you want this prioritized consider contacting me thru my consultancy agency, otherwise this stays open until I decide to tackle it in my free time in a few weeks or months or so.

I had a working prototype where I delivered the matrix thru the CMSampleBuffer, but it was a lot of (Objective-)C code that was required for this. On Android, it's also a bit different as it's not available per Frame, but on the device already and I don't want two different solutions.