Part 1 - Harris Corners (60 points): Write a program that loads an image, extracts Harris Corners using the algorithm discussed in class, and displays the corners overlaid on the image. Your program may not make use of any existing functions/code that extract features. Start by using the checkerboard image to test your code. Part 2 - Ranking Corners (20 points): After you've assigned "cornerness" measurements to every pixelFind the max "cornerness" measurement in the image. Label all pixels whose "cornerness" is greater than a certain percentage of this value (i.e. 10%) as corners. The exact percentage you use will probably change based on the image. Bonus #1 (10 points): Additionally, rank corners using the following method and compare the two methods. Divide the image into m blocks. Label the n pixels in each block with the highest "cornerness" values as corners. Play with the parameters (m, n). For both methods you'll probably use different parameter values for different images to get good corners. Bonus #2 (10 points): Visualize the range of "cornerness" values computed for an image. Color pixels with the lowest cornerness value black and pixels with the highest value white. Linearly interpolate between these two values so that other pixels are different shades of gray.

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter6: Arrays
Section: Chapter Questions
Problem 5GZ
icon
Related questions
Question
  1. Create empty images for Ix, Iy, Ixx, Iyy, and Ixy (all the same dimensions as your original image)
  2. Loop through pixels of image and fill in values for Ix, Iy, Ixx, Iyy, and Ixy (ignore the edges when you set up the range of your loops)
  3. Create empty image to hold "cornerness" values
  4. Loop through pixels of image
    • Access the a neighborhood surrounding each pixel (start with a 3x3, you can expand it later if you'd like)
      • Sum up all the Ixx, Iyy, and Ixy values in this neighborhood
      • Compute the determinant of the M matrix
      • Compute the trace of the M matrix
      • Compute the "cornerness" value for the center pixel - store in the "cornerness" image
  5. Find max cornerness value in image
    set threshold = 0.01(max C value) 
    loop through pixels. if(C at pixel) > threshold: cv2.circle(image(X,Y),size(b,g,r) - 1)

Do  not make use of any existing functions/code that extract features. Use opencv and python.

Part 1 - Harris Corners (60 points):
Write a program that loads an image, extracts Harris Corners using the algorithm discussed in class,
and displays the corners overlaid on the image. Your program may not make use of any existing
functions/code that extract features. Start by using the checkerboard image to test your code.
Part 2 - Ranking Corners (20 points):
After you've assigned "cornerness" measurements to every pixelFind the max "cornerness"
measurement in the image. Label all pixels whose "cornerness" is greater than a certain percentage of
this value (i.e. 10%) as corners. The exact percentage you use will probably change based on the
image.
Bonus #1 (10 points):
Additionally, rank corners using the following method and compare the two methods. Divide the
image into m blocks. Label the n pixels in each block with the highest "cornerness" values as corners.
Play with the parameters (m, n).
For both methods you'll probably use different parameter values for different images to get good
corners.
Transcribed Image Text:Part 1 - Harris Corners (60 points): Write a program that loads an image, extracts Harris Corners using the algorithm discussed in class, and displays the corners overlaid on the image. Your program may not make use of any existing functions/code that extract features. Start by using the checkerboard image to test your code. Part 2 - Ranking Corners (20 points): After you've assigned "cornerness" measurements to every pixelFind the max "cornerness" measurement in the image. Label all pixels whose "cornerness" is greater than a certain percentage of this value (i.e. 10%) as corners. The exact percentage you use will probably change based on the image. Bonus #1 (10 points): Additionally, rank corners using the following method and compare the two methods. Divide the image into m blocks. Label the n pixels in each block with the highest "cornerness" values as corners. Play with the parameters (m, n). For both methods you'll probably use different parameter values for different images to get good corners.
Bonus #2 (10 points):
Visualize the range of "cornerness" values computed for an image. Color pixels with the lowest
cornerness value black and pixels with the highest value white. Linearly interpolate between these two
values so that other pixels are different shades of gray.
Transcribed Image Text:Bonus #2 (10 points): Visualize the range of "cornerness" values computed for an image. Color pixels with the lowest cornerness value black and pixels with the highest value white. Linearly interpolate between these two values so that other pixels are different shades of gray.
AI-Generated Solution
AI-generated content may present inaccurate or offensive content that does not represent bartleby’s views.
steps

Unlock instant AI solutions

Tap the button
to generate a solution

Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT