Movement Discovery and Observation Framework utilizing AI Methods

DOI : 10.17577/IJERTV12IS060132

Download Full-Text PDF Cite this Publication

Text Only Version

Movement Discovery and Observation Framework utilizing AI Methods

K.Durga Bhavani1,P.Jahnavi2,Ch.Vinod Varma3,G.Bhanu Priyanka4,L.Padma5

Department of Computer Science and Engineering, SRKR Engineering College, Chinna Amiram, Bhimavaram, India.(Author1) Department of Computer Science and Engineering, SRKR Engineering College, Chinna Amiram, Bhimavaram, India.(Author2) Department of Computer Science and Engineering, SRKR Engineering College, Chinna Amiram, Bhimavaram, India.(Author3) Department of Computer Science and Engineering, SRKR Engineering College, Chinna Amiram, Bhimavaram, India.(Author4) Department of Computer Science and Engineering, SRKR Engineering College, Chinna Amiram, Bhimavaram, India.(Author5)

Abstract-Today, there are CCTV cameras installed across the region for security purposes, but there is no alarm mechanism in place if a person enters a restricted area without authorization or access to do so. CCTV cameras just capture video; a person cannot spend all of their time watching a screen, thus to avoid this, a detection system is utilized. When an intruder enters an area that is not authorized, the system sends out a warning so that the authorized person is aware that an intruder has arrived.

Index TermsMotion Detection, Video Surveillance, Open CV

I.INTRODUCTION

Nowadays, surveillance is more concerned with human behavior and activities. The primary function of a video surveillance system is to identify and monitor human behavior. To perceive individuals approaching into the unlawful or private spots and to distinguish the conduct event in the packed spots video observation framework is utilized principally on the grounds that one person can't perceive the whole way of behaving occur in a jam-packed place or any controlled spots entering and he can't really look at all the occasion. With the rapid development of technology, it is simple to identify intruders or any suspicious activity in the area through video surveillance systems, which also reduces the amount of manual labor required. A video surveillance system makes it easy to distinguish between a normal person and an unusual one because it is difficult for a person to recognize and analyze human behavior. The fundamental goal is to diminish the wrongdoings and undermine activities. Using this surveillance scheme, which can be either routine or guide, the primary responsibility is to determine whether or not abnormal actions have occurred.

A piece of software called a "Motion Detection and Alerting System" is worn to prevent intruders and illegal visitors from entering unrestricted or illegal locations. The movement of any person entering the area can help us identify the intruder's entrance. If a person is detected, an alert will be sent to the authorized personnel, who can then obtain information about the intruders, be alerted, and take the necessary precautions to prevent unusual events from occurring early. We are able to store the information of people who enter restricted areas, making it simple to identify them in the event that they return to any other restricted areas. Python and Open CV can be used to accomplish this. When it comes to determining whether an area is restricted or not, this can be very accurate in identifying intruders.

  1. PURPOSE AND SCOPE:

    This paper's objective is to inform the reader of intruders who have gained entry to their respective locations without their permission or access. A person feels safer knowing that he or she will receive an immediate alert and be able to easily get rid of any obnoxious or non-offensive behavior.

    If the same person enters again, the data that is taken and stored locally contains details about that person, making it simple to identify the intruder.

    Nowadays, a variety of security systems can be found in a variety of settings, including offices, homes, and other establishments. CCTV cameras are the most common kind of security system, and they are used a lot for security and surveillance. Although these systems can be used for surveillance, they are inexpensive and simple to install, but they have significant drawbacks. The primary drawback of this surveillance system is that when no one is in their homes or other locations, it only records and does not notify the individuals in question of the intruder's presence. We have a motion alert and detection system that goes through the entire recording and sends an alert to the appropriate authorities to avoid this issue because the recording that is made by CCTV cameras

    is stored locally, making it difficult for a person to view the entire recording. In addition, the primary motivation for this project is India's alarmingly high crime rate. Because the intruders are entering restricted or prohibited areas, we are unable to easily determine what the intruder is doing there. Therefore, in order to avoid this issue, we have developed a motion alert and detection system that, in the event that an intruder enters any restricted or prohibited areas, immediately notifies registered authorized individuals. It is also used to regulate the rate of crime. Python and opencv are used to carry it out.

    As a result, the future of this project is quite promising.

  2. Description

Thermal cameras are used to detect intruders in the existing systems. Thermal imaging is a tool that can be used to see in the dark even in the most unfavorable weather conditions. It is used to detect an object's release of thermal energy. Infrared radiation that is hard to see is captured in images by thermal imaging cameras. In light of temperature contrasts between objects, warm imaging produces a fresh picture on which the littlest of subtleties should be visible. Warm imaging cameras will work both while evening and daytime.

It uses data from PIR sensors and can be used both during the day and at night. It works in almost every kind of weather. It can be hindered or shielded by any physical

II.METHODOLOGY

Motion detection and alerting systems are typically implemented using alarms to notify the appropriate person or system. However, in order to implement them more efficiently and effectively, we are using open CV for motion detection and SMTP to notify the individual via email. The primary key functions of motion detection and alerting systems are as follows:

  1. Taking video input:

    In order to detect motion ,we should take video as input . upon starting the program the user will be prompted to select the video which is to be given as input

  2. Motion detection:

    Fig.2.1 Take a input video

    The main goal is to find motion in the video. This is done by calculating the absolute difference between the frames read by the program. If this difference is greater than the experimental value, then motion is found in the video.

    Fig.2.2 Motion Detection

  3. Sending mails:

    In order to send a message to any person using the SMTP library, we should provide the mail id, password, and port number to the methods provided by the library after detecting motion in the given video.

    Fig.2.3 Image for Sending Video

  4. Loading input video:

    We must typically use the camera to record live broadcasts in order to load video. An easy-to-use visual interface for this is provided by OpenCV. Let's convert a video from the laptop's built-in webcam into a gray video and demonstrate that, in order to capture a video, a Video-Capture object must be created. The video file name or the device index could be the contradiction. A number usd to identify which camera is the device indicator. Since typically only one camera is connected, I just passed 0 (or -1). You can choose a second camera by selecting more than one, and so on. You can then hold the frame by frame after that. But at the end, don't forget to extract the bool (True or False) from capture.cap.read (). It will be accurate if the frame is read correctly. Therefore, you can examine this recovery value to view the video's conclusion. It's possible that the cap did not begin filming at some point. In that case, this code indicates an error. Cap. isOpened () can be used to determine whether or not it has been launched. OK if true. Alternately, use cap.open () to open it.

    The CV.videocapture() method and a few graphical user interface (GUI) components like fieldDialog are used to load the video in this case. Field Dialog enables the user to dynamically select the video source directly from the system and loads the video.

    Fig.2.4.1.Loading input Data Fig.2.4.2. Field Dialog

    Fig.2.4.3. Field Dialog captures image

  5. Store the video in specified format

    Therefore, we need to save a video that we have captured and cycled through outline by-casing. It is easy to do for pictures: merely employ cv.imwrite(). There is a little bit more work required here. This time, we create an object for Video Writer. We must identify the yield record's name, such as: output.avi). By then we should decide the Four CC code .By then number of edges consistently (fps) and packaging size should be passed. Additionally, the final one is the Color banner. The encoder expects shading outline if it is True; otherwise, it works with grayscale outline. The four-byte code known as Four CC is used to identify the video codec. Fourcc.org has a list of the codes that can be accessed. It is a stage below it. The going with codecs turn out great for me. The fourCC code is sent as "cv." VideoWriter_fourcc("M," "J," "P," and "G") or CV. For MJPG, use VideoWriter_fourcc(*'MJPG') with the output file name as the first parameter. The method cv2.videoWriter is used to store the video in the specified format. The next parameter specifies the format in which the video must be stored, such as "X," "V," "I," or "D," and the last parameter specifies the output video's resolution, such as 1280,720

    Fig.2.5.1. captures the image

  6. Finding absolute frame difference

    In order to carry out operations to detect motion, the video that has been loaded is read in the form of frames. If motion is detected, there will be a difference between the frames, and vice versa. Here, the frames are read initially and continue to be read continuously until the video feed is live, and the difference is calculated for each successive frame.

    1. Conversionfrom BGR to Gray:

      The process of converting a picture from other shading spaces, such as RGB, CMYK, HSV, and so on, to shades of dim is known as gray scaling. It alternates between completely dark and white.

    2. Significance of gray scaling

Reduced measurement: For instance, gray scaled images have only one dimension, whereas RGB images have three shading channels and three measurements.

reduces the unpredictability of models: Consider writing a neural article about 10x10x3-pixel RGB images. The info layer will have 300 data center points. For grayscaled images, on the other hand, a comparable neural organization will only require 100 information hubs.

Fig.2.6.2.The Process of detection of Motion

For various calculations to function: There are a lot of calculations that are redone to only work with grayscale images, like the Vigilant edge location work that is already done in the Open CV library.

Remove noise from the frame

Pictures, like some other signs, can also contain different kinds of commotion, especially in light of the source (camera sensor). The commotion can be reduced by using Picture Smoothing techniques. From a variety of perspectives, picture smoothing, also known as obscuring, ought to be possible in OpenCV. We will learn how to use the Gaussian channel for picture smoothing in this

instructional exercise. While limiting the ascent and fall time, Gaussian channels have no overshoot to a stage work input. When it comes to handling images, any sharp edges are smoothed out and excessive obscuring is minimized. Parameters for the Gaussian blur method: input section

Threshold for thresholding the frame

The potential of thresholding is to encourage the rearrangement of visual data for research. You can start by switching to dark scale, but you should keep in mind that grayscale actually has 255 qualities. At its most fundamental level, thresholding can change anything to white or dark based on a limit esteem. Let's say we need the limit to be 125 out of 255. At that point, anything less than 125 would be changed to dark, and anything more than 125 would be changed to white, which is 255. If you convert to grayscale as you typically do, the colors white and dark will appear. If you don't switch to grayscale, your images will be threshold, but there will be shading.

Dilation and expansion of main image

Morphological changes are some fundamental activities that depend on the shape of the picture. It frequently occurs on two- dimensional images. It requires two information sources: our unique picture and the organizing component or part that selects the activity concept. Disintegration and Widening are two fundamental morphological administrators. As a result, its variation structuressuch as opening, closing, angle, and so oncome to be perhaps the most significant factor. A pixel element is "1" in this case if at least one pixel below the kernel is "1." As a result, either the size of the foreground object or the white area in the image gets bigger. In most situations, such as noise reduction, erosion is followed by dilation. because erosion not only reduces our object but also eliminates white noise. Thus, we expand it. They won't return because there is no more noise, but our object area grows. Additionally, it can be used to join broken parts of an object.

Retrieve contours

What are "contours"? A "contour" is simply a bend that connects all of the constant points (along the limit) with the same shade or force. For shape investigation, item location, and acknowledgment, the forms are useful tools. Make use of parallel images for a more precise result. Therefore, use edge or vigilant edge recognition prior to identifying shapes. Finding forms in OpenCV is like finding a white article from a dark foundation. Therefore, keep in mind that the object to be found should be white and the foundation should be dark.

The work cv.draw Contours() is used to draw the shapes. It can also be used to draw any shape as long as you know its limit points. The source image is its first contention, followed by the forms, which ought to be passed as a Python list, and a list of shapes, which are useful for drawing singular forms. Shade, thickness, and so on are the remaining contentions necessary to draw all forms.

CONCLUSION

Using cctv camera recordings, we were able to successfully identify intruders entering prohibited areas and exhibiting abnormal behaviors in this paper. A warning email with a timestamp is sent to the registered authority in the event of detection of an intruder or motion. The system itself stores the motion-detection-related output video for future reference. Because it works with such high accuracy and requires very little software, monitoring becomes a lot simpler.

REFERENCES

[1] S. A. Khan, I. Ahmad, A. Shufian and M. S. Ahmed, "A Smart Intruder Alert System Based onMicroprocessor and Motion Detection," 2019 International Conference on Robotics,Electrical andSignalProcessingTechniques(ICRST),2019,pp.335-339,doi:10.1109/ICREST.2019.8644109.

[2] H.K.ChavdaandM.Dhamecha,"MovingobjecttrackingusingPTZcamerainvideosurveillance system," 2017 International Conference on Energy, Communication, Data AnalyticsandSoft Computing (ICECDS),2017, pp. 263-266,doi: 10.1109/ICECDS.2017.8389917.

[3] Zazilah Binti May, "Real-time alert system for home surveillance," 2012 IEEE InternationalConferenceonControlSystem,ComputingandEngineering,2012,pp.501- 505,doi:10.1109/ICCSCE.2012.6487197.

[4] S. B. Ramli, K. H. B. Ghazali, M. F. Bin Mohd Ali and Z. H. B. Hisahuddin, "Human

motiondetectionframeworkSuzaimahBtRamli,"2011IEEEInternationalConferenceonSystemEngineeringand Technology, 2011,pp. 158-161, doi:10.1109/ICSEngT.2011.5993441.

[5] P. S. Bangare, S. L. Bangare, R. U. Yawle and S. T. Patil, "Detection of human feature inabandonedobjectwithmodernsecurityalertsystemusingAndroidApplication,"2017International Conference on Emerging Trends & Innovation in ICT (ICEI), 2017, pp. 139-144, doi:10.1109/ETIICT.2017.7977025.

[6] A. Vel'as, M. Kutaj and M. urovec, "Influence of changing the parameters of the camerasystem on video- based motion detection," 2017 International Carnahan Conference on SecurityTechnology(ICCST), 2017, pp. 1-5, doi: 10.1109/CCST.2017.8167