Edge Detect by Brightness Level and Hue Difference
Where there is a brightness difference between adjoining pixels, it might be perceived as part of an edge. There are some standard, or widely-used, mechanisms for edge detection, see my page
Edge Detection Scripts. The method often recommended, that devised by J. F. Canny in 1986, looks at adjoining brightness differences but it does that in an absolute fashion. This page is more selective, with the aim more of identifying shapes, rather than drawing a line around every shape. More about this on
Edge Detection Scripts.
Select any number of points on the table of 256 brightness levels, or this can be done automatically where the software will identify equal number of brightnesses among the pixels in the image. Each selection therefore forms a band, from the lower brightness level selected to itself. For each pixel, the script identifies the band that its brightness falls in, as is the band of the pixel to the right of it and that immediately below it on the image, the higher of the differences between these two, i.e. the one to the right and the one below, and the brightness of the pixel being looked at, provides a value between 0 and 255, this value is used to determine the opacity of the output pixel, the higher the value the more opaque, with its colour being that which is given as the top of the band by the user.
That sounds a little complex, though is in fact more difficult to explain that it is to code, the code is quite concise. And it seems to work very well, and be quite flexible in getting towards the determination of shapes. It is somewhat different from the approach taken by Canny and those who have extended his work, but works better for what I am trying to achieve.
Copyright: many of my photos have a
Creative Commons ShareAlike attribution, you can do what you like with them but I ask that you credit me for the pic. Be careful with other people’s photos, do not reproduce them unless you have permission.
heres de return div