decide on concave/convex for every point  already in edge_detection-step using sign of second derivative.