The tar file contains one C++ code file and one make file along with two images- empty.jpg
and traffic.jpg
.
The repo contains one C++ code file and one make file along with one image extracted from the video- bg.jpg
which is used as a background.
We have also added our output as out.txt
and the chart based on this data as Traffic_Density.png
.
- Put the code file and Makefile along with the images in the same folder.
- Run
make
- Run
where image =
./output image
empty
ortraffic
or any other suitable image. - Select four images on the displayed grayscale image in
clockwise direction
i.e. selectThe selected point will be shown by a smallTOP-LEFT -> TOP-RIGHT -> BOTTOM-RIGHT -> BOTTOM-LEFT
black
dot. - The projected image will be displayed. To see the cropped image
press any key
on keyboard. - To exit the program,
press any key
. The corresponding images will be stored in the same folder.
-
Put the code file and Makefile along with the background image in the same folder.
-
Run
make
-
Run
./output video
where video =
trafficvideo
or any other suitable video file of mp4 type. -
Three values will be printed on the console-
Time(in seconds) Queue Density Dynamic Density
-
For user's convienence, the above printed values is stored in a csv file named as-
output.csv
.
The code takes the source image as input and the user is asked to select four points on the shown image. After selecting four points, the projected image is displayed by performing homography using the user's selected set of points and a seperate set of points already present in the code. Another homography is performed between user's selected points and the four corner of the final cropped image. Corresponding windows are shown for the outputed images.
- T Abishek - 2019CS10407
- Gaurav Jain - 2019CS10349