Inline FabricationTitan ReloadingGraf & SonsMidSouth Shooters Supply
StainLess Steel MediaRotoMetals2Lee PrecisionADvertise here

Results 1 to 20 of 20

Thread: Anyone here knowledgeable in OCR scanning/sorting?

  1. #1
    Boolit Master jmorris's Avatar
    Join Date
    Aug 2007
    Posts
    4,145

    Anyone here knowledgeable in OCR scanning/sorting?

    Title says it all. Thinking about a headstamp sorting machine and can do the mechanical side, just need to learn the optical scanner/output part.

  2. #2
    Vendor Sponsor D Crockett's Avatar
    Join Date
    Feb 2010
    Posts
    760
    just wondering why you would want to do that. I have worked in a reloading shop for a while we never did anything like that. I have separated countless cases to work certain cal's but never by head stamp. D Crockett

  3. #3
    Boolit Master
    Join Date
    Aug 2011
    Location
    Bryan, TX
    Posts
    275
    That sir, is a capital idea. At a former job we separated pieces of bentonite that had rust on them by using cameras to identify and air to push the rejects off the conveyor. For brass if you could have them go by the camera one at a time then have a divertor dump them in the correct pile. Lets say you had five places to divert to. You could sort for four different headstamps then the rest go to bin 5. The rough parts will be like Lake City. Somtimes it's LC and a two digit date some times its letters and numbers at 12, 3, 6 and 9. Another fun one would be IMI brass which to an OCR could be IWI. In my current job we us a product that read license plates using OCR and are in the high 90's on accuracy. But most license plates are standardized (most) and they are not usually on their side or upside down. If someone has an LP in a goofy place or it's hanging, all bets are off. You'd have these problems with headstamps since they are round. I'll have to think on it some. There's got to be a way. I don't know if OCR or comparing images would work better. Either way you may have to take a picture, OCR, rotate the picture, OCR it, rotate the picture, ...

    There are several Raspberry Pi programs for reading LPs. I've never looked for reading other things, but maybe someones already invented the wheel.

    What type of camera are you going to use?

  4. #4
    Boolit Master
    Join Date
    Apr 2016
    Location
    NC
    Posts
    550
    All I have to add is the suggestion that for proof of concept you try to sort just one specific headstamp out of the pile.

    Other thought is to use image recognition vs OCR, seems that you could either rotate the pic in small increments or build the image database with rotated images.

    Final is to save images of all unsorted and maybe run a count for each unsorted headstamp. Actually just counting the headstamps would be an interesting proof of concept.

  5. #5
    Boolit Master Mauser 98K's Avatar
    Join Date
    Aug 2017
    Posts
    246
    funny story. true story about mismatched brass.. the cast lead .308 rounds i use are mismatched brass with about 4 or 5 different brands. there is also a lot of converted 30-06, 7mm-08, .243win, 8mm, .270 brass in the bunch. you know i can still cover the group with my thumb and cut match sticks at 50m even when intentionally using different brands and converted brass. the saying that mismatched brass matters is mostly a myth, unless you are bumping max power loads. i have never sorted my brass for cast and have never had any problems with accuracy.. im am also doing this with a Lee dipper set scraped level with a card using Unique pistol powder that is over 20yr old and with a reloading press i pulled out of a scrap pile and had to rebuild. the cast are 156gr 8mm resized to .310. there is no reason in my opinion to get so obsessive that you start to weigh each charge, cc the cases, make sure each case is exactly the same weight and brand, make sure each bullet is within .01gr, etc. you can make this stuff as simple or as complicated as you want.

  6. #6
    Boolit Man 55fairlane's Avatar
    Join Date
    Oct 2017
    Location
    Ft Wayne Indiana
    Posts
    100
    I shoot CMP matches and NRA matches, my competition loads are all same headstamp ( mostly for consistency, i.e. case volume, brass thickness & the like), I don't know if it helps my game, but real good shooters swear it is a must.....

  7. #7
    Boolit Master redhawk0's Avatar
    Join Date
    Apr 2016
    Location
    North East, USA
    Posts
    168
    I think you would do better with Image Recognition than with OCR. Image Recognition would provide you more options with rotation of the image and matching it with known headstamps, than trying to determine individual characters with OCR. As stated above, military brass might give you the most trouble since it varies so much even from the same "city" producing it. Image Recognition would just require a basic database of images for a setup as opposed to recognizing individual letters/numbers and then combinations of such. Sorting will likely be faster in the long run.

    my 2 cents.

    redhawk

    The only stupid question...is the unasked one.


    Not all who wander....are lost.

  8. #8
    Boolit Master



    WebMonkey's Avatar
    Join Date
    Nov 2012
    Location
    missouri ozarks
    Posts
    397
    yes, ocr is designed to take an uneditable type and make editable type.
    image rec is usually for taking action against an identity.

    good luck, sounds fun
    WebMonkey
    Retired 19D
    Psalm 91:9
    Honda 919

  9. #9
    Boolit Master KMac's Avatar
    Join Date
    Oct 2013
    Location
    Texas
    Posts
    201
    Quote Originally Posted by jmorris View Post
    Title says it all. Thinking about a headstamp sorting machine and can do the mechanical side, just need to learn the optical scanner/output part.
    I have some knowledge. Installed Document Management Systems that used OCR to read certain zones and index the document based on that. What are your questions?

  10. #10
    Boolit Master
    Join Date
    Mar 2010
    Location
    NC Arkansas
    Posts
    374
    The problem with OCR is that you would have to orient the headstamps so they could be read. By the time you did that, you could be looking at the next headstamp. Image recognition is the way to go.

  11. #11
    Boolit Master jmorris's Avatar
    Join Date
    Aug 2007
    Posts
    4,145
    Quote Originally Posted by redhawk0 View Post
    I think you would do better with Image Recognition than with OCR. Image Recognition would provide you more options with rotation of the image and matching it with known headstamps, than trying to determine individual characters with OCR.
    Alright, what direction can you point me in, for that?

    Looking for something that can identify differences like this.

    https://www.youtube.com/watch?v=wIKj6fmhJbw

    That I can build the mechanical end so it’s not as limited as this.

    https://www.youtube.com/watch?v=HSD401D5dQ0

  12. #12
    Boolit Master
    DCM's Avatar
    Join Date
    Dec 2010
    Location
    Upper midwest
    Posts
    1,567
    Looks like image recognition controlling servos basically.
    Certainly interested in this after sorting head-stamps recently, not $3,000 interested though.
    "Don't worry what they think. In the end it is not between them and you, it is between you and God."

    Je suis Charlie!


    "You won't know until you Actually try it"

    "The impossible just takes longer."

    "Don't let them beat you down with their inexperience."

    "You'll never accomplish what you don't try. " - Moldmaker

  13. #13
    Boolit Master jmorris's Avatar
    Join Date
    Aug 2007
    Posts
    4,145
    Looks like image recognition controlling servos basically.
    I am interested in knowing how to go from an image of something to a specific output. Is this an “off the shelf” software?

    Something like this.



    But instead of saying phone/car, apply a different output for each, like a grounding output/5 VDC.

    I think the answer is in the title of the video C# emguCV. Unfortunately the last programming language I learned was Fortran or Pascal, so I need to learn something new. Looking to be pointed in the right direction.
    Last edited by jmorris; 04-21-2018 at 08:53 AM.

  14. #14
    Boolit Master popper's Avatar
    Join Date
    Jun 2011
    Posts
    7,405
    You want software that recognizes 'data points' not an actual image. Like a finger print verifier. No rotation needed.
    Whatever!

  15. #15
    Boolit Master gsdelong's Avatar
    Join Date
    Sep 2010
    Location
    Southern Indiana
    Posts
    325
    https://stackoverflow.com/questions/...or-ocr-program

    This is question about reading info on a circular bearing, you may get some hints here.

  16. #16
    Boolit Master
    DCM's Avatar
    Join Date
    Dec 2010
    Location
    Upper midwest
    Posts
    1,567
    Does anyone have a link to folks that sell the recognition software needed to do this?
    "Don't worry what they think. In the end it is not between them and you, it is between you and God."

    Je suis Charlie!


    "You won't know until you Actually try it"

    "The impossible just takes longer."

    "Don't let them beat you down with their inexperience."

    "You'll never accomplish what you don't try. " - Moldmaker

  17. #17
    Boolit Master
    Join Date
    Oct 2013
    Location
    Brisbane, Australia
    Posts
    921
    Very interesting. I like the idea of pattern recognition, even more so if you could get it to learn from sample known brass you want sorting out. Say you can get it to recognize the rim and not the primer, as this will have a different strike mark on each gun.

    I know people have questioned why bother, but i know people that will sort by brands so they know they are consistent.

    My brother is a programmer, i'll run this idea past him and see if he knows where to start looking for software like this.

  18. #18
    Boolit Master
    Join Date
    Jul 2013
    Location
    The Pacific NorthWet
    Posts
    705
    An odd idea here - Holograms can be used to act as a reverse image detector, I keep meaning to play with that but not gotten to it; Not sure how a small hologram of an R-P headstamp vs. a Federal headstamp would trigger in reaction to one or the other of those cases. (Told you get a red dot glowing where they are "recognized")

    Other than that, if you use a scanning setup that scans "around" the head, that would make the most sense as then you would just shift the rasterization a number of pixels to get to some starting point to do the comparison; Definitely an interesting project, but again a child can do this sorting easily & computers have a tough time of it. (AI isn't all that bright yet...) It'd be handy to have a machine doing this, have to handle different colored primers, decapped cases, lots of coding to do for this

  19. #19
    Boolit Master
    Traffer's Avatar
    Join Date
    Feb 2016
    Location
    Central Wisconisn
    Posts
    1,122
    Quote Originally Posted by redhawk0 View Post
    I think you would do better with Image Recognition than with OCR. Image Recognition would provide you more options with rotation of the image and matching it with known headstamps, than trying to determine individual characters with OCR. As stated above, military brass might give you the most trouble since it varies so much even from the same "city" producing it. Image Recognition would just require a basic database of images for a setup as opposed to recognizing individual letters/numbers and then combinations of such. Sorting will likely be faster in the long run.

    my 2 cents.

    redhawk
    I agree with redhawk. OCR would be very cumbersome in that situation. I believe it would be much more efficient to just take pictures of headstamps and use an image comparing program.
    AKA hans.pcguy

  20. #20
    Boolit Bub
    Join Date
    Feb 2018
    Location
    Alabama
    Posts
    23
    I've done my fair share of image/radar processing and the concept is the same, you'll have a two dimensional array of data points (unless you go with a 3D scanner) and you'll run some form of edge detection to find the region you're interested in.

    I would start with a MATLAB/Octave implementation on a regular computer and I bet you can see how well it will work with a few hours of tinkering. My gut feel is that the camera system is going to be the weak link on getting images that are fairly normalized for the computer, but maybe some good lighting could fix that?

    I might be able to help if you have specific questions, feel free to PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Abbreviations used in Reloading

BP Bronze Point IMR Improved Military Rifle PTD Pointed
BR Bench Rest M Magnum RN Round Nose
BT Boat Tail PL Power-Lokt SP Soft Point
C Compressed Charge PR Primer SPCL Soft Point "Core-Lokt"
HP Hollow Point PSPCL Pointed Soft Point "Core Lokt" C.O.L. Cartridge Overall Length
PSP Pointed Soft Point Spz Spitzer Point SBT Spitzer Boat Tail
LRN Lead Round Nose LWC Lead Wad Cutter LSWC Lead Semi Wad Cutter
GC Gas Check