The method for matching a scanned image seems adequately explained in the paper and could be translated from theory into perl.
However, call me skeptical but I just don't believe the implication in the paper that the same techniques can reliably produce the stated results for a painted query image. Any credible attempt to interpret such an image would need to transform the data in terms of human perception and the suggested paper has not even gone in the right direction for this. Such modelling belongs more properly in the field of psychology and psychotherapy, but can describe the concepts the program needs to aim at when transforming the painted query image and reference image for comparison. See 'Metaphors in Mind: Transformation through symbolic modelling' - http://www.alibris.com/search/detail.cfm?S=R&isbn=0953875105&qsort=p