Canny edge detector: Difference between revisions

Line 676:
Edge and non-edge points are represented as zeros and ones respectively. Edges are sets of connected points. Edge points are considered to be connected if within a 3-by-3 region (or if they are connected to a common third edge point). Edges are represented as points having a common unique identifier.
<lang J>
 
ToDo: [figure out how to] upload the images ...
[[Image:image0_j.jpg|right]image0]
[[Image:image1_j.jpg|right]image1]
[[Image:image2_j.jpg|right]image2]
[[Image:image3_j.jpg|right]image3]
[[Image:image4_j.jpg|right]image4]
[[Image:image5_j.jpg|right]image5]
 
NB. 2D convolution, filtering, ...
 
Line 749 ⟶ 758:
Image file libraries for different image formats import into and export from a generalized data structure, an array of pixels with three or four color channels. The following code invokes these standard libraries, and also converts between the import format and the monochromatic representation used here for edge detection.
<lang J>
 
[[Image:image0_j.jpg|right]image0]
[[Image:image1_j.jpg|right]image1]
[[Image:image2_j.jpg|right]image2]
[[Image:image3_j.jpg|right]image3]
[[Image:image4_j.jpg|right]image4]
[[Image:image5_j.jpg|right]image5]
 
load'canny.ijs'