0
$\begingroup$

I am working on a project to measure lengths of the black objects and distance between them using computer vision (Shown below in the fig.). These objects are moving on a conveyor shown in the blue color. The speed of the conveyor belt is known(0-1m/s) at every instance.Due to limited field of view of the camera, its not possible to have complete object length in a single frame , how can I measure the object lengths in this case? As I have very little knowledge of computer vision, I am finding it difficult to search the algorithms relevant for solving this problem. Any help with keywords, algorithms, resources is appreciated.

enter image description here

My first instinct is to use line detection algorithms for detecting object edges and calculate distance between them, based on speed and time.Also, how difficult is it to stitch multiple images based on speed to get a complete object?

$\endgroup$
2
$\begingroup$

how difficult is it to stitch multiple images based on speed to get a complete object?

Trivial. If you know the speed and the time at which an image was taken, it's just a linear translation...

My first instinct is to use line detection algorithms for detecting object edges and calculate distance between them, based on speed and time.

Excellent approach!

Just: reduce your image to a single row, maybe the average of the 10 center rows from your picture.

That reduces your problem from 2D to 1D.

Then, the question you have is "when does that start and stop being black?", which is trivial to answer if you just convert that color row to its brightness, and use a threshold.

| improve this answer | |
$\endgroup$
  • 1
    $\begingroup$ Did I read "trivial" and "threshold" in the same sentence? ;) $\endgroup$ – Laurent Duval Dec 18 '19 at 20:29
  • $\begingroup$ @Markus Thank you for the answer. If I may extend the question, is it possible to get the lengths measurements without considering speed of the conveyor, as integrating speed will lead to drift and larger errors in measurements of longer objects ? $\endgroup$ – Siddhesh Dec 18 '19 at 21:15
  • 1
    $\begingroup$ @LaurentDuval hehehe, "empirical value" :D $\endgroup$ – Marcus Müller Dec 19 '19 at 12:31
  • 1
    $\begingroup$ @Siddhesh yes, but then you'll actually need to derive the position from the video – that can be easy, for example if your conveyor belt has something like distance labels on it. Else, you need to start doing things like estimating shift – not overly complex (also just a (set of)1D cross-correlation), but definitely more computationally intense :) $\endgroup$ – Marcus Müller Dec 19 '19 at 12:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.