Two cameras using one socket for computer vision

For computer vision using Gadgeteer, two cameras are needed at a fixed distance. Spider supports one camera. Do any of you have some ideas how two cameras could share the same socket? The mainboard would have to toggle between the two cameras. this would be problematic for objects in motion but would work for stationary objects.

How would you go about creating a custom module? one design is to have two cameras a couple centimeters apart, some controller would combine both images into one (left camera is on left side, right camera on right side, like the images from mars rovers). Or the image could go to module memory where the mainboard could retrieve the left and right.

You need serial cameras. But you need to think about the processor speed as vision is extremely processor intensive.

cool - the spider has a number of U sockets, so we could use the sytech serial cam - http://gadgeteering.net/module/sytech-serial-camera - but that’s going to be like 145 bucks for each camera, so we’ll have to figure out how to DIY. I don’t know anything about I2C, but could we use these little CMOS cameras? http://www.sparkfun.com/products/8667

I don’t think the image processing will be too much for a spider - the kernel methods are pretty fast, just looping through the NxM matrix comparing adjacent pixels, and then the stereo part that goes line by line. But…

This is for building a Gadgeteer version of Google/Stanfords self-driving car - a miniature one. The best design would be to have the CV running on a Gadgeteer module and the mainboard would just read in geometry from the module - to free up the spider to handle the AI. it would make alot more sense to do the CV in C code.

the minoru is likely the cheapest stereo web cam. It does no work on the camera system to combine the stereo images though so that has to be all offloaded. http://www.minoru3d.com/ you can find them on ebay for 25 bucks or so. It honestly is 2 web cams properly spaced and then plugged into a internal hub with one usb cord coming out. It tears down nicely. I use them on a ROS based robot but those are run with laptops/PCs and full blown linux not sure how it would do on a smaller embedded chipset. I would guess you could offload that work to a DSP. Or as gus says use some serial cams. The biggest issue is syncing the frames the cheap way this has been done is two exaclty alike cameras hoping they stay in sync. the better ones do this with the 2 cameras before it published to the output.

Could you use something like the Raspberry Pi to do the calculations? Model B has 2 USB.

Yeah Pi with opencv should do just fine.

edit or beaglebone, beagleboard maybe even a chumby. which are mcuh easier to get today then a Pi.

I really want to go the route of CV module, rather than use openCV. One major reason is for experience for myself and anyone working on the project or following the blog posts to learn about the CV algorithms. but use openCV code wherever possible.

I absolutely love the AVRCam, and bought one years ago. Building robots instead of sleeping

and its inspiring to read why he quit - http://www.jrobot.net/WhatHappened.html

someone paid him to document! http://www.jrobot.net/AVRcam_design_document.pdf

I would like to consider using AVRs and building a CV module for Gadgeteer. I think this could be a fun and rewarding project.

Yeah i have a chinese version sitting on my desk from a old project. It is definitely a good start. My two littles ones would be why i take breaks too :>

Go Paul! Go!

lol - not yet, still working on me-bot v1, starting to think about v2 (autonomous).

What do you guys think about these CMOS cameras that use I2C, http://www.sparkfun.com/products/8667

they’re cheaper than the serial cameras. I think the simplest way to get started is to get two serial or I2C hooked up to the spider and do processing either on board or on PC by sending images over wi-fi. no clue what I2C is yet, sounds complicated.

Only the control channel is I2C, the data is a special parallel bus called DCMI. Search here on the forum, there was an extensive discussion related to DCMI recently.

yes, “standard DATA + I2C” with the first bit the important one :slight_smile: