|
BITMAP EDGE DETECTOR : Executable or Text Version
In effect draws a pencil outline on top of a picture. You can choose how much colour to preserve from the original, and how heavy a "pencil" to use. The critical routine is written in x86 Assembly Language. It's too slow in pure BASIC. However, I've left a "dummy" procedure at the end of the Text listing, so that people can see how the Edge Detector routine works. In fact, it ooks for a certain (adjustable) minimum rate-of-change in either of the R, G or B values either side of a given pixel. It looks at all 8 pixels and looks for the minimum rate of change in each of the 4 directions through the central pixel.
There's all the jargon you need on the Edinburgh University Dept of Artificial Intelligence website, if you're that way inclined.
SMOOTH : Executable or Text Version
SHARPEN : Executable or Text Version
Take any JPG or BMP, and use the above two facilities to smooth or sharpen the image.
Output is a BMP file saved in the same folder as the source picture. See HERE for mathematical details of the SHARPEN algorithm I've used.
|
|