what you mean by top points of the image does it mean the maxima of the image... if you want to detect the local maxima then try using the laplacian filter on the image... i.e convolving the image with the laplacian mask... as you have said that you are using a gaussian filter before this it is better to use the laplacian of gaussian filter on the image... this will reduce the number of computations altogether... in matlab there is a function 'fspecial' that will return the laplacian of gaussian mask and then use imfilter to filter it...