Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Histogram matching

hi,

i am beginner for imaq,i want to know the histogram matching algorithm can anyone guide me, i have already referred Gonzalez for histogram equalisation and Specification,i founded the Cumulative distribution for both the images want to match and reference images from the histograph and how can i proceed after that.


eagerly awaiting,
timemachine
0 Kudos
Message 1 of 9
(5,728 Views)
Hello timemachine,

Thank you for using our discussion forum. If you are just trying to compare two images for differences, the following discussion forum post describes different procedures you can follow:

Compare Images
http://forums.ni.com/ni/board/message?board.id=200&message.id=2557&requireLogin=False

If you are looking for the presence of a pattern in an image, as a part of our IMAQ Vision Development Module we offer Pattern Match VIs that can be used for this purpose. If you already have IMAQ Vision I would recommend starting of with the Vision Assistant to prototype you system. I hope this helps you out.

Nipun M
Applications Engineer
National Instruments
0 Kudos
Message 2 of 9
(5,711 Views)
timemachine,

Do the following to create a lookup table that maps pixels in the match image to a
new image whose histogram will approximately match the histogram of the reference image:

If reference cumulative distribution is denoted by cdf_r and the match cumulative
distribution is denoted by cdf_m

for i = 0 to 255
find j where cdf_r[j] >= cdf_m[i] (j ranges from 0 to 255 for 8-bit images)
lookup_table[i] = j


I've attached a simple histogram matching example that does this.
Hope the example helps.

Dinesh
Message 3 of 9
(5,658 Views)
thanks dnair,

i will try with this and reply u immdly,

with regards,
timemachine
0 Kudos
Message 4 of 9
(5,596 Views)
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
0 Kudos
Message 5 of 9
(5,549 Views)
0 Kudos
Message 6 of 9
(5,548 Views)
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
0 Kudos
Message 7 of 9
(5,532 Views)
timemachine,

You will get some rounding of errors when matching histograms.
Can you attach the your images to this posting or email them to me?

dnair
0 Kudos
Message 8 of 9
(5,519 Views)
thank u for reply dnair,


i will send it to your mail id please send ur mail id,or my mail is manikarthi.s@rediffmail.com
0 Kudos
Message 9 of 9
(5,517 Views)