Please help me in coding
조회 수: 4 (최근 30일)
이전 댓글 표시
I am new to mathematical morphology. Please help me and tell me how to code the following. The structural elemnt used is of size 7 and α=15.
Let {I(m, n)|m, n ∈ Z} be a digital image; an SE in (2N + 1) × (2N + 1) square window is defined as follows: Si = {I(m + m0, n + n0 ), θi = i × α| − N ≤ m0, n0 ≤ N}
where i = 0, 1, . . . , 4N − 1, α = 180◦/4N, and θi is the direction angle of Si . 1) Produce the proposed SEs Si with regard to the required directional resolution. 2) Apply the selected edge detector function F on the original image using the achieved SEs in 1 and get the subedge image F(I)i . 3) Put the F(I)i obtained in 2) in the following equation to achieve the whole of detected edges:
F(I)∑_(i=0)^(M-1)▒〖w_i 〖F(I)〗_i 〗
where F(I) is the total edge image, M = 180/α is the number of Si and ωi is the assigned weight to each of subedge image. In order to have the same effect of each F(I)i , the assigned weights can be defined as ωi = 1/M.The magnitude of each F(I)i indicates the existing amount of edge information; therefore, it is reasonable, if the F(I)i with greater magnitude participates in constructing F(I) with a larger ωi . Hence, we calculate the weights by
w_i=〖F(I)〗_i/(∑_(i=0)^(M-1)▒〖F(I)〗_i )
댓글 수: 0
채택된 답변
Image Analyst
2012년 2월 5일
I didn't dive into your descriptions completely, but the functions to do morphology are in the Image Processing Toolbox and they are called bwmorph, imerode, imclose, imdilate, imopen, etc. You can make structuring elements by using arrays of ones and zeros (or true and false) or by using the strel() function.
댓글 수: 2
Image Analyst
2012년 2월 6일
I think I told you that, didn't I? "You can make structuring elements by using arrays of ones and zeros (or true and false) or by using the strel() function."
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!