I needed to do a histogram of the depth image of Kinect so here I leave the code for me and anyone that could give it some use. This can be used in C and in C++. (I use OpenCV 2.1)
Archive for category Programacion / Programming
Drawing a histogram of an image with OpenCV
16/03 21:02
Class name generator, classnamer
03/03 16:47
You don’t know what name should your useless class have? Want to make that your code looks complicated and awesome? Try to use ClassNamer!
Its great for me now because my RecursiveCacheLexer does not parse well the results of the DynamicMetadataHelper, it could be because the SmartRequestCounter overflows or something…
First contact with Meego in a ExoPC Slate
16/02 21:14
First of all I must thank Intel for the oportunity of going to their AppLab.
In this lab we got introduced to MeeGo and to AppUp, they showed us how to program a couple of simple apps with their SDK 1.2 and we got an ExoPC with MeeGo to develop on the device.
This post is dedicated to the ExoPC with MeeGo and to the first impressions it gives to me.
Lets start with the hardware of ExoPC Slate, the fabricant fabricant web says this tablet has:
-Multitouch capacitative screen of 11,6 inches (1366×768).
-2GB RAM.
-Intel Atom Pineview-M N450 1.66 GHz – 64 bit support
-Intel GMA 3150 BROADCOM Crystal HD 1080p
-Webcam 1.3MP
Weights 950g and is 295 x 195 x 14.0 mm.
For more data: fabricant web.
The tablet (has only one button).


Read the rest of this entry »
Kinect with OpenCV first contact!
03/12 18:14
After fighting all day with it I’ve got the basic stuff with Kinect, getting the RGB image and the Depth image and show them in real time.
For doing it I wanted to use OpenCV and the libfreenect driver. I’ve been able to do it thanks to the example of OpenKinect.org thats posted on here.
My code looks like this:
Reverse engineering Kinect!
18/11 01:04
From reddit/r/programming I found this VERY interesting article about how to reverse engineer USB devices. They use as an example the motor of the Kinect. Its pretty well explained and they use python as example language.
Acquiring images from the webcam from MATLAB
11/11 18:20
To acquire images from a webcam from MATLAB 7.9 (R2009b) I just needed to:
imaqhwinfo
ans =InstalledAdaptors: {'coreco' 'winvideo'}
MATLABVersion: '7.9 (R2009b)'
ToolboxName: 'Image Acquisition Toolbox'
ToolboxVersion: '3.4 (R2009b)'
Tells us what video adapters we have.
wininfo= imaqhwinfo('winvideo')
wininfo =AdaptorDllName: [1x87 char]
AdaptorDllVersion: '3.4 (R2009b)'
AdaptorName: 'winvideo'
DeviceIDs: {[1]}
DeviceInfo: [1x1 struct]
With this we find the DeviceID (1) of the webcam.
Now, if we go wininfo struct, from there to DeviceInfo struct there we will find an array called SupportedFormats of our webcam.

I’ll use ‘YUY2_320x240′:
winvid = videoinput('winvideo',1,'YUY2_320x240');
In my case the imagenes are being returned in YUV for default, to change this you need to change the ReturnedColorSpace variable from the object winvid (I do this from the variables explorer of MATLAB like in the screenshot above). I changed it to RGB.
preview(winvid);
With this we can see the webcam :) Example of whats the window like:

With:
capt1 = getsnapshot(winvid);
We capture an image.
We can show it using:
imshow(capt1);
For example.
For learning more stuff we can go to the MATLAB help and search for Image Acquisition Toolbox and search what we need.
Source: madan.wordpress.com
Sorry, but this post is not available in English
21/10 16:49
Sorry, but this post is not available in English
Creating independent executables from MATLAB
13/10 15:35
~I’ll translate it later, haven’t got time right now! Sorry!




Read AwesomeBytes in english!
Lee AwesomeBytes en español!