Comments (4)
Hey @jackylu0124, maybe you could see what kind of device and format you get on V2 and compare that to the ones you get on V3 (just by logging them). The format filter you use on V3 only maximises the resolution of the photo and video (preview). That is not the best format necessarily, it depends on your use case.
Futhermore, I think enabling HDR and setting qualityPrioritization for taking photos to quality could also help boost the results you see.
from react-native-vision-camera.
Hi @Dingenis, thank you for your reply and insight! Would you mind sharing how I can log/print out the device format when I am using preset="photo"
? I have tried logging out the various props of the ref
object that's passed into <Camera>
, but I could not find the ones that are currently being used for the preset="photo"
setting. Thanks for your help in advance!
from react-native-vision-camera.
Hi @jackylu0124, good point, it's hard to log that way. It seems that preset
only does something on iOS and is determined by Apple, so it's a bit hard to see what it actually does. What you could try is to alter the source code to log the format that is being used.
After this line, you could add something like this:
guard let f = device.activeFormat else { return }
let formatDict = f.toDictionary()
do {
let jsonData = try JSONSerialization.data(withJSONObject: formatDict, options: .prettyPrinted)
let jsonText = String(data: jsonData, encoding: .ascii)
ReactLogger.log(level: .info, message: "Format: \(jsonText)")
} catch {
ReactLogger.log(level: .error, message: "Error occured while serializing format to JSON")
}
I didn't test this code so there could be error in it, but I think it points you to the right direction. You could just add something like this in your node_modules/react-native-vision-camera/ios/CameraView+AVCaptureSession.swift
from react-native-vision-camera.
Hey - you could try to use useCameraFormat(device, Templates.Photo)
for example. But by default, photo is already high quality.
from react-native-vision-camera.
Related Issues (20)
- π iOS pause audio/video output incorrect HOT 2
- π Apple Privacy Info HOT 23
- β¨ Greyscale, B&W and more filters HOT 2
- π `java.util.concurrent.TimeoutException`: Android release APK black screen on camera launch HOT 2
- π how can I setState from onRecordingFinished? HOT 1
- π Any Frame differences for Android from v2 to v4 HOT 6
- Incorrect Photo Orientation Value After Upgrading to Version 4.0.0 π HOT 1
- π 4! FFPS!???, Frame Processor, Synchronous HOT 5
- This API is provided only for React Native frameworks and not intended for general users. This API can change between minor versions in alignment with React Native frameworks and won't be considered a breaking changeπ§ HOT 1
- π Always show toast with empty string
- Does ShadowLens app already uses v4?π HOT 1
- [V4][Android] - Camera freeze after a few .takePhoto() calls π
- [V4][Android] Orientation prop landscape-left and landscape-right seems to produce inverted images π HOT 1
- [V4][Android] - The returned captured image dimensions is different from the output of `Image.getSize` π HOT 3
- π `EUNSPECIFIED - quality` from `takeSnapshot()` on Pixel 3a (Android 12) HOT 1
- π error installing v4 HOT 2
- [v3.9.2][Android] Race condition if takeFocus is called too frequently π HOT 5
- π Android device reports back camera has one physical device when three present HOT 12
- π Use Vision Camera as Light Meter HOT 4
- π How to create boilerplate for frame processors? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-vision-camera.