I have EL images of a solar panel taken from EL camera I have to align ,straighten and crop the useless black parts on all sides of the el image so that I can further use the corrected image .I have to make a generalize code so that if we put any image it gets straight .
I have tried the rotation it rotated a bit but I can not crop black sides and straight it .