to prevernt showing points outside the image,what should i do?
A simple method could be to use a mask defining the leaf shape - and than working with the resulting image, i.e. like so:
img0 = Import["https://community.wolfram.com/c/message_boards/get_message_attachment?messageId=3396992&attachment=Screen+Shot+2025-02-19+at+6.40.56+PM.png"]
leafMask = FillingTransform@MorphologicalBinarize[img0, .3]
img1 = leafMask img0
As always: You have to experiment with WL-functions and their parameters - but its fun!