Inconsistent Behavior/Problems?

Discussion related to "under the hood" OpenMV topics.
vnova06
Posts: 6
Joined: Sat Jul 20, 2019 10:21 pm

Inconsistent Behavior/Problems?

Postby vnova06 » Sat Nov 02, 2019 2:39 pm

Hello,

We are a university group working on a capstone project using the OpenMV Cam H7 and Wifi Shield.
We have been experiencing problems that don't not seem to be originating with our code.
In our script we are creating TCP sockets as server to receive files from a client, and then we are using the example code snippets of snapshot on face detection and face recognition.
We have been using the OpenMV cam for about two months. Since early October, there has been issues with the computer and OpenMV IDE recognizing the camera when it is plugged in. When we plug in the camera, our Windows 10 computer tells us "There is problem with this drive. scan now and fix it." We have not scanned/fixed it in case that would mess anything up with the camera. However, this warning message has only showed up when we have the uSD card inserted. Is there a problem?

We were having problems in our facial detection/recognition code - we have a loop that includes the example code snippets of snapshot on face detection and face recognition - there are several iterations of the loop that occurs for about 3 minutes. However, we were having problems that the camera was randomly resetting in trying to save the snapshot to the SD card. We have just updated the firmware on the camera, as well as took out the SD card and reinserted it, which has seemed to solve this problem for now.

However, in running our code again, it seems that the snapshot_on_facial_detection code is not working Nearly as well as it used to. The camera is really struggling to detect a face, even though before, under the same conditions, it could easily and quickly detect a face. Did something change in the firmware update to have caused this?

Thanks.
User avatar
kwagyeman
Posts: 3448
Joined: Sun May 24, 2015 2:10 pm

Re: Inconsistent Behavior/Problems?

Postby kwagyeman » Sat Nov 02, 2019 3:36 pm

Hi, in regards to the SD card issue the something wrong with the SD card bit is because the mounted bit is not cleared when the camera is removed from the PC always. You can safely ignore that warning.

As for the firmware update, we adjusted the camera driver for the OV7725 to have better image quality and not be as washed out. I think the face detector depends on the image being more washed out however. Let me check this.
Nyamekye,
User avatar
kwagyeman
Posts: 3448
Joined: Sun May 24, 2015 2:10 pm

Re: Inconsistent Behavior/Problems?

Postby kwagyeman » Sat Nov 02, 2019 3:59 pm

Do this:

sensor.set_contrast(3)
sensor.set_gainceiling(16)

The sensor contrast default isn't high enough.
Nyamekye,
User avatar
iabdalkader
Posts: 1002
Joined: Sun May 24, 2015 3:53 pm

Re: Inconsistent Behavior/Problems?

Postby iabdalkader » Sat Nov 02, 2019 4:03 pm

The facedetector works best when there's more contrast in the image. Note I've made so many fixes to the WiFi driver in recent beta releases, and I've update the host driver to the latest (fixes more issues)..however note that if you use a firmware with an updated host driver, you'll need to update the WiFi module firmware as well. The WiFi module's firmware is included with the release files (the latest is 19.6.1.bin)
vnova06
Posts: 6
Joined: Sat Jul 20, 2019 10:21 pm

Re: Inconsistent Behavior/Problems?

Postby vnova06 » Thu Nov 07, 2019 3:46 pm

Ok, thank you. The fix for the face detection seems to have helped.
Additionally, how do we update the firmware for the Wifi Module? We have found the winc_19_6_1.bin file on your GitHub page, but we don't know what steps to take from there?
User avatar
iabdalkader
Posts: 1002
Joined: Sun May 24, 2015 3:53 pm

Re: Inconsistent Behavior/Problems?

Postby iabdalkader » Thu Nov 07, 2019 8:10 pm

Copy the firmware image to uSD and run this script: https://github.com/openmv/openmv/blob/m ... _update.py
vnova06
Posts: 6
Joined: Sat Jul 20, 2019 10:21 pm

Re: Inconsistent Behavior/Problems?

Postby vnova06 » Wed Nov 13, 2019 3:59 pm

Hello again,
We tried updating our firmware as you instructed but we are getting the following error: OSError: Failed to write the firmware!

The terminal shows the following:
Running in Firmware Upgrade mode...
Programming firmware image...
burn_firmware: write error!
OSError: Failed to write the firmware!

We are using the winc_19_6_1.bin file and we have an ATWINC1500-MR210PB.
User avatar
iabdalkader
Posts: 1002
Joined: Sun May 24, 2015 3:53 pm

Re: Inconsistent Behavior/Problems?

Postby iabdalkader » Wed Nov 13, 2019 4:22 pm

vnova06 wrote:
Wed Nov 13, 2019 3:59 pm
Hello again,
We tried updating our firmware as you instructed but we are getting the following error: OSError: Failed to write the firmware!

The terminal shows the following:
Running in Firmware Upgrade mode...
Programming firmware image...
burn_firmware: write error!
OSError: Failed to write the firmware!

We are using the winc_19_6_1.bin file and we have an ATWINC1500-MR210PB.
Please double check the pin connections and make sure they're all connected, also make sure the firmware image gets written completely to the SD card. You should Eject/unmount the SD card after copying the image, and only then reset the camera. If you're on Linux you could use diff to make sure the image is not corrupted after resetting the camera.
User avatar
iabdalkader
Posts: 1002
Joined: Sun May 24, 2015 3:53 pm

Re: Inconsistent Behavior/Problems?

Postby iabdalkader » Wed Nov 13, 2019 4:22 pm

vnova06 wrote:
Wed Nov 13, 2019 3:59 pm
Hello again,
We tried updating our firmware as you instructed but we are getting the following error: OSError: Failed to write the firmware!

The terminal shows the following:
Running in Firmware Upgrade mode...
Programming firmware image...
burn_firmware: write error!
OSError: Failed to write the firmware!

We are using the winc_19_6_1.bin file and we have an ATWINC1500-MR210PB.
Please double check the pin connections and make sure they're all connected, also make sure the firmware image gets written completely to the SD card. You should Eject/unmount the SD card after copying the image, and only then reset the camera. If you're on Linux you could use diff to make sure the image is not corrupted after resetting the camera.

Return to “Technical Discussion”

Who is online

Users browsing this forum: No registered users and 1 guest