Skip to content

Add object to vector #87

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 25, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -80,4 +80,5 @@ lib/
.yarn/cache/*
docs/.yarn
.next
docs/out/*
docs/out/*
.kotlin/
155 changes: 130 additions & 25 deletions cpp/FOCV_Function.cpp
Original file line number Diff line number Diff line change
@@ -93,17 +93,48 @@ jsi::Object FOCV_Function::invoke(jsi::Runtime& runtime, const jsi::Value* argum
cv::batchDistance(*src1, *src2, *dist, dtype, *nidx, normType, K, *mask, update, crosscheck);
} break;
case hashString("bitwise_and", 11): {
auto src1 = args.asMatPtr(1);
auto src2 = args.asMatPtr(2);
auto dst = args.asMatPtr(3);

if (count > 4) {
auto mask = args.asMatPtr(4);
if (args.isMat(1)) {
auto src1 = args.asMatPtr(1);

cv::bitwise_and(*src1, *src2, *dst, *mask);
break;
if(args.isScalar(2)) {
auto src2 = args.asScalarPtr(2);
cv::bitwise_and(*src1, *src2, *dst);

if (count > 4) {
auto mask = args.asMatPtr(4);

cv::bitwise_and(*src1, *src2, *dst, *mask);
break;
}

} else {
auto src2 = args.asMatPtr(2);

if (count > 4) {
auto mask = args.asMatPtr(4);

cv::bitwise_and(*src1, *src2, *dst, *mask);
break;
}

cv::bitwise_and(*src1, *src2, *dst);
}
} else {
auto src1 = args.asScalarPtr(1);
auto src2 = args.asMatPtr(2);


if (count > 4) {
auto mask = args.asMatPtr(4);

cv::bitwise_and(*src1, *src2, *dst, *mask);
break;
}

cv::bitwise_and(*src1, *src2, *dst);
}
cv::bitwise_and(*src1, *src2, *dst);
} break;
case hashString("bitwise_not", 11): {
auto src = args.asMatPtr(1);
@@ -118,30 +149,90 @@ jsi::Object FOCV_Function::invoke(jsi::Runtime& runtime, const jsi::Value* argum
cv::bitwise_not(*src, *dst);
} break;
case hashString("bitwise_or", 10): {
auto src1 = args.asMatPtr(1);
auto src2 = args.asMatPtr(2);
auto dst = args.asMatPtr(3);

if (count > 4) {
auto mask = args.asMatPtr(4);
if (args.isMat(1)) {
auto src1 = args.asMatPtr(1);

cv::bitwise_or(*src1, *src2, *dst, *mask);
break;
if(args.isScalar(2)) {
auto src2 = args.asScalarPtr(2);
cv::bitwise_or(*src1, *src2, *dst);

if (count > 4) {
auto mask = args.asMatPtr(4);

cv::bitwise_or(*src1, *src2, *dst, *mask);
break;
}

} else {
auto src2 = args.asMatPtr(2);

if (count > 4) {
auto mask = args.asMatPtr(4);

cv::bitwise_or(*src1, *src2, *dst, *mask);
break;
}

cv::bitwise_or(*src1, *src2, *dst);
}
} else {
auto src1 = args.asScalarPtr(1);
auto src2 = args.asMatPtr(2);

if (count > 4) {
auto mask = args.asMatPtr(4);

cv::bitwise_or(*src1, *src2, *dst, *mask);
break;
}

cv::bitwise_or(*src1, *src2, *dst);
}
cv::bitwise_or(*src1, *src2, *dst);
} break;
case hashString("bitwise_xor", 11): {
auto src1 = args.asMatPtr(1);
auto src2 = args.asMatPtr(2);
auto dst = args.asMatPtr(3);

if (count > 4) {
auto mask = args.asMatPtr(4);
if (args.isMat(1)) {
auto src1 = args.asMatPtr(1);

cv::bitwise_xor(*src1, *src2, *dst, *mask);
break;
if(args.isScalar(2)) {
auto src2 = args.asScalarPtr(2);
cv::bitwise_xor(*src1, *src2, *dst);

if (count > 4) {
auto mask = args.asMatPtr(4);

cv::bitwise_xor(*src1, *src2, *dst, *mask);
break;
}

} else {
auto src2 = args.asMatPtr(2);

if (count > 4) {
auto mask = args.asMatPtr(4);

cv::bitwise_xor(*src1, *src2, *dst, *mask);
break;
}

cv::bitwise_xor(*src1, *src2, *dst);
}
} else {
auto src1 = args.asScalarPtr(1);
auto src2 = args.asMatPtr(2);

if (count > 4) {
auto mask = args.asMatPtr(4);

cv::bitwise_xor(*src1, *src2, *dst, *mask);
break;
}

cv::bitwise_xor(*src1, *src2, *dst);
}
cv::bitwise_xor(*src1, *src2, *dst);
} break;
case hashString("borderInterpolate", 17): {
auto p = args.asNumber(1);
@@ -203,12 +294,26 @@ jsi::Object FOCV_Function::invoke(jsi::Runtime& runtime, const jsi::Value* argum
} break;

case hashString("compare", 7): {
auto src1 = args.asMatPtr(1);
auto src2 = args.asMatPtr(2);
auto dst = args.asMatPtr(3);
auto cmpop = args.asNumber(4);
auto dst = args.asMatPtr(3);

cv::compare(*src1, *src2, *dst, cmpop);
if (args.isMat(1)) {
auto src1 = args.asMatPtr(1);

if(args.isScalar(2)) {
auto src2 = args.asScalarPtr(2);
cv::compare(*src1, *src2, *dst, cmpop);
} else {
auto src2 = args.asMatPtr(2);
cv::compare(*src1, *src2, *dst, cmpop);
}
} else {
auto src1 = args.asScalarPtr(1);
auto src2 = args.asMatPtr(2);

cv::compare(*src1, *src2, *dst, cmpop);
}

} break;
case hashString("completeSymm", 12): {
auto lowerToUpper = args.asBool(2);
34 changes: 34 additions & 0 deletions cpp/FOCV_Object.cpp
Original file line number Diff line number Diff line change
@@ -366,3 +366,37 @@ jsi::Object FOCV_Object::copyObjectFromVector(jsi::Runtime& runtime, const jsi::

return value;
}

void FOCV_Object::addObjectToVector(jsi::Runtime& runtime, const jsi::Value* arguments, size_t count) {
std::string createdId;

jsi::Object value(runtime);
std::string objectType = FOCV_JsiObject::type_from_wrap(runtime, arguments[0]);
std::string vectorId = FOCV_JsiObject::id_from_wrap(runtime, arguments[0]);
std::string objectId = FOCV_JsiObject::id_from_wrap(runtime, arguments[1]);

switch(hashString(objectType.c_str(), objectType.size())) {
case hashString("mat_vector", 10): {
auto& array = *FOCV_Storage::get<std::vector<cv::Mat>>(vectorId);
auto& object = *FOCV_Storage::get<cv::Mat>(objectId);
array.push_back(std::move(object));

int x = 4;
} break;
case hashString("rect_vector", 11): {
auto& array = *FOCV_Storage::get<std::vector<cv::Rect>>(vectorId);
auto& object = *FOCV_Storage::get<cv::Rect>(objectId);
array.push_back(object);
} break;
case hashString("point_vector", 12): {
auto& array = *FOCV_Storage::get<std::vector<cv::Point>>(vectorId);
auto& object = *FOCV_Storage::get<cv::Point>(objectId);
array.push_back(object);
} break;
case hashString("point_vector_vector", 19): {
auto& array = *FOCV_Storage::get<std::vector<std::vector<cv::Point>>>(vectorId);
auto& object = *FOCV_Storage::get<std::vector<cv::Point>>(objectId);
array.push_back(object);
} break;
}
}
1 change: 1 addition & 0 deletions cpp/FOCV_Object.hpp
Original file line number Diff line number Diff line change
@@ -33,6 +33,7 @@ class FOCV_Object {
static jsi::Object create(jsi::Runtime& runtime, const jsi::Value* arguments, size_t count);
static jsi::Object convertToJSI(jsi::Runtime& runtime, const jsi::Value* arguments, size_t count);
static jsi::Object copyObjectFromVector(jsi::Runtime& runtime, const jsi::Value* arguments, size_t count);
static void addObjectToVector(jsi::Runtime& runtime, const jsi::Value* arguments, size_t count);
};

#endif /* FOCV_Object_hpp */
11 changes: 11 additions & 0 deletions cpp/react-native-fast-opencv.cpp
Original file line number Diff line number Diff line change
@@ -233,6 +233,17 @@ jsi::Value OpenCVPlugin::get(jsi::Runtime& runtime, const jsi::PropNameID& propN
return FOCV_Object::copyObjectFromVector(runtime, arguments, count);
});
}
else if (propName == "addObjectToVector") {
return jsi::Function::createFromHostFunction(
runtime, jsi::PropNameID::forAscii(runtime, "addObjectToVector"), 1,
[=](jsi::Runtime& runtime, const jsi::Value& thisValue, const jsi::Value* arguments,
size_t count) -> jsi::Value {

FOCV_Object::addObjectToVector(runtime, arguments, count);

return jsi::Value(true);
});
}
else if (propName == "invoke") {
return jsi::Function::createFromHostFunction(
runtime, jsi::PropNameID::forAscii(runtime, "invoke"), 1,
13 changes: 13 additions & 0 deletions docs/pages/apidetails.md
Original file line number Diff line number Diff line change
@@ -61,6 +61,19 @@ copyObjectFromVector(vector: RectVector, itemIndex: number): Rect;

---

### Add Object to Vector

Adds an object to a vector.

```js
addObjectToVector(vector: MatVector, object: Mat): void;
addObjectToVector(vector: PointVector, object: Point): void;
addObjectToVector(vector: RectVector, object: Rect): void;
addObjectToVector(vector: PointVectorOfVectors, object: PointVector): void;
```

---

### To JS Value

Converts an object to a JS-readable object.
16 changes: 13 additions & 3 deletions docs/pages/availablefunctions.md
Original file line number Diff line number Diff line change
@@ -88,7 +88,8 @@ computes bitwise conjunction of the two arrays (dst = src1 & src2) Calculates th
- mask optional operation mask, 8-bit single channel array, that specifies elements of the output array to be changed.

```js
invoke(name: 'bitwise_and', src1: Mat, src2: Mat, dst: Mat, mask?: Mat): void;
invoke(name: 'bitwise_and', src1: Mat, src2: Mat | Scalar, dst: Mat, mask?: Mat)
invoke(name: 'bitwise_and', src1: Scalar, src2: Mat, dst: Mat, mask?: Mat): void;
```

### bitwise_not
@@ -113,7 +114,8 @@ Calculates the per-element bit-wise disjunction of two arrays or an array and a
- mask optional operation mask, 8-bit single channel array, that specifies elements of the output array to be changed.

```js
invoke(name: 'bitwise_or', src1: Mat, src2: Mat, dst: Mat, mask?: Mat): void;
invoke(name: 'bitwise_or', src1: Mat, src2: Mat | Scalar, dst: Mat, mask?: Mat): void;
invoke(name: 'bitwise_or', src1: Scalar, src2: Mat, dst: Mat, mask?: Mat): void;
```

### bitwise_xor
@@ -126,7 +128,8 @@ Calculates the per-element bit-wise "exclusive or" operation on two arrays or an
- mask optional operation mask, 8-bit single channel array, that specifies elements of the output array to be changed.

```js
invoke(name: 'bitwise_xor', src1: Mat, src2: Mat, dst: Mat, mask?: Mat): void;
invoke(name: 'bitwise_xor', src1: Mat, src2: Mat | Scalar, dst: Mat, mask?: Mat)
invoke(name: 'bitwise_xor', src1: Scalar, src2: Mat, dst: Mat, mask?: Mat): void;
```

### borderInterpolate
@@ -242,6 +245,13 @@ Performs the per-element comparison of two arrays or an array and scalar value
invoke(
name: 'compare',
src1: Mat,
src2: Mat | Scalar,
dst: Mat,
cmpop: CmpTypes
): void;
invoke(
name: 'compare',
src1: Scalar,
src2: Mat,
dst: Mat,
cmpop: CmpTypes
15 changes: 11 additions & 4 deletions example/Gemfile
Original file line number Diff line number Diff line change
@@ -3,7 +3,14 @@ source 'https://rubygems.org'
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
ruby ">= 2.6.10"

# Cocoapods 1.15 introduced a bug which break the build. We will remove the upper
# bound in the template on Cocoapods with next React Native release.
gem 'cocoapods', '>= 1.13', '< 1.15'
gem 'activesupport', '>= 6.1.7.5', '< 7.1.0'
# Exclude problematic versions of cocoapods and activesupport that causes build failures.
gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1'
gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'
gem 'xcodeproj', '< 1.26.0'
gem 'concurrent-ruby', '< 1.3.4'

# Ruby 3.4.0 has removed some libraries from the standard library.
gem 'bigdecimal'
gem 'logger'
gem 'benchmark'
gem 'mutex_m'
8 changes: 5 additions & 3 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -49,8 +49,12 @@ react {
//
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
// hermesFlags = ["-O", "-output-source-map"]

autolinkLibrariesWithApp()
}



/**
* Set this to true to Run Proguard on Release builds to minify the Java bytecode.
*/
@@ -67,7 +71,7 @@ def enableProguardInReleaseBuilds = false
* give correct results when using with locales other than en-US. Note that
* this variant is about 6MiB larger per architecture than default.
*/
def jscFlavor = 'org.webkit:android-jsc:+'
def jscFlavor = 'io.github.react-native-community:jsc-android:2026004.+'

android {
ndkVersion rootProject.ext.ndkVersion
@@ -114,5 +118,3 @@ dependencies {
implementation jscFlavor
}
}

apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
3 changes: 2 additions & 1 deletion example/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -9,7 +9,8 @@
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:allowBackup="false"
android:theme="@style/AppTheme">
android:theme="@style/AppTheme"
android:supportsRtl="true">
<activity
android:name=".MainActivity"
android:label="@string/app_name"
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@ import com.facebook.react.ReactPackage
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
import com.facebook.react.defaults.DefaultReactNativeHost
import com.facebook.react.soloader.OpenSourceMergedSoMapping
import com.facebook.soloader.SoLoader

class MainApplication : Application(), ReactApplication {
@@ -34,7 +35,7 @@ class MainApplication : Application(), ReactApplication {

override fun onCreate() {
super.onCreate()
SoLoader.init(this, false)
SoLoader.init(this, OpenSourceMergedSoMapping)
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
// If you opted-in for the New Architecture, we load the native entry point for this app.
load()
12 changes: 6 additions & 6 deletions example/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
buildscript {
ext {
buildToolsVersion = "34.0.0"
minSdkVersion = 26
compileSdkVersion = 34
targetSdkVersion = 34
ndkVersion = "26.1.10909125"
kotlinVersion = "1.9.22"
buildToolsVersion = "35.0.0"
minSdkVersion = 24
compileSdkVersion = 35
targetSdkVersion = 35
ndkVersion = "27.1.12297006"
kotlinVersion = "2.0.21"
}
repositories {
google()
4 changes: 1 addition & 3 deletions example/android/gradle.properties
Original file line number Diff line number Diff line change
@@ -21,8 +21,6 @@ org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m
# Android operating system, and which are packaged with your app's APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=false

# Use this property to specify which architecture you want to build.
# You can also override it from the CLI using
@@ -34,7 +32,7 @@ reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
# your application. You should enable this flag either if you want
# to write custom TurboModules/Fabric components OR use libraries that
# are providing them.
newArchEnabled=false
newArchEnabled=true

# Use this property to enable or disable the Hermes JS engine.
# If set to false, you will be using JSC instead.
2 changes: 1 addition & 1 deletion example/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
10 changes: 6 additions & 4 deletions example/android/gradlew
Original file line number Diff line number Diff line change
@@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#

##############################################################################
#
@@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -84,7 +86,7 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
@@ -203,7 +205,7 @@ fi
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.
@@ -246,4 +248,4 @@ eval "set -- $(
tr '\n' ' '
)" '"$@"'

exec "$JAVACMD" "$@"
exec "$JAVACMD" "$@"
3 changes: 3 additions & 0 deletions example/android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
pluginManagement { includeBuild("../node_modules/@react-native/gradle-plugin") }
plugins { id("com.facebook.react.settings") }
extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autolinkLibrariesFromCommand() }
rootProject.name = 'fastopencv.example'
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
include ':app'
48 changes: 48 additions & 0 deletions example/ios/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import UIKit
import React
import React_RCTAppDelegate
import ReactAppDependencyProvider

@main
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?

var reactNativeDelegate: ReactNativeDelegate?
var reactNativeFactory: RCTReactNativeFactory?

func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil
) -> Bool {
let delegate = ReactNativeDelegate()
let factory = RCTReactNativeFactory(delegate: delegate)
delegate.dependencyProvider = RCTAppDependencyProvider()

reactNativeDelegate = delegate
reactNativeFactory = factory

window = UIWindow(frame: UIScreen.main.bounds)

factory.startReactNative(
withModuleName: "FastOpencvExample",
in: window,
launchOptions: launchOptions
)

return true
}
}

class ReactNativeDelegate: RCTDefaultReactNativeFactoryDelegate {
override func sourceURL(for bridge: RCTBridge) -> URL? {
self.bundleURL()
}

override func bundleURL() -> URL? {
#if DEBUG
RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: "index")
#else
Bundle.main.url(forResource: "main", withExtension: "jsbundle")
#endif
}
}
90 changes: 10 additions & 80 deletions example/ios/FastOpencvExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
@@ -9,11 +9,9 @@
/* Begin PBXBuildFile section */
00E356F31AD99517003FC87E /* FastOpencvExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* FastOpencvExampleTests.m */; };
0C80B921A6F3F58F76C31292 /* libPods-FastOpencvExample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5DCACB8F33CDC322A6C60F78 /* libPods-FastOpencvExample.a */; };
13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; };
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
7699B88040F8A987B510C191 /* libPods-FastOpencvExample-FastOpencvExampleTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 19F6CBCC0A4E27FBF8BF4A61 /* libPods-FastOpencvExample-FastOpencvExampleTests.a */; };
81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; };
B258F7F22DB91213005782D9 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B258F7F12DB91213005782D9 /* AppDelegate.swift */; };
D309F2639C723F0B90DF8740 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = F51F5A26FAE3DB4FAF72F6A7 /* PrivacyInfo.xcprivacy */; };
/* End PBXBuildFile section */

@@ -32,19 +30,15 @@
00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
00E356F21AD99517003FC87E /* FastOpencvExampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FastOpencvExampleTests.m; sourceTree = "<group>"; };
13B07F961A680F5B00A75B9A /* FastOpencvExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FastOpencvExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = FastOpencvExample/AppDelegate.h; sourceTree = "<group>"; };
13B07FB01A68108700A75B9A /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = FastOpencvExample/AppDelegate.mm; sourceTree = "<group>"; };
13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = FastOpencvExample/Images.xcassets; sourceTree = "<group>"; };
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = FastOpencvExample/Info.plist; sourceTree = "<group>"; };
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = FastOpencvExample/main.m; sourceTree = "<group>"; };
13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = PrivacyInfo.xcprivacy; path = FastOpencvExample/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
19F6CBCC0A4E27FBF8BF4A61 /* libPods-FastOpencvExample-FastOpencvExampleTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-FastOpencvExample-FastOpencvExampleTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
3B4392A12AC88292D35C810B /* Pods-FastOpencvExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FastOpencvExample.debug.xcconfig"; path = "Target Support Files/Pods-FastOpencvExample/Pods-FastOpencvExample.debug.xcconfig"; sourceTree = "<group>"; };
5709B34CF0A7D63546082F79 /* Pods-FastOpencvExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FastOpencvExample.release.xcconfig"; path = "Target Support Files/Pods-FastOpencvExample/Pods-FastOpencvExample.release.xcconfig"; sourceTree = "<group>"; };
5B7EB9410499542E8C5724F5 /* Pods-FastOpencvExample-FastOpencvExampleTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FastOpencvExample-FastOpencvExampleTests.debug.xcconfig"; path = "Target Support Files/Pods-FastOpencvExample-FastOpencvExampleTests/Pods-FastOpencvExample-FastOpencvExampleTests.debug.xcconfig"; sourceTree = "<group>"; };
5DCACB8F33CDC322A6C60F78 /* libPods-FastOpencvExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-FastOpencvExample.a"; sourceTree = BUILT_PRODUCTS_DIR; };
81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = FastOpencvExample/LaunchScreen.storyboard; sourceTree = "<group>"; };
89C6BE57DB24E9ADA2F236DE /* Pods-FastOpencvExample-FastOpencvExampleTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FastOpencvExample-FastOpencvExampleTests.release.xcconfig"; path = "Target Support Files/Pods-FastOpencvExample-FastOpencvExampleTests/Pods-FastOpencvExample-FastOpencvExampleTests.release.xcconfig"; sourceTree = "<group>"; };
B258F7F02DB91213005782D9 /* FastOpencvExample-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "FastOpencvExample-Bridging-Header.h"; sourceTree = "<group>"; };
B258F7F12DB91213005782D9 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
F51F5A26FAE3DB4FAF72F6A7 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xml; name = PrivacyInfo.xcprivacy; path = FastOpencvExample/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
/* End PBXFileReference section */
@@ -54,7 +48,6 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
7699B88040F8A987B510C191 /* libPods-FastOpencvExample-FastOpencvExampleTests.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -89,14 +82,13 @@
13B07FAE1A68108700A75B9A /* FastOpencvExample */ = {
isa = PBXGroup;
children = (
13B07FAF1A68108700A75B9A /* AppDelegate.h */,
13B07FB01A68108700A75B9A /* AppDelegate.mm */,
13B07FB51A68108700A75B9A /* Images.xcassets */,
13B07FB61A68108700A75B9A /* Info.plist */,
81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */,
13B07FB71A68108700A75B9A /* main.m */,
13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */,
F51F5A26FAE3DB4FAF72F6A7 /* PrivacyInfo.xcprivacy */,
B258F7F12DB91213005782D9 /* AppDelegate.swift */,
B258F7F02DB91213005782D9 /* FastOpencvExample-Bridging-Header.h */,
);
name = FastOpencvExample;
sourceTree = "<group>";
@@ -106,7 +98,6 @@
children = (
ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
5DCACB8F33CDC322A6C60F78 /* libPods-FastOpencvExample.a */,
19F6CBCC0A4E27FBF8BF4A61 /* libPods-FastOpencvExample-FastOpencvExampleTests.a */,
);
name = Frameworks;
sourceTree = "<group>";
@@ -147,8 +138,6 @@
children = (
3B4392A12AC88292D35C810B /* Pods-FastOpencvExample.debug.xcconfig */,
5709B34CF0A7D63546082F79 /* Pods-FastOpencvExample.release.xcconfig */,
5B7EB9410499542E8C5724F5 /* Pods-FastOpencvExample-FastOpencvExampleTests.debug.xcconfig */,
89C6BE57DB24E9ADA2F236DE /* Pods-FastOpencvExample-FastOpencvExampleTests.release.xcconfig */,
);
path = Pods;
sourceTree = "<group>";
@@ -160,12 +149,9 @@
isa = PBXNativeTarget;
buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "FastOpencvExampleTests" */;
buildPhases = (
A55EABD7B0C7F3A422A6CC61 /* [CP] Check Pods Manifest.lock */,
00E356EA1AD99517003FC87E /* Sources */,
00E356EB1AD99517003FC87E /* Frameworks */,
00E356EC1AD99517003FC87E /* Resources */,
C59DA0FBD6956966B86A3779 /* [CP] Embed Pods Frameworks */,
F6A41C54EA430FDDC6A6ED99 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
@@ -211,7 +197,7 @@
TestTargetID = 13B07F861A680F5B00A75B9A;
};
13B07F861A680F5B00A75B9A = {
LastSwiftMigration = 1120;
LastSwiftMigration = 1630;
};
};
};
@@ -288,28 +274,6 @@
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-FastOpencvExample/Pods-FastOpencvExample-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
A55EABD7B0C7F3A422A6CC61 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-FastOpencvExample-FastOpencvExampleTests-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
@@ -332,23 +296,6 @@
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
C59DA0FBD6956966B86A3779 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-FastOpencvExample-FastOpencvExampleTests/Pods-FastOpencvExample-FastOpencvExampleTests-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-FastOpencvExample-FastOpencvExampleTests/Pods-FastOpencvExample-FastOpencvExampleTests-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-FastOpencvExample-FastOpencvExampleTests/Pods-FastOpencvExample-FastOpencvExampleTests-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
E235C05ADACE081382539298 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
@@ -366,23 +313,6 @@
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-FastOpencvExample/Pods-FastOpencvExample-resources.sh\"\n";
showEnvVarsInLog = 0;
};
F6A41C54EA430FDDC6A6ED99 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-FastOpencvExample-FastOpencvExampleTests/Pods-FastOpencvExample-FastOpencvExampleTests-resources-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-FastOpencvExample-FastOpencvExampleTests/Pods-FastOpencvExample-FastOpencvExampleTests-resources-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-FastOpencvExample-FastOpencvExampleTests/Pods-FastOpencvExample-FastOpencvExampleTests-resources.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
@@ -398,8 +328,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */,
13B07FC11A68108700A75B9A /* main.m in Sources */,
B258F7F22DB91213005782D9 /* AppDelegate.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -416,7 +345,6 @@
/* Begin XCBuildConfiguration section */
00E356F61AD99517003FC87E /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 5B7EB9410499542E8C5724F5 /* Pods-FastOpencvExample-FastOpencvExampleTests.debug.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
GCC_PREPROCESSOR_DEFINITIONS = (
@@ -443,7 +371,6 @@
};
00E356F71AD99517003FC87E /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 89C6BE57DB24E9ADA2F236DE /* Pods-FastOpencvExample-FastOpencvExampleTests.release.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
COPY_PHASE_STRIP = NO;
@@ -487,6 +414,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER = fastopencv.example;
PRODUCT_NAME = FastOpencvExample;
SWIFT_OBJC_BRIDGING_HEADER = "FastOpencvExample-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
@@ -514,6 +442,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER = fastopencv.example;
PRODUCT_NAME = FastOpencvExample;
SWIFT_OBJC_BRIDGING_HEADER = "FastOpencvExample-Bridging-Header.h";
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
};
@@ -598,6 +527,7 @@
);
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) DEBUG";
USE_HERMES = true;
};
name = Debug;
6 changes: 0 additions & 6 deletions example/ios/FastOpencvExample/AppDelegate.h

This file was deleted.

31 changes: 0 additions & 31 deletions example/ios/FastOpencvExample/AppDelegate.mm

This file was deleted.

1 change: 1 addition & 0 deletions example/ios/FastOpencvExample/PrivacyInfo.xcprivacy
Original file line number Diff line number Diff line change
@@ -10,6 +10,7 @@
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>C617.1</string>
<string>3B52.1</string>
</array>
</dict>
<dict>
10 changes: 0 additions & 10 deletions example/ios/FastOpencvExample/main.m

This file was deleted.

7 changes: 1 addition & 6 deletions example/ios/Podfile
Original file line number Diff line number Diff line change
@@ -22,12 +22,7 @@ target 'FastOpencvExample' do
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/.."
)

target 'FastOpencvExampleTests' do
inherit! :complete
# Pods for testing
end


post_install do |installer|
# https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
react_native_post_install(
1,634 changes: 1,171 additions & 463 deletions example/ios/Podfile.lock

Large diffs are not rendered by default.

42 changes: 25 additions & 17 deletions example/package.json
Original file line number Diff line number Diff line change
@@ -10,27 +10,35 @@
"build:ios": "react-native build-ios --scheme FastOpencvExample --mode Debug --extra-params \"-sdk iphonesimulator CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++ GCC_OPTIMIZATION_LEVEL=0 GCC_PRECOMPILE_PREFIX_HEADER=YES ASSETCATALOG_COMPILER_OPTIMIZATION=time DEBUG_INFORMATION_FORMAT=dwarf COMPILER_INDEX_STORE_ENABLE=NO\""
},
"dependencies": {
"@react-navigation/native": "^6.1.18",
"@react-navigation/native-stack": "^6.11.0",
"@shopify/react-native-skia": "^1.8.2",
"react": "18.2.0",
"react-native": "0.74.4",
"react-native-image-picker": "^7.1.2",
"react-native-reanimated": "^3.14.0",
"react-native-safe-area-context": "^4.11.0",
"react-native-screens": "^3.34.0",
"react-native-vision-camera": "4.6.3",
"@react-navigation/native": "^7.1.6",
"@react-navigation/native-stack": "^7.3.10",
"@shopify/react-native-skia": "v2.0.0-next.2",
"react": "19.0.0",
"react-native": "0.79.1",
"react-native-image-picker": "^8.2.0",
"react-native-reanimated": "^3.17.4",
"react-native-safe-area-context": "^5.4.0",
"react-native-screens": "^4.10.0",
"react-native-vision-camera": "4.6.4",
"react-native-worklets-core": "1.5.0",
"vision-camera-resize-plugin": "3.2.0"
},
"devDependencies": {
"@babel/core": "^7.20.0",
"@babel/preset-env": "^7.20.0",
"@babel/runtime": "^7.20.0",
"@react-native/babel-preset": "0.74.86",
"@react-native/metro-config": "0.74.86",
"@react-native/typescript-config": "0.74.86",
"react-native-builder-bob": "^0.29.0"
"@babel/core": "^7.25.2",
"@babel/preset-env": "^7.25.3",
"@babel/runtime": "^7.25.0",
"@react-native-community/cli": "18.0.0",
"@react-native-community/cli-platform-android": "18.0.0",
"@react-native-community/cli-platform-ios": "18.0.0",
"@react-native/babel-preset": "0.79.1",
"@react-native/eslint-config": "0.79.1",
"@react-native/metro-config": "0.79.1",
"@react-native/typescript-config": "0.79.1",
"@types/jest": "^29.5.13",
"@types/react": "^19.0.0",
"@types/react-test-renderer": "^19.0.0",
"react-native-builder-bob": "^0.29.0",
"react-test-renderer": "19.0.0"
},
"engines": {
"node": ">=18"
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -65,8 +65,8 @@
"eslint-plugin-prettier": "^5.0.1",
"jest": "^29.7.0",
"prettier": "^3.0.3",
"react": "18.2.0",
"react-native": "0.74.4",
"react": "19.0.0",
"react-native": "0.79.1",
"react-native-builder-bob": "^0.29.0",
"release-it": "17.6.0",
"turbo": "^1.10.7",
52 changes: 49 additions & 3 deletions src/functions/Core.ts
Original file line number Diff line number Diff line change
@@ -99,7 +99,20 @@ export type Core = {
* @param dst output array that has the same size and type as the input arrays.
* @param mask optional operation mask, 8-bit single channel array, that specifies elements of the output array to be changed.
*/
invoke(name: 'bitwise_and', src1: Mat, src2: Mat, dst: Mat, mask?: Mat): void;
invoke(
name: 'bitwise_and',
src1: Mat,
src2: Mat | Scalar,
dst: Mat,
mask?: Mat
): void;
invoke(
name: 'bitwise_and',
src1: Scalar,
src2: Mat,
dst: Mat,
mask?: Mat
): void;
/**
* Inverts every bit of an array.
* @param name Function name.
@@ -116,7 +129,20 @@ export type Core = {
* @param dst output array that has the same size and type as the input arrays.
* @param mask optional operation mask, 8-bit single channel array, that specifies elements of the output array to be changed.
*/
invoke(name: 'bitwise_or', src1: Mat, src2: Mat, dst: Mat, mask?: Mat): void;
invoke(
name: 'bitwise_or',
src1: Mat,
src2: Mat | Scalar,
dst: Mat,
mask?: Mat
): void;
invoke(
name: 'bitwise_or',
src1: Scalar,
src2: Mat,
dst: Mat,
mask?: Mat
): void;
/**
* Calculates the per-element bit-wise "exclusive or" operation on two arrays or an array and a scalar.
* @param name Function name.
@@ -125,7 +151,20 @@ export type Core = {
* @param dst output array that has the same size and type as the input arrays.
* @param mask optional operation mask, 8-bit single channel array, that specifies elements of the output array to be changed.
*/
invoke(name: 'bitwise_xor', src1: Mat, src2: Mat, dst: Mat, mask?: Mat): void;
invoke(
name: 'bitwise_xor',
src1: Mat,
src2: Mat | Scalar,
dst: Mat,
mask?: Mat
): void;
invoke(
name: 'bitwise_xor',
src1: Scalar,
src2: Mat,
dst: Mat,
mask?: Mat
): void;

/**
* Computes the source location of an extrapolated pixel.
@@ -222,6 +261,13 @@ export type Core = {
invoke(
name: 'compare',
src1: Mat,
src2: Mat | Scalar,
dst: Mat,
cmpop: CmpTypes
): void;
invoke(
name: 'compare',
src1: Scalar,
src2: Mat,
dst: Mat,
cmpop: CmpTypes
5 changes: 5 additions & 0 deletions src/objects/Objects.ts
Original file line number Diff line number Diff line change
@@ -144,4 +144,9 @@ export type Objects = {
itemIndex: number
): PointVector;
copyObjectFromVector(vector: RectVector, itemIndex: number): Rect;

addObjectToVector(vector: MatVector, object: Mat): void;
addObjectToVector(vector: PointVector, object: Point): void;
addObjectToVector(vector: RectVector, object: Rect): void;
addObjectToVector(vector: PointVectorOfVectors, object: PointVector): void;
};
2 changes: 2 additions & 0 deletions src/utils/UtilsFunctions.ts
Original file line number Diff line number Diff line change
@@ -67,4 +67,6 @@ export type UtilsFunctions = {
channels: number;
buffer: BufferType[T];
};

inpaint(src: Mat, mask: Mat, dst: Mat, radius: number, flag: unknown): void;
};
2,511 changes: 1,539 additions & 972 deletions yarn.lock

Large diffs are not rendered by default.


Unchanged files with check annotations Beta

const [result, setResult] = useState<string>('');
const getImageFromGallery = async () => {
const result = await launchImageLibrary({

Check warning on line 17 in example/src/examples/ImageExample.tsx

GitHub Actions / lint

'result' is already declared in the upper scope on line 14 column 10
mediaType: 'photo',
includeBase64: true,
});
});
return (
<SafeAreaView style={{ backgroundColor: 'white', flex: 1 }}>

Check warning on line 53 in example/src/examples/ImageExample.tsx

GitHub Actions / lint

Inline style: { backgroundColor: 'white', flex: 1 }
<Button title="Select photo" onPress={getImageFromGallery} />
<Button title="Process" onPress={() => worklet()} />