RetouchPRO

Go Back   RetouchPRO > Tools > Software
Register Blogs FAQ Site Nav Search Today's Posts Mark Forums Read


Software Photoshop, Lightroom, Paintshop Pro, Painter, etc., and all their various plugins. Of course, you can also discuss all other programs, as well.

PC/Win filter for Lab mode: Minor ab Manip

Reply
 
Thread Tools
  #1  
Old 09-19-2005, 11:34 AM
Stroker's Avatar
Stroker Stroker is offline
Senior Member
 
Join Date: Jan 2005
Posts: 370
PC/Win filter for Lab mode: Minor ab Manip

My first Lab specific filter. All the rage thanks to Dan. Uh oh, I feel a rant coming on.

Lab mode is good, but the tools are so lacking. So I did my own version of Levels that is geared towards Lab mode. Only manipluates a and b, so it's minor. But don't be fooled.

Yes, Lab mode - will not work in RGB.

- First two sliders are offset sliders, basically colour balance along ab
- Next four sliders are 'saturation' sliders and only work for the given half of given ab
- Last two sliders are post post-colour balance like the first two

Having two sets of offset sliders may seem redundant, but order of operations is important.

I threw in some visual aides so that the sliders should be easier to understand at glance.

PC/Win
TS_minorabmanip.8bf
Filter > Tech Slop > Minor ab Manip
Mode: Lab 8-bit

TS_minorabmanip.rar
Reply With Quote top
  #2  
Old 09-21-2005, 08:41 AM
Stroker's Avatar
Stroker Stroker is offline
Senior Member
 
Join Date: Jan 2005
Posts: 370
I was up until 3am the other night doing this one. Got up at 7am and did some polishing.

3Pxab Trans

If you try it, let me know how the Preview updating works for you. If it bogs down for too many, I'll take out and offer a seperate download.
Reply With Quote top
  #3  
Old 09-21-2005, 08:09 PM
Craig Walters's Avatar
Craig Walters Craig Walters is offline
Senior Member
 
Join Date: Apr 2005
Location: somewhere over there
Posts: 8,786
Blog Entries: 4
well, ya left me in the dust this time, stroker. havent used Lab mode yet. not even sure if psp has a lab mode.

but, one of these days i may post a request for a commissioned plugin. i'm always running into things i think could stand one.

Craig
Reply With Quote top
  #4  
Old 09-22-2005, 06:34 AM
Stroker's Avatar
Stroker Stroker is offline
Senior Member
 
Join Date: Jan 2005
Posts: 370
Man, I didn't even think about non-Photoshop hosts with those two. I can do RGB versions that should work with other hosts, but I don't know how well it will work because of the conversions. Shouldn't be too bad, though. In the tests that I did some weeks ago, the percent error was a little higher than I like, but should be negligable to most eyes.

I got something going on today. If I'm not back within 24 hours or so, it means I'll be gone for about a month.
Reply With Quote top
  #5  
Old 09-22-2005, 10:21 AM
Stroker's Avatar
Stroker Stroker is offline
Senior Member
 
Join Date: Jan 2005
Posts: 370
I'm back for now.

Kraellin, let's experiment with Minor ab Manip RGB. The same as the first filter, but in RGB mode.

TS_minorabmaniprgb.rar

A bit different than the original Lab one. I took out the right-click Preview thing because it was proving rather useless. This also made a little more room for the Preview. Give and take I suppose.

In the RAR archive there is also a JPEG that is a slice of the Lab cube. This is so you can get a feel for how Lab works with Minor ab Manip RGB.

I did a few more comparative tests and I wasn't happy with the percent error. Perceptually it does achieve pretty much the same thing, but I can be a number freak sometimes. Even with a not so pretty %error, I'm sure it would be nice to have some Lab functionality in RGB mode for non-Photoshop host users.

If you are serious about commission and I can do it, now would be the time.

edit:
Almost forgot.

If you want a visual of the distribution of a and b in an image, I recently added a and b as axis in 2D Histogram.

I also added Lab as a working colour space in CS Displace 2D. The Lab acrobatics that can be done with CS Displace 2D are phenomenal.

Even though both of those have Lab functionality, they are RGB.

Last edited by Stroker; 09-22-2005 at 10:33 AM.
Reply With Quote top
  #6  
Old 09-23-2005, 04:00 PM
Cameraken's Avatar
Cameraken Cameraken is offline
Senior Member
 
Join Date: Feb 2005
Location: Lancashire (UK)
Posts: 1,158
Stroker.

Just a quick note to say Thank You.

I’m using your method of making Skin, Your High Pass Sharpening Filter
And now Lab and Displace. You are taking over my PC.

You’ve got me reading about Perlin Noise, Frequency etc. And also there are some good tutorials at your site

In fact I’ve just installed FilterMeister 1.0 Beta 6 So I can have a play. But I have never programmed in C. You never know I might be able to program the Highlight/Shadow filter I’m missing with PS7.

Great Stuff.

Thanks Again.

Ken.
Reply With Quote top
  #7  
Old 09-24-2005, 11:26 AM
Stroker's Avatar
Stroker Stroker is offline
Senior Member
 
Join Date: Jan 2005
Posts: 370
NP, Cameraken. You're welcome. And thank you for coming with me. When I go on my jaunts, it's good to know I have some company.

Programming was my first love. Taught myself on a TRS-80 at the tender age of 11. By the time we had computer classes in school, I was teaching the teachers. I used to prank the teachers by obfuscating my algorithms. Ah, the good ol' days of geek humour.

Actually, I'm only vaguely familiar with C/C++. Since I've been digging Filter Meister, maybe I'll pick up C/C++ again one of these days.

I've been slacking on my tutorials lately. I've got loads more in my head, but I still have to write them down. Too busy with FM for serious tut writing.

Did another one for Lab mode: Sat Sucker.

I'm on a rampage, and it feels good.
Reply With Quote top
  #8  
Old 09-24-2005, 02:08 PM
Craig Walters's Avatar
Craig Walters Craig Walters is offline
Senior Member
 
Join Date: Apr 2005
Location: somewhere over there
Posts: 8,786
Blog Entries: 4
stroker,

wasnt able to get to this until today (now that the contest is over).
Quote:
Kraellin, let's experiment with Minor ab Manip RGB.
took my first look at this one. one thing, first, could you include a 'restore defaults' switch/arguement to this? or include a file that would restore the defaults similar to the Fast Fix plugin? in the fast fix you can open a file that will restore the default settings. yeah, i know, i can cancel and reload the filter but a restore defaults would be slicker.

it's an interesting filter. not quite sure yet what all it's doing, but it's certainly doing something. remember, i have NO lab experience, so comparisons to a and b channel mean almost nothing to me.

from what i can see, it would seem that the a offset and b offset are both handling a range of hues and that the -a and +a and -b and +b alter those hues within the range. have i got that right? and that would seem to simulate the a and b channels of lab mode. but then, what's the other set of a and b offsets for? they would seem to have the same hue ranges.

btw, nice touch in adding preset load and save.

Craig
Reply With Quote top
  #9  
Old 09-24-2005, 08:41 PM
Stroker's Avatar
Stroker Stroker is offline
Senior Member
 
Join Date: Jan 2005
Posts: 370
Speaking of tutorials... I've been meaning to get to some basic Lab stuff. Here's a brief run-down for ya, Kraellin.

Please beer in mind that I am most certaintly not an expert on Lab. The junk that I'm about to say is my experience with Lab from the fiddling and reading that I've done.

Lab space is a sphere. The top is white, the bottom is black, and the line between those two are shades of grey. Very similiar to the HSL cones, but spherical. One of the important differences between Lab and HSL/HSB is how the colours are distributed within the Lab sphere. The colour, or hues of varying saturation, are distibutated using human perception. That is, pure yellow will be closer to white while pure blue will be closer to black.

Another important difference is how the colours in the Lab sphere are referenced. In HSL/HSB, the colours are referenced in a polar manner taking Hue as a angle and Sat as delta, magnitude, or theta (I prefer theta). However, colours in Lab are referenced using Cartesian coordinates. Lightness is the up/down axis, and then you have a and b for side-to-side and front-to-back.

The Cartesian-ness of Lab means several kind of funky things. One of the weirder things is that Lab is a sphere, but can be made into a cube, much like the RGB colour cube. This means that most applications that use Lab as a cube are probably using illegal Lab values. In the Lab sphere, values like (255/100%,100,100) just don't exist. In order to keep values legal, a little extra sumpin has to be in place to clamp or limit. Several tricks to doing this, but that's for another day.

(Measuring Saturation in Lab is interesting. I'm fairly certain that Pythagoras' formula is proper, but I've haven't really looked that hard into this.)

Another funky Cartesian thing is how Hue is manipulated. But first, let's talk about ranges.

There seems to be quite a few different ranges for a and b in Lab. For a, some people say the range is (-124 to 127). In Photoshop, due to 2^8, the range for a is (-128 to 127). And I've seen various other pairings of min and max for a and b. For a personal compromise, I prefer to use (-120 to 120) in my notes and things.

For talking about hues and Lab, I'm not going to bother with exact values. Rather, I'll say +a to mean that the a value is greater than 0. I will say -a to mean that a is less than 0. Same for b. Or I'll use 0 to mean 0 for the axis. And please pardon my use of named hues as they can change depending on Lightness and human perception. That is, sometimes red is red and sometimes red is red and yellow. Yeah, funky.

So, here is my quick-n-sloppy take:
+a,0 = red/magenta
-a,0 = green/cyan
0,+b = yellow
0, -b = blue

Okay, fleshtones are generally +a, +b. Depending on exact values, should get you anywhere between magenta all the way to yellow. But the really interesting thing is when you desaturate. If your flesh is too saturated, just reduce saturation. Well, not exactly that simple in Lab. Rather, you will have to reduce a and b to varying degrees to get the hue and sat combo that you want. If you desaturate +b but not +a, you will be left with red/magenta.

Hmmm...

In HSL/HSB, to reduce saturation you simple reduce saturation.
In Lab, to reduce saturation, you have to do it indirectly by manipulating a and b closer to 0.

Ah, speaking of saturation and 0...

One of the problems with HSL/HSB is what happens when sat=0. When sat=0, there is no hue - it is literally non-existant. If you want to pump up saturation and sat=0, you have to go in and manually add a hue value. Roland can tell you about this.

However, sat=0 is not a problem in Lab. All you have to do is shift a and/or b away from 0 and you have colour. Tada. Very nice.

That's enough of that for now. Let's talk about offset and scaling in Minor ab Manip.

As you've noticed, there are two sets of offset sliders in MabM. This is because of the scaling sliders starting at 0 and scale either positive or negative. When doing this, order of operations becomes important. Offset and then scale is much different than scale then offset.

Hopefully the attachment shows the difference. Or maybe I need to get off of my lazy butt and do it proper. Heh.

Because of the order of operations, I decided to have pre-offset and post-offset. Not only does this fix the order of operations problem, but offers more acrobatics.

Oh, I think I figured out why I was getting huge percent error. Has do to with the fact that Lab is device independant and I'm not accessing all of the information necessary. I couldn't even tell you if I can access the necessary information to keep things tight. If you are doing work that is seriously dependant on device indpendance, do not use plug-ins that manipulate Lab while in RGB mode unless those extra things are taken into consideration. This includes Minor ab Manip. Should be fine for web work or basic photograph fixing, though.

Seems like I had a few other things to say, but my head is starting to slip. Maybe later I'll remember. Just remember that I'm not an expert on Lab. I'm just some guy. Please don't take my word as bond and do some research on your own. As a matter of fact, I am more than open to corrections.

I'm gonna go play some Gloom. Camp a few hatchies or something.
Attached Images
File Type: gif offsetscale.gif (8.6 KB, 8 views)
Reply With Quote top
  #10  
Old 09-25-2005, 12:08 AM
Craig Walters's Avatar
Craig Walters Craig Walters is offline
Senior Member
 
Join Date: Apr 2005
Location: somewhere over there
Posts: 8,786
Blog Entries: 4
hehehe, stroker. see, you put me to sleep every time i love your work, just dont expect me to follow it. trust me here, i'm not laughing at you. i'm laughing at my rejection of having to try to understand what you just said cartesian coordinates? ho boy, i aint lookin that one up! delta, theta...??

i'll just play with it and get the hang of it. i do appreciate the explanation; i just dont understand it

Craig
Reply With Quote top
Reply

  RetouchPRO > Tools > Software


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
PC/Win Filter: High Pass Lum Stroker Software 14 05-20-2010 05:39 AM
PHOTO ART: Photoshop Trace Contour filter DannyRaphael Photo-Based Art 0 07-20-2002 03:30 PM
Tutorial: Texturizer Filter tricks DannyRaphael Photo-Based Art 6 07-13-2002 03:13 PM


All times are GMT -6. The time now is 04:21 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
Copyright © 2016 Doug Nelson. All Rights Reserved