Dip Exp1
Dip Exp1
AIM:
To implement: Various OpenCV commands using Python.
THEORY:
OpenCV was started at Intel in 1999 by Gary Bradsky, and the first release came out in
2000. Vadim Pisarevsky joined Gary Bradsky to manage Intel's Russian software OpenCV
team. OpenCV supports a wide variety of programming languages such as C++, Python,
Java, etc., and is available on different platforms including Windows, Linux, OS X,
Android, and iOS. Interfaces for high-speed GPU operations based on CUDA and OpenCL
are also under active development.
OpenCV-Python is the Python API for OpenCV, combining the best qualities of the
OpenCV C++ API and the Python language. OpenCV-Python is a library of Python
bindings designed to solve computer vision problems.
Syntax: cv2.imshow(“img_variable_name”)
d. Rotating an image: Function cv2.rotate() is used to rotate the image (2D array) in
multiples of 90 degrees.
Syntax: cv2.rotate(src, rotateCode[, dst] )
e. Addition of image: Function cv2.add() is used to add images. This function adds
the image directly. Before adding the image, it is necessary to resize the image.
Syntax:
cv2.threshold(source, thresholdValue, maxVal, thresholdingTechnique)
i. Adding Noise to the image: Function cv2.randn fills an array with normally-
distributed random numbers with the specified mean and standard deviation1. It can
be used to add noise to images or generate random images.
1.2 Conclusion:
1.3 References:
i. Gonzalez R, Woods R, “Digital image processing”, Pearson Prentice Hall, 2008.
ii. Gonzalez R, Woods R, Steven E, “Digital Image Processing Using MATLAB®”, McGraw Hill
Education,2010.
iii. Jayaraman S, Esakkirajan S and Veerakumar T,“Digital Image Processing” Tata McGraw Hill,
2010
iv. Joshi, Madhuri A. “Digital Image Processing: an algorithm approach”, PHI Learning Pvt. Ltd.,
2006.
v. Pictures taken from: http://www.imageprocessingplace.com/root_files_V3/image_databases.html
(Course Teacher)