major porject report (1)
TRANSCRIPT
-
7/24/2019 Major Porject Report (1)
1/45
Integrated Daylight Harvesting And Human Detection Using Digital Image Processing
CHAPTER 1
INTRODUCTION
Daylight harvesting in commercial buildings is experiencing renewed interest,
particularly in light of the environmental consequences of power generation, the desire for
sustainable design, and current strains on the nations power grid. It has been estimated that
commercial businesses use one-quarter of their total energy consumption for lighting.
Daylighting and its associated systems, therefore, offer the opportunity to reduce energy
consumption and costs.
Estimates show that between !" and #!" of the spaces in commercial buildings has
access to daylight either through windows or s$ylights. %he installation of technologiesdesigned to ta$e advantage of available daylight would be an appropriate energy-saving
strategy that could potentially turn off millions of light fixtures for some portion of each day.
& number of technologies currently on the mar$et are designed to either reduce
energy use from electric lighting or increase the daylight penetration within a building while
controlling glare. %he energy-reducing systems typically employ a photosensor technology
teamed with a dimming fluorescent lighting system, which reduces energy demand by
dimming lights proportionally to the amount of daylight received at a reference plane.
'nfortunately, most of these systems do not guarantee effective operation because daylight
rarely penetrates uniformly into a buildings interior. Daylight penetration can vary at
ad(acent wor$stations because individuals operate blinds or exterior obstructions bloc$
daylight. &dditionally, each photosensor typically controls a number of light fixtures in a
space, often resulting in areas that are too dar$ and others that are over-lighted. )igh initial
costs for full dimming ballasts and difficulties with installing and commissioning
photosensors also impede the installation of these systems in commercial buildings.
*ystems that improve daylight penetration include light shelves, light pipes,
controlled shades and blinds, and other active sun-trac$ing daylight delivery systems. &gain,
most of these technologies involve high initial and maintenance costs.
+roblems with current daylighting systems combined with poor sales, point to the
need for new designs that are simple, low cost, and effective. &n effective way to address this
energy problem is to deploy automatic lighting control systems.
%his pro(ect describes a proof-of-concept implementation that uses a high dynamic
range * video camera to integrate daylight harvesting and human detection
Department of ENC Usha Mittal Institute of Technology1
-
7/24/2019 Major Porject Report (1)
2/45
Integrated Daylight Harvesting And Human Detection Using Digital Image Processing
functionalities. It can be demonstrated that the proposed concept not only overcomes several
drawbac$s of conventional lighting control sensors, but also offers functionalities that are not
currently achievable by these sensors.
+roposed concept involves three algorithms, daylight estimation, occupancy detection
and lighting control. %he calibrated system directly estimates luminance from digital images
of the occupied room for use in the daylight estimation algorithm. & novel occupancy
detection algorithm involving color processing in / space and 0ounding 0ox has been
developed. ur lighting control algorithm is based on the 1* technique. 1esults show that2
i3 *ystem can meet different target light-level requirements for different tas$ areas
within the field-of-view of the sensor
ii3 *ystem is unaffected by direct sunlight or a direct view of a light source
iii3 It detects very small movements within the roomiv3 *ystem allows real-time energy monitoring and performance analysis.
Department of ENC Usha Mittal Institute of Technology2
-
7/24/2019 Major Porject Report (1)
3/45
Integrated Daylight Harvesting And Human Detection Using Digital Image Processing
CHAPTER 2
LITERATURE SURVEY
2.1 Occupancy sensors and !e"r dra#$ac%s
4ith typical energy savings ranging from #5" - #6" for classrooms and 56"-6"
for private offices, occupancy sensors are often viewed as one of the most energy and cost-
effective lighting control technologies. )owever, even after being around for over 5! years,
occupancy sensors do not have as high mar$et penetration as some other building
technologies, partly due to the difficulty in definitively predicting and demonstrating savings.
ccupancy sensor performance is also dependent on the user occupancy, lighting control
patterns, sensor selection and finally, commissioning, leading to varied savings estimates by
the industry. 1ecent research has shown that reducing the time delay in the occupancy
sensors can increase the energy savings in spite of a potential increase in lamp maintenance
cost due to higher switching frequency. It has been found that the activity level is different for
different users of a common space and even changes over the time of the day for a given user.
)owever, a typical occupancy sensor only allows a single time delay setting based on
the application, which can vary from several seconds to more than ! minutes, and remains
constant once set. %he time delay is commonly maintained at a higher level than necessary to
minimi7e false offs 8when no motion is detected in presence of occupancy3, thus reducing
energy savings. nce calibrated, the sensitivity of the device to room movement cannot be
changed as well. ost occupancy sensors used in commercial applications use passive
infrared or ultrasonic motion-sensing technologies. any use dual technologies, which
combine the two technologies or others, such as microwave, in one sensor.
2.2 P!oosensors and !e"r dra#$ac%s
Department of ENC Usha Mittal Institute of Technology3
-
7/24/2019 Major Porject Report (1)
4/45
Integrated Daylight Harvesting And Human Detection Using Digital Image Processing
In comparison to occupancy detection, daylight harvesting is a significantly less
successful and somewhat less popular lighting control strategy. %he use of photosensors to
control interior lighting is nontrivial. *ince a photosensor signal greatly depends on the
position of the sensor relative to room surfaces and daylight apertures, as well as room
surface material properties, commissioning and calibration play a pivotal role in photo sensor
applications. 9arious problems associated with calibration and commissioning contribute to
the fact that photo sensor-based systems have seen limited application and have traditionally
faced mar$et barriers.%hus, there is a need for an advanced daylight sensor that can reap the
benefits and flexibility that these technologies offer and achieve a better control of the light
distribution within a space,improving the overall light quality.
2.& An "'a(e sensor&n image sensor can be thought of as a cluster of photosensors. 'nli$e photosensors,
they do not give us a single electrical signal, but rather provide luminance as well as colour
information at thousands of points within the space. & sequence of digital images of the space
thus gives us a wealth of information that we can use to estimate daylight availability in
various parts of the space simultaneously, as well as detect occupancy. %han$s to the
tremendous growth and development in * technology, today digital imaging is
pervading every sphere of our life, providing us with cost-effective and innovative solutions.
1ecently, high dynamic range * video sensors have been introduced in the
mar$et, primarily for various automotive applications, whose technical constraints are
somewhat similar to those of interior lighting applications. In both cases, the imaging system
needs to wor$ under a wide dynamic range, have a fast but affordable image processing
functionality, and finally, have integrated image acquisition and image processing modules
that continuously interact with each other. 1eal-time operation might involve ad(usting the
image acquisition system based on the lighting condition. )owever, the lighting product will
have a more stringent budget constraint than a product for an automotive application. )ere,
by automotive applications we mean lane recognition, par$ing control, obstacle:traffic sign
recognition etc.
2.) Proposed Concep
Department of ENC Usha Mittal Institute of Technology4
-
7/24/2019 Major Porject Report (1)
5/45
Integrated Daylight Harvesting And Human Detection Using Digital Image Processing
%he fundamental hypothesis of this pro(ect is that we can use an image sensor for
daylight harvesting and occupancy sensing at the same time, but more importantly, for
developing a lighting control system that is more versatile and that offers a far better control
of the illuminated environment. ur approach is significantly different from the prior image
sensor based lighting control devices. %he pro(ect also overcomes several drawbac$s of
conventional lighting control sensors. In addition, an integrated sensor can provide
functionalities that are impossible to achieve by conventional photosensors and occupancy
sensors.
;or human detection various methods have been proposed in the past years.
0ac$ground subtraction is often used to detect moving ob(ects from a video ta$en by a
stationary camera. aintaining the bac$ground adaptively in accordance with illumination
changes is the $ey issue in this approach. )umans can also be detected and trac$ed by using
related information such as edges, colour, and depth. ethods using colour would encounter
a difficulty when the bac$ground contains some ob(ects with similar colour - trac$ing could
be misguided by bac$ground clutters.
CHAPTER &
Department of ENC Usha Mittal Institute of Technology5
-
7/24/2019 Major Porject Report (1)
6/45
Integrated Daylight Harvesting And Human Detection Using Digital Image Processing
PRO*ECT DESCRIPTION
&.1 +,oc% D"a(ra'
-"(ure &.1 +,oc% d"a(ra'.
%he basic concept of this pro(ect is we use an image sensor for daylight harvesting
and occupancy sensing at the same time, but more importantly, for developing a lighting
control system that is more versatile and that offers a far better control of the illuminated
environment. 4e use a * camera to acquire a reference image. %his reference image is
first converted to gray image which is used in the occupancy detection algorithm. %hen weconvert the reference image to
-
7/24/2019 Major Porject Report (1)
7/45
Integrated Daylight Harvesting And Human Detection Using Digital Image Processing
turned on, or if the value is greater than the maximum preset level then the lights are turned
off. %he control signals from the parallel port are sent using parallel port command given in
&%>&0.
%he parallel port is connected to driver uln5!!. 4henever the output from the
parallel port is high the driver I will ground its output terminals and whenever the output
from the parallel port is low, then the I will give a ?@5v at its output pins. 4hen the output
pins of the I is @5v the potential across the relay connected to it at one end and a @5v supply
at other end will be !v, thereby turning off the lights. 4hen the output of the I is !v then the
potential across the relay is @5v which turns on the lights. %hus, the driver I drives the @5v
relays connected to it which in turn, turns on or turns off the lights.
&.2 A,(or"!'
&.2.1 Occupancy Deec"on
ccupancy detection is done using 5 procedures.
Procedure 12
;irst, absolute / image difference between the last frame and the current frame is
computed. %he last two components of / contain chromatic information independent of
the intensity. %hese are used to derive an rms difference metric as per equation below.
4here, 8b@, r@3 are the chromatic components at a given pixel in the last frame,
and 8b5, r53 are the corresponding values in the current frame. %he metric is simply the
Euclidean distance in the b - r plane. %he difference image 8pixel differences between any
frame and the reference frame3 and the thresholds are based on this metric. %here are two user
specified thresholds, one for the pixel difference, and one for the spatial extent 8in terms of a
fraction of total number of pixels in a frame3. %hese thresholds are programmable, thus
allowing a real-time ad(ustment to the motion sensitivity of the sensor based on the operating
requirements. %he detection area is controlled through the specification of regions of
interests, otherwise the whole frame is considered.
*econdly, the detection of changes between frames is more robust against pixel noise.
%he pixel noise is li$ely to be introduced during various stages of the processing chain,
including compression and transmission, and is predominantly present in the intensity
Department of ENC Usha Mittal Institute of Technology7
-
7/24/2019 Major Porject Report (1)
8/45
Integrated Daylight Harvesting And Human Detection Using Digital Image Processing
channel. %his metric is also less li$ely to be seriously affected by minor changes in the space
illumination level than a metric based on raw 1A0 values. %his is convenient because a
change in the light level in the space does not typically cause a false alarm, unless the change
is significant. ;inally, this method is fast and inexpensive, which is a critical requirement for
this application.
Procedure 2
'sing the procedure of gray scale difference of current and reference frame and
scaling the values using im5bw8 3 command and plotting for the motion blobs in the image
using the concept of bounding box using rectangle command.
&.2.2 L"(!"n( Conro,
>ights are controlled using relays 8@5v type3 with the help of parallel port controlled
by the &%>&0 command. &ccording to the motion detection and brightness test Bpval8 3
value is sent to parallel port.
&.& -,o# c!ar
Department of ENC Usha Mittal Institute of Technology8
-
7/24/2019 Major Porject Report (1)
9/45
Integrated Daylight Harvesting And Human Detection Using Digital Image Processing
&.&.1 Re/erence /ra'e
&.&.2 Occupancy Deec"on
Department of ENC Usha Mittal Institute of Technology9
Sar
Initiali7e &%>&0 C
image acquisition device
%a$e reference
image
onvert 1A0 toAray8Bb3 C /rb
Divide the image to four
segments
alculate the 1* value of each segment, save it
from B1*@ through B1*=
onvert the image to
-
7/24/2019 Major Porject Report (1)
10/45
Integrated Daylight Harvesting And Human Detection Using Digital Image Processing
Department of ENC Usha Mittal Institute of Technology10
>oad B1*@ through
B1*= and load Bb
C
%a$e a new
frame Bi@
Initiali7e the parallel port
8pvalF! ! ! ! ! ! ! !G3
onvert Bi@ to /rb colour space
and divide it into = segments
alculate the 1* value of each segment,
save it from B1*@@ through B1*=@
%a$e the difference between the corresponding segments
1* values C save it in Bimd@ through Bimd=
onvert Bi@ to gray 8Ba3
Ba difference Bb
onvert gray image Bc into binary
image B04 with th !.@
A
A
-
7/24/2019 Major Porject Report (1)
11/45
Integrated Daylight Harvesting And Human Detection Using Digital Image Processing
Department of ENC Usha Mittal Institute of Technology11
Divide the binary images into = segments Bx@
through Bx=
Initiali7e ovectF G
;or each segments, if there is a difference, draw the bounding
box using Bregionprops and rectangle commands
If imd of any
segH th yes no
orresponding seg value
of ovect FG!
orresponding seg value
of ovect FG@
yesIf motion in any seg no
'pdate the frame as reference
frame 8ba3
+
C
+
-
7/24/2019 Major Porject Report (1)
12/45
Integrated Daylight Harvesting And Human Detection Using Digital Image Processing
CHAPTER )
Department of ENC Usha Mittal Institute of Technology12
>oad mlevel@ C mlevel5
>oad brightness@ through
brightness=
-
7/24/2019 Major Porject Report (1)
13/45
Integrated Daylight Harvesting And Human Detection Using Digital Image Processing
SO-T0ARE DESCRIPTION
).1 ATLA+ S"'u,"n% .3.45R2446a7
&%>&0 is an integrated technical computing environment that combines numeric
computation, advanced graphics and visuali7ation, and a high level programming language.
&%>&0 includes hundreds of functions for2
Data analysis and visuali7ation
-
7/24/2019 Major Porject Report (1)
14/45
Integrated Daylight Harvesting And Human Detection Using Digital Image Processing
& colour space is a means of uniquely specifying a colour. %here are a number of
colour spaces in common usage depending on the particular industry and:or application
involved. ;or example as humans we normally determine colour by parameters such as
brightness, hue, and colourfulness. n computers it is more common to describe colour by
three components, normally red, green, and blue. %hese are related to the excitation of red,
green, and blue phosphors on a computer monitor. ¬her similar system geared more
towards the printing industry uses cyan, magenta, and yellow to specify colour, they are
related to the reflectance and absorbance of in$s on paper.
%here are generally ways of converting 8transforming3 between different colour
spaces although in most cases the transformation is nonlinear. *ome colour spaces for
example can represent colours which cannot be represented in others.
).&.2 R8+ co,our cu$e
%he colour space for computer based applications is often visuali7ed by a unit cube.
Each colour 8red, green, blue3 is assigned to one of the three orthogonal coordinate axes in
D space. &n example of such a cube is shown below along with some $ey colours and their
coordinates.
-"(ure ).1 R8+ co,or cu$e
Department of ENC Usha Mittal Institute of Technology14
-
7/24/2019 Major Porject Report (1)
15/45
Integrated Daylight Harvesting And Human Detection Using Digital Image Processing
&long each axis of the colour cube the colours range from no contribution of that
component to a fully saturated colour.
%he colour cube is solid, any point 8colour3 within the cube is specified by three
numbers, namely, an r, g, b triple.
%he diagonal line of the cube from blac$ 8!,!,!3 to white 8@,@,@3 represents all the
grays, that is, all the red, green, and blue components are the same.
In practice different computer hardware:software combinations will use different
ranges for the colours, common ones are !-5#N and !-N##N for each component. %his
is simply a linear scaling of the unit colour cube described here.
%his 1A0 colour space lies within our perceptual space, that is, the 1A0 cube is
smaller and represents fewer colours than we can see.
4.3.3 Grayscale Images
& grayscale 8or gray level3 image is simply one in which the only colors are shades of
gray. %he reason for differentiating such images from any other sort of color image is that lessinformation needs to be provided for each pixel. In fact a OgrayP color is one in which the red,
green and blue components all have equal intensity in 1A0 space, and so it is only necessary
to specify a single intensity value for each pixel, as opposed to the three intensities needed to
specify each pixel in a full color image.
ften, the grayscale intensity is stored as an 6-bit integer giving 5#N possible different
shades of gray from blac$ to white. If the levels are evenly spaced then the difference
between successive gray levels is significantly better than the gray level resolving power of
the human eye.
Arayscale images are very common, in part because much of todayPs display and
image capture hardware can only support 6-bit images. In addition, grayscale images are
entirely sufficient for many tas$s and so there is no need to use more complicated and harder-
to-process color images.
Department of ENC Usha Mittal Institute of Technology15
-
7/24/2019 Major Porject Report (1)
16/45
Integrated Daylight Harvesting And Human Detection Using Digital Image Processing
).&.) Con:ers"on
I rgb5gray81A03
I rgb5gray81A03 converts the true color image 1A0 to the grayscale intensity image
I. rgb5gray converts 1A0 images to grayscale by eliminating the hue and saturation
information while retaining the luminance.
).) YC$Cr
& color space is simply a model of representing what we see in tuples. /br is one
of the popular color space in computing. It represents colors in terms of one luminance
component:luma 8/3, and two chrominance components:chroma 8b and r3. *tudy shows
human eyes are sensitive to luminance, but not so sensitive to chrominance. ;or example,
given an image below,
-"(ure.).2 A co,our "'a(e.
%he /br image can be converted to:from 1A0 image. %herere several standards
defined for the conversion at different context. %he conversion below is based on the
conversion used in Q+EA image compression.
%he conversion can be expressed as equations below.
Department of ENC Usha Mittal Institute of Technology16
-
7/24/2019 Major Porject Report (1)
17/45
Integrated Daylight Harvesting And Human Detection Using Digital Image Processing
;rom 6-bit 1A0 to 6-bit /br2
%he /, b and r components can be observed as shown in the ;igure =.5.
-"(ure.).& Co,or I'a(es /or'ed $y Y; C$ and Cr Co'ponens
).< +ound"n( +o= "n ATLA+
In0ounding 0ox method input is a binary image, and output is another binary image
holding the rectangles over the detected blobs. It is not a superimposition of a rectangle over
an image.
1E%&E command draws the bounding boxes around the blobs in a binary
image, image is the binary image input supplied by the user. %his function extracts the
coordinates and dimension values of each blob from stats. 0ounding 0ox structure one by
one and draws the rectangle around them.
Edata@ regionprops8x5, P0ounding0oxP3
rectangle8P+ositionP,FEx5,Ey5,Ew5,Eh5G,PEdgeolorP,PrP3R
[email protected] 8@3 gives the x dimension
Department of ENC Usha Mittal Institute of Technology17
-
7/24/2019 Major Porject Report (1)
18/45
Integrated Daylight Harvesting And Human Detection Using Digital Image Processing
[email protected] 853 gives the y dimension
[email protected] 83 gives the height
[email protected] 8=3 gives the width
Recan(,e
reate 5-D rectangle ob(ect
Syna=
rectangle
rectangle8P+ositionP,Fx,y,w,hG3
Descr"p"on
rectangle8P+ositionP,Fx,y,w,hG3 draws the rectangle from the point x,y and having a width of w
and a height of h. *pecify values in axes data units.
).3 8rap!"ca, User Iner/ace
& graphical user interface 8A'I3 is a pictorial interface to a program. & graphical user
interface 8A'I3 is a graphical display in one or more windows containing controls, called
components that enable a user to perform interactive tas$s. %he user of the A'I does not have
to create a script or type commands at the command line to accomplish the tas$s.
A'I components can include menus, toolbars, push buttons, radio buttons, list boxes,
and slidersS(ust to name a few. A'Is created using &%>&0 tools can also perform any
type of computation, read and write data files, communicate with other A'Is, and display
data as tables or as plots. )ere the inputs are $nown as events, and a program that responds to
events is said to be event driven.
%he three principal elements required to create a &%>&0 Araphical 'ser Interface are2
1. Co'ponens.Each item on a &%>&0 A'I 8pushbuttons, labels, edit boxes, etc.3 is a
graphical component. %he types of components include graphical controls 8pushbuttons, edit
boxes, lists, sliders, etc.3, static elements 8frames and text strings3, menus, and axes.
Araphical controls and static elements are created by the function uicontrol, and menus are
created by the functions uimenu and uicontextmenu. &xes, which are used to display
graphical data, are created by the function axes.
Department of ENC Usha Mittal Institute of Technology18
-
7/24/2019 Major Porject Report (1)
19/45
Integrated Daylight Harvesting And Human Detection Using Digital Image Processing
2. -"(ures.%he components of a A'I must be arranged within a figure, which is a window
on the computer screen. In the past, figures have been created automatically whenever we
have plotted data. )owever, empty figures can be created with the function figure and can be
used to hold any combination of components.
&. Ca,,$ac%s.;inally, there must be some way to perform an action if a user clic$s a mouse
on a button or types information on a $eyboard. & mouse clic$ or a $ey press is an event, and
the &%>&0 program must respond to each event if the program is to perform its function.
;or example, if a user clic$s on a button, that event must cause the &%>&0 code that
implements the function of the button to be executed. %he code executed in response to an
event is $nown as a call bac$. %here must be a callbac$ to implement the function of each
graphical component on the A'I.
8UIDE, the &%>&0 Araphical 'ser Interface Development Environment, provides
a set of tools for creating graphical user interfaces 8A'Is3. %hese tools greatly simplify the
process of laying out and programming A'Is. %he A'IDE >ayout Editor enables you to
populate a A'I by clic$ing and dragging A'I components into the layout area. %here you
can resi7e, group and align buttons, text fields, sliders, axes, and other components you add.
8UI A,,o#s On,y One Insance o Run 5S"n(,eon7.
%his option allows you to select between two behaviors for the A'I figure2
&llow &%>&0 software to display only one instance of the A'I at a time.
&llow &%>&0 software to display multiple instances of the A'I.
If you allow only one instance, the software reuses the existing A'I figure whenever
the command to run the A'I is issued. If a A'I already exists, the software brings it to the
foreground rather than creating a new figure. If you clear this option, the software creates a
new A'I figure whenever you issue the command to run the A'I. If we allow only one
instance of a A'I to run, initiali7ation can ta$e place each time we call it from the command
Department of ENC Usha Mittal Institute of Technology19
-
7/24/2019 Major Porject Report (1)
20/45
Integrated Daylight Harvesting And Human Detection Using Digital Image Processing
line.
-"(ure ).) P,a"n 8UI
CHAPTER 12
Department of ENC Usha Mittal Institute of Technology22
-
7/24/2019 Major Porject Report (1)
23/45
Integrated Daylight Harvesting And Human Detection Using Digital Image Processing
-
7/24/2019 Major Porject Report (1)
24/45
Integrated Daylight Harvesting And Human Detection Using Digital Image Processing
NO
-
7/24/2019 Major Porject Report (1)
25/45
Integrated Daylight Harvesting And Human Detection Using Digital Image Processing
duty cycle depending on ambient temperature and number of drivers turned ED and incandescent displays, and heaters. &ll devices feature open-collector
outputs with integral clamp diodes. %he '> or *. %hese devices will handle numerous interface
needs S particularly those beyond the capabilities of standard logic buffers. %he '>
-
7/24/2019 Major Porject Report (1)
26/45
Integrated Daylight Harvesting And Human Detection Using Digital Image Processing
-
7/24/2019 Major Porject Report (1)
27/45
Integrated Daylight Harvesting And Human Detection Using Digital Image Processing
+ins @6-5# are grounds and are used as a reference signal for the low 8below !.# volts3
charge.
-"(ure
-
7/24/2019 Major Porject Report (1)
28/45
Integrated Daylight Harvesting And Human Detection Using Digital Image Processing
-"(ure
-
7/24/2019 Major Porject Report (1)
29/45
Integrated Daylight Harvesting And Human Detection Using Digital Image Processing
regulator. %here are variants on the V6xx series Is, such as V6> and V6*, some of which can
supply up to @.# &mps.
Na'e Vo,a(e
>V6!# ? # volts
>V6!L ? L volts
>V6@5 ? @5 volts
>VL!# - # volts
>VL!L - L volts
>VL@5 - @5 volts
-"(ure V6WWM series of voltage regulators are designed for positive input. ;or
applications requiring negative input the M>VLWWM series is used.
-"(ure V6@5 of three terminal positive regulators are available in the %-55!
pac$age and with several fixed output voltages, ma$ing them useful in a wide range of
applications. Each type employs internal current limiting, thermal shut down and safe
operating area protection, ma$ing it essentially indestructible. If adequate heat sin$ing is
provided, they can deliver over @& output current. <hough designed primarily as fixed
voltage regulators, these devices can be used with external components to obtain ad(ustable
voltages and currents.
-
7/24/2019 Major Porject Report (1)
30/45
Integrated Daylight Harvesting And Human Detection Using Digital Image Processing
utput urrent up to @&
utput 9oltages of @5 volt
%hermal verload +rotection
*hort ircuit +rotection
utput %ransistor *afe perating &rea +rotection
CHAPTER 3
E?PERIENTAL PROCEDURE RESULTS
STEP 1 Inpu "'a(e /ro' #e$ca'
@. apture image from webcam.
:o$ B :"deo"npu5#"n:"deo;1;YUY23)4=)647
pre:"e# 5:o$7
"' B (esnaps!o5:o$7
)ere,
:"deo"npu >specifies the adaptor name and resolution.
%he above instruction is of the type,
o$ B :"deo"npu5 adaporna'e ; de:"ceID ;/or'a 7
Department of ENC Usha Mittal Institute of Technology30
-
7/24/2019 Major Porject Report (1)
31/45
Integrated Daylight Harvesting And Human Detection Using Digital Image Processing
adaporna'eis a text string that specifies the name of the adaptor used to communicate
with the device.
de:"ceID is a numeric scalar value that identifies a particular device available through the
specified adaptor, adaptor name
/or'ais a text string that specifies a particular video format supported by the device or
the full path of a device configuration file 8also $nown as a camera file3.
pre:"e# 5o$7creates a 9ideo +review window that displays live video data for video
input ob(ect ob(. %he window also displays the timestamp and video resolution of each
frame, and the current status of ob(. %he 9ideo +review window displays the video data at
@!!" magnification 8one screen pixel represents one image pixel3.
/ra'e B (esnaps!o5o$7immediately returns one single image frame, frame, from the
video input ob(ect ob(.
5. *tore the captured image into an image file for further processing.
-
7/24/2019 Major Porject Report (1)
32/45
Integrated Daylight Harvesting And Human Detection Using Digital Image Processing
-"(ure 3.1 Re/erence "'a(e
STEP 2 o"on Deec"on
@. onvert image into grayscale.
"'1Br($2(ray5"'7
)ere, rgb5gray converts color image to gray scale image. im@ will have the gray image.
Department of ENC Usha Mittal Institute of Technology32
-
7/24/2019 Major Porject Report (1)
33/45
Integrated Daylight Harvesting And Human Detection Using Digital Image Processing
-"(ure 3.2 8ray "'a(e
5. alculate absolute difference value for the image current and reference frames.
cB"'a$sd"//5a;$7
. Entire image is segmented into four equal parts which is done as follows
/"(ure517;
=1B=512)4;1&24;7
Department of ENC Usha Mittal Institute of Technology33
-
7/24/2019 Major Porject Report (1)
34/45
Integrated Daylight Harvesting And Human Detection Using Digital Image Processing
su$p,o52;2;17;"'s!o#5=17
=2B=512)4;&213)4;7
su$p,o52;2;27;"'s!o#5=27
=&B=52)1)64;1&24;7
su$p,o52;2;&7;"'s!o#5=&7
=)B=52)1)64;&213)4;7
su$p,o52;2;)7;"'s!o#5=)7
-"(ure 3.& 8ray "'a(e d":"ded "no /our se('ens
=. onvert the image into binary image using the calculated threshold.
"'2 B "'2$# 5c; !res!o,d7
)ere, im5bw command converts the image given to it into blac$ and white depending
on the threshold value.
Department of ENC Usha Mittal Institute of Technology34
-
7/24/2019 Major Porject Report (1)
35/45
Integrated Daylight Harvesting And Human Detection Using Digital Image Processing
-"(ure 3.) D"//erence "'a(e
#. 0ounding 0ox2
In0ounding 0ox method input is a binary image, and output is another binary image
holding the rectangles over the detected blobs.
Edaa1 B re("onprops5=2; +ound"n(+o=7
E=2B5Edaa1.+ound"n(+o=5177
Ey2B5Edaa1.+ound"n(+o=5277
E#2B5Edaa1.+ound"n(+o=5&77
E!2B5Edaa1.+ound"n(+o=5)77
recan(,e5Pos""on;FE=2;Ey2;E#2;E!2G;Ed(eCo,or;r7
%hese rectangles when plotted on a colored image will result in as follow.
Department of ENC Usha Mittal Institute of Technology35
-
7/24/2019 Major Porject Report (1)
36/45
Integrated Daylight Harvesting And Human Detection Using Digital Image Processing
-"(ure 3.< o"on deec"on
STEP & +r"(!ness deec"on
@. onvert image into grayscale.
I'2Br($2nsc5"'7
)ere, rgb5ntsc converts color image to
-
7/24/2019 Major Porject Report (1)
37/45
Integrated Daylight Harvesting And Human Detection Using Digital Image Processing
-"(ure 3.3 NTSC se('ened "n /our /ra'es
5. alculate appropriate threshold value for the image.
!res!o,d B (ray!res!5"'27
)ere, the brightness of the is the level above which the lights should off.
-
7/24/2019 Major Porject Report (1)
38/45
Integrated Daylight Harvesting And Human Detection Using Digital Image Processing
;or initiali7ing the parallel port the following commands are used2
1. DIO B d"("a,"o5adapor;ID7
PadaptorP-%he hardware driver adaptor name. %he supported adaptors are advantech, $eithley,
mcc, nidaq, and parallel. 4e have made use of the adaptor name parallel.
ID-%he hardware device identifier. %he toolbox provides basic DI capabilities through the
parallel port. %he + supports up to three parallel ports that are assigned the labels >+%@,
>+%5, and >+%. ost +s that support the &%>&0 software will include a single parallel
port with label >+%@.
DI-%he digital I: ob(ect.
Descr"p"on
DI digitalio8PadaptorP,ID3 creates the digital I: ob(ect DI for the specified adaptor and
for the hardware device with device identifier ID.
So;
parporBd"("a,"o5para,,e,;LPT17
reates the digital I: ob(ect parport for adaptor parallel, and parallel port used is >+%@.
2. ,"nes B add,"ne5o$;!#,"ne;d"rec"on7
ob(-& digital I: ob(ect.
hwline-%he numeric IDs of the hardware lines added to the device ob(ect.
PdirectionP-%he line directions can be In or ut, and can be specified as a single value or a cell
array of values.
lines-& column vector of lines with the same length as hwline.
Descr"p"on
Department of ENC Usha Mittal Institute of Technology38
-
7/24/2019 Major Porject Report (1)
39/45
Integrated Daylight Harvesting And Human Detection Using Digital Image Processing
lines addline8ob(,hwline,PdirectionP3 adds the hardware lines specified by hwline to the
digital I: ob(ect ob(. direction configures the lines for either input or output. lines is a row
vector of lines.
So;
,"neBadd,"ne5parpor;4;ou7
&dds eight lines 8!2V3 to parport from port !, it acts as an output lines.
&. p:a, B F4 4 4 4 4 4 4 4G
reates a matrix of si7e @ by 6 with all the initial values 7ero.
). pu:a,ue5o$;daa7
ob(-& digital I: ob(ect.
data-& decimal value or binary vector.
Descr"p"on
putvalue8ob(,data3 writes data to the hardware lines contained by the digital I: ob(ect ob(.
So;pu:a,ue5parpor;p:a,7
It is used to transfer pval value to parallel port.
;or initiali7ing the parallel port >+%@ the commands are executed in the following order.
parportdigitalio8PparallelP,P>+%@P3R
lineaddline8parport,!2V,PoutP3R
pval F! ! ! ! ! ! ! !GR
putvalue8parport,pval3R
Department of ENC Usha Mittal Institute of Technology39
-
7/24/2019 Major Porject Report (1)
40/45
Integrated Daylight Harvesting And Human Detection Using Digital Image Processing
STEP
-
7/24/2019 Major Porject Report (1)
41/45
Integrated Daylight Harvesting And Human Detection Using Digital Image Processing
-"(ure 3.6 8UI /or re/erence /ra'e
4e need to give values of IE9E> and &W>E9E> for which the lights
should be on:off. &fter writing in appropriate values in edit box we need to press the X
button which will load these two values.
Department of ENC Usha Mittal Institute of Technology41
-
7/24/2019 Major Porject Report (1)
42/45
Integrated Daylight Harvesting And Human Detection Using Digital Image Processing
o"on p,oed 8UI and ,"(! saus
4hen 1'< button is pressed the motion plotted image appears on the left side and
difference image on the on the right, corresponding status of the light is displayed on the
>IA)% *%&%'* edit boxes.
-"(ure 3.@ o"on p,oed and ,"(! saus
%he additional buttons li$e *%+ will stop the execution and close the A'I.
%he EWI% button is used to exit and close all &%>&0 windows.
Department of ENC Usha Mittal Institute of Technology42
-
7/24/2019 Major Porject Report (1)
43/45
Integrated Daylight Harvesting And Human Detection Using Digital Image Processing
CHAPTER
ADVANTA8ES
;ollowing are some advantages offered by the proposed solution over conventional systems2
& single sensor can function as a photosensor as well as an occupancy sensor.
& single sensor can be used for different tas$ areas 8or control 7ones3 with different
target light level requirements, as long as the sensor has a view of all tas$ areas. &
conventional system will typically need several photosensors for this purpose.
ompared to a conventional photosensor, the performance of the proposed system is far
less li$ely to be adversely affected by a direct view of a light source or direct sunlight.
%he sensor is capable of detecting small movements, on the order of a couple of inches,
several feet away from the camera as long as it has an adequate resolution. %he sensor
sensitivity to motion can be ad(usted in real-time based on the activity level or other
criteria. &s such, this approach can offer a better capability in occupancy detection
compared to conventional occupancy sensors.
&lgorithms can be developed so that the problem of people or ob(ects partially bloc$ing
the sensors view of the tas$ areas can be circumvented.
1eal-time energy monitoring and performance analysis of the actual system is possible,
which is unique to this application.
* %echnology can provide an attractive and cost effective solution.
CHAPTER 6
Department of ENC Usha Mittal Institute of Technology43
-
7/24/2019 Major Porject Report (1)
44/45
Integrated Daylight Harvesting And Human Detection Using Digital Image Processing
APPLICATIONS
Co''erc"a, and do'es"c $u",d"n(sommercial buildings use air conditioning and increasingly use curtain wall design
with single gla7ing. Estimates show that between !" to #!" of the spaces in these
buildings has access to daylight through windows and doors but these buildings
completely rely on artificial lightning with very less use of natural daylight. %his problem
can be solved using daylight harvesting.
%he system detects the daylight and human presence and switches on the lights as per
need. %hus, the regions where there is no need of artificial lights and where the natural
sunlight can be made use of, the system provides an efficient way of using natural energy.
%his can be achieved using same cameras and pcs used for surveillance purpose.
%his method overcomes several drawbac$s of conventional sources used in daylight
harvesting and provides additional functionalities which are not achievable by these
sensors, thus significant amount of energy can be saved.
Tra//"c ,"(! conro,'sing the surveillance cameras installed to chec$ the trafficR this algorithm can be
used to automatically control the traffic lights depending on the traffic density. %hus this
method provides an efficient way of controlling traffic.
CHAPTER @
CONCLUSION
Department of ENC Usha Mittal Institute of Technology44
-
7/24/2019 Major Porject Report (1)
45/45
Integrated Daylight Harvesting And Human Detection Using Digital Image Processing
In our pro(ect we are able to control the lights of a room combining the daylight
estimation, occupancy detection and the lighting control algorithms. 4e are able to detect the
smallest change in the acquired image from the new image, which ma$es it very efficient.
Implementation of our pro(ect in commercial and domestic buildings will save a lot of
power, which otherwise is wasted because of the use of artificial lightings, thereby ma$ing
optimum use of the natural light from sun. %hus we are able to ma$e use of the natural
sunlight rather than the artificial lights which is the main ob(ective of our pro(ect, which
cannot be obtained using the conventional sensor methods. %hus this system can be helpful in
saving electricity and ma$ing the area energy efficient. In our pro(ect we control the lights in
the room, but other than controlling the lights we can also design it to control different
electrical appliances li$e fan, air conditioner etc. Due to its easy implementation and user
friendly A'I, we believe this pro(ect is a boon for the commercial as well as the domestic
buildings.
*pecular reflection from daylight can cause the prototype to overestimate illuminance
in locali7ed areas. %o counter this, existing algorithm needs to be improved and a suitable
calibration and commissioning procedure must be outlined. Dar$ surfaces typically have low
luminance, thus signal-to noise ratio becomes an issue in estimating tas$ illuminance on dar$
surfaces.