I have a stepped gradient with five steps, i need to orient it such that the lightest side is at the top, the darkest is at the bottom and that the step lines are parallel
Is there a good known method for this? Or do i have to run some edge detection and rotate from that?
The lines aren't necessarily parallel to the edges of the image, this is what i want to correct for