How to achieve high-speed LED frequency detection (10s of kHz) with GENX320 on OpenMV H7 Plus?

Hi, kwagyeman,
I’m working with the GENX320 and the OpenMV H7 Plus board. On the GENX320 product page, it mentions that the camera can:

“Achieve high-speed LED frequency detection in the 10s of kHz with high tracking precision.”

(See attached screenshot for reference. Video link: https://www.youtube.com/watch?v=xB605mAoUpQ)

I would like to implement this high-speed LED frequency detection feature on my OpenMV H7 Plus setup. Specifically:

  1. Software/API
  • Which libraries or drivers do I need on the OpenMV side to interface with the GENX320?
  • Are there any Python scripts or example projects that demonstrate frequency detection?
  1. Camera Configuration
  • What firmware settings or camera parameters must be adjusted (e.g., sensitivity, timestamp resolution)?
  • How do I enable “parasite flicker filtering” to ensure robust detection?
  1. Data Processing
  • Does OpenMV provide any reference code for live frequency analysis?

Thanks in advance for your help!

Please see this example here: openmv/scripts/examples/01-Camera/03-Event-Cameras/02-Genx320/genx320_grayscale_led_tracking.py at master · openmv/openmv · GitHub

You just need to enable:

sensor.ioctl(sensor.IOCTL_GENX320_SET_BIASES, sensor.GENX320_BIASES_ACTIVE_MARKER)

Note that the example script just finds the active marker blobs. It does not perform frequency analysis. We are enabling event mode soon which will allow you to do this and Prophesee will provide an example of this.

1 Like

Thank you for pointing me to the example script—I’ll give it a try! I’m very excited to hear that you’ll be enabling event mode soon, which will make real‐time frequency analysis possible. Would you be able to share an approximate timeline for when event mode support might be released?

PR needs to be reviewed by Prophesee. Maybe 1.5 weeks.

Great to hear that you are interested in high-speed LED Frequency detection.
Indeed, you will need to wait a little bit for Event mode activation. Then, you will need to implement some frequency analysis based on events timestamps (as there is no such sample yet).

As mentioned by Kwabena, you will need to tune sensor biases. Bias tuning depends on your LEDs. you can tune each individual biases or start from a ready preset

sensor.ioctl(sensor.IOCTL_GENX320_SET_BIASES, sensor.GENX320_BIASES_ACTIVE_MARKER)

Not clear if you want to remove the flicker or see only the flicker(high frequency) ? You can actually tune the sensor to see only the range of frequencies using bias_hpf (defines from which frequency you can see) and bias_fo (defines up to which frequency you can see). Some more details on biases tuning are available here Biases — Metavision SDK Docs 5.1.1 documentation

There is also AFK (AntiFlicker filtering) where you can specify a range of frequencies to filter but it is less performant comparing to bias settings (less advantageous for the sensor readout).

# Enables AFK filter to remove periodic data in the frequency range from 130Hz to 160Hz
sensor.ioctl(sensor.IOCTL_GENX320_SET_AFK, 1, 130, 160)

Thank you, Natalia!

My goal is to see the LEDs’ flicker and then analyze it to determine their flicker frequency.

I understand that this will only be possible once the GENX320 supports event mode, so I’ll be waiting for that day to arrive.

It’s coming soon!

Hi, kwagyeman,
Thanks for all your work on the GEMX320 support! I’m just wondering if there’s any update on the event mode feature.

On May 22 in the “GENX320 in event mode” thread, you mentioned:

“we’ve come to a spec agreement with Prophesee, I will start work on it later next month.”

Then 13 days ago, you said:

“PR needs to be reviewed by Prophesee. Maybe 1.5 weeks.”

Since 1.5 weeks have now passed, I just wanted to follow up in case there’s any update.

I’ve been really looking forward to seeing this feature implemented—thanks again!

The PR is finished and waiting on a review from Prophesee. They gave some feedback about an issue with the Anti Flicker not working as expected.

Kinda want them to approve things before merging. The feature is otherwise optional with examples. I can post the firmware to run it and link to the examples.

Hi @kwagyeman,
Thanks a lot for your reply!

I’m using the OpenMV H7 Plus, and I’d really appreciate it if you could share the current firmware and examples. Even if it’s still pending final approval, I’d be happy to try it out and provide feedback if needed.

Thanks again for all your hard work on this.

firmware.zip (1.1 MB)

H7 Plus firmware attached. Load the firmware.bin via Tools->Load Custom Firmware

Examples are here: drivers/sensors: Add RAW event output mode for the genx320. by kwagyeman · Pull Request #2747 · openmv/openmv · GitHub

1 Like

This seems insane. Must buy this module! We live in the future, my gosh .

2 Likes

Yeah, the OpenMV GENX320 event camera module is definitely worth buying! I feel like it’s already priced more affordably compared to similar offerings from other vendors.
Plus, if you run into any issues, posting on the forum usually gets you a quick and helpful response.

3 Likes

Hi, I have configured the GENX320 event camera to work in Event mode, and by adding the following two lines of code I was able to make the camera detect only flickering LEDs:

    csi0.ioctl(csi.IOCTL_GENX320_SET_BIASES, csi.GENX320_BIASES_ACTIVE_MARKER)
    csi0.ioctl(csi.IOCTL_GENX320_SET_AFK, 1, 50, 160)

As Natalia mentioned:

You can actually tune the sensor to see only the range of frequencies using bias_hpf (defines from which frequency you can see) and bias_fo (defines up to which frequency you can see).

This is also documented in Biases — Metavision SDK Docs 5.1.1.


I would like to adjust individual bias parameters—bias_diff_on, bias_diff_off, bias_fo, bias_hpf, or bias_refr—to better match my LED’s flicker characteristics.

In OpenMV, how do I tweak one bias register at a time? Is there an ioctl call that lets me set just a single bias?

See the docs:

E.g. csi0.ioctl(csi.IOCTL_GENX320_SET_BIAS, csi.GENX320_BIAS_FO, number)

1 Like

Hi,
The previous “firmware.bin” doesn’t seem to be able to run GENX320 latest script directly, where should I download the latest “firmware.bin” to be able to run GENX320 recent python script directly.

Hi, just do: Tools→Install Latest Dev Release from the IDE!