How to get all the local "peaks" from the picture?

asked 2019-07-24 14:11:45 -0500

savailonei gravatar image

updated 2019-07-24 14:28:01 -0500

I would like to get all the small peaks from the picture below. I would also like to avoid getting the big peak (on the right), but I can exclude that based on the area. The image is a result of Sobel operator but this is not important. It will be used as markers for watershed algorithm. The picture: https://ibb.co/vzdcd2B

This is not the only picture I have to process and I cant relay on the values of the peaks only on the fact that they are "local maximums"

edit retag flag offensive close merge delete

Comments

They are called local maxima.

sjhalayka gravatar imagesjhalayka ( 2019-07-24 20:19:12 -0500 )edit

What exactly do you mean by "get the local peaks"? Their location, their count,...?

Witek gravatar imageWitek ( 2019-07-25 09:25:31 -0500 )edit

I need locations to create markers for the watershed algorithm.

savailonei gravatar imagesavailonei ( 2019-07-25 11:06:03 -0500 )edit

Then find contours, filter out too small and too big and get centers of the contours.

Witek gravatar imageWitek ( 2019-07-25 15:02:34 -0500 )edit