problem of creating a matrix using the calculated cooccurrence matrix features;
조회 수: 9 (최근 30일)
이전 댓글 표시
these are the steps of my programme
- read the original image
- sub divide the image to 4096 bloks of 4*4( mat2cell() )
- for each sub image apply the graycomatrix() and graycoprops(I,'Contrast')
- for each sub image it gives the answer like this contrast: 23
- now I want to input all the 4096 values into single matrixif you know the answer pls help me.
댓글 수: 0
답변 (1개)
Image Analyst
2013년 9월 9일
Just index an array in the loop
allTheContrasts = zeros(1, numberOfBlocks); % Initialize
for k = 1 : numberOfBlocks
% Calculate contrast via graycoprops or whatever.
thisContrast = .......
% Then save this block's contrast into an array.
allTheContrasts(k) = thisContrast;
end
pretty similar to the FAQ: http://matlab.wikia.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!