MATLAB: Hello i am working on a project over leaf recognition.

i have used with largest fitted elipse..Image Processing Toolboxleafleaf tip must in lowerward and tail of the leaf will bw upperward

I need a code for rotating a set of leaves or a leaf where the tip of the leaf should be downward.
In this image the tip and the tail should be in 90 degrees and the tip must be lowerward. Please help me.. I have tried but I am not getting an accurate result. Please help me!

Best Answer

See attached m-file.