Open dgoldman-pdx opened 9 years ago
The library captures an image before it recognizes the corners.
@biksappdev Interesting. How can you tell that this is happening?
@dgoldman-ebay, The card is being captured almost immediately it is brought before the camera..it doesn;t wait to recognize the corners (as in the above picture).
Thats exactly what I am trying to resolve here.
@biksappdev can you try experimenting with a card that is entirely a single color near its edges?
For your card above, the boundary between the interior white section of the card and the lower green boundary is probably triggering card.io's edge detector, and so it thinks that it has indeed located all four edges of the card.
(card.io looks for the four card edges, not the corners.)
See also https://github.com/card-io/card.io-iOS-source/issues/22. Maybe you two can work on this together?
Hi Guys, I need your help, I used card.io library for scan credit/debit cards, its working fine. but i could not captured non-payment cards like iTunes, Dirving license cards in iOS. Where should i change/adjust the code. @dgoldman-ebay @biksappdev
@vendeesh if you want to scan non-credit-cards with card.io, you can't right now. It's just for credit cards. Adding support for other kinds of cards is non-trivial.
card.io will, however, let you find any kind of card and grab an image of it. To do that, please start by looking at the public header files and at least trying to figure this out yourself. @dgoldman-ebay and I have limited bandwidth; the more precise a question you can ask, the better answer you will get.
Thanks Guys. i will try to do that, and let me inform.
@vendeesh, Did you figure out the right way to get clear and focussed images for non-payment cards using Card IO ?
@dgoldman-ebay , do you have any bandwidth to assist me in working on this issue ? I am still trying to find a nice clean way to get better focussed images for non-payment cards using Card IO. Any help is greatly appreciated.
@biksappdev did you try finding the place in the code where the focus score is calculated and used? That'd be a natural place to start experimenting.
@josharian , I would do that, another question that I would have to ask, Is there any way to add a manual image capture button on the Card IO view( probably to this : @property(nonatomic, retain, readwrite) UIView *scanOverlayView;) ? So instead of automatic card capturing, one can snap an image when the edges are focused. Appreciate the help.
Yes, that is possible, although I don't think it will be a good user experience. It's definitely not something we will add to the main repo.
To be perfectly honest, given your needs and inclinations, I'm not sure that using card.io makes that much sense. You might be better off just asking the user to take a photo and then implementing something yourself using the same overall approach as card.io (canny, hough, etc.). You're more than welcome to take any code you like from the card.io code base and adapt it to your needs, without consuming card.io wholesale, for the low low price of an acknowledgment.
In any case, card.io is intentionally focused on a single use case, and the further your needs diverge from that use case: (1) the lower the probability any changes could be contributed back, (2) the less investment the card.io maintainers will make in your desired code changes, (3) the less helpful card.io as it stands will be for you, and (4) the more card.io will be dead weight and binary bloat.
@josharian , I am not facing any issues with Payment cards scanning, its just focussing issues while scanning other cards ( like Gift Cards, DL, Shopping cards etc.). So only need to find a way to adjust the focus better and be able to detect the edges cleanly just like it does for payment cards.
@josharian I am also looking to use card.io for more than one reason, 1. to scan a payment card and another to use it get edge detection on Government ID cards. I have some code that uses (Canny and HoughlinesP) currently built to run at Rails server and might need MUCH more optimization to faithfully work on most cases. I was trying to build it as a static image scan but our requirement might take a turn to run it on previews and I want to use card.io if possible. Is it possible to find the code that can help me with edge detection atleast. I don't know if full code is available to peek into or not. I am fairly new to look at card.io SDK.
The card edge detection and image capture (your second use case) is already
an option actually. See the detectionMode
property on
CardIOViewController
.
On Thu, Jul 30, 2015 at 4:47 AM Sudhanshu Saxena notifications@github.com
wrote:
@josharian https://github.com/josharian I am also looking to use card.io for more than one reason, 1. to scan a payment card and another to use it get edge detection on Government ID cards. I have some code that uses (Canny and HoughlinesP) currently built to run at Rails server and might need MUCH more optimization to faithfully work on most cases. I was trying to build it as a static image scan but our requirement might take a turn to run it on previews and I want to use card.io if possible. Is it possible to find the code that can help me with edge detection atleast. I don't know if full code is available to peek into or not. I am fairly new to look at card.io SDK.
— Reply to this email directly or view it on GitHub https://github.com/card-io/card.io-iOS-source/issues/21#issuecomment-126286107 .
@burnto Thanks a lot, I will start with that. I guess it should work because edge detection I saw is independent of card details. I will update here if I get it working. Thanks again.
@burnto I see one issue which I believe is also related to focus, when I try to run my feature detector camera captured image it works way better with tesseract OCR.
@biksappdev I have same question, do you resolve the question?!~
Is there anyone can use the card.io library for scan Non-payment cards?
@mengmanzbh 你实现了使用card.io library 识别储蓄卡没?求指教
[Issue moved here from card.io-iOS-SDK] [Issue actually created by @biksappdev]
Hi @dgoldman-ebay , I have been trying to get this going with little luck. So I tried calling the autoFocusOnce as below -
Also, // if (!self.currentlyAdjustingFocus && frame.focusSucks && [self hasAutofocus]) { NSTimeInterval now = [[NSDate date] timeIntervalSince1970]; // if (now - self.lastAutoFocusOnceTime > kMinTimeIntervalForAutoFocusOnce) { self.lastAutoFocusOnceTime = now; CardIOLog(@"Auto-triggered focusing"); [self autofocusOnce]; [self performSelector:@selector(resumeContinuousAutofocusing) withObject:nil afterDelay:0.1f]; didAutoFocus = YES; // } // }
Removed the condition for triggering autoFocusOnce method while capturing a picture, however I am not able to get a clear shot every time. The library captures an image before it recognizes the corners. Kindly put me in the right direction to resolve this. I am looking forward to get the same behavior as it is for payment cards.