Problems with using a rough greyscale algorithm?

前端 未结 7 2096
生来不讨喜
生来不讨喜 2021-02-06 20:43

So I\'m designing a few programs for editing photos in python using PIL and one of them was converting an image to greyscale (I\'m avoiding the use of

7条回答
  •  执念已碎
    2021-02-06 20:47

    There are many different methods for converting to greyscale, and they do give different results though the differences might be easier to see with different input colour images.

    As we don't really see in greyscale, the "best" method is somewhat dependent on the application and somewhat in the eye of the beholder.

    The alternative formula you refer to is based on the human eye being more sensitive to variations in green tones and therefore giving them a bigger weighting - similarly to a Bayer array in a camera where there are 2 green pixels for each red and blue one. Wiki - Bayer array

提交回复
热议问题