Real time H.264 decoder implementation in robot control Saurabh Ghorpade.

Slides:



Advertisements
Similar presentations
Socket Programming 101 Vivek Ramachandran.
Advertisements

Introduction to Sockets Jan Why do we need sockets? Provides an abstraction for interprocess communication.
INTERNATIONAL CONFERENCE ON TELECOMMUNICATIONS, ICT '09. TAREK OUNI WALID AYEDI MOHAMED ABID NATIONAL ENGINEERING SCHOOL OF SFAX New Low Complexity.
Implementation of an Android Phone Based Video Streamer 2010 IEEE/ACM International Conference on Green Computing and Communications 2010 IEEE/ACM International.
-1/20- MPEG 4, H.264 Compression Standards Presented by Dukhyun Chang
The Bioloid Robot Project Presenters: Michael Gouzenfeld Alexey Serafimov Supervisor: Ido Cohen Winter Department of Electrical Engineering.
Network synchronization of Online Games Li, Zetan.
1 Video Coding Concept Kai-Chao Yang. 2 Video Sequence and Picture Video sequence Large amount of temporal redundancy Intra Picture/VOP/Slice (I-Picture)
A CHAT CLIENT-SERVER MODULE IN JAVA BY MAHTAB M HUSSAIN MAYANK MOHAN ISE 582 FALL 2003 PROJECT.
1 Java Networking – Part I CS , Spring 2008/9.
1 2. Controlling Robot Car in Ogre References: 1. LEGO.com MINDSTORMS NXT Home, 2. OGRE 3D, 3. MSDN,
Video Compression Bee Fong. Lossy Compression  Inter Frame Compression Compression among frames Compression among frames  Intra Frame Compression Compression.
1 Slice-Balancing H.264 Video Encoding for Improved Scalability of Multicore Decoding Michael Roitzsch Technische Universität Dresden ACM & IEEE international.
Design and Implementation of a Server Director Project for the LCCN Lab at the Technion.
Remote Surveillance Vehicle Design Review By: Bill Burgdorf Tom Fisher Eleni Binopolus-Rumayor.
An Introduction to H.264/AVC and 3D Video Coding.
Sockets CIS 370 Fall 2009, UMassD. Introduction  Sockets provide a simple programming interface which is consistent for processes on the same machine.
Embedded Microcomputer Systems Andrew Karpenko 1 Prepared for Technical Presentation February 25 th, 2011.
1 HW-SW Framework for Multimedia Applications on MPSoC: Practice and Experience Adviser : Chun-Tang Chao Adviser : Chun-Tang Chao Student : Yi-Ming Kuo.
By: Joel Rodriguez.  International student from Mexico  Delicias, Chihuahua Mexico  Spanish  Sports and Music.
Socket Programming References: redKlyde ’ s tutorial set Winsock2 for games (gamedev.net)
Network Programming Tutorial #9 CPSC 261. A socket is one end of a virtual communication channel Provides network connectivity to any other socket anywhere.
Real time H.264 decoder implementation in robot control Saurabh Ghorpade.
Fall 2000Datacom 11 Lecture 4 Socket Interface Programming: Service Interface between Applications and TCP.
Server Sockets: A server socket listens on a given port Many different clients may be connecting to that port Ideally, you would like a separate file descriptor.
EE 5359 PROJECT PROPOSAL FAST INTER AND INTRA MODE DECISION ALGORITHM BASED ON THREAD-LEVEL PARALLELISM IN H.264 VIDEO CODING Project Guide – Dr. K. R.
Stanley – RC Car.
By, ( ) Low Complexity Rate Control for VC-1 to H.264 Transcoding.
TCP Lecture 13 November 13, TCP Background Transmission Control Protocol (TCP) TCP provides much of the functionality that IP lacks: reliable service.

CS 8903 Demo Wireless Interface for the Bioloid Robot Chetna Kaur.
CSP Implementing a network 1 Implementing a network Lecturer: Smilen Dimitrov Cross-sensorial processing – MED7.
22-Oct-15CPSC558: Advanced Computer Networks Chapter 7 End-to-End Data –Data Manipulating Functions (Affecting Throughputs) How to encode the message into.
HW-Accelerated HD video playback under Linux Zou Nan hai Open Source Technology Center.
Sadaf Ahamed G/4G Cellular Telephony Figure 1.Typical situation on 3G/4G cellular telephony [8]
Codec structuretMyn1 Codec structure In an MPEG system, the DCT and motion- compensated interframe prediction are combined. The coder subtracts the motion-compensated.
Video Compression Standards for High Definition Video : A Comparative Study Of H.264, Dirac pro And AVS P2 By Sudeep Gangavati EE5359 Spring 2012, UT Arlington.
---- IT Acumens. COM IT Acumens. COMIT Acumens. COM.
EE 5359 TOPICS IN SIGNAL PROCESSING PROJECT ANALYSIS OF AVS-M FOR LOW PICTURE RESOLUTION MOBILE APPLICATIONS Under Guidance of: Dr. K. R. Rao Dept. of.
Chapter 2 Applications and Layered Architectures Sockets.
Network Programming Eddie Aronovich mail:
Remote Shell CS230 Project #4 Assigned : Due date :
- By Naveen Siddaraju - Under the guidance of Dr K R Rao Study and comparison between H.264.
Rate-distortion Optimized Mode Selection Based on Multi-channel Realizations Markus Gärtner Davide Bertozzi Classroom Presentation 13 th March 2001.
Figure 1.a AVS China encoder [3] Video Bit stream.
PERFORMANCE ANALYSIS OF AVS-M AND ITS APPLICATION IN MOBILE ENVIRONMENT By Vidur Vajani ( ) Under the guidance of Dr.
Networking Tutorial Special Interest Group for Software Engineering Luke Rajlich.
CS 158A1 1.4 Implementing Network Software Phenomenal success of the Internet: – Computer # connected doubled every year since 1981, now approaching 200.
-BY KUSHAL KUNIGAL UNDER GUIDANCE OF DR. K.R.RAO. SPRING 2011, ELECTRICAL ENGINEERING DEPARTMENT, UNIVERSITY OF TEXAS AT ARLINGTON FPGA Implementation.
CPSC 441 TUTORIAL – FEB 13, 2012 TA: RUITNG ZHOU UDP REVIEW.
Advances in digital image compression techniques Guojun Lu, Computer Communications, Vol. 16, No. 4, Apr, 1993, pp
Prepared by: Azara Prakash L.. Contents:-  Data Transmission  Introduction  Socket Description  Data Flow Diagram  Module Design Specification.
Joe Cohen Presentation Overview  Project definition and requirements  Solution process and explanation  Methodology.
Vamsi Krishna Vegunta University of Texas, Arlington
CS 6401 Introduction to Computer Networks 09/21/2010 Outline - UNIX sockets - A simple client-server program - Project 1 - LAN bridges and learning.
MP2 Discussion Session CS414 Spring 2010 Long Vu 2/16/2010.
-BY KUSHAL KUNIGAL UNDER GUIDANCE OF DR. K.R.RAO. SPRING 2011, ELECTRICAL ENGINEERING DEPARTMENT, UNIVERSITY OF TEXAS AT ARLINGTON FPGA Implementation.
HTML5 based Notification System for Updating E-Training Contents Yu-Doo Kim 1 and Il-Young Moon 1 1 Department of Computer Science Engineering, KoreaTech,
Cevgroup.org C utting E dge V isionaries. cevgroup.org TODAY’s TALK 1) Internet Of Things (IoT) 2) Wi-Fi Controlled Robots 3) Augmented Reality.
Socket Programming. Computer Science, FSU2 Interprocess Communication Within a single system – Pipes, FIFOs – Message Queues – Semaphores, Shared Memory.
James Crosetto BS (Computer Science and Computer Engineering) Jeremy Ellison BS (Computer Science and Computer Engineering) Seth Schwiethale BS (Computer.
Instructor : Dr. K. R. Rao Presented by : Vigneshwaran Sivaravindiran
Implementation and comparison study of H.264 and AVS china EE 5359 Multimedia Processing Spring 2012 Guidance : Prof K R Rao Pavan Kumar Reddy Gajjala.
Project Proposal Error concealment techniques in H.264 Under the guidance of Dr. K.R. Rao By Moiz Mustafa Zaveri ( )
H. 261 Video Compression Techniques 1. H.261  H.261: An earlier digital video compression standard, its principle of MC-based compression is retained.
Present by 楊信弘 Advisor: 鄭芳炫
Depth Analysis With Stereo Cameras
Research Topic Error Concealment Techniques in H.264/AVC for Wireless Video Transmission Vineeth Shetty Kolkeri EE Graduate,UTA.
Standards Presentation ECE 8873 – Data Compression and Modeling
Exceptions and networking
Presentation transcript:

Real time H.264 decoder implementation in robot control Saurabh Ghorpade

H.264 decoder [1] algorithms for evaluating the inverse transforms and packet analysis high speed real time implementation in C/C++ for robot control feature recognition to be implemented

Existing functionality Java implementation- successful in terms of functionality but slow speed. Reasons[2]: -Class loading at startup -Unnecessary array validations -Excessive use of heap -Garbage collection

C for real time control No Java Virtual Machine so direct interaction with hardware Better memory management using pointers Compiler optimizations, macros can be used. Easy and fast control system, navigation and socket.

Environment setup Robot communication protocol [3], router. Operating system: Linux C Compiler.

Implementation Multithreaded socket programming -To send commands to robot -To decode the video packet

Image decoding Image divided into groups of blocks (GOB) and each GOB is further divided into macroblocks Each macroblock contains 16x16 image in Y CbCr format, type 4:2:0

Steps Entropy decoding Inverse zigzag, followed by inverse quantization and inverse transformation. Forming the picture by the picture format given in fig 6. Extracting the motion vector information from the packet followed by motion compensation. Finally getting the video.

(Fig 1) Client server [3]

(Fig 2) packet [3]

(Fig 3) Modified JPEG [3]

H.264 Encoder (a) and decoder (b) [15]

(Fig 4) Motion vector estimation [3]

(Fig 5) 16x16 intra prediction modes [3]

(Fig 6) Picture format [3]

(Fig 7) Hardware [3]

Hardware description [3] A.R. (augmented reality) Drone: Quadrotor. Batteries: The AR.Drone uses a charged 1Ah, 11.1V LiPo batteries to fly Motion sensors ultrasound telemeter camera aiming downwards Video streaming: The frontal camera is a CMOS sensor with a 90 degrees angle lens.

Algorithm Initialize the UDP sockets for streaming, sending commands and accepting navigation data. Create threads for streaming video, sending commands, monitoring the keyboard and accepting the navigation data from the AR.Drone. Create an infinite loop. Poll the keyboard event.

Algorithm Update the image on the screen. If the start key is pressed set the robot into hover mode by sending the hover command to it. The robot now waits for the red ball to show up in front of its frontal camera. If ball is not there, the robot stays still in the same position until the stop key is pressed. If the robot’s camera gets the ball, it uses open source computer vision (OpenCV [18]) to recognize the ball. At the same time the data coming to the laptop through the video socket is analyzed. The inverse transform is calculated followed by motion estimation and compensation. This video is shown up on the screen.

Algorithm cont.. The command is sent to move the robot to the left side. Finally, once the stop key is pressed, the robot is brought down by sending the command.

Algorithm cont.. Then the centroid of the ball is calculated. As the robot moves, the difference between the updated position and the previous position is calculated (The movement is restricted to the horizontal direction). If the difference is positive, it is inferred that the ball has moved to the right. So the command is sent to move the robot to the right side with the intention to reduce the difference. If the difference is negative, it is inferred that the ball has moved to the left.

A simple program to establish connection with the A.R. Drone: static void send_command() { snprintf(str,AT_BUFFER_SIZE,AT*PCMD=%d,%d,%d,%d,%d,%d\r",nb_sequence++,1,*(int*)&radiogp_cmd.pitch,*(int*)&radiogp_cmd.roll,*(int*)&radiogp_cmd.gaz,*(int*)&radiogp_cmd.yaw); at_write((int8_t*)str, strlen (str)); } void at_write (int8_t *buffer, int32_t len) { struct sockaddr_in to; int32_t flags; if( at_udp_socket < 0 ) { at_udp_socket = socket( AF_INET, SOCK_DGRAM, 0 ); }` if( at_udp_socket >= 0 ) { int res; memset( (char*)&to, 0, sizeof(to) ); to.sin_family = AF_INET; to.sin_addr.s_addr = inet_addr(WIFI_MYKONOS_IP); to.sin_port = htons (AT_PORT); res = sendto( at_udp_socket, (char*)buffer, len, 0, (struct sockaddr*)&to, sizeof(to) ); buffer[strlen((char*)buffer)-1] = '\n'; }

Program explanation sendCommand() is the first function being called from main(). It is used to fill the buffer containing the command to be sent to robot. atWrite() function will send the command to the robot over WiFi [8].

Program explanation A datagram socket facilitates the data to be sent using the UDP protocol. atWrite() initializes the socket with IP address and port number. Finally the sendTo() function is called which takes the buffer ( containing command) and socket and sends it to robot over WiFi [8]. This function is defined from the linux networking libraries.

Further work The video stream is available on the port number So, the current research is focused on the incoming bit stream analysis. Prior to this, the application needs to be multithreaded in order to simultaneously handle streaming, navigation, control and monitoring keyboard. The keyboard monitoring is facilitated by simple direct media layer (SDL [17]) libraries. Finally the object recognition is done using OpenCV [18] library.

Applications [3]: Reality games: A.R. Drone can be controlled by joystick or smart phones to play video games. Advertising: A.R. Drone can be used for online advertising. Medical and 3D vision: Photos of patients from various angles can be captured by the frontal as well as bottom cameras.

References [1] F. Pescador, M.J.Garrido, C.Sanz, E.Juarez, M.C.Rodriguez and D.Samper, “A real- time H.264 MP decoder based on a DM642 DSP”, 14th IEEE International Conference on Electronics, Circuits and Systems, Madrid, Spain, ICECS 2007, Vol. 11, pp.1248 – 1251, Dec ICECS 2007, [2] Java is slower than C: [3] A.R. Drone Developer’s guide: one.org%252Fattachments%252Fdownload%252F365%252FARDrone_SDK_1_7_D eveloper_Guide.pdf’s guide: one.org%252Fattachments%252Fdownload%252F365%252FARDrone_SDK_1_7_D eveloper_Guide.pdf [4]A.R.Drone [5] Y-C b -C r format: [6] H.264 Reference : [7] W.T.Staehler and A.A.Susin, “Real-time 4x4 intraframe prediction architecture for a H.264 decoder”, UFRGS, Alegre Telecommunications Symposium, 2006 International, pp. 416 – 421, Sept Telecommunications Symposium, 2006 International

References [8]Wifi wiki : [9] GCC wiki : [10] Introduction to make (linux make for building C/C++ sources) [11] JPEG wiki: [12] Shih-Tse Wei, Chia-Wei Tien, Bin-Da Liu and Jar-Ferr Yang, “Adaptive truncation algorithm for Hadamard-transformed H.264/AVC lossless video coding”. IEEE Transactions on Circuits and Systems for Video Technology, Vol. 21, pp , May IEEE Transactions on [13] Runlength coding wiki: [14] Huffman coding wiki: [15] Soon-kak Kwon, A. Tamhankar and K.R. Rao, “ Emerging H.264/AVC video coding standard”, J. Visual Communication and Image Representation, vol. 17, pp , April H.264 review review

References [16] POSIX Thread wiki: [17]SDL wiki: r r [18]OpenCV wiki: [19]DCT wiki: m m [20] I.E. Richardson, White Paper: A Technical Introduction to H.264 / AVC.

Thank you! Any questions?