Skip to content

Commit 50b69a7

Browse files
docs: installation
1 parent 6745e7a commit 50b69a7

File tree

5 files changed

+134
-1
lines changed

5 files changed

+134
-1
lines changed

docs/pages/_meta.json

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"installation": "Installation",
44
"usage": "Usage",
55
"apidetails": "API",
6+
"availablefunctions": "Available functions",
67
"---": {
78
"type": "separator"
89
},

docs/pages/installation.md

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Installation
2+
3+
To install the library, use npm/yarn/pnpm:
4+
5+
```
6+
yarn add react-native-fast-opencv
7+
```
8+
9+
And then:
10+
11+
```
12+
cd ios && pod install
13+
```
14+
15+
#### Integrations
16+
17+
The library can be easily integrated with:
18+
- 📸 [VisionCamera](https://github.com/mrousavy/react-native-vision-camera) – The library allows frames from frame processors to be easily converted into OpenCV objects. To add a library check [here](./installation/visioncamera.md).
19+
- 🧵 [WorkletsCore](https://github.com/margelo/react-native-worklets-core) – Operations on images can be time-consuming, and the library works with synchronous functions, hence it is a good idea to move the execution of the operation to another thread, so as not to block the JavaScript thread. Integration with this library allows tasks to be delegated to another thread. To add a library check [here](./installation/worklets.md).
20+
+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Vision Camera Integration
2+
3+
The library allows frames from frame processors to be easily converted into OpenCV objects. To install the library and its dependencies, follow these steps.
4+
5+
6+
1. Add libraries:
7+
8+
```
9+
yarn add react-native-vision-camera react-native-worklets-core
10+
```
11+
12+
And then:
13+
14+
```
15+
cd ios && pod install
16+
```
17+
18+
2. Update `Info.plist` and add the following lines inside <dict> tag:
19+
20+
```
21+
<key>NSCameraUsageDescription</key>
22+
<string>$(PRODUCT_NAME) needs access to your Camera.</string>
23+
```
24+
25+
3. Update `AndroidManifest.xml` and add the following line inside the <manifest> tag:
26+
27+
```
28+
<uses-permission android:name="android.permission.CAMERA" />
29+
```
30+
31+
4. Add the babel plugin to your `babel.config.js`:
32+
33+
```
34+
module.exports = {
35+
plugins: [
36+
["react-native-worklets-core/plugin"],
37+
// ...
38+
],
39+
// ...
40+
};
41+
```
42+
43+
5. Restart Metro with clean cache:
44+
45+
```
46+
yarn start --reset-cache
47+
```
48+
49+
You can find a detailed description of the installation process [here](https://react-native-vision-camera.com/docs/guides).
50+
51+
52+
### Usage
53+
54+
The methods of use are [here](../usage.md).

docs/pages/installation/worklets.md

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Worklets Integration
2+
3+
Operations on images can be time-consuming, and the library works with synchronous functions, hence it is a good idea to move the execution of the operation to another thread, so as not to block the JavaScript thread. Integration with this library allows tasks to be delegated to another thread.
4+
5+
6+
1. Add library:
7+
8+
```
9+
yarn add react-native-worklets-core
10+
```
11+
12+
And then:
13+
14+
```
15+
cd ios && pod install
16+
```
17+
18+
2. Add the babel plugin to your `babel.config.js`:
19+
20+
```
21+
module.exports = {
22+
plugins: [
23+
["react-native-worklets-core/plugin"],
24+
// ...
25+
],
26+
// ...
27+
};
28+
```
29+
30+
3. Restart Metro with clean cache:
31+
32+
```
33+
yarn start --reset-cache
34+
```
35+
36+
You can find a detailed description of the installation process [here](https://github.com/margelo/react-native-worklets-core).
37+
38+
39+
### Usage
40+
41+
The methods of use are [here](../usage.md).

docs/pages/usage.md

+18-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,18 @@
1-
cleaning of buffers
1+
# Usage
2+
3+
cleaning of buffers
4+
5+
Objects
6+
7+
create object
8+
9+
10+
toJSValue
11+
12+
copy object from vector
13+
14+
15+
Functions
16+
17+
invocation
18+

0 commit comments

Comments
 (0)