Max Resolution for Nicla Vision and QR Reading

I need to read a QR code at a distance (that hopefully isn’t too far away) and I want to use the largest resolution I can to try and increase readability.

I’m wondering if there is a hard maximum limit to the resolution for the algorithm, or if there is a way I can get around running out of framebuffer. Perhaps by significantly dropping the FPS, or otherwise trying to process one image at a time.

Hi, there’s no way to handle a super large resolution with the algorithm. You’re limited by the frame buffer.

(If the algorithm could work on a binarized image then that would change things… but, it won’t).

Anyway, the max resolution is 320x240 I think in grayscale.

That said, the Nicla has a really high resolution camera that we down sample (inside of the camera itself). So, it kinda has a pretty strong zoom affect which flattens the image (no curves because of the lens) and gives you more distance.

Possibly a dumb question, does windowing a higher resolution image help with anything, or does it still ingest the whole picture but only applies the algorithm to the windowed area?

Actually, that will give you a zoom effect and flatten the image more. So, it’s actually very usefully.

You can also adjust the windowing in the fly such that you can move around in the larger resolution image.

Note, on the Nicla camera the ioctl readout window feature doesn’t work. I implemented the code but the camera chip does not like you adjusting the readout window from the camera sensor array. You cannot use this feature.

However, set windowing works by cropping whatever the camera sends and the code for that is rock solid.

1 Like

Is there a formula or anything for windowing that I need to follow? I keep running into “Runtime Error: Frame size is not supported or not set” unless I just so happen to guess correctly.

Like going to SVGA won’t let me window 240 x 240 though it works on VGA, and SVGA runs fine on the Nicla otherwise.

You are probably hitting this:

Since everything is DMA accelerated the image being grabbed has to meet alot of rules.

The issue is the line width. We only have 3Kb reserved. So, double buffering requires 3200 bytes which is more than 3*1024. So, it can’t support that resolution.

However, if you re-build the firmware with the line width increased then you can.

Fork the repo, then enable github actions, then increase this value: openmv/src/omv/boards/ARDUINO_NICLA_VISION/omv_boardconfig.h at master · openmv/openmv · GitHub

Github should then automatically build the firmware for you.