DCPrime's
Blog

Image Processing: From the ‘Sixth Sense’ view.

computer vision
image processing
matlab
Published on 10 Jul 2012

From last few years the demands of image processing applications have increased considerably. Especially the one concept given by Pranav Mistry about his application ‘Sixth Sense’. Yes, in this post I will try to give you the brief idea about that and also you can build your own sixth sense device*. He interfaced a camera and projector with one of the best processors

Image processing is just another phrase to make any computer or a device not just to see objects but also to understand what it represents. For example to find a color proportion in an image, for finding any cracks or flaws on a wall or even finding a particular color from the image, etc.

There are mainly two types divided on the basis of their use. The first is just the simple image from a camera or any other source. It is also called static image. The other is a video or an array of images (the one which we are going to use). We all know this type of format and a video is the array of images called frame. This kind of array is used by dividing them into many images and processing one frame at a time.

So here also we are going to do the same firstly we will process one image than doing it continuously for upcoming frames from a camera. For doing that we need some components as follows:

  1. PC camera / webcam (built-in)
  2. The MathWorks™ Matlab®
  3. Any output device (here I use my mouse pointer, moving according to the object in camera.)

Now let’s start with some basic steps to make our own sixth sense:

  1. Get an image.
  2. Process the taken image.
  3. Generate output with respect to the image processed.

Firstly we will do this all processes for a simple one image then by making a while(1) loop we can do continuously take a image, process it, and generate desired output.

Step 1:Getting an image.

This step has its own sub steps (Write this codes in command window)

ans =
InstalledAdaptors: {'coreco'  'winvideo'}
MATLABVersion: '7.8 (R2009a)'
ToolboxName: 'Image Acquisition Toolbox'
ToolboxVersion: '3.3 (R2009a)'
ans =
AdaptorDllName: 'C:\Program Files\MATLAB\R2009a\toolbox\imaq\imaqadaptors\win32\mwwinvideoimaq.dll'
AdaptorDllVersion: '3.3 (R2009a)'
AdaptorName: 'winvideo'
DeviceIDs: {[1]  [2]}
DeviceInfo: [1x2 struct]

Step 2:Process the image

This step also has its own sub steps (Write this codes in command window)

You should have an image as we have here from the camera.

Image of variable 'i'
Image of variable 'i'
fr=i(:,:,1);
fg=i(:,:,2);
fb=i(:,:,3);
imview(fr);
imview(fg);
imview(fb);

Variables 'fr' 'fg' 'fb' respectively