1

I am new to react-native. I tried many camera packages (react-native-camera, react-native-image-crop-picker) to create a camera in react-native app.

But non of them have all the sections as I checked. I want these options to be there in the camera,

  • Grid with a pointer which identify and point the nose
  • A warning when the distance is too long (like more than 2 meters)
  • And check the lightning and show warning or infor message if the light is low or too high

Can anyone suggest any npm packages which have all these and if there is any sample code can provide that too?

Deepika
  • 737
  • 7
  • 23

2 Answers2

0

I think this functionality you have to do in native code(android and swift), because react native camera is a awesome library in RN if this does not perform this functionality then i think there will be no other library available which perform this, so try in native.

Hamid khan
  • 105
  • 7
0

React native firebase had ml vision but it's removed from firebase SDK as per the latest documentation but there are other ways as well.

  1. Google detect faces API

    You can try google detect faces API and from response use nose position if detected and draw the overlay on image using positions you got from response.

  2. react-native-face-detection

    This package bring back face detection feature from ml-vision package. Similarly it will give nose position.

  • I tried this too. but it is not even identifying the face correctly – Deepika Aug 16 '22 at 18:39
  • Google detect faces API too doesn't work properly? – Hardik Chavda Aug 17 '22 at 04:06
  • If not then as Hamid said you have to write native code for same and i guess you can look into ML Kit for same and [this blog](https://dev.to/dimaportenko/ml-kit-in-react-native-part-1-18b7) has implemented text recognition native module in react native using ML kit so you can take inspiration from it and do same for [ML Kit face detection](https://developers.google.com/ml-kit/vision/face-detection) or either use some good paid API. – Hardik Chavda Aug 17 '22 at 04:23