Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
convert sourceimage (clone 0 -fuzz ...%% -fill white -opaque "color")*
(clone 0 -fuzz ...%% -fill white -opaque "color")*
(clone 0 -fuzz ...%% -fill white -opaque "color")*
(clone 0 -fuzz ...%% -fill white -opaque "color")*
(clone 0 -fuzz ...%% -fill white -opaque "color")*
(clone 0 -fuzz ...%% -fill white -opaque "color")*
(clone 0 -fuzz ...%% -fill white -opaque "color")*
(clone 0 -fuzz ...%% -fill white -opaque "color")*
(clone 0 -fuzz ...%% -fill white -opaque "color")*
(clone 0 -fuzz ...%% -fill white -opaque "color")*
(clone 0 -fuzz ...%% -fill white -opaque "color")*
(clone 0 -fuzz ...%% -fill white -opaque "color")*
(clone 0 -fuzz ...%% -fill white -opaque "color")*
-flatten outputimage
Right?
No, not quite. Remove all the clones and parenthesis and the -flatten and use ^ not * for next line with a space before the ^. All the -fuzz .. -fill ... -opaques can be chained on the same image.
If you are not changing the fuzz values for each color, then you can just set it once at the beginning and all the other -fill ... -opaque results will use the same fuzz value. Otherwise, it looks correct. Just put in actual color names, rgb(...) or hex values for the work "color"
I see this job will be yet a lot of work. I must get better quality images because I cannot exactly define borders of road in some areas. I use fuzz 1,2,3 or 4, rarely more. Many colors to define so the process will take long. Also I will need to generate more masks and perform subtract or addition operators between two masks. Because I need to define areas which are road only, and areas which are houses. There should be different edge type. Streets and roads need inward orientated edges, but houses need outward orientated edges + detection of underlaying color. Restated, the lights of road shines to the road but street light do not shine over the houses, nor over forests, water surfaces or fields.
In meantime, You can send me information about functions to add or subtract one mask to/from another