2023-09-01 21:42:11 +02:00
< a href = "https://margelo.io" >
< picture >
< source media = "(prefers-color-scheme: dark)" srcset = "./docs/static/img/banner-dark.png" / >
< source media = "(prefers-color-scheme: light)" srcset = "./docs/static/img/banner-light.png" / >
< img alt = "VisionCamera" src = "./docs/static/img/banner-light.png" / >
< / picture >
< / a >
2022-04-11 15:55:03 +02:00
2023-09-01 17:31:10 +02:00
< br / >
2021-02-19 16:08:26 +01:00
2021-02-20 16:45:10 +01:00
< div >
2021-03-03 12:37:43 +01:00
< img align = "right" width = "35%" src = "docs/static/img/example.png" >
2021-02-20 16:45:10 +01:00
< / div >
2021-02-19 16:08:26 +01:00
2021-02-20 16:48:32 +01:00
### Features
2023-09-29 16:15:02 +02:00
VisionCamera is a powerful, high-performance Camera library for React Native. It features:
2023-09-01 17:31:10 +02:00
2023-09-07 11:54:45 +02:00
* 📸 Photo and Video capture
2023-10-04 12:53:52 +02:00
* 👁️ QR/Barcode scanner
2023-09-07 11:54:45 +02:00
* 📱 Customizable devices and multi-cameras ("fish-eye" zoom)
* 🎞️ Customizable resolutions and aspect-ratios (4k/8k images)
* ⏱️ Customizable FPS (30..240 FPS)
2023-10-04 12:56:47 +02:00
* 🧩 [Frame Processors ](https://react-native-vision-camera.com/docs/guides/frame-processors ) (JS worklets to run facial recognition, AI object detection, realtime video chats, ...)
2023-09-07 11:54:45 +02:00
* 🔍 Smooth zooming (Reanimated)
* ⏯️ Fast pause and resume
* 🌓 HDR & Night modes
2023-09-22 17:22:31 +02:00
* ⚡ Custom C++/GPU accelerated video pipeline (OpenGL)
2021-02-20 16:48:32 +01:00
2023-09-01 17:31:10 +02:00
Install VisionCamera from npm:
```sh
yarn add react-native-vision-camera
cd ios & & pod install
```
..and get started by [setting up permissions ](https://react-native-vision-camera.com/docs/guides )!
### Documentation
* [Guides ](https://react-native-vision-camera.com/docs/guides )
* [API ](https://react-native-vision-camera.com/docs/api )
2023-09-01 18:15:28 +02:00
* [Example ](./package/example/ )
2023-09-01 17:31:10 +02:00
* [Frame Processor Plugins ](https://react-native-vision-camera.com/docs/guides/frame-processor-plugin-list )
2021-02-20 16:49:13 +01:00
2023-09-01 20:32:04 +02:00
### V3
You're looking at the V3 version of VisionCamera, which features a full rewrite on the Android codebase and a huge refactor on the iOS codebase. If you encounter issues on V3, you can also [downgrade to V2 ](https://github.com/mrousavy/react-native-vision-camera/tree/v2 ), which is still partially supported.
2021-02-20 16:45:10 +01:00
### Example
```tsx
function App() {
2023-09-25 12:57:03 +02:00
const device = useCameraDevice('back')
2021-02-20 16:45:10 +01:00
2023-09-25 12:57:03 +02:00
if (device == null) return < NoCameraErrorView / >
2021-02-20 16:45:10 +01:00
return (
< Camera
style={StyleSheet.absoluteFill}
device={device}
2021-02-23 10:56:05 +01:00
isActive={true}
2021-02-20 16:45:10 +01:00
/>
)
}
```
2021-02-24 21:56:50 +01:00
2023-09-01 18:15:28 +02:00
> See the [example](./package/example/) app
2023-09-01 17:31:10 +02:00
2021-09-08 16:02:42 +02:00
### Adopting at scale
2021-09-15 13:28:20 +02:00
< a href = "https://github.com/sponsors/mrousavy" >
2021-09-15 13:28:54 +02:00
< img align = "right" width = "160" alt = "This library helped you? Consider sponsoring!" src = ".github/funding-octocat.svg" >
2021-09-15 13:28:20 +02:00
< / a >
2021-09-08 16:02:42 +02:00
VisionCamera is provided _as is_ , I work on it in my free time.
2021-09-08 16:37:20 +02:00
If you're integrating VisionCamera in a production app, consider [funding this project ](https://github.com/sponsors/mrousavy ) and < a href = "mailto:me @mrousavy .com?subject=Adopting VisionCamera at scale" > contact me</ a > to receive premium enterprise support, help with issues, prioritize bugfixes, request features, help at integrating VisionCamera and/or Frame Processors, and more.
2021-09-08 16:02:42 +02:00
2023-09-01 17:31:10 +02:00
### Socials
2021-02-24 21:56:50 +01:00
2023-09-01 17:31:10 +02:00
* 🐦 [**Follow me on Twitter** ](https://twitter.com/mrousavy ) for updates
* 📝 [**Check out my blog** ](https://mrousavy.com/blog ) for examples and experiments
2023-09-02 00:54:09 +02:00
* 💬 [**Join the Margelo Community Discord** ](https://discord.gg/6CSHz2qAvA ) for chatting about VisionCamera
2023-09-01 17:31:10 +02:00
* 💖 [**Sponsor me on GitHub** ](https://github.com/sponsors/mrousavy ) to support my work
* 🍪 [**Buy me a Ko-Fi** ](https://ko-fi.com/mrousavy ) to support my work