"Conversion of RGB to Other Color Spaces" (command-li...html
Posted: 2013-10-16T11:51:42-07:00
It appears to me that the symbols R, G, and B in the list of formulas in the -colorspace entry of command-line-options.html are being used to represent somewhat different things in different places.
For example, the XYZ and sRGB formulas are correct only if the symbols R,G,B refer to the linear R709,G709,B709 using the rec709 primary-red, primary-blue, and primary-green chromaticities (which I see can be specified in the image and in the miff format). XYZ *can* be defined in terms of other linear RGB colorspaces, but then the coefficients appearing in the formulas would have to be changed from their current rec709 linear coefficients (rec709 happens to be unique in that they defined their nonlinear luma coefficients to equal their linear coefficients).
But on the other hand, for Rec601YCbCr, the Luma Y is defined in terms of the same symbols R,G,B, but the fomulas are only correct if these symbols actually represent the nonlinear R'601, G'601, B'601 (which in turn are defined by the rec601 compression nonlinearity formula applied to linear R601, G601, and B601 which are defined using the rec601 chromaticities).
Do those particular examples implement what I have above, or if not, what do they implement?
Can these formulas be clarified by using distinct names when they refer to different quantities that themselves may be calculated in a different way?
For example, the XYZ and sRGB formulas are correct only if the symbols R,G,B refer to the linear R709,G709,B709 using the rec709 primary-red, primary-blue, and primary-green chromaticities (which I see can be specified in the image and in the miff format). XYZ *can* be defined in terms of other linear RGB colorspaces, but then the coefficients appearing in the formulas would have to be changed from their current rec709 linear coefficients (rec709 happens to be unique in that they defined their nonlinear luma coefficients to equal their linear coefficients).
But on the other hand, for Rec601YCbCr, the Luma Y is defined in terms of the same symbols R,G,B, but the fomulas are only correct if these symbols actually represent the nonlinear R'601, G'601, B'601 (which in turn are defined by the rec601 compression nonlinearity formula applied to linear R601, G601, and B601 which are defined using the rec601 chromaticities).
Do those particular examples implement what I have above, or if not, what do they implement?
Can these formulas be clarified by using distinct names when they refer to different quantities that themselves may be calculated in a different way?