Find Distance Between Points in Opencv

yes it is. you already know the formula for the distance, yet your code contains not even an attempt to use it.

first step: in the click event handler, store those points. don’t just draw on the picture.