# How we wrote chicken egg counter on a Raspberry PI

DevFeed: [How we wrote chicken egg counter on a Raspberry PI](<https://devfeed.tech/articles/how-we-wrote-chicken-egg-counter-on-a-raspberry-pi-20853.md>)

Original publisher: [Read original article](<https://ivanursul.com/counting-eggs-in-opencv>)

Author: Ivan Ursul

Published: 2018-10-03T09:23:24Z

Content type: tutorial

Language: en

Sources: [Ivan Ursul](<https://devfeed.tech/sources/ivan-ursul.md>)

Topics: [Raspberry Pi](<https://devfeed.tech/topics/raspberry-pi.md>), [OpenCV](<https://devfeed.tech/topics/opencv.md>), [webcam](<https://devfeed.tech/topics/webcam.md>), [Linux](<https://devfeed.tech/topics/linux.md>), [Databases](<https://devfeed.tech/topics/databases.md>)

Tags: [camera](<https://devfeed.tech/tags/camera.md>), [image-recognition](<https://devfeed.tech/tags/image-recognition.md>), [java](<https://devfeed.tech/tags/java.md>), [linux](<https://devfeed.tech/tags/linux.md>), [migrations](<https://devfeed.tech/tags/migrations.md>), [mongodb](<https://devfeed.tech/tags/mongodb.md>), [network](<https://devfeed.tech/tags/network.md>), [raspberry-pi](<https://devfeed.tech/tags/raspberry-pi.md>), [stream](<https://devfeed.tech/tags/stream.md>), [webcam](<https://devfeed.tech/tags/webcam.md>)

## AI overview

A project account describing the design of a Raspberry Pi application that uses a webcam and OpenCV-based image recognition to count chicken eggs on a factory conveyor and send the count to a database. It discusses tracking eggs across camera frames and preprocessing images to identify contours and ellipses.

## Source excerpt

How it started Besides my main work on Upwork I quite often pick different projets. So I found a project, where I had to write a program for recognizing chicken eggs on a factory stream line. Customer wanted to install the application on computer with web camera, put this camera at a top of stream line and the application had to calculate eggs and send them to the DB. He also wanted to run this program on a cheap computer. The quality of the network in the factory isn't stable, so the program had to be resilient to outstand the network issues. There was enough challenges for me, so I decided to participate on this project.