2022-04-11 15:55:03 +02:00
< a href = "https://margelo.io" >
2023-09-01 16:45:17 +02:00
< 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 >
2022-04-11 15:55:03 +02:00
< / a >
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-01 17:31:10 +02:00
VisionCamera is a powerful and fast Camera component for React Native. It features:
2023-08-21 12:50:14 +02:00
* Photo and Video capture
2023-09-01 17:31:10 +02:00
* Customizable devices and multi-cameras ("fish-eye" zoom)
* Customizable resolutions and aspect-ratios (4k/8k images)
* Customizable FPS (30..240 FPS)
2023-03-06 11:03:40 +01:00
* [Frame Processors ](https://react-native-vision-camera.com/docs/guides/frame-processors ) (JS worklets to run QR-Code scanning, facial recognition, AI object detection, realtime video chats, ...)
2021-03-23 17:08:06 +01:00
* Smooth zooming (Reanimated)
* Fast pause and resume
2021-02-20 16:48:32 +01:00
* HDR & Night modes
2023-09-01 17:31:10 +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
2021-02-20 16:45:10 +01:00
### Example
```tsx
function App() {
2021-02-22 09:43:47 +01:00
const devices = useCameraDevices('wide-angle-camera')
const device = devices.back
2021-02-20 16:45:10 +01:00
2021-03-01 12:41:59 +01:00
if (device == null) return < LoadingView / >
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
* 💖 [**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