Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: read inverted datamatrix (improve #1071) #1214

Closed
wants to merge 3 commits into from

Conversation

RafaRuiz
Copy link

@RafaRuiz RafaRuiz commented Oct 11, 2024

Quoting petri-lipponen-movesense:

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.

And based on a old solution I had to do for an old client, sometimes codes could come either normal or inverted, so we had to scan both situations.

In my PR, which is almost exact as petri-lipponen-movesense's, I just modify the bool to add to invert the image into intervals.
This means that every image in the stream will change from inverted to normal.
In this case, we could either scan any of these two codes:

image

@navaronbracke
Copy link
Collaborator

I like the idea of using the invert interval, as it makes scanning both types of codes easier.

I'll try to give this a review when I find some time for it.
In the meantime can you try fixing up the conflict? Probably this PR was made off of the old PR, that wasn't updated to match the latest commit?

@RafaRuiz
Copy link
Author

I like the idea of using the invert interval, as it makes scanning both types of codes easier.

I'll try to give this a review when I find some time for it. In the meantime can you try fixing up the conflict? Probably this PR was made off of the old PR, that wasn't updated to match the latest commit?

I'm actually investigating this issue when inverting it. iOS is good but Android is buggy.
Will fix the conflicts though
#1071 (comment)

@RafaRuiz RafaRuiz closed this by deleting the head repository Oct 11, 2024
@RafaRuiz
Copy link
Author

@juliansteenbakker I didn't realise I forked an old version, as I forked @petri-lipponen-movesense's PR
So I decided to bring it down, fork it from master and enhance it. I was able to remove OpenCV's dependencies.

#1215

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants