Showing posts with label opencv. Show all posts
Showing posts with label opencv. Show all posts

Sunday, March 17, 2013

Linaro + opencv + exercise

Exercises with Ubuntu-Linaro

1º Load an image

2º Contours

libjpeg libjpeg-turbo Linaro
Load 199 63126
2Gray 61 4557
Trheshold 12 12 12
Create 32 11 10
find 53 3171
Draw 47 47 87
Total 404 209363



 3º Search one pattern

libjpeg-turbo Linaro
Load Source 11 6
Load Pattern 11 6
Search 488 487
Total 510 499

4º Haar-Features

The time is quite similar

Conclusion 

The ubuntu-linaro is a little bit more fast, but it'snt a big difference.

I prefer to use raspbian cause it has a big community, and the information it's easy to find, and may be it has more things that I need, but I feel comfortable  in raspbian than in ubuntu-linaro.

But I know that I'm not taking all the power of the cubieboard, I've in mind to improve the compilation using cross compilation, and take advantage of the NEON acceleration, but I'll do latter when I've more knowledge 

Linaro + openCV

Well at the beginning of the blog some one, tell me to use ubuntu-linaro, wich is more focused to ARM processors

The Linaro use the library libjpeg-turbo directly and not is necessary to install as I do in Raspbian + opencv + libjpeg-turbo

The installation of Ubuntu-Linaro is quite simple, and can be downloaded from the berryboot, in the same way as I did with Raspbian.


Installing OpenCV

Well I find some troubles when I tried to install opencv in Linaro.

When I added the requisists to install openCV

sudo apt-get -y install build-essential cmake pkg-config libpng12-0 libpng12-dev libpng++-dev libpng3 libpnglite-dev zlib1g-dbg zlib1g zlib1g-dev pngtools libtiff4-dev libtiff4 libtiffxx0c2 libtiff-tools


sudo apt-get -y install libjpeg8 libjpeg8-dev libjpeg8-dbg libjpeg-progs ffmpeg libavcodec-dev libavcodec53 libavformat53 libavformat-dev libgstreamer0.10-0-dbg libgstreamer0.10-0 libgstreamer0.10-dev libxine1-ffmpeg libxine-dev libxine1-bin libunicap2 libunicap2-dev libdc1394-22-dev libdc1394-22 libdc1394-utils swig libv4l-0 libv4l-dev

I had to add this library, if not our programs will give us errors, but there are a lot of information in google to solve the problems.

sudo apt-get install libgtk2.0-dev 

cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_EXAMPLES=ON ..

and after that continue the installation of openCV

Friday, March 15, 2013

It's any one there ?

Well there are a couple of possibilities to check if there are any object, person

But one of the simplest is to use Haar-like features.

To work with Haar features (see the example FaceDetect.cpp in your directory OpenCV-2.4.3/samples/c/facedetect.cpp)
But basically works with haar files which store an abstract of the information about what is a face (any object) and what is not a face (a object)

Depending of the necessity and the power of our machine, we should different haar libraries. Even we can build special libraries for our purposes. (but my i3 with 4 GB ram took 3 days to make one haar library about cars)

I used this three
  

"./haarcascades/haarcascade_frontalface_alt_tree.xml" (3.5 MB) (over 500ms)
"./haarcascades/haarcascade_frontalface_alt2.xml" (0.8 MB) (over 300 ms)
"./haarcascades/haarcascade_eye.xml" (0.4 MB) (over 200 ms)


Also depends the size of the image, I used the less quality (160x120) for the first ideas will works

The code is based in the sample, so you'll find the code there, any doubt ask me.



With this exercise I finish the first part of the project based on computer vision.
We can do a lot of things more, blobs, our haar libraries, structural analyzes, movement studies, etc... but all this exercise are outside of this scope.

Thursday, March 14, 2013

Looking for a fish

I would  like go to dive with fishes, but its time to study, so I've take afford of my studies to catch the fish with a web cam.

So, how I can fishing with my web cam, and a plastic fish?

With this exercise I've checked the power of our cubieboard, its a merge between the previous exercises search a pattern and  how to use the web cam

The code is very similar to the search pattern, but with a small difference it's a video instead a photo, (video = photo1, ..... photo n ...., photo n+m)

The size of the video is 160x120, with bigger videos (320x240) it takes around 200 ms to found it

Here is the result, and I think is power enough for almost proposes




So with 33 ms to detect an object will be right for the simplest projects, but I've to try with Linaro, and with a new compilation of openCV.
I'll try to do this the next week wen I've a monitor with HDMI at last.

web cam and cubieboard

Well I'm back again with the computer vision, now with a webcam

The idea is to how fast is our cubieboard to do some exercise, as could be detect faces, or detect and object.

I've saved a couple of videos in different resolutions, they are saved from my desktop and you can see how the lag is working, it's not realistic exercise, but it can show as a little information.

First the code

#define WITH  640
#define HEIGHT 480

int main (int argc, char** argv)
{

Mat img;
bool salir=false;
double flagGrab,flagRetrieve, flag;


VideoCapture webCam(0);
//Change the size of the resolution (640x480,320x240,160x120)

    webCam.set(CV_CAP_PROP_FRAME_WIDTH,WIDTH);
    webCam.set(CV_CAP_PROP_FRAME_HEIGHT,HEIGHT);
    while ( waitKey(1) <= 0 && !salir)
    {
        flag=getTickCount();
        webCam.grab() ? :salir=true;
        flagGrab=getTick(flag);

      
        flag=getTickCount();
        webCam.retrieve(img);
        flagRetrieve=getTick(flag);
//here the code will start to work with the image
        imshow("Web Cam",img);

    }
return 0;
}

and here the result, the videos are a little bit bored

640x480
320x240
160x120

With this videos I'll try to make the exercise to detect a pattern, on a real time detection.


Tuesday, February 26, 2013

Search one image

How to search an image inside other image?


Well an interesting thing of computer vision is the possibility of search an image inside other, this process could be used in many systems to search objects, or count (but the images should be to similar and the environment must be under a strict control)

First I took the image to search, in this case is the insignia of doc Mac Coy, just for this exercise






turbo

Standard


Using gray images directly


In this case the load is a little bit longer in the libjpeg-turbo than the standard one, and the process of find are similar

Here is the code (in the opencv/doc or opencv/samples) there are more examples

To use the function matchTemplate ( imgSrc, imgPattern, .....) both images must be in grayscale, so we can load directly in gray and avoid this step, and we earn 10 ms.

This function, fetch the area were the pattern is in the source.

bool fastMatch (const Mat& _source, const Mat& _pattern,Rect* rectROI, double coincidence)
{

Mat source;
Mat pattern;

Size sourceSize;
Size patternSize;
Size imgResultSize;

Point maxLoc, pointRectROI;
double maxVal;

bool found = false;
// we can avoid this step if we load the image directly in gray
    cvtColor(_source,source,CV_BGR2GRAY);
    cvtColor(_pattern,pattern,CV_BGR2GRAY);

//We need to take the size of the images.
    sourceSize = source.size();
    patternSize = pattern.size();

    imgResultSize.width = sourceSize.width - patternSize.width + 1;
    imgResultSize.height = sourceSize.height - patternSize.height + 1;
    Mat imgResult(imgResultSize,CV_32FC1);
//Function that found the image
    matchTemplate (source, pattern, imgResult,CV_TM_CCOEFF_NORMED);
    minMaxLoc(imgResult,NULL,&maxVal,NULL,&maxLoc);
    maxVal *=100;
    if (maxVal >= coincidence)
    {
        *rectROI = Rect(maxLoc.x, maxLoc.y, patternSize.width, patternSize.height);
        found=true;
    }
    return found;
}

Monday, February 25, 2013

libjpeg vs libjpeg-turbo

With the first exercise I've the opportunity to compare libjpeg vs libjpeg-turbo.

Before to install libjpeg-turbo I made a backup with the standard one, so it's a great moment to compare both

The code used is the same in both cases (Contours) and here are the results

libjpeg-turbo

libjpeg

libjpeg libjpeg-turbo
Load 199 63
2Gray 61 45
Trheshold 12 12
Create 32 11
find 53 31
Draw 47 47
Total 404 209

Finally the libjpeg-turbo is faster than libjpeg, we will check in the future what happen with Linaro vs Raspbian.

By the moment I'll be working with Raspbian with libjpe-turbo

Saturday, February 23, 2013

Contours in openCV

Detecting contours.


The process of detecting contours is one of the simples.

Load the image -> Change to gray --> use the threshold function --> find the contour --> draw the contours

The code

//Load the image in colour
        flag=(double) getTickCount();
        imagen=imread(argv[1],CV_LOAD_IMAGE_UNCHANGED);
        flagLoad=getTick(flag);
//Change the image to gray
        flag=(double)getTickCount();
        cvtColor(imagen,imgGris,CV_BGR2GRAY);
        flag2Gray=getTick(flag);
//use the threshold to separate few objects
        flag=(double)getTickCount();
        threshold(imgGris,imgContorno,122,255,THRESH_BINARY);
        flagThreshold=getTick(flag);
//we need a place to leave the new iamge
        flag=(double)getTickCount();
        Mat dst = Mat::zeros(imgGris.rows,imgGris.cols,CV_8UC3);
        flagCreate=getTick(flag);

        namedWindow("gris",CV_WINDOW_NORMAL);
        namedWindow("contorno",CV_WINDOW_NORMAL);
        namedWindow("binario",CV_WINDOW_NORMAL);

        imshow ("gris",imgGris);
        imshow ("contorno",imgContorno);
        cvMoveWindow("gris",300,50);
        cvMoveWindow("contorno",600,50);

vector< vector<Point> > vecContornos;
vector<Vec4i>jerarquia;
//Find the contours
        flag = (double)getTickCount();
        findContours(imgContorno,vecContornos,jerarquia,CV_RETR_CCOMP,CV_CHAIN_APPROX_SIMPLE);
        flagFind =getTick(flag);
        flag = (double)getTickCount();
        for (int idx=0;idx >=0;idx=jerarquia[idx][0])
        {
                drawContours(dst,vecContornos,idx,WHITE,5,8,jerarquia);
        }

The results 

And finally we have this results from the original image


Original image


Result image
 All the values are in milliseconds 

This exercise give us a useful information

The main information is the threshold to separate the right image (12 ms) and find the contours (31 ms) around 50 ms to detect objects, it's not really bad for a dive which could use this information.

But the structural analysis could be take more time, we will what happen in the next exercises 

Any comment will be appreciated

Friday, February 22, 2013

Raspbian + OpenCV + libjpeg-turbo

A few time I made the installation of openCV over Raspbian, but after speak at the Cubieboard community there is a library called "libjpeg-turbo" wich is faster than the standard one

I  read a lot of information about it, and as far I know, the Linaro distribution use it, (I've to do a double check)

But at this moment I can't take off the raspbian and I've to install the library separately

I found one article that explain what to do
How to compile  the OpenCV 2.4.0 with libjpeg-turbo
To build OpenCV 2.4.0 with libjpeg-turbo you need:
  1. build libjpeg-turbo as static library
  2. configure OpenCV with the following command:
    cmake -DWITH_JPEG=ON -DBUILD_JPEG=OFF -DJPEG_INCLUDE_DIR=/path/to/libjepeg-turbo/include/ -DJPEG_LIBRARY=/path/to/libjpeg-turbo/lib/libjpeg.a /path/to/OpenCV

But I'm a little bit out of training and find some questions.
So what I've to do ? I need a cook book, and I didn't find so I have to make one. (please any mistake let me know)

1º Download the libjpeg-turbo

Master of libjpeg-turbo :https://github.com/aumuell/libjpeg-turbo/archive/master.zip

To make the installation ( follow the installation)
2º Prepare the installation

unzip libjpeg-turbo-master.zip 
cd {source_directory}
autoreconf -fiv 
(note: if the autoreconf doesn't exist add it "sudo apt-get install dh-autoreconf")
mkdir {build directory}
#cd {build_directory} sh {source_directory}/configure [additional configure flags}
../configure --enable-static
 2-Bº After made the configuration we need to make the library static. (How I can make a static library :| ) -->
"-fPIC" which was an abbreviation for Position Independent Code, and this had 
to be passed to create library code objects, without that flag, code that is specific to 
the source would be used, and then the library would fail.

The  command "../configure --enable-static" will create some files
We have to edit the “Makefile” 
Locate the line CC = gcc 
and change it by CC = gcc -fPIC
sudo make
sudo make install.
After all this steps we'll have installed the libjpeg-turbo. 3º Now How to link our OpenCV to libjpeg-turbo ? Its easy we have to create again our CMAKE configuration
#I removed the python compatibility 
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_EXAMPLES=ON 
-DWITH_JPEG=ON -DBUILD_JPEG=OFF 
-DJPEG_INCLUDE_DIR=/path/to/libjepeg-turbo/include/ 
-DJPEG_LIBRARY=/path/to/libjpeg-turbo/lib/libjpeg.a /path/to/OpenCV .. 
 

When the CMAKE comand is done we will see somthing like that

- Detected version of GNU GCC: 46 (406)
-- Found JPEG: /opt/libjpeg-turbo/lib/libjpeg.a  
-- Found Jasper: /usr/lib/arm-linux-gnueabihf/libjasper.so (found version "1.900.1") 
-- Found OpenEXR: /usr/lib/libIlmImf.so
-- Looking for linux/videodev.h
-- Looking for linux/videodev.h - not found
-- Looking for linux/videodev2.h
-- Looking for linux/videodev2.h - found
-- Looking for sys/videoio.h
-- Looking for sys/videoio.h - not found
-- Looking for libavformat/avformat.h
-- Looking for libavformat/avformat.h - found
-- Looking for ffmpeg/avformat.h
----------------
-- 
--   Media I/O: 
--     ZLib:                        /usr/lib/arm-linux-gnueabihf/libz.so (ver 1.2.7)
--     JPEG:                        /opt/libjpeg-turbo/lib/libjpeg.a (ver 80)
--     PNG:                         /usr/lib/arm-linux-gnueabihf/libpng.so (ver 1.2.49)
--     TIFF:                        /usr/lib/arm-linux-gnueabihf/libtiff.so (ver 42 - 4.0.2)
--     JPEG 2000:                   /usr/lib/arm-linux-gnueabihf/libjasper.so (ver 1.900.1)
--     OpenEXR:                     /usr/lib/libImath.so /usr/lib/libIlmImf.so /usr/lib/libIex.so /usr/lib/libHalf.so /usr/lib/libIlmThread.so (ver 1.6.1)


make
#we have to wait a little bit (you can stop and continue later)

sudo make install 
 

Monday, February 18, 2013

Repeat the exercises

Next exercises 

A few time ago I made some exercises to study  computer vision, and I have to repeat them.
I made it with my computer I3 and 6 GB of RAM, I have to recognize that the code were a little bit dirty (not very efficient)

But if I can show the expected results, and I will give a better idea what I want to do with the cubieboard.

.-Detect and follow

This exercise consist in to take a part of an image, the eye in this case, and detect and follow.


.- Contours.

One of the most important this is to detect different contours, center of object.


.- Blobs
Blobs are pixels continuous quite similar to be the same piece








Sunday, February 10, 2013

Load an Image


First step with OpenCV (corrected)

Load an image, Lena is here.

I made this exercise a few weeks ago, but I had a mistake, and the obtained data were not correct, the first test gave me around 140 milliseconds to load and display an image.

To much time if we think that in one second of video, we could have till 30 images per second or even more; one image each 33 miliseconds.

Note: This comparative it is not real, the video has a different compression such as I-Frames (real images) and P-frames( predictive frames)


There are a more things to do as looking for libjpeg-turbo, change the Raspbian to Linaro

But the first thing to do is to correct the code, and separate each time in their different process: Load the image, display the image

This is the new code.

#include <cv.h>
#include <highgui.h>
#include "../00_include/tools.h"

using namespace cv;

int main (int argc, char** argv)
{
Mat imagen;
double flag,flagCarga,flagDisplay, tiempo;
char resultadoCarga[25];
char resultadoDisplay[25];
char resultado[25];
Size imgSize;
//flag of time
        flag =(double)getTickCount();
        imagen=imread(argv[1],CV_LOAD_IMAGE_UNCHANGED);
//calculate the time
        sprintf(resultadoCarga,"Load %2.f",getTick(flag));
        namedWindow("FOTO",CV_WINDOW_AUTOSIZE);
//Fetch the size
        imgSize = imagen.size();
        sprintf(resultado,"Size width=%d height=%d",imgSize.width,imgSize.height);
//New flag of time
        flag = (double)getTickCount();
        imshow("FOTO",imagen);
//calculate the time
        sprintf(resultadoDisplay,"Display %2.f",getTick(flag));
        printf("%s\n",resultadoDisplay);
//put the data on the image
        putText(imagen,resultadoCarga, Point(10,20),FONT_HERSHEY_SIMPLEX,0.5,BLUE,1);
           putText(imagen,resultadoDisplay,Point(10,35),FONT_HERSHEY_SIMPLEX,0.5,BLUE,1);
        putText(imagen,resultado,Point(10,50),FONT_HERSHEY_SIMPLEX,0.5,BLUE,1);
//Save the image
        imwrite("out.jpg",imagen);
        waitKey();
}


Well, with the correct software we have this values on the photo.


The values are:
.- Load 41 milliseconds
.- Display: 5 milliseconds

Well this values are no too bad, but it is not computer vision, we did not anything with the image as could be check the blobs, detect a face, and eye, some color, detect objects, etc.

Aprender sin reflexionar es malgastar la energía. Confucio (551 AC-478 AC).
Learning without thinking is labor lost. Confucius (551BC - 478 BC)

We can see that we have 41 miliseconds to charge an image, so we would check with libjpeg-turbo, and we will see if the load time get reduced, try to use and SATA HD.
 The display time was 5 milliseconds, if its computer vision, we do not need see the image, just the cubieboard has to "see" it and process. 

This exercise does not give us to much information cause is not related with computer vision.
I will have better information wen have time to make the exercises about computer vision as detect contours, geometry, detect faces, eyes, blobs (contiguous pixels with similar color), etc.

But one important thing is to try Linaro, but I can not do it at this moment, I have to wait a couple of weeks


There is a very interesting information that I learned at the Cubieboard community


getTick(flag)

 double getTick(double flag)
{
/*
This functions return the time in milliseconds
since the "flag" moment till now
*/ 
//Get the frequency  
double frecuencia = getTickFrequency() / 1000 ;
double t = (double)getTickCount();
return((double)t - flag)/frecuencia;
}


 



Wednesday, February 6, 2013

Siguiente paso: visión artificial.

Visión artificial 

Bueno llegados a este punto vamos a entrar en faena y vamos a darle un poco más de vida a la cubieboard.

 Cámara web

¿Cámara cara con muchos megapixeles o barata con pocos  megapixeles?

Queremos hacer que nuestro "sistema" pueda hacer algún tipo de reconocimiento y trabajo con imágenes, hasta ahí todo bien.

¿Pero como funciona una imagen en un ordenador ?
Una imagen no es más que una matriz de X*Y =megapixels
A mayor resolución mayor información pero información a nivel de visión redundante.
El punto menos fuerte de la cubieboard es la velocidad de procesamiento, así que trataremos de usar el menor número de pixels posibles, la imagen para nosotros puede perder calidad, pero para la cubieboard no le restará efectividad y si que permitirá mejor rendimiento.

Esta es mi cámara web

pi@raspberrypi ~ $ lsusb                                                                                                                                                          
Bus 003 Device 002: ID 046d:0819 Logitech, Inc. Webcam  C210                                                                                                            



¿Qué vamos a hacer en visión artificial ?

Esto no pretende ser un curso de visión artificial, sino una serie de ejercicios prácticos, donde se vean los ejemplos y como se comporta la cubie. Aunque si hay  dudas entre todos podemos tratar de resolverlas.

Queremos visión artificial en tiempo real, luego vamos a trabajar con imágenes de vídeo y no imágenes estáticas.

Este es el plan, que puede cambiar y si alguien tiene alguna duda, comentario, o aporte que se sienta libre de hacerlo
  1. Adquisición de imágenes
    1. Foto
    2. Vídeo
  2. Detección de contornos
  3. Geometrías
  4. Región de interés / (ROI)
  5. Detección de imágenes.
  6. Realidad Aumentada
  7. Blobs
El plan llevará cierto tiempo completarlo, y trataré de hacerlo en los dos próximos meses (si las complicaciones de la vida lo permiten)

Saturday, January 19, 2013

Cubieboard + OpenCV


¿Qué es la visión artificial?

Cuando un ordenador procesa una imagen, no entiende lo que realmente se ve en ella.
Pero y si necesitamos detectar una persona, o una cara en concreto, o un objeto, o seguir un color, o encontrar una forma, interpretar lo que vemos, etc.
De todo esto se encarga la visión artificial.

¿Cómo aplicamos la visión artificial?

Bueno aquí es donde viene en nuestra ayuda OpenCV, es un conjunto de librerías que nos permite abstraer al programador de la parte más laboriosa de la programación y utilizar funciones ya preparadas para todas las necesidades que tengamos.
Hay posibles instalaciones para Linux, android, windows, ios

Instalando OpenCV


He sacado toda la información técnica de este blog, muy bueno, no solo por este artículo sino por muchos otros.

Fuente: http://mitchtech.net/raspberry-pi-opencv
Fuente: http://docs.opencv.org/doc/tutorials/introduction/linux_install/linux_install.html#linux-installation

Raspbian : Linux raspberrypi 3.4.19-a10-aufs+
OpenCV: OpenCV-2.4.3.tar.bz2 (os recomiendo entrar y descargar la última versión)
http://OpenCV.org

¿Quizas antes de hacer la instalación deberías decidir si libjpeg o libjpeg-turbo?
May be if you are reading this you should to think libjpeg or libjpeg-turbo?
  1. ¿Dónde vamos a hacer la instalación?
    1. Tarjeta ¿Hay espacio?, Con 2 GB suficiente pero mejor una de 8GB (que luego ya iremos necesitando)

      S.ficheros     Tamaño Usados  Disp Uso% Montado en
      rootfs           7,3G   1,5G  5,5G  22% /


      NOTA: Se hace un poco lenta, pero funciona

      ¿Por qué sobre la tarjeta? En el futuro quiero que esta placa sea el "razonador lógico" (no me gusta la definición inteligencia artificial), además de portátil debe consumir poco y un disco duro por muy ligero que sea, tiene un consumo muy alto para baterías (1A a 5 V)
  2. Descargar la última versión
    1. Yo instale esta OpenCV-2.4.3.tar.bz2  de todas formas buscar la última versión.
  3. Dependencias
    Bueno para hacer la instalación necesitamos hacer nuestra máquina con una base de herramientas necesarias. Describir cada una de ellas se escapa de este blog, pero las más interesante es cmake que nos permitirá configurar nuestra compilación e instalación.

    sudo apt-get -y install build-essential cmake pkg-config libpng12-0 libpng12-dev libpng++-dev libpng3 libpnglite-dev zlib1g-dbg zlib1g zlib1g-dev pngtools libtiff4-dev libtiff4 libtiffxx0c2 libtiff-tools

    sudo apt-get -y install libjpeg8 libjpeg8-dev libjpeg8-dbg libjpeg-progs ffmpeg libavcodec-dev libavcodec53 libavformat53 libavformat-dev libgstreamer0.10-0-dbg libgstreamer0.10-0 libgstreamer0.10-dev libxine1-ffmpeg libxine-dev libxine1-bin libunicap2 libunicap2-dev libdc1394-22-dev libdc1394-22 libdc1394-utils swig libv4l-0 libv4l-dev python-numpy libpython2.6 python-dev python2.6-dev libgtk2.0-dev pkg-config
  4. Ahora vamos por pasos a instalar
    1. Nuestro directorio OpenCV con su versión OpenCV-2.4.3.tar.bz2

      tar -xvjpf OpenCV-2.4.3.tar.bz2
      rm OpenCV-2.4.3.tar.bz2
      cd OpenCV-2.4.3.tar.bz2
      mkdir build
      cd build

    2. Preconfigurando la compilación
      Con esto le diremos que nos compile lo que necesitemos, con este se crea una instalación bastante estándar, además de instalar el soporte para python


      cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_PYTHON_SUPPORT=ON -D BUILD_EXAMPLES=ON ..

      make
      sudo make install

  5. Últimos pasos
    1. Unas configuraciones para indicar las bibliotecas y librerías.

      $ sudo vi /etc/ld.so.conf.d/opencv.conf

      Si no existe lo creamos y añadimos la siguiente línea

      /usr/local/lib

      Configuramos el enlace dinámico de las librerías

      $sudo ldconfig -v

    2. Configuramos el sistema de bashrc de modo global

      sudo vi /etc/bash.bashrc
      Y añadimos la siguiente línea

      PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig export PKG_CONFIG_PATH
  6. Probando OpenCV
    1. Nos vamos al directorio de ejemplos de C
      ~/OpenCV/OpenCV-2.4.3/build/bin

      convexhull

      kmeans

      drawing

Hull

Cluster


Dibujos



Siguientes pasos

Wednesday, January 9, 2013

Vaso Medio lleno, vaso medio vacio, o ... sobra vaso

Bueno ahora ya hemos visto que nuestra cubieboard es más lenta en procesamiento que un dos nucleos (cielos y tanto estudiar para esto :S)
¿Pero eso realmente significa que es malo ?

¿ Realmente cuanta potencia necesito ?

Para contestar esa pregunta hay que hacer otra pregunta.

¿Qué vamos a hacer ?

Algún ejemplo
Por ejemplo el software de  cabina del space shutthle (1981) (transbordador espacial ) funcionaba con un intel 8086 y luego fue un 80386.
Los equipos de la estación internacional espacial (ISS) usan para los comandos  un 80386.
http://www.gratisprogramas.org/descargar/los-cpu-de-las-naves-espaciales-computadoras-en-el-espacio/

Ahora si queremos jugar al Angrybirds igual necesitamos algo más.

¿Qué voy a hacer?

Una vez visto los ejemplos me tendré que centrar en lo que yo quiero hacer.
  1. Visión artificial con Opencv (umm igual se me queda corto, pero estamos hablando de una plataforma de estudio)
  2. Manejo y comunicación con arduinos
  3. Estudiar temas de Inteligencia artificial para problemas racionales. (aquí estoy algo verde)
Bueno pues ya tengo tarea para estudiar.
Iré poniendo los temas de las cosas que vaya aprendiendo.