Can anyone suggest good algorithms for CBIR?
A luminosity histogram (especially one that is separated into RGB components) is a reasonable fingerprint for an image - and can be implemented quite efficiently. 


Subtracting one histogram from another will produce a new historgram which you can process to decide how similar two images are.
Histograms, because the only evaluate the distribution and occurrence of luminosity/color information handle affine transformations quite well. 
Luminosity histograms produce false negatives when the color information in an image is manipulated.