Raspberry Pi: a Smart Video Monitoring Platform

Total Page:16

File Type:pdf, Size:1020Kb

Raspberry Pi: a Smart Video Monitoring Platform Raspberry Pi: a Smart Video Monitoring Platform David Emanuel Ribeiro Gaspar Thesis to obtain the Master of Science Degree in Embedded Systems and Computer Engineering Supervisor: Prof. Nuno Filipe Valentim Roma Examination Committee: Chairperson: Prof. Miguel Nuno Dias Alves Pupo Correia Supervisor: Prof. Nuno Filipe Valentim Roma Member of the Committee: Prof. Renato Jorge Caleira Nunes November 2014 2 Acknowledgments My parents. My family. My friends. To Dr. Nuno Roma for all the patience, help and support. i Abstract Recent computing trends have led to the release of very low-cost (yet highly capable) single- board computing platforms. The usage of such devices - in this case, the Raspberry Pi - con- nected to an inexpensive Universal Serial Bus (USB) webcam allows the implementation of a very low-cost video processing station. The computational capabilities offered by the Raspberry Pi, combined with the good image quality that is made available by most off-the-shelf webcams, allow the implementation of smart monitoring platforms for a broad range of applications. By combining such a hardware platform with a software architecture consisting of inter-changeable modules, to interface the webcam and to process the gathered data, it is possible to implement a vast set of systems for autonomous video analysis. Under this scenario, the proposed sys- tem is able to perform movement detection and heat-map calculation over a period of time, by analysing a video feed provided by a physically fixed camera. Several possible alternatives for the implementation of each module are presented and discussed, together with a presentation and analysis of the system performance and its real-world applicability. Keywords Smart Video Monitoring, Video Surveillance, Motion Detection, Single-Board Computer, Low- Cost Embedded Platform iii Resumo As tendenciasˆ actuais no mundo da computac¸ao˜ temˆ levado a` disponibilizac¸ao˜ de platafor- mas de computacc¸ao˜ de board unica´ que, apesar do seu reduzido custo, apresentam boas ca- pacidades de computac¸ao.˜ O uso destes dispositivos - neste caso concreto, a Raspberry Pi - ligado a uma camaraˆ USB permite a implementac¸ao˜ de uma estac¸ao˜ de tratamento v´ıdeo de baixo custo. A Raspberry Pi, combinada com a boa qualidade de imagem da camara,ˆ per- mite a implementac¸ao˜ de plataformas inteligentes de monitorizac¸ao˜ para o mais variado leque de usos. Combinando esta plataforma hardware com uma arquitectura software assente em modulos´ inter-conectaveis´ para ligar a` web-cam e tratar os dados obtidos, e´ poss´ıvel implemen- tar um vasto leque de sistemas autonomos´ de tratamento de video. O sistema proposto e´ capaz de realizar detecc¸ao˜ simples de movimentos e calculo´ de mapas termicos´ atraves´ da analise´ do v´ıdeo proveniente de uma camaraˆ fixa. Varias´ alternativas para a implementac¸ao˜ de cada modulo´ sao˜ apresentadas, juntamente com uma analise´ a` performance do sistema e a sua viabilidade no mundo real. Palavras Chave Monitorizac¸ao˜ Inteligente de Video, Video-Vigilancia,ˆ Detecc¸ao˜ de Movimento, Computador de Placa Unica,´ Plataforma Embebida de Baixo-Custo, v Contents 1 Introduction 1 1.1 Motivation . .2 1.2 Objectives . .4 1.3 Requisites . .6 1.4 Document Structure . .6 2 Existing Solutions 9 2.1 Security Video-Surveillance . 10 2.2 Sports Data Gathering . 12 2.3 Wilderness Cameras . 13 2.4 Human Monitoring Systems . 14 2.5 Community Approaches . 15 2.6 Discussion . 15 3 Related Technology 19 3.1 Hardware Platforms & Peripherals . 20 3.1.1 Processing Platform . 20 3.1.2 Camera . 22 3.2 Detection Algorithm . 25 3.3 Software Libraries . 28 3.3.1 MATLAB Computer Vision System Toolbox . 29 3.3.2 OpenCV . 29 3.3.3 Motion . 30 3.4 Discussion . 30 3.4.1 Hardware . 30 3.4.2 Detection algorithm . 33 3.4.3 Software Libraries . 33 4 Proposed Architecture 35 4.1 Hardware Layer . 36 vii Contents 4.1.1 Processing Board & Resources . 36 4.1.2 Peripherals . 37 4.2 Software Layer . 37 4.2.1 Capture Module . 37 4.2.1.A Capture from USB Web-cam . 38 4.2.1.B Capture from Local File . 39 4.2.2 Processing Module . 40 4.2.2.A Video Store . 40 4.2.2.B Simple Movement Detection . 41 4.2.2.C Activity Mapping . 42 4.2.2.D Activity Mapping with Dynamic Reference Updating . 44 4.2.3 Communication Protocol . 45 4.2.3.A Initialization . 45 4.2.3.B Main Cycle . 46 4.2.3.C Finishing . 46 5 Implementation 47 5.1 General Structure . 48 5.2 Capture Module Implementation . 52 5.2.1 Capture from USB Device . 52 5.2.2 Capture from Sequence File . 52 5.3 Processing Module Implementation . 52 5.3.1 Video Storage . 52 5.3.2 Motion Detection . 53 5.3.3 Activity Mapping . 53 5.3.4 Activity Mapping with Dynamic Reference Updating . 55 5.4 Communication Protocol . 56 5.4.1 Execution Parameters Structure . 57 5.4.2 Initial Negotiation . 57 5.4.3 Main Cycle . 58 5.4.4 Finishing Execution . 59 6 Experimental Results 61 6.1 Performance . 62 6.1.1 Movement Detection . 62 6.1.2 Activity Mapping . 63 6.1.3 Activity Mapping with Dynamic Reference Updating . 64 6.2 Real-World Behaviour . 65 viii Contents 6.2.1 Movement Detection . 65 6.2.2 Activity Mapping . 66 6.2.2.A Sequence 1 . 66 6.2.2.B Sequence 2 . 67 6.2.3 Activity Mapping with Dynamic Reference Updating . 67 6.2.3.A Sequence 1 . 67 6.2.3.B Sequence 2 . 68 7 Future Work 71 8 Conclusions 73 A Appendix A 79 B Appendix B 81 C Appendix C 83 D Appendix D 85 E Appendix E 87 ix Contents x List of Figures 1.1 Raspberry Pi board. .3 1.2 Example of heat activity map. .5 2.1 Swann DVR8-3425 - an example of a video surveillance system with a set of cam- eras and a central unit. 10 2.2 Logitech Alert example configuration. 11 2.3 Heat map generated by a player in a football match, showing the areas of the pitch he spent the most time in. 12 2.4 An example of a motion-triggered wilderness camera. 13 2.5 Human tracking by RetailNext. Note the humans enclosed in purple boxes and, in green, the path they took. 14 3.1 Eee PC 4G, the first netbook released by ASUS. 21 3.2 Intel Galileo, an example of an x86 single-board computer. 21 3.3 BeagleBone Black Revision C board. 22 3.4 The Raspberry Pi camera module. 23 3.5 Logitech C270 web-cam. 23 3.6 Frame Differencing execution flowchart. 26 3.7 A difference frame with two visible cars. Extracted from http://www.mathworks. com/discovery/object-detection.html........................ 26 3.8 A photograph taken with a high ISO setting. 27 4.1 Hardware schematic of the system. 36 4.2 Software schematic of the system. 37 4.3 USB Capture Module execution flowchart. 39 4.4 Capture From File Module execution flowchart. 39 4.5 Video Store Processing Module execution flowchart. 40 4.6 Simple Movement Detection Processing Module execution flowchart. 41 4.7 Colour scheme showing warm and cold colours. 42 4.8 Activity Mapping Processing Module execution flowchart. 43 xi List of Figures 4.9 Activity Mapping with Dynamic Reference Updating Processing Module execution flowchart. 44 4.10 Capture to Processing Module Communication.
Recommended publications
  • Bid Bulletin GOODS-20-47
    Office of the Bids and Awards Committee Visca, Baybay City, Leyte 6521-A Philippines Phone/Fax: +63 53 565 0600 loc 1004 Email: [email protected] Website: www.vsu.edu.ph B I D B U L L E T I N 0 1 Project Title: Supply and Delivery of IT Supplies and Equipment for VSU Main and Component Colleges (GOODS-20-47) Date: 30 September 2020 Bidders are hereby informed/reminded of the following addendums/amendments/clarifications: LIST OF ELIGIBILITY REQUIREMENTS ELIGIBILITY AND TECHNICAL DOCUMENTS (1st Envelope) Eligibility Documents 1 PhilGEPS Certificate of Registration (Platinum) or a. Registration Certificate b. Mayor's/Business Permit c. Tax Clearance d. Audited Financial Statements 2 Statement of On-Going Government & Private Contracts Statement of Bidder's Single Largest Completed Contract (at 3 least 50% of the ABC or P 3,675,318.00) or Statement of at least two (2) similar completed contracts w/ total amount of at least P 3,675,318.00 and the largest of which should be at least P 1,837,659.00. 4 Net Financial Contracting Capacity (at least P7,350,636.00) Technical Documents 5 Bid Security 6 Technical Specifications SCHEDULE of Requirements/Production and delivery 7 schedule 8 Manpower Requirements After Sales service/parts (at least 1 year from acceptance of 9 delivered goods) 10 Omnibus Sworn Statement FINANCIAL DOCUMENTS (2nd Envelope) 11 Bid Form Please take note: In the Technical Specifications, bidders must state either “Comply” or “Not Comply” against each of the individual parameters of the specifications per item stating the corresponding performance parameter of the equipment offered.
    [Show full text]
  • Windows 7 Annoyances
    Windows 7 Annoyances Windows 7 Annoyances David A. Karp Beijing • Cambridge • Farnham • Köln • Sebastopol • Taipei • Tokyo Windows 7 Annoyances by David A. Karp Copyright © 2010 David A. Karp. All rights reserved. Printed in the United States of America. Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472. O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (http://my.safaribookson line.com). For more information, contact our corporate/institutional sales depart- ment: 800-998-9938 or [email protected]. Editors: Laurel Ruma and Julie Steele Indexer: Lucie Haskins Production Editor: Kristen Borg Cover Designer: Karen Montgomery Proofreader: Kristen Borg Interior Designer: David Futato Illustrator: Robert Romano Printing History: May 2010: First Edition. Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are regis- tered trademarks of O’Reilly Media, Inc. Windows 7 Annoyances, the image of a Central American turkey, and related trade dress are trademarks of O’Reilly Media, Inc. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and O’Reilly Media, Inc., was aware of a trademark claim, the designations have been printed in caps or initial caps. While every precaution has been taken in the preparation of this book, the publisher and author assume no responsibility for errors or omissions, or for damages result- ing from the use of the information contained herein. TM This book uses RepKover™, a durable and flexible lay-flat binding.
    [Show full text]
  • Emusb-Device User Guide & Reference Manual
    emUSB-Device USB Device stack User Guide & Reference Manual Document: UM09001 Software Version: 3.40.0 Revision: 0 Date: March 31, 2021 A product of SEGGER Microcontroller GmbH www.segger.com 2 Disclaimer Specifications written in this document are believed to be accurate, but are not guaranteed to be entirely free of error. The information in this manual is subject to change for functional or performance improvements without notice. Please make sure your manual is the latest edition. While the information herein is assumed to be accurate, SEGGER Microcontroller GmbH (SEG- GER) assumes no responsibility for any errors or omissions. SEGGER makes and you receive no warranties or conditions, express, implied, statutory or in any communication with you. SEGGER specifically disclaims any implied warranty of merchantability or fitness for a particular purpose. Copyright notice You may not extract portions of this manual or modify the PDF file in any way without the prior written permission of SEGGER. The software described in this document is furnished under a license and may only be used or copied in accordance with the terms of such a license. © 2010-2021 SEGGER Microcontroller GmbH, Monheim am Rhein / Germany Trademarks Names mentioned in this manual may be trademarks of their respective companies. Brand and product names are trademarks or registered trademarks of their respective holders. Contact address SEGGER Microcontroller GmbH Ecolab-Allee 5 D-40789 Monheim am Rhein Germany Tel. +49 2173-99312-0 Fax. +49 2173-99312-28 E-mail: [email protected]* Internet: www.segger.com *By sending us an email your (personal) data will automatically be processed.
    [Show full text]
  • DOST-ASTI Bids and Awards Committee REQUEST FOR
    ASTI-FM 03-10 REV 3/13 January 2020 DOST-ASTI Bids and Awards Committee REQUEST FOR QUOTATION Kind of Procurement Activity: Negotiated Procurement:Small-value Procurement Deadline of Submission of Bids: Jun-16-2021, 2:00 PM RFQ No.: 21-06-3440 Date: June-11-2021 PR No.: GRASPED-21-05-11382 Date: May-19-2021 The Department of Science and Technology (DOST) - Advanced Science and Technology Institute (ASTI), through its Bids and Awards Committee (BAC), intends to procure the item/s listed below. As such, suppliers, contractors, or distributors are invited to submit their quotation/s duly signed by authorized representative. Prospective bidder/s who will submit a proposal with the single/lowest calculated and responsive quotation shall be selected. Guidelines on the format and eligibility documents are listed at the box below the item/s to be procured. Quotations may be sent via a) electronic mail at [email protected], b) fax message, or c) delivering documents to the BAC Secretariat. For further inquiries, you may contact +63 2 249-8500 local 1206/1212 or +63 2 426-7423. Thank you. Respectfully, REYNALDO JOSEPH A. CALLAO JR. BAC Chairman NO. TECHNICAL SPECIFICATIONS QTY UNIT UNIT PRICE(Php) TOTAL PRICE(Php) 1 1Ghz Single Board Computer with headers 3 pc 1100.00 3,300.00 Specifications: CPU : 1-GHZ, compatible with Broadcom BCM2835 RAM : 512MB Wireless : 802.11n / Bluetooth 4.1 / LE Ports : Micro USB, mini HDMI I/O : 40 GPIO Pins Notes: charged under GRASPED Price inclusive of government fees, taxes and duties Delivery: Item must be delivered to ASTI 14 Calendar days upon issuance of NTP 2 GNSS hat compatible with Raspberry Pi Zero 3 pc 2500.00 7,500.00 Specifications: Compatible with Raspberry Pi 40PIN GPIO extension header, supports Raspberry Pi series boards Supports SMS, phone call, GPRS, DTMF, HTTP, FTP, MMS, email, etc.
    [Show full text]
  • Design and Implementation of Live Streaming Using Embedded Linux
    International Journal of Engineering Research & Technology (IJERT) ISSN: 2278-0181 Vol. 2 Issue 11, November - 2013 Design and Implementation of Live Streaming using Embedded Linux A.N.T.Sowjanya N. Nirmala Devi (Aurora’s Technological and Research Associate Professor, ECE Department Institute/ JNTUH, India) (Aurora’s Technological and Research Institute/ JNTUH, India) Abstract: In recent years there is need to improve the way the are needed. We propose a method to optimize the video content is delivered over the Internet. As video content for better delivery. Resulting video multimedia consumption became significant part of stream is provides better experience for the users. At the overall traffic usage, coupled with the emergence these large consumption rates, even modest of mobile browsing content, providers needed a reductions in video bitrates would result in reliable and robust way to deliver content to users. significant reduction in infrastructure costs. Our Adaptive streaming is the new trend in video delivery system is used to design to capture a continuous on the Internet and is expected to be supported by stream of videos like live TV channels and videos are consumer electronic devices such as CD players and stored inside internet by using HTTP protocol. DVRs. Standard solutions have been around for a couple of years and standardization efforts are in the Keywords:streaming,HTTP final stage of implementation. To make this platform protocol,segmentation,optimization. successful, optimized content preparation algorithmsIJERT IJERT 1. INTRODUCTION Most popular implementations available for streaming are Smooth Streaming, HTTP Dynamic In recent years there is need to improve the way the Streaming [1], and HLS (HTTP Live Streaming) [2].
    [Show full text]
  • USB Device Class Definition for Video Devices - FAQ
    Universal Serial Bus Device Class Definition for Video Devices: Frequently Asked Questions (FAQ) Revision 1.1 June 1, 2005 USB Device Class Definition for Video Devices - FAQ Contributors Abdul R. Ismail Intel Corp. Akihiro Tanabe Canon Inc. Allison Hicks Texas Instruments Anand Ganesh Microsoft Corp. Andy Hodgson STMicroelectronics Anshuman Saxena Texas Instruments Bertrand Lee Microsoft Corp. Charng Lee Sunplus Technology Co., Ltd David Goll Microsoft Corp. Eric Luttmann Cypress Semiconductor Corp. Fernando Urbina Apple Computer Inc. Geert Knapen Philips Electronics Geraud Mudry Logitech Inc. Hiro Kobayashi Microsoft Corp. Jean-Michel Chardon Logitech Inc. Jeff Zhu Microsoft Corp. Ken-ichiro Ayaki Fujifilm Mitsuo Niida Canon Inc. Nobuo Kuchiki Sanyo Electric Co., Ltd Olivier Lechenne Logitech Inc. Paul Thacker STMicroelectronics Remy Zimmermann Logitech Inc. Shinichi Hatae Canon Inc. Steve Miller STMicroelectronics Tachio Ono Canon Inc. Takashi Sato Philips Semiconductor Yoichi Hirata Matsushita Electric Industrial Co., Ltd Revision 1.1 June 1, 2005 ii USB Device Class Definition for Video Devices - FAQ Copyright © 2001, 2002, 2003, 2004, 2005 USB Implementers Forum All rights reserved. INTELLECTUAL PROPERTY DISCLAIMER THIS DOCUMENT IS PROVIDED “AS IS” WITH NO WARRANTIES WHATSOEVER INCLUDING ANY WARRANTY OF MERCHANTABILITY, FITNESS FOR ANY PARTICULAR PURPOSE, OR ANY WARRANTY OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION, OR SAMPLE. A LICENSE IS HEREBY GRANTED TO REPRODUCE AND DISTRIBUTE THIS DOCUMENT FOR INTERNAL USE ONLY. NO OTHER LICENSE, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, TO ANY OTHER INTELLECTUAL PROPERTY RIGHTS IS GRANTED OR INTENDED HEREBY. AUTHORS OF THIS DOCUMENT DISCLAIM ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF PROPRIETARY RIGHTS, RELATING TO IMPLEMENTATION OF INFORMATION IN THIS DOCUMENT.
    [Show full text]
  • Parallels Desktop® 16 for Mac User's Guide
    Parallels Desktop® 16 for Mac User's Guide Parallels International GmbH Vordergasse 59 8200 Schaffhausen Switzerland Tel: + 41 52 672 20 30 www.parallels.com Copyright © 1999-2020 Parallels International GmbH. All rights reserved. This product is protected by United States and international copyright laws. The product’s underlying technology, patents, and trademarks are listed at http://www.parallels.com/about/legal/. Microsoft, Windows, Windows Server, Windows Vista are registered trademarks of Microsoft Corporation. Apple, Mac, the Mac logo, macOS, macOS, iPad, iPhone, iPod touch are trademarks of Apple Inc., registered in the US and other countries. Linux is a registered trademark of Linus Torvalds. All other marks and names mentioned herein may be trademarks of their respective owners. Contents Welcome to Parallels Desktop .................................................................................. 9 What You Can Do ........................................................................................................... 9 Set Up Your Mac to Use Windows Applications ............................................................. 10 Other Operating Systems .............................................................................................. 10 Install or Upgrade Parallels Desktop ...................................................................... 11 What You Need............................................................................................................. 11 Install Parallels Desktop ................................................................................................
    [Show full text]
  • Multi User Support for Senior Citizen Visual Guidance System
    Multi User Support for Senior Citizen Visual Guidance System University of Oulu Department of Information Processing Science Master’s Thesis Canrong Deng March 4, 2016 2 Abstract Due to the population aging phenomenon, the working-age population will decline in the future while the seniors’ quality of life can decline. A lot of research has been done and many of researchers figure out modern ICT and mobile technology needs to shoulder more responsibility in elderly care. The benefit of science and technology should be brought to senior citizens’ life. Moreover, the smartphone ownership rate has been increasing in recent years, espe- cially the percentage of Android phone ownership. Because elders will take smart- phone everywhere, installing an application in senior citizen’s Android phone is a good way to track their movements. The caregivers could give guidance remotely to elders based on their location and surrounding environment scene by using mobile technology of this kind,. The multi user support for senior citizen visual guidance system consists of five components: Android phone, Pupil headset, Indicator-based Glasses, OldBirds and web server part. The system uses the Pupil headset to capture senior citizen’s font view and transfer it to OldBirds part which is controlled by caregivers. Furthermore, the Indicator-based glasses are used to show the guidance orders given by remotely caregivers. The web server part is transfer station between Android phone and OldBirds part. Google Cloud Messaging service has already been integrated into this system so that caregivers can directly give guidance orders to senior citizens about when and where to go.
    [Show full text]
  • Virtual Instrumentation
    1.1. What is Labview? LabVIEW is a graphical programming language that uses icons instead of lines of texts to create applications. In contrast to text-based programming languages, where instructions determine program execution, LabVIEW uses dataflow programming, where the flow or data determines execution. In LabVIEW, you build a user interface by using a set of tools and objects. The user interface is known as the front panel. You then add code using graphical representations of functions to control the front panel objects. The block diagram contains this code. In some ways, a block diagram resembles flow chart LabVIEW programs are called virtual instruments, or VIs, because their appearance and operation imitate physical instruments, such as oscilloscopes and multimeters. LabVIEW contains a comprehensive set of VIs and functions for acquiring, analyzing, displaying, and storing data, as well as tools to help you troubleshoot your code. 1.2. Parts of a VI LabVIEW VIs contain three main components: 1. The front panel, 2. The block diagram 3. The icon/connector pane Getting started screen will be shown when you run LabVIEW. It can be seen in fig. 1 below. Fig 1. Getting started screen of LabVIEW For now, as a beginner, you should get acquainted to LabVIEW environment. Try to click "Blank VI" under the "New" Section on the left (See Fig. 1). You will see two windows are appearing. One is the grey one which is called “Front panel” and the other is white which is called “Block diagram”. 1.2.1. Front Panel Front panel is the graphical user interface (GUI) of your LabVIEW program where you will interact with it while it is running.
    [Show full text]
  • Parallels Desktop® 9 for Mac User's Guide
    Parallels Desktop® 9 for Mac User's Guide Copyright © 1999-2014 Parallels IP Holdings GmbH and its affiliates. All rights reserved. Parallels IP Holdings GmbH Vordergasse 59 8200 Schaffhausen Switzerland Tel: + 41 52 632 0411 Fax: + 41 52 672 2010 www.parallels.com Copyright © 1999-2014 Parallels IP Holdings GmbH and its affiliates. All rights reserved. This product is protected by United States and international copyright laws. The product’s underlying technology, patents, and trademarks are listed at http://www.parallels.com/trademarks. Microsoft, Windows, Windows Server, Windows NT, Windows Vista, and MS-DOS are registered trademarks of Microsoft Corporation. Apple, Mac, the Mac logo, Mac OS, iPad, iPhone, iPod touch, FaceTime HD camera and iSight are trademarks of Apple Inc., registered in the US and other countries. Linux is a registered trademark of Linus Torvalds. All other marks and names mentioned herein may be trademarks of their respective owners. Contents Welcome to Parallels Desktop..................................................................................8 What You Can Do ............................................................................................................. 9 Set Up Your Mac to Use Windows Programs.................................................................... 9 Other Operating Systems................................................................................................10 Install or Upgrade Parallels Desktop ......................................................................11
    [Show full text]