to make 5 image to be an unit using histogram
이전 댓글 표시
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
Image Analyst
2013년 1월 14일
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
2013년 1월 14일
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
2013년 1월 15일
Image Analyst
2013년 1월 15일
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
2013년 1월 15일
채택된 답변
추가 답변 (1개)
Image Analyst
2013년 1월 15일
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).
카테고리
도움말 센터 및 File Exchange에서 Data Distribution Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!