Image matching algorithm based on a local photometric and geometric data