frafrichile
Posts: 42
Joined: Wed Mar 05, 2014 3:11 pm

Pig counter

Wed Jun 24, 2015 8:22 pm

Hi everyone . I started my new job at a pig factory.
I noticed the people look at the security cameras and count the pigs manually. ! boring !!
so I thought to myself.

What could I put together to count these pigs. Any ideas? any sensors ?

Thank you guys !

scotty101
Posts: 3648
Joined: Fri Jun 08, 2012 6:03 pm

Re: Pig counter

Thu Jun 25, 2015 12:24 pm

A revolving gate that only allows one pig through at once and a sensor like a microswitch to detect when the gate is opened and closed.
Electronic and Computer Engineer
Pi Interests: Home Automation, IOT, Python and Tkinter

frafrichile
Posts: 42
Joined: Wed Mar 05, 2014 3:11 pm

Re: Pig counter

Thu Jun 25, 2015 12:54 pm

scotty101 wrote:A revolving gate that only allows one pig through at once and a sensor like a microswitch to detect when the gate is opened and closed.
what type of microswitch are you thinking?

Also are you familiar with PIR sensors ??

ame
Posts: 3172
Joined: Sat Aug 18, 2012 1:21 am
Location: Korea

Re: Pig counter

Thu Jun 25, 2015 1:02 pm

frafrichile wrote:
scotty101 wrote:A revolving gate that only allows one pig through at once and a sensor like a microswitch to detect when the gate is opened and closed.
what type of microswitch are you thinking?

Also are you familiar with PIR sensors ??
Any microswitch will do.

PIR sensors are probably no good as they will not discriminate between a single pig and a group of pigs.

You could try OpenCV and see if you could train it to look for pig-shaped objects.

frafrichile
Posts: 42
Joined: Wed Mar 05, 2014 3:11 pm

Re: Pig counter

Thu Jun 25, 2015 3:50 pm

ame wrote:
frafrichile wrote:
scotty101 wrote:A revolving gate that only allows one pig through at once and a sensor like a microswitch to detect when the gate is opened and closed.
what type of microswitch are you thinking?

Also are you familiar with PIR sensors ??
Any microswitch will do.

PIR sensors are probably no good as they will not discriminate between a single pig and a group of pigs.

You could try OpenCV and see if you could train it to look for pig-shaped objects.
OpenCV looks very promising but also a lot of work.

the gate/hall is usually pretty narrow allowing 1 or 2 to get through at a time.

Wonder how hard is to set up OpenCV or if it can be applied on a livestream feed

scotty101
Posts: 3648
Joined: Fri Jun 08, 2012 6:03 pm

Re: Pig counter

Thu Jun 25, 2015 3:53 pm

KISS - Keep it Simple Stupid.

Why create a complex image recognition system to detect pigs when a switch and simple counter program will do?
Electronic and Computer Engineer
Pi Interests: Home Automation, IOT, Python and Tkinter

Return to “Automation, sensing and robotics”