Case File 01 · 2016 · Computer Vision

Counting fish seeds by camera, not by hand

A real-time image-processing rig built to replace manual, error-prone fish-seed counting for Indonesian aquaculture sales.

TYPE
Consultancy · C2
DOMAIN
Aquaculture
OUTCOME
2.8% avg. error
STATUS
Published, IOP Journal of Physics
The problem

Manual counting doesn't scale

Fish farmers were losing money on discrepancies between the agreed sale amount and the actual count — because seeds were counted by hand, one at a time. Sorting and counting 500 seeds (1–3 cm each) took about an hour; a single sale could run 1,000–3,000 seeds. Small errors at low volume became real losses at scale.

The approach

A camera rig that counts as seeds pass through

The physical setup channels seeds through four zones — camera, inlet, counting area, outlet — so each seed is measured exactly once as it crosses a tunable detection width.

Processing pipeline
  • Take a picture (camera)
  • Segmentation
  • Median filter (noise cleanup)
  • Morphological operations
  • Object detection
  • Determine centroid point
Counting logic
  • Check if contour width & centroid meet threshold
  • Frame the object, locate its centroid
  • Is the centroid inside the virtual detector?
  • If yes → count it; if no → loop
  • Reset counter, repeat per frame

Why a "virtual detector," not a fixed line

Rather than counting every object seen, the system only counts a centroid the instant it crosses a defined width inside the counting area — this made accuracy tunable, and testing different widths was the whole optimization loop.

Results

Where accuracy landed

2.8%
average error — best result, at a 96px virtual detector width
96px
optimal virtual detector width, found by testing
~1 hr saved
per 500-seed batch vs. manual sorting
Conclusion The automatic, real-time fish-seed counter was successfully designed and validated — with detector width identified as the single most important tuning parameter.
Source

Published research

Type: Consultancy Project · Level C2 · October 2016  ·  Read the paper on iopscience.iop.org ↗