How to detect moving object on a moving conveyor using opencv

I'm building a grading system for crabs. In this system, the animals (crabs) are placed in a moving conveyor and I need to identify dead or alive animals by detecting its motion based on images captured by a camera on this conveyor. The color of conveyor belt is black.

As the conveyor is always moving, so I can't apply methods using stationary camera like here. Does anyone have a suggestion about motion detection of the animals in this case using opencv? I can use more than one camera if it's necessary. Thanks.

2 answers

  • answered 2018-01-03 11:21 slesher

    Well, the most obvious answer is: 1) adjust the pictures of the conveyor in the different periods of time so that they become of the same area. 2) watch which ones of the crabs have different poses (like, "substract the images") - different regions (pixels) mean that there happened a motion.

    If using a tracking - well, you should train your classifier to watch the crabs, and than compare the regions of crabs in a same way. But i think it's too complicated for your particular issue.

  • answered 2018-01-03 11:21 Alp

    Well, This is an interesting question. While weighing different solutions to the problem, I learned that crabs are ectothermal animals, i.e. they can not control their body temperatures but rather their body temperatures are equal to the temperatures of the environment they are in. So, using a remote thermometer is out of question. (But I learned something new, thank you for that :] )

    A different, but a little bit cruel method would be, to give take a shot of a crab on the the belt, then give it a nudge of electric pulse (very very small voltage, enough for it to make it react only, similar to us when we get a static discharge) and take another shot of the crab immediately. Compare two images to see if there is a difference in crab's movements. If so, it should be alive, if not, RIP crab.

    There are downsides of this solution too:

    1. I really do not like the idea of giving electric shocks to crabs, even if it is low voltage. Sounds very cruel to me. I am not sure, if it is legally doable where you live in either.
    2. This requires adding another step to process.
    3. I absolutely have no idea what would be a amount of voltage to be used in such a system. Would it pose any danger for the employees around the conveyor belt?

    [I hope I am not get stoned for suggesting giving electric shocks to crabs here]