color popping

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
dognose
Posts: 265
Joined: 2005-03-08T22:16:37-07:00

color popping

Post by dognose »

I saw this great new color plugin/app that helps "color pop" images. It seems to smartly identify the primary colors / objects in the image and lets you pic which ones are colored. It's even open source.

Image

I'm wondering how I'd reproduce some of these effects in IM. I know how to selectively color an image... I'm not sure how it's identifying the specific objects / colors to focus on. Any ideas?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: color popping

Post by fmw42 »

http://www.indii.org/software/tintii

What does the input image look like? Does it have any color, all color or no color?


Probably finds some color with some fuzz factor, creates mask, enhances the hue and or saturation (-modulate) using the mask and then composites that using the mask with a grayscale version.

But I have not read the manual, yet, which is at manual at http://www.indii.org/archives/640
dognose
Posts: 265
Joined: 2005-03-08T22:16:37-07:00

Re: color popping

Post by dognose »

Yeah, they don't exactly explain how the tech works.. I've tried the app with mixed results.

it seems like a pretty cool effect though, and I see a lot of these images online.. just wondering if their is an easier way to do this.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: color popping

Post by fmw42 »

What does the input image look like? Does it have any color, all color or no color?
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: color popping

Post by Bonzo »

A bit like this ?
Image

Code: Select all

<?php
// Create a new image with everything transparent apart from the selected colour. 
// This image must be saved as a png due to the transparency.
exec("convert ../original_images/bathhat.jpg -matte \\
\( +clone -fuzz 20% -transparent rgb\(38,134,71\) \) \\
-compose DstOut -composite output_hat.png");

// Another tempory image is made from the original but completely grey.
exec("convert ../original_images/bathhat.jpg \\
-colorspace Gray grey_background.jpg"); 

// The two images are combined and flattened into one image.
exec("convert grey_background.jpg -page +0+0 \\
output_hat.png -flatten green.jpg");
 
// The tempory images are deleted.
unlink ('output_hat.png');
unlink ('grey_background.jpg');
?>
A working example here - must be something wrong with my css on this page !
http://www.rubblewebs.co.uk/imagemagick/trials/imap.php
Post Reply