Skip to content

Instantly share code, notes, and snippets.

@adpoe
Created October 1, 2016 03:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adpoe/a595f5de1bcdc831577a23b45a96a5bb to your computer and use it in GitHub Desktop.
Save adpoe/a595f5de1bcdc831577a23b45a96a5bb to your computer and use it in GitHub Desktop.
Matlab code to display results from the Harris Corner Detector
image = imread('your_image.png');
image = imresize(image, 0.75); # or however much you want to resize if your image is large
[ x, y, scores, Ix, Iy ] = harris_corners( image );
figure; imshow(image)
hold on
for i = 1:size(scores,2)
plot(x(i), y(i), 'ro', 'MarkerSize', scores(i) * 2); # you may need to play with this multiplier or divisor based on your image
# I've used --> (/1000) to (* 10)
end
saveas(gcf,'your_image_with_corners.png');
hold off
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment