-
-
Notifications
You must be signed in to change notification settings - Fork 525
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: Ability to scan both normal codes and inverted codes #1215
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, this looks okay, but I have feedback for the implementation.
Will you be looking into color inversion for the Vision API (for MacOS) as well?
android/src/main/kotlin/dev/steenbakker/mobile_scanner/MobileScanner.kt
Outdated
Show resolved
Hide resolved
ios/Classes/MobileScanner.swift
Outdated
|
||
func invertImage(image: UIImage) -> UIImage { | ||
let ciImage = CIImage(image: image) | ||
let filter = CIFilter(name: "CIColorInvert") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would not use a magic string here, you should be using https://developer.apple.com/documentation/coreimage/cifilter/3228292-colorinvert
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@navaronbracke can you give me a hand here?
I'm trying to make it API available, as I've seen there are a few statements for iOS 13 somewhere in the project, but despite setting my project deployment target to 15, I keep seeing this:
I've done just a little Swift in my life, it's been more Android
Co-authored-by: Navaron Bracke <[email protected]>
Co-authored-by: Navaron Bracke <[email protected]>
…canner.kt Co-authored-by: Navaron Bracke <[email protected]>
Co-authored-by: Navaron Bracke <[email protected]>
Started on #1214 to improve #1071 but with a few enhancements:
intervalInvertImage
instead of choosing whether to invert the image constantly or not. This way we can read both types, for example:Both types of codes (example)