Working with HSV images- any GIMP experts here?

aliengrove
Posted 02/04/2014 - 21:33 Link
A bit of a long shot, perhaps, but does anyone know where I can find a good tutorial on GIMP? More specifically, I want to find out how to extract the luminance channel from an HSV image and paste it into another image? I found something online, but can't understand it at all, as everything to do with GIMP seems to written in Linugeek.

When I decompose an image to HSV with 3 layers, I can't find the Luminance channel, only Hue, Saturation and Value as Layers, or Gray and Alpha as channels. Am I right in thinking that Value layer is the same as the Luminance channel in an sRGB image? If so, any idea how to replace this layer/channel with one from another image?
dougf8
Posted 02/04/2014 - 22:08 Link
Do you need to decompose to HSL rather than HSV?

http://en.wikipedia.org/wiki/HSL_and_HSV

http://registry.gimp.org/node/26546

( I know nothing whatsoever about the above )
Lurking is shirking.!
Edited by dougf8: 02/04/2014 - 22:09
gwing
Posted 02/04/2014 - 23:03 Link
I hesitate to step in here as I don't use gimp much at all now and severely risk exposing my ignorance once we start talking at all technically about colour spaces but:

I don't think you'll find a difference in principle between the V of HSV and L of HSL as they are essentially the same thing.. My understanding is that these two colour spaces primarily differ in how they treat saturation and I think HSL has its L channel mapped to a perceptual based scale while HSV's V channel is linear. No guarantees there though

sRGB doesn't have a Luminance channel although the luminance value of a pixel can be derived by summing its linear RG and B values. Strictly speaking it isn't quite that simple as Luminance is a perceptual based value so you have to apply a fiddle factor to the RGB values you sum but in principle you just add them together.

I have got a good Gimp book here (Beginning Gimp - From Novice to Professional) and there is always the manual at http://docs.gimp.org/en/ . I suspect you might want to consider running the decompose plugin to separate each image into HS and V layers and then blend together the layers you want like here http://docs.gimp.org/2.8/en/plug-in-decompose-registered.html but what is it you are actually wanting to do?
Edited by gwing: 02/04/2014 - 23:14
alfpics
Posted 03/04/2014 - 20:27 Link
I am not au fait with GIMP and don't know whether you have got sorted on this, but Picture Window Pro allows you to extract any channel you want from an image - whether in rgb, or hsl, or hsv mode, giving you the ability to recombine again. You can try the programme as a trial from here.
Hope that is of help
Andy
Edited by alfpics: 03/04/2014 - 20:29
aliengrove
Posted 03/04/2014 - 21:52 Link
Thanks Rob, Doug and Andy, that's given me lots of stuff to look at. I think I can do all I want in Gimp, it's working out exactly how to do it. Basically I'm trying to insert information from IR images into normal images, or alternatively information from colour images into IR images.. From what I've read, HSV is the best colour space for doing it.

This gives a good explanation of what I'm messing around with, and why link Ideally I'd like to be able to do it with aerial shots, and have a few ideas of how to do it using blurred colour layers (I actually managed an image of sorts last year link , using YCbCr and images from two different cameras) but am mainly going to do it on ground shots on the K3. I may also get my K5 converted to full spectrum and mess around with different combinations of filters.
Edited by aliengrove: 03/04/2014 - 22:01
dougf8
Posted 03/04/2014 - 22:04 Link
http://infoscience.epfl.ch/record/142321/files/FredembachBS2009.pdf

page 5 figure 9

not sure how to map that to Gimp though

Do you need to add in a Bilateral Filter to the filter scripts? A little like the high pass filter for sharpening.
Lurking is shirking.!
Edited by dougf8: 03/04/2014 - 22:23
gwing
Posted 03/04/2014 - 22:06 Link
That's a very interesting link Flurble.

I imagine the greatest problem is going to be in getting two exactly registered shots, one normal and one in IR for the same image. From there loading the two into gimp, decomposing both to colour layers and then recombining them seems in principle straightforward (although I haven't actually tried it). Any of HSV, HSL, LAB and YCbCr would seem suitable for this so you are going to have a lot of fun sorting out which works best
aliengrove
Posted 03/04/2014 - 22:18 Link
I've got a book on IR which has a basic method of superimposing a colour image over an IR image (a more complex variation of which was used on the previous image I linked to), blurring the colour layer using Surface Blur in Photoshop and then blending it with the IR image. By using blur, the exact lining up of the images is not so critical.

I used this simpler method (using sRGB) on another image made from an IR shot from a converted K20D and an image from my K5 link using sRGB, but as you can see the image is a bit blurry and was a bit pointless beyond the experiment itself.
Edited by aliengrove: 03/04/2014 - 22:22
dougf8
Posted 03/04/2014 - 22:30 Link
The way I see it.

So split the colour from the light. Do a BIL filter and take the smoothed layer.

Take the IR version, BIL fliter , find the difference and take the detail.

Add the IR detail to the colour light base.

Add the colour layer back.

You can get an add on BIL script for Gimp in the same way you get the high pass filter.
Lurking is shirking.!
aliengrove
Posted 03/04/2014 - 22:36 Link
Whats' a BIL filter? What you're saying is a bit beyond my present comprehension, both of color spaces and of GIMP.
dougf8
Posted 03/04/2014 - 22:40 Link
Bilateral filter is mentioned, "similar to selective Gaussian blur".
I'm guessing BIL is bilateral

[IMG]http://i740.photobucket.com/albums/xx49/df8/Fullscreencapture03042014224159_zps5d426ff1.jpg~original[/IMG]
Lurking is shirking.!
Edited by dougf8: 03/04/2014 - 22:44
alfpics
Posted 03/04/2014 - 22:59 Link
As above interesting link flurble and also liked your attempt as well. Slightly OT: did you risk the IR conversion on the K20 yourself, or get it doen professionally?
Andy
aliengrove
Posted 03/04/2014 - 23:09 Link
Interesting stuff, Doug, will have a good look at it tomorrow.

Andy, the IR conversion was done by a previous forum member. It worked really well, but no Live View. I've got a converted Sony Nex 5N now.
dougf8
Posted 03/04/2014 - 23:24 Link
layer difference script
http://registry.gimp.org/node/20340

bilateral filter in here
http://registry.gimp.org/node/13469
http://gorgodium.blogspot.co.uk/2011/11/18-most-useful-gmic-scripts-for.html

The specific bilateral filter mentioned splits the image into two layers , the base and the detail. I've not found a similar filter yet in Gimp.
Lurking is shirking.!
Edited by dougf8: 03/04/2014 - 23:54
dougf8
Posted 03/04/2014 - 23:58 Link
apropo BILS this is quite interesting but not related to the problem in hand http://mcclanahoochie.com/blog/portfolio/opencl-image-pyramid-detail-enhancement...

ha ha and another interesting method ...
http://blog.patdavid.net/2013/02/calvin-hollywood-freaky-details-in-gimp.html
Lurking is shirking.!
Edited by dougf8: 04/04/2014 - 00:02

Add Comment

To leave a comment - Log in to Pentax User or create a new account.



Proudly supporting Pentax User

Samsung Logo Asahi Pentax Logo