how can we find distance between two image blocks?

3 ビュー (過去 30 日間)
angel
angel 2013 年 5 月 3 日
コメント済み: Image Analyst 2018 年 10 月 21 日
i've divided the image into overlapping blocks.... i've calculated the correlation of these blocks with each other..
now i want two calculate the distance between these blocks like
distance between block 2 ans block 3.
block2=[24 42;107 110];
block3=[25 24; 55 56];
i've used the formula as:
distance=norm(block2-block3);
i got the following error
Undefined function 'norm' for input arguments of type 'uint8'.
how this type of error can be eliminated?
plz help me

採用された回答

Image Analyst
Image Analyst 2013 年 5 月 3 日
Cast both to double first. You need to do that anyway, because uint8 does not allow negative numbers, while a subtraction requires it.

その他の回答 (1 件)

HABTE TADESSE LIKASSA
HABTE TADESSE LIKASSA 2018 年 10 月 21 日
編集済み: Image Analyst 2018 年 10 月 21 日
norm_two = 8*norm(Y, 2)
Undefined function 'norm' for input arguments of type 'uint8'
How can I solve this please?
  1 件のコメント
Image Analyst
Image Analyst 2018 年 10 月 21 日
Review my answer above.
Cast Y to double first.

サインインしてコメントする。

Community Treasure Hunt

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

Start Hunting!

Translated by