SlideShare a Scribd company logo
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 10 Issue: 06 | Jun 2023 www.irjet.net p-ISSN: 2395-0072
© 2023, IRJET | Impact Factor value: 8.226 | ISO 9001:2008 Certified Journal | Page 311
Implementation of Computer Vision Applications usingOpenCV in C++
Adwait Bhave, Vaishnavi Jadhav, Punit Bhandari, Vaishnavi Patil
Department of Electronics and Telecommunication Engineering, Pune Vidyarthi Griha’s College of
Engineering Technology Project Guide: Prof. Anand Najan
Sponsored by NSM Solutions Pvt. Ltd.Industry guide: Mr. Nishad Mande
-----------------------------------------------------------------------***----------------------------------------------------------------------
Abstract — Computer Vision (CV) has emerged as a
critical field in various domains, ranging from
autonomous vehicles to medical imaging. OpenCV, an
open-source computer vision library, provides a rich
set of functions and algorithms for image processing,
feature detection, object recognition, and more. This
paper presents a comprehensive study of integrating
OpenCV with C++, aiming to explore its potential for
developing robust and efficient CV applications. We
present practical examples that demonstrate the
seamless integration ofOpenCV with C++. We showcase
real-world applications such as facial recognition,
motion detection, and augmented reality, highlighting
the versatility and extensibility of the OpenCV library
when utilized alongside the C++ programming language
Keywords – Computer Vision, OpenCV, C++, Text
Recognition, colour detection, barcode decoding, Text
on
OpenCV (Open-Source Computer Vision Library) is a
widely-used open-source computer vision and machine
learning software library. It provides developers with a rich
set of tools and algorithms for image and video processing,
object detection and recognition, and other computer vision
tasks. OpenCV is written in C++, which makes it a powerful
and efficient library for real-time computer vision
applications.
C++ provides a powerful and flexible environment for
implementing CV algorithms, leveraging features like
operator overloading, templates, and memory management.
We explore how C++ enhances the performance of OpenCV-
based applications through its low-level control and
efficient resource utilization.
We will be using various OpenCV and image processing
functions and algorithms like Grey-scaling, edge-detection,
morphology, contours, thresholding etc.
Computer vision tasks such as object detection and
recognition benefit from image processing techniques.
Computer vision systems can recognise and categorise
objects in pictures or video streams by extracting features,
matching patterns, and using machine learning methods.
Image processing enables applications like object tracking,
surveillance, and autonomous navigation by helping to
distinguish things based on colour, shape, texture, or other
visual properties. Tools for picture analysis and
interpretation are provided by image processing in order
to get useful data from images. This involves activities
like measuring, motion analysis, scene comprehension,
andObject and Text Recognition, for the following given
usecases
1. Colour Detection
2. Barcode Decoding
3. Text Recognition
4. Text on Image
The field of computer vision in C++ is active and quickly
developing, with many new scientific discoveries and useful
applications. In our Project we used four different use cases
of computer-vision which we implemented using the
programming language C++.
There are large number of studies and research in the field
of computer-vision but it is all done in the programming
language of python. Implementing it in C++ was a challenge
in itself as not many researches were there regarding our
use cases. Here is a summary of the important studies.
1. "Learning OpenCV 3: Computer Vision in C++ with
the OpenCV Library" by Adrian Kaehler and Gary
Bradski - This book is a comprehensive guideto the
OpenCV library and is ideal for beginners who
want to learn computer vision using C++ and
OpenCV.
Image
I. INTRODUCTION
II. LITERATURE REVIEW
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 10 Issue: 06 | Jun 2023 www.irjet.net p-ISSN: 2395-0072
© 2023, IRJET | Impact Factor value: 8.226 | ISO 9001:2008 Certified Journal | Page 312
2. “Recognizing one-dimensional barcode using
OpenCV” by Junhao Liang and Tianqi Wang give a
depth view in how barcode decoding works.
3. “Process of Detecting Barcodes Using Image
Processing” by Kopila Pariyar explained the
process of barcode detection
4. “OCR Service Platform Based on OpenCV” by
Jianjun Cai, Erxin Sun, Zongjuan Chen. The study
found that the OCR technique achieved high
accuracy in text recognition and detection.
5. "Mastering OpenCV 4 with Python: A Practical
Guide Covering Topics from Image Processing,
Augmented Reality to Deep Learning with OpenCV
4 and Python 3.7" by Alberto Fernandez and
Prateek Joshi - This book covers the latest version
of OpenCV and provides hands-on examples of
how to use OpenCV with Python to solve real-
world problems.
While working on this project we had to take a different
approach while coming up with the code for each use case
as there was not enough study materials related to the
topic.
This led us to build the code and decide the method from
scratch. With different permutation and combinations
used as well as taking useful functions from programing
language python and converting and tweaking the
function/algorithm as per our need helped us to gain more
insight about the expected outcome.
A. Block Diagram
a) Colour Detection
b) Text Recognition
c) Barcode Decoding
d) Text on Image
B. Synthesis/Algorithm/Design/Method
1) Colour Detection RGB Colour Model -
Red, green, and blue colours are combined in varying
ratios to create a variety of colours in the RGB colour
model, which is an additive colour scheme. A colour
model is a method for multiplying a few core colours to
produce many hues. Model light is used to display
colour in additive colour. Colour mixing is additive in
the RGB colour model [7]. It is the technique of
combining the red, green, and blue primary colours in
various ratios to create other colours. HSV colour
gamut The Hue (H), the colour type (such as red,
green), and the saturation (S) of the colour are the
threeelements that make up the HSV (Hue, Saturation,
Value) model, sometimes known as HSB (Hue,
Saturation, Brightness). It has a red angle of 0 to 360
degrees.
III. METHODOLOGY/EXPERIMENTAL
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 10 Issue: 06 | Jun 2023 www.irjet.net p-ISSN: 2395-0072
© 2023, IRJET | Impact Factor value: 8.226 | ISO 9001:2008 Certified Journal | Page 313
2) Text Recognition –Tesseract Library:
Text extraction from photographs or scanned
documents is made possible via text recognition in
OpenCV using the Tesseract package, which is a
reliable and popular method. Tesseract, a Google-
developed open-source OCR engine, for precise and
effective text recognition.
Tesseract analyses and recognises the text within the
specified regions using cutting-edge OCR algorithms.
Text recognition in OpenCV utilising the Tesseract
library enables the extraction of textual information
from photos or scanned documents with high
accuracyand efficiency by combining OpenCV's image
processing skills with Tesseract's potent OCR
techniques.
3) Barcode Decoding –
In order to extract information from digital images,
computer vision must first modify and analyse the
images. This process is known as image processing
and detection. Several important methods and
processes thatare frequently used in image processing
and detection.
● Grey scaling and the Sobel Function: Greyscale
photos can be used with the Sobel function [3], a
well-known edge detection technique, to locate
andhighlight edges based on the gradient of pixel
intensity.
● Blurring and Thresholding: Blurring, commonly
referred to as smoothing, is a technique for
removing small features from an image and
reducing noise and thresholding entails separating
a picture into binary sections according to a
predetermined threshold value.
● Morphology Operations: A set of operations used
toexamine and modify the shapes and structures
found in an image are referred to as morphology
operations.
● Contours: The borders or outlines of items in a
picture are known as contours. They are essential
in the detection, identification, and study of
objects' shapes.
● ZBar Library: Zbar is an open-source software
library that offers the ability to scan barcodes and
QR codes.
● Region of Interest: In image processing, ROI stands
for region of interest. It describes a particular area
or region inside an image that is picked out for
additional examination, processing, or information
extraction.
● Decoding Algorithm: it is the algorithm based on
Otsu Model.
4) Text on Image –
• Put Text: This function is used to write text on an
image. It takes the following parameters:
• Image: The input image on which the text will be
written.
• Text: The actual text string to be written.
• Position: The coordinates (x, y) of the starting point
of the text.
• Font type and size: The font type and size of the
text.
• Color: The color of the text.
• Thickness: The thickness of the text.
• Line type: The type of line used for drawing the
text.
• Text Size: This function calculates the size of the
text string.
• Scalar: This class represents a color in OpenCV.You
can specify the color using the BGR (Blue, Green,
Red) format.
• These are pre-defined font types available in
OpenCV for writing text.
FONT_HERSHEY_SIMPLEX,
FONT_HERSHEY_PLAIN, FONT_HERSHEY_DUPLEX,
etc.
C. Expected Outcome
1) Colour Detection:
We were able to successfully isolate the objects of which
colour code we had given in the HSV tracker. Thus Object
detection was successful.
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 10 Issue: 06 | Jun 2023 www.irjet.net p-ISSN: 2395-0072
© 2023, IRJET | Impact Factor value: 8.226 | ISO 9001:2008 Certified Journal | Page 314
2) Text Recognition:
We were able to successfully Detect the text using
OpenCV functions in C++
But the tesseract library which was initially a part of
OpenCV module for C++ was mot working giving errors.
Hence to prove our methodology and algorithm is precise
and correct we tried the same algorithm in programming
language Python.
3) Barcode Decoding:
We faced the same problem like in [2] above, where the
original Zbar (barcode decoding library) was in the
OpenCV package, but it was discontinued for C++
programming language. So after many Permutations and
Combinations we were able to achieve a Near Perfection
barcode Detection
We were able to successfully Decode UPC-A barcodes using
basic OpenCV Functions and algorithms in C++ without the
Pre-trained library Zbar.
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 10 Issue: 06 | Jun 2023 www.irjet.net p-ISSN: 2395-0072
© 2023, IRJET | Impact Factor value: 8.226 | ISO 9001:2008 Certified Journal | Page 315
4) Text on Image:
We got the desired outcome for our text on image use case
IV. CONCLUSION AND FUTURESCOPE
The project “Implementation of Computer Visionapplications
using OpenCV in C++"is an innovative project that can be
seen as a demonstration project for understanding the basic
concepts of computer vision, machine learning, and image
processing by using different algorithms.
It also provides information on Object Detection models,
Artificial Intelligence, and Computer Vision Algorithms for
researchers who are really interested in the topic. This
project can be used by researchers as an overview or an
example project to understand how image processing
functions, its significance in the field of computer vision, and
the fundamental steps that must be taken into consideration.
It acts as a significant demo project. Except for the phases
where the Pre-trained libraries such as Tesseract and ZBar []
were withdrawn, the fundamentals of image processing and
computer vision are easy to understand. This led us to
employing different method for those use-cases.
1) Industrial Automation: Computer vision is
increasingly being used in industrial
automation to increase quality control,
inspection, and process optimization
2) Security and Surveillance: Computer vision
is extremely important in security and
surveillance systems. The object detection,
tracking, and behavior analysis capabilities
ofOpenCV help to construct intelligent video
surveillance systems.
We were able to complete our project's primary
objective—the implementation of all computer vision apps
in C++, despite a few small difficulties. Testing a variety
of other C++ and Python programming language may help
this project advance. Applications for computer vision in
C++ may be used to set up automation plants or
automate conveyer belt system operations for a particular
project or product line.
More OpenCV advancements and applications are
expected in the following areas:
3) Real-time and Embedded Systems: As smart
devices and the Internet of Things (IoT)
proliferate, there is an increasing demand
for real-time computer vision applications
that can run efficiently on resource-
constrained devices.
4) Integration with other Technologies: Deep
learning techniques, specifically
convolutional neural networks (CNNs), have
transformed computer vision. TensorFlow
and PyTorch are two popular libraries that
have been integrated. In augmented reality
(AR) and virtual reality (VR) applications,
computer vision is critical.
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 10 Issue: 06 | Jun 2023 www.irjet.net p-ISSN: 2395-0072
[1] https://pyimagesearch.com/2014/12/15/real-time-
barcode-detection-video-python-opencv/
[2] https://www.ijser.org/researchpaper/Naive-Bayes-
Approached-in-Color-Detection-using-Pandas-
OpenCV.pdf
[3] https://laconicml.com/barcode-detection-opencv/
[4] https://pyimagesearch.com/2018/05/21/an-opencv-
barcode-and-qr-code-scanner-with-zbar/
[5] https://link.springer.com/chapter/10.1007/978-3-
030-20904-9_9
[6] papers.ssrn.com/sol3/Delivery.cfm/SSRN_ID38799
81_code3665699.pdf?abstractid=3879981
Finally, with its broad features, cross-platform
compatibility, active community support, and integration
capabilities, the future of OpenCV implemented in C++
appears excellent. While it has a steep learning curve and
only limited supportfor advanced approaches, its excellent
performance and versatility make it a powerful tool for a
wide range of computer vision applications.
V. REFERENCES
© 2023, IRJET | Impact Factor value: 8.226 | ISO 9001:2008 Certified Journal | Page 316

More Related Content

PDF
IRJET - Content based Image Classification
PDF
Image Processing In Open CV. Image Processing In Open CV. Image Processing In...
PDF
IRJET- Image to Text Conversion using Tesseract
PDF
A Survey On Thresholding Operators of Text Extraction In Videos
PDF
A Survey On Thresholding Operators of Text Extraction In Videos
PDF
OCR Text Extraction
PDF
IRJET- Image based Approach for Indian Fake Note Detection by Dark Channe...
PDF
BLOB DETECTION TECHNIQUE USING IMAGE PROCESSING FOR IDENTIFICATION OF MACHINE...
IRJET - Content based Image Classification
Image Processing In Open CV. Image Processing In Open CV. Image Processing In...
IRJET- Image to Text Conversion using Tesseract
A Survey On Thresholding Operators of Text Extraction In Videos
A Survey On Thresholding Operators of Text Extraction In Videos
OCR Text Extraction
IRJET- Image based Approach for Indian Fake Note Detection by Dark Channe...
BLOB DETECTION TECHNIQUE USING IMAGE PROCESSING FOR IDENTIFICATION OF MACHINE...

Similar to Implementation of Computer Vision Applications using OpenCV in C++ (20)

PDF
Color Based Object Tracking with OpenCV A Survey
DOCX
newcgreppainnewcgreppainnewcgreppainnewcgreppainnewcgreppain
PDF
Design and Description of Feature Extraction Algorithm for Old English Font
PDF
Complete End-to-End Low Cost Solution to a 3D Scanning System with Integrated...
PDF
COMPLETE END-TO-END LOW COST SOLUTION TO A 3D SCANNING SYSTEM WITH INTEGRATED...
PDF
Complete End-to-End Low Cost Solution to a 3D Scanning System with Integrate...
PDF
A Wireless Network Infrastructure Architecture for Rural Communities
PPTX
ANISH_and_DR.DANIEL_VRINCEANU_Presentation
PDF
IRJET- Intelligent Character Recognition of Handwritten Characters
PDF
Devanagari Character Recognition using Image Processing & Machine Learning
PDF
Optical Character Recognition from Text Image
PDF
IRJET - Object Detection using Hausdorff Distance
PDF
IRJET- Designing of OCR Tool Box for Decoding Vehicle Number Plate using MATLAB
PDF
Detection of a user-defined object in an image using feature extraction- Trai...
PDF
IRJET- Object Detection using Hausdorff Distance
PDF
40120140501009
PDF
IRJET-MText Extraction from Images using Convolutional Neural Network
PDF
Handwritten Digit Recognition Using CNN
PDF
Real-Time Color Detection Using Python and OpenCV
PDF
IRJET- Finding Dominant Color in the Artistic Painting using Data Mining ...
Color Based Object Tracking with OpenCV A Survey
newcgreppainnewcgreppainnewcgreppainnewcgreppainnewcgreppain
Design and Description of Feature Extraction Algorithm for Old English Font
Complete End-to-End Low Cost Solution to a 3D Scanning System with Integrated...
COMPLETE END-TO-END LOW COST SOLUTION TO A 3D SCANNING SYSTEM WITH INTEGRATED...
Complete End-to-End Low Cost Solution to a 3D Scanning System with Integrate...
A Wireless Network Infrastructure Architecture for Rural Communities
ANISH_and_DR.DANIEL_VRINCEANU_Presentation
IRJET- Intelligent Character Recognition of Handwritten Characters
Devanagari Character Recognition using Image Processing & Machine Learning
Optical Character Recognition from Text Image
IRJET - Object Detection using Hausdorff Distance
IRJET- Designing of OCR Tool Box for Decoding Vehicle Number Plate using MATLAB
Detection of a user-defined object in an image using feature extraction- Trai...
IRJET- Object Detection using Hausdorff Distance
40120140501009
IRJET-MText Extraction from Images using Convolutional Neural Network
Handwritten Digit Recognition Using CNN
Real-Time Color Detection Using Python and OpenCV
IRJET- Finding Dominant Color in the Artistic Painting using Data Mining ...
Ad

More from IRJET Journal (20)

PDF
Enhanced heart disease prediction using SKNDGR ensemble Machine Learning Model
PDF
Utilizing Biomedical Waste for Sustainable Brick Manufacturing: A Novel Appro...
PDF
Kiona – A Smart Society Automation Project
PDF
DESIGN AND DEVELOPMENT OF BATTERY THERMAL MANAGEMENT SYSTEM USING PHASE CHANG...
PDF
Invest in Innovation: Empowering Ideas through Blockchain Based Crowdfunding
PDF
SPACE WATCH YOUR REAL-TIME SPACE INFORMATION HUB
PDF
A Review on Influence of Fluid Viscous Damper on The Behaviour of Multi-store...
PDF
Wireless Arduino Control via Mobile: Eliminating the Need for a Dedicated Wir...
PDF
Explainable AI(XAI) using LIME and Disease Detection in Mango Leaf by Transfe...
PDF
BRAIN TUMOUR DETECTION AND CLASSIFICATION
PDF
The Project Manager as an ambassador of the contract. The case of NEC4 ECC co...
PDF
"Enhanced Heat Transfer Performance in Shell and Tube Heat Exchangers: A CFD ...
PDF
Advancements in CFD Analysis of Shell and Tube Heat Exchangers with Nanofluid...
PDF
Breast Cancer Detection using Computer Vision
PDF
Auto-Charging E-Vehicle with its battery Management.
PDF
Analysis of high energy charge particle in the Heliosphere
PDF
A Novel System for Recommending Agricultural Crops Using Machine Learning App...
PDF
Auto-Charging E-Vehicle with its battery Management.
PDF
Analysis of high energy charge particle in the Heliosphere
PDF
Wireless Arduino Control via Mobile: Eliminating the Need for a Dedicated Wir...
Enhanced heart disease prediction using SKNDGR ensemble Machine Learning Model
Utilizing Biomedical Waste for Sustainable Brick Manufacturing: A Novel Appro...
Kiona – A Smart Society Automation Project
DESIGN AND DEVELOPMENT OF BATTERY THERMAL MANAGEMENT SYSTEM USING PHASE CHANG...
Invest in Innovation: Empowering Ideas through Blockchain Based Crowdfunding
SPACE WATCH YOUR REAL-TIME SPACE INFORMATION HUB
A Review on Influence of Fluid Viscous Damper on The Behaviour of Multi-store...
Wireless Arduino Control via Mobile: Eliminating the Need for a Dedicated Wir...
Explainable AI(XAI) using LIME and Disease Detection in Mango Leaf by Transfe...
BRAIN TUMOUR DETECTION AND CLASSIFICATION
The Project Manager as an ambassador of the contract. The case of NEC4 ECC co...
"Enhanced Heat Transfer Performance in Shell and Tube Heat Exchangers: A CFD ...
Advancements in CFD Analysis of Shell and Tube Heat Exchangers with Nanofluid...
Breast Cancer Detection using Computer Vision
Auto-Charging E-Vehicle with its battery Management.
Analysis of high energy charge particle in the Heliosphere
A Novel System for Recommending Agricultural Crops Using Machine Learning App...
Auto-Charging E-Vehicle with its battery Management.
Analysis of high energy charge particle in the Heliosphere
Wireless Arduino Control via Mobile: Eliminating the Need for a Dedicated Wir...
Ad

Recently uploaded (20)

PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PPT
Mechanical Engineering MATERIALS Selection
PPTX
OOP with Java - Java Introduction (Basics)
PPTX
Construction Project Organization Group 2.pptx
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PPT
CRASH COURSE IN ALTERNATIVE PLUMBING CLASS
PDF
R24 SURVEYING LAB MANUAL for civil enggi
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PPTX
Internet of Things (IOT) - A guide to understanding
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PPTX
Sustainable Sites - Green Building Construction
PDF
Digital Logic Computer Design lecture notes
DOCX
573137875-Attendance-Management-System-original
PDF
PPT on Performance Review to get promotions
PPTX
CH1 Production IntroductoryConcepts.pptx
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
Mechanical Engineering MATERIALS Selection
OOP with Java - Java Introduction (Basics)
Construction Project Organization Group 2.pptx
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
CRASH COURSE IN ALTERNATIVE PLUMBING CLASS
R24 SURVEYING LAB MANUAL for civil enggi
UNIT-1 - COAL BASED THERMAL POWER PLANTS
Internet of Things (IOT) - A guide to understanding
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
Sustainable Sites - Green Building Construction
Digital Logic Computer Design lecture notes
573137875-Attendance-Management-System-original
PPT on Performance Review to get promotions
CH1 Production IntroductoryConcepts.pptx
CYBER-CRIMES AND SECURITY A guide to understanding

Implementation of Computer Vision Applications using OpenCV in C++

  • 1. International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 10 Issue: 06 | Jun 2023 www.irjet.net p-ISSN: 2395-0072 © 2023, IRJET | Impact Factor value: 8.226 | ISO 9001:2008 Certified Journal | Page 311 Implementation of Computer Vision Applications usingOpenCV in C++ Adwait Bhave, Vaishnavi Jadhav, Punit Bhandari, Vaishnavi Patil Department of Electronics and Telecommunication Engineering, Pune Vidyarthi Griha’s College of Engineering Technology Project Guide: Prof. Anand Najan Sponsored by NSM Solutions Pvt. Ltd.Industry guide: Mr. Nishad Mande -----------------------------------------------------------------------***---------------------------------------------------------------------- Abstract — Computer Vision (CV) has emerged as a critical field in various domains, ranging from autonomous vehicles to medical imaging. OpenCV, an open-source computer vision library, provides a rich set of functions and algorithms for image processing, feature detection, object recognition, and more. This paper presents a comprehensive study of integrating OpenCV with C++, aiming to explore its potential for developing robust and efficient CV applications. We present practical examples that demonstrate the seamless integration ofOpenCV with C++. We showcase real-world applications such as facial recognition, motion detection, and augmented reality, highlighting the versatility and extensibility of the OpenCV library when utilized alongside the C++ programming language Keywords – Computer Vision, OpenCV, C++, Text Recognition, colour detection, barcode decoding, Text on OpenCV (Open-Source Computer Vision Library) is a widely-used open-source computer vision and machine learning software library. It provides developers with a rich set of tools and algorithms for image and video processing, object detection and recognition, and other computer vision tasks. OpenCV is written in C++, which makes it a powerful and efficient library for real-time computer vision applications. C++ provides a powerful and flexible environment for implementing CV algorithms, leveraging features like operator overloading, templates, and memory management. We explore how C++ enhances the performance of OpenCV- based applications through its low-level control and efficient resource utilization. We will be using various OpenCV and image processing functions and algorithms like Grey-scaling, edge-detection, morphology, contours, thresholding etc. Computer vision tasks such as object detection and recognition benefit from image processing techniques. Computer vision systems can recognise and categorise objects in pictures or video streams by extracting features, matching patterns, and using machine learning methods. Image processing enables applications like object tracking, surveillance, and autonomous navigation by helping to distinguish things based on colour, shape, texture, or other visual properties. Tools for picture analysis and interpretation are provided by image processing in order to get useful data from images. This involves activities like measuring, motion analysis, scene comprehension, andObject and Text Recognition, for the following given usecases 1. Colour Detection 2. Barcode Decoding 3. Text Recognition 4. Text on Image The field of computer vision in C++ is active and quickly developing, with many new scientific discoveries and useful applications. In our Project we used four different use cases of computer-vision which we implemented using the programming language C++. There are large number of studies and research in the field of computer-vision but it is all done in the programming language of python. Implementing it in C++ was a challenge in itself as not many researches were there regarding our use cases. Here is a summary of the important studies. 1. "Learning OpenCV 3: Computer Vision in C++ with the OpenCV Library" by Adrian Kaehler and Gary Bradski - This book is a comprehensive guideto the OpenCV library and is ideal for beginners who want to learn computer vision using C++ and OpenCV. Image I. INTRODUCTION II. LITERATURE REVIEW
  • 2. International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 10 Issue: 06 | Jun 2023 www.irjet.net p-ISSN: 2395-0072 © 2023, IRJET | Impact Factor value: 8.226 | ISO 9001:2008 Certified Journal | Page 312 2. “Recognizing one-dimensional barcode using OpenCV” by Junhao Liang and Tianqi Wang give a depth view in how barcode decoding works. 3. “Process of Detecting Barcodes Using Image Processing” by Kopila Pariyar explained the process of barcode detection 4. “OCR Service Platform Based on OpenCV” by Jianjun Cai, Erxin Sun, Zongjuan Chen. The study found that the OCR technique achieved high accuracy in text recognition and detection. 5. "Mastering OpenCV 4 with Python: A Practical Guide Covering Topics from Image Processing, Augmented Reality to Deep Learning with OpenCV 4 and Python 3.7" by Alberto Fernandez and Prateek Joshi - This book covers the latest version of OpenCV and provides hands-on examples of how to use OpenCV with Python to solve real- world problems. While working on this project we had to take a different approach while coming up with the code for each use case as there was not enough study materials related to the topic. This led us to build the code and decide the method from scratch. With different permutation and combinations used as well as taking useful functions from programing language python and converting and tweaking the function/algorithm as per our need helped us to gain more insight about the expected outcome. A. Block Diagram a) Colour Detection b) Text Recognition c) Barcode Decoding d) Text on Image B. Synthesis/Algorithm/Design/Method 1) Colour Detection RGB Colour Model - Red, green, and blue colours are combined in varying ratios to create a variety of colours in the RGB colour model, which is an additive colour scheme. A colour model is a method for multiplying a few core colours to produce many hues. Model light is used to display colour in additive colour. Colour mixing is additive in the RGB colour model [7]. It is the technique of combining the red, green, and blue primary colours in various ratios to create other colours. HSV colour gamut The Hue (H), the colour type (such as red, green), and the saturation (S) of the colour are the threeelements that make up the HSV (Hue, Saturation, Value) model, sometimes known as HSB (Hue, Saturation, Brightness). It has a red angle of 0 to 360 degrees. III. METHODOLOGY/EXPERIMENTAL
  • 3. International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 10 Issue: 06 | Jun 2023 www.irjet.net p-ISSN: 2395-0072 © 2023, IRJET | Impact Factor value: 8.226 | ISO 9001:2008 Certified Journal | Page 313 2) Text Recognition –Tesseract Library: Text extraction from photographs or scanned documents is made possible via text recognition in OpenCV using the Tesseract package, which is a reliable and popular method. Tesseract, a Google- developed open-source OCR engine, for precise and effective text recognition. Tesseract analyses and recognises the text within the specified regions using cutting-edge OCR algorithms. Text recognition in OpenCV utilising the Tesseract library enables the extraction of textual information from photos or scanned documents with high accuracyand efficiency by combining OpenCV's image processing skills with Tesseract's potent OCR techniques. 3) Barcode Decoding – In order to extract information from digital images, computer vision must first modify and analyse the images. This process is known as image processing and detection. Several important methods and processes thatare frequently used in image processing and detection. ● Grey scaling and the Sobel Function: Greyscale photos can be used with the Sobel function [3], a well-known edge detection technique, to locate andhighlight edges based on the gradient of pixel intensity. ● Blurring and Thresholding: Blurring, commonly referred to as smoothing, is a technique for removing small features from an image and reducing noise and thresholding entails separating a picture into binary sections according to a predetermined threshold value. ● Morphology Operations: A set of operations used toexamine and modify the shapes and structures found in an image are referred to as morphology operations. ● Contours: The borders or outlines of items in a picture are known as contours. They are essential in the detection, identification, and study of objects' shapes. ● ZBar Library: Zbar is an open-source software library that offers the ability to scan barcodes and QR codes. ● Region of Interest: In image processing, ROI stands for region of interest. It describes a particular area or region inside an image that is picked out for additional examination, processing, or information extraction. ● Decoding Algorithm: it is the algorithm based on Otsu Model. 4) Text on Image – • Put Text: This function is used to write text on an image. It takes the following parameters: • Image: The input image on which the text will be written. • Text: The actual text string to be written. • Position: The coordinates (x, y) of the starting point of the text. • Font type and size: The font type and size of the text. • Color: The color of the text. • Thickness: The thickness of the text. • Line type: The type of line used for drawing the text. • Text Size: This function calculates the size of the text string. • Scalar: This class represents a color in OpenCV.You can specify the color using the BGR (Blue, Green, Red) format. • These are pre-defined font types available in OpenCV for writing text. FONT_HERSHEY_SIMPLEX, FONT_HERSHEY_PLAIN, FONT_HERSHEY_DUPLEX, etc. C. Expected Outcome 1) Colour Detection: We were able to successfully isolate the objects of which colour code we had given in the HSV tracker. Thus Object detection was successful.
  • 4. International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 10 Issue: 06 | Jun 2023 www.irjet.net p-ISSN: 2395-0072 © 2023, IRJET | Impact Factor value: 8.226 | ISO 9001:2008 Certified Journal | Page 314 2) Text Recognition: We were able to successfully Detect the text using OpenCV functions in C++ But the tesseract library which was initially a part of OpenCV module for C++ was mot working giving errors. Hence to prove our methodology and algorithm is precise and correct we tried the same algorithm in programming language Python. 3) Barcode Decoding: We faced the same problem like in [2] above, where the original Zbar (barcode decoding library) was in the OpenCV package, but it was discontinued for C++ programming language. So after many Permutations and Combinations we were able to achieve a Near Perfection barcode Detection We were able to successfully Decode UPC-A barcodes using basic OpenCV Functions and algorithms in C++ without the Pre-trained library Zbar.
  • 5. International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 10 Issue: 06 | Jun 2023 www.irjet.net p-ISSN: 2395-0072 © 2023, IRJET | Impact Factor value: 8.226 | ISO 9001:2008 Certified Journal | Page 315 4) Text on Image: We got the desired outcome for our text on image use case IV. CONCLUSION AND FUTURESCOPE The project “Implementation of Computer Visionapplications using OpenCV in C++"is an innovative project that can be seen as a demonstration project for understanding the basic concepts of computer vision, machine learning, and image processing by using different algorithms. It also provides information on Object Detection models, Artificial Intelligence, and Computer Vision Algorithms for researchers who are really interested in the topic. This project can be used by researchers as an overview or an example project to understand how image processing functions, its significance in the field of computer vision, and the fundamental steps that must be taken into consideration. It acts as a significant demo project. Except for the phases where the Pre-trained libraries such as Tesseract and ZBar [] were withdrawn, the fundamentals of image processing and computer vision are easy to understand. This led us to employing different method for those use-cases. 1) Industrial Automation: Computer vision is increasingly being used in industrial automation to increase quality control, inspection, and process optimization 2) Security and Surveillance: Computer vision is extremely important in security and surveillance systems. The object detection, tracking, and behavior analysis capabilities ofOpenCV help to construct intelligent video surveillance systems. We were able to complete our project's primary objective—the implementation of all computer vision apps in C++, despite a few small difficulties. Testing a variety of other C++ and Python programming language may help this project advance. Applications for computer vision in C++ may be used to set up automation plants or automate conveyer belt system operations for a particular project or product line. More OpenCV advancements and applications are expected in the following areas: 3) Real-time and Embedded Systems: As smart devices and the Internet of Things (IoT) proliferate, there is an increasing demand for real-time computer vision applications that can run efficiently on resource- constrained devices. 4) Integration with other Technologies: Deep learning techniques, specifically convolutional neural networks (CNNs), have transformed computer vision. TensorFlow and PyTorch are two popular libraries that have been integrated. In augmented reality (AR) and virtual reality (VR) applications, computer vision is critical.
  • 6. International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 10 Issue: 06 | Jun 2023 www.irjet.net p-ISSN: 2395-0072 [1] https://pyimagesearch.com/2014/12/15/real-time- barcode-detection-video-python-opencv/ [2] https://www.ijser.org/researchpaper/Naive-Bayes- Approached-in-Color-Detection-using-Pandas- OpenCV.pdf [3] https://laconicml.com/barcode-detection-opencv/ [4] https://pyimagesearch.com/2018/05/21/an-opencv- barcode-and-qr-code-scanner-with-zbar/ [5] https://link.springer.com/chapter/10.1007/978-3- 030-20904-9_9 [6] papers.ssrn.com/sol3/Delivery.cfm/SSRN_ID38799 81_code3665699.pdf?abstractid=3879981 Finally, with its broad features, cross-platform compatibility, active community support, and integration capabilities, the future of OpenCV implemented in C++ appears excellent. While it has a steep learning curve and only limited supportfor advanced approaches, its excellent performance and versatility make it a powerful tool for a wide range of computer vision applications. V. REFERENCES © 2023, IRJET | Impact Factor value: 8.226 | ISO 9001:2008 Certified Journal | Page 316