Pages: [1]   Go Down

Author Topic: Any hacks for profilemaker measuretool to generate rectangular patches?  (Read 994 times)

smilem

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 275
    • Color Management Services

Hello, are there any way to make profilemaker measuretool to generate rectangular (more in length then in height) patches for i1isis?
I does allow to generate these for i1pro iO etc.

Other then that perhaps there is a way to make i1profiler generate same amount of rows as measuretool with same patch size, beause I get 35rows on measuretool and 34 on i1profiler for same patch size. This may seem not much but it does make extra page with half filled target.
Logged

Pat Herold

  • Full Member
  • ***
  • Offline Offline
  • Posts: 144

I assume you have reduce your margins and header length to the minimums already? 
One hack is to create a custom page size in i1Profiler that is slightly larger (longer) than your actual page size - enough to trick it into adding that last row.   You can always crop the final .tiff image back to your actual page size later.
Logged
-Patrick Herold
  Tech Support www.chromix

Doug Gray

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1675

It's pretty easy to create CGATs files. I use Matlab but many use Python or whatever they have handy. I also create my own 16 bit tiff file iSis targets for special purposes like measuring effective aperture or specifying printed colors in ProPhoto that need a bit more accuracy than 8 bits provides. That's also a bit more complex Matlab program but I can't imagine doing it in Photoshop.
Logged

datro

  • Full Member
  • ***
  • Offline Offline
  • Posts: 180
Re: Any hacks for profilemaker measuretool to generate rectangular patches?
« Reply #3 on: November 29, 2018, 03:33:29 PM »

@Doug,

I use Python for some of my imaging work, including reading/analyzing CGATS files and making i1Profiler patch files.  I now have a need to create a 16-bit greyscale target with 256 patches and I'm trying to figure out how best to do this.  You mention above that you have created your own 16-bit tiff targets and I'm wondering if you could share more details on how you do this.  Unfortunately i1Profiler only outputs TIFs with 8-bit patch values and this is where I'm stuck.

Thanks,
Dave
Logged

Doug Gray

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1675
Re: Any hacks for profilemaker measuretool to generate rectangular patches?
« Reply #4 on: November 29, 2018, 04:04:03 PM »

@Doug,

I use Python for some of my imaging work, including reading/analyzing CGATS files and making i1Profiler patch files.  I now have a need to create a 16-bit greyscale target with 256 patches and I'm trying to figure out how best to do this.  You mention above that you have created your own 16-bit tiff targets and I'm wondering if you could share more details on how you do this.  Unfortunately i1Profiler only outputs TIFs with 8-bit patch values and this is where I'm stuck.

Thanks,
Dave

What kinds of values do you want to put in 16 bit grayscale?  I have a series of Matlab functions that read/write CGATS, convert colorspaces, and create and print 8/16 bit images formatted for iSiS but not I1Pro or I1Pro2. Possible Patchtool may do the job but while not too expensive, it's not free.

What are your specific image requirements and the specification or format your data is in? With that I might have specific suggestions.
Logged

Ethan Hansen

  • Full Member
  • ***
  • Offline Offline
  • Posts: 132
    • Dry Creek Photo
Re: Any hacks for profilemaker measuretool to generate rectangular patches?
« Reply #5 on: November 30, 2018, 02:56:16 PM »

Imagemagick is an open source editor that can also be used to create arbitrary images. While probably not the most efficient way, the convert command creates an image and the splice operator adds color(s).

I'm unsure about using 16-bit reference files and targets with i1Profiler. I have not checked the most recent versions but earlier versions converted reference values to 8-bits at some point in the process. Profiles made from the same test chart were identical when values were specified as 16 bit or 8 (truncated rather than rounded, if my memory isn't too fuzzy).

Doug Gray

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1675
Re: Any hacks for profilemaker measuretool to generate rectangular patches?
« Reply #6 on: November 30, 2018, 04:24:58 PM »

Imagemagick is an open source editor that can also be used to create arbitrary images. While probably not the most efficient way, the convert command creates an image and the splice operator adds color(s).

I'm unsure about using 16-bit reference files and targets with i1Profiler. I have not checked the most recent versions but earlier versions converted reference values to 8-bits at some point in the process. Profiles made from the same test chart were identical when values were specified as 16 bit or 8 (truncated rather than rounded, if my memory isn't too fuzzy).

It's best to use I1P for reading scanned values. It will load a CGATs file and preserve the fractional RGB values when scanned with a spectro and saved as CGATS. It discards the fractional parts for the data saved in the profile (if you save it) if you generate a profile directly.

However, I1P does convert fractional RGB values like 127.55 to integers when saving image format files as well as creating tifs or printing. In one case it round, in the other it truncates.  One needs to print the 16 bit files directly to the printer w/o color management. There are issues around 16/8 bit drivers best avoided by loading a 16 bit target image in Photoshop and converting to 8 bits with the dither option set in color settings. Then just using the 8 bit driver using something like ACPU. This approach works quite well and I've done considerable testing of it with an iSiS 2 XL.

There are threads here with more details but that sums up the critical stuff.

I haven't checked if the most recent versions address this. I did this testing on V1.7
« Last Edit: November 30, 2018, 04:28:31 PM by Doug Gray »
Logged

Ethan Hansen

  • Full Member
  • ***
  • Offline Offline
  • Posts: 132
    • Dry Creek Photo
Re: Any hacks for profilemaker measuretool to generate rectangular patches?
« Reply #7 on: November 30, 2018, 08:39:40 PM »

The question is whether i1P actually uses 16-bit data in the profile calculations. The tests I did were to make a profile from a minimal data set - accuracy was not what I cared about. Using the same spectral measurements i1P made identical profiles when 16 bit reference values were dropped to 8 bit. Again, the measurements were identical, just the reference values altered.

That suggested the internal calculations went to 8 bits at some point. This was with i1P version 1.6.something.

Doug Gray

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1675
Re: Any hacks for profilemaker measuretool to generate rectangular patches?
« Reply #8 on: November 30, 2018, 09:14:46 PM »

The question is whether i1P actually uses 16-bit data in the profile calculations. The tests I did were to make a profile from a minimal data set - accuracy was not what I cared about. Using the same spectral measurements i1P made identical profiles when 16 bit reference values were dropped to 8 bit. Again, the measurements were identical, just the reference values altered.

That suggested the internal calculations went to 8 bits at some point. This was with i1P version 1.6.something.

I recall testing that at one time and I think it did but it's been a while and I'm not totally positive. Because of the 8 bit limitation, I haven't made profiles from fractional data. When I1P generates them, and it can, I save the target data and reload it so it's always 8 bit.

Easy to test. I'll see if I can find a CGATs file suitable to make profiles with fractional bits and test it. It's a quick test if I can find one.
Logged

Doug Gray

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1675
Re: Any hacks for profilemaker measuretool to generate rectangular patches?
« Reply #9 on: November 30, 2018, 10:51:25 PM »

The question is whether i1P actually uses 16-bit data in the profile calculations.

I just checked it. I1Profiler does calculate profiles using high precision data so long as it is in the measurement file. However, after generating the profile, it converts the data to 8 bits if you save it in the default measurement format. If you save it in CGATs it retains 16 bits. Also, the patch set generator makes fractional data but as soon as you save in the default format and reload it it's back to 8 bits.

But you can generate externally whatever distribution you want in high precision and make a profile from it using CGATs format.

My approach to verifying this was (No need to do a new print):
1. Take a standard measurement file in 8 bit CGATS (0:255) for RGB.
2. Add random numbers from 0 to .4 to all RGB values greater than 0 and less than 255. Save this as comparison measurement file.
3. Make profiles from each. If I1P either truncates or rounds the two profiles should be identical.

Their AtoB/BtoA tables differ slightly as one would expect if I1P was using 16 bits.

Running 10,000 random RGB samples through both tables' AtoB1 and doing a deltaE76, the results were interesting. Ave dE was .8 and the maximum dE was 10.4

This seems quite a bit different for the relatively small RGB changes I put in.

Edit: Corrected behavior description. I1Profiler does not convert to 8 bits if you save target or measurement files in CGATS and does not automatically convert to 8 bits when generating a profile. It does, however, save the measurement data in the profile in 8 bits.
« Last Edit: November 30, 2018, 11:19:10 PM by Doug Gray »
Logged

GWGill

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 510
  • Author of ArgyllCMS & ArgyllPRO ColorMeter
    • ArgyllCMS
Re: Any hacks for profilemaker measuretool to generate rectangular patches?
« Reply #10 on: December 01, 2018, 06:58:42 PM »

Running 10,000 random RGB samples through both tables' AtoB1 and doing a deltaE76, the results were interesting. Ave dE was .8 and the maximum dE was 10.4

This seems quite a bit different for the relatively small RGB changes I put in.
Certainly interesting, but it crosses my mind that this may be expected if the "slope" of device value -> L*a*b* for the particular device in some part of its gamut is sufficiently high. i.e. is it a reflection of the profiler or the device behavior ?
Logged

Doug Gray

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1675
Re: Any hacks for profilemaker measuretool to generate rectangular patches?
« Reply #11 on: December 01, 2018, 09:22:18 PM »

Certainly interesting, but it crosses my mind that this may be expected if the "slope" of device value -> L*a*b* for the particular device in some part of its gamut is sufficiently high. i.e. is it a reflection of the profiler or the device behavior ?
Agreed. However, I have also done tests  looking at the distribution on a single profile of small changes in device RGB values. Max was about 4 dE for an lsb change. OTOH, each rgb value could be changed by up to .4 or about .7 in vector length.  Depending on how the RGB/LAB values are fitted, it's not unreasonable, just a bit more than I expected. My guess is it would have come in about .5 dE and 6 max over the 10k random set.

Part of it may be the high degree of lumpiness that my printer has. The profile would have to be fit to that and small changes would be magnified in those regions. That would explain the higher readings.

In any case the purpose was to test whether I1PRofiler used high precision RGB values or truncates/rounds them to 8 bits before making a profile.. It does.
Logged

Ethan Hansen

  • Full Member
  • ***
  • Offline Offline
  • Posts: 132
    • Dry Creek Photo
Re: Any hacks for profilemaker measuretool to generate rectangular patches?
« Reply #12 on: December 03, 2018, 12:05:11 PM »

Doug: Cool. Thanks for doing the simple check!

Were the points with maximum dE near the gamut boundary? If so, you are likely seeing the results of extrapolating beyond measured data. If instead the points are located in clumps of data from the printer's non-linear behavior, this sounds as though i1P's B-splines are running on raw measurement data rather than with preconditioning applied. A final possibility is if the points lie in an area where the gamut hull switches from convex to concave, I'd expect that tetrahedral interpolation is the root cause; tessellation really only works on convex hulls.

Doug Gray

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1675
Re: Any hacks for profilemaker measuretool to generate rectangular patches?
« Reply #13 on: December 03, 2018, 12:58:45 PM »

Doug: Cool. Thanks for doing the simple check!

Were the points with maximum dE near the gamut boundary? If so, you are likely seeing the results of extrapolating beyond measured data. If instead the points are located in clumps of data from the printer's non-linear behavior, this sounds as though i1P's B-splines are running on raw measurement data rather than with preconditioning applied. A final possibility is if the points lie in an area where the gamut hull switches from convex to concave, I'd expect that tetrahedral interpolation is the root cause; tessellation really only works on convex hulls.

Some were near the gamut boundary but most weren't. I've run further tests limiting the additional changes to .01 instead of .4 and am getting nearly the same errors! Something is clearly amiss. Since the AtoB1 tables are more accurate than the BtoA1 tables and gamut boundaries are well defined (one or more of R, G, or B must be either 0 or 255) this suggests some really different computation path when 16 bit RGB values are submitted.

The difference is so large that I'm going to create some patch sets with a diverse set of RGB triplets and see which profile generates the most accurate results using AtoB1. The differences are so great it should be easy to measure the error. I expect it will be the 16 bit version that is worse since 8 bits represent virtually all of how people use I1Profiler.

In any case I now highly recommend that no RGB values with fractional parts be used with I1Profiler. This is significant enough to warrant a new thread as it's only indirectly related to this one. Should have results later today.
Logged

GWGill

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 510
  • Author of ArgyllCMS & ArgyllPRO ColorMeter
    • ArgyllCMS
Re: Any hacks for profilemaker measuretool to generate rectangular patches?
« Reply #14 on: December 03, 2018, 08:24:32 PM »

A final possibility is if the points lie in an area where the gamut hull switches from convex to concave, I'd expect that tetrahedral interpolation is the root cause; tessellation really only works on convex hulls.
I'm not sure what you mean by that. Interpolation has many limitations, but the type that's done in ICC profiles is not sensitive to the topology of the transformation, since the basis is fixed by the grid. The output values at each node can represent any values, although they may represent the output function poorly if it is highly curved compared the grid resolution. Certainly the output function has no role in the tessellation.
Logged

Doug Gray

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1675
Re: Any hacks for profilemaker measuretool to generate rectangular patches?
« Reply #15 on: December 03, 2018, 08:56:09 PM »

I'm not sure what you mean by that. Interpolation has many limitations, but the type that's done in ICC profiles is not sensitive to the topology of the transformation, since the basis is fixed by the grid. The output values at each node can represent any values, although they may represent the output function poorly if it is highly curved compared the grid resolution. Certainly the output function has no role in the tessellation.

I agree. I've also tested the two profiles generated to see if there are some sort of discontinuities associated with the AtoB1 grid, which maps to the entire printer gamut. There were none. At this point it appears there is some sort of difference in the algorithm that creates the profiles when there are any fractional RGB values present in the CGATs file. Right now I'm trying to create a set of 8 bit RGB values in device space that produce the greatest divergence in LAB values. While I can do that by inspecting the dEs, and LAB values, I'd prefer a more analytic approach but it's something of a bear. I may revert to just selecting a set of outliers by inspection. Not my preferred approach but if the two profiles diverge from what gets printed it may be adequate.

Interesting problem.  I suspect the 8 bit (non fractional RGB values) produces better profiles simply because that's what almost everyone uses and all the pre-established target sets do not have fractional values. OTOH, generating the second pass data set produces fractional values. If not saved in default, which converts them to 8 bits, they would activate this other algorithm. I have no idea why there should be a difference. Bug or somehow intentional?  I'm determined to find out.

UPDATE:

I used the profile made with 3828 patches which provides the best results with my 9800. It's heavy on neutrals and  near neutrals where the 9800 is in need. Interestingly, the profiles diverged less (max around 6) with the larger patch count than the smaller, 1 page, 957 count profiles.

Picked 5 colors that were relatively diverse with moderate to high saturation. Ave dE 1967 was 3.9 with high precision fractionals and 1.2 with 8 bit integers. Using deltaE00, the numbers dropped to 1.8 (fractionals) and .6 (8 bit integers).

I'm just going to make sure I continue to make all profiles with 8 bit patch sets and make sure that the improved, second pass generated set is first saved so it's forced to 8 bits before I make profiles with it. Turns out this is what I have been doing out of caution. Now there's a good reason to believe it should be done.

And each of the 5 colors were further off using the 16 bit RGB generated profile than the one generated with integer RGB values.
« Last Edit: December 03, 2018, 11:14:38 PM by Doug Gray »
Logged

Ethan Hansen

  • Full Member
  • ***
  • Offline Offline
  • Posts: 132
    • Dry Creek Photo
Re: Any hacks for profilemaker measuretool to generate rectangular patches?
« Reply #16 on: December 03, 2018, 11:15:17 PM »

I did some experimentation and found i1Profiler very brittle with 16 bit reference data. I tweaked a fairly simple measurement file of approximately 1300 RGB patches by adding a random value from 0.00 to 0.17 to all reference values less than 255. i1P crashed. I then added the random values to portions of the file. Alter the reference values for 770 patches and i1P ran. Changing the 771st patch from [31, 0, 0] to [31.17, 0.02, 0.09] caused i1P to throw an "Error creating the profile" dialog. Along the way of bracketing and bisecting the measurement file down to 770 altered lines, i1P either built a profile, threw the error dialog, or simply crashed.

I then altered other lines beyond the 771st and i1P ran successfully up to a point. There were other magic reference values that crashed i1P but I did not isolate them. The CLUT values did indeed differ between profiles. I also saw some dE differences of over 8. This certainly does not reflect reality as the largest actual dE for input values differing by 0.29 (assuming all offsets = 0.17) was under 3 dE with an average under 1 dE. That said, something is definitely amiss with i1Profiler if you feed it 16 bit reference values.

Doug Gray

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1675
Re: Any hacks for profilemaker measuretool to generate rectangular patches?
« Reply #17 on: December 04, 2018, 12:33:29 AM »

I did some experimentation and found i1Profiler very brittle with 16 bit reference data. I tweaked a fairly simple measurement file of approximately 1300 RGB patches by adding a random value from 0.00 to 0.17 to all reference values less than 255. i1P crashed. I then added the random values to portions of the file. Alter the reference values for 770 patches and i1P ran. Changing the 771st patch from [31, 0, 0] to [31.17, 0.02, 0.09] caused i1P to throw an "Error creating the profile" dialog. Along the way of bracketing and bisecting the measurement file down to 770 altered lines, i1P either built a profile, threw the error dialog, or simply crashed.

I then altered other lines beyond the 771st and i1P ran successfully up to a point. There were other magic reference values that crashed i1P but I did not isolate them. The CLUT values did indeed differ between profiles. I also saw some dE differences of over 8. This certainly does not reflect reality as the largest actual dE for input values differing by 0.29 (assuming all offsets = 0.17) was under 3 dE with an average under 1 dE. That said, something is definitely amiss with i1Profiler if you feed it 16 bit reference values.

I too had problems creating profiles when boundary RGB values did not go all the way to 255 or 0. I'd seen that before though. After I modified my program to only alter values that were not 0 or 255 so as to leave gamut boundaries intact, I1P no longer crashed.

But the remaining issue is I1P's behavior with miniscule changes in the inside RGB values. For the life of me I can't imagine what sort of bug or design decision would induce this behavior.

In any case I think that settles it. Unlikely both of us are missing something. But I will stay clear of using 16 bits making profiles. I do recall I once tried using it because one can easily make constant steps between RGB values. I recall being disappointed with the results and now believe it may be due to a defective generator with 16 bit RGB data.
« Last Edit: December 04, 2018, 12:38:34 AM by Doug Gray »
Logged

Ethan Hansen

  • Full Member
  • ***
  • Offline Offline
  • Posts: 132
    • Dry Creek Photo
Re: Any hacks for profilemaker measuretool to generate rectangular patches?
« Reply #18 on: December 05, 2018, 01:05:37 AM »

Leaving aside the viability of creating profiles from 16 bit reference data with i1Profiler, several folks have sent me emails or PMs about how to create targets with ImageMagick. I split the target into however many rows are needed. Each row is a separate image file.

First, create an image with the color data from the first patch in the row:

convert -size 100x100 xc:"rgb(100.0%,10.5%,0.0%)" -depth 16 Row-1.tif

This makes a single patch of 100x100 pixels (obviously you can adjust as needed). Color values are expressed as percentages. RGB of 0 = 0%, 255=100%, everything else lies in between.

We then add the next patch to the right side of the image:
convert Row-1.tif -background "rgb(0.0%,100.0%,98.9%)" -gravity east -splice 100x0 -depth 16 Row-1.tif

Continue on until the row is filled out. Repeat for the remaining rows. Scripting is your friend - bash, powershell, VBA - use whatever you are familiar with.

The individual rows can be combined with:

convert Row-1.tif Row-2.tif Row-N.tif -append FinalTarget.tif

The "-append" option combines all images into a single stacked column with N rows. If you are combining columns, use +append. The montage command gives precise control over pasting together images; e.g. you want to tile them together in a pattern.

datro

  • Full Member
  • ***
  • Offline Offline
  • Posts: 180
Re: Any hacks for profilemaker measuretool to generate rectangular patches?
« Reply #19 on: December 09, 2018, 11:15:27 AM »

. . . how to create targets with ImageMagick. . .

Thanks for this Ethan...very helpful.  I'm pretty familiar with ImageMagick (I use it when downsizing large image files off of my drum scanner for printing smaller than the native-scanned resolution) so this looks like a viable way to create a target TIF using 16-bit reference data for the patches.

I should have probably provided a bit more information when I resurrected this thread a few days ago with my question about creating 16-bit TIF targets.  The discussion here about creating profiles is interesting, but my question was really only about just creating a 16-bit TIF target, not a profile.  I'm printing with Piezography monochrome inks and part of that system involves linearizing the printing environment to a Gamma 2.2 space and tweaking QTR "curves" (in reality just media files) for use with QTR as the printing engine.  Piezography provides their own very carefully built TIF targets that are fully 16-bit with Gamma 2.2 baked in to the data.  You print these targets on your selected paper, then read them, then use tools available from Piezography to tweak the underlying QTR curve files to obtain a linear overall system (very different to normal color printing where you typically don't want linear).

This all works well, however I was observing some weird rippling behavior in my measurements of the standard Piezography target on my Epson 7900 and was interested in creating my own version of the Piezography target that was either scrambled or laid out in landscape instead of portrait in order to try to determine the cause of the rippling.  In order to do this correctly, I would need to create set of 256 monochrome patches (from 0-255 values) in 16-bit with gamma 2.2 baked in, and then create a TIF in 16-bit that is properly formatted to be scanned by my I1Pro2 with i1Profiler.  I just use i1Profiler to read the target and output a CGATS file to obtain the L* values which is used for the linearization process.

The i1Profiler Patch Editor appeared to allow me to create a patch set using 16-bit values, but when saved as as a .pxf file and then later reloaded, the data had been truncated or rounded to 8-bit.  Also, when in the "Test Chart" step in i1Profiler, the "Save As.." button seems to always save the target as an 8-bit TIF file with no way to make it 16-bit.  So that's when I started looking for other ways to create the data and the target.

In any case, the rippling behavior is now identified as being printer related and the need for making my own target is "obe" (overtaken by events).  But thanks anyway for the interesting discussion and information.

Dave
Logged
Pages: [1]   Go Up