calculate correlation between the blocks

조회 수: 6 (최근 30일)
angel
angel 2013년 3월 29일
i've divided the image into 16x16 blocks i.e total of 256 blocks.
now i want to calculate the correlation between the blocks...
can anybody help me...
  댓글 수: 4
Matt J
Matt J 2013년 3월 29일
편집: Matt J 2013년 3월 29일
I repeat, how do you define correlation between blocks? Will the result for each pair of blocks be a scalar or something else? If you have 2 blocks will xcorr2(block1,block2) give you the correlation in the form that you want?
angel
angel 2013년 3월 30일
scalar value sir...i.e single value..

댓글을 달려면 로그인하십시오.

채택된 답변

Matt J
Matt J 2013년 3월 29일
Blocks=mat2tiles(grayImage,[16,16]);
data=cellfun(@(x)x(:)-mean(x(:)), Blocks, 'uni',0 );
data=[data{:}];
Correlations = data.'*data;
Here, Correlations(i,j) is the correlation (my definition) of the i-th and j-th block. I'm not sure if this suits your definition (see my comments above).
  댓글 수: 4
Matt J
Matt J 2013년 3월 30일
Undefined function 'mat2tiles' for input arguments of type 'uint8'.
You were meant to download mat2tiles from the link I gave you.
now guide me how to calculate correlation between these blocks????
This is the third time you've neglected to define what you mean by "correlation". Show us how you would compute the correlation of 2 blocks in some simplified example and explain what problem you're having extending it to many blocks.
angel
angel 2013년 4월 8일
편집: angel 2013년 4월 8일
yet i've not calculated correlation but my idea behind this is:
correlation=corr2(block1,block2);
now tell me how to calculate the correlation of these:
block 23, block 34 and block 67 having glcmLR value is 3
block 56, block 78 having glcmLR value let say 7
block 89, block 32 and block 43 having glcmLR value 2
can anybody tell me how to do this

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by