Create a cloud function which is created when the a new document is created in a folder…
- User
Create a cloud function which is created when the a new document is created in a folder named 'Access'. Now, the field named 'picUrl' is accessed where the image of a face is located. Now the cloud function must check for all the faces which are located in the field named 'imageLink' of all documents of collection named 'DB' and perform facial recognition to compare the their faces with the face found in field named 'picUrl' of document of a collection named 'Access' . and if the facial recognition is performed and the match if found with a specific document,then it must return the field named 'Uid' of the document of collection 'DB' and it must set the 'status' named field of the newly created document of collection named 'Access' to 'found' otherwise it must set it to 'notFound'.Note: the cloud function must check all the documents of collection named 'DB' and stop when a match is found. 2. you must write entire code facial recognition. 3. you must use a precise and fast technique to process the images and facially recognize the project. 4.finally the cloud function must be called when the document is created in the collection named 'Access'.
- Assistant
- User
your function does not perform face recognition but performs face detection instead.
- Assistant
- User
but how can a cloud function downloaded image path and is it necessary to download the file?
- Assistant
- User
which version of opencv4nodejs is used in this function
- Assistant
The code provided is compatible with OpenCV 4.x versions. It should work with both OpenCV 4.0 and higher versions.
When you install the
opencv4nodejspackage usingnpm install opencv4nodejs, it will automatically install the latest compatible version of OpenCV for your system. The package will download and build the appropriate version of OpenCV during the installation process.Please note that the
opencv4nodejspackage requires some system dependencies to be installed for successful compilation. These dependencies vary depending on your operating system. You can find the installation instructions for different operating systems in the officialopencv4nodejsdocumentation: https://github.com/justadudewhohacks/opencv4nodejs#how-to-install - User
Create a cloud function which is created when the a new document is created in a folder named ‘Access’. Now, the field named ‘picUrl’ is accessed where the image of a face is located. Now the cloud function must check for all the faces which are located in the field named ‘imageLink’ of all documents of collection named ‘DB’ and perform facial recognition to compare the their faces with the face found in field named ‘picUrl’ of document of a collection named ‘Access’ . and if the facial recognition is performed and the match if found with a specific document,then it must return the field named ‘Uid’ of the document of collection ‘DB’ and it must set the ‘status’ named field of the newly created document of collection named ‘Access’ to ‘found’ otherwise it must set it to ‘notFound’.Note: the cloud function must check all the documents of collection named ‘DB’ and stop when a match is found. 2. you must write entire code facial recognition. 3. you must use a precise and fast technique to process the images and facially recognize the project. 4.finally the cloud function must be called when the document is created in the collection named ‘Access’. write in python
- Assistant
Certainly! Here is an example of a cloud function written in Python that achieves the requirements you mentioned:
python