How is “Joint class histogram” algorithm deploy using Matlab?

Image registration and image retrieval depend on image similarity measure to find mutual information between 2 images. Using histogram, joint histogram, and joint class histogram we can find the degree of similarity between those images. Hopefully, I understand and deploy both first techniques.Here, I found joint histogram algorithm and deploy using Matlab.

For example: this paper was mention this histogram and used as image similarity measurement, but I couldn't found how the authors calculate it.

However, I search for many days to find good paper, book or article regarding joint class histogram but their authors only mention this technique without enough detail. I think this technique still infant and doesn't have enough study yet.

I think joint class histogram algorithm will the best answer for my question.

• Can I please ask you to add a little bit more context information to your question because at the moment, simply asking for the definition of the joint histogram, it would make answers too broad. Adding this information will focus the question and provide opportunity to provide examples. In the meantime, at the very least, see this link and this link. – A_A Dec 5 '16 at 4:11
• As I mention in my question. I understand and deploy joint histogram but I need to know more about joint class histogram. Unfortunately, your links do not answer my question. – Mohammad nagdawi Dec 5 '16 at 7:55
• I added an example for a paper use this technique. – Mohammad nagdawi Dec 5 '16 at 8:12

I get the answer from another source and I deploy like this

% load floating and fix image

%% image segmentation using k-mean clustring.
idx_fix = kmeans(double(fix(:)),4);
idx_float = kmeans(double(float(:)),4);

%% display image segmentation
mat1 = reshape(idx_fix,[],500);%besed on your image size
mat2  = reshape(idx_float,[],500);
imshow(mat1/max(mat1(:))); title('Fix image class');
figure;
imshow(mat2/max(mat2(:))); title('Float image class');

%% Joint class histogram
joint = zeros(5,5);%besed on number of class
for i=1:length(idx_fix)
c1 = idx_fix(i) + 1;%offset matrix by 1 because index start by 1
c2 = idx_float(i) + 1;
joint(c1, c2) =  joint(c1,c2) + 1;
end

If the image aligned correctly the joint class histogram result as a diagonal line. Thanks, Walter Roberson