Skip to main content
Participating Frequently
June 11, 2016
Answered

RGB Values

  • June 11, 2016
  • 1 reply
  • 423 views

Hi! I want to build a simple plugin that requires the use of RGB values, variables, and simple mathematical calculations.

I have experience in C-based programming languages, but have never programmed in C before. I'm beginning to pick up some of the basic concepts and understanding how everything works. For the past week, I've been reading though the SDK, and am finally to the point where I am ready to start writing some code. I've changed my skeleton example to the name of my plugin, and am ready to go.

Here is my goal:

I would like to build a plugin, that, for each frame, adds the red, green, and blue values to the red, green, and blue values of the last frame, and divides that number by two.

Before I get started though, there's a few bits of knowledge that I need (that I can't seem to find in the SDK or any of these forums) and those are:

1) How do I access RGB values, and how do I assign them to a variable?

2) How to perform basic mathematical functions (addition and division)

3) Building off of the first question, how to create a variable, and assign a value to it. Do I use #define to do this?

If you have any other suggestions on how to optimize this plugin, and/or if there are better ways to do the simple tasks that I'm proposing to do, please let me know.

Thank you! Help is greatly appreciated!

This topic has been closed for replies.
Correct answer shachar carmi

take a look at the sample projects in the SDK.

the "shifter" sample shows how to access individual pixels, and the

"checkout" sample shows how to get images from point in time other than the

currently processed frame.

1 reply

shachar carmiCommunity ExpertCorrect answer
Community Expert
June 11, 2016

take a look at the sample projects in the SDK.

the "shifter" sample shows how to access individual pixels, and the

"checkout" sample shows how to get images from point in time other than the

currently processed frame.