dmstraker Posted December 15, 2017 Posted December 15, 2017 Is it possible to select by saturation level? I'm particularly thinking of using saturation masking (if it can be done). Quote Dave Straker Cameras: Sony A7R2, RX100V Computers: Win10: Chillblast i9 Custom + Philips 40in 4K & Benq 23in; Surface Pro 4 i5; iPad Pro 11" Favourite word: Aha. For me and for others.
Grazie Posted December 16, 2017 Posted December 16, 2017 Great question. I’ve got to ask, how is Masking created now? What is it based on now? Quote
dmstraker Posted December 16, 2017 Author Posted December 16, 2017 Masks are an integral concept (and done well in AP) and it's worth spending time to figure thm out. Basically, when you have two layers, a mask will block out a part of the top layer so parts of the bottom layer 'shine through'. This allows you to combine different treatments of parts of the image. With saturation masking, you can, for example, select areas that are highly saturated and turn this down (and hence reducing the visual impact of these areas). Vibrance kind of works like this as it increases the saturation more from areas of lower saturation. You can select by luminosity and hue, but (it seems) not saturation, which is why I asked the question. Quote Dave Straker Cameras: Sony A7R2, RX100V Computers: Win10: Chillblast i9 Custom + Philips 40in 4K & Benq 23in; Surface Pro 4 i5; iPad Pro 11" Favourite word: Aha. For me and for others.
dmstraker Posted December 16, 2017 Author Posted December 16, 2017 I might have found an approach for this. See here: Fotoloco 1 Quote Dave Straker Cameras: Sony A7R2, RX100V Computers: Win10: Chillblast i9 Custom + Philips 40in 4K & Benq 23in; Surface Pro 4 i5; iPad Pro 11" Favourite word: Aha. For me and for others.
ac-13 Posted April 28, 2018 Posted April 28, 2018 When this thread and the tutorial with the solution were posted by @dmstraker, back in December, I read them with interest. Around that period there were also some posts about the use of Equations in AP. As H, S and L can be derived from R, G, B as formula calculations, I thought it could be possible to build a saturation mask in this way, with Apply Image. Details of the calculations were from Rapidtables RGB to HSL Converter The calculations are as follows: R,G,B = Red,Green,Blue as values in range 0 -> 1 - so divide ordinary R,G,B by 255 L(ightness) = ((Max(R,G,B)+Min(R,G,B))/2) Delta = (Max(R,G,B)-Min(R,G,B)) S(aturation) = Delta / (1-Abs((2*L)-1)) Having selected the layer required, Filters -> Apply Image ->Use Current Layer as Source then tick Equations, and ensure Color Space is RGB. In terms of SR, SG and SB, S(aturation) = (Max(SR,SG,SB)-Min(SR,SG,SB))/(1-Abs((2*((Max(SR,SG,SB)+Min(SR,SG,SB))/2))-1)) and so set Destination R, G and B all to that value DR, DG and DB = (Max(SR,SG,SB)-Min(SR,SG,SB))/(1-Abs((2*((Max(SR,SG,SB)+Min(SR,SG,SB))/2))-1)) dmstraker 1 Quote
IPv6 Posted July 7, 2018 Posted July 7, 2018 (edited) Found better approximation for saturation, using LAB mode - since LAB channels separate hue from lightness, saturation can be directly conducted from A and B channelsSo select the layer required, Filters -> Apply Image ->Use Current Layer as Source then tick Equations, and ensure Color Space is LAB. Then set DL = Sqrt((Sa-1.0)*(Sa-1.0)+(Sb-1.0)*(Sb-1.0)) Da = 1.0 Db = 1.0 Edited July 7, 2018 by IPv6 typos Quote
dmstraker Posted August 29, 2018 Author Posted August 29, 2018 Still tinkering with this. On the Apply Image Equations front, in RGB space, I've tried two alternatives. Original: First (and I think best) is: Duplicate layer. DR=max(SR,SG,SB)-min(SR,SG,SB) DG=max(SR,SG,SB)-min(SR,SG,SB) DB=max(SR,SG,SB)-min(SR,SG,SB) Then invert layer and convert to mask. This is based on the principle that 'greyness' increases when RGB vallues are closer to one another. When R=G=B, then a shade of grey is displayed. So max-min calculation gives the range. A variant ion the above is simply to use an average, which take account of the middle value. This third value doesn't really affect grey, but it's an interesting difference to play with. DR=average(SR,SG,SB) DG=average(SR,SG,SB) DB=average(SR,SG,SB) Quote Dave Straker Cameras: Sony A7R2, RX100V Computers: Win10: Chillblast i9 Custom + Philips 40in 4K & Benq 23in; Surface Pro 4 i5; iPad Pro 11" Favourite word: Aha. For me and for others.
John Rostron Posted August 29, 2018 Posted August 29, 2018 A statistical parameter which would have a value of zero when all colours are the same could be the Variance, or its square root, the Standard Devition. if all colours are as different as possible, then the variance would be 2/9 (or 0.2222...). You could use this as a scaling factor as follows. Assuming that R, G and B are in the range 0..1, then: DR=1-variance(SR,SG,SB)×9/2 With identical values for DG and DB. I have not tried this yet, but I might do when I get to my desktop. John Quote Windows 11, Affinity Photo 2.4.2 Designer 2.4.2 and Publisher 2.4.2 (mainly Photo). CPU: Intel Core i5 8500 @ 3.00GHz. RAM: 32.0GB DDR4 @ 1063MHz, Graphics: 2047MB NVIDIA GeForce GTX 1050
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.