automask 4 color

Discuss digital image processing techniques and algorithms. We encourage its application to ImageMagick but you can discuss any software solutions here.
Post Reply
User avatar
bazza
Posts: 20
Joined: 2016-06-15T18:06:36-07:00
Authentication code: 1151
Location: Argntina

automask 4 color

Post by bazza »

I wish to arm one chewed automatic to make use of fast-neural-doodle

Image

Image

Image

Image

I found http://www.fmwconcepts.com/imagemagick/kmeans/index.php but it does not give the possibility to choose the palette and does not do median
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: automask 4 color

Post by fmw42 »

arm one chewed
I am sorry, but I do not understand this.

My kmeans script allows you to choose a set of colors and then does kmeans adjustment of the colors.

If you want an exact color palette mapping see -remap http://www.imagemagick.org/Usage/quantize/#remap with -dither none.
User avatar
bazza
Posts: 20
Joined: 2016-06-15T18:06:36-07:00
Authentication code: 1151
Location: Argntina

Re: automask 4 color

Post by bazza »

sorry.

generator mask to image
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: automask 4 color

Post by snibgo »

I don't understand what you want. Perhaps you want to transform the gray images to the coloured ones. Windows BAT syntax:

Code: Select all

%IM%convert ^
  bg.png ^
  -colorspace Gray ^
  -blur 0x5 ^
  ( -size 10x1 xc:Lime ^
    -size 10x1 xc:Blue ^
    -size 10x1 xc:Red ^
    -size 70x1 xc:Yellow ^
    +append ) ^
  -clut ^
  fnd_out.png
Image
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: automask 4 color

Post by fmw42 »

I think you have to manually modify the second mask from the first yourself in some tool such as GIMP or Photoshop as is done in https://github.com/alexjc/neural-doodle.
User avatar
bazza
Posts: 20
Joined: 2016-06-15T18:06:36-07:00
Authentication code: 1151
Location: Argntina

Re: automask 4 color

Post by bazza »

snibgo wrote: 2017-03-11T16:36:08-07:00 I don't understand what you want. Perhaps you want to transform the gray images to the coloured ones. Windows BAT syntax:

Code: Select all

%IM%convert ^
  bg.png ^
  -colorspace Gray ^
  -blur 0x5 ^
  ( -size 10x1 xc:Lime ^
    -size 10x1 xc:Blue ^
    -size 10x1 xc:Red ^
    -size 70x1 xc:Yellow ^
    +append ) ^
  -clut ^
  fnd_out.png
Image
thanks!!!
User avatar
bazza
Posts: 20
Joined: 2016-06-15T18:06:36-07:00
Authentication code: 1151
Location: Argntina

Re: automask 4 color

Post by bazza »

result:
Image
Post Reply