mrousavy / react-native-vision-camera

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

💭 Differences between iPhone native camera and available camera devices #2879

Closed ppanwin10 closed 2 weeks ago

ppanwin10 commented 2 weeks ago

Question

When comparing the iPhone native camera with the device list returned by Camera.getAvailableCameraDevices(), I noticed that the list doesn't include a front device that supports auto-focus, and none of the front or back devices support HDR, although these features are supported in the native camera. Is this a expected behavior?

iPhone 11 IOS 17.4.1

What I tried

const des = Camera.getAvailableCameraDevices();
for (const d of des) {
      console.log(d.name);
      console.log('supportFocus', d.supportsFocus);

      // find if there is any formats has hdr supported
      const hasHDRFormat = d.formats.some(f => {
        return f.supportsPhotoHdr || f.supportsVideoHdr;
      });
      console.log('hasHDR', hasHDRFormat);
}

// result
 LOG  Front Camera
 LOG  supportFocus false
 LOG  hasHDR false

 LOG  Front TrueDepth Camera
 LOG  supportFocus false
 LOG  hasHDR false

 LOG  Back Camera
 LOG  supportFocus true
 LOG  hasHDR false

 LOG  Back Dual Wide Camera
 LOG  supportFocus true
 LOG  hasHDR false

 LOG  Back Ultra Wide Camera
 LOG  supportFocus false
 LOG  hasHDR false

VisionCamera Version

4.0.3

Additional information

ppanwin10 commented 2 weeks ago

ah, just saw this issue someone already raised, it makes sense for focusing then. https://github.com/mrousavy/react-native-vision-camera/issues/2622

mrousavy commented 2 weeks ago
mrousavy commented 2 weeks ago

You can check this out in ShadowLens - I record 10-bit video HDR if possible.