Please help me in coding
Show older comments
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 )
Accepted Answer
More Answers (0)
Categories
Find more on Morphological Operations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!