kandi background
Explore Kits

react-native-vision-camera | The Camera library that sees the vision | Computer Vision library

 by   mrousavy Swift Version: v2.13.2 License: MIT

 by   mrousavy Swift Version: v2.13.2 License: MIT

Download this library from

kandi X-RAY | react-native-vision-camera Summary

react-native-vision-camera is a Swift library typically used in Artificial Intelligence, Computer Vision, React Native, OpenCV applications. react-native-vision-camera has no bugs, it has no vulnerabilities, it has a Permissive License and it has medium support. You can download it from GitHub.
📸 The Camera library that sees the vision.
Support
Support
Quality
Quality
Security
Security
License
License
Reuse
Reuse

kandi-support Support

  • react-native-vision-camera has a medium active ecosystem.
  • It has 2456 star(s) with 230 fork(s). There are 26 watchers for this library.
  • There were 10 major release(s) in the last 12 months.
  • There are 101 open issues and 205 have been closed. On average issues are closed in 23 days. There are 42 open pull requests and 0 closed requests.
  • It has a neutral sentiment in the developer community.
  • The latest version of react-native-vision-camera is v2.13.2
This Library - Support
Best in #Computer Vision
Average in #Computer Vision
This Library - Support
Best in #Computer Vision
Average in #Computer Vision

quality kandi Quality

  • react-native-vision-camera has 0 bugs and 11 code smells.
This Library - Quality
Best in #Computer Vision
Average in #Computer Vision
This Library - Quality
Best in #Computer Vision
Average in #Computer Vision

securitySecurity

  • react-native-vision-camera has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
  • react-native-vision-camera code analysis shows 0 unresolved vulnerabilities.
  • There are 7 security hotspots that need review.
This Library - Security
Best in #Computer Vision
Average in #Computer Vision
This Library - Security
Best in #Computer Vision
Average in #Computer Vision

license License

  • react-native-vision-camera is licensed under the MIT License. This license is Permissive.
  • Permissive licenses have the least restrictions, and you can use them in most projects.
This Library - License
Best in #Computer Vision
Average in #Computer Vision
This Library - License
Best in #Computer Vision
Average in #Computer Vision

buildReuse

  • react-native-vision-camera releases are available to install and integrate.
  • Installation instructions are not available. Examples and code snippets are available.
  • It has 2204 lines of code, 120 functions and 88 files.
  • It has medium code complexity. Code complexity directly impacts maintainability of the code.
This Library - Reuse
Best in #Computer Vision
Average in #Computer Vision
This Library - Reuse
Best in #Computer Vision
Average in #Computer Vision
Top functions reviewed by kandi - BETA

kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample Here

Get all kandi verified functions for this library.

Get all kandi verified functions for this library.

react-native-vision-camera Key Features

Photo, Video and Snapshot capture

Customizable devices and multi-cameras (smoothly zoom out to "fish-eye" camera)

Customizable FPS

Frame Processors (JS worklets to run QR-Code scanning, facial recognition, AI object detection, realtime video chats, ...)

Smooth zooming (Reanimated)

Fast pause and resume

HDR & Night modes

Vision Camera

copy iconCopydownload iconDownload
react-native-vision-camera

Example

copy iconCopydownload iconDownload
function App() {
  const devices = useCameraDevices('wide-angle-camera')
  const device = devices.back

  if (device == null) return <LoadingView />
  return (
    <Camera
      style={StyleSheet.absoluteFill}
      device={device}
      isActive={true}
    />
  )
}

CocoaPods could not find compatible versions for pod "Firebase/CoreOnly" on React Native ios

copy iconCopydownload iconDownload
$FirebaseSDKVersion = '8.10.0'

Accessing Cache Images to upload to S3, in React native

copy iconCopydownload iconDownload
import { Storage } from "aws-amplify";
    export default async function s3UploadBackup(file, user) {
        let formatted_date = moment().format("DD-MM-YYYY");
        let filePath = file.split("/");
        let fileImageName = filePath[filePath.length - 1];
        try {
            console.log("Files contains :" + JSON.stringify(file));
    
            // example of one of the URL I used  "file:///storage/emulated/0/Android/data/com.app/files/Pictures/image-c64a66b3-489d-4af6-bf93-7adb507ceda1790666367.jpg"
            const fileName = `${formatted_date}---${user.businessName}---${user.phoneNumber}---${user.location}---${fileImageName}`;

  const blob = await new Promise((resolve, reject) => {
    const xhr = new XMLHttpRequest();
    xhr.onload = function () {
      resolve(xhr.response);
    };
    xhr.onerror = function (e) {
      reject(new TypeError("Network request failed"));
    };
    xhr.responseType = "blob";
    xhr.open("GET", localPath, true);
    xhr.send(null);
  });


  await Storage.put("yourKeyHere", blob, {
       contentType: "image/jpeg", // contentType is optional
    });
// We're done with the blob, close and release it
  blob.close();
        } catch(error) {
            console.log(error);
// We're done with the blob, close and release it
  blob.close();
        } 
    }



How do you implement React-native-gesture-handler with React Navigation 6.x Native Stack Navigator (RN>0.6)?

copy iconCopydownload iconDownload
<Stack.Screen name="Home" component={HomeScreen} />
<Stack.Screen name="Home" component={gestureHandlerRootHOC(HomeScreen)} />
<Stack.Screen name="Home" component={HomeScreen} />
<Stack.Screen name="Home" component={gestureHandlerRootHOC(HomeScreen)} />

How to hot reload a development package in an Expo app example nested folder?

copy iconCopydownload iconDownload
let config = require('@grean/react-native-metro-config-app-example/index.js');
module.exports = config

Swift linker error: Undefined symbol for surely available API presentationDimensions

copy iconCopydownload iconDownload
                LIBRARY_SEARCH_PATHS = (
                    "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"",
                    "\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"",
                    "\"$(inherited)\"",
                );
                SWIFT_VERSION = 5.0;
                LIBRARY_SEARCH_PATHS = (
                    "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"",
                    "\"$(inherited)\"",
                );
                SWIFT_VERSION = 5.2;
                LIBRARY_SEARCH_PATHS = (
                    "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"",
                    "\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"",
                    "\"$(inherited)\"",
                );
                SWIFT_VERSION = 5.0;
                LIBRARY_SEARCH_PATHS = (
                    "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"",
                    "\"$(inherited)\"",
                );
                SWIFT_VERSION = 5.2;

Community Discussions

Trending Discussions on react-native-vision-camera
  • React-native-vision-camera can't access to normal camera in back
  • Google MLKIt TextRecognition on iOS return always empty result
  • CocoaPods could not find compatible versions for pod &quot;Firebase/CoreOnly&quot; on React Native ios
  • Accessing Cache Images to upload to S3, in React native
  • How do you implement React-native-gesture-handler with React Navigation 6.x Native Stack Navigator (RN&gt;0.6)?
  • How to hot reload a development package in an Expo app example nested folder?
  • Swift linker error: Undefined symbol for surely available API presentationDimensions
Trending Discussions on react-native-vision-camera

QUESTION

React-native-vision-camera can't access to normal camera in back

Asked 2022-Mar-07 at 07:02

i am trying to use 'normal' camera on my iphone 11 pro. I use react-native-vision-camera. When i run this code:

  const devices = useCameraDevices();
  const deviceBack = devices.back;
  console.log(deviceBack?.devices)

I get only 2 cameras : ["ultra-wide-angle-camera", "wide-angle-camera"], I don't want a wide camera, I want to access to my normal camera, how to do it ?
Thanks.

ANSWER

Answered 2022-Mar-07 at 07:02

tl;dr - Single-lens smartphone cameras commonly have a wide-angle lens of roughly 22mm and 30mm equivalent. So basically, you would want to choose wide-angle, as this is the "normal" type.


based on the react-native documentation, there are three Identifiers for a physical camera (one that exists on the back/front of the device):

"ultra-wide-angle-camera" | "wide-angle-camera" | "telephoto-camera"


"ultra-wide-angle-camera": A built-in camera with a shorter focal length than that of a wide-angle camera. (focal length between below 24mm)

"wide-angle-camera": A built-in wide-angle camera. (focal length between 24mm and 35mm)

"telephoto-camera": A built-in camera device with a longer focal length than a wide-angle camera. (focal length between above 85mm)


now that we have that settled, let's take a look at cameras' focal lengths that are equivalent to phone cameras' focal length (resource)

Camera type Focal length Angle-of-view
Wide-angle 22mm to 30mm ~84° to ~62°
Telephoto 50mm to 80mm ~40° to ~25°
Ultrawide-angle 12mm to 18mm ~112° to ~90°
Periscope 103mm to 125mm ~20° to ~16°

what is considered a "normal" focal length is 35mm, so you should choose wide-angle since it is the closest (and eventually with the angle of view the user might be even closer to 35mm), further more the wide-angle is the most common focal-length for phone camera lens

Source https://stackoverflow.com/questions/71287639

Community Discussions, Code Snippets contain sources that include Stack Exchange Network

Vulnerabilities

No vulnerabilities reported

Install react-native-vision-camera

You can download it from GitHub.

Support

GuidesAPIExample

DOWNLOAD this Library from

Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases
Explore Kits

Save this library and start creating your kit

Share this Page

share link
Consider Popular Computer Vision Libraries
Try Top Libraries by mrousavy
Compare Computer Vision Libraries with Highest Support
Compare Computer Vision Libraries with Highest Quality
Compare Computer Vision Libraries with Highest Security
Compare Computer Vision Libraries with Permissive License
Compare Computer Vision Libraries with Highest Reuse
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases
Explore Kits

Save this library and start creating your kit

  • © 2022 Open Weaver Inc.