RBA's Astrophotography

Hasta La Vista, Green!

Posted: April 26th, 2010


About HLVG

Hasta La Vista, Green (HLVG from now on) is my first attempt at writing a Photoshop plug-in. Although I don't use Photoshop much for processing my images, I've always been curious about the procedure of writing a Photoshop plug-in. The HLVG filter seemed a good way to start since it's a very simple plug-in.

HLVG is a chromatic noise reduction tool that attempts to remove green noise and the green casts such noise may cause in some images. It is based on PixInsight's SCNR Average Neutral algorithm.

The idea is not new. We all know that with a very few exceptions (some planetary nebulae, comets, etc), there are no green objects in the sky. Therefore, if we've already correctly calibrated and color-balanced an image and it's free of gradients (to the best of our ability at least), we have to assume that if something else looks green in our images it's got to be noise...Don't mistake gradients with noise. Removing gradients are best dealt by subtracting a good background model. Chromatic noise on the other hand is tricky, since it "overwrites" the real data we want.

There are several techniques widely used to deal with this problem, however most of them rely on selections and adjustments that sometimes are not easy to execute. SCNR (the base algorithm used by this plug-in) is in my opinion one of the most reliable methods to deal with "green noise" and it works the same every time, without having to worry about anything, just click OK and you're done.

Some examples

The only process applied between the BEFORE and AFTER images below is the HLVG plugin with the Strong option selected, over a "color blended" layer.

The following three examples are somewhat "extreme", and in fact a couple of them do include uncorrected gradients, that HLVG obviously does NOT correct (see section above), but hopefully they serve the purpose of showing the effect of applying HLVG over a "green polluted" image.
Before HLVG

After HLVG

Before

After

Before

After

Requirements

To use HLVG you need a computer running Windows (tested on XP, Vista, Windows 7 and 8.1, both 32 and 64 bits) and Photoshop (tested on Photoshop 7, CS2, CS3, CS4, CS5 and CC). HLVG will likely work under previous versions of Windows and Photoshop, and likely newer ones. If you successfully run HLVG in any of the not-tested versions of Windows and/or Photoshop, let me know.

Why not Mac? ... Short answer: because I don't have one, therefore I cannot compile and test the plug-in for the Mac.

Download it

Downloading HLVG is easy, simply click one the links below:

For any non-64 bits version of Photoshop : DOWNLOAD HLVG

For Photoshop 64 bits ONLY: DOWNLOAD HLVG 64bits

By the way, HLVG is free (as in "free beer") and I want it to stay that way, so permission is NOT given to include this plug-in in any commercial package. If you downloaded HLVG, whether standalone or as a part of a package, and paid for it, please let me know. Having said that, if you find HLVG useful and would like to make a small donation, please use the "Donate" button below. The Donate button will take you to PayPal - don't worry when you see the donation goes to AR Networks. Yes, that's me.

Installing HLVG

Once downloaded, you'll need to unzip the HLVG.zip file. This will extract the HLVG.8bf file.

Once extracted, copy the HLVG.8bf file to the Plug-Ins directory in your Photoshop installation.This usually is something like C:\Program Files\Adobe\Adobe Photoshop CS2\Plug-Ins but it may be different depending on the operating system and the Photoshop version you're running.

After you've copied the file to the Plug-Ins directory, start (or restart) Photoshop.

Using HLVG

When you're ready to use HLVG (you'll need at least one image loaded in Photoshop, preferably an image already color balanced, and with any gradients already corrected), go to the Filters menu, find the DeepSkyColors menu option, select it, then click on the HLVG sub-menu option. If you don't see it there, chances are you did something wrong when you copied the HLVG.8bf file, so double-check you indeed copied it to the right directory. Agaion't forget to restart Photosanytime you copy a plug-in filter to the Plug-Ins directory so Photoshop knows there.

Select Strong, Medium or Weak, depending on whether you want HLVG to get rid of all green noise, about half of it, or just slightly. The recommended setting is Strong.

A note about lightness

HLVG may affect the lightness of the image a bit (the L component of the image if converted to CIELab). This is because the current version of HLVG does not save the lightness prior to applying its "degreening" algorithm (it might in a future version).

In order to preserve the exact lightness as the original image, it is recommended to follow this process:

  • Duplicate the layer where you'd like to apply HLVG.
  • Make the blending mode of that new copy to "Color".
  • Apply HLVG over that new layer.
  • Merge that new layer back with the original

The above process will get rid of unwanted green noise and hues without affecting the lightness at all. HLVG doesn't degrade the lightness considerably, so using it directly doesn't do a bad job, although I do recommend following the method I just described.

Bit depth

HLVG should work on images of either 8, 16 or 32 bit depth. If you find that HLVG didn't work with your image, again, let me know.

Color Mode

HLVG only works well when the image is in RGB mode.  You can still use HLVG when you're in Lab or CMYK modes for example - HLVG won't complain - but the results will not be what you were expecting. Although this is something HLVG should take care of internally - say converting the image to RGB mode internally, then back to whichever mode it was before - at this point HLVG does not check the current color mode being used, and it simply assumes the image is in RGB mode, so you must make sure your image is in RGB mode prior to using HLVG.

"Could not complete..." error

HLVG will not work on monochrome layers, or on individual channels. If you try to execute HLVG on a monochrome layer or an individual channel, you will get the following error:

"Could not complete  the HLVG command because of a problem with the filter module interface"

Simply OK the error message and make sure you select a color (RGB) layer before applying HLVG. After all, it doesn't make much sense running HLVG on monochrome data, right?


HLVG and selections

If you preselect an area in your image - either with the lasso tool, select range, etc. - and then run HLVG, you may be in for a disappointment when you notice that HLVG completely ignored your selection and applied the effect to the entire image. Although I believe that HLVG works best when we leave it up to the plug-in to decide what areas require "HLVG'ing" and which don't, I can understand this behavior of ignoring a selection may feel odd to some people.While there's a chance I may "fix" this in a future version, if you must apply HLVG to just a specific area of your image, you can still do it by creating a mask, just not a selection. I don't recommend it, but if you must, that should do the job.



:: 47 Comments

Comments

Nor (Contact, Page), August 22nd, 2010, 14:30
I just tried HLVG on PS6 and I get an error " Could not compete the HLVG command bevause of a problem with the filter module interface"

Any Ideas?

Thanks
nor

RBA (Contact, Page), August 22nd, 2010, 15:34
Hello Nor,

I know one can get that error if the image is grayscale, although I would expect you tried to run it over a color image (running HLVG on a grayscale image wouldn't do anything useful). I guess there might be other cases that would generate that error but I can't think of any right now. If you could post some information about your image (mode, size, etc) that might help track it down.

Nor (Contact, Page), August 25th, 2010, 16:41
I just ran the HLVG filter again but this time on a JPG image and it worked fine. Previously I tried to run it on a Photoshop file (PS6) and that is when I got the error.

Cheers
Nor

Bill Snyder (Contact, Page), September 30th, 2010, 20:31
Just tried the HLVG plugin It works Great!!

RBA (Contact, Page), September 30th, 2010, 20:37
Glad it works for you, Bill.
Thanks for the feedback and enjoy it!

domenicus (Contact, Page), October 20th, 2010, 6:06
Does this plug_in work also in Photoshop Elements?
Thanks

RBA (Contact, Page), October 21st, 2010, 0:33
Hello Domenicus. I haven't tried the plug-in in PS Elements. You're welcome to try and install it and let me know if it works. If other PS plug-ins are known to work with Elements, there's a chance HLVG will work too, but honestly I have no idea.

Gianfranco (Contact, Page), December 5th, 2010, 14:40
I also experienced the error" Could not complete the HLVG command bevause of a problem with the filter module interface". The error don't happens if i apply the hlvg filter withoutyour procedure.
Any suggestion?
Thank you for answer
gianfranco

Doug (Contact, Page), January 27th, 2011, 2:29
FYI Rogelio, the plugin works fine on CS5. Useful bit of kit - great work! :)

Greg Parker (Contact, Page), August 18th, 2011, 8:57
Hi Rogelio, I can confirm it runs fine on Windows 7 64-bit with CS3.
Greg

Dave (Contact, Page), September 26th, 2011, 12:51
Hi Rogelio,
I can confirm that your filter works fine with Photoshop CS5 64 bit version running on Windows 7 Home Premium (also 64 bit).
Thanks
Dave

Mike Sherick (Contact, Page), September 28th, 2011, 12:33
This filter is exactly what I have been looking for! Works great in PS CS4 64bit.

Dave (Contact, Page), October 13th, 2011, 11:52
This works fine with elements 9

Nadeem Shah (Contact, Page), September 27th, 2012, 0:38
Hi Rogelio

Your HLVG plugin works well with Corel Paint Shop Pro X4 & X5 Versions.

Thanks for the Plugin. Cheers.

daniel (Contact, Page), September 28th, 2012, 2:26
hi i cant get it to work with cs3 i have download both versions and moved the file into plugins but nothing in the filter menu in cs3

Moonstruck (Contact, Page), October 21st, 2012, 1:08
it does not work with Paint.NET v3.5.10 (Final Release Build 3.510.4297.28964)

:(

[Bad parameters]

but thx :)
greetz
sascha

Steve Mohr (Contact, Page), January 24th, 2013, 13:04
Hello Rogelio,

What a wonderful plugin you've generously shared. It works so easily and extremely effectively.

Thank you kindly,

Steve

Rob Courtier (Contact, Page), April 8th, 2013, 21:37
Downloaded, installed, have PS2, said it installed.
Can't find it.

Marc Eichenberger (Contact, Page), June 13th, 2013, 12:08
Thanks a lot for this very helpful plugin - it works like a charme! PS2 (32-bit) on Win7 64-bit.

Gustavo (Contact, Page), July 23rd, 2013, 9:32
Thank you for share your knowledge. Ad pay pal for donations, a lot of people don't like put credit card numbers because don't know about the safety in the page. I'll be checking for to do my donation, Thanks again. Gus

John Blum (Contact, Page), August 10th, 2013, 17:53
Very helpful tool and simple to install. Thanks!

JB

Brian Brown (Contact, Page), September 26th, 2013, 18:59
I extracted the HLGV64.8bf file w/ Winzip and after putting it in the Plug In file got the following message: "The application or DLL C:\Program Files\Adobe\Adobe Photoshop CS4\Plug-ins\is not a valid Windows image. Please check this against your installation diskette." I tried it in both "Plug Ins" and "Filters" and got the same message after restarting. Any thoughts? Thanks! Brian

Brian Johnson (Contact, Page), March 14th, 2014, 11:58
Hi, I would love to use HLVG but I get the messages "unable to complete your request because it is not the right kind of document." Can you help explain what I should do. I am useless with computers. I am using vista operating system on my laptop and PS CS5.1 . It is not a 64 bit machine.
I have tried the non 64 bit download and the 64 download but I get the same message when I click on open the unzipped files. It opens up photoshop then displays the message , not right kind of file. ?? Any ideas need to be put in simple words that I can follow. Thank you
Brian.

RBA (Contact, Page), March 25th, 2014, 10:36
Brian, you must apply the filter to a RGB color layer. If you're applying it to a: channel, grayscale image, non-RGB layer, etc. you'll get that error.

J.J. Losada (Contact, Page), June 9th, 2014, 11:38
Hola Rogelio. Acabo de descubrir tu herramienta y me has hecho feliz. He cambiado de cámara, una 6D, y el verde se acentúa mucho más que con mi antigua apsc, cosa que todavía me pregunto el por qué, pero bueno, de momento y gracias a ti, solucionado. Muchas, muchas gracias.
Saludos desde España.

Steven Christenson (Contact, Page), June 27th, 2014, 13:25
FYI... I just loaded this into Photoshop CC 2014 on windows 7 and it works. I'd say it's a well written plugin to continue to work this long in the ever-changing world of Photoshop!

Chandrashekar (Contact, Page), August 1st, 2014, 9:29
I downloaded and copied the file as explained but it does not appear in filters. I am using Photoshop CS6 which is not listed in your list of compatible versions. Is it not supported?

thanks!

Bill (Contact, Page), October 30th, 2015, 11:40
I can not figure out how to get this plug in into Adobe Lightroom?

jose (Contact, Page), January 23rd, 2016, 12:08
Hola, he descargado y copiado el archivo pero no me aparece en filtros en photoshop cs6....como solucionarlo.
Gracias

Terry (Contact, Page), January 31st, 2016, 2:57
A friend sent me your link after noticing a green tinge in my photos. I loaded it into Photoshop CC 2015. It works great, many thanks.

Ed (Contact, Page), March 9th, 2016, 19:21
I am not able to install this on PS CC 2015. Apparently, you cannot add the plug-in directly in PS CC any longer. It looks like some else had success doing it, so, I would love to know how!

Rogelio Bernal Andreo (Contact, Page), March 9th, 2016, 20:07
Ed, I've seen it work on CC 2015, same method: copying the file to the plugins directory and restart Photoshop. Double-check you're using the right - 32 or 63 bit - version. I've had people telling me "yeah I'm using the right one", then three days later "I figured it out, i was using the wrong one", so DO double-check.

Ed (Contact, Page), March 9th, 2016, 20:24
I figured it out using a work-around I found for a different plug-in on another site. Thanks...and it does work!

Rogelio Bernal Andreo (Contact, Page), March 9th, 2016, 20:35
Cool! Glad you figured it out.

John (Contact, Page), October 26th, 2016, 8:22
Rogelio, is the link still active for download of the HLVG plug-in? I'm on the page now and the link does not appear to be active?

RBA (Contact, Page), October 27th, 2016, 9:46
John, I already sent you an email privately but I have to wonder... if you wrote that message it means you're in the page, right? :-) It's true, as I told you, that there's no link from the main page to here - something I hope to get fixed ASAP.
Thanks!
Rogelio

maz51 (Contact, Page), December 19th, 2016, 3:35
Ho scaricato HLVG, l'ho provato su alcune foto funzina molto bene, grazie

andy nuttall (Contact, Page), April 23rd, 2017, 11:18
when i try to install this i get the message this is not the right type of document.
My system is win 8.1 and i,m using Photoshop cc 2017.
I get the same message with 64 or 32 bit

RBA (Contact, Page), April 24th, 2017, 21:43
Andy, I assume you mean when you RUN the plugin, not when you install it. This error usually means that the image is not in RGB mode, or that you have selected a single channel.

Marcus (Contact, Page), July 16th, 2018, 13:50
I am unable to make Photoshop see the HLVG plugin. I am on Mac OS 10.13.5 with Photoshop CC 2018. I tried putting both the 64 bit and 32 bit HLVG files in the plugins folder, located at /Applications/Adobe Photoshop CC 2018/Plug-ins . However, when I restart photoshop, HLVG is not under the "Filter" tab. Seems like photoshop isn't seeing the file for some reason.

Rogelio Bernal Andreo (Contact, Page), July 16th, 2018, 14:37
Marcus, the plugin only runs on Windows. I mention it under "Requirements" right after the sample images. Sorry!

Mark (Contact, Page), July 31st, 2018, 11:35
On CS6 Extended 64-bit, on Win10Pro 64bit, HLVG v0.1, HLVG64, get error " Could not compete the HLVG command bevause of a problem with the filter module interface"

Rogelio Bernal Andreo (Contact, Page), July 31st, 2018, 12:08
Mark. Make sure your image is in RGB mode and make sure the layer selected is a color layer (not a mask, adjustment layer, etc). Most of the times, this error happens because the plug-in finds it can't work with the selected mode/layer because it's not a colored layer.

Carsten Eckhardt (Contact, Page), October 16th, 2018, 15:24
Also works on CC 2019

David Fisherowski (Contact, Page), October 22nd, 2019, 9:42
Downloaded both versions and tried to load each into PSCC. Clicked on load actions it went to the file to pick it and when it did it went to another screen and showed nothing to load. What am I doing wrong?

Rogelio Bernal Andreo (Contact, Page), October 23rd, 2019, 12:13
David, these are not actions but plugins. Read the "Installing HLVG" and "Using HLVG" sections above for a proper install.

Ric Chan (Contact, Page), January 10th, 2020, 1:56
Works on PSCC2019...this is a very helpful.
Thanks!

Alec (Contact, Page), April 12th, 2020, 16:20
Thanks, works like a charm on PSCC 64bit

David Connolly (Contact, Page), April 23rd, 2020, 0:56
When i try and install the plus in, i get a message telling me that its the wrong kind of document, windows 10 and PS CC2019

Rogelio Bernal Andreo (Contact, Page), April 25th, 2020, 16:43
David, I could be wrong but it looks like you're trying to open the file? Are you placing the *.8bf file in the Photoshop's plugin directory?

Jason J. (Contact, Page), December 14th, 2020, 7:07
I’m having trouble with seeing the plug-in with the latest photoshop CS. It appears that Adobe changed their plug-in format and now even though it’s in my plug-in directory but not showing up under the drop down in the application. I miss using this and hope you can find time to update this amazing plug-in. Thank you for this and all your other great products!

Rogelio Bernal Andreo (Contact, Page), December 15th, 2020, 6:55
Jason, what's the directory you're putting the plugin file? I know the plugin still works with the latest Photoshop CS, so there's definitely no compatibility issues.

klaus lund (Contact, Page), December 25th, 2020, 1:25
Here is the right path to put the file
C:\Program Files\Adobe\Adobe Photoshop 2021\Required\Plug-ins

Richard Kowalczyk (Contact, Page), January 1st, 2021, 20:02
I've read all the above but it's still not clear where I am suppose to load the file into PS. I know not to open the file but where in windows or in PS is there a please to type the file path or download a file?

Wolfgang Tillmann (Contact, Page), January 18th, 2021, 12:55
unfortunately It does not work with Photoshop 2021 under Mac OS .

Rogelio Bernal Andreo (Contact, Page), January 19th, 2021, 19:48
Wolfgang, that's correct. If you read the "Requirements" section, it says it only works on Windows (I don't have a Mac so I can't compile the plugin for macOS). Sorry about that!

Stu Parker (Contact, Page), March 10th, 2021, 12:03
Hi Rogelio
This tool is fantastic works really well especially my ZWO ASI2600MC camera.Many thanks.I will donate to the "beer fund"
I did meet you at the AIC a few years ago
Cheers
Stu

Ted Davis (Contact, Page), May 15th, 2021, 14:27
I would love to get this one working! I can't seem to get it to work in PS 2021. PS I am a definite "Beer" contributor Hint hint! I'm a windows 10 user. I've tried what Klaus Lund said above and the same directory that Gradient exterminator is in. I can't figure this one out. It says "HLVG No version" under system info

Avci (Contact, Page), July 18th, 2021, 16:42
Unfortunately, this doesn't work on PS2021. Copying file into plugins folder does not work like it used to on PS2020 or older versions. Only way to add plugins seems to be via Adobe marketplace. Anyone has any workaround to that?

Pete Brown (Contact, Page), November 26th, 2021, 11:51
I have verified that this works in Photoshop 2022 on Windows 11. Maybe 2022 changed some things from 2021, but I suspect something else is going on there.

Wuping Ma (Contact, Page), January 18th, 2022, 11:59
Hello, I am trying to run this in Photoshop 22 but I keep getting this error: "HLVG NO VERSION - - from the file “C:\Program Files\Adobe\Adobe Photoshop 2022\Plug-ins\HLVG.8bf”"

Does anybody know why this might be happening? Thanks

Ron Abbott (Contact, Page), March 8th, 2022, 10:55
I downloaded the HLVG 64bits file, and extracted it to: C:\Program Files x86\Adobe\Adobe PS2\Plugins\Filters.
I re-started my computer, started PhotoShop PS2, loaded an image.
Under the filter menu, I am not seeing the Deep Sky Colors option.
What am I doing wrong & how can I correct this?

Post a comment
Your name:
Email: (we don't share this!)
Your web site:  (if you have one)
Comment:


(you have 1000 characters left)