SlideShare a Scribd company logo
1 of 3
#-------------------------------------------------
#
# Project created by QtCreator 2013-07-02T14:44:42
#
#-------------------------------------------------
QT += core
QT -= gui
TARGET = sincmake
CONFIG += console
CONFIG -= app_bundle
TEMPLATE = app
SOURCES += main.cpp
INCLUDEPATH += C:opencvbuildinclude
LIBS +=-LC:opencvbuildx86mingwlib
-lopencv_core245
-lopencv_highgui245
-lopencv_imgproc245
-lopencv_video245
////////////////////////// main.cpp////////////////////////////
#include <QCoreApplication>
#include <iostream>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
using namespace std;
using namespace cv;
int main()
{
//QCoreApplication a(argc, argv);
/*
IplImage *image = cvLoadImage("C:celular.jpg");
Mat im(image);
imshow("TEST",im);
waitKey();
*/
IplImage *image = cvLoadImage("C:lena.jpg",1);
cvShowImage("TEST",image);
cvWaitKey();
cout<<"Hola mundo cruel ... "<<endl;
return 0;
}
/////////////////////////////////////
#include <QCoreApplication>
#include <iostream>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv/cv.h>
using namespace std;
using namespace cv;
int main()
{
cout<<"Hola Mundo Cruel .."<<endl;
IplImage* src; // imagen de color base
IplImage* colorThresh; // contendrá la imagen de color binarizada
IplImage* gray; // contendrá la imagen convertida en escala de grises
IplImage* grayThresh; // imagen binaria conseguida a partir de la imagen en
escala de grises
int threshold = 120; // definimos el valor umbral
int maxValue = 255; // definimos el valor máximo
int thresholdType = CV_THRESH_BINARY; // definimos el tipo de binarización
src = cvLoadImage("C:lena.jpg"); // cargamos imagen de color
colorThresh = cvCloneImage( src ); // copiamos esa imagen de color
gray=cvCreateImage( cvSize(src->width, src->height), IPL_DEPTH_8U, 1 );
// la imagen de intensidad tendrá la misma configuración
// que la fuente pero con un solo canal
cvCvtColor( src, gray, CV_BGR2GRAY ); // pasamos la imagen de color a escala
de grises
grayThresh = cvCloneImage( gray ); // copiamos la imagen en escala
// de grises (truco anterior)
cvNamedWindow( "src", 1 ); // representamos la imagen de color
cvShowImage( "src", src );
cvNamedWindow( "gray", 1 ); // representamos la imagen de intensidad
cvShowImage( "gray", gray );
cvThreshold(src, colorThresh, threshold, maxValue, thresholdType);
// binarizamos la imagen de color
cvThreshold(gray, grayThresh, threshold, maxValue, thresholdType);
// binarizamos la imagen de intensidad
cvNamedWindow( "colorThresh", 1 ); // representamos la imagen
// de color binarizada
cvShowImage( "colorThresh", colorThresh );
cvNamedWindow( "grayThresh", 1 ); // representamosla imagen
// de intensidad binarizada
cvSaveImage("lena1.bmp", gray); // guardamos la imagen
cvSaveImage("lena2.bmp", grayThresh); // guardamos la imagen
cvShowImage( "grayThresh", grayThresh );
cvWaitKey(0); // pulsamos tecla para terminar
cvDestroyWindow( "src" ); // destruimos todas las ventanas
cvDestroyWindow( "colorThresh" );
cvDestroyWindow( "gray" );
cvDestroyWindow( "grayThresh" );
cvReleaseImage( &src ); // eliminamos todas las imágenes
cvReleaseImage( &colorThresh );
cvReleaseImage( &gray );
cvReleaseImage( &grayThresh );
//getch (1);
cout<<"Adios Mundo Cruel .."<<endl;
return 0;
}
////////////////////////////////////////////
Modulo de Tratamiento de imagenes.
___________________________________________
Binarizacion ---> ok.
Filtracion. --->
Segmentacion. --->
Escalamiento. --->
Extraccion. --->

More Related Content

Viewers also liked

Caching in Distributed Environment
Caching in Distributed EnvironmentCaching in Distributed Environment
Caching in Distributed Environmentabhigad
 
VU University Amsterdam - The Social Web 2016 - Lecture 3
VU University Amsterdam - The Social Web 2016 - Lecture 3VU University Amsterdam - The Social Web 2016 - Lecture 3
VU University Amsterdam - The Social Web 2016 - Lecture 3Davide Ceolin
 
Iowa Supreme Court Decision - 4/09 - Gay Marriage
Iowa Supreme Court Decision - 4/09 - Gay MarriageIowa Supreme Court Decision - 4/09 - Gay Marriage
Iowa Supreme Court Decision - 4/09 - Gay Marriageultravox63
 
Software as Service
Software as ServiceSoftware as Service
Software as Serviceabhigad
 
Monetising your startup from the word go with advertising & affiliates
Monetising your startup from the word go with advertising & affiliatesMonetising your startup from the word go with advertising & affiliates
Monetising your startup from the word go with advertising & affiliatesDigi Joe
 
Community Investment Zone - Development Team Presentation
Community Investment Zone - Development Team PresentationCommunity Investment Zone - Development Team Presentation
Community Investment Zone - Development Team Presentationbiferguson
 
Örjan Lönngren - Energianvändning kopplat till tillagning
Örjan Lönngren - Energianvändning kopplat till tillagningÖrjan Lönngren - Energianvändning kopplat till tillagning
Örjan Lönngren - Energianvändning kopplat till tillagningKlimatkommunerna
 
Catch and Release - Tracking Sydney's creative industries
Catch and Release - Tracking Sydney's creative industriesCatch and Release - Tracking Sydney's creative industries
Catch and Release - Tracking Sydney's creative industriesChris Brennan-Horley
 
New Ralcorp Site Presentation
New Ralcorp Site PresentationNew Ralcorp Site Presentation
New Ralcorp Site Presentationjwaddles80
 
Bootstrapping your startup & building it lean: stop wasting time
Bootstrapping your startup & building it lean: stop wasting timeBootstrapping your startup & building it lean: stop wasting time
Bootstrapping your startup & building it lean: stop wasting timeJoel Gascoigne
 

Viewers also liked (19)

Caching in Distributed Environment
Caching in Distributed EnvironmentCaching in Distributed Environment
Caching in Distributed Environment
 
VU University Amsterdam - The Social Web 2016 - Lecture 3
VU University Amsterdam - The Social Web 2016 - Lecture 3VU University Amsterdam - The Social Web 2016 - Lecture 3
VU University Amsterdam - The Social Web 2016 - Lecture 3
 
Iowa Supreme Court Decision - 4/09 - Gay Marriage
Iowa Supreme Court Decision - 4/09 - Gay MarriageIowa Supreme Court Decision - 4/09 - Gay Marriage
Iowa Supreme Court Decision - 4/09 - Gay Marriage
 
Fotoalbum TCF
Fotoalbum TCFFotoalbum TCF
Fotoalbum TCF
 
Content Strategy
Content StrategyContent Strategy
Content Strategy
 
Software as Service
Software as ServiceSoftware as Service
Software as Service
 
W200 Ppt
W200 PptW200 Ppt
W200 Ppt
 
Monetising your startup from the word go with advertising & affiliates
Monetising your startup from the word go with advertising & affiliatesMonetising your startup from the word go with advertising & affiliates
Monetising your startup from the word go with advertising & affiliates
 
Water Disaster
Water DisasterWater Disaster
Water Disaster
 
Open Data
Open DataOpen Data
Open Data
 
Windows XP
Windows XPWindows XP
Windows XP
 
E Port
E PortE Port
E Port
 
Community Investment Zone - Development Team Presentation
Community Investment Zone - Development Team PresentationCommunity Investment Zone - Development Team Presentation
Community Investment Zone - Development Team Presentation
 
Mvc
MvcMvc
Mvc
 
Örjan Lönngren - Energianvändning kopplat till tillagning
Örjan Lönngren - Energianvändning kopplat till tillagningÖrjan Lönngren - Energianvändning kopplat till tillagning
Örjan Lönngren - Energianvändning kopplat till tillagning
 
Unenclosable
UnenclosableUnenclosable
Unenclosable
 
Catch and Release - Tracking Sydney's creative industries
Catch and Release - Tracking Sydney's creative industriesCatch and Release - Tracking Sydney's creative industries
Catch and Release - Tracking Sydney's creative industries
 
New Ralcorp Site Presentation
New Ralcorp Site PresentationNew Ralcorp Site Presentation
New Ralcorp Site Presentation
 
Bootstrapping your startup & building it lean: stop wasting time
Bootstrapping your startup & building it lean: stop wasting timeBootstrapping your startup & building it lean: stop wasting time
Bootstrapping your startup & building it lean: stop wasting time
 

Similar to Archivo pro

Breve introducción práctica al DevOps - (es) 2021_03_18
Breve introducción práctica al DevOps -  (es) 2021_03_18Breve introducción práctica al DevOps -  (es) 2021_03_18
Breve introducción práctica al DevOps - (es) 2021_03_18Young Suk Ahn Park
 
HTML Tour - Programación de Videojuegos HTML5
HTML Tour - Programación de Videojuegos HTML5HTML Tour - Programación de Videojuegos HTML5
HTML Tour - Programación de Videojuegos HTML5Plain Concepts
 
Magallanes, Herramienta de despliegue PHP sencilla y poderosa
Magallanes, Herramienta de despliegue PHP sencilla y poderosa�Magallanes, Herramienta de despliegue PHP sencilla y poderosa�
Magallanes, Herramienta de despliegue PHP sencilla y poderosaFco Javier Núñez Berrocoso
 
Compilar y Debug en Android
Compilar y Debug en AndroidCompilar y Debug en Android
Compilar y Debug en AndroidBarcelona GTUG
 
Instalacion de Postrgre sql en ubuntu
Instalacion de Postrgre sql en ubuntuInstalacion de Postrgre sql en ubuntu
Instalacion de Postrgre sql en ubuntuDavid Vevelas
 
Thunder cache 3.1.2 en centos 6.3
Thunder cache 3.1.2 en centos 6.3Thunder cache 3.1.2 en centos 6.3
Thunder cache 3.1.2 en centos 6.3Loquenecesito,com
 
Test Unitarios y E2E front y Back
Test Unitarios y E2E front y BackTest Unitarios y E2E front y Back
Test Unitarios y E2E front y BackEric Zeidan
 
Cómo hacer front end y parecer bueno
Cómo hacer front end y parecer buenoCómo hacer front end y parecer bueno
Cómo hacer front end y parecer buenoRafael Terán Torralbo
 
Numeros de armstrong en c programacion estructurada
Numeros de armstrong en c programacion estructuradaNumeros de armstrong en c programacion estructurada
Numeros de armstrong en c programacion estructuradaAndreyAraya5
 
Número mayor y menor de una secuencia de enteros positivos en C++.
Número mayor y menor de una secuencia de enteros positivos en  C++.Número mayor y menor de una secuencia de enteros positivos en  C++.
Número mayor y menor de una secuencia de enteros positivos en C++.Carlos Aviles Galeas
 
Introducción a las librerías PyGame y PyOpenGL
Introducción a las librerías PyGame y PyOpenGLIntroducción a las librerías PyGame y PyOpenGL
Introducción a las librerías PyGame y PyOpenGLkdeespana
 
Conferencia Rails: Integracion Continua Y Rails
Conferencia Rails: Integracion Continua Y RailsConferencia Rails: Integracion Continua Y Rails
Conferencia Rails: Integracion Continua Y RailsDavid Calavera
 
Porqué Cervantes programaba mejor que tú
Porqué Cervantes programaba mejor que túPorqué Cervantes programaba mejor que tú
Porqué Cervantes programaba mejor que túAgile Spain
 

Similar to Archivo pro (20)

Breve introducción práctica al DevOps - (es) 2021_03_18
Breve introducción práctica al DevOps -  (es) 2021_03_18Breve introducción práctica al DevOps -  (es) 2021_03_18
Breve introducción práctica al DevOps - (es) 2021_03_18
 
HTML Tour - Programación de Videojuegos HTML5
HTML Tour - Programación de Videojuegos HTML5HTML Tour - Programación de Videojuegos HTML5
HTML Tour - Programación de Videojuegos HTML5
 
Graficas especiales
Graficas especialesGraficas especiales
Graficas especiales
 
Magallanes, Herramienta de despliegue PHP sencilla y poderosa
Magallanes, Herramienta de despliegue PHP sencilla y poderosa�Magallanes, Herramienta de despliegue PHP sencilla y poderosa�
Magallanes, Herramienta de despliegue PHP sencilla y poderosa
 
Compilar y Debug en Android
Compilar y Debug en AndroidCompilar y Debug en Android
Compilar y Debug en Android
 
Instalacion de Postrgre sql en ubuntu
Instalacion de Postrgre sql en ubuntuInstalacion de Postrgre sql en ubuntu
Instalacion de Postrgre sql en ubuntu
 
Taller de Capistrano
Taller de CapistranoTaller de Capistrano
Taller de Capistrano
 
Webpack desde cero
Webpack desde ceroWebpack desde cero
Webpack desde cero
 
Ensamblador y lenguaje c
Ensamblador y lenguaje cEnsamblador y lenguaje c
Ensamblador y lenguaje c
 
Thunder cache 3.1.2 en centos 6.3
Thunder cache 3.1.2 en centos 6.3Thunder cache 3.1.2 en centos 6.3
Thunder cache 3.1.2 en centos 6.3
 
Test Unitarios y E2E front y Back
Test Unitarios y E2E front y BackTest Unitarios y E2E front y Back
Test Unitarios y E2E front y Back
 
6.funciones y recursividad en c++
6.funciones y recursividad en c++6.funciones y recursividad en c++
6.funciones y recursividad en c++
 
Cómo hacer front end y parecer bueno
Cómo hacer front end y parecer buenoCómo hacer front end y parecer bueno
Cómo hacer front end y parecer bueno
 
Numeros de armstrong en c programacion estructurada
Numeros de armstrong en c programacion estructuradaNumeros de armstrong en c programacion estructurada
Numeros de armstrong en c programacion estructurada
 
Número mayor y menor de una secuencia de enteros positivos en C++.
Número mayor y menor de una secuencia de enteros positivos en  C++.Número mayor y menor de una secuencia de enteros positivos en  C++.
Número mayor y menor de una secuencia de enteros positivos en C++.
 
Introducción a las librerías PyGame y PyOpenGL
Introducción a las librerías PyGame y PyOpenGLIntroducción a las librerías PyGame y PyOpenGL
Introducción a las librerías PyGame y PyOpenGL
 
Conferencia Rails: Integracion Continua Y Rails
Conferencia Rails: Integracion Continua Y RailsConferencia Rails: Integracion Continua Y Rails
Conferencia Rails: Integracion Continua Y Rails
 
Test bench en vhdl
Test bench en vhdlTest bench en vhdl
Test bench en vhdl
 
Gwt III - Avanzado
Gwt III - AvanzadoGwt III - Avanzado
Gwt III - Avanzado
 
Porqué Cervantes programaba mejor que tú
Porqué Cervantes programaba mejor que túPorqué Cervantes programaba mejor que tú
Porqué Cervantes programaba mejor que tú
 

Archivo pro

  • 1. #------------------------------------------------- # # Project created by QtCreator 2013-07-02T14:44:42 # #------------------------------------------------- QT += core QT -= gui TARGET = sincmake CONFIG += console CONFIG -= app_bundle TEMPLATE = app SOURCES += main.cpp INCLUDEPATH += C:opencvbuildinclude LIBS +=-LC:opencvbuildx86mingwlib -lopencv_core245 -lopencv_highgui245 -lopencv_imgproc245 -lopencv_video245 ////////////////////////// main.cpp//////////////////////////// #include <QCoreApplication> #include <iostream> #include <opencv2/core/core.hpp> #include <opencv2/highgui/highgui.hpp> using namespace std; using namespace cv; int main() { //QCoreApplication a(argc, argv); /* IplImage *image = cvLoadImage("C:celular.jpg"); Mat im(image); imshow("TEST",im); waitKey(); */ IplImage *image = cvLoadImage("C:lena.jpg",1); cvShowImage("TEST",image); cvWaitKey(); cout<<"Hola mundo cruel ... "<<endl; return 0; }
  • 2. ///////////////////////////////////// #include <QCoreApplication> #include <iostream> #include <opencv2/core/core.hpp> #include <opencv2/highgui/highgui.hpp> #include <opencv/cv.h> using namespace std; using namespace cv; int main() { cout<<"Hola Mundo Cruel .."<<endl; IplImage* src; // imagen de color base IplImage* colorThresh; // contendrá la imagen de color binarizada IplImage* gray; // contendrá la imagen convertida en escala de grises IplImage* grayThresh; // imagen binaria conseguida a partir de la imagen en escala de grises int threshold = 120; // definimos el valor umbral int maxValue = 255; // definimos el valor máximo int thresholdType = CV_THRESH_BINARY; // definimos el tipo de binarización src = cvLoadImage("C:lena.jpg"); // cargamos imagen de color colorThresh = cvCloneImage( src ); // copiamos esa imagen de color gray=cvCreateImage( cvSize(src->width, src->height), IPL_DEPTH_8U, 1 ); // la imagen de intensidad tendrá la misma configuración // que la fuente pero con un solo canal cvCvtColor( src, gray, CV_BGR2GRAY ); // pasamos la imagen de color a escala de grises grayThresh = cvCloneImage( gray ); // copiamos la imagen en escala // de grises (truco anterior) cvNamedWindow( "src", 1 ); // representamos la imagen de color cvShowImage( "src", src ); cvNamedWindow( "gray", 1 ); // representamos la imagen de intensidad cvShowImage( "gray", gray ); cvThreshold(src, colorThresh, threshold, maxValue, thresholdType); // binarizamos la imagen de color cvThreshold(gray, grayThresh, threshold, maxValue, thresholdType); // binarizamos la imagen de intensidad cvNamedWindow( "colorThresh", 1 ); // representamos la imagen // de color binarizada cvShowImage( "colorThresh", colorThresh ); cvNamedWindow( "grayThresh", 1 ); // representamosla imagen // de intensidad binarizada cvSaveImage("lena1.bmp", gray); // guardamos la imagen cvSaveImage("lena2.bmp", grayThresh); // guardamos la imagen cvShowImage( "grayThresh", grayThresh ); cvWaitKey(0); // pulsamos tecla para terminar cvDestroyWindow( "src" ); // destruimos todas las ventanas cvDestroyWindow( "colorThresh" ); cvDestroyWindow( "gray" ); cvDestroyWindow( "grayThresh" ); cvReleaseImage( &src ); // eliminamos todas las imágenes cvReleaseImage( &colorThresh ); cvReleaseImage( &gray ); cvReleaseImage( &grayThresh ); //getch (1); cout<<"Adios Mundo Cruel .."<<endl; return 0; } ////////////////////////////////////////////
  • 3. Modulo de Tratamiento de imagenes. ___________________________________________ Binarizacion ---> ok. Filtracion. ---> Segmentacion. ---> Escalamiento. ---> Extraccion. --->