I have a CPP program that works in 3 parts:
1. read an image (grayscale or color) into the the program
2. "do some process"... (in this case, I'm trying to implement the Gamma transform function)
3. output the new image (based on modification in step #2).

Does anyone know how to convert the Gamma function (as shown in the JPG) into C++ code? Or, alternatively, are you aware of a specific website where I can find some existing code that already contains some Gamma transform C++ code?

Besides the processing issue, the malloc() and for() loop to copy are well.
But you have to decide if doing the gamma transformation before of after the scale transformation.
How are you plannig to do it?

Generally, in all previous programs we did the "process" AFTER the scaling. This raises the next question. I've done scaling before with a double array. 'Don't know how to do it in this case. As a matter of fact, I wasn't even aware that scaling is required for this GammaTransform. But, if you recommend it, then I'm sure it's the right way to do it.

As listed previously, can could confirm that below scaling algorith is correct? If not, what you're referring to. As far as I know, no scaling was used in "Interpolation" (the problem you helped me with previously).

Featured Post

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…

Templates For Beginners
Or
How To Encourage The Compiler To Work For You
Introduction
This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…

The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…