21b95a0522 3

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 27

Intelligent Surveillance Camera System with Storage Optimization

IV/IV B. TECH 2nd SEMESTER PROJECT WORK (B20CS4201)

2nd REVIEW
Batch No : E15
Student Registration Number
MURAPARTHI VAMSI 20B91A05V3
THAGALLAMUDI HARSHINI 21B95A0522
SUNDARA YESHWANTH 20B91A05T5
VASAMSETTY NAGA SRIKAR 20B91A05V6
Under the Guidance of
Sri. J.RajaniKanth
Associate Professor
SAGI RAMA KRISHNAM RAJU ENGINEERING COLLEGE (A)
(Affiliated to JNTUK, Kakinada)
SRKR MARG, CHINNA AMIRAM, PIN:534204
Department of Computer Science and Engineering
IV/IV B. TECH 2nd SEMESTER PROJECT WORK (B20CS4201)

2nd REVIEW
CC TV STORAGE OPTIMIZATION USING HUMAN DETECTION
Batch No : E15

THAGALLAMUDI HARSHINI 21B95A0522

Under the Guidance of


Sri. J.RajaniKanth
Associate Professor
SAGI RAMA KRISHNAM RAJU ENGINEERING COLLEGE (A)
(Affiliated to JNTUK, Kakinada)
SRKR MARG, CHINNA AMIRAM, PIN:534204
Abstract

Literature Survey
Table of Problem Statement
Contents Methodology

Technologies
Implementation

Results
Table of Testing
Contents Conclusion and Future Scope

References
Abstract

• Development of an intelligent system for processing CCTV video


sequences.
• Division of video sequences into frames for analysis.
• Comparison of adjacent frames to detect motion.
• Storage of frames in high quality when motion is detected.
• Storage of frames in low quality when no motion is detected.
• Optimization of storage space while preserving information quality.
Literature Survey
AUTHOR TITLE SOURCE METHODOLOGY USED FINDINGS Drawbacks

Shikhar Arora, Storage IEEE The idea is to save storage space Cuts footage space One drawback is that
Karan Bhatia, Optimization of in CCTV footage by deleting by 31% in dense occasionally,
Amit V Video Surveillance duplicate frames. areas, addressing essential information
from CCTV surveillance demand. may also be deleted
Camera Comparing the adjacent frames along with the
using Mean Squared Error redundant frames.
(MSE) and remove those that
are redundant.

D.Suganya, Storage International Whenever the motion sensor This approach will The method doesn't
R.Shyla, Optimization of Research detect an image then the camera optimize the storage work well in densely
V.Jayasudha, S. Video Surveillance Journal of will turn on and record video. maintaining populated areas.
Marirajan from CCTV Engineering information as well
Camera and Arduino and Raspberry pie can as quality. This algorithm gives
Technology be used for the implementation satisfactory results.
(IRJET) of these algorithms into CCTV
camera
Literature Survey
Muhammad Atif Storage IEEE Utilizing histogram-based Achieved up to 70% The effectiveness of
Memon, Optimization using adaptive thresholding allows the reduction in storage the proposed method
Sajid Khan, Adaptive method to work effectively needs, demonstrating may be limited to
Zahid Hussain Thresholding under variable luminance efficiency certain types of
Khund, Motion Detection conditions. CCTV camera setups
Faheem Akhtar, or specific
Asif Rajput The method's practical benefits, environments. It may
such as reduced storage not perform
requirements and faster optimally in all
information retrieval. scenarios, potentially
leading to missed or
false detections.

Karthik Shankar Intelligent Video IEEE Alert the security personnel Crowd management Model's success in
Analytics (IVA) when suspicious objects in the and detection of detecting suspicious
and Surveillance frame are detected suspicious activities, objects with a 97%
System using showcasing the accuracy.
Machine Learning system's versatility.
and Neural No Storage
Networks Optimization.
Literature Survey
Sonali Shelar, Storage Optimization International Calculated the difference between The system effectively The system giving
Shewta Gaikwadad, of Journal for consecutive frames captured by the reduces the average satisfactory result by
Shital Kakade CCTV Footage Scientific CCTV camera and calculated MSE storage space required reducing average
Research & value with a predetermined for storing CCTV storage space required
Development threshold. footage. for any footage
(IJSRD) If threshold value of frame is low it
deletes the frame Enables prompt
responses to security
Trigger notifications to the incidents detected by
administrator when unauthorized the CCTV system.
movement is detected during
unofficial hours

Rene Marceline, Cloud Storage International It operates by clustering observations The system achieved a It requires fast internet
Akshaya S R, Athul Optimization for conference on based on their nearest mean. significant reduction in connection for storing
S, Raksana K L, Video Surveillance smart systems storage memory. every footage. So, it is
Ramesh S R. Applications and invention not feasible in India in
technology Data is uploaded to a cloud server Data was uploaded to a coming years
(ICSSIT) (Firebase) to reduce dependence on cloud server at the end
local storage devices. of each day, reducing
dependence on local
storage devices and
enabling easy access to
stored data
Problem Statement

• Traditional image processing systems encountered challenges in tasks such as


object recognition due to limitations in accuracy and speed.
• Previous methods for optimizing CCTV storage may exhibit inefficiencies,
potentially resulting in either excessive storage consumption or the risk of losing
crucial footage.
• The primary objective of the project is to store frames in high quality only when
motion is detected, reducing the amount of storage required.
• The proposed approach involves the utilization of Haar cascades for human
detection and implementing storage optimization techniques to address the
shortcomings of previous methods
Methodology

Frame Division: we can divide video sequences into individual frames using OpenCv.

Motion Detection: Implement a motion detection algorithm to compare adjacent frames and detect motion.

Quality Manipulation: If motion is detected, maintain the frame quality. If no motion is detected, reduce the
quality using bitrate manipulation techniques to reduce resolutions.

Integration and Optimization: Integrate the motion detection and human detection and Quality Manipulation
modules

Testing and Evaluation: Test the system with various video sequences to evaluate its performance in terms of
motion detection accuracy, human detection accuracy, and overall efficiency. Iterate on the design based on
the results of testing.
Methodology
Technologies Used

Software Requirements
 Development : Python version 3.6 and above
 Modules : Numpy, Pandas, OpenCV

Hardware Requirements
 Processor : Pentium IV
 RAM : 512 MB RAM
 Hard Disk : 10GB
Implementation

Step 1: Importing Libraries At first, we will import two libraries numpy and cv2.

import numpy as np
import cv2

Step 2: Loading Pre-Trained Model


• Then in ‘hog’, we will load the haarcascade_fullbody.xml file which is a pre-trained model of haar cascade.
• This is done via Cascade Classifier. They are trained with several hundred "positive" sample views of a particular
object and arbitrary "negative" images of the same size. After the classifier is trained it can be applied to a region of
an image and detect the object in question.

hog = cv2.HOGDescriptor()
hog.setSVMDetector(cv2.HOGDescriptor_getDefaultPeopleDetector())
Implementation

Step 3: Resizing the image captured


• Obtained image from the camera is to be resized to get the stipulated results.

frame = cv2.resize(frame, (640, 480))

Step 4: Reading Image and Gray Scale Conversion


• We read the image using imread() function into frame.
• Then in 'gray', we are converting the image into a gray scale image. We do so because less information is needed to
for each pixel.

gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)


Implementation

Step 5: Extracting Bounding Boxes


• The body_classifier.detectMultiScale, extracts bounding boxes of any bodies identified.
• In detectMultiScale, the first parameter passed is the image name.
• The second parameter passed is the scale factor, which is a parameter specifying how much the image
size is reduced at each image scale.
• The minNeighbors is the third parameter, specifying how many neighbors each candidate rectangle
should have to retain it
• In bodies, we will have four coordinates, x,y,w,h

boxes, weights = hog.detectMultiScale(frame, winStride=(8, 8))


boxes = np.array([[x, y, x + w, y + h] for (x, y, w, h) in boxes])
Implementation

Step 6: Drawing Rectangle around detected bodies and placing date mark
• The x is the x-coordinate and y is the y-coordinate.
• The w is the width of the face and h is the height of the face.
• Hence, x+w and y+h will give the bottom right coordinates of the detected faces.
• The cv2.rectangle() draws rectangle around the detected faces. We pass the image name and the (x,y)
and (x+w,y+h) coordinates to draw the rectangle.
• (0,255,255) states the color of the rectangle. OpenCV works in BGR format. Hence 255 is for green and
red color. Hence, color of the rectangle will be yellow.
• The last parameter '2' is the width of the rectangle formed.
• Using for loop, we will extract the x,y,w,h coordinates from the bodies.
• Then using those coordinates we will draw rectangle around the detected humans

for (xA, yA, xB, yB) in boxes:

# display the detected boxes in the colour picture

cv2.rectangle(frame, (xA, yA), (xB, yB), (0, 255, 0), 2)

cv2.putText(frame, f'person {person}', (xA,yA), cv2.FONT_HERSHEY_SIMPLEX, 0.5, (0,0,255), 1)

person = person+1

cv2.putText(frame, f'Total People : {person-1}', (40,70), cv2.FONT_HERSHEY_DUPLEX, 1, (0,0,255), 2,cv2.LINE_8)


Implementation

Step 7: Recording the detected humans into a file


• The out.write(),writes into a file.
• The waitKey(), stops the output in the screen.
• The destroyAllWindows() will remove all the windows which were open after the program finishes

# Write the output video


out.write(frame.astype('uint8'))
# Display the resulting frame
cv2.imshow('frame', frame)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
# When everything done, release the capture
cap.release()
# and release the output
out.release()
# finally, close the window
cv2.destroyAllWindows()
cv2.waitKey(1)
Results

Input Visuals:
Results
Results
Results

Recorded video visuals:


Results
Results
Testing
File details

Result

Fig 1 : Input Video Properties Fig 2 : Output video Properties

We can observe that there is 7.2 MB difference for 20sec video.


Conclusion and Future Scope

Now a day’s security is essential everywhere. Closed-circuit television (CCTV) or


video surveillance is mostly used in the field of security purposes. CCTVs can be
found at many places ranging from public to private places. Globally, there are
already 841 million cameras in use with 27.16% of these being in India. 80% of
surveillance cameras use between 60GB to 600GB of storage and 99% of
surveillance cameras use between 6GB and 6TB of storage. 24*7 video recording
requires more storage space. Every day, a large amount of data captured by cameras
is stored, but sometimes these data may be useless. For example, no activity is
performed in private places at night, and since no activity is performed, CCTV
cameras record video frames that are similar to each other to record still images.
So, to reduce the storage space, compression techniques are applied. We are
proposing a method to optimize Store frames in high quality only when motion is
detected, reducing the amount of storage required.
Conclusion and Future Scope

• Optimized algorithm for addressing redundancy effectively for CCTV storage.

• The detection of suspicious activities, demonstrating the system's versatility

• Explore CCTV camera implementation, enhance efficiency for high-density areas.

• Incorporate face recognition, edge detection for advanced functionality.

• Explore Arduino or Raspberry Pi integration for improved algorithm implementation.


References

• JasmeetKaur, ACombined DWT-DCT approach to perform Video compression base of Frame


Redundancy Volume 2, Issue 9, September 2012 International Journal of Advanced Research in
Computer Science and Software Engineering, pp-325-332.
• Seagate, Video Surveillance Storage: How Much is Enough? White Paper, February 2012.
• Multi-target detection in CCTV footage for tracking applications using deep learning techniques A.
Dimou P. Medentzidou F. Alvarez Garc.
• Exploiting CCTV Camera System for Advanced Passenger Services On-board Trains Sergio Saponara,
Luca Pilato, Luca Fanucci.
• Threat Image Projection in CCTV David Neil, Nicola Thomas and Bob Baker.
• HD-CCTV System with Extended Transmission Distance for Smart Surveillance System Sungwon Hong,
Byung-Min Min, Dong Seog Han.
• Automated Video Protection, Monitoring & Detection Alan J. Lipton, Craig H. Heartwell, NielsHaering &
Donald Madden.

You might also like