I'm going to do some dark frame noise measurements of several cameras as a function of temperature and ISO setting. I've been looking for a simple software program to display the sum of all pixel counts. However, nothing was located so it appears I'll have to learn how to write a PDN plugin. Using Code Lab, I've got the calculations performed but cannot find a way of displaying the results. Suggestions are appreciated. My code is shown below.
#region UICode
// Maybe something to trigger a data window
#endregion
void Render(Surface dst, Surface src, Rectangle rect)
{
Rectangle selection = EnvironmentParameters.GetSelection(src.Bounds).GetBoundsInt();
ColorBgra PrimaryColor = (ColorBgra)EnvironmentParameters.PrimaryColor;
ColorBgra SecondaryColor = (ColorBgra)EnvironmentParameters.SecondaryColor;
int BrushWidth = (int)EnvironmentParameters.BrushWidth; // ??????????????? Is this needed
long redsum = 0;
long grnsum = 0;
long blusum = 0;
ColorBgra CurrentPixel;
for (int y = rect.Top; y < rect.Bottom; y++)
{
for (int x = rect.Left; x < rect.Right; x++)
{
CurrentPixel = src[x,y];
// Add up the data
redsum = redsum + (long)CurrentPixel.R;
grnsum = redsum + (long)CurrentPixel.G;
blusum = redsum + (long)CurrentPixel.B;
}
}
// Print the result someplace
}