Kraellin
![]() |
how do i extract a particular color from an image imported into FF? i dont want to just extract it as a full image; i want to extract JUST that color, or range of colors, to a final result or another component exactly where it already is in the image and have it be exactly where it currently is geographically in the image, into the result component or another component.
the reverse way of saying this could be to erase everything in the image but where that one color/hue (or range of colors and hues)is. a very simple example of this would be let's say i have a tile component (or brick or whatever) and i have a 'source' image connected into it and i want to erase all but the black in that image or all but the reds or all but the blues or a range of color(s) and hues. i can convert the image to black and white and do it, but i havent found a way to do it with color and i want to do it with color. all of the current extraction components erase by a whole set of things and it's very difficult, if not impossible to narrow this down much, at least in a way that i want. i can come somewhat close with combinations of things like levels, threshold, blend and set alpha, but not quite. i cant control it closely enough. i would think a welcome addition to FF components would be some sort of erase component that would do this. in fact, i think you could make several; one based on color, one on black and white, one on opacity and maybe more i'm not even thinking of yet. or perhaps the set alpha could be expanded to do this with some extra internal controls to erase those bits you dont want. i do not want to use masking techniques here, like are used to make some of the other geographic based techniques. in other words, i dont want to cover a whole bunch of areas of the image with white or black or some other image part. i want to erase to a given opacity and only have left the parts i want left based on their color/hue. hope all that makes sense ![]() Craig If wishes were horses... there'd be a whole lot of horse crap to clean up!
Craig |
|||
Posted: October 31, 2006 8:59 pm | ||||
Richard Bartlett |
It's not entirely clear what it is you are trying to do but I think I get the jist of it. How's this for a starting point...
Color Isolate.ffxml |
|||
Posted: October 31, 2006 11:12 pm | ||||
Kraellin
![]() |
richard,
sorry, i guess that wasnt very clear. if i have an image which i've opened in FF, i simply want to erase everything but a certain color, regardless of which color it is. i want to be able to pick a color and erase everything but that. it would also be great if i could pick a range of hues of that color and erase everything but those. your color isolate filter did some good things and gave me some more ideas, but i still cant do it reliably. i'm also curious how the set alpha component works. i mean, i understand the source and new, but it seems a bit odd at times how thngs get converted. what determines what gets converted to opaque and what transparent? Craig If wishes were horses... there'd be a whole lot of horse crap to clean up!
Craig |
|||
Posted: November 1, 2006 9:52 pm | ||||
Richard Bartlett |
I'm lost here. According to your description, even in your latest post, the filter meets your requirements.
Elaborate on what you mean by erase. Do you want to desaturate portions of the image? Do you want to do a bit of color math via subtraction? As far as set alpha, look at the source for that component in the filter I posted. Compare it to what you see as a result. Notice how the black portions of the source become transparent and the white parts opaque. |
|||
Posted: November 2, 2006 12:02 am | ||||
Kraellin
![]() |
richard,
thanks for staying with me here. what i meant by erase is turn transparent. so, if pick color X as the color i want to save, everything else would become transparent. your filter seems to work in reverse and by picking the color i want in yours, that seems to be the one that goes transparent. now, if i add a checkbox control on the 'invert' and 'invert alpha' options, to both the extract HLS and set alpha components and have them checked, that's pretty darn close to what i wanted! in fact, that may be it! i've limited time in the morning here, so i'll play with it some more this afternoon, but that really does look like it. can you do it with a range of colors? have a range, like all the reds saved, while all the rest of the image goes transparent? maybe add an impulse curve component to pick a range or colors to save? i'm attaching a modified file showing the invert checkboxes. Craig Color Isolate 2.ffxml If wishes were horses... there'd be a whole lot of horse crap to clean up!
Craig |
|||
Posted: November 2, 2006 8:40 am | ||||
Vladimir Golovin
Administrator |
Sounds like a good idea for a component. Something like this:
Replace Color: Map Component - Source (required map) - Old Color (color) - New Color (color) - H Range (slider) - L Range (slider) - S Range (slider) - Softness (slider) - Invert Mask (checkbox) |
|||
Posted: November 2, 2006 11:46 am | ||||
Crapadilla
![]() |
Most badly wanted! Some basic chroma-keying would definitely be nice ![]() --- Crapadilla says: "Damn you, stupid redundant feature requests!" ;) |
|||
Posted: November 2, 2006 12:42 pm | ||||
Crapadilla
![]() |
And while we are on the topic of new components, one could also imagine a kind of wand selection component that uses a user supplied image coordinate (X/Y image size percentages?) and a threshold value to extract a precise mask from a certain image area. After all, chroma-keying can be quite insensitive...
[Daydreaming... And what if one hooked that wand mask extraction component into that particle bomber that is rumored to be in the works... hmmm... maybe...] --- Crapadilla says: "Damn you, stupid redundant feature requests!" ;) |
|||
Posted: November 2, 2006 1:00 pm | ||||
Kraellin
![]() |
ok, playing with this some more. here's as close as i've been able to come so far. this is a variation of the original color isolate. the original image is my rose picture. the one posted here is the color isolate image.
Craig ![]() If wishes were horses... there'd be a whole lot of horse crap to clean up!
Craig |
|||
Posted: November 2, 2006 2:20 pm | ||||
Kraellin
![]() |
||||
Posted: November 2, 2006 2:21 pm | ||||
Kraellin
![]() |
as you can see, i got most of the reds, but not all.
one possible solution i havent tried yet would be to make more than one algorithm or sub-tree of the same routine. pick one color for one and another for the other and then do a blend of the two after 'set alpha'. that might give me the range control i'm looking for and then be able to pick up all the shades of red. and vlad, if those H L S swtiches are for determining what will be allowed to show in the new image based on what's there in the old image, then i'm all for it. Craig If wishes were horses... there'd be a whole lot of horse crap to clean up!
Craig |
|||
Posted: November 2, 2006 2:27 pm | ||||
Richard Bartlett |
I've submitted a slightly altered version of the filter.
Instead of trying to isolate the region using threshold, I've switched to using the hue channel as the elevation for an elevation gradient. The reason for this change was because the hue channel of a spectrum is the same as a black and white gradient. This may offer some means to deal with a range of colors although the solution illudes me at this point. I'll keep you posted if I think of something. |
|||
Posted: November 2, 2006 11:43 pm | ||||
Kraellin
![]() |
richard,
i tried it out and have incorporated it into one of my filters. the upgrade is nice and works better than its predecessor. i find it a fascinating effect. to be able to extract one portion of an image, extract another portion, and treat each within the filter as separate images and then combine them back with a blend is really quite powerful. i do hope vlad can come up with a simpler component that would do all of this easier. it's basically like being able to mask. i can 'mask' out part of the image and treat just that part with another leg of the filter and them combine this back with the original. it's also like an extraction tool. if you're doing composite imaging, having good extractions is essential. so, thank you! and i'll keep working on this also. Craig If wishes were horses... there'd be a whole lot of horse crap to clean up!
Craig |
|||
Posted: November 6, 2006 3:23 pm | ||||
Vladimir Golovin
Administrator |
That would require a pixel image as an input, and this doesn't mix well with Filter Forge's sample-based architechture. Plus the fact that the Wand component would have to render its source subtree as a bitmap will degrade the resulting output quality. |
|||
Posted: November 7, 2006 3:48 am |
Filter Forge has a thriving, vibrant, knowledgeable user community. Feel free to join us and have fun!
33,715 Registered Users
+5 new in 7 days!
153,538 Posts
+7 new in 7 days!
15,348 Topics
+72 new in year!
16 unregistered users.