Obviously if we'd use it in practice (in a web-museum ?) all pic's matrices should be precalculated only once and stored in a table with fourty fields v00 ... v93 like:
----------------------------------------------- pic_title v00 v01 v02 ... v93 ----------------------------------------------- bears2.jpg 1234 4534 8922 ... 333 ... ... ----------------------------------------------- Then SQL query will look like this: select top 3 pic_title from table order by abs(v00 - w[0][0]) + abs(v01 - w[0][1]) + ... + abs(v93 - w[9][3]) here w[][] is the matrix of a newly-entering picture. P.S. If someone will encounter 2 apparently unrelated pics but for which ImSim gives value of their mutual diff. *** less than 20% *** please emailed them to me. -- http://mail.python.org/mailman/listinfo/python-list