1

I'm trying to count the blinks of a LED with the ESP32-CAM AI Thinker board. I need to count a LED that blinks once every 150ms. The code part works fine, but I'm experiencing some fps drops in some points, so I have some frozen frames and then the counting is wrong.

How can I have a smoother capture of the ESP32-CAM so that I don't lose any frames of the LED blinking?

1
  • 1
    Do you do on-board image processing or send frames somewhere else? How long does it take to process image on board? What resolution do you use? Also please embed your code into question so people would not play guessing games and do not lose the time on extra questions. Commented Feb 19, 2020 at 15:00

1 Answer 1

0

There are two approaches that I can think of:

1. Find the source of the issue

Why are these frames freezing? Is it the camera board itself, or is it something on the ESP32 itself? Perhaps there is some FreeRTOS task running on the ESP32 (e.g. BlueTooth or WiFi) which occasionally requires CPU and causes disp in performance.

Run idf.py menuconfig to check if:

  • your CPU is running at maximum speed
  • you have BlueTooth/WifiEnabled
  • ...

2. Extrapolate the missing data

With this approach, you'd first detect the frame drops, and measure the amount of frames dropped. It is only an approximation though:

When you then calculate the LED blink count, take the average measured blinks from the last second (or whichever timeframe that is suitable) and fill in the missing blinks with this this data.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.