archaiesteron
Active member
Hi, I finally decided to download the xf3-tools and to play a little with them. I built a workflow for creating a profile. I only had a time for a first attempt, but it looks interesting; in the next days, I will try to make it more accurate.
Some parts of my post are rather technical, but even if you are not interested by that, please download the profile and play with it (but read further in order to understand how to use it).
First, I use this thread for asking some features to the author of the xf3-tools:
a) choose a picture with ISO 100, good exposure, and a good number of colors;
b) use SPP for saving a 16-bits ProPhoto of the picture with all settings to 0 (except sharpening to 0.8 according to http://forums.dpreview.com/forums/read.asp?forum=1027&message=38626893 )
c) use xf3-tools for getting the RAW data; multiply it by 16 (because the datas from the RAW are 12-bits), which is very easely achieved by
convert input.tif -level 0%,6.25% output.tif
d) crop the raw picture (in order to make it match the SPP version)
e) select 1,500 random pixels and get values from the RAW and from SPP for
all these pixels;
f) convert the ProPhoto datas from SPP to XYZ colorspace: http://brucelindbloom.com/index.html?Eqn_RGB_to_XYZ.html
f) write some custom TI3 file : http://www.argyllcms.com/doc/ti3_format.html with both datas (XYZ from SPP and RAW); the following page was a good template (but I discarded the three last columns): http://www.freelabs.com/~whitis/reviews/230X_USB_Microscope/Camera.ti3
g) convert the TI3 to a color-profile ICC with Argyll according to http://www.argyllcms.com/doc/Scenarios.html#PS4 (see the paragraph beginning with "If profiling a camera in RAW mode")
I did it with three pictures, but unfortunately I have no good picture with many colors. If someone could send to me a 100 ISO / RAW with many many many colors... One of the three ICC profiles was obviously better and more portable than the others. It is not perfect but it is certainly a good start.
Now the profile is there: http://dl.free.fr/d1QzZsF57
Use it after having scaled the 12-bits data. You can do this:
convert my_sdim_picture.X3F.tif -level 0%,6.25% +profile icm -profile SDIM0738_data.icc -profile usr/share/color/icc/sRGB.icm out.tif
Of course you need some sRGB profile (you may find it in the icc-profiles package on Ubuntu distributions). You can use other tools, but don't forget to scale the linear data.
Some parts of my post are rather technical, but even if you are not interested by that, please download the profile and play with it (but read further in order to understand how to use it).
First, I use this thread for asking some features to the author of the xf3-tools:
- it would be nice to have a stdout output (for using with pipes) like many unix tools ;
- it would be nice to have a PNM output (remember that no library is needed; it should need 5/10 minutes for implementing that; many unix tools handle PNM; it is a very useful format (you can easely convert it to ASCII in order to perform some script-based changes or numerical analysis) ;
- it would be nice to have a PNM output with a 12bits declaration (it is the very same thing than previous request: 12-bits values from the RAW file encoded in 16-bits integers), but instead of claiming the values are from 0 to 65535, you can tell they are rather from 0 to 4095; the data by themselves are the same, but when loaded by any software, they will be stretched to 0-65535, which would avoid a further step.
a) choose a picture with ISO 100, good exposure, and a good number of colors;
b) use SPP for saving a 16-bits ProPhoto of the picture with all settings to 0 (except sharpening to 0.8 according to http://forums.dpreview.com/forums/read.asp?forum=1027&message=38626893 )
c) use xf3-tools for getting the RAW data; multiply it by 16 (because the datas from the RAW are 12-bits), which is very easely achieved by
convert input.tif -level 0%,6.25% output.tif
d) crop the raw picture (in order to make it match the SPP version)
e) select 1,500 random pixels and get values from the RAW and from SPP for
all these pixels;
f) convert the ProPhoto datas from SPP to XYZ colorspace: http://brucelindbloom.com/index.html?Eqn_RGB_to_XYZ.html
f) write some custom TI3 file : http://www.argyllcms.com/doc/ti3_format.html with both datas (XYZ from SPP and RAW); the following page was a good template (but I discarded the three last columns): http://www.freelabs.com/~whitis/reviews/230X_USB_Microscope/Camera.ti3
g) convert the TI3 to a color-profile ICC with Argyll according to http://www.argyllcms.com/doc/Scenarios.html#PS4 (see the paragraph beginning with "If profiling a camera in RAW mode")
I did it with three pictures, but unfortunately I have no good picture with many colors. If someone could send to me a 100 ISO / RAW with many many many colors... One of the three ICC profiles was obviously better and more portable than the others. It is not perfect but it is certainly a good start.
Now the profile is there: http://dl.free.fr/d1QzZsF57
Use it after having scaled the 12-bits data. You can do this:
convert my_sdim_picture.X3F.tif -level 0%,6.25% +profile icm -profile SDIM0738_data.icc -profile usr/share/color/icc/sRGB.icm out.tif
Of course you need some sRGB profile (you may find it in the icc-profiles package on Ubuntu distributions). You can use other tools, but don't forget to scale the linear data.