An Introduction To Opencv Using Python With Ubuntu: Krupali Mistry, Avneet Saluja
An Introduction To Opencv Using Python With Ubuntu: Krupali Mistry, Avneet Saluja
ABSTRACT
OpenCV is an open source library for image and video analysis by Intel.It is related to computer vision, such as
feature and object detection and machine learning.The purpose of the paper is implementation of image processing
techniques using opencv with python in Ubuntu platforms.
Keywords: Opencv, Ubuntu, Python, Image Processing Techniques.
CSEIT16129 | Received: 02 October 2016 | Accepted: 10 October 2016 | September-October-2016 [(2)5: 65-68] 65
cvaux - Auxiliary (experimental) OpenCV
functions Basic Image Transformation Functions or
cxcore - Data structures and linear algebra support Techniques of opencv
highgui - GUI functions, This provides simple
user interface (UI) capabilities. All OpenCV classes and functions are in the cv
imgproc - linear and non-linear image filtering, namespace, and consequently, we will have the
geometrical image transformations, following two options in our source code:
color space conversion, histograms, etc. Add the using namespace cv declaration after
calib3d - multiple-view geometry algorithms, including the header files.
single and stereo camera calibration, etc. Append the cv:: prefix to all the OpenCV classes,
features2d - These are functions for feature functions, and data structures that we use.
detection (corners and planar This option is recommended if the external names
objects), feature description, feature matching, and provided by OpenCV conflict with the often-used
so on. standard template library (STL) or other
objdetect - detection of objects and instances of libraries.
the predefined classes (for example, faces, eyes,
mugs, people, cars, etc.) Image Normalization: process of stretching the range
gpu - GPU-accelerated algorithms from different of an image from [a, b] to [c, d], important for
visualization, normalize(imagein, imageout, low, high,
OpenCV modules
method). This is incredibly important for visualization
others – helper
because if the image is beyond [0,255] it will cause
truncation or unsightly effects.
Basic opencv Data Structures
Point, Point2f - 2D Point: int x,y several operators
and fuctions available
Size - 2D size structure: int width, height
Rect - 2D rectangle object int x, y, width, height
RotatedRect - Rect object with angle
Mat - image object mainly - rows, cols - length
and width, channels, depth,a large number of Figure 1. Image Normalization Results
functions for manipulation, a critical being
Mat.type() returns the TYPE of a matrix Thresholding threshold( image, image, thresh, maxVal,
CODE), codes e.g. THRESH_BINARY
OpenCV: Types
V. REFERENCES
[1] http://www.sourceforge.net/projects/opencvlibrar
Figure 5. Image Erosion Results y Computer VisionHomepage
[2] http://www-2.cs.cmu.edu/~cil/vision.html
Notice the change in eyes, illuminates spots in the eyes [3] R. Szeliski. Computer Vision: Algorithms and
are removed because in the input image there is a stark Applications. Springer 2011.
change in illumination at points near pupil. [4] http://opencv.willowgarage.com/wiki/
[5] http://en.wikipedia.org/wiki/BSD_license
Dilation: [6] R. Laganière. OpenCV 2 Computer Vision
Application Programming Cookbook. Packt
Dilation dilates the image. It tries to bring uniformity Publishing 2011
in image by converting dark points in neighborhood of [7] J. Canny. A Computational approach to edge
points of higher intensity into bright ones. detection. IEEE Transactions on Pattern Analysis
and Image Understanding, vol.18 (6), pp. 679-
698, 1986.