Colorize GreyScale image

A plethora of command-line scripts that perform geometric transforms, blurs, sharpens, edging, noise removal, and color manipulations.
Post Reply
cheblog
Posts: 3
Joined: 2013-12-24T09:59:06-07:00
Authentication code: 6789

Colorize GreyScale image

Post by cheblog »

Hello Fred!
Could you help me or give me an advice on how to get this ?

http://blog.mallofamerica.com/wp-conten ... 89x313.jpg

From This ?

http://farm6.static.flickr.com/5172/546 ... 663cf1.jpg

I have a foot scanner and need to create an analysis of the pressure and force distribution of the foot.

I have been reading Color Replace and CLUTs, even your TRICOLORIZE script but Im not having the results
i need.

Could you help me? Thanks!

Marcelo
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Colorize GreyScale image

Post by fmw42 »

Given the real foot image, you can false color a grayscale version of it using a rainbow gradient and -clut. But the false color rainbow will not necessarily correlate with real pressure points. You will need to create a binary mask to keep the outside black. See http://www.imagemagick.org/Usage/color_mods/#clut. To create the dot pattern, you could use my script, spots at the link below. To create the rainbow, see http://www.fmwconcepts.com/imagemagick/ ... hp#rainbow



convert foot.jpg -auto-level -threshold 20% -morphology open octagon:1 foot_mask.gif

Image


convert xc:black xc:red xc:orange xc:yellow xc:green1 xc:cyan xc:blue xc:blueviolet xc:black +append -filter Cubic -resize 600x30! -flop rainbow_lut.png

Image


convert foot.jpg -colorspace gray rainbow_lut.png -clut foot_rainbow.png

Image


spots -t circle foot_rainbow.png foot_rainbow_spots.png

Image


convert foot_rainbow_spots.png foot_mask.gif -compose multiply -composite foot_processed.jpg

Image
cheblog
Posts: 3
Joined: 2013-12-24T09:59:06-07:00
Authentication code: 6789

Re: Colorize GreyScale image

Post by cheblog »

Thank you VERY MUCH FRED!!! I really appreciate your Help!
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Colorize GreyScale image

Post by fmw42 »

This is a bit more efficient.


convert foot.jpg -colorspace gray \
\( xc:black xc:red xc:orange xc:yellow xc:green1 xc:cyan xc:blue xc:blueviolet xc:black +append -filter Cubic -resize 600x30! -flop \) \
-clut \
\( -clone 0 -auto-level -threshold 20% -morphology open octagon:1 \) \
-compose multiply -composite foot_colored.png

Image

spots -t circle foot_colored.png foot_processed2.jpg

Image
Post Reply