jomjol / AI-on-the-edge-device

Easy to use device for connecting "old" measuring units (water, power, gas, ...) to the digital world
https://jomjol.github.io/AI-on-the-edge-device-docs/
6.05k stars 653 forks source link

Add selectable R/G/B channel for BW image #3183

Open zaskokus opened 3 months ago

zaskokus commented 3 months ago

The Feature

As the title says. For example my meter has only black and red digits on white background. Being able to use only red channel for BW image would greatly increase contrast of the picture, thus recognition quality - this is especially an issue for my analog wheel-arrow thingie.

caco3 commented 3 months ago

Did you try if you could use Gray Scale mode to work around this?

zaskokus commented 3 months ago

Yes, I am using gray scale already, and that's what I'm trying to suggest as an extension of it - a selectable channel(s) for gray scale.

caco3 commented 3 months ago

Not sure what CamSpecialEffect actually does, but maybe give it a try.

@SybexX FYI

zaskokus commented 3 months ago

Doesn't look like it changed anything at all. For reference I tied the same with an image editor and my red digits were much darker when using red channel for BW than all RGB for BW. The result is near identical to RGB based BW.

https://imgur.com/Cb20aJf yeah, with R-based BW the arrow for analog wheel is almost as black as the digits. IDK why it has such an issue with it..

SybexX commented 3 months ago

The special effects are handled by the OV2640 itself. I'm assuming that you have to retrain the models for the special effects.

OV2640.Camera.Module.Software.Application.Notes.pdf Camera.ov2640_ds1.8.pdf