필터 지우기
필터 지우기

how to calculate distance transform using city block filter?

조회 수: 1 (최근 30일)
Muhammad Sohail
Muhammad Sohail 2015년 11월 2일
댓글: Walter Roberson 2015년 11월 2일
i am facing problem to calculate Distance transform of binary images using city block filter. I searched for that but failed.
2nd how can implement a filter without using builtin matlab filter functions. Please help and give me some examples to implement a filter without using builtin function. thanks.

채택된 답변

Walter Roberson
Walter Roberson 2015년 11월 2일
Example:
MyMatrix = rand(19,42) < 0.5; %some data for example purposes
D = bwdist(MyMatrix, 'cityblock');
2) Read this
3) Look at the bottom of the above link. It says
For cityblock, chessboard, and quasi-Euclidean distance transforms, bwdist uses the two-pass, sequential scanning algorithm described in
[2] Rosenfeld, Azriel and John Pfaltz, "Sequential operations in digital picture processing," Journal of the Association for Computing Machinery, Vol. 13, No. 4, 1966, pp. 471-494.
  댓글 수: 2
Muhammad Sohail
Muhammad Sohail 2015년 11월 2일
Thanx Walter for replying. But what i was looking for, getting the distance transform without using bwdist function. what would be the process to implement city block filter manually without using builtin function. thanks
Walter Roberson
Walter Roberson 2015년 11월 2일
Use the two-pass, sequential scanning algorithm described in
[2] Rosenfeld, Azriel and John Pfaltz, "Sequential operations in digital picture processing," Journal of the Association for Computing Machinery, Vol. 13, No. 4, 1966, pp. 471-494.

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

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by