You are on page 1of 31

1

Department of Electronics Engineering, UNSIET


Veer Bahadur Singh Purvanchal University, Jaunpur
KEC-851: PROJECT- II
PRESENTATION

“Color Detection & Image Segmentation based Invisible Cloak


using Image Processing”
(Make Visible Things Invisible)

Under the guidance of:


Mr. PC Yadav
(Assistant Professor)
2

Our Group Members

Aviral Chaurasia Ayush Singh Prashant Kr Rai


(Roll No-195209) (Roll No-195206) (Roll No-195231)

B.Tech. Students
Department of Electronics and Communication Engineering, UNSIET,
Veer Bahadur Singh Purvanchal University.
Table of Contents 31
S R. NO TOPICS S lide No

1 Introduction 4

2 Aim and Objectives 5


3 Project Requisites 6-7
4 M ethodology Design/Planning of Work 8-9
- Color Detection & Segmentation 10
- HSV M odel 11
- Calibration of HSVs M odels 12
- Setting the HSVs 13
- Generating M ask 14

5 Result Analysis
- Sample 1 15-16
- Sample 2 17
- Sample 3 18-19
- Sample 4 20
- Sample 5 21
Performance Analysis Parameters 22
Functionality System 23

6 Implementation Tasks 24

7 Our Research Work 25-26


8 Gantt Chart 28
7 Applications 29

8 Future Scope M odel 30


9 References & Sources 31
1. Introduction 4

• This project is actually inspire from the cloak which is used in Harry Potter Movie. As in movie when
harry put this cloak on itself it become invisible same as it in this program when a person put the cloak
he/she will become invisible

• It uses Image Processing Techniques to make a person or object appear invisible when captured on a
digital web camera.

• It is an Image Processing method and by making segments of a single predefined Colour from the
video and replacing it with a pre-existing same background, we can create the invisible cloak.

• We will create the Invisible Cloak using an Image Processing Techniques called Color Detection and
Segmentation.

• In order to make this project, you’ll need a single-color cloth. The cloth should not contain any other
color visible. Here we are using a cloth to develop this python project.

Why Single-Color Cloth?


Because we are using color detection and segmentation techniques. If any other color is visible in our
cloak then we have to process the image frame for that color also.
2. AIM & Objectives 5

AIM: The aim of the Invisibility Cloak Project using Image Processing is to develop a
system that can digitally create the illusion of invisibility on a person in real-time camera.

OBJECTIVES

1- Initializing, 2- Detect the


3- Segment out 4- Applying
Capturing & cloth using Color
the red colored Mask on frame
storing the Detection by
cloth by & Combine
background frame choosing
generating a mask frames
through a digital appropriate HSV
mask. together.
camera color space.
3. Project Requisites 6

Python 3.11
(Programing Language/ IDLE)
Command Prompt
(To Installing Dependencies
Open CV Of Python Libraries)

(To Perform Image


Processing Operations) NumPy
(To Store the HSV Values
& Computing them)
Project Requisites Contd. 7

Python: I am going to use python to develop this program .We can also do this using
MATLAB but it will become more complicate and it is very simple in python because it
have predefined modules like Open CV, NumPy for Image Processing.

Open CV: An open source pre defined library for Image Processing in Python to capture
image, performing different operations on images & Process the image.

NumPy: A numerical computation library in python for Storing The HSV Values and for
computing them. All values in the trackbars are stored in the specific variable for operations

CMD: A command prompt terminal is for installing the above libraries of python by using
suitable prompt of PIP.
4. Methodology Design 78

Step 1 Step 2 Step 3 Step 4

Capture & Store Detect the defined Segment out the Generate the final
background frame color using Color defined colored output to create a
using Image Detection & part by magical effect by
Acquisition by Segmentation generating mask combining frames
Store a single algorithm & applying it on together, & remove
frame before frame the unnecessary
starting the (Set The HSV Values) (Detecting the Color (by HSV noise from masks.
Values) Cutting that part by
infinite loop. (Final Output Will By
generating a mask)
Background + Mask)
4.1 Methodology- Planning of Work Contd. 79

1. Capture and store the background frame: The main concept is interchanging the current frame picture element
equivalent to the fabric with the backdrop pixels, so that we obtain the magical effect of invisibility. Thus, we’re
required to save a frame of the backdrop.

2. Identify the cloth (cloak) by using the Colour detection & segmentation algorithm: The correct concept is to
change the color space of the picture from ‘R.G.B.’ (Red, Green, Blue) value to ‘H.S.V’ (Hue, Saturation, Value).
About ‘H.S.V’ color space,
‘Hue’: It gives the information about color.
‘Saturation’: It explains about the intensity of the color.
‘Value’: It tells about the luminosity of color. Shading component of an pictures appears here.

3. Segmenting out the cloak by generating a mask: We refine the mask & then it is further used for segmenting out
the fabric from the frame.

4. Generate the final augmented(magical) output to create Invisibility cloak: Finally, we’ll be replacing ‘the pixels
value of the detected cloak colored area of the cloth with corresponding pixel value of the background’ & ultimately
generating an augmented (magical) output.
4.2 Color Detection & Segmentation 8
10

• Color Detection and Segmentation are techniques used in computer vision to identify and
differentiate specific colors within an image or video.

• Color Detection involves locating and recognizing particular colors, while segmentation
separates objects or regions based on their colors.

• Color Detection is used to identify the person wearing the cloak and the background.
Segmentation then isolates the person from the background, allowing for color manipulation to
blend the person's clothing with the surroundings, creating the illusion of invisibility.

• The color detection algorithm utilizes the HSV (Hue, Saturation, Value) color space to identify
specific colors accurately. HSV is preferred over the traditional RGB color space because it
separates color information from brightness, making it more suitable for color-based
segmentation.

• These techniques play a crucial role in achieving a visually compelling and seamless effect in the
final output
4.3 HSV Color Model 9
11

HSV stands for Hue, Saturation, and Value. It is a color space that
represents colors in terms of:
Hue: It is the color itself, and it is measured in degrees, the color
portion of the model, expressed as a number from 0 to 360 degrees:
Red falls between 0 and 60 degrees.
Yellow falls between 61 and 120 degrees.
Green falls between 121 and 180 degrees.
Blue falls between 241 and 300 degrees.
Magenta falls between 301 and 360 degrees.

Saturation: It describes the amount of gray in a particular color, from


0 to 255. Reducing this component toward zero introduces more gray
and produces a faded effect. Sometimes, saturation appears as a range
from 0 to 255, where 0 is gray, and 255 is a primary color.

Value (or Brightness): Value works in conjunction with saturation


and describes the brightness or intensity of the color, from 0 to 255 ,
where 0 is completely black, and 255 is the brightest and reveals the
most color.
4.4 Calibration of HSV Model 10
12

1. Choose the Blanket as of that colour so it will not match to any other colour of items in your room

2. Click Calibrate Button

3. Slowly Slide L_HUE Slider and observe the calibrating window some part will start to become black,
make sure the blanket you choose should remain white

4. Now Slowly Decrease U_HUE Slider and observe the calibrating window some part will start to become
black, make sure the blanket you choose should remain white

5. Now Slide Other Slider and make sure in calibrating window all thing should appear black but your
blanket remain white

6. Press esc button only to exit the Calibrating Window, if press cross button on Window it will not store
the values so only press esc button only.
4.5 Setting the HSV Values 10
13

Trackbar in OpenCV is a slider control which helps


in picking a value for the variable from a continuous
range by manually sliding the tab over the bar.

Help in Color based segmentation of any objects


4.6 Generating Mask 10
14

In the "Invisible Cloak" project, creating a mask using segmentation is a crucial step in achieving the
illusion of invisibility. This mask is used to separate the subject (person or object) from the background so
that the blending process can be applied effectively. Here's how this process generally works:

• The process of partitioning a digital image into multiple segments is


defined as image segmentation.

• Segmentation aims to divide an image into regions that can be more


representative and easier to analyze.

• In other words, each cluster defines a class of pixels that share similar
colour properties. As the segmentation results depend on the used
colour space, there is no single colour space that can provide
acceptable results for all kinds of images.
15
RESULT- (1st Sample)

(a) Blue color we have to detect (b) Detecting the colors using HSV (c) Binary Masking segmentation
16
RESULT- (1st Sample) Contd.

(d) Testing & Detecting the Color based Segementation


17
RESULT- (2nd Sample Output)
18
RESULT- (3rd Sample)

(a) Setting object as background (b) Detecting blue object color using HSV
19
RESULT- (3rd Sample) Contd.
20
RESULT- (4th Sample Output)

Blue Object is Detected, segmented & by combining mask it is hidden


21
RESULT- (5th Sample Output)

(a) Pink Color object is completely invisible (b) Blue Color object is completely invisible
Performance Analysis Parameters 16
22

Correct Predictions Total Processed Frame Accuracy Precision

85 100 0.85 0.83


98 100 0.98 0.96
89 100 0.89 0.86
93 100 0.93 0.91
81 100 0.81 0.82
93 100 0.93 0.92
Functionality System 17
23
Choose Webcam: 0 Camera ID for your inbuilt webcam in system web cam
1 Camera ID for webcam connected externally to your system.

Stream Web Cam: To connect to CCTV, Android Camera or to any other camera having IP Address
IP Address: IP Address of Your Camera (Example: 192.168.43.1)
Port: Port of Connection (Example: 1111)
Refresh: To Refresh the page to show valid options (always refresh when you change the source)

Connect: To Connect to Camera

Change Background: To Change The background (This Background is used to create the invisibility)

Show Background: To Show Current using Background


Calibrate To Set HSV Values
(Keep in Mind: The White Part In calibrating window will become invisible)
Start Magic: To Start the Magic (That Make You Invisible)

Stop Magic: To Stop Magic

Disconnect To Disconnect from current Source

Exit: To Exit the Program


Implementation Tasks 13
24

Paper
Week’s Month’s
Publishing
May June July August
Dealing with its
Discussed on Paper work for
Week 1 objectives & Objective 3 Done
projects publishing
Methodology
Searched & Introduction to
Article Publishing
Week 2 Analyzing Research Downloaded Requisites Tkinter & designing
on Data Mendeley
Papers GUI
Studied about HSV Applying all Plagiarism
Planned the way of
Week 3 Color Detection functionality to Appraisal &
implementation
Algorithm buttons Detection
Published on
Executing all
Designed the Block Performed Objective 1 Advanced
Week 4 commands &
Diagram &2 Engineering
getting result
Forum
Paper Published by Us 25
Published in “Advanced Engineering Forum” 26

Status of the Paper

Paper Title
Gantt Chart 14
27

100%
100
90
Implementation Progress (%)

80 Objective-1
75%
70
60 Objective-2
50%
50
40 Objective-3
30 25%
20 Objective-4
10
0
May June July August
Deadline
Applications 15
28

(Special Effects in
(To Hide Certain Organs Or Areas
Movies & TV Shows) Of The Body During A Scan)
Entertainment
Industry
Medical Imaging

Military Surveillance
(Create Camouflage for soldiers (To Hide Cameras
From Intruders)
& equipment’s)
Future Scope Model 29

Just to mean literally “invisible”


References & Sources 20
30

[1] Python Open CV Capturing & Initializing the web camera Retrieved from https://www.geeksforgeeks.org/python-
opencv-capture-video- from-camera/
[2] Color Detection of RGB Color Model using python and open cv library retrieved from
https://www.researchgate.net/publication/349355136Color_Detection_of_RGB_Images_Using_Python_and_OpenCv
[3] Identifying the range of colors in HSV Color mode retrieved from
https://stackoverflow.com/questions/36817133/identifying-the-range-of-a-color- in-hsv-using-openc
[4] Color based image Segmentation & Masking of defined colors retrieved from
https://stackoverflow.com/questions/67271730/image-segmentation-and- masking

[5] International Journal of Current Science (IJCSPUB) 2022 Authors: Dimpy Sharma, Isha Malhotra, Veena retrieved
from https://www.ijeat.org/wp-content/uploads/papers/v9i4/D7531049420.pdf DOI: 10.35940/ijeat.D7531.049420
[6] Journal of Engineering Science Authors: G,Rama Devil, Gonuguntla Pavan Kumar, Lankireddy Sai Alekhya Lakshmi,
Bhavani Jillepall
[7] Inte rnational Journal of Engineering and Advanced Technology (IJEAT) Authors: Sapna Malik, Simran Kaur, Sejal
Rana DOI: 10.35940/ijeat.D7531.049420
[8] Interactive Color Image Segmentation using HSV Color Space retrieved from
https://www.researchgate.net/publication/341857676_Interactive_Color_Image_Segmentation_using_HSV_Color_Space
DOI:10.22232/stj.2019.07.01.05
Thanks!
Have any
questions?

You might also like