io.imshow(fancy=True) and the new color channel mixer!

Hey Guys, I worked today on a couple of things. First, as you all know, we recently added imshow() plugins for pygtk and pyqt4 backends. The simple imshow() just pops open a window with the image, nothing more, nothing less. I've made the start of a "fancy" imshow for qt. its called via, imshow(img, fancy=True). Unlike a matplotlib style imshow, I'm wanting to be a little "cooler" :) Here is what works so far: In the status bar of the window, you get your cursor position, as well as the RGB pixels values of the image over point at which your mouse is hovering. To the right of the image are some sliders (Two groups of three for now, until i can figure out dropdown selector lists :) ). Each of these three groups controls the RGB channels of the new channel mixer (more on that in a bit). The first group performs "additive" mixing and the second group performs a "multiply" operation. I still need to add a button to save the state when you are done with an operation, and a revert button, labels yaddy yaddy yadda... it's just a prototype right now. Now, the new ColorMixer: I've implemented the start of a new ColorMixer in io/_plugins/util.py (the backend is _colormixer.pyx) which handles all of these nifty color space operations on the channels of you rgb uint8 numpy array. (sorry, no floating point for you!, its meant for display operations). Currently, it performs additive and multiply operations on any given channel. I will be adding brightness, contrast, and HSV functions in the coming days. Its meant to be a general util that can be used by any plugin. Just hook up your sliders and go! You can check out all this goodness at my github on the io branch. http://github.com/sccolbert/scikits.image/tree/io/scikits/image/io/ You'll have to manually build the _colormixer.pyx file cause I havent hooked in a setup.py yet. Cheers! Chris

oh, and I forgot to mention, based on my quick tests, the mixer is faster than the Gimp :O On Wed, Nov 4, 2009 at 2:40 AM, Chris Colbert <sccolbert@gmail.com> wrote:
Hey Guys,
I worked today on a couple of things.
First, as you all know, we recently added imshow() plugins for pygtk and pyqt4 backends. The simple imshow() just pops open a window with the image, nothing more, nothing less.
I've made the start of a "fancy" imshow for qt.
its called via, imshow(img, fancy=True).
Unlike a matplotlib style imshow, I'm wanting to be a little "cooler" :)
Here is what works so far:
In the status bar of the window, you get your cursor position, as well as the RGB pixels values of the image over point at which your mouse is hovering.
To the right of the image are some sliders (Two groups of three for now, until i can figure out dropdown selector lists :) ). Each of these three groups controls the RGB channels of the new channel mixer (more on that in a bit). The first group performs "additive" mixing and the second group performs a "multiply" operation.
I still need to add a button to save the state when you are done with an operation, and a revert button, labels yaddy yaddy yadda... it's just a prototype right now.
Now, the new ColorMixer:
I've implemented the start of a new ColorMixer in io/_plugins/util.py (the backend is _colormixer.pyx) which handles all of these nifty color space operations on the channels of you rgb uint8 numpy array. (sorry, no floating point for you!, its meant for display operations).
Currently, it performs additive and multiply operations on any given channel. I will be adding brightness, contrast, and HSV functions in the coming days.
Its meant to be a general util that can be used by any plugin. Just hook up your sliders and go!
You can check out all this goodness at my github on the io branch. http://github.com/sccolbert/scikits.image/tree/io/scikits/image/io/
You'll have to manually build the _colormixer.pyx file cause I havent hooked in a setup.py yet.
Cheers!
Chris

Hey, Chris 2009/11/4 Chris Colbert <sccolbert@gmail.com>:
In the status bar of the window, you get your cursor position, as well as the RGB pixels values of the image over point at which your mouse is hovering.
The viewer is coming along very nicely!
Now, the new ColorMixer:
[...]
You'll have to manually build the _colormixer.pyx file cause I havent hooked in a setup.py yet.
I've added a setup file for the colour mixer, as well as some documentation and tests: http://github.com/stefanv/scikits.image/commits/chris_io You may pull the changes from there if you like them. Cheers Stéfan

Hi Chris, I have not yet have time to check out your work here. But I wonder if we are not working on the same thing twice. I commited a gui module a while ago which offers displaying capacities in pyqt. It should have been very convenient to build this on top of that. Also, while I agree that the plugin architecture is well layed out, I feel that this is not a very pythonic way to do things. In Python, stuff either works because you have everything installed or not. I do not want to criticize before I completely understand the reason for the plugin architecture. Could someone point me to the thread were it was discussed? Cheers, Holger
participants (3)
-
Chris Colbert
-
SirVer
-
Stéfan van der Walt