[issue14323] Normalize math precision in RGB/YIQ conversion

2013-08-06 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed ___ Python tracker ___ __

[issue14323] Normalize math precision in RGB/YIQ conversion

2013-08-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 80e9cb6163b4 by Serhiy Storchaka in branch 'default': Issue #14323: Expanded the number of digits in the coefficients for the http://hg.python.org/cpython/rev/80e9cb6163b4 -- nosy: +python-dev ___ Python

[issue14323] Normalize math precision in RGB/YIQ conversion

2013-08-05 Thread Mark Dickinson
Mark Dickinson added the comment: LGTM too. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue14323] Normalize math precision in RGB/YIQ conversion

2013-08-05 Thread Terry J. Reedy
Terry J. Reedy added the comment: I agree. Go ahead and push. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14323] Normalize math precision in RGB/YIQ conversion

2013-08-05 Thread Ezio Melotti
Ezio Melotti added the comment: LGTM. -- stage: patch review -> commit review ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue14323] Normalize math precision in RGB/YIQ conversion

2013-08-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Can you add a reference for the coefficients? I have only link to Wikipedia which refers to Code of Federal Regulations ยง73.682. This link (http://en.wikipedia.org/wiki/YIQ) already mentioned at the top of the file. > (You claim about the current rounding

[issue14323] Normalize math precision in RGB/YIQ conversion

2013-08-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: Can you add a reference for the coefficients? I believe def test_main(): test.support.run_unittest(ColorsysTest) if __name__ == "__main__": test_main has been and is being replaced in other test files with if __name__ == "__main__": unittest.main and sho

[issue14323] Normalize math precision in RGB/YIQ conversion

2013-08-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch which implements the FCC version of RGB/YIQ conversion. -- Added file: http://bugs.python.org/file31161/colorsys_yiq_fcc.patch ___ Python tracker

[issue14323] Normalize math precision in RGB/YIQ conversion

2013-01-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: According to Wikipedia FCC conversion is defined as: y = 0.30*r + 0.59*g + 0.11*b i = 0.5990*r - 0.2773*g - 0.3217*b q = 0.2130*r - 0.5251*g + 0.3121*b and non-FCC conversion is defined as: y = 0.299*r + 0.587*g + 0.114*b i = 0.595716*r -

[issue14323] Normalize math precision in RGB/YIQ conversion

2013-01-07 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti stage: -> patch review versions: +Python 3.4 -Python 3.3 ___ Python tracker ___ ___

[issue14323] Normalize math precision in RGB/YIQ conversion

2012-04-20 Thread Mark Dickinson
Mark Dickinson added the comment: Terry: sorry, I missed this before. Re 1. Sure, this seems reasonable, if there's a real sense in which the new numbers are better than the old. Besides MATLAB, there's also a set of numbers given on Wikipedia that might be considered. I don't have the do

[issue14323] Normalize math precision in RGB/YIQ conversion

2012-03-16 Thread Brian Landers
Brian Landers added the comment: Updated to add Matlab refs, also added a roundtrip RGB-YIQ-RGB test to match the other conversions. -- Added file: http://bugs.python.org/file24895/colorlib.patch ___ Python tracker

[issue14323] Normalize math precision in RGB/YIQ conversion

2012-03-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: Mark, I know you have worked on numerical algorithms. 1. Do you agree that this is a reasonable change? 2. Should new tests go in maintenance release? -- nosy: +mark.dickinson ___ Python tracker

[issue14323] Normalize math precision in RGB/YIQ conversion

2012-03-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: Yes, put reference in source. I checked that you copied correctly. I think there is some controversy, which I do not understand, about adding tests to maintenance releases without a bug fix. I will ask, so do not do it yet. -- ___

[issue14323] Normalize math precision in RGB/YIQ conversion

2012-03-16 Thread Brian Landers
Brian Landers added the comment: Matlab docs are here: - http://www.mathworks.com/help/toolbox/images/ref/rgb2ntsc.html - http://www.mathworks.com/help/toolbox/images/ref/ntsc2rgb.html Should these be referenced in the source itself? re new versions: sure, I'll create a separate patch for addi

[issue14323] Normalize math precision in RGB/YIQ conversion

2012-03-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: The idea seems reasonable. Do you have a link or reference to a Matlab doc with the coefficients? Enhancements only go in new versions. -- nosy: +terry.reedy versions: -Python 2.7, Python 3.2 ___ Python tracker

[issue14323] Normalize math precision in RGB/YIQ conversion

2012-03-15 Thread Brian Landers
Changes by Brian Landers : Added file: http://bugs.python.org/file24867/acks.patch ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue14323] Normalize math precision in RGB/YIQ conversion

2012-03-15 Thread Brian Landers
New submission from Brian Landers : There doesn't seem to be a standard definition for the constants to use when doing the matrix calculations to convert RGB to YIQ or vise versa. Also, the current colorsys library uses two digits of precision for RGB-YIQ but six digits for YIQ-RGB. The att