My team and I are using the OpenMV Cam H7 for a school facial recognition project. We also are using the WiFi shield to send photos from a computer to the Cam. We are storing the photos in a connected SD card.
We have a few general questions because we are very new to using the camera and IDE.
Is there a way to turn off and on the camera, besides pulling out the battery? We would like our code to only run for a few hours in the day, and so we want the camera to be off (or possibly use the deep sleep function) in the other hours so that we don’t waste the battery. Is there any way to do this, besides pulling out the battery (we don’t want to do this for fear of cutting power in the middle of an operation/corrupting the camera)?
Is there a way to reset/refresh the camera in the middle of running a script without it stopping the script. We will be running a script which includes the snapshot_on_face_detection.py example code and we want to use the photos taken from that code in the face_recognition.py example code in the same script. However, we have been running into an issue where the camera will not recognize the snapshot until after we manually unplug and plug in the camera again to the IDE. When we are running this script on the camera on battery (while not connected to the IDE), is there are a way to refresh the camera so it can see those new photos in the SD card? We tried machine.reset but it did not resume the script after it reset.
We are also having a bit of trouble with the face_recognition.py example code. The Image module says it works on both PGM and JPG files. However, when we try running the program with JPG files, it gets an error on this line : image.Image(“snapshot1.jpg”).mask_ellipse()
We even tried a grayscale 4KB JPG image that we took with the Cam itself, but it did not work. We do not get an error when running the code with a PGM file. Is there any way to get this function to work with a JPG image, or will it only work with PGM images?