File Exchange

image thumbnail

Harris Corner Detector

version 1.0 (344 KB) by

The code calculates and display the Harris Feature Points.

30 Ratings



No License

The code calculates the Harris Feature Points. When u execute the code, the test image file opened and u have to select by the mouse the region where u want to find the Harris points,
the code will print out and display the feature points in the selected region.

You can select the number of FPs by changing the variables max_N & min_N

Comments and Ratings (38)

Hashim Shafiq

good work



liu wang

Mildred Sun

thank you very much

xu xiaofeng

very nice

ankith reddy

hello ali,
i have two questions to ask .
1) can you explain why did you choose two values from variable 'point1' and 'point2'instead of four.
2) why are you applying convolution two times?
3) finally, can i use other filter instead of gaussian?

early reply would be appreciable.


paula (view profile)

Hi! Your work is great! I have a doubt: What is the Imag.mat file used for??

Thank you!! :)


anibal (view profile)

muchas gracias


Rehab (view profile)


Si (view profile)

Thanks. Its Working. :)


great thanks


Qiu (view profile)

good, 3ks

Fatma Gargouri


Peter Bone

Peter Bone (view profile)

Code works well but has some negative points that need to be corrected.
- Code works on non-standard image format (double in range 0 to 255).
- There is some confusion between row and column indexing variable names.
- There is no boundary checking for cmin,cmax,rmin,rmax, so it gives an error if you try to select an area near the edge of the image.
- Poor commenting and description.
- Would be better in the form of a function with separate implementation example.

i want to implement the below algorithm. please help me.

1. Convert image to a gray level image
2. Compute the M matrix mentioned above for all points in the
3. Apply the Gaussian filter to the output image of stage 2
4. Compute R for the output image of stage 3
5. Find the maximums in 3 by 3 neighborhoods in the output image of stage 4
6. Find the points in the output image of stage 5 who’s R value is grater than a predefined Threshold value (Rmin)

Ruben Ferrer

How can change the image? i.e. How can create a .mat image from .jpg? thanks


Dja (view profile)

Thanks for sharing but I'm sorry it looks a bit too dirty to me. No comments, some redundancies and no genericity...

Thanks for your sharing.


george (view profile)

any help please !!!!


george (view profile)

thanks for this code, iam trying to implement the system using the help of harris in fuzzy, but i have a question bout the
energy . is "R=R11 " considered to be the energy of the image .
if it is , i have another question when i applied the code to different images i get energy of corner like 50 or 60 and on another image i get values like 500 or 600,

thanks in advance

binu mol

i would like to have the idl code of Harris-Corner detector for my project work.please help me

pretty good results on my test images, and works fast.

Said Musa Al Cherkessi

Wabjew day'es

Bob Zhang


KK Rai

marco gialletto

grande! evribadi

Kelly Santos

Good, some changes and its works very well for any input image.

Mustafa M

I think it is great for my application. Sometimes we need to find the points as region of interest only and not in the whole image. Thank you indeed.

harris detector

it's working fine.. with litle changes you can make it work for every image you want(not the default one) and make it scan the whole image rather than just the selected window

Alex Bewley

kamal R

what is the advantage if u use mouse to select feature points.The better thing is to use matlab toolbox itself.If u have automated it send me a copy

Harris Decttor

It sucks

Adlin Sheeba

I need the coding for the matlab data file Imag.
For my own bmp image I want to find the harris corner. Plz help me.

hedi hedi

paul martin


MATLAB Release
MATLAB 7.1.0 (R14SP3)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video