Friday, May 29, 2009

Minoru stereo webcam review

I predicted the arrival of stereo webcams a long time ago, and now it's finally happened. Recently I bought a Minoru "3D webcam" and have been trying it out. So far I have to say that I'm quite pleased with it.

The stereo camera itself is incredibly easy to install. It's a UVC device, and so "just works" out of the box with not much messing around. On a Linux system the camera appears as two separate video devices, which is exactly what I was looking for. I had initially thought that maybe the anaglyph shown in advertisments was created in hardware and then the single composite image sent to the PC, but fortunately this isn't the case.

Installation

Using an image grabbing utility called fswebcam the Minoru device worked straight away with no obvious issues. Later I found that there was an issue when trying to grab two images near simultaneously, but this is fixed in the latest UVC driver which will eventually be included as part of the kernel. To fix the problem on an Ubuntu 9.04 system, I did the following:

1. sudo apt-get install linux-headers-generic
2. Download and extract the latest UVC driver.
3. cd to the directory where the driver was extracted and run make followed by sudo make install
4. Plug in the Minoru webcam
5. Use my hacked version of the fswebcam utility to grab images from both cameras.

fswebcam -q -d /dev/video1,/dev/video2 -r 320x240 --no-banner -S 2 -s brightness=50% --save capture.jpg



Some reservations

So this looks like an excellent and easy to use device for use with PC based robots, which eliminates the time and complexity of needing to make your own stereo camera. I only have a couple of reservations:

1. The field of view is narrow - which is actually the case for most webcams. I havn't tried to measure the angle, but it looks something like the standard 40 degrees. For robotics purposes a wider field of view would be preferable.

2. I expected that the alignment of the cameras on a factory produced device would be better than what I've previously been able to hack together manually, but actually this seems not to be the case. There is a conspicuous vertical difference between the two images, which means that one camera is tilted relative to the other. This can be corrected by calibration though.

Upon subsequent investigation it seems that the apparent tilt is actually due to a very small misalignment of the camera lens mounting. To adjust this requires disassembling the casing, then loosening the two screws fixing the lens mount to the circuit board, moving it by some small amount then re-tightening the screws. Repeat the process until the alignment looks good.

Overall it looks like things are going my way, and that the Minoru device is probably just the first of many similar devices to come.

So, are these good enough to replace the aging webcams used on GROK2? The answer at the moment is a "maybe". Using the Minoru cameras I could make the robot's head smaller and more compact. The main thing which concerns me though is the narrow field of view, which could impair the grid mapping process due to excessive "tunnel vision". An alternative might be that instead of using two stereo cameras I could use three or four to try to reduce the field of view issues, and from a software and USB bandwidth point of view this wouldn't be any big issue. Another option might be to try to fit alternative lenses, but this might be difficult to do, and wherever possible I'd prefer to use "off the shelf" type hardware with as few ad-hoc modifications as possible.

Under the bonnet

The outer casing of the Minoru is quite attractive, but not readily conducive to mounting on a flat surface. I removed the casing, which unfortunately means destroying it. To do this I sawed off the camera stand at a point just underneath the main camera housing, and the silver coloured middle section can then be removed in two halves. The tricky part is then separating the camera housing, and for this I ran a precision screwdriver along the join until it came apart. The plastic lens covers can then be removed, and I also removed the microphone, since I don't need it for my applications.



The two cameras are mounted onto a single board, with the lens holders being fixed by two screws at the back. These look like the same holders that I've seen used on other boards (presumably "M12" type). There's a rubber backing to the circuit board, and I've kept this because this will provide insulation for the board components when mounting onto a flat metal surface.

It would be possible to mount two Minoru stereo cameras back to back to make an extremely compact dual stereo vision head. Also the circuit board would probably be quite easy to mount to some of the standard pan and tilt mechanisms sold by robotics hobby stores.

Image quality

Image quality I would say is average for a modern webcam. It's certainly better than my old Quickcam Express cameras, but not as good as the Quickcam Pro series. The sensors are CMOS devices measuring 3x4 millimetres. The part number is Vimicro VC0342PLNBA TSO3408 0230909.





The reverse side of the circuit board looks like this:


10 comments:

PaulJ said...

Hi Bob,

Most likely this camera uses a a standard M12 size micro lens. You could try replacing original lens with wider angle ones. See: http://www.theimagingsource.com/en_US/products/optics/lenses/ (there should be an European site somewhere too).

Regards,
Paul.

Bob Mottram said...

Assuming that they're M12 I've ordered a few of these, which have a 70 degree FOV.

webcam PC camera Lens focus 3.6mm M12x0.5 thread 3630A1

http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&item=270270146629

If they don't fit it's no great loss.

PaulJ said...

Their description reads: "IR night version", which means that there is no IR filter on these lens. The color accuracy will suffer especially with incandescent lighting.

Bob Mottram said...

Yes I did notice that. On the back of most webcam lenses there's usually an IR filter glued in place. For my applications colour accuracy isn't especially important. All the stereo correspondence is done with luminance only, and colour will only be used to "paint" the grid maps (although it can also be used as a consistency measure during SLAM).

Not having the IR filter could be an advantage, because like most webcams the Minoru uses CMOS sensors, and these don't perform very well in low artificial lighting, whereas the CCD sensors in the much older webcams on GROK2 give a much better image under the same conditions.

PaulJ said...

Thanks for posting PCB images. VC0342 is an image sensor to USB controller, see: http://www.vimicro.com/english/product/d_vc0342.htm

I'm assuming the first image is the sensor side, the second is controller side, right?

This camera should be USB Video Class (UVC) compatible. Can you verify that it actually is?

PaulJ said...

Are there two of VC0342 controllers on the back side of PCB? If so, could you publish the full image of that side? I'm curious how they mix the pixel data from two sensors.

Bob Mottram said...

Yes, the first image is the sensor side and the second is the reverse. I'm not totally sure that there are two VC0342's and will take another picture of the complete reverse side.

The Minoru acts as if it's UVC compliant, but I know there there is often a certain amount of "interpretation" of standards by manufacturers.

PaulJ said...

Thanks for another picture. There are two VC0342 controllers and most likely USB hub to merge two independent USB devices into one. It is quite likely that video streams from two cameras are poorly synchronized - software only synchronization.

Bob Mottram said...

You might be right about the lack of synchronisation. Images can be grabbed near simultaneously by opening both devices, then grabbing the frame data one after the other. On a slow moving robot (typically much less than one metre per second) this seems to be ok, but on a faster vehicle (say, a moving car) the lack of synchronisation would introduce unacceptable errors.

Tim Tyler said...

Review: http://crave.cnet.co.uk/gadgets/0,39029552,49303012,00.htm