I am totally new with python and really don't know how to solve my problem. So it would be really nice if you could explain in detail how I could solve this:
So I filtered all the coordinates of white pixels of an image and have them in a numpy array [x y] now. When I plot them I get the resulting point cloud. In this point cloud there is minimum 1 y-Value for every x-Value. Now I would like to filter this array and get a new one only with those points that have the highest y-Value for every existing x-value in there. Or you could say I just want to preserve the upper margin of my point cloud. You could illustrate it graphically as follows:
My point cloud array is called "Pixelpunktwolke" what means "pixel point cloud" in German
Pixelpunktwolke = np.argwhere(Maskenbild == 255) #"Maskenbild" is my image; here I detect all coordinates of white Pixels
x1=Pixelpunktwolke[:,1] #these are my x-values of my point cloud
y1=Pixelpunktwolke[:,0] #these are my y-values of my point cloud
Thank you for any help!