to make 5 image to be an unit using histogram
Mostra commenti meno recenti
Can help me?
How do I take 5 grayscale images, which have the different size/dimensions, be an unit using histogram?
My image grayscale:
for i = 1:5
citra1{i} = imread(['D:imageGray\' num2str(i) '.jpg']);
end
thank you for help.
5 Commenti
Image Analyst
il 14 Gen 2013
Please explain better. What does the histogram have to do with anything? What is "an unit"? Do you mean a single variable, such as a cell array? If so, then what is wrong with the way you did it?
Walter Roberson
il 14 Gen 2013
Do you mean that you want to use the images as what is drawn for the histogram instead of bars? The way sometimes magazines illustrate using (for example) stacks of '$' signs?
$
$ $
$ $ $
$ $ $
Dian Permatasari
il 15 Gen 2013
Image Analyst
il 15 Gen 2013
That's not the error for that code. Your code is:
OneCitra=([citra3{1} citra3{2} citra3{3} citra3{4} citra3{5}]);
but the error refers to a citra1, not citra3:
OneCitra=([citra1{1} citra1{2} citra1{3} citra1{4} citra1{5}]);
You have to make sure that when you give an error message you give the actual code that generated the error message.
Dian Permatasari
il 15 Gen 2013
Risposta accettata
Più risposte (1)
Image Analyst
il 15 Gen 2013
The problem is that when you do something like
OneCitra=([citra3{1} citra3{2} citra3{3} citra3{4} citra3{5}]);
you have to make sure that the array inside citra3(1) has the same number of rows as the arrays inside all the other cells. Evidently your images have different sizes. When you use braces like citra3{1}, it means the "contents" of the cell, in other words, the actual array itself contained in the first cell of citra3. If you use parentheses, citra3(1), it means the first cell itself, not the contents of the cell. So citra3(1) is a cell, and citra3{1} is a 2D uint8 matrix (not a cell).
Categorie
Scopri di più su Data Distribution Plots in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!