mobile_scanner icon indicating copy to clipboard operation
mobile_scanner copied to clipboard

feat: read inverted datamatrix

Open petri-lipponen-movesense opened this issue 1 year ago • 4 comments

Here's a quick stab at adding support for reading inverted data matrixes that the MLKit does not support. The iOS implementation is a bit clumsy (I'm not an iOS coder), but Android one is quite straight forward. Tested and works in Android & iOS. Feel free to modify, include or leave be as you will.

Future idea: add "tryInverted" which duplicates each frame and tries normal and inverted both.

Interesting. Did you manage to do some performance profiling on this? Inverting each frame might be expensive to do (I think). A bit sad we have to pull in opencv for this to work

navaronbracke avatar May 21 '24 13:05 navaronbracke

Interesting. Did you manage to do some performance profiling on this? Inverting each frame might be expensive to do (I think). A bit sad we have to pull in opencv for this to work

No I didn't. We need it so short time, that it really makes no difference, and it didn't feel slow on phones tested. I agree, it really is a bummer that the opencv is needed. There has to be better way to do it on both systems, but I just needed something that works with minimum effort and those came up on stackoverflow 😁 .

I remember doing this for a client of mine, on a native solution, I had to use opencv too.

RafaRuiz avatar Oct 11 '24 16:10 RafaRuiz

After creating #1214 to enhance your PR, on Android I've seen that the inverted image is shrink, I'm working on fixing it on my branch and I will create a PR on yours as well @petri-lipponen-movesense image

RafaRuiz avatar Oct 11 '24 19:10 RafaRuiz

Thank you for your work, and my apologies for my late reply. I think we will be going forward with #1215 due to no external package being necessary there.

juliansteenbakker avatar Jan 12 '25 14:01 juliansteenbakker