What's wrong with my scanner calibration?

I’m struggling with the color calibration of my scanner and maybe I can get some help here. I profiled my scanner using an IT8.7/2 target (R181224). I then used ImageJ to calculate the average color in each cell of the target and compared the reference vs. observed values. The default for ImageJ to convert from RGB to Lab is to use D65 white point. I also tried to use D50 white point but results with D65 are better. Here’s my problem: I get a pretty good relation between observed and reference values of L* and b* but there is some error regarding a* value (i.e. green colors seem to be both underestimated and overestimated). What could be the problem?


I’d really appreciate an answer!

How did you compute the transformation from measured RGB to Lab? Without knowing the colour space, this is not possible!

What you really want to have is an ICC profile and use full-fledged colour management. Why don’t you use Argyll to derive that?


Hi Jossie, thanks for your answer.
What do you mean about not knowing the colour space?
Basically I use ImageJ to compute the transformation. It uses D65 white reference point to normalize XYZ values. The code is written below, where rf, gf and bf are R-G-B values for each pixel in the image.
I used VueScan to generate the ICC profile and apply it to the IT8 target before calculating the color. Should I use Argyll then? What about Lprof or CoCa profiling softwares, would you recommend me those?

for(int q=0; q<size; q++){
        float l, a, b;
        rf[q] = (rf[q] > 0.04045f)?(new Double(Math.exp(Math.log((rf[q]+0.055f)/1.055f)*2.4f))).floatValue():rf[q]/12.92f;
        gf[q] = (gf[q] > 0.04045f)?(new Double(Math.exp(Math.log((gf[q]+0.055f)/1.055f)*2.4f))).floatValue():gf[q]/12.92f;
        bf[q] = (bf[q] > 0.04045f)?(new Double(Math.exp(Math.log((bf[q]+0.055f)/1.055f)*2.4f))).floatValue():bf[q]/12.92f;

        rf[q] = rf[q] * 100f;
        gf[q] = gf[q] * 100f;
        bf[q] = bf[q] * 100f;

        float X = 0.4124f * rf[q] + 0.3576f * gf[q] + 0.1805f * bf[q];
        float Y = 0.2126f * rf[q] + 0.7152f * gf[q] + 0.0722f * bf[q];
        float Z = 0.0193f * rf[q] + 0.1192f * gf[q] + 0.9505f * bf[q];

        // XYZ to Lab
        float fX, fY, fZ;
        float La, aa, bb;            
        //WAH normalize to L*a*b* color space using D65 white reference
        // from Color_Space_Converter code: public double[] D65 = {95.0429, 100.0, 108.8900};

        X = X / 95.0429f;
        Y = Y / 100.0f;
        Z = Z / 108.89f;
        if ( X > 0.008856f )
            fX = (new Double(Math.exp(Math.log(X)/3f))).floatValue();
            fX = ((7.787f * X) + (16f/116f)); 

        if ( Y > 0.008856f )
        fY = (new Double(Math.exp(Math.log(Y)/3f))).floatValue(); 
        fY = ((7.787f * Y) + (16f/116f));

        if ( Z > 0.008856f )
        fZ =  (new Double(Math.exp(Math.log(Z)/3f))).floatValue(); 
        fZ = ((7.787f * Z) + (16f/116f)); 

        l = ( 116f * fY ) - 16f;
        a = 500f * ( fX - fY );
        b = 200f * ( fY - fZ );
        c1[q] = l;
        c2[q] = a;
        c3[q] = b;


Okay, you did not mention that this is already the “second iteration”! Without knowing the colour space, you cannot calculate Lab-values. If you have an image already in say sRGB you can use ColorTransformer2 in imageJ to convert to Lab.

VueScan’s colour management is minimalistic, i.e. it only knows matrix profiles, not LUTs. So the results are not optimum, to say the least. E.g. for Kodachrome, the profiles are useless.

CoCa internally uses Argyll. So you have a GUI and do not have to use the command line. But it does not allow all the options provided by Argyll. And it always calculates the inverse profile, which is not needed for a scanner, but it needs most of the computing time. As far as I have tested, Lprof’s profiles are not as good as Argyll’s.



I’m scanning with a HP G4050 Scanjet, which scans using sRGB color space as far as I can tell from the scanner documentation. I’m sorry for my low level of expertise here… So, if my scanner color space is sRGB there’s no need to use an IT8 target to calibrate the scanner?
For scientific purposes I need the color of my scans to be in a device-independent color space, so that other people can also get the same colors as me.

Thanks for the software recommendation, I’ll check it out!

The question would be, how good is the “sRGB”?

I would assume that an ICC-profile would still improve the colours – but not with VueScan’s ICC-profiles. Please note, that VueScan can only handle ICC-profiles with less than 1kByte in size (i.e.matrix profiles). If you give it a large LUT profile, it does not complain, but just ignores it.

It need not be Lab, because sRGB is also device independent, if it is really sRGB. Only then there is a unique transformation from sRGB to Lab.
If you use Argyll and its profcheck command, you could compare the scanner colour space to sRGB and see if they coincide.

Does this mean working with the pixel values or just viewing on a monitor? If the latter is the case, you need a calibrated monitor.




so that other people can also get the same colors as me.

Does this mean working with the pixel values of viewing on a monitor? If the latter is the case, you need a calibrated monitor.

Let me stress the point Jossie just made: the monitors that “other people” use also have to be calibrated. Otherwise, you cannot guarantee a thing :frowning:

Have fun!
Claes in Lund, Sweden

Sorry it’s not that “others can see the same colors as me”, as I said. It’s more about the color values I want to get standardized, in order that “my color values of Lab/RGB measured with my scanner are the same (or similar) than Lab/RGB values using another scanner”.

I’ll check this out and let you know!

Thanks for your precious responses.

So I would strongly recommend that you make yourself familiar with the details of colour management, which will guarantee just that.


In relation to this, I have located the sRGB color space .icc file, but where can I find the one for the scanner? Does it have to be provided by the manufacturer? Or can I generate it? Or is it the .icc profile I generate using a IT8 target?

Also, just one last question: I use VueScan for scanning the IT8 target. As for any other scanning software, with what configuration should the IT8 target be scanned before making the ICC profile in Argyll? I guess without any color correction option marked, and no color balance (?). Should it be in RAW format? I get a really dark image output doing this.

Thanks for the suggestion, I’ve definitely learned a lot today.


Hello Liam,

I assume you are scanning slides and not negatives. For negatives there is no IT8-calibration available!

This is the one. But as I said, what VueScan creates is not optimum.

Yes, all tools turned off! I would use the “raw” format. These images are dark because there is no gamma correction applied to them. What to do exactly depends on how you want to proceed.

I would do the following:

  • Scan IT8-target and slides into “raw” format with VueScan with the auto exposure turned off. If IR-channel is to be used for dust and scratch removal, incorporate this into the “raw”-image (see VueScan manual for details for both items). Save “raw” scans in TIF format.
  • create ICC profile with Argyll, this will incorporate the gamma correction automatically
  • embed this profile into the scans of the slides, e.g. with EXIFtool:
    exiftool file-name -icc_profile<=C:\Windows\System32\spool\drivers\color\Argyll\my_profile.icc
    Wildcards in file name are supported, so you can do this with one command for a bunch of scans. Path and profile name are, of course, my example.
  • use image processing software that supports full colour management to render the scans into a standard colour space like sRGB or AdobeRGB

Please ask, if you have any questions about this procedure.


To learn the basics about colour management I can highly recommend the book by Fraser, Murphy & Bunting (second edition 2005) “Real world color management”.


Just for completeness:

Ideally you should use a target exposed onto the same emulsion like the slides to be scanned.

Giorgianni & Madden (2008) write in their book "Digital color management – encoding solutions): An RGB scanner will produce accurate CIE colorimetric values, based on a particular light source, only when used with a transform that is specifically designed for the particular medium being scanned. If a medium having a different set of colorants is scanned, the transformation likely will be inaccurate.

However, emulsions developed according to the E-6 process (Ektachrome, Fuji…) give rather similar, albeit not identical, results. Kodachrome, developed according to the K-14 process, however, requires a target on Kodachrome film.