Page 3 of 3

Re: How to change contrast

Posted: 2012-05-29T16:05:55-07:00
by VanGog
So the syntax in Windows should be

Code: Select all

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?

Re: How to change contrast

Posted: 2012-05-29T19:33:22-07:00
by fmw42
VanGog wrote:So the syntax in Windows should be

Code: Select all

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.

Re: How to change contrast

Posted: 2012-05-30T00:10:25-07:00
by VanGog
Sorry, I don't know how the asterisks got there. I have mistaken some key and then copied.

OK thanks. But the principle of layering is as I shown is it right?

I think I understand you now

Code: Select all

convert sourceimage -fuzz ...%% -fill white -opaque red ^
        -fuzz 4%% -fill white -opaque blue ^
        -fuzz 4%% -fill white -opaque green ^
        -fuzz 4%% -fill white -opaque cyan ^
        -fuzz 4%% -fill white -opaque magenta ^
        -fuzz 4%% -fill white -opaque yellow ^
        -fuzz 4%% -fill white -opaque "color" ^
        -fuzz 4%% -fill white -opaque "color" ^
        -fuzz 4%% -fill white -opaque "color" ^
        -fuzz 4%% -fill white -opaque "color" ^
        -fuzz 4%% -fill white -opaque "color" ^
        -fuzz 4%% -fill white -opaque "color" ^
        -fuzz 4%% -fill white -opaque "color" ^
outputimage

Re: How to change contrast

Posted: 2012-05-30T09:49:27-07:00
by fmw42
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"

Re: How to change contrast

Posted: 2012-05-30T13:15:12-07:00
by VanGog
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

Re: How to change contrast

Posted: 2012-05-30T15:10:15-07:00
by fmw42