Computer Vision and Apps         Antonio Radesca        Developer-Architect              MCPD         antrad@libero.it ant...
Computer Vision• Transformation of data from a still or  video camera into either a decision or a  new representation.• Da...
Machine prospective• A 2d Image of a 3d object.• No definite way to reconstruct the 3d  image.4/14/2013          Confident...
Machine prospective• Images are corrupted by noise and  distortions.• (weather, lighting, reflections, move  ments)4/14/20...
OpenCV• OpenCV (Open Source Computer  Vision)• library of programming functions for real  time computer vision. (computer ...
OpenCV4/14/2013      Confidential   6
OpenCV4/14/2013      Confidential   7
Applications• Human-Computer Interaction (HCI)• Object Identification, Segmentation and  Recognition• Face Recognition• Mo...
Who uses• license for OpenCV has been structured    such that you can build a commercial    product using all or part of O...
Using OpenCV• Use static libraries• Compile OpenCV• Download sample from GITHUB4/14/2013         Confidential   10
Basic Structtypedef struct _IplImage{int nSize;int ID;int nChannels;int alphaChannel;int depth;char colorModel[4];char cha...
Some Code...4/14/2013         Confidential   12
Image inversion sample4/14/2013   Confidential   13
Erosion•   Characteristics of Erosion•   Erosion generally decreases the sizes of objects and removes    small anomalies b...
cvErode•   void cvErode( const CvArr* src, CvArr* dst, IplConvKernel*    element=NULL, int iterations=1 );•   If it is NUL...
Dilation• Characteristics of Dilation• Dilation generally increases the sizes of objects, filling in  holes and broken are...
Dilate•   void cvDilate( const CvArr* src, CvArr* dst, IplConvKernel*    element=NULL, int iterations=1 );•   If it is NUL...
Edge Detection (Canny Algorithm)     4/14/2013   Confidential   18
FaceDetection4/14/2013          Confidential   19
Resources• Download Open CV -  http://sourceforge.net/projects/open  cvlibrary/• Install guide and tutorials -  http://ope...
Thanks • Questions?                    21
Upcoming SlideShare
Loading in …5
×

Computer vision

1,053 views

Published on

OpenCV & iOS

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,053
On SlideShare
0
From Embeds
0
Number of Embeds
25
Actions
Shares
0
Downloads
52
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Computer vision

  1. 1. Computer Vision and Apps Antonio Radesca Developer-Architect MCPD antrad@libero.it antonio@nextgenerationteam.com Fiore Rosalba www.fiorerosalba.biz 1
  2. 2. Computer Vision• Transformation of data from a still or video camera into either a decision or a new representation.• Data - > “the camera is mounted in a car” or “laser range fi nder indicates an object is 1 meter away”.• Decision -> “there is a person in this scene” or “there are 14 tumor cells on this slide”• New representation -> turning a color image into a grayscale image4/14/2013 Confidential 2
  3. 3. Machine prospective• A 2d Image of a 3d object.• No definite way to reconstruct the 3d image.4/14/2013 Confidential 3
  4. 4. Machine prospective• Images are corrupted by noise and distortions.• (weather, lighting, reflections, move ments)4/14/2013 Confidential 4
  5. 5. OpenCV• OpenCV (Open Source Computer Vision)• library of programming functions for real time computer vision. (computer efficiency)• Written in optimized C and C++• Runs in windows, Linux and MAC OS.• Can develop in C, C++, python, ruby, matlab,Java,.NET4/14/2013 Confidential 5
  6. 6. OpenCV4/14/2013 Confidential 6
  7. 7. OpenCV4/14/2013 Confidential 7
  8. 8. Applications• Human-Computer Interaction (HCI)• Object Identification, Segmentation and Recognition• Face Recognition• Motion Tracking, Ego Motion, Motion Understanding• Stereo and Multi-Camera Calibration and Depth Computation• Mobile Robotics4/14/2013 Confidential 8
  9. 9. Who uses• license for OpenCV has been structured such that you can build a commercial product using all or part of OpenCV.• You are under no obligation to opensource• large user community that includes people from major companies (IBM, Microsoft , Intel, SONY, Siemens, and Google, to name only a few) and research centers (such as Stanford, MIT, CMU, Cambridge, and4/14/2013 Confidential 9 INRIA).
  10. 10. Using OpenCV• Use static libraries• Compile OpenCV• Download sample from GITHUB4/14/2013 Confidential 10
  11. 11. Basic Structtypedef struct _IplImage{int nSize;int ID;int nChannels;int alphaChannel;int depth;char colorModel[4];char channelint dataOrder;int origin;int align;int width;int height;struct _IplROI *roi;struct _IplImage *maskROI;void *imageId;struct _IplTileInfo *tileInfint imageSize;char *imageData;int widthStep;char *imageDataOrigin;}IplImage;4/14/2013 Confidential 11
  12. 12. Some Code...4/14/2013 Confidential 12
  13. 13. Image inversion sample4/14/2013 Confidential 13
  14. 14. Erosion• Characteristics of Erosion• Erosion generally decreases the sizes of objects and removes small anomalies by subtracting objects with a radius smaller than the structuring element.• With grayscale images, erosion reduces the brightness (and therefore the size) of bright objects on a dark background by taking the neighborhood minimum when passing the structuring element over the image.• With binary images, erosion completely removes objects smaller than the structuring element and removes perimeter pixels from larger image objects.4/14/2013 Confidential 14
  15. 15. cvErode• void cvErode( const CvArr* src, CvArr* dst, IplConvKernel* element=NULL, int iterations=1 );• If it is NULL, a 3×3 rectangular structuring element is used. iterationsNumber of times erosion is applied. The function cvErode erodes the source image using the specified structuring element that determines the shape of a pixel neighborhood over which the minimum is taken:• dst=erode(src,element): dst(x,y)=min((x,y) in element))src(x+x,y+y) The function supports the in-place mode. Erosion can be applied several (iterations) times. In case of color image each channel is processed independently.4/14/2013 Confidential 15
  16. 16. Dilation• Characteristics of Dilation• Dilation generally increases the sizes of objects, filling in holes and broken areas, and connecting areas that are separated by spaces smaller than the size of the structuring element.• With grayscale images, dilation increases the brightness of objects by taking the neighborhood maximum when passing the structuring element over the image.• With binary images, dilation connects areas that are separated by spaces smaller than the structuring element and adds pixels to the perimeter of each image object.4/14/2013 Confidential 16
  17. 17. Dilate• void cvDilate( const CvArr* src, CvArr* dst, IplConvKernel* element=NULL, int iterations=1 );• If it is NULL, a 3×3 rectangular structuring element is used. iterationsNumber of times erosion is applied. The function cvDilate dilates the source image using the specified structuring element that determines the shape of a pixel neighborhood over which the maximum is taken:• dst=dilate(src,element): dst(x,y)=max((x,y) in element))src(x+x,y+y) The function supports the in-place mode. Dilation can be applied several (iterations) times. In case of color image each channel is processed independently.4/14/2013 Confidential 17
  18. 18. Edge Detection (Canny Algorithm) 4/14/2013 Confidential 18
  19. 19. FaceDetection4/14/2013 Confidential 19
  20. 20. Resources• Download Open CV - http://sourceforge.net/projects/open cvlibrary/• Install guide and tutorials - http://opencv.willowgarage.com/wiki /• IDE – eclipse, .net , VC++4/14/2013 Confidential 20
  21. 21. Thanks • Questions?  21

×