hello dnair,
i have trie with your materials and i found that it has a noise in target matched image histogram(what we are finding)which is not exactly matching the histogram Matrice of Reference Image,the target matched histogram values has goes to zero after 18 intervals and some to next 15th interval and next 11th interval and also it resembles that just only data shift of target histogram,
ok,but for the reference is Bright image of object and target is dark image of same object and same size,the targetmatched image has all the following criteria and but image resembles,but for if the refernce is dark image of object and target image is bright image of same object and same size,the targetmatched image has light resmble but some noise and blurred and i have attached the picture image with this