Finally figured out how to extract features using MATLAB tools. Do not give the edge detected image as the input. Give the image that has been segmented as an input. SURF feature detector will find the necessary features and tell us how much affine transformation has been applied to the image.