Showing posts with label General. Show all posts
Showing posts with label General. Show all posts

Monday, November 14, 2011

33

OPENCV: STEREO WEBCAM

Today, an easy one :) A small program in OpenCV to implement a cheap stereo webcam and visualize the left and right images. The only thing you need are two USB webcams plugged in your computer (better if both are same brand and model):



 Download the source code:


Compile it:

tar xzvf OpenCVStereoWebcam-1.0.tgz
cd OpenCVStereoWebcam
make
./OpenCVStereoWebcam

And there you go, your cheap USB stereo webcam.


Have fun!

Sunday, September 4, 2011

6

OPENCV: PSEUDOCOLOR AND CHROMA DEPTH

Hi everybody!

A couple of days ago one of the readers of the blog asked this on the comments of a previous post:

Hi,

I'm Mike. Nice work! :)

I saw that some people have coloured depth maps and not just shades of grey/black/white. If I want to have coloured depth maps how can I achieve this?

Thanks,
Mike.

Well Mike, some time ago I had the same question and researching a bit I found two approaches. Pseudo Color and Chroma Depth. Let me answer your question with a blog post, so anybody else who could be interested can find it easily.

Basically, what we have is a function that takes as an input a gray scale value and returns the corresponding RGB.  The Pseudo Color approach uses a trigonometric function to assign the RGB color to each gray value. The next picture shows an example:


 As you can see the output is somewhat similar to the images of the luggage scanners in airports and train stations.

But for the purpose of depth visualization, maybe it is more convenient to use Chroma Depth. This method assigns red values to high depth values, magenta values to low depth values and a rainbow color to anything in between. Like in the next picture:



To make it easy, you can download  the simple Gtk application that I made to visualize the output of both methods and play around with some parameters. The source code should be self explanatory, so I will skip the details in this post.


Just execute "make" and then "./GrayToPseudocolor -gray /path/to/your/image.something"
I would like to thank Sarah Martull for letting me use her depth image for this post.

Tuesday, June 14, 2011

0

OPENCV: NEW COOKBOOK

Last week came to my attention a new book about OpenCV: OpenCV 2 Computer Vision Application Programming Cookbook. Stay tuned for the upcoming review on this blog!

Monday, August 2, 2010

0

HELLO WORLD!

This is the first post in this blog. You see, I have always been an enthusiast of robotics, computers and technology and I always wanted to share that enthusiasm with the rest of the world.

Recently I rescued a robot that I built five years ago (2005). While restoring the robot it came to my mind that this could be the motivation I needed to start a blog, describe the project as it grows and talk a little bit about things related to the world of robotics, computer vision, artificial intelligence and technology.

So, here it is. If you'd like to, you are more than welcome to come and visit this site anytime.