Switch to full style
Ask all general Gimp related questions here
Post a reply

RGB Max filter in older older versions, how to get it sorted in 2.10?

Tue Jul 13, 2021 5:32 am

GIMP Version: 2.10
Operating System: Windows
GIMP Experience: New User



Hi everyone
I am new to the forum, sorry in advance if this is not the appropiate forum to ask this question, also I have done a quick search before asking with no results ¿?

I am an agronomist and have been using GIMP previously to determine percentage of soil covered by the crop canopy using crop-pictures taken from above

For that I used the RGBmax filter which "For every pixel of the image, this filter holds the channel with the maximal/minimal intensity. The result is an image with only three colors, red, green and blue, and possibly pure gray." (I originally linked to GIMP 2.6 help page plug-in-max-rgb.html)

Once this fiter was applied I could eliminate the red and blue channels and measure the amount of green present in the picture, from then on the proccess to obtain the percentage of soil covered by the crop was quite straight forward.

In the new 2.10 version most colour filters have been removed (seen at the GIMP version history for 2.10, "Color tools" section) and I lack the knowledge in this subject as to find a proper alternative using the current version.

Can anyone give me a hint as to how to solve this problem?

Many thanks in advance

Re: RGB Max filter in older older versions, how to get it sorted in 2.

Tue Jul 13, 2021 6:17 am

Maximum RGB is still there, it is one of the filters that have been removed from the menu structure but retained for some backward compatibility.

Use the forward slash key ( / ) to bring up the Gimp 2.10 search option, type in rgb, look for maximum rgb, click on it to open the filter.

30 second example : https://i.imgur.com/xNKWF7g.mp4

Re: RGB Max filter in older older versions, how to get it sorted in 2.

Tue Jul 13, 2021 9:36 am

:gimp

Thank you!, I feel in debt now, if you ever come to La Rioja in Spain I owe you a wine

Re: RGB Max filter in older older versions, how to get it sorted in 2.

Tue Jul 13, 2021 11:13 am

rich2005 wrote:Maximum RGB is still there, it is one of the filters that have been removed from the menu structure but retained for some backward compatibility.

Use the forward slash key ( / ) to bring up the Gimp 2.10 search option, type in rgb, look for maximum rgb, click on it to open the filter.

30 second example : https://i.imgur.com/xNKWF7g.mp4


Sadly they removed it from 2.99 with no replacement > https://gitlab.gnome.org/GNOME/gimp/-/issues/5440 and it won't be anymore in GIMP 3
This filter is also very useful to prepare a mask with a selection tool, in some cases it's even the best way to get a selection right away without fine tune needed...

Re: RGB Max filter in older older versions, how to get it sorted in 2.

Wed Jul 14, 2021 9:42 am

I've asked the G'MIC team today if they have a Max RGB filter (these guys are very responsive, truly fantastic) > https://discuss.pixls.us/t/does-gmic-ha ... -rgb/25880

They gave me very simple code to input (copy/paste) for now (may be "afre" will do a filter)
So in G'MIC go to "Various" > "Custom Code"
In the "Channels" drop-down menu select "RGB[All]"
then input (copy/past) that code:
Image
For Maximum RGB
Code:
f "M = max(I); M*!(I-M)"

For Minimum RGB
Code:
f "M = min(I); M*!(I-M)"


EDIT:
For G'MIC 2.9.8 and above "afre" did made a filters > G'MIC > Testing > afre > Query Primary
There is even more choice than the original Maximum RGB from GIMP, and the afre's filter works like a charm :jumpclap :tyspin

Re: RGB Max filter in older older versions, how to get it sorted in 2.

Thu Jul 15, 2021 7:40 pm

unimagined utility in this awesome program, gimp rocks, rolls, slices & dices!
Post a reply