That seems unlikely to be right. Having that big a peak would be really weird unless your scene was super uniform, and the number of values outside the 16-235 range seems suspect too.
For comparison, g7x pointing at a blank wall gives results like
{
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,3,13,9,27,38,36,54,97,150,262,423,646,779,913,1122,1215,1373,1964,1588,1325,873,654,471,284,66,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
[0]=0
}
Also, FWIWI, note the histo data starts a
0, not 1 like normal Lua arrays, because it's indexed by Y value. This means in Lua, you should use for i=0,255.. not something like for i,v in ipairs(...
Attached is a test build with the
screen dump module included, which may help shed light on what's going wrong.
To use it, go to Miscellaneous->Debug Parameters and set "Alt +- debug action" to "DmpScrn"
Then, with the camera in rec mode, in alt mode, press the debug shortcut key. I think it will be the Info button on your cam, but if not, the alt help screen (enabled under CHDK settings->menu settings) should say.
The module will capture frames to DCIM/100CANON/CRW_nnnn.JPG. By default, it waits 5 seconds and records 5 frames. There is no feedback when it's done, so just count to 10 after pressing the button.
The file is not actually in jpeg format, it's a chdkptp lvdump. Please zip it and post it here, or on any file hosting site if it's too large for the forum.