"khoo" <firstname.lastname@example.org> wrote in message <email@example.com>...
> below is the function i try to convert the image to 1 Dimensional matric > function b=transform(a) > > [row,column]=size(a); > b=; > > for i=1:row > for j=1:column > b=[b a(i,j)]; > end > end
Why on earth are you trying to convert an image into a 1 dimensional vector? you are correlating 2 histograms - histograms are essentially graphs - in your case angle along the x axis, number of pixels of that angle in y direction. If you have say 256 angles, then each bin represents (2*pi)/256 radians. Thus the histogram will be a vector of 256 numbers, each number representing the number of pixels of that angle.
I suggest you carefully read help hist(), doesn't that default to 10 bins - you will need to have much better resolution than that.
I have had a look at your images, and would have thought they were ideally suited to this methodology.