Rank: 92285 based on 0 downloads (last 30 days) and 0 file submitted
photo

Jess

E-mail

Personal Profile:

 

Watch this Author's files

 

Comments and Ratings by Jess View all
Updated File Comments Rating
20 Feb 2014 The Seven Invariant Moments Calculates the Seven Invariant Moments in terms of centralized Moments Author: MATLABacademy

30 May 2012 Image retrieval - Query by Example Demo This demo provides a simple query by image example method, based on HSV values. Author: Theodoros Giannakopoulos

Hi Muhammad Imran,

It won't help in your understanding by explaining line-by-line. Try running the command in Matlab workspace and utilize the plot/imshow etc to display the changes for each step. You will be able to understand how the code work and learn Matlab at the same time. For concepts learning, search related literature.

22 May 2012 Image retrieval - Query by Example Demo This demo provides a simple query by image example method, based on HSV values. Author: Theodoros Giannakopoulos

Hi Muhammad Imran,
"modelName" is the name of a variable. Author provided model1Hist.mat as training data (generate own training data using getImageHists.m). Refer to documentation on how to properly run the command. For example,
searchImageHist('beach.JPG','model1Hist',5);

29 Apr 2011 Color Image Histogram Display a histogram showing the color balance of an image. Author: Jeff Mather

My modification on Jeff's initial code (including comment by Tomasz). Now input image & histogram derived are display in same figure window.

function rgbhist(I)
%RGBHIST Histogram of RGB values.

if (size(I, 3) ~= 3)
error('rgbhist:numberOfSamples', 'Input image must be RGB.')
end

nBins = 256;

rHist = imhist(I(:,:,1), nBins);
gHist = imhist(I(:,:,2), nBins);
bHist = imhist(I(:,:,3), nBins);

%hFig = figure;

figure
subplot(1,2,1);imshow(I)
subplot(1,2,2);

h(1) = stem(1:256, rHist); hold on
h(2) = stem(1:256 + 1/3, gHist);
h(3) = stem(1:256 + 2/3, bHist);
hold off

set(h, 'marker', 'none')
set(h(1), 'color', [1 0 0])
set(h(2), 'color', [0 1 0])
set(h(3), 'color', [0 0 1])
axis square

28 Apr 2011 Image retrieval - Query by Example Demo This demo provides a simple query by image example method, based on HSV values. Author: Theodoros Giannakopoulos

Addition to ampire Ê (20 May 2009), can provide user with flexibility to select any directory (with images) by adding one line after the function name.

>function getImageHistsDir

DirName = uigetdir();

>D = dir(DirName);
>count = 0;
>
>for (i=3:length(D))
> if ((strcmpi(D(i).name(end-3:end), '.jpg')==1) | (strcmpi(D(i).name(end-3:end), '.jpeg')==1))
> count = count + 1;
> >Hists{count}=getImageHists([DirName '\\' D(i).name]);
> files{count}=[DirName '\\' D(i).name];
> fprintf('%.4d File %40s computed...\n',count,files{count});
> end
>end
>savefile='mydatabase';
>save (savefile, 'files', 'Hists')

Contact us