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
Colorize GreyScale image
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Colorize GreyScale image
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
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
convert foot.jpg -colorspace gray rainbow_lut.png -clut foot_rainbow.png
spots -t circle foot_rainbow.png foot_rainbow_spots.png
convert foot_rainbow_spots.png foot_mask.gif -compose multiply -composite foot_processed.jpg
convert foot.jpg -auto-level -threshold 20% -morphology open octagon:1 foot_mask.gif
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
convert foot.jpg -colorspace gray rainbow_lut.png -clut foot_rainbow.png
spots -t circle foot_rainbow.png foot_rainbow_spots.png
convert foot_rainbow_spots.png foot_mask.gif -compose multiply -composite foot_processed.jpg
Re: Colorize GreyScale image
Thank you VERY MUCH FRED!!! I really appreciate your Help!
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Colorize GreyScale image
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
spots -t circle foot_colored.png foot_processed2.jpg
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
spots -t circle foot_colored.png foot_processed2.jpg