Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

opencv

Download as pdf or txt
Download as pdf or txt
You are on page 1of 51

COLOR DETECTION USING OPENCV AND PANDAS

A project report submitted in partial fulfilment of the requirements for the


award of Degree of

Bachelor of Commerce (Computer Application)

Submitted by
DHANASEKAR R
(2113141040018)

Under the Guidance of

Dr.D.Karthika MCA., M.Phil., Ph.D.

ASSISTANT PROFESSOR

SCHOOL OF COMMERECE
GURU NANAK COLLEGE (AUTONOMOUS)
GURU NANAK SALAI, VELACHERY,
CHENNAI – 600042.

APRIL 2024
DECLARATION

I, DHANASEKAR R (2113141040018), a regular Final year student of B. Com (CA), GURU NANAK
COLLEGE (AUTONOMOUS), CHENNAI declare that the titled “COLOR DETECTION USING
OPENCV AND PANDAS”. This project work is submitted in partial fulfilment of the requirements for the
award of Degree of Bachelor of Commerce (Computer Application), for the academic year 2021–2024. This
is my own work carried out with due diligence & integrity.

NAME & SIGNATURE : DHANASEKAR R

DATE :

PLACE : CHENNAI
BONAFIDE CERTIFICATE

This is to certify that this Project Report is the bonafide work of DHANASEKAR R (2113141040018) who
is a final year student of the Department of Commerce (Computer Application). The student has prepared
the project titled “COLOR DETECTION USING OPEN CV AND PANDAS” and it is deemed to be his
/ her independent, original & unpublished work. This project work is submitted in partial fulfilment of the
requirements for the award of Degree of Bachelor of Commerce (Computer Application) for the academic
year 2021 – 2024. This is Submitted for Viva Voce Examination to be held on th
April 2024.

Signature of the Head of the Department

Signature of the Internal Examiner Signature of the External Examine


ACKNOWLEDGEMENT

I would like to take this opportunity to acknowledge and thank few people for their key support. I thank all
of them in helping me for the successful completion of this project.

I would like to extend our hearty thanks to our respected Principal, Dr.T.K. Avvai Kothai, M.Com., M.Phil.,
Ph.D. I would like to extend my gratitude to our respected Head of the Department, Dr.D. Leelavathi
M.Com., M.Phil., B.Ed., MBA., Ph.D. for her constant motivation & support. I would like to thank
Dr.D.Karthika MCA., M.Phil., Ph.D. Assistant Professor, Department of B.com (Computer Application)
for guiding me in the proper direction and achieve the purpose of conducting this research study on time. I
take this opportunity to express my thanks to our respected teachers of the Department for providing their
invaluable guidance and encouragement in the successful completion of this project.

I express my gratefulness to Department of B. Com Computer Application and management for permitting to
take up this course work and complete this project within the stipulated time.

I sincerely thank my parents for their encouragement and support in completing the project work on time.

I bow my head to the almighty for helping me in accomplishing the project goals as per the scheduled plans.

4
INDEX

S.NO TABLE OF CONTENTS PAGE


NO

INTRODUCTION
1 8
1.1 PROBLEM DESCRIPTION AND OVERVIEW

PROJECT USAGE
2

2.1 SYSTEM ANALYSIS


2.2 EXISTING SYSTEM
2.3 PROPOSED SYSTEM
2.4 SYSTEM REQUIREMENTS
10
2.5 HARDWARE REQUIREMENTS
2.6 SOFTWARE REQUIREMENTS
2.7 FUNCTIONAL REQUIREMENT
2.8 NON-FUNCTIONAL REQUIREMENT

TOOLS USED
3

3.1 ARCHITECTURAL DESIGN

3.2 DATA FLOW DIAGRAM LEVELS 13


3.3 UML DIAGRAM

3.3.1 USE-CASE DIAGRAM

3.3.2 COLLABORATION DIAGRAM

3.3.3 CLASS DIAGRAM

3.3.4 ACTIVITY DIAGRAM

PROJECT IMPLEMENTATION
5
4 4.1 ABOUT THE PROGRAM 18

4.1.1 COLOUR DETECTION FEATURE

PROJECT EXECUTION

5 5.1 PYTHON

5.2 OPEN CV

5.3 NUMPY 20

5.4 IMAGE MODULE

5.5 CAMERA MODULE

5.6 OBJECT MODULE

5.7 PANDAS

37
6 FUTURE ENHANCEMENTS

7 49
CONCLUSION

52
8 BIBLIOGRAPHY

6
ABSTRACT
Human color constancy has been studied for over 100 years, and there is extensive experimental data for the
case where a spatially diffuse light source illuminates a set of flat matte surfaces. A reliable interaction
between test object type and cue condition. In the consistent-cue conditions, constancy tended to be best for
the matte disks, while in the reduced-cue conditions constancy was best for the spheres. The presence of this
interaction presents an important challenge for theorists who seek to generalize models that account for
constancy for flat tests to the more general case of three-dimensional objects. The color-enhanced information
presentation modes on decision quality, decision making time, use of information, and user perceptions. The
influence of presentation mode on human performance and the perceived value of information is related to
how well it supports the solution approach to a particular task. The benefits of graphics are limited to reducing
decision making time but only when the graphical report has been designed to directly assist in solving the
task. Multicolour reports aid in decision making, but only in specific circumstances, that is, their benefits are
not pervasive. It is implemented with the programming language Python and by following supporting libraries
as pandas, NumPy, inutile and cv2.

7
1. INTRODUCTION
Before going into the speculations of the project it is important to know the definition of color detection.
The process of detecting the name of any color in an image or video is known as color detection. This is
an exceedingly simple task for humans, but it is not that simple for computers. The eyes and brains of
humans work together to convert light into color. The signal is transmitted to the brain via light receptors
in our eyes. The color is then recognized by our brain. But for the Computer it is a difficult task. A color
can be represented in around 16.5 million different ways. We’ll be working with a dataset that contains
RGB values along with their names. OpenCV usually captures images and videos in 8-bit, unsigned
integer, BGR format. Captured images can be considered as 3 matrices of BLUE, GREEN and RED with
integer values ranges from 0 to 255.

RGB colour space describes colours in terms of the amount of red, green, and blue present. In situations where
colour description plays an integral role, Sorting of objects is necessary in industries where products are
manufactured on large scale. This process is simplified by automation. We can design mechatronics system
using the concepts of image processing. Objects are classified based on different characteristics like shape,
colour and weight. Colour based sorting is used in many industries like crayon colour factory, agricultural
machineries like rice sorter, beans sorter, peanut sorter etc.

Now a days , importance and the study over the computer vision in field of industrial, academics are on a hike.
Specifically when dealing with the industrial environment, This design can be used for various application
based upon vision through computer for the purpose of identifying, differentiating and collection of various
object are done based upon colour , shape and size which are the primary factors. This can be done with help
of an OpenCV. This design system can be implemented in various field for various purposes such as Defence,
industrial purposes, games, automation, security, monitoring etc .Even these systems can also play a vital role
in field of radar and navigating such as detecting, tracking of a moving coloured object etc Detection of colour
play an important role even in the field of medical, such as detection of colour of skin ,identification of a face,
recognizing license plate .Major purpose is to determining the colour of packages passing over a conveyor
belt and also providing the quality of a particular colour packages by outnumbering. Which is

fulfilled by a processing unit i.e. a raspberry pi along with a USB camera for capturing the
package,a display unit for displaying the count and the packaging along with its identified
colour which is done through OpenCV.

8
1.1 Problem Description and Overview
Colour detection is the process of detecting name of the color. Here this is easy task for human to detect the
color and choose one. But computer cannot detect the colour easily. This is tough task for computer to detect
the color easily. So that's why we choose this project. Many of the project and research papers are written on
this problem. But we use different techniques for this project. Pandas and open CV libraries used in python
languages. Open Source Computer Vision Library. Open CV was designed for computational efficiency and
with a robust specialize in real-time platform that gives video and audio encoding infrastructure.

1.2. Objective
The main objective of the proposed system is to find exact color with accuracy and the application can be used
to find colors from a real-time input (webcam). This can be achieved by implementing the correct OpenCV
concepts along with the existing model.

9
2. SYSTEM STUDY AND ANALYSIS

2.1 System Analysis


The system analysis includes existing system limitations, proposed system with features, and requirements of
the system which includes both hardware and software requirements and also the functionality of each module

2.2 Existing System


In the existing system they have gone through with the opencv but while extraction of the colors they got the
wrong outputs. There is no exact representation of colors with accuracy and the application can be used to
find colors present only in the images by specifying its path and not from a webcam.

2.3 Proposed System


In the proposed system, we are introducing the Webcam Access and a CSV database and according to the
CSV database the number of shades that can be identified are 865 color names along with their RGB and hex
values. Whenever the cursor hovers over the screen, it automatically shows the RGB shades color values along
with its hex values.

2.4 System Requirements


The requirements specification is a technical specification of requirements for the software products. It is the
first step in the requirements analysis process it lists the requirements of a particular software system including
functional, performance and security requirements. The requirements also provide usage scenarios from a
user, an operational and an administrative perspective.

The purpose of software requirements specification is to provide a detailed overview of the software project,
its parameters and goals. This describes the project target audience and its user interface, hardware and
software requirements. It defines how the client, team and audience see the project and its functionality

2.4.1 Hardware Requirements

Hard disk 200GB and above

Ram 2GB and above

Processor i3 and above

A proper working webcam

10
2.4.2 Software Requirements

OS: Windows 7 and above

Pycharm IDE

Programming Language: Python

Version: Python 3.8

Tools used: Numpy ,Opencv

2.5 Functional Requirements


Functional requirement defines a function of a system or its component, where a function is described as a
specification of behaviour between outputs and inputs.

Functional requirements may involve calculations, technical details, data manipulation and processing, and
other specific functionality that define what a system is supposed to accomplish.

Behavioural requirements describing all the cases where the system uses the functional requirements are
captured in use cases.

Functional requirements are supported by non- functional requirements (also known as "quality
requirements"), which impose constraints on the design or implementation (such as performance requirements,
security, or reliability).

Generally, functional requirements are expressed in the form "system must do <requirement>," while non-
functional requirements take the form "system shall be <requirement>. The plan for implementing
functional requirements is detailed in the system design, whereas non-functional requirements are detailed in
the system architecture.

As defined in requirements engineering, functional requirements specify particular results of a system. This
should be contrasted with non- functional requirements, which specify overall characteristics such as cost and
reliability Functional requirements drive the application architecture of a system, while non-functional
requirements drive the technical architecture of a system.

In some case a requirements analyst generates use cases after gathering and validating a set of functional
requirements. The hierarchy of functional requirements collection and change, broadly speaking, is:
user/stakeholder request → analyse → use case → incorporate. Stakeholders make a request; systems

11
engineers attempt to discuss, observe, and understand the aspects of the requirement; use cases, entity
relationship diagrams, and other models are built to validate the requirement; and, if documented and
approved, the requirement is implemented/incorporated. Each use case illustrates behavioural scenarios
through one or more functional requirements. Often, though, an analyst will begin by eliciting a set of use
cases, from which the analyst can derive the functional requirements that must be implemented to allow a user
to perform each use case.

2.6 Non-Functional Requirements


In systems engineering and requirements engineering, a non- functional requirement (NFR) is a requirement
that specifies criteria that can be used to judge the operation of a system, rather than specific behaviours.

They are contrasted with functional requirements that define specific behaviour or functions. The plan for
implementing functional requirements is detailed in the system design. The plan for implementing non-
functional requirements is detailed in the system architecture, because they are usually architecturally
significant requirements.

Non-functional requirements are often called "quality attributes" of a system. Other terms for non-functional
requirements are "qualities", "quality goals", "quality of service requirements","non- behavioural
requirements", or "technical requirements". Informally these are sometimes called the "qualities", from
attributes like stability and portability.

Qualities—that is non-functional requirements can be divided into two main categories:

1. Execution qualities, such as safety, security and usability, which are observable during operation (at
run time).

2. Evolution qualities, such as testability, maintainability, extensibility and scalability, which are
embodied in the static structure of the system.

Consistency
The application provides consistency user interface design to user. The designs of the screen are standardize
and consistent that make the user feel comfortable to use it.

12
Convenience
The application give convenience to the user to modify the details if required and can view the details.

Size
The size of a particular application plays a major role, if the size is less then it occupies less space and
Efficiency will be high.

Accessibility
The extent to which the software system can be used by people with the widest range of capabilities to achieve
a specified goal in a specified context of use.

Availability
The degree to which users can depend on the system to be up (able to function) during “normal operating
times”.

Efficiency
The extent to which the software system handles capacity, throughput, and response time.

Integrity
The degree to which the data maintained by the software system are accurate, authentic, and without corruption

Reliability
The extent to which the software system consistently performs the specified functions without failure

Safety
The degree to which a software system prevents harm to people or damage to the environment in the intended
context of use

Survivability
The extent to which the software system continues to function and recovers in the presence of a system failure.

Maintainability
The ease with which faults in a software system can be found and fixed
13
Scalability
The degree to which the system is able to expand its processing capabilities upward and outward to support
business growth.

Interoperability
The extent to which the software system is able to couple or facilitate the interface with other systems.

Portability
The ease with which a software system can be transferred from its current hardware or software environment
to another.

Reusability
The extent to which a portion of the software system can be converted for use in another system.

14
3. SYSTEM DESIGN
In the above architecture shows the capability for the project. It consists of a well-defined sequence diagram
that is abstracted from the source code. It leverages the rich capabilities of the technology such as OpenCV
library in the python. The above architecture makes the process more efficient based on principles and
properties related to each other. As we know the red, green and blue are the primary colors that can be mixed
to produce different colors. The present color detection project takes the path of an image as an input and
looks for the composition of three different color red, green and blue in an image.

3.1 Architectural Design

Fig 1. Architectural Design

3.2 Data Flow Diagram Levels:


A data flow diagram has been classified into different levels. The different levels are as follows:

15
1. Context level or Level-0
2. Top level or Level-1

1. Context Level Diagram:


This level shows the overall context of the system and its operating environment and shows the whole
system as just one process user register into the application and then and then get the response the
entire application is installed on the mobile.

FIG.2 Context Level Diagram

2. Top Level Diagram

This level (level 1) shows all processes at the first level of numbering, data stores, external entities and the
data flows between them. The purpose of this level is to show the major high-level processes of the system
and their interrelation. A process model will have one and only one level-1 diagram. A level -1 diagram must
be balanced with its parent context level diagram.

16
3.3 UML Diagrams

The Unified Modeling Language (UML) is a graphical language for visualizing, specifying, constructing and
documenting of a software intensive system. The UML gives a standard way to write a system blueprints,
covering conceptual things, such as classes written in a specified programmed language, database schemas
and reusable software components.

There are 5 types of diagrams

➢ Class Diagram

➢ Use case Diagram

➢ Sequence Diagram

➢ Collaboration Diagram

➢ Activity Diagram
The above diagrams are described below with explanation with their diagrams.

3.3.1 Use-Case Diagram


A use-case in software engineering and systems engineering is a description of a system behaviour as it
responds to a request that originates from outside of that system. In other words, a use case describes “who”
can do “what” with the system in question. The use case technique is used to capture a system’s behavioural
requirements by detailing scenario-driven threads through the functional requirements.
17
In software engineering a use case in the Unified Modelling Language (UML) is a type of behavioural diagram
defined by and created from a Use-case analysis. Its purpose is to present a graphical overview of the
functionality provided by a system in terms of actors, their goals and any dependencies between those use
case.

Actor
An actor portrays any entity (or entities) that perform certain roles in a given mobile. The different roles the
actor represents are the actual business roles of users in a given mobile. An actor in a use case diagram interacts
with a use case to identify an actor, search in the problem statement for business terms that portray roles in
the system.

Use Case:
A use case in a use case diagram is a visual representation of distinct business functionality in the system. The
key term here is “distinct business functionality”. To choose a business process as a likely candidate for
modelling as a use case, you need to ensure that the business process is discrete in nature. The figure use case
diagram of color detection describe

3.3.2 Collaboration Diagram:


A collaboration diagram is an inter action diagram that emphasizes the structural organization of the objects
that send and receive messages. It shows a set of objects, links among those objects and messages sent and
receive by the objects. The objects are typically named or anonymous instances of classes but may also
represent instance of other things such as collaborations, components and nodes.

18
3.3.3 Class Diagram:
A “Class Diagram” shows a set of classes, interfaces and collaborations and their relationships. These
diagrams are most common diagram in modeling object-oriented systems

Relationships:

1. Dependency:
Dependency is a semantic relationship between two things in which change to one thing may affect the
semantics of other things. Graphically a dependency rendered as a dashed-line, possibly directed occasionally
including a label.

Figure: Dependency

2. Association:
Association is a structural relationship that describes set of links. A link being a connection among objects.
Aggregation is a special kind of association a structural relationship between a whole and its parts. It is
graphically rendered as a solid-line.

_________________

Figure: Association

3. Generalization:
Generalization is a specialization/generalization relationship in which objects of specialized element (child)
are substitutable for object of the generalized element (parent).in this way the child shares the structure and
behavior of the parent. Graphically rendered as a solid-line with a hollow over-head pointing to the parent.

3.3.4 Activity Diagram:


Activity diagrams are a loosely defined diagram technique for showing work flows of stepwise activities and

actions, with support for choice, iteration and concurrency.


19
Class Diagram Of Color Detection

Action State:
It indicates actions performed by the state.

Objects:

A Concrete manifestation of abstraction; an instance of a class.

20
Activity Diagram of Color Detection

21
4.PROJECT DESCRIPTION
OpenCV, Pandas, and numpy are the Python packages that are necessary for this project in Python.

The project folder contains 2 files:

• main.py – main source code of our project.

• Colors.csv – a csv file that contains our color dataset.

4.1 About The Program

Taking An Input From The User’s Webcam

camera = cv2.VideoCapture(0)

Read The CSV File With Pandas


The pandas library is very useful when we need to perform various operations on data files like CSV.
pd.read_csv() reads the CSV file and loads it into the pandas Data Frame. We have assigned each column with
a name for easy accessing.

index = ['color', 'color_name', 'hex', 'R', 'G', 'B']


df = pd.read_csv('colors.csv', names = index, header = None)

Set A Mouse Callback Event On A Window


First, we created a window in which the input image will display. Then, we set a callback function which will
be called when a mouse event happens. With these lines, we named our window as ‘image’ and set a callback
function which will call the identify_color() whenever a mouse event occurs.

cv2.namedWindow('image')
cv2.setMouseCallback('image', identify_color)
22
Create the Draw Function
It will calculate the rgb values of the pixel which we double click. The function parameters have the event
name, (x,y) coordinates of the mouse position, etc. In the function, we check if the event is double-clicked
then we calculate and set the r,g,b values along with x,y positions of the mouse

Calculate Distance to Get Color Name


We have the r,g and b values. Now, we need another function which will return us the color name from RGB
values. To get the color name, we calculate a distance(d) which tells us how close we are to color and choose
the one having minimum distance.

Our distance is calculated by this formula:

d = abs(Red – ithRedColor) + (Green – ithGreenColor) + (Blue –ithBlueColor)

Display Image on the Window


Whenever a hover event occurs, it will update the color name and RGB values on the window. Using the
cv2.imshow() function, we draw the image on the window. When the user hovers the window, we draw a
rectangle and get the color name to draw text on the window using cv2.rectangle and cv2.putText() functions.

4.2 Color Detection Feature


Various image feature detection methods have been discussed to extract locale imag structures such as edges,
corners and circles. As there are many color invariant models available, the inherent difficulty is how to
automatically select the weighted subset of color models producing the best result for a particular task. In
this section, we outline how to select and weight color (invariant) models for discriminatory and robust image
feature detection.

To achieve proper color model selection and fusion, we discuss a method that exploits non-perfect correlation
between color models or feature detection algorithms derived from the principles of diversification. As a
consequence, an optimal balance is obtained between repeatability and distinctiveness. The result is a
weighting scheme which yields maximal feature discrimination. OpenCV color detection is just a starting

23
point. The ultimate goal is to eventually locate the coloured element position within a video stream frame
using Python 3 code. So, if I can isolate and track the element in the video stream,

24
5. SYSTEM DEVELOPMENT

5.1 Python
Python is an interpreter, high-level programming language for general-purpose programming by “Guido van
Rossum” and first released in 1991, Python has a design philosophy that emphasizes code readability, and a
syntax that allows programmers to express concepts in fewer lines of code, notably using significant
whitespace. It provides constructs that enable clear programming on both small and large scales.

Python features a dynamic type system and automatic memory management. It supports multiple
programming paradigms, including object-oriented, imperative, functional, procedural, and has a large and
comprehensive standard library. Python interpreters are available for many operating systems. Python, the
reference implementation of Python, is open source software and has a community-based development model,
as do nearly all of its variant implementations. Python is managed by the non-profit Python Software
Foundation.

Python is a general purpose, dynamic, high level and interpreted programming language. It supports object-
oriented programming approach to develop applications. It is simple and easy to learn and provides lots of
high level data structures. The Application Programmer’s Interface to Python gives C and C++ programmers
access to the Python interpreter at a variety of levels. The API is equally usable from C++, but for brevity it
is generally referred to as the Python/C API. There are two fundamentally different reasons for using the
Python/C API. The first reason is to write extension modules for specific purposes; these are C modules that
extend the Python interpreter. This is probably the most common use. The second reason is to use Python as
a component in a larger application; this technique is generally referred to as embedding Python in an
application.

Open source libraries: Pandas, Numpy, SciPy, matplotlib, OpenCV

Python Versions
Python 2.0 was released on 16 October 2000 and had many major new features, including a cycle-detecting,
garbage collector, and support for Unicode. With this release, the development process became more
transparent and community-backed.

25
Python 3.0 (initially called Python 3000 or py3k) was released on 3 December 2008 after a long testing period.
It is a major revision of the language that is not completely backward-compatible with previous versions.
However, many of its major features have been back ported to the Python 2.6.x and 2.7.x version series, and
releases of Python 3 include the 2to3 utility, which automates the translation of Python 2 code to Python 3.
Python 2.7 s end-of-life date (a.k.a. EOL, sunset date) was initially set at 2015, then postponed to 2020 out of
concern that a large body of existing code could not easily be forward-ported to Python 3.In January 2017,
Google announced work on a Python 2.7 to go Tran’s compiler to improve performance under concurrent
workloads. Python 3.6 had changes regarding UTF-8 (in Windows, PEP 528 and PEP 529) and Python 3.7.0b1
(PEP 540) adds a new &quot;UTF-8 Mode&quot; (and overrides POSIX locale).

➢ Python is a scripting language like PHP, Perl, and Ruby.

➢ No licensing, distribution, or development fees

➢ It is a Desktop application.

➢ Linux, windows

➢ Excellent documentation

➢ Thriving developer community

5.2 OpenCV:
OpenCV-Python is a library of Python bindings designed to solve computer vision problems. Python is a
general purpose programming language started by Guido van Rossum that became very popular very quickly,
mainly because of its simplicity and code readability. It enables the programmer to express ideas in fewer
lines of code without reducing readability. Computer Vision is one of the techniques from which we can
understand images and videos and can extract information from them. Python OpenCV is the most popular
computer vision library. By using it, one can process images and videos to identify objects, faces, or even
handwriting of a human. When it is integrated with various libraries, such as NumPy, python is capable of
processing the OpenCV array structure for analysis.

26
Installation:

To install OpenCV, one must have Python and PIP, preinstalled on their system.

After installing both Python and PIP, type the below command in the terminal.

pip install opencv-python

Features Of OpenCV:
OpenCV has a modular structure, which means that the package includes several shared or static libraries. The
following modules are available:

➢ Core - a compact module defining basic data structures, including the dense multi-dimensional
array Mat and basic functions used by all other modules.

➢ Imgproc - an image processing module that includes linear and non-linear image filtering,
geometrical image transformations (resize, affine and perspective warping, generic table-based
remapping), color space conversion, histograms, and so on.

➢ Video - a video analysis module that includes motion estimation, background subtraction, and
object tracking algorithms.

➢ Calib3d - basic multiple-view geometry algorithms, single and stereo camera calibration, object
pose estimation, stereo correspondence algorithms, and elements of 3D reconstruction.

➢ Features2d - salient feature detectors, descriptors, and descriptor matchers.

➢ Object detection - detection of objects and instances of the predefined classes (for example, faces,
eyes, mugs, people, cars, and so on).

➢ High GUI - an easy-to-use interface to video capturing, image and video codecs, as well as simple
UI capabilities.

➢ GPU - GPU-accelerated algorithms from different OpenCV modules.

➢ Some other helper modules, such as FLANN and Google test wrappers, Python bindings, and
others. Compared to languages like C/C++, Python is slower. That said, Python can be easily
extended with C/C++, which allows us to write computationally intensive code in C/C++ and
create Python wrappers that can be used as Python modules. This gives us two advantages: first,

27
the code is as fast as the original C/C++ code (since it is the actual C++ code working in
background) and second, it easier to code in Python than C/C++. OpenCV-Python is a Python
wrapper for the original OpenCV C++ implementation.

Advantages Of OpenCV:
➢ OpenCV is written in C++ and its primary interface is in C++, because C++ is very fast language and
have slow run time. This is very useful because we are going to develop real-time computer vision
applications for that we need really high processing.

➢ OpenCV is a versatile module. One of the important features of OpenCV is that, there are bindings in
python, java and MATLAB/OCTAVE programming languages. This allowed many developers to
build their applications using Python, Java, JavaScript or MATLAB.

➢ It is the reason why millions of developers from the world use OpenCV to build computer vision
applications. Vision gesture, Color Detection, Object detection, Segmentation and Recognition are
great examples of Uses OpenCV.

5.3 Numpy
Numpy, which stands for Numerical Python, is a library consisting of multidimensional array objects and a
collection of routines for processing those arrays. Using Numpy, mathematical and logical operations on
arrays can be performed. This tutorial explains the basics of Numpy such as its architecture and environment.
It also discusses the various array functions, types of indexing, etc. An introduction to Matplotlib is also
provided. All this is explained with the help of examples for better understanding. Numpy is a Python package.
It stands for Numerical Python. It is a library consisting of multidimensional array objects and a collection of
routines for processing of array. Numeric, the ancestor of Numpy, was developed by Jim Hamelin. Another
package Numara was also developed, having some additional functionality. In 2005, Travis Oliphant created
Numpy package by incorporating the features of Numara into Numeric package. There are many contributors
to this open source project.The Python programming language was not initially designed for numerical
computing, but attracted the attention of the scientific and engineering community early on, so that a special
interest group called matrix-sig was founded in 1995 with the aim of defining an array computing package.
Among its members was Python designer and maintainer Guido van Rossum, who implemented extensions to
Python’s syntax (in particular the indexing syntax) to make array computing easier.

28
Operations Using Numpy
Using Numpy, a developer can perform the following operations :

➢ Mathematical and logical operations on arrays.

➢ Fourier transforms and routines for shape manipulation.

➢ Operations related to linear algebra. Numpy has in-built functions for linear algebra and random
number generation.

Arrays
A Numpy array is a grid of values, all of the same type, and is indexed by a tuple of nonnegative integers. The
number of dimensions is the rank of the array; the shape of an array is a tuple of integers giving the size of the
array along each dimension. Every Numpy array is a grid of elements of the same type. Numpy provides a
large set of numeric datatypes that you can use to construct arrays. Numpy tries to guess a datatype when you
create an array, but functions that construct arrays usually also include an optional argument to explicitly
specify the datatype.

5.4 Image Module

Functions Of Image Module:

Read An Image Using OpenCV


Use the function cv2.imread() to read an image. The image should be in the working directory or a full path
of image should be given.Second argument is a flag which specifies the way image should be read.

• cv2.imread_color : Loads a color image. Any transparency of image will be neglected. It is the g.
default flueg.

• cv2.imread_grayscale : Loads image in grayscale mode

• cv2.imread_unchanged : Loads image as such including alpha channel

29
Display An Image
Use the function cv2.imshow() to display an image in a window. The window automatically fits to the image
size.

First argument is a window name which is a string. second argument is our image. You can create as many
windows as you wish, but with different window names.

cv2.imshow('image',img)

cv2.waitKey(0)

cv2.destroyAllWindows()

• cv2.waitKey () is a keyboard binding function. Its argument is the time in milliseconds. The function
waits for specified milliseconds for any keyboard event. If you press any key in that time, the program
continues. If 0 is passed,it waits indefinitely for a key stroke. It can also be set to detect specific key
strokes like, if key a is pressed etc which we will discuss below.

• cv2.destroyAllWindows () simply destroys all the windows we created. If you want


to destroy any specific window, use the function cv2.destroyWindow () where you pass
the exact window name as the argument.

5.5 Camera Module

Capture Video From Camera


Often, we have to capture live stream with camera. OpenCV provides a very simple interface to this. Let’s
capture a video from the camera (I am using the in-built webcam of my laptop), convert it into grayscale video
and display it. Just a simple task to get started.To capture a video, you need to create a VideoCapture object.
Its argument can be either the device index or the name of a video file. Device index is just the number to
specify which camera. Normally one camera will be connected (as in my case). So I simply pass 0 (or -1).
You can select the second camera by passing 1 and so on. After that, you can capture frame-by-frame. But at
the end, don’t forget to release the capture.

30
5.6 Object Module

The Object module will allow you to draw different geometric shapes with OpenCV

You will learn these functions : cv2.line(), cv2.circle() , cv2.rectangle(), cv2.ellipse(), cv2.putText() etc.

In all the above functions, you will see some common arguments as given below:

➢ img: The image where you want to draw the shapes

➢ color: Color of the shape. for BGR, pass it as a tuple, eg: (255,0,0) for blue. For grayscale, just pass
the scalar value.

➢ thickness: Thickness of the line or circle etc. If -1 is passed for closed figures like circles, it will fill
the shape.

➢ default thickness = 1

➢ lineType : Type of line, whether 8-connected, anti-aliased line etc. By default, it is 8-connected.
cv2.LINE_AA gives anti-aliased line which looks great for curves

Drawing Line in OpenCV


To draw a line, you need to pass starting and ending coordinates of line. We will create a black image and
draw a blue line on it from top-left to bottom-right corners.

import numpy as np

import cv2

img = cv2.line(img,(0,0),(511,511),(255,0,0),5)

Drawing Rectangle

To draw a rectangle, you need top-left corner and bottom-right corner of rectangle. This time
we will draw a green rectangle at the top-right corner of image.

img = cv2.rectangle(img,(384,0),(510,128),(0,255,0),3)

31
5.7 Pandas
Pandas is an open-source library that is made mainly for working with relational or labeled data both easily
and intuitively. It provides various data structures and operations for manipulating numerical data and time
series. This library is built on top of the NumPy library. Pandas is fast and it has high performance &
productivity for users.

To install Pandas, type the below command in the terminal:

pip install pandas

Features of Pandas

Great Data Handling:


The Pandas library provides its users with Series and DataFrames, both of which are efficient
and fast ways of managing data and exploring it. They also aid us in representing our data
efficiently, allowing us to manipulate it in a variety of ways. This feature is the one that makes
Pandas so efficient for data scientists.

Handling Of Missing Data:


Data is often complex and very confusing to decipher. But that is just the beginning. The
unprocessed nature of data creates many problems, one of which is the frequent occurrence of
missing values and data. It is very important to handle all the values which are missing properly
otherwise they tend to contaminate the end results of our study. Pandas have the handling of
missing data integrated into its library and some of its features have you covered on this front.

Indexing And Alignment:

You may have a lot of data but all of it is useless when you don't know what it depicts or where
any of it actually belongs. Therefore it is paramount that the data is labeled. Another important
note is to keep it organized. If the organization is not done correctly, the data will be impossible to

32
read. Pandas have several unique methods of indexing and aligning its data which takes care of the
needs for the organizing and labelling of data.

Tools for Input and Output:

Pandas offer you a large variety of tools that are built-in which help you in reading and writing
data. When you try to understand your data, you will obviously have to write it into databases, data
structures, web services, etc. and read them from these sources too. Pandas' built-in tools have
made these tasks very simple.

Data Clean-Up:

Like we discussed, data can be quite unprocessed. This often makes it extremely adulterated and
performing any research or analysis on such unprocessed data can lead to results that are far from
reality. Thus cleaning our data is very important and Pandas provides this feature to us.They help
in making our code cleaner and the data clean enough for the human eye to see what's

happening. Cleaner data gives better results.

Support for Multiple File Formats:

There are various different file formats these days in which data is present. Therefore it becomes
important that there are libraries that can read and analyze different file formats. Pandas leave its
peers far behind with the number of file formats it supports. Pandas can support JSON, CSV,
HDF5, and Excel. This is one of the biggest selling points of Pandas.

Multiple Features for Time Series:

If you are a beginner, this feature might not make complete sense to you now but you will love it
in the days to come. These set of features include frequency conversion and moving window
statistics as well. As we learn more about Pandas, we will realize how important these features are
for people working in data science.

Joining and Merging Datasets:

33
When we analyse data, there is a constant need to join and merge different datasets to create a final
one for analysis. A robust system for this is required because if the datasets don’t get joined or
merged properly, our results will get affected and that is not good. Pandas is extremely efficient in
merging various datasets.

Support for Python:

• This feature just eliminates any opposition that Pandas has. Python, with a scarcely believable number
of powerful libraries at its disposal, has become one of the leading programming languages used
by data scientists.
• Pandas can be a part of Python and give us access to other helpful libraries like MatPlotLib and
NumPy.

Grouping Of Data:

Pandas have various features, one of them being GroupBy, which helps you to separate data into
chosen categories according to criteria given by you. This function splits the data and implements
the given function on them. It then combines the results.

Visualization of Data:

• A huge part of data science is the visualization of data. This is what makes the study's results
understandable to normal human eyes.
• Pandas offer in-build abilities that help you in plotting your data and analyzing the different kinds
of graphs which form. If there is no visualization, any analysis of data would make no sense to
almost anyone.

Unique Data:

• In unprocessed data, there is a lot of repetition. Therefore it is essential that we analyze only those
data that have unique values.

34
• Pandas offer us this feature which lets us see all the values in the dataset which are unique. This
function is dataset.column.unique() where the keywords column and dataset are the respective
names of your column and dataset.

Masking Data:

There is always unnecessary data present in our datasets which we don't require. Therefore it is
essential that we filter these data which we don't want. The mask function which Pandas provides
helps us in doing exactly data as it turns any data that meets our given criteria for elimination, it
turns it into missing data.

Mathematical Operations:

Pandas have a function called apply which allows its users to implement all kinds of mathematical
operations on their data. This is of enormous help as one's dataset may or may not be of the correct
order. This is taken care of by a simple mathematical operation.

Applications of Pandas

Economics:

• Data analysis is a constant need for Economics because it's always changing. The data needs to be
analyzed to create patterns and trends which are then analyzed and interpreted to understand how
the economy in various sectors is faring, something which is of extreme importance to economists.
A lot of modern-day economists have taken to pandas and python to handle huge
datasets and interpret that data. Pandas have an extensive list of inbuilt tools and functions that
make it the efficient package it is.
• Tools like file-handling and data frames are extremely useful to access data and manipulate it to
get the results we want. These applications of Pandas has helped Economists all over the world to
make breakthroughs and studies they could not do earlier.

35
Neuroscience:

• Understanding how our brains (and consequently the entire nervous system) work has been an
unfulfilled wish of doctors since time immemorial because they believe that it will help discover
answers to many mysteries that our body holds.

• Machine Learning, driven by the numerous applications of pandas, has helped this field a lot. Once
again, pandas' great capability of data manipulation has played a huge role. They have helped
compile copious amounts of data and analysed it to produce results which are quite significant for
neuroscientists.

Prediction Of Stocks:

• Few things in the world are as volatile as the stock market. This is literally one of the biggest
datasets in the world. Although it is almost impossible to predict the changes in stock market, with
the correct application of Pandas and some help from a few libraries like MatPlotLib and NumPy,
you can easily make models which can predict (to a large extent) how the stock market will turn
out to be.
• This is only possible because of the huge datasets we have in terms of the previous behaviour of
the stocks which inform the system about their behaviour both individual ad codependently. By
learning these behaviours and movements, a good model will be able to predict with quite a bit of
accuracy as to what your next move should be.

Statistical Analysis:

Statistics itself means dealing with loads of data. Hence a library like pandas is able to help in
various ways because it basically deals with various forms of data handling and its functions. The
basic functions of mean, median, and mode are quite helpful while performing calculations based
on statistics. There are loads of other functions in pandas which help you with getting better results
in Statistics.

36
Natural Language Processing (NLP):

A very common buzzword right now, Natural Language Processing or NLP has announced its
arrival to the world in style. The main purpose of this concept is to help computers understand the
normal human language and the various nuances it possesses. This is quite a difficult task to
accomplish, but with pandas at your service along with Scikit-Learn, you can create a basic model
for NLP which you can enhance later on. You can use various functions and other libraries to help
you out.

Analytics:

Analytics is everywhere. Whether you want to analyse a website or analyse any other platform,
pandas helps you in doing it all. Its efficient data handling capabilities and dynamic data
manipulation combined with its amazing visualization capabilities play a huge role in helping it
ace this field.

Data Science:

Most of the examples we have discussed are a part and parcel of data science. It is a huge umbrella
which covers any and every field that deals with the analysis, handling, and manipulation of data.
Therefore almost all of pandas applications fall under it.

Big Data:

Python has a great link with Spark and Hadoop. Therefore Pandas can work with Big data too

Advantages
➢ Fast and efficient for manipulating and analyzing data.

➢ Data from different file objects can be loaded.

➢ Data set merging and joining.

➢ Flexible reshaping and pivoting of data sets

➢ Provides time-series functionality.

➢ Excellent representation of data


37
5.8 PyCharm

Available as a cross-platform application, PyCharm is compatible with Linux, macOS, and Windows
platforms. Sitting gracefully among the best Python IDEs, PyCharm provides support for both Python 2 and
Python 3 versions. PyCharm can be customized as per the development requirements, and personal
preferences call for. It was released to the public for the very first time back in February of 2010.

PyCharm Features:
Intelligent Code Editor
PyCharm comes with a smart code editor that facilitates writing high-quality Python code. It offers an
enhanced level of code comprehension and readability by means of distinct color schemes for keywords,
classes, and functions, i.e., syntax and error highlighting. In addition to offering the smart code completion
feature, the code editor generates instructions for completing the current code. Identifying errors and issues
is much more comfortable, along with linter integration and quick fixes.

Availability of Integration Tools


PyCharm provides support for integrating a range of tools. These tools vary from helping in enhancing the
code productivity to facilitate dealing with data science projects. Some of the most essential integration
tools available for PyCharm include:

• Anaconda - A free and open-source Python distribution geared towards scientific computing with
simplified package management and deployment.

• IPython - A robust command shell for interactive computing.

• Kite - An AI-powered autocomplete plugin.

• Pylint - A source-code, bug, and quality checker.

• pytest - A framework for writing small tests for Python code.

Integrated Debugging and Testing


An IDE comes with support for debugging and testing programs. To accomplish the same,
PyCharm features an integrated Python debugger and integrated unit testing with line-by-line code
coverage.

38
Project and Code Navigation

• The code navigation feature makes it much easier for developers to navigate to a class,
function, or file. It also helps in significantly cutting-down effort and time required to edit
and enhance the Python code. File structure views and specialized project views are readily
available.

• The lens mode allows a developer to inspect and debug the entire Python source code
thoroughly. With code navigation, locating an element, variable, etc. is done in almost no
time. Developers can quickly jump between classes, files, and methods.

Refactoring

• The refactoring feature in PyCharm helps in improving the internal structure of a Python program
without affecting the external performance of the same. Making changes to both local and global
variables is efficient and fast.

• The extract method is also there to split up extended classes and functions. Other useful code
refactoring features include:

I. Introduce constant
II. Introduce variable
III. Pull up
IV. Push down

Remote Development
PyCharm allows running, debugging, testing, and deploying applications on remote hosts or virtual
machines. For the purpose, the Python IDE offers:

• An integrated SSH terminal


• Docker and Vagrant integration
• Remote interpreters

39
Version Control Systems (VCSs) Integration

• In its simplicity, a version control system (VCS) keeps track of the changes made to files, applications,
and other sources of information. It can be considered as a database of changes.

• PyCharm provides a unified user interface for CVS, Git, Mercurial, Perforce, and Subversion.

Other Pycharm Features

• Code generation for generating language-specific code constructs.


• Code reference information for instantly accessing API documentation, hints on using various
programming entities, etc
• File templates for creating scripts, stub classes, etc
• Import assistance for importing missing libraries
• Intention actions and quick fixes for optimizing code
• Language-specific tools for developing, running, testing, and deploying applications
• Language injections to work with supported languages inside attributes, tags, or string literals
• Live templates for expanding abbreviations into complicated code constructs

Installing and Setting Up Pycharm

Recommended System Requirements


Memory - 8GB
Storage Space - 5GB of SSD
Resolution - 1920x1080
OS - Any latest 64-bit version of macOS/Microsoft Windows/Linux

40
6. FUTURE ENHANCEMENTS

Contrast Limited Adaptive Histogram Equalization:


This algorithm can be applied to improve the contrast of the images. This algorithm works by creating
several histograms of the image and uses all of these histograms to redistribute the lightness of the
image. CLAHE can be applied to greyscale as well as colour images.

Color Image Enhancement of Acute Leukemia Cells in Blood


Microscopic Image for Leukemia Detection Sample
Leukemia is a type of cancer that affects the white blood cell. Early detection of leukemia is important
to reduce the rate of mortality. In order to detect acute leukemia, conventional screening method based
on microscopic image is used, where sample of blood cell will be taken from the suspected leukemia
patient and manually white blood cell (WBC) condition is observed using microscope. With introduction
to a new enhancement method which is a combination of Particle swarm optimization (PSO), PSO
algorithm is used to perform image segmentation to remove all the unwanted part such as red blood cell
(RBC), platelet and also the background while retain the WBC part. The segmentation algorithm uses
saturation S-component based on Hue, Saturation, and Intensity (HSI) color model.

Object Segregation:
An object can be segregated on the basis of color

Object Tracking:
A moving object can be tracked based on its color

Automobiles:
In self-driving car, to detect the traffic signals.

Segregation of Items:
Multiple color detection is used in some industrial robots, to performing pick-and-place task in
separating different colored objects.

41
7. CONCLUSION
In this project defined to get the required color field from an RGB image. In this various step are implemented
using OpenCV platform. The main positive point of this method is its color differentiation of a mono color.
The color-enhanced information presentation modes on decision quality, decision making time, use of
information, and user perceptions. Based on the findings of these studies, propositions about the impact of
graphics and color on individual decision makers are presented. The influence of presentation mode on human
performance and the perceived value of information is related to how well it supports the solution approach
to a particular task. The benefits of graphics are limited to reducing decision making time but only when the
graphical report has been designed to directly assist in solving the task. That can also be implemented.

42
CODING:

import numpy as np

import pandas as pd

import cv2

import imutils

camera = cv2.VideoCapture(0)

r = g = b = xpos = ypos = 0

index = ['color', 'color_name', 'hex', 'R', 'G', 'B']

df = pd.read_csv('colors.csv', names=index, header=None)

def getcolorname(R, G, B):

minimum = 10000

for i in range(len(df)):

d = abs(R - int(df.loc[i, "R"])) + abs(G - int(df.loc[i, "G"])) + abs(B - int(df.loc[i, "B"]))

if (d <= minimum):

minimum = d

cname = df.loc[i, 'color_name'] + ' Hex=' + df.loc[i, 'hex']

return cname

43
def identify_color(event, x, y, flags, param):

global b, g, r, xpos, ypos, clicked

xpos = x

ypos = y

b, g, r = frame[y, x]

b = int(b)

g = int(g)

r = int(r)

cv2.namedWindow('image')

cv2.setMouseCallback('image', identify_color)

while True:

(grabbed, frame) = camera.read()

frame = imutils.resize(frame, width=900)

kernal = np.ones((5, 5), "uint8")

cv2.rectangle(frame, (20, 20), (800, 60), (b, g, r), -1)

text = getcolorname(b, g, r) + ' R=' + str(r) + ' G=' + str(g) + ' B=' + str(b)

cv2.putText(frame, text, (50, 50), 2, 0.8, (255, 255, 255), 2, cv2.LINE_AA)

if (r + g + b >= 600):

cv2.putText(frame, text, (50, 50), 2, 0.8, (0, 0, 0), 2, cv2.LINE_AA)

44
cv2.imshow('image', frame)

if cv2.waitKey(20) & 0xFF == 27:

break

camera.release()

cv2.destroyAllWindows()

45
OUTPUT WITH SAMPLE SCREENSHOT

The Project’s Code

Goto The Project Folder And Select The Path Location

46
Copy The Path Location

Open The Command Prompt

47
Enter The Path Name Along With “Cd” Command In The Command Prompt

Enter The File Name In The Cmd Along With “Py” Command

48
8. BIBLIOGRAPHY

1. R. Haralick and L. Shapiro, Computer and Robot Vision, volume II. Addison-Wesley, 1992.

2. C. Schmid, R. Mohr, and C. Bauckhage, “Evaluation of interest point detectors,” International Journal
of Computer Vision, vol. 37, no. 2, pp. 151–172, 2000.

3. J. Shi and C. Tomasi, “Good features to track,” in IEEE conference on Computer Vision and Pattern
Recognition, 1994.

4. S. Di Zenzo, “Note: A note on the gradient of a multi-image,” Computer Vision, Graphics, and Image
Processing, vol. 33, no. 1, pp. 116–125, 1986.

5. J. Bigun, “Pattern recognition in images by symmetry and coordinate transformations,” Computer


Vision and Image Understanding, vol. 68, no. 3, pp. 290–307, 1997.

6. J. Bigun, G. Granlund, and J. Wiklund, “Multidimensional orientation estimation with applications to


texture analysis and opitcal flow,” IEEE trans. on pattern analysis and machine intelligence, vol. 13,
no. 8, pp. 775–790, 1991.

7. O. Hansen and J. Bigun, “Local symmetry modeling in multi-dimensional images,” pattern


Recognition Letters, vol. 13, pp. 253–262, 1992.

8. J. van de Weijer, L. van Vliet, P. Verbeek, and M. van Ginkel, “Curvature estimation in oriented
patterns using curvilinear models applied to gradient vector fields,” IEEE Trans. Pattern Analysis and
Machine Intelligence, vol. 23, no. 9, pp. 1035–1042, 2001.

9. S. Shafer, “Using color to seperate reflection components,” COLOR research and application, vol. 10,
pp. 210–218, Winter 1985.

10. T. Gevers and H. Stokman, “Robust histogram construction from color invariants for object
recognition,” IEEE Trans. On Pattern Analysis and Machine Intelligence (PAMI), vol. 26, no. 1, pp.
113–118, 2004.

11. T. Gevers and A.W. M. Smeulders, “Color based object recognition,” Pattern Recognition, vol. 32, pp.
453–464, March 1999.

12. G. Klinker and S. Shafer, “A physical approach to color image understanding,” Int. Journal of
Computer Vision, vol. 4, pp. 7–38, 1990.

49
13. J. Geusebroek, R. van den Boomgaard, A. Smeulders, and H. Geerts, “Color invariance,” IEEE Trans.
Pattern Analysis Machine Intell., vol. 23, no. 12, pp. 1338–1350, 2001.

14. J. van de Weijer, T. Gevers, and J. Geusebroek, “Edge and corner detection by photometric quasi-
invariants,” IEEE Trans. Pattern Analysis and Machine Intelligence, vol. 27, no. 4, pp. 625–630, 2005.

15. L. Itti, C. Koch, and E. Niebur, “Computation modeling of visual attention,” Nature Reviews
Neuroscience, vol. 2, pp. 194–203, March 2001.

16. J. van de Weijer and T. Gevers, “Boosting color saliency in image feature detection,” in Int’l Conf.
Computer Vision and Pattern Recognition, (San Diego, CA, USA), 2005.

17. J. van de Weijer, T. Gevers, and A. Bagdanov, “Boosting color saliency in image feature detection,”
IEEE Trans. Pattern Analysis and Machine Intelligence, vol. 28, no. 1, pp. 150–156, 2006.

18. T. Gevers and H. Stokman, “Classification of color edges in video into shadow-geometry, highlight,
or material transitions,” IEEE Trans. on Multimedia, vol. 5, no. 2, pp. 237–243, 2003.

19. T. Gevers and F. Aldershoff, “Color feature detection and classification by learning,” in Proceedings
IEEE International Conference on Image Processing (ICIP), 2005.

20. J. van de Weijer, T. Gevers, and A. Smeulders, “Robust photometric invariant features from the color
tensor,” IEEE Trans.Image Processing, vol. 154, no. 1, 2006.

21. S. D. Zenzo, “A note on the gradient of a multi-image,” Computer Vision, Graphics, and Image
Processing, vol. 33, pp. 116–125, 1986.

22. G. Sapiro and D. L. Ringach, “Anisotropic diffusion of multivalued images with applications to color
filtering,” IEEE Transactions Pattern Analysis and Machine Intelligence, vol. 5, no. 11, pp. 1582–
1586, 1996.

23. G. Sapiro and D. Ringach, “Anisotropic diffusion of multivalued images with applications to color
filtering,” IEEE Trans.Image Processing, vol. 5, pp. 1582–1586, Oct 1996.

24. C. Harris and M. Stephens, “A combined corner and edge detector,” in Proc. 4th Alvey Vision Conf.,
vol. 15, pp. 147–151,1988.

25. D. H. Ballard, “Generalizing the Hough transform to detect arbitrary shapes,” Pattern Recognition,
vol. 12, no. 2, pp. 111–122,1981.

26. H. Markowitz, “Portfolio selection,” Journal of Finance, vol. 7, 1952.

27. P. Wolfe, “The simplex method for quadratic programming,” Econometrica, vol. 27, no. 3, 1959.

28. Rafael, C. Gonzalez and Richard E. Woods. “Digital Image Processing,” 2nd edition, Prentice Hall,
2002.
50
29. Gabriel Thomas, Daniel Flores-Tapia, and Stephen Pistorius, “Histogram Specification: A Fast and
Flexible Method to Process Digital Images,” IEEE Transactions on Instrumentation and Measurement,
Vol. 60, no. 5, May 2011, pp.1565-1578

30. Mohd Firdaus Zakaria, Haidi Ibrahim, and Shahrel Azmin Suandi, “A Review: Image Compensation
Techniques,”2nd International Conference on Computer Engineering and Technology 2010, vol. 7,
pp. 404-408.

31. Nyamlkhagva Sengee, Altansukh Sengee, and Heung-Kook Choi, “Image Contrast Enhancement
using Bi-Histogram Equalization with Neighborhood Metrics,” IEEE Trans.Consumer Electronics,
vol.56, no. 4, pp. 2727-2734, Nov

32. Dileep MD, and A. Sreenivasa Murthy, “A Comparison Between Different Color Image Contrast
Enhancement Algorithms,” Proceedings of IEEE ICETECT 2011, pp. 708-712.

33. Youhei Terai, Tomio Goto, Satoshi Hirano, and Masaru Sakuari, “Color Image Contrast
Enhanncement by Retinex Model”, 13th IEEE International Symposium on Consumer Electronics
2009, pp. 392-393.

34. Hanumantharaju M.C., Ravishankar M., Rameshbabu D.R., and Ramchandran S., “Color Image
Enhancement using Multiscale Retinex with Modified Color Restoration Technique,” Second
International Conference on Emerging Applications of Information Tecnology 2011, pp. 93-97.

35. In-su Jang, Tae-Hyoung Lee, Ho-Gun Ha, and Yeong-Ho Ha, “Adaptive Color Enhancement Based
on Multi-Scaled Retinex using Local Contrast of the Input Image” 2011.

36. Li He, Ling Luo, and Jin Shang, “An Image Enhancement Algorithm Based Retinex Theory,”
International Workshop on Education Technology and Computer Science 2009, pp. 350-352.

51

You might also like