2021-03-03 04:37:43 -07:00
|
|
|
<h1 align="center">Vision Camera</h1>
|
2021-02-19 08:08:26 -07:00
|
|
|
|
|
|
|
<div align="center">
|
2021-03-03 04:37:43 -07:00
|
|
|
<img src="docs/static/img/11.png" width="50%">
|
2021-02-19 08:08:26 -07:00
|
|
|
<br />
|
|
|
|
<br />
|
2021-02-20 08:45:10 -07:00
|
|
|
<blockquote><h4>📸 The Camera library that sees the vision.</h4></blockquote>
|
2021-02-19 08:08:26 -07:00
|
|
|
<br />
|
2021-02-25 05:02:10 -07:00
|
|
|
|
2021-03-23 08:25:27 -06:00
|
|
|
<a href="https://cuvent.com">
|
|
|
|
<img height="40" src="docs/static/img/cuvent-logo-text.svg" />
|
|
|
|
</a>
|
2021-02-25 05:02:10 -07:00
|
|
|
<br/>
|
2021-02-25 05:41:07 -07:00
|
|
|
<span>
|
|
|
|
<a align="center" href="https://github.com/mrousavy?tab=followers">
|
2021-02-25 05:45:45 -07:00
|
|
|
<img src="https://img.shields.io/github/followers/mrousavy?label=Follow%20%40mrousavy&style=social" />
|
2021-02-25 05:41:07 -07:00
|
|
|
</a>
|
|
|
|
</span>
|
|
|
|
<br />
|
|
|
|
<span>
|
|
|
|
<a align="center" href="https://twitter.com/mrousavy">
|
|
|
|
<img src="https://img.shields.io/twitter/follow/mrousavy?label=Follow%20%40mrousavy&style=social" />
|
|
|
|
</a>
|
|
|
|
<a align="center" href="https://twitter.com/cuventtech">
|
|
|
|
<img src="https://img.shields.io/twitter/follow/cuventtech?label=Follow%20%40cuventtech&style=social" />
|
|
|
|
</a>
|
|
|
|
</span>
|
2021-02-19 08:08:26 -07:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<br/>
|
|
|
|
<br/>
|
|
|
|
|
2021-02-20 08:45:10 -07:00
|
|
|
<div>
|
2021-03-03 04:37:43 -07:00
|
|
|
<img align="right" width="35%" src="docs/static/img/example.png">
|
2021-02-20 08:45:10 -07:00
|
|
|
</div>
|
2021-02-19 08:08:26 -07:00
|
|
|
|
2021-03-03 04:37:43 -07:00
|
|
|
### Documentation
|
|
|
|
|
2021-03-23 08:25:27 -06:00
|
|
|
* [Guides](https://cuvent.github.io/react-native-vision-camera/docs/guides)
|
2021-03-03 12:48:57 -07:00
|
|
|
* [API](https://cuvent.github.io/react-native-vision-camera/docs/api)
|
|
|
|
* [Example](./example/)
|
2021-03-03 04:37:43 -07:00
|
|
|
|
2021-02-19 08:08:26 -07:00
|
|
|
### Install
|
2021-02-19 08:07:53 -07:00
|
|
|
|
|
|
|
```sh
|
2021-03-01 01:34:34 -07:00
|
|
|
npm i react-native-vision-camera
|
2021-02-19 08:08:26 -07:00
|
|
|
npx pod-install
|
2021-02-19 08:07:53 -07:00
|
|
|
```
|
2021-02-20 08:45:10 -07:00
|
|
|
|
2021-02-20 08:48:32 -07:00
|
|
|
### Features
|
|
|
|
|
|
|
|
* Photo and Video capture
|
|
|
|
* Customizable device (`ultra-wide-angle`, `wide-angle`, `telephoto` and virtual multi-cameras)
|
2021-02-20 08:51:13 -07:00
|
|
|
* Customizable FPS
|
2021-03-04 03:23:24 -07:00
|
|
|
* JS worklet frame processors powered by JSI and Reanimated (**Work in progress: [#2](https://github.com/cuvent/react-native-vision-camera/pull/2)**)
|
2021-02-20 08:48:32 -07:00
|
|
|
* Reanimated zooming
|
|
|
|
* HDR & Night modes
|
|
|
|
|
2021-02-20 08:49:13 -07:00
|
|
|
> See the [example](./example/) app
|
|
|
|
|
2021-02-20 08:45:10 -07:00
|
|
|
### Example
|
|
|
|
|
|
|
|
|
|
|
|
```tsx
|
|
|
|
function App() {
|
2021-02-22 01:43:47 -07:00
|
|
|
const devices = useCameraDevices('wide-angle-camera')
|
|
|
|
const device = devices.back
|
2021-02-20 08:45:10 -07:00
|
|
|
|
2021-03-01 04:41:59 -07:00
|
|
|
if (device == null) return <LoadingView />
|
2021-02-20 08:45:10 -07:00
|
|
|
return (
|
|
|
|
<Camera
|
|
|
|
style={StyleSheet.absoluteFill}
|
|
|
|
device={device}
|
2021-02-23 02:56:05 -07:00
|
|
|
isActive={true}
|
2021-02-20 08:45:10 -07:00
|
|
|
/>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
```
|
2021-02-24 13:56:50 -07:00
|
|
|
|
|
|
|
<br />
|
|
|
|
|
2021-03-23 08:29:24 -06:00
|
|
|
#### 🚀 Get started by [setting up permissions](https://cuvent.github.io/react-native-vision-camera/docs/guides/)!
|