Your cart is currently empty!
List of assignment due dates. The assignment should be submitted via Blackboard. Note: All data needed for this assignment can be downloaded from 1_intro_data.zip. Task 1 (40 points) Figure 1: Bounding box of the person in frame 62 of the “walkstraight” sequence. Write a Matlab function called find_bounding_box that takes in as argument the name of an image file…
The assignment should be submitted via Blackboard.
Note: All data needed for this assignment can be downloaded from 1_intro_data.zip.
Figure 1: Bounding box of the person in frame 62 of the “walkstraight” sequence.
Write a Matlab function called find_bounding_box that takes in as argument the name of an image file from the “walkstraight” sequence, and computes the bounding box of the person. The function should RETURN the bounding box, as a matrix of four numbers: [top row, bottom row, left column, right column]. Furthermore, as a side effect, the function should display a figure that shows the original image, with a yellow (color code: [255 255 0]) rectangle superimposed, representing the detected bounding box. Your function can use data from any frame of the sequence in order to determine the bounding box for the frame in question.
Your function should be named find_bounding_box, and should take a single argument, i.e., the filename specifying a frame of the sequence. For example:
> find_bounding_box(‘walkstraight/frame0052.tif’);
Don’t worry about how the function works when the person is not visible, or is only partially visible.
Write a Matlab function called person_present that can tell when no person is present. Don’t worry about how your algorithm performs on borderline cases, like frames 5-32 when the person is not fully visible. However, your algorithm should be able to tell, for example, that there is no person at frame 3, and that there is a person at frame 62. The function should return 1 if the person is present, and 0 otherwise.
Your function should be named person_present, and should take a single argument, i.e., the filename specifying a frame of the sequence. For example:
> person_present(‘walkstraight/frame0052.tif’);
Write a Matlab function called person_speed that returns the average velocity of the person, between two frames. The function should return a 1×2 matrix [rows_per_frame, cols_per_frame], that specifies, in pixels, the velocity of the person along the vertical direction (rows, increasing from top to bottom) and the horizontal direction (columns, increasing from left to right).
Your solution can be built on top of your find_bounding_box function: call find_bounding_box twice, to find the person in both frames, and calculate the velocity based (somehow) on the results of the find_bounding_box function. Notice that your function must return the velocity, which specifies the direction of motion (and that is why it needs to be a 2D vector), NOT the speed, which is a single number.
Your function should be named person_speed, and should take two arguments, i.e., the filenames specifying two frames of the sequence. For example:
> person_speed(‘walkstraight/frame0052.tif’, ‘walkstraight/frame0062.tif’);
Again, don’t worry about how the function works when the person is not visible, or is only partially visible.
Design and implement a computer vision-based heuristic, that can tell us something about the pose of the person. One pose (let’s call it Pose 1) is exemplified at frames 48, 67, and 84 (among others), where one leg is extended forward and another leg is extended backwards. Another pose (let’s call it Pose 2) is exemplified at frames 40, 58, and 75, where the legs are next to each other. You can incorporate your heuristic into the solution for task 1 (the function can print, as a side effect, POSE 1 or POSE 2). Again, don’t worry about cases in between, like frames 56 or 78, in that case just let your program print its best guess.
[sequence_name, frame] = parse_frame_name(‘walkstraight/walkstraight0062.tif’);
filename = make_frame_name(sequence_name, frame+1);
Submissions are only accepted via Blackboard. Submit a file called assignment1.zip, containing the following files:
We try to automate the grading process as much as possible. Not complying precisely with the above instructions and naming conventions causes a significant waste of time during grading, and thus points will be taken off for failure to comply, and/or you may receive a request to resubmit.
Please only include source code in your submissions. Do not include data files.
Code must run in Matlab version 2018b.
The submission should be a ZIP file. Any other file format will not be accepted.