Image Analysis algorithms using Affine and Random Sample Consensus methods