Fill This Form To Receive Instant Help
Homework answers / question archive / Instructions For this project, you need to implement a simpler version of Haar feature detection using integral image
Instructions
For this project, you need to implement a simpler version of Haar feature detection using integral image. You can use the attached three images as an example for testing. Your code need have two major part: Part 1 - Integral Image generation. From the original (or input image), you need to generate an integral image first. To make it easier, you work on the gray version of the image instead of RGB image. You also need a "double" type for the integral image as the values are out of the range of 255 for each pixel. (10%) Part 2 - Haar feature search. After you generate the integral image, you need to implement code to search on the integral image for a pattern as "img1.jpg" or "img2.jpg" shows. The top is "black" and bottom is "white". Since you don't know how big of the black and white region. You can start with a small unit size, e.g. 40x40 for the "white" and "black" square. Your code should have the following steps: (1) Use a loop to scale the unit size, e.g. scale = 1.0, 1.5, 2.0, ... You will try different scales on the Haar feature to generate different sizes. (10%) (2) Traverse the integral image to place the "Haar" feature in different locations to see if there's a match by computing the contrast of the proposed "white" and "black" region. (25%)
(3) Use a threshold to find the potential candidate list. (10%) (4) After a list of candidates being collected, you need to further refine the candidate by detecting overlapping regions and only the one with the maximum contrast rate will survive. (25%)
(5) Finally draw the a red rectangle surround the detected "Haar" feature and saved the image. You need to submit some images of them by either ".jpg" files or pasting them in your report (.docx document or .pdf) (20%)
Please download the correct answer file using this link
https://drive.google.com/file/d/1baBp8wXwleXBR0OIyI8o1oL5QtcBNYoB/view?usp=share_link