[Home]
[Edit this page]
[Recent Changes]
[Special Pages]
[Help]
Edge detection
It can be done by applying a filter operation to the image.
The filter typically has size 3x3 with the following values:
Images can have different formats. In the rest of the example I use a grey image with grey values from 0 to 256, of which 0 denotes black and 255 denotes black.
When applying the horizontal edge detection filter to this image:
The central pixel of the resulting, 'filtered' image will have as a result:
This value is beyond the range of the image's grey values.
This is correct: it must be transformed to fit this type of image format.
In this image format, the lowest possible result value is -765 (3 * -255). 765 is the highest possible result value.
The value 384 in this range [-765,765] must be transformed to the image's rang [0,255], which is done by the following formula:
which transforms the value of 384 to 0.75 * 256 = 196
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
Edge detection
(Graphics) Edge detection
Technique applied to images for detection of edges (that is steep color gradients).It can be done by applying a filter operation to the image.
The filter typically has size 3x3 with the following values:
Vertical edge detection filter : | -1 | -1 | -1 | | 0 | 0 | 0 | | 1 | 1 | 1 | Horizontal edge detection filter : | -1 | 0 | 1 | | -1 | 0 | 1 | | -1 | 0 | 1 |
Images can have different formats. In the rest of the example I use a grey image with grey values from 0 to 256, of which 0 denotes black and 255 denotes black.
When applying the horizontal edge detection filter to this image:
| 32 | 96 | 160 | | 64 | 128 | 192 | | 96 | 160 | 224 |
The central pixel of the resulting, 'filtered' image will have as a result:
(32 * -1) + ( 96 * 0) + (160 * 1) = 128
(64 * -1) + (128 * 0) + (192 * 1) = 128
(96 * -1) + (160 * 0) + (224 * 1) = 128 +
------------------------------------------
384
This value is beyond the range of the image's grey values.
This is correct: it must be transformed to fit this type of image format.
In this image format, the lowest possible result value is -765 (3 * -255). 765 is the highest possible result value.
The value 384 in this range [-765,765] must be transformed to the image's rang [0,255], which is done by the following formula:
oldValue - minValue
newValue = ------------------- * 256
maxValue - minValue
which transforms the value of 384 to 0.75 * 256 = 196
'Edge detection' links
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
