Please help me in coding
3 次查看(过去 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!