Here is my command line code:
original
convert original.jpg \
\( -clone 0 -modulate 100,0,100 \) \
\( -clone 1 -negate -blur 0x4 \) \
\( -clone 1 -clone 2 -compose color_dodge -composite -level 25x100% -write original_sketch_gray.jpg \) \
\( -clone 3 -clone 3 -compose multiply -composite \) \
\( -clone 0 -modulate 100,200,100 \) \
-delete 0-3 -compose screen -composite original_sketch2.jpg
The intermediate grayscale sketch from the -write step
Note in the last step I had to use -compose screen rather than -compose colorize as the IM -compose colorize and luminize seem to do something different than what Photoshop does with color and luminosity blend. Note these are complements, that is if the images are swapped you change from one to the other. To compensate and bring out more color I use -modulate in the step before it to enhance the saturation.
see
http://photoblogstop.com/photoshop/phot ... -explained
OK, I have a feeling that IM is using HSB colorspace to do the -compose colorize/luminize and it should be using -colorspace HSL. So I wrote my own manual swapping of the lightness with the grayscale image in HSL colorspace. Which is what photoshop says it does with blend of luminosity.
convert original.jpg \
\( -clone 0 -modulate 100,0,100 \) \
\( -clone 1 -negate -blur 0x4 \) \
\( -clone 1 -clone 2 -compose color_dodge -composite \) \
\( -clone 3 -alpha set -channel a -evaluate set 50% +channel \) \
\( -clone 3 -clone 4 -compose multiply -composite \) \
-delete 1-4 \
\( -clone 0 -colorspace HSL -channel RG -separate +channel +swap \) \
-delete 0 -reverse \
-set colorspace HSL -combine -colorspace sRGB -modulate 100,150,100 \
original_sketch10.jpg
This is a bit better especially in the flower area. But, note I still had to use modulate to emphasize the coloring.