You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think task4: double_threshold has an error that we should use x, y to check the neighbors which might be a strong edge pixel.
Following is my correct version and it works.
foriinindex_weak_edge_pixel:
x=i[0]
y=i[1]
if(x>0andy>0andx<511andy<511):
north= (x-1, y)
south= (x+1, y)
east= (x, y+1)
west= (x, y-1)
north_east= (x-1, y+1)
north_west= (x-1, y-1)
south_west= (x+1, y-1)
south_east= (x+1, y+1)
# check if any of the 8 neighbors is a strong edge pixelif((strong_edge_pixel[north] >0) or
(strong_edge_pixel[south] >0) or
(strong_edge_pixel[east] >0) or
(strong_edge_pixel[west] >0) or
(strong_edge_pixel[north_east] >0) or
(strong_edge_pixel[north_west] >0) or
(strong_edge_pixel[south_west] >0) or
(strong_edge_pixel[south_east] >0)):
final_image[x][y] =1# classify the pixel as an edge pixel
I just notify if others want to use this code and thanks author for this great work!
The text was updated successfully, but these errors were encountered:
I think task4: double_threshold has an error that we should use x, y to check the neighbors which might be a strong edge pixel.
Following is my correct version and it works.
I just notify if others want to use this code and thanks author for this great work!
The text was updated successfully, but these errors were encountered: