LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Counting a stack of card.

Hii all,

 

Greetings of the day!!!

 

I have a stack of cards and I want to count it using my basler camera. I'm new in the  field of vision inspection system. Any  suggestions in this field would be helpful for me.

regards

Suraj

0 Kudos
Message 1 of 15
(3,047 Views)

A stack of cards has 52 cards+ 2 Jokers. No need for Vision!

 

Just kidding. Sounds like fun.

 

What are the conditions? Can you pick the background? The lightning? The scaling\distance? Should it work for any deck of cards or just one? Is this BW or color? Should it work for the fronts, the backs or both (or mixed)? Can the cards overlap (that could make it near impossible to detect)?

 

You'd probably want some contour detecting, and then some analyzing of these contours. Of course after proper conditioning of the image, probably at least (local) thresholding. It's a lot like marker detecting in OpenCV.

 

If you have images, posting them might help.

Message 2 of 15
(3,027 Views)

Thanks for answer, however these are company visiting cards, not playing cards and they are some 500 in numbers. I want to count them using Basler camera. 

Any help in this matter will be helpful. I have attached the image in the message.

0 Kudos
Message 3 of 15
(2,954 Views)

I would require immediate help in this matter. Kindly find any options for the same.

0 Kudos
Message 4 of 15
(2,948 Views)

Hello Suraj

 

The image you attached doesn't seem realistic (not taken in Basler Camera). Basic solution could be to place the camera to view the stack side on. Measure the length of the stack and based on the thickness of the card (measure it- GSM of the card could help), we can get the total number of cards.

 

-Rahul

Hit KUDOS for Thanks

Message 5 of 15
(2,935 Views)

The thing is, this might not be feasible.

 

Vision is tricky, and often needs a lot of creativity.

 

Is counting the cards the goal, or is using vision a requirement? I'd say simply weighting the cards should work pretty good.

 

Using vision, again there are tons of questions. Most of the questions from my earlier post still apply.

 

Intuitivelly, I feel you'd get a good estimate at best if the cards are stacked and counted based on the height of the stack. But again, the trick is to cheat (be creative) to the extend of what's exeptable. And we don't know what is.

 

Message 6 of 15
(2,918 Views)

I've done a 'measure length by vision'-program once, but it's at best a decent estimate (which in this case was good enough since it replaced manual measuring against a template).

For a more correct value the suggestion to weigh is a lot better.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 7 of 15
(2,900 Views)

I guess one could build a system (camera\lens\lightning) in a way the actual transitions between the cards are visible. It would require a high resolution, specific lenses, and that might limit the maximum nr. of cards.

 

With a setup like that, the software would be fairly easy.

 

To suggest a software algorithm\method, we'd need at least a few images of any\all the situations that are to be supported. So with a rigid setup (fixed lightning, distance, angles, etc.), we'd 'only' need a few images of: different number of cards, different colors, different thickness, and so on. That might mean a few hundred to several thousand images.

0 Kudos
Message 8 of 15
(2,879 Views)

Hii

I have attached the card images that I have taken from basler camera. Can you suggest how to count the exact number of cards using Vision development module in LabVIEW ? I would also be comfortable with python. 

Download All
0 Kudos
Message 9 of 15
(2,801 Views)

1st image contains 26 cards

2nd image contains 28 cards

3rd image contains 30 cards

 

Any Help on how to proceed.

Download All
0 Kudos
Message 10 of 15
(2,797 Views)