Opencv Divya Sanvi
Opencv Divya Sanvi
(A Central University)
Srinagar Garhwal, Uttarakhand
School of Engineering and Technology
A SEMINAR REPORT ON
“OPEN CV”
Submitted in Partial fulfillment for the award of the degree of
Bachelor of Technology
in Computer Science and Engineering
HNBGU, Srinagar Garhwal (Uttarakhand)
I, Divya Sanvi bearing the roll no. 21134501003, student of Computer Science and
Engineering Department at Hemvati Nandan Bahuguna Garhwal University (A Central
University), Srinagar (Garhwal) Uttarakhand, submit this seminar report entitled “OPEN
CV” to Computer Science and Engineering Department, Hemvati Nandan Bahuguna
Garhwal University, for the award of the Bachelors of Technology in Computer Science
& Engineering and declaring that the work done is genuine and produced under the
guidance of Deepak Nijwala Department of Computer Science and Engineering, Hemvati
Nandan Bahuguna Garhwal University.
I further declare that the reported work in this report has not been submitted and will not be
submitted, either in part or in full, for the award of any other degree in this institute or any
other institute or university.
ii
CERTIFICATE
This is to certify that, this seminar report titled “OPEN CV” submitted by Divya Sanvi
bearing roll no.21134501003 is bonafide record of the work carried out by her in partial
fulfilment for the requirement of the award of Bachelor of Technology in Computer
Science and Engineering from Hemvati Nandan Bahuguna Garhwal University (A Central
University) at Srinagar (Garhwal), Uttarakhand.
This Seminar report has not been submitted to any other University or Institution for the
award of any degree.
Deepak Nijwala
Department of Computer Science & Engineering
Hemvati Nandan Bahuguna Garhwal University
(A Central University)
Srinagar (Garhwal), Uttarakhand
iii
ACKNOWLEDGEMENT
I would like to express my deepest gratitude to all people for sprinkling their help and
kindness in the completion of this seminar. I would like to start this moment by invoking
my purest gratitude to Deepak Nijwala Department of Computer Science and Engineering,
Hemwati Nandan Bahuguna Garhwal University (A Central University), Srinagar
(Garhwal), Uttarakhand.
The completion of this Seminar could not have been possible without his expertise and
invaluable guidance in every phase at Hemvati Nandan Bahuguna Garhwal University (A
Central University), Srinagar (Garhwal), Uttarakhand.
I would like to thank Prof. M.M.S Rauthan, Prof. Y.P Raiwani, all the lab assistants and
other staffs of Computer Science and Engineering Department, Hemvati Nandan Bahuguna
Garhwal University (A Central University), Srinagar (Garhwal), Uttarakhand, for their kind
support. Last but not least, I would like to thank my parents and my friends for their
unwavering belief despite ups and downs in my journey.
iv
ABSTRACT
Introduction Computer vision is a rapidly growing field in technology, where computers are
taught to understand and interpret the visual world around us. By using images and learning
from them, these systems can recognize and categorize objects just like humans, but faster
and sometimes even more accurately.
OpenCV was built to provide a common infrastructure for computer vision applications and
to accelerate the use of machine perception in the commercial products. Being an Apache 2
licensed product, OpenCV makes it easy for businesses to utilize and modify the code.
v
CONTENTS
CERTIFICATE …………………………………………………………………………..…..iii
ACKNOWLEDGEMENT ……………………………………………………………………iv
ABSTRACT ………………………………………………………….……………………….v
REFERENCES ………………………………………………………………………………18
vi
INTRODUCTION
OpenCV is the huge open-source library for the computer vision, machine learning, and image
processing and now it plays a major role in real-time operation which is very important in
today’s systems. By using it, one can process images and videos to identify objects, faces, or
even handwriting of a human. When it integrated with various libraries, such as NumPy, python
is capable of processing the OpenCV array structure for analysis. To identify image pattern and
its various features we use vector space and perform mathematical operations on these features.
The first OpenCV version was 1.0. OpenCV is released under a BSD license and hence it’s free
for both academic and commercial use. It has C++, C, Python and Java interfaces and supports
Windows, Linux, Mac OS, IOS and Android. When OpenCV was designed the main focus was
real-time applications for computational efficiency. All things are written in optimized C/C++
to take advantage of multi-core processing.
OpenCV or Open Source Computer Vision Library is a free and open-source computer vision
and machine learning software library. Written in C and C++ languages and supports a wide
range of programming languages (Python, Java, MATLAB, etc.). It’s a library built upon
various open-source libraries like DL, GPU, and ML. It offers several functions to develop
applications in computer vision. OpenCV’s license allows its use for commercial purpose as
long as the product is open source too.
It was initially developed by Intel Corporation in 1999, and now maintained by Willow Garage
and supported by several other organizations. It contains a lot of tools and functionalities
helpful for developing applications for computer vision.
The library has more than 2500 optimized algorithms, which includes a comprehensive set of
both classic and state-of-the-art computer vision and machine learning algorithms. These
algorithms can be used to detect and recognize faces, identify objects, classify human actions
in videos, track camera movements, track moving objects, extract 3D models of objects,
produce 3D point clouds from stereo cameras, stitch images together to produce a high
resolution image of an entire scene, find similar images from an image database, remove red
eyes from images taken using flash, follow eye movements, recognize scenery and establish
markers to overlay it with augmented reality, etc. OpenCV has more than 47 thousand people
of user community and estimated number of downloads exceeding 18 million. The library is
used extensively in companies, research groups and by governmental bodies.
Along with well-established companies like Google, Yahoo, Microsoft, Intel, IBM, Sony,
Honda, Toyota that employ the library, there are many startups such as Applied Minds, Video
Surf, and Zeitera, that make extensive use of OpenCV. OpenCV’s deployed uses span the range
from stitching street view images together, detecting intrusions in surveillance video in Israel,
monitoring mine equipment in China, helping robots navigate and pick up objects at Willow
Garage, detection of swimming pool drowning accidents in Europe, running interactive art in
Spain and New York, checking runways for debris in Turkey, inspecting labels on products in
factories around the world on to rapid face detection in Japan.
1
(OpenCV 2) which includes main changes to the C++ interface. Nowadays the library has
>2500 optimized algorithms. It is extensively used around the world, having >2.5M downloads
and >40K people in the user group. Regardless of whether one is a novice C++ programmer or
a professional software developer, unaware of OpenCV, the main library content should be
interesting for the graduate students and researchers in image processing and computer vision
areas. To master every library element it is necessary to consult many books available on the
topic of OpenCV. However, reading such more comprehensive material should be easier after
comprehending some basics about OpenCV from this paper.
The library has more than 2500 optimized algorithms, which includes a comprehensive set of
both classic and state-of-the-art computer vision and machine learning algorithms. These
algorithms can be used to detect and recognize faces, identify objects, classify human actions
in videos, track camera movements, track moving objects, extract 3D models of objects,
produce 3D point clouds from stereo cameras, stitch images together to produce a high
resolution image of an entire scene, find similar images from an image database, remove red
eyes from images taken using flash, follow eye movements, recognize scenery and establish
markers to overlay it with augmented reality.
2
HISTORY
OpenCV, which stands for Open Source Computer Vision Library, was indeed initiated
at the Intel Research Center in 1999. Gary Bradski led the project with the goal of
creating a versatile and open-source library that could serve as a common foundation for
computer vision applications and research.
The first public release of OpenCV, Version 1.0, occurred in 2000. In its early stages,
the library was primarily written in the C programming language and focused on
providing fundamental functionalities for image processing and various computer vision
algorithms.
Since its inception, OpenCV has evolved significantly, with contributions from a vast
community of developers and researchers. It has become one of the most widely used
libraries in the field of computer vision, offering support for multiple programming
languages, including C++, Python, and Java, and providing a comprehensive set of tools
for image and video analysis, machine learning, and related tasks.
OpenCV, which stands for Open Source Computer Vision Library, was indeed initiated
at the Intel Research Center in 1999. Gary Bradski led the project with the goal of
creating a versatile and open-source library that could serve as a common foundation for
computer vision applications and research.
The first public release of OpenCV, Version 1.0, occurred in 2000. In its early stages,
the library was primarily written in the C programming language and focused on
providing fundamental functionalities for image processing and various computer vision
algorithms.
Since its inception, OpenCV has evolved significantly, with contributions from a vast
community of developers and researchers. It has become one of the most widely used
libraries in the field of computer vision, offering support for multiple programming
languages, including C++, Python, and Java, and providing a comprehensive set of tools
for image and video analysis, machine learning, and related tasks.
3
APPLICATIONS
OpenCV is widely used for image processing and enhancement due to its rich set of functions
and algorithms. Here are some common image processing tasks that OpenCV can handle:
Noise Reduction: OpenCV offers techniques for noise reduction, including methods like
Gaussian blurring, median blurring, and denoising algorithms like Non-Local Means
Denoising.
Edge Detection: OpenCV includes algorithms for detecting edges in images, such as the Canny
edge detector. Edge detection is essential for tasks like object recognition and image
segmentation.
Image Segmentation: OpenCV provides tools for segmenting images into different regions
based on similarities in color, intensity, or texture. This is useful in applications like object
recognition and scene understanding.
Resizing and Rescaling: OpenCV allows for resizing and rescaling images, which is crucial for
adjusting image dimensions and preparing data for various computer vision tasks.
4
Morphological Operations: OpenCV supports morphological operations such as dilation,
erosion, opening, and closing, which are essential for tasks like removing noise, filling gaps,
and extracting features.
Thresholding: OpenCV allows users to apply thresholding techniques to segment images based
on pixel intensity. This is commonly used for image binarization.
Contour Extraction: OpenCV provides functions for contour extraction, which is useful for
shape analysis and object recognition. OpenCV is widely used for image processing and
enhancement due to its rich set of functions and algorithms.
Here are some common image processing tasks that OpenCV can handle:
Filtering: OpenCV provides functions for applying various filters to images, such as Gaussian
filters, median filters, and bilateral filters. Filtering is commonly used for smoothing or
sharpening images, as well as for noise reduction.
OpenCV offers techniques for noise reduction, including methods like Gaussian blurring,
median blurring, and denoising algorithms like Non-Local Means Denoising.
OpenCV supports morphological operations such as dilation, erosion, opening, and closing,
which are essential for tasks like removing noise, filling gaps, and extracting features.
Thresholding: OpenCV allows users to apply thresholding techniques to segment images based
on pixel intensity. This is commonly used for image binarization.
Contour Extraction: OpenCV provides functions for contour extraction, which is useful for
shape analysis and object recognition. Traditional robotics often relied on pre-programmed
movements and sensor-based feedback. The introduction of computer vision breaks through
this limitation by providing robots with the ability to "see" and interpret visual data. OpenCV,
an open-source computer vision library, serves as the linchpin for translating visual information
into actionable insights for robots.
OpenCV's extensive set of functions becomes the toolkit for roboticists aiming to imbue their
creations with visual intelligence. From basic image processing to complex machine learning
algorithms, OpenCV offers a versatile platform for handling diverse aspects of visual data.
5
Addressing Integration Challenges
The integration of computer vision into robotics is not without its challenges. Real-time
processing demands, hardware constraints, and adapting to unpredictable environments require
strategic solutions. OpenCV, with its modular structure and optimized algorithms, helps
navigate these challenges effectively.
Applications of OCR:
Document Scanning:
OCR is widely used in document scanning applications to convert printed or handwritten text
into editable and searchable digital content. It simplifies the digitization of paper documents.
Text Analysis:
OCR facilitates the analysis of printed or handwritten text for various purposes, including
sentiment analysis, language processing, and content categorization.
Translation Services:
OCR is integrated into translation applications to convert printed text into machine-readable
format before translation, enabling efficient language translation services.
6
Accessibility Features:
OCR is a key technology in developing accessibility features for visually impaired individuals.
It can convert printed text into speech or braille, enhancing accessibility to printed materials.
Mobile Applications:
OCR is employed in mobile applications, allowing users to extract text from images captured
by their smartphones. This is useful in scenarios like scanning business cards or translating text
from images.
1. Image Preprocessing:
Image Enhancement:-
OpenCV is employed for enhancing the quality of medical images through processes like
contrast adjustment, histogram equalization, and noise reduction. This ensures that the images
are optimized for subsequent analysis.
Image Registration:-
In scenarios where multiple images need to be aligned, OpenCV facilitates image registration
to ensure accurate overlay and comparison of images acquired from different modalities or at
different time points.
2. Anomaly Detection:
Tumor Detection:-
OpenCV's image processing and analysis capabilities are harnessed to detect tumors or
abnormal growths in medical images. Techniques like edge detection, contour analysis, and
machine learning based methods contribute to accurate tumor identification.
Lesion Detection:-
For conditions like skin lesions or abnormalities, OpenCV aids in identifying and analyzing
regions of interest, enabling healthcare professionals to assess the severity and characteristics
of lesions.
3. Image Segmentation:
Organ Segmentation:
OpenCV's segmentation algorithms are utilized to separate and identify specific organs or
structures within medical images. This is crucial for detailed anatomical analysis and treatment
planning.
7
Vessel Segmentation:
In angiography or vascular imaging, OpenCV assists in segmenting blood vessels. This
segmentation is valuable for studying vascular structures, identifying blockages, and planning
interventions.
4. Feature Extraction:
Texture Analysis:
OpenCV's texture analysis capabilities are applied to extract textural features from medical
images. This information is valuable for distinguishing between different tissue types and
identifying abnormalities based on texture patterns.
Morphological Features:
Morphological operations in OpenCV are used to extract shape-related features, aiding in the
characterization of structures within medical images.
Quantitative Analysis:
OpenCV allows for quantitative analysis of medical images, enabling the measurement of
anatomical structures, tracking changes over time, and providing objective metrics for disease
assessment.
8
Here's how OpenCV contributes to the effectiveness of security monitoring:
1. Video Surveillance:
Object Detection:
OpenCV facilitates the detection of objects in security camera footage. By using techniques
like Haar cascades or more advanced deep learning-based methods, security systems can
identify and track people, vehicles, or specific objects of interest.
Motion Detection:
Motion detection algorithms in OpenCV are valuable for identifying sudden movements in the
camera's field of view. This is particularly useful for detecting unauthorized intruders or
suspicious activities in restricted areas.
2. Intrusion Detection:
Perimeter Monitoring:
Security systems often use OpenCV to monitor perimeters, such as fences or entry points.
Intrusion detection algorithms can trigger alerts when individuals or objects cross predefined
boundaries.
Facial Recognition:
OpenCV's facial recognition capabilities enhance security by identifying individuals in real-
time. This can be used to grant access to authorized personnel or generate alerts for the presence
of individuals on watch lists.
3. Crowd Monitoring:
9
4. License Plate Recognition:
OpenCV supports license plate recognition (LPR) systems, which are employed in security
applications such as parking management and access control. LPR can be used to identify and
track vehicles entering or exiting a premises.
Real-time Analysis:
OpenCV enables real-time analysis of security camera footage, allowing for immediate
response to potential security threats.
Alert Generation:
When OpenCV detects suspicious activities or anomalies, it triggers alerts, notifying security
personnel or initiating automated responses such as turning on alarms, activating lighting, or
alerting law enforcement.
OpenCV can be integrated with access control systems to enhance security by combining facial
recognition or object detection with access permissions.
Alarm Systems: OpenCV's analysis results can be integrated with alarm systems to provide a
comprehensive security solution. When an alarm is triggered, security personnel can quickly
assess the situation through the visual data provided by OpenCV.
10
ADVANTAGES
OpenCV provides a vast collection of functions and algorithms covering a wide range of
computer vision and image processing tasks. From basic operations to advanced features, it
serves as a comprehensive toolbox for developers and researchers.
Cross-Platform Compatibility:
OpenCV is designed to be cross-platform, supporting various operating systems, including
Windows, Linux, and MacOS. This cross-platform compatibility ensures that applications
developed with OpenCV can run seamlessly on different environments.
Performance Optimization:
OpenCV is optimized for performance, with many core functions implemented in C and C++.
Additionally, it leverages hardware acceleration through platforms like Intel's Integrated
Performance Primitives (IPP) and NVIDIA CUDA, maximizing efficiency in image processing
tasks.
Real-Time Capabilities:
OpenCV is well-suited for real-time applications, making it an ideal choice for tasks like video
analysis, object detection, and tracking. Its efficiency and optimization make it capable of
handling high-speed video streams in real-time.
11
Compatibility with Multiple Languages:
While primarily developed in C and C++, OpenCV provides bindings for various programming
languages, including Python, Java, and MATLAB. This language flexibility allows developers
to choose the language that best fits their project requirements.
12
OPEN CV DEVELOPMENT
The OpenCV community is committed to continuous development and improvement. Regular
updates and releases ensure that the library stays current with the latest advancements in
computer vision research and technology.
Community-driven Development:
The development of OpenCV is driven by the needs and contributions of the community. Users
can submit feature requests, report bugs, and actively participate in discussions about the future
direction of the library.
GitHub Repository:
The primary development of OpenCV takes place on its GitHub repository. Community
members can fork the repository, submit pull requests, and participate in discussions related to
ongoing development.
14
Getting Started with OpenCV:
1. Installation:
Start by installing OpenCV on your development environment. You can use package managers,
source code compilation, or pre-built binaries depending on your platform and preferences.
2. Learning OpenCV:
Documentation: Familiarize yourself with the official OpenCV documentation. It provides
comprehensive information on functions, modules, and usage.
Tutorials and Examples: Explore tutorials and code examples available in the OpenCV
documentation and community-contributed resources. This helps in understanding practical
implementations.
4. Contributing to OpenCV:
GitHub Repository: The primary development of OpenCV happens on GitHub. Contribute to
the project by forking the repository, making changes, and submitting pull requests.
Bug Reports and Fixes: Report bugs on the issue tracker, and if you find a solution, contribute
by submitting fixes.
Feature Requests: Engage in discussions about new features or improvements. OpenCV
development is driven by community needs.
7. Real-time Applications:
Real-time Processing: Exploit OpenCV's efficiency for real-time image and video processing.
This is crucial for applications like surveillance, robotics, and augmented reality.
Camera Integration: Interface with cameras (webcams or other imaging devices) using
OpenCV for live video input.
15
8. Optimization and Parallel Processing:
Performance Optimization: Optimize your code for better performance using OpenCV's built-
in optimization features.
Parallel Processing: Explore parallel processing capabilities, especially if you are working with
large datasets or real-time applications.
16
CONCLUSION
17
REFRENCES
https://en.wikipedia.org/wiki/Motion_detection
https://www.techtarget.com/whatis/definition/medical-
imaging https://gencraft.com/generate
https://slideplayer.com/user/5541293/
https://www.mathworks.com/discovery/image-enhancement.html
18