I use Java as a programming language to fix the problem that I am currently facing.
I need to know the position (x, y) of the markers in the following image.

This has already been done with some java library, I think not?
Markers are small black squares.
Thank you so much for your help.
source share