Вы находитесь на странице: 1из 6

Malav Shastri

14012121009
Big data and Analytics(CASE STUDY)

Video Analytics

Video Analytics in Hadoop to analyse the number


of people in any public place to handle the real
time crowd

We can manage the crowd at any public place using video


analytics in hadoop
At any public place there are multiple CCTV cameras are
installed which records the footage 24/7
Using that footage we can count the number of people at that
place at any instance of time, the whole process is in real time.
The benefit of this process is that we can handle crowd in more
efficient manner as well we can predict the number of people
at that place in any near future in advance
The process can be divided into two parts
1) Storing the CCTV video as the image bundles in HDFS
2) Use that image bundles with HIPI framework and OpenCv for
analytics
Step 1)

1) Conversion of Video into Frames: JCodec is an open source


library for video codecs and formats that is implemented on
Java.There are various tools for the digital transcoding of the
video data into frames such as JCodec, Xuggler.
2) Put Frames in the HDFS: Putting frames or images in the
HDFS using the put command is not possible. So to store the
images or frames into the HDFS, first convert the frames as the
stream of bytes and then store in HDFS. Hadoop provides us the
facility to read/write binary files. So, practically anything which
can be converted into bytes can be stored in HDFS.
3) Store images in an HIPI ImageBundle: After the process of
transcoding the images, these are combined into a single large
file so that it can easily be managed and analyzed. Using the add
image method, we can add every image into the HIPI
imageBundle. So HIPI ImageBundle can be considered as a
bunch of Images. Each mapper will generate an HIPI
ImageBundle, and the Reducer will merge all bundles into a
single large bundle. By storing images in this way now you are
able to work on HIPI framework. Now MapReduce jobs are
running on these image Bundles for image analysis.
4) Analysis Of Frame by HIPI Framework: HIPI is an image
processing library designed to process a large number of images
with the help of Hadoop MapReduce parallel programming
framework. HIPI facilitates efficient and high-throughput image
processing with MapReduce style parallel programs typically
executed on a cluster. It provides a solution to store a large
collection of images on the Hadoop Distributed File System
(HDFS) and make them available for efficient distributed
processing.
The primary input object of a HIPI program is HIB. An HIB is a
collection of images represented as a single file on the HDFS.

Rough calculation of number of nodes needed to


process 1gb file
We are putting video frames into HDFS so, Lets say we have 1 gb of
video file and from that there are 1000 frames are created each of 1
MB lets say we take a block size of node 128MB then approximately
8 data nodes will be needed to store the file of 1gb, but we havent
consider the replication factor, lets take replication factor of 3 then
total 8*3=24 data nodes will be needed to process the file of 1 gb
Step 2)

The above image shows how MapReduce program works on


any general Image Bundle
Once the bundles are vreated then the role of HIPI and OpenCV
comes into the picture.

Вам также может понравиться