Utilizo la biblioteca React-native-camera para la detección de rostros y el cuadro delimitador en los rostros. Después quiero recortar solo las caras de la imagen. Para eso, utilicé la Biblioteca ImageEditor para recortar la imagen del cuadro delimitador. Pero no obtener resultados precisos.
const cropData = { offset: { x: faces[0]["bounds"]['origin']["x"], y: faces[0]["bounds"]['origin']["y"] }, size: { width: faces[0]["bounds"]['size']["width"], height: faces[0]["bounds"]['size']["height"] }, displaySize: { width: faces[0]["bounds"]['size']["width"], height: faces[0]["bounds"]['size']["height"] }, resizeMode: 'contain', }; ImageEditor.cropImage(url, cropData).then(url => { console.log("Cropped image url",url); }Donde las caras se generan a partir de la biblioteca React-native-camera. caras = [{"bottomMouthPosition": {"x": 273.6521504720052, "y": 504.9319492340088}, "límites": {"origen": [Objeto], "tamaño": [Objeto]}, "faceID": 0, "LeftCheekPosition": {"x": 309.4739685058594, "y": 433.28645477294924}, "LeftEarposition": {"x": 314.48342386881507, "y": 387.3479737599691}}, "izquierda" "," 65988. : 272.45707194010413, "y": 378.8229661305745}, "leftMouthPosition": {"x": 298.3786315917969, "y": 477.2733610788981}, "noseBasePosition": {"x": 252.38332112630206, "y": 442.4113123575846}, "rightCheekPosition": {"x": 190.822509765625, "y": 479.6853875478109}, "rightEarPosition": {"x": 144.62736002604166, "y": 464.80665067036944}, "rightEyeOpenProbability": 0.9021314382553101, "rightEyePosition": {"x": 184.92427571614581, " y": 413.32094650268556}, "rightMouthPosition": {"x": 228.29396565755206, "y": 503.3075309753418}, "rollAngle": -20.892227172851562, "smilingProbability": 0.00994393602013588, "yawAngle": -7.05137825012207}]