It is currently 09 Dec 2019, 00:44


GIMP/GL:  Tutorials | Tips | Questions | Interests | 🡆 Script Requests
Recommendations:  Index | Top 10
Resources:  Python-Fu Plug-ins | Scheme-Fu Scripts | GIMP
Python:  Lessons | Questions | Exercises
The Arts:  GIMPed | GIMPed Photos | Other | Contests | Public Domain Images | Isolated Images | Blender
Inkscape
Social:  Say Hello | Anything Goes | Shares | FCSP

Change Luminosity Mask Script

Post your Script Requests for GIMP here.
Forum rules
Request your Script(s) for GIMP here in this forum.
Provide details of steps performed in GIMP so that script can be written for the process and also give the request a name so that scripts can be named after.
Krikor
Forum Member

Re: Change Luminosity Mask Script

Post#21 by Krikor » 16 Nov 2019, 01:58


david wrote:
15 Nov 2019, 10:28
Krikor, ...[ Each of the masks must not have any effect on the other layers or masks.
To hopefully clarify the intention, I have attached an image of a gradient showing the range each mask would affect.
Perhaps one day I may be able to change the code to get this result!
david.]
David, have you tried exploring Zone System Separator - ZSS?

Using your gradient image I applied zss and excludes the intersecting areas. That left the 11 areas created by the script mask.
Image separated into 11 zones.
Krikor - Zone System Separator in degradê
Krikor - Zone System Separator in degradê
DMeZS.jpg (15 KiB) Viewed 359 times
The usability of these scripts is different, but some similarities can be explored.
All that is great is greater than all that is small.
0

david
Forum Member

Post#22 by david » 17 Nov 2019, 10:59


Krikor,

Thanks for your reply.
I had looked at ZSS several years ago. As it , effectively, uses Threshold there is no "feathering" of the masks into adjacent areas of brightness.

I have given up on my attempts to modify Tim's script because I am unable to find documentation on Gimp scheme or Gimp python. There are many tutorials that explain how to add two numbers or to print "Hello World" on the screen, but I have failed to find anything explaining how to use layers and channels which is suitable for a beginner.

I think the way ahead is being shown by Ofnuts latest script.

david.
0

tim
GL Blogger

Post#23 by tim » 17 Nov 2019, 19:34


david wrote:
17 Nov 2019, 10:59
Krikor,

Thanks for your reply.
I had looked at ZSS several years ago. As it , effectively, uses Threshold there is no "feathering" of the masks into adjacent areas of brightness.

I have given up on my attempts to modify Tim's script because I am unable to find documentation on Gimp scheme or Gimp python. There are many tutorials that explain how to add two numbers or to print "Hello World" on the screen, but I have failed to find anything explaining how to use layers and channels which is suitable for a beginner.

I think the way ahead is being shown by Ofnuts latest script.

david.
Do you know the manual steps of what you're trying achieve? if you do I can script it if you describe it.
aka Tin
:tree_02:
Tin's: Favorite Index | Simple Art === fb4yt video search | fb4yt recent video views report
Lottery numbers from image | Interested Members in TLF
Paying for hosting is to support my hobby, and donating money made from ads to The Red Cross.
         
0

david
Forum Member

Post#24 by david » 18 Nov 2019, 13:30


tim,

Thank you very much for your offer.
I have written the attached list of steps. I have tested my write-up several times to be certain I have not done anything silly!
The final on-screen layout looks like your original script, because that is so convenient to use, but the masks are modified so that there is no overlap (except where one brightness level "feathers" into the next). Because there is no overlap, the effect of the masks can be used individually or in combination

david.

After all that, I did make a mistake - immediately after "Load Image" it should have said "Duplicate Image".
Apologies. Now corrected.
luminosity_masks.pdf
(31.06 KiB) Downloaded 18 times
Last edited by david on 19 Nov 2019, 14:37, edited 1 time in total.
0

Krikor
Forum Member

Post#25 by Krikor » 19 Nov 2019, 00:22


Hi David,

I reproduced your idea transcribed in pdf.

A few points that I think could be checked:

Channels L and D are actually the same and represent the average tone M.
Using both would be like using L twice, or using D twice.
Perhaps ideally following your initial idea would be to keep only one of them (Create only one of them).

But since these (L / D) channels are actually the midtone (M), you would not actually be editing either light or dark tones.

As can be seen in the channel images in the image below.
The spectrum covered by the LL, LLL and LLLL (Lights) channels seems to me very limited, covering only half of the possible area.

The LLLL channel covers only the lightest tones of the image, and the LL channel does not reach the most subtle light tones.
Most of the light tones will not be picked up by these channels.

Conversely, the same applies to Darks tones.
Krikor - David Luminosity Masks Version
Krikor - David Luminosity Masks Version
RefDAvidLuminosityM02.jpg (34.55 KiB) Viewed 301 times
One option is to make use of L1, LL1, LLL1, D1, DD1 and DDD1 channels which would increase the coverage area of ​​the 8 channels. As well as the midtones M1, MM1 and MMM1

A second option would be to create more channels to increase this coverage.

I hope I'm not talking too much bullshit.
I believe the above image below is a good summary of your pdf.
All that is great is greater than all that is small.
0

david
Forum Member

Post#26 by david » 19 Nov 2019, 14:03


Krikor,

I have carried out a much more detailed investigation, examining the spectra when using all the masks created by the Pat David script as well as my own.
It produces some interesting and, at first sight, peculiar results.

Firstly, in the Pat David tutorial is says that "MM" & "MMM" are produced by intersecting channels "DD" & "LL" and "DDD" & "LLL" respectively. This does not work, since there is no overlap between these channels. In the script this is corrected. The image is selected and the channels are subtracted from this.

I am including a .zip file which has all the spectra created by using all the different channels. The one's from the Pat David script are prefixed "PD" and mine "DM" (except that I created a PD_MMMM1 just to complete the set for comparison).

You are correct that my "DM_L" and "DM_D" are identical. The spectra for them are also identical to "PD_M1" and "PD_MM1". So as you say, I could eliminate one of these and label the other "DM_M".
It also demonstrates that "PD_M1" and "PDMM1" will produce identical results.

I think that the reason my two files are identical is because the masks are made by a successive binary division of the spectrum and the two halves are a mirror image of each other.

The new channels which I made were intended to have a very limited coverage since they can be used additively to cover chosen ranges of the spectrum.

I look forward to reading your comments.

david.
spectra.zip
(292.45 KiB) Downloaded 18 times
0

david
Forum Member

Post#27 by david » 19 Nov 2019, 14:47


tim,

I must apologise once again!
As a result of a detailed investigation (you can see the details in my reply to Krikor), I have found it necessary to make other changes. Hopefully, this will not make a difference to the overall flow of a program, but some relabelling of channels and layers will be needed and one of the channels will no longer need the modification step.

I have updated the .pdf file (above), put scorethroughs where anything is eliminated and comments in bold to highlight the changes.

david.
0

tim
GL Blogger

Post#28 by tim » 23 Nov 2019, 06:52


david wrote:
19 Nov 2019, 14:47
tim,

I must apologise once again!
As a result of a detailed investigation (you can see the details in my reply to Krikor), I have found it necessary to make other changes. Hopefully, this will not make a difference to the overall flow of a program, but some relabelling of channels and layers will be needed and one of the channels will no longer need the modification step.

I have updated the .pdf file (above), put scorethroughs where anything is eliminated and comments in bold to highlight the changes.

david.
I did it and and it ends up with 7 layers LLL,LL,L,M,D,DD,DDD.
There is no LLLL or DDDD that i could find.
viewtopic.php?f=3&t=2576
aka Tin
:tree_02:
Tin's: Favorite Index | Simple Art === fb4yt video search | fb4yt recent video views report
Lottery numbers from image | Interested Members in TLF
Paying for hosting is to support my hobby, and donating money made from ads to The Red Cross.
         
0

david
Forum Member

Post#29 by david » 23 Nov 2019, 08:11


tim,
Many thanks!!!
I've given it a quick try using a gradient as the source image - superb!!!
Your code makes it look so easy - I will have to study that and maybe learn something.
Last point: I think you should have called it Tim Luminosity Masks - you have done all the hard work.
david.
1

tim
GL Blogger

Post#30 by tim » 23 Nov 2019, 13:52


david wrote:
23 Nov 2019, 08:11
tim,
Many thanks!!!
I've given it a quick try using a gradient as the source image - superb!!!
Your code makes it look so easy - I will have to study that and maybe learn something.
Last point: I think you should have called it Tim Luminosity Masks - you have done all the hard work.
david.
Glad it works for you... should have called it Tim? No because it followed your pdf to David is good just to distinguish from the other Lum scripts. hehe
aka Tin
:tree_02:
Tin's: Favorite Index | Simple Art === fb4yt video search | fb4yt recent video views report
Lottery numbers from image | Interested Members in TLF
Paying for hosting is to support my hobby, and donating money made from ads to The Red Cross.
         
0


GIMP/GL:  Tutorials | Tips | Questions | Interests | 🡆 Script Requests
Recommendations:  Index | Top 10
Resources:  Python-Fu Plug-ins | Scheme-Fu Scripts | GIMP
Python:  Lessons | Questions | Exercises
The Arts:  GIMPed | GIMPed Photos | Other | Contests | Public Domain Images | Isolated Images | Blender
Inkscape
Social:  Say Hello | Anything Goes | Shares | FCSP

Post Reply
  • Similar Topics
    Replies
    Views
    Last post
• Featuring Members' Works (Image Attachments) •
1: member
2: member
3: member
4: member
5: member

Who is online

Users browsing this forum: No registered users and 14 guests