I have divided image into 30 blocks and obtained histogram of each block using LBP algorithm, i do not know how to store them separately and merge all histogram to get the single histogram?I want code for merging and saving each histogram of block.

If I create array of Histogram then it gives me error that Subscripted assignment dimension mismatch. so please help me.

5 Comments

You forgot to attach your m-file. Change it to use a standard MATLAB demo image file first.
Actually I am working on sketches so i can not use the Demo image. Actually I trying to match sketch with image using pyramid match kernel(PMK) technique. But I Even Do not know how to perform PMK? so please help me.
If you want then I can send you my .m file. Sorry I also Want to Know how to create .mat file because I am using Matlab R2011-a Version and in that i can not find any function to create .mat file. Thank you for your response. Please help me.
Please just help me to concatenate all histogram of an image into single histogram., and how to create .mat file in R2011a version of matalb??
I do not have any idea about merging/concatenation of histograms. so your help is of great importance to me. I am doing project on this so I expect that you reply as son as possible.

Sign in to comment.

 Accepted Answer

Create a mat file with the save() function. You can attach your actual image with the paper clip icon if your code can only work with that kind of image. To add histograms, do this
sumHist = hist1 + hist2; % Must have same number of bins. hist1 can be sumHist if you want.

9 Comments

Thanks a lot image analyst!!!!!! It works well as expected...... Thank you very much...
I have tried the save function to create the .mat file but I am getting the following error.
Warning: Variable 'imgs' cannot be saved to a MAT-file whose version is older than 7.3. To save this variable, use the -v7.3 switch. Skipping...
I want to store colour images its histogram in the .mat file. So tell me the form of histogram i.e. imhist,hist,stem etc.... Please also inform me in which form should I store histograms in .mat file. Give me code please.
Store the histogram - the counts. It makes no difference how the counts were plotted/graphed/displayed in your GUI, like whether you used stem(), bar(), plot() or whatever.
[counts, grayLevels] = imhist(grayImage, 256);
save(matFileName, 'counts', 'grayLevels');
.mat file is working fine. But I need to save histograms of 100 images for time being. Because I may require to store more images. so how to do that?? I mean I will use the loop but how to save histograms of 100 images in .mat file??
I have 100 images in the folder. so how I loop through it so that I can save all 100 histograms in .mat file?? Thank you
Can you please also help me for implementing the spatial pyramid matching kernel?? I mean I don't have any idea about its implantation that how I should proceed?? So please help me for these two implementation i.e. spatial pyramid matching and one I already asked about .mat file in above comment.
Thanks in advance. You really helped me. Now just I have these two things need to implement. I hope you also help me for that as well.

Sign in to comment.

More Answers (1)

Hi there. I'd suggest to have the histograms concatenated via Matlab CAT command. masterHist=cat(1, hist1, hist2,...hist30);
I believe a similar scheme is proposed for face detection in "Face Description with Local Binary Patterns: Application to Face Recognition", http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1717463
Best regards, Nikolay

Tags

Asked:

on 29 Dec 2013

Answered:

on 16 Mar 2015

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!