2

I'm working on a computer vision application (using openCV) and the goal is to measure the width of an obejct before/after it falls on a container. So after the fall its position will be random, something like this to be clear: candies

The only object i want to measure will be clear filtering the image and will be always on top, but its width won't be parallel to the image plane of the camera in the general case. In the worst scenario the longer face could be very occluded, getting things very hard.

So my question is: what will lead to better accuracy between these 2 strategies?

1) Getting a pair of stereo images of the container, locate two points on the longer face of the object (vertex or medium point of the borders) and then calculate the distance in 3D space between these points

2) Working with a single camera close to the object before it falls into the container, where its motion will be perpendicular to the camera so the entire width will be on a plane parallel to the image plane. Using a known size reference and calibrated camera will lead to width measure from a single image

Thank you in advance

David
  • 21
  • 2
  • In any cases if you don't know the object size nor angle of incidence, you cannot measure its size from single view perspective. – Joan Charmant Jan 22 '15 at 08:34
  • Correct, in fact in the case of single view i need something of known size which lies (or amost lies, if we accept a little uncertainty) on the same plane of the object i want to measure. With a calibrated camera i can count pixels of the known object and measure the second one. – David Jan 22 '15 at 11:38
  • Well, actually i don't even need a reference object to be always present in the scene. If the motion of the object to measure happens at a fixed distance from the camera i can pre-calculate the pixel/mm ratio with a reference object at that distance and then just count pixels to get the width. Still waiting for your suggestions anyway :-) – David Jan 22 '15 at 13:44

1 Answers1

0

A pair of stereo cameras is more suitable for this task. However, synchronization may be an issue. Ideally you want to use a stereo camera with hardware triggering, which allows you to capture both images simultaneously. If you use two webcams, then there will be a delay between the two images, which may be a problem because the object is moving.

Dima
  • 38,860
  • 14
  • 75
  • 115
  • In the first case the object will be static and i will acquire images after it has fallen into the container. Triggering won't be an issue, i'm more worried about its orientation about the camera (in the image for example 2 candies on top have the longer face which is very little visible). Since i need to reach 10 mm accuracy acquiring images from 2 m away from the object i'm not sure this could be a good path to follow if the face i need to measure is not good oriented. – David Jan 22 '15 at 07:50