Views
1634
Replies
8
Status
Closed
Charles Packer wrote:
Don’t have a package to recommend to you,
but I don’t see where a straight line fit
comes in.
Typically, a simple classification algorithm
finds the centroid coordinates of the sample
sky pixels. Pixels close to this point in
RGB space are then sky. Alternatively, the
algorithm finds the bounding cuboid of the
sample sky pixels. All pixels inside the
cuboid are then sky.
A sophisticated classification algorithm
fits a multivariate (in this case 3-variable:
R, G, B) Gaussian distribution to the sample
sky pixels. (Imagine a ellipsoid with fuzzy
edges.) This is all standard stuff for
remote sensing packages, except that they
typically work with more than three bands.
Don’t know of any that are free, however.
Perhaps others do.
—
Regards,
Martin Leese
E-mail:
Web: http://members.tripod.com/martin_leese/
Consider an RGB image of trees against
sky. I want to remove the sky, i.e. set
each sky pixel to 0,0,0. The fuzzy
selection methods available in GIMP and,
I assume, Photoshop, are manual and
impossibly tedious, especially when
there are multiple areas of sky enclosed
by branches, as in a winter scene.
An algorithm is needed. The intuitive
solution would appear to involve taking
a sample of sky pixels, plotting them in
RGB space, and finding a straight-line fit.
Pixels close to the line will be sky.
The fuzziness of the selection will be
controlled by choosing how far away from
the line to accept.
Don’t have a package to recommend to you,
but I don’t see where a straight line fit
comes in.
Typically, a simple classification algorithm
finds the centroid coordinates of the sample
sky pixels. Pixels close to this point in
RGB space are then sky. Alternatively, the
algorithm finds the bounding cuboid of the
sample sky pixels. All pixels inside the
cuboid are then sky.
A sophisticated classification algorithm
fits a multivariate (in this case 3-variable:
R, G, B) Gaussian distribution to the sample
sky pixels. (Imagine a ellipsoid with fuzzy
edges.) This is all standard stuff for
remote sensing packages, except that they
typically work with more than three bands.
Don’t know of any that are free, however.
Perhaps others do.
—
Regards,
Martin Leese
E-mail:
Web: http://members.tripod.com/martin_leese/
Master Retouching Hair
Learn how to rescue details, remove flyaways, add volume, and enhance the definition of hair in any photo. We break down every tool and technique in Photoshop to get picture-perfect hair, every time.