Posted: April 26th, 2010
About HLVGHasta 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.
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 examplesThe 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.
RequirementsTo 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 itDownloading 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 HLVGOnce 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 HLVGWhen 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.
A note about lightnessHLVG 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:
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 depthHLVG 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 ModeHLVG 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..." errorHLVG 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 selectionsIf 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.
:: 34 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"
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.
Bill Snyder (Contact, Page), September 30th, 2010, 20:31
Just tried the HLVG plugin It works Great!!
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?
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.
Thank you for answer
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.
Dave (Contact, Page), September 26th, 2011, 12:51
I can confirm that your filter works fine with Photoshop CS5 64 bit version running on Windows 7 Home Premium (also 64 bit).
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
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)
but thx :)
Steve Mohr (Contact, Page), January 24th, 2013, 13:04
What a wonderful plugin you've generously shared. It works so easily and extremely effectively.
Thank you kindly,
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!
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
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?
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.
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.
maz51 (Contact, Page), December 19th, 2016, 3:35
Ho scaricato HLVG, l'ho provato su alcune foto funzina molto bene, grazie
Post a comment