Canny edge detector: Difference between revisions

Content added Content deleted
Line 673: Line 673:
=={{header|J}}==
=={{header|J}}==
<p>The image is represented as a 2D array of pixels, with first and second axes representing down and right respectively. Array elements represent monochromatic intensity values as integers ranging from 0 (black) to 255 (white). </p>
<p>The image is represented as a 2D array of pixels, with first and second axes representing down and right respectively. Array elements represent monochromatic intensity values as integers ranging from 0 (black) to 255 (white). </p>
<p>Intensity gradient fields are similarly structured. Gradient values are vectors, and are represented here as complex numbers, with real and imaginary components representing down and right respectively. </p>
<p>In the intensity gradient image, fields are similarly structured. Gradient values are vectors, and are represented here as complex numbers, with real and imaginary components representing down and right respectively. </p>
<p>Edge and non-edge points are represented as zeros and ones respectively. Edges are sets of connected points. Edge points within a 3-by-3 region are considered to be connected. Edges are represented as points having a common unique identifier. </p>
<p>Detected edge and non-edge points are represented as ones and zeros respectively. An edge is a set of connected edge points (points adjacent horizontally, vertically, or diagonally are considered to be connected). In the final image, each edge is represented by assigning its set of points a common unique value. </p>
<lang J>NB. 2D convolution, filtering, ...
<lang J>NB. 2D convolution, filtering, ...