Jump to content
Brian Enos's Forums... Maku mozo!

Machine vision to sort by headstamp


Recommended Posts

I'd like to try and make something to do this.

 

I recall having seen a post somewhere where someone did this, but can't find it. I think they used a cognex camera, but I don't know where to start with the software.

 

I can do basic Arduino and Ras pi programming.

 

 

 

Sent from my Pixel 2 XL using Tapatalk

 

 

Link to comment
Share on other sites

  • Replies 236
  • Created
  • Last Reply

Top Posters In This Topic

Raspi and raspi camera with a servo driver or solenoid driver board (depending on how your mechanical design works.) Some python code... probably use opencv template matching or some such Google is your friend there.  

 

 

The harder part would be the mechanical design of the selector/gate mechanism and chutes to get the brass in N different buckets (assuming you wanted to sort  the brass in 1 pass instead of 2 or more.)

 

 

 

 

 

 

Edited by caspian guy
Link to comment
Share on other sites

It's one of those things that seems like it should be simple, but ends up being complicated. 

The leading visual inspection/sorter companies in the industry are Mectron and GI.  Both are fairly expensive machines even in their most basic form. 

 

If someone developed an affordable, effective, fast, visual sorting machine, they would have quite a few ammunition companies attention. 

Link to comment
Share on other sites

I know i've seen someone who has done this before , i was thinking maybe @jmorris but i might only be thinking him because he's done so much cool stuff around here.  

 

I'm sure anything i DIY will be slow, cumbersome and complex.  But sorting brass by headstamp is just soo tedious.  The issue is the range i buy brass from has started using federal NT... and with the different size flash hole it's basically a necessity.

Link to comment
Share on other sites

I've looked at youtube "sortinator" and they have a few videos - one is just on the software but they are not sharing since the machine they made is for sale at $3k - which I believe is nuts and I don't care for their mechanical design.

I've seen others that once recognized, the case could run down a short conveyor to be ejected or sidetracked like mail or packages at Amazon. 

Getting the software to activate servos upon recognition is all I'd like to see, the mechanics should be the easy part.

Link to comment
Share on other sites

Quote

The harder part would be the mechanical design of the selector/gate mechanism and chutes to get the brass in N different buckets (assuming you wanted to sort  the brass in 1 pass instead of 2 or more.)

 

Come up with the OCR, electronics/program to read the headstamp and output for a number of like headstamps (like A, B, C, D, E, F, G, everything else) and I’ll come up with the mechanical part that looks at every case and diverts it to where the others like it are.

Edited by jmorris
Link to comment
Share on other sites

  • 3 months later...
On 3/2/2018 at 8:25 PM, StratRider said:

I've looked at youtube "sortinator" and they have a few videos - one is just on the software but they are not sharing since the machine they made is for sale at $3k - which I believe is nuts and I don't care for their mechanical design.

I've seen others that once recognized, the case could run down a short conveyor to be ejected or sidetracked like mail or packages at Amazon. 

Getting the software to activate servos upon recognition is all I'd like to see, the mechanics should be the easy part.

The moving arm of the "sortinator" seems like it wastes too much time moving around. Something like this (top view) would reduce the amount of time spent per a case by having linear movement and using a series of trap doors to drop the case down into a tube chute that could be redirected to 5 gallon buckets.
sorter.png.632b61f3021e8bab03337a5aeb3cc176.png

Link to comment
Share on other sites

I would use the case feeder to orient and singulate the  cases.  Now that we have all the cases  in one orientation in a single file line, use a starwheel or roller to create uniform space between the cases.  After this, is your inspection camera followed by a series of air or mechanical 'blow offs' that push the cases off the conveyor and down a chute to a collection bin.

Link to comment
Share on other sites

I was thinking of something more like the decap/primer picket sorter I built.

 

 

 

Except instead of a probe, you have the camera to capture the image and instead of just an “L” or “s” bin have them drop into a device that can further divide them.  A number of different options exist for that part.

 

 

 

Link to comment
Share on other sites

  • 4 months later...
  • 2 weeks later...

Honestly I'm tempted to do this.

 

I am planning an open gun build and the prospect of sorting 9mm brass by headstamp is just nauseating.

 

I don't even care about speed (although I think I could get this operating pretty quickly). It's more about reliability.

 

Maybe I'll make a separate thread about how to DIY this.

Link to comment
Share on other sites

  • 3 months later...
On 11/13/2018 at 6:44 AM, StandardError said:

Honestly I'm tempted to do this.

 

I am planning an open gun build and the prospect of sorting 9mm brass by headstamp is just nauseating.

 

I don't even care about speed (although I think I could get this operating pretty quickly). It's more about reliability.

 

Maybe I'll make a separate thread about how to DIY this.

i searched, but did not find a follow up thread to this.  Has anyone carried the torch forward on this?

Link to comment
Share on other sites

On 2/21/2019 at 5:13 PM, StandardError said:

I'm ironically busy with my PhD projects (involving machine learning) and haven't had a chance to. Although I think the greater challenges are in the physical design rather than the computation.

Yes I completely agree.

Link to comment
Share on other sites

On 2/21/2019 at 5:13 PM, StandardError said:

I'm ironically busy with my PhD projects (involving machine learning) and haven't had a chance to. Although I think the greater challenges are in the physical design rather than the computation.

 

On 2/22/2019 at 5:14 PM, Laxman2809 said:

Yes I completely agree.

While interesting, that doesn't really help us dunderheads here at ground zero :)

Link to comment
Share on other sites

38 minutes ago, muncie21 said:

 

While interesting, that doesn't really help us dunderheads here at ground zero :)

 

Muncie, I promise I'll get to this.

 

But how much of a necessity is it? I only shoot 9 minor for USPSA so I have no clue. But my 3 gun friends tell me that they have to sort .223 by headstamp, sometimes. And I know the desire for 9 mm brass sorting isn't ubiquitous.

 

 

By your estimation, how much of an "issue" is efficiently sorting brass by headstamp?

Link to comment
Share on other sites

2 minutes ago, StandardError said:

By your estimation, how much of an "issue" is efficiently sorting brass by headstamp?

Personally, it's a non-issue for me, as I reload all cases (that meet spec) regardless of headstamp.

 

Now this particular thread was created to explore/define how to sort cases via headstamps.  While unnecessary for me, it is an interesting idea, considering my background is in industrial automation and controls.

 

It seems there are some competitors that wish to sort cases by headstamp, this thread is for them.

Link to comment
Share on other sites

Doesn't take too long to do a 5 gallon plastic bucket full !  Just put a bunch of little tubs around the 5 gallon one and get too it.  Hardest part is remembering which little tub which headstamp goes into.  Gets easier after you get started.

Link to comment
Share on other sites

On 2/24/2019 at 3:32 PM, StandardError said:

 

But how much of a necessity is it? I only shoot 9 minor for USPSA so I have no clue. But my 3 gun friends tell me that they have to sort .223 by headstamp, sometimes. And I know the desire for 9 mm brass sorting isn't ubiquitous.

By your estimation, how much of an "issue" is efficiently sorting brass by headstamp?

Well, necessity isn't really the issue here.  Some of us would like to do it for fun.  I sort my brass by headstamp and if there is an easier way - and really cool way - to do that, I'm all in.

When I do load workups, I always use the same headstamp just to eliminate another variable.  For matches, I do the same.  It's just one of those OCD things that makes me feel better.

I believe that you thought the mechanical part was the hard part, where others of us can deal with the mechanics - just not the OCR part.  It's nice when we can all work together.

Your input will be quite enlightening.  Thanks for helping with the challenge (when you get time of coarse) 😀

Link to comment
Share on other sites

On 2/21/2019 at 4:13 PM, StandardError said:

I'm ironically busy with my PhD projects (involving machine learning) and haven't had a chance to. Although I think the greater challenges are in the physical design rather than the computation.

 

Figure out the computation part and I’ll knock out the physical part.

 

I did get a little further on my sort by weight project but it’s still not much more than proof of concept at this point.

 

https://www.youtube.com/watch?v=1V_Hm3oqlO4

Link to comment
Share on other sites

Just now, AdamM said:

It's funny that this subject came up as I was thinking about this concept just the other day, but didn't knows this thread even existed. Although I thought that pattern recognition would be better than OCR.

 

My question about how 'necessary' it was is more driven by the fact that I'm going to start reloading 9 major and don't want to end up with a case head separation. But it also brings up the question of marketability and maybe why there haven't been more attempts at this?

 

Either way, there are some very good OCR packages out there right now which are very fast, but the issue is that they're pretty poor when it comes to reading text that is tilted, skewed, or rotated.

 

Which makes sense. OCR was designed to be highly accurate at reading pages fed through a copymachine-type image scanner which leads to some hardcoded assumptions about axes of text, etc.

 

The way that I'd approach this is through capturing the image of the case head and then running it through a trained neural network.

 

Like Adam mentioned, this is nothing more than fancy pattern recognition. Albeit very powerful. The main challenges I've foreseen, though, is consistent image quality, speed, and training.

 

In regards to image quality, this is probably an OK issue if you presuppose that the brass is cleaned before sorting and if the images are capture in a very high amount of light/magnification to help show important features.

 

For speed, this is a bigger deal. You could probably do this reasonably quickly (I'm saying 2-3 pieces of brass a second) if you ran any image classification off of a laptop. But once you try to bring it to smaller electronics (think Raspberry Pi) then you're running into memory and processor issues. Assuming you could get a neural network on the embedded processor, the speed might degrade significantly.

 

And training is another issue. Robustness of classification comes from a large sample size. I would probably want 100 - 1000 unique images of brass per headstamp. Maybe on the end closer to 100 if you can do sample augmentation by rotating them. And then training a network would be a process of semi trial and error but also be computationally expensive. 2-3 days minimum to 1 week + on a modern laptop, dedicated.

 

These are the ideas off the top of my head. There's probably more complication I'm not considering accurately.

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



×
×
  • Create New...