HomeHomeUpUpSearchSearchMailMail
NEW

Help for using PSP-script with color/gray scale

When using PSP-script with a color scale the following steps can be done:
  1. Prepare your Windows system once:
    1. Download and install PSP9 (demo is freeware for 30 days) in the default directories.
      PSP9 (/python)  is much cheaper than Photoshop and for my optimization purpose they are comparable (although Photoshop has at least one advantage over Python; like a larger color depth of 16 bits, which gives less color noise when doing the optimization).
      The below methodology works also with PSP8, but one needs some editing in the scipy modules (this is somewhat cumbersome). I have reported this with scipy organisation (who knows). If wanted, I can provide instructions (I myself use PSP8;-), so let me know (remove underscore in presented e-mail address).
      I don't have a script for Photoschop;-), if you want to help make one, let me know (remove underscore in presented e-mail address).
    2. Download and install python 2.3 (freeware) in the default directories.
    3. Download and install scipy (a python package; freeware) in the default directories.
    4. Download and install Numeric (a python package; freeware) in the default directories
    5. Download and install PIL (a python package; freeware) in the default directories
    6. Download and save sitecustomize.py (a python module: right click on link and Save [Link] Target As...: sitecustomize.py) in the C:\Program Files\Jasc Software Inc\Paint Shop Pro 9\Python Libraries\Lib directory
    7. Download and save PSP-script (right click on link and Save [Link] Target As...: pickcolor07.PspScript) in the My Documents -> My PSP9 Files -> Scripts-Trusted directory.
  2. Use my methodology:
    1. Start PSP
    2. Open the picture xyz.bmp/jpg/tif (File -> Open). It is important to be sure that the original file has been made properly, see for hints this link.
      To be sure that you don't overwrite this file, you could make it read-only.
      Not all extension are allowed; bmp, jpg and tif certainly work. With others, just give it a try;-)
    3. Two color pick method can be used, and they need different preparations:
      1. Hand pick:
        One picks the color patch location oneself:
        • Zoom In (scroll wheel on mouse or View -> Zoom) in such a way that the color scale takes up as much space as possible in the picture window.
        • Select the Dropper Tool (E) and use an as large as possible Sample size. This depends on the actual color patch size in the picture; make the Sample size around three times smaller then the pixel size of the black patch.
      2. Auto pick:
        One makes a file with only the color scale in it:
        • Use the Perspective Correction tool, and position the provided bounding box precisely along the borders of the color scale (use Zoom In to get an as big as possible picture of the color scale).
        • Then press Apply
        • Use the Selection tool (S) to copy (Edit -> Copy: Ctrl-C) precisely the color scale and paste it (Edit -> Paste As New Image: Ctrl-V)
        • Save (File -> Save: Ctrl-S) this image in same directory as original file using file name: xyz-scale.bmp/jpg/tif.
        • To be sure that you don't overwrite this file, you could make it read-only.
    4. Make sure the original picture is selected in PSP
    5. Select and run the PSP-script . Using: 
      • icons on Script toolbar: Select Script -> pickcolor07 and Run Selected Script or
      • File->Script->Run...->pickcolor07.PspScript.
    6. The PSP-script wil ask which color scale is being presented in the picture, give ifrao, ifraom (the macro scale of the IFRAO standard scale), pietje, pietjem (the macro scale of the PIETJE color scale) or macbeth and press OK.
      To stop the PSP-script you can press Cancel.
      If the PSP-script does not ask for this, just rerun the PSP-script.
    7. For some color scales, the PSP-script will ask the version of the color scale: type in one of the presented versions and then OK. To stop the PSP-script you can press Cancel.
    8. The PSP-script will ask if one wants to hand pick the color patches (Yes, goto step I) or that it uses auto-pick with a pre-made file that has only the color scale in it (No, goto step J). This pre-made file must have been named:  xyz-scale.bmp/jpg
    9. If pressed Yes, the PSP-script asks to pick out the color patches in the order of left to right and up to down (see also the help text presented in the Script Output window. Click after each picked out color patch; OK.
      To stop the PSP-script you can press Cancel.
    10. After hand/auto picking all color patches, the PSP-script asks for the color space of the wanted target: give or sRGB or AdobeRGB and then OK.
      To stop the PSP-script you can press Cancel.
    11. Now the PSP-script will do its calculations and will adjust the picture accordingly. The result should be closer to the true image of the photographed object.
    12. Diagnostic messages are displayed in the Script Output palette:
      • WARNING
        • under or over exposure (make sure to make good pictures)
        • optimized color patches with gamut errors (perhaps use AdobeRGB as target color space) ,
        • the color patches are too small (have it bigger in the picture),
        • less than 75% of color patches are usable (due to under/over exposure, so make good pictures) and
        • when variation of the black or white patches is more than 10% of the average values (this could be due to glaring of the color scale, have good lighting of subject).
        • Optimization ended by user (by pressing CANCEL)
      • ERROR
        • no picture active in PSP (load a picture)
        • wrong file type or not in color (translate file to e.g. bmp, jpg or tif)
        • PIETJE color scale does not yet have target color values (just wait a few days;-)
        • no auto-pick file available (make a file with at the end -scale in the filename)
        • color patches are removed from the optimization (make sure to make good pictures),
        • if less then two patches available for optimization (due to under/over exposure, so make good pictures)
      • Other messages
        Tell the progress of the process and give intermediate results
    13. The optimized picture is saved with file name: xyz-optimum.bmp/jpg/tif
    14. The methodology takes less then a minute per picture.
    15. Remember that due to the limited amount of color patches in the color scales (even the Macbeth ColorChecker), the optimization/calibration with the PSP-script (or any other program) can't be perfect. But it is a good step in the direction. One can always further manipulate the file in one's own program (like Paint Shop Pro (can only handle sRGB) or Photoshop (and make sure Photoshop is in sRGB/AbodeRGB mode [Edit -> Color Settings [Shift+Ctrl+K]-> sRGB IEC/AdobeRGB (1998)]).
Remark:
The python Image module does its picture handling in 8 bit color depth; this could be too low (16 bit color depth is preferred) and will increase color noise. This is relatively easy to adjust (will be done in the near future).

All the above information is provided with no warranty. Constructive feedback is very welcome, so let me know (remove underscore in presented e-mail address).
This work is done independently from any organization or software producer (like: Jasc, python, scipy or IFRAO) and I have no financial relations with any of them, furthermore usage of this is totally your own risk.

More information on my investigations with regard to color optimization can be found on this page.

Disclaimer and Copyright
HomeHomeUpUpSearchSearchMailMail

Major content related changes:  Aug. 25, 2005