Quantcast
Channel: beginners - openFrameworks
Viewing all articles
Browse latest Browse all 4929

What algorithm does setImageType( OF_IMAGE_GRAYSCALE )use?

$
0
0

@cuinjune wrote:

Hi, I want to know what algorithm is used to convert RGB to greyscale by using ofImage::setImageType(OF_IMAGE_GRAYSCALE).

As I tested, the following RGB values turned into the following greyscale amount.

67 71 44 => 65

166 195 213 => 197

144 148 37 => 124

I tried out some of common greyscale conversion formulas but none of them worked just like the test result above.

I think it uses freeImage internally, but I don't know how to see the implementation part of the greyscale method which is "FreeImage_ConvertToGreyscale".

Can anyone help me out finding the formula? Thanks.

Posts: 4

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 4929

Trending Articles