I see many mobile apps having a feature that user can draw a square to indicate something to tag on the image.
I'm building Face Tagging
app and basically user draws square on the boundary of human's face on the image.
I've Googled it many times but I'm not sure RN has some feature library for tagging.
How can I achieve this? Is there any good library to draw square on image? And it will be even better if I can remember its coordinate width, height, and position of the rectangle.
Any idea or suggestion will be highly appreciated!
This is an example below
Open App. js and add the following code: import { StatusBar } from "expo-status-bar"; import React from "react"; import { StyleSheet, Text, View, ImageBackground } from "react-native"; const staticImage = require("./src/assets/static-image. png"); export default function App() { return ( <View style={styles.
You might want to take a look at this for creating your "object" class: javascript.info/constructor-new. So instead, something like "function Man() { this.name = 'joe'; this. age = 27; this. country = 'France'; } export default man = new Man()", depending on what you're trying to do.
PI/180; const theta = degToRad(7); Putting all this together, you might adjust your code like so: const degToRad = (deg) => (deg * Math. PI) / 180; const radToDeg = (rad) => (rad * 180) / Math.
You can use React Native ART library to draw shapes on top of image. It is a standard library that ships with React Native (although not linked to the binary by default).
Regarding the algorithm:
ART.Surface
onPressOut
event)Where to go from here:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With