Jump to content

Dealing with blocks of pixels in check images


Recommended Posts

How do I map out a rectangular area of pixels in an image and be able to reference that rectangle of pixels in a pixel search across the entire image, looking for an exact match.

The idea behind it is to search for duplicates with the same bank routing information so that we don't accidentally process multiples of the same check. All checks are in TIFF image format.

Spoiler

“Hello, ladies, look at your man, now back to me, now back at your man, now back to me. Sadly, he isn’t me, but if he stopped using ladies scented body wash and switched to Old Spice, he could smell like he’s me. Look down, back up, where are you? You’re on a boat with the man your man could smell like. What’s in your hand, back at me. I have it, it’s an oyster with two tickets to that thing you love. Look again, the tickets are now diamonds. Anything is possible when your man smells like Old Spice and not a lady. I’m on a horse.”

 

Link to comment
Share on other sites

Maybe look into OCR, first? Usually kind of sketchy, though.

Some of the images aren't very high quality, so OCR has the potential to fail and misread. We use OCR on these checks currently for data entry purposes, however the OCR engine that reads it has a calculation method when it comes to characters that have a read accuracy of 50% or lower that seems a bit random. We've received different outputs for the same check image before, so it's not uncommon to us.

Spoiler

“Hello, ladies, look at your man, now back to me, now back at your man, now back to me. Sadly, he isn’t me, but if he stopped using ladies scented body wash and switched to Old Spice, he could smell like he’s me. Look down, back up, where are you? You’re on a boat with the man your man could smell like. What’s in your hand, back at me. I have it, it’s an oyster with two tickets to that thing you love. Look again, the tickets are now diamonds. Anything is possible when your man smells like Old Spice and not a lady. I’m on a horse.”

 

Link to comment
Share on other sites

What I would do is read each pixel for your test value and put the values in an array. I would then read the section in the image your scanning and put that in a second array. I would then compare the arrays. You would need to put in some error checking due to the image not being exactly centered for each check. Also you may have to allow for shades of black

Edited by scullion
Link to comment
Share on other sites

I've automated reading a playing-card's suit/value, where I know where to start looking for the cards' suit/value, and then do a pixel search where I'm 100 percent certain that it will return true for a specific suit/value (a combo of 3 known spots to pos identify)...if you narrow down the search to only the routing number (general location), you can potentially do something similar....just need to dynamically find the begin point of each number, and then base logic around pixel searches from that point.

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...