Color map

psonice's picture

How does color map actually work, anyone know? I'm trying to convert video to a specific 16 colour palette, and this looks like the way to do it but I just can't figure out where it gets the colours from in the gradient!

Otherwise, is there another way to do palettising?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

cwright's picture
colormaps

Color maps work something like this:

The input image's brightness is used as an offset into the input color map texture. the offset is the x coordinate into the gradient, meaning that black is as 0,0, while white is at 1,0.

you'll want a setup like this to start with (you'll need to tweak the gradient patch to make a horizontal gradient, instead of the weird triangular one it generates by default).

[ps sneak peak at the super-charged blocking image downloader ;) ]

[edit: the output image is a grayscale one because I used a black/white gradient. the input image is actually color]

PreviewAttachmentSize
colormapDemo.jpg
colormapDemo.jpg74.5 KB

dwskau's picture
Transparent editor

Is that photoshop or is your editor always transparent? And how can I do that? If it is photoshop then I guess I should put in an official feature request. I don't always have a second monitor plugged in and that would be my number one feature request to improve usability, the next thing would be an end to those stupid floating palettes that cover up workspace.

cwright's picture
real transparency

That's a real transparent editor. It's a hack made possible with the KinemeCore plugin (you can find a beta somewhere around here).

Since I only have a MacBook, I need it (as well as some other hacks) to fit stuff all on screen while writing plugins. usually I have a console behind it, to watch error messages before it explodes ;)

There's another hack in KinemeCore that unfloats the patch creator (I hated that too), as well as a few other tweaks. I highly recommend it, though it's pretty invasive code, and there are a few bugs that I can't really address (since the framework that drives it is involved in some non-public projects at the moment... hopefully in a month or so it'll get updated)

[edit: the beta url: http://kineme.net/KinemeCorePlugin20071212beta -- be sure to set the alpha value of the background color in the preferences panel of QC for it to take effect]

cwright's picture
super-trippy

This just gave me a (really bad) idea: It's also possible (on Leopard) to make "frosted-glass" windows that blur the stuff underneath them... This would totally defeat the purpose of seeing through the window, but it might make for some cool "My QC can beat up your QC" contests at conventions or something... any interest in this 'feature' ? ;)

franz's picture
my desk

here's my desktop (see link) that's why i personnaly hate transparent windows.... (and since Spaces keeps the same desktop on each screen, it is kind of useless to address this issue) sorry (how do you guys do to keep a clean desk ??? !!!!)

btw: that's why i find myself constantly quitting the finder....

PreviewAttachmentSize
Image 1.jpg
Image 1.jpg240.99 KB

dwskau's picture
Beta

Access Denied. Is there something I need to do to get access to that file?

dwskau's picture
Folders

Almost nothing I save goes on the desktop directly. Most of it goes into folders on the desktop or in documents, pictures, etc.

cwright's picture
beta tester

You'll want check the "I would like to beta test new and updated patches" box in your user profile. For you personally, this can be found here: http://kineme.net/user/159/edit

This will give you free access to all our beta stuff - lots of crazy stuff in there.

cwright's picture
MRU

For me, the desktop is usually my "Most Recently Used" working set. So when I was deep in OpenCV and Kineme3D, there were models and documentation and test compositions littering my desktop. When those become less used, they get filed into folders. So it's not uncommon for me to have a literally full desktop one day (about 4 days ago, there wasn't any room for more stuff on my desktop), and a nice and tidy one (like today) the next as project efforts switch around.

I don't use transparency to see the desktop, but because I can place other windows under the transparent ones, and see stacked data where I'd otherwise have dead space. For me, QC's editor window is almost always dead space for the test cases I make, so it's more useful for me to put the viewer or a console under it to maximize screen space.

I kill Finder all the time too...

I like how your pictures are big enough to recognize; I'm still undecided on that (big enough to see, or small enough to not clutter my workspace...)