non-linear characteristic of image sensor
Are you sure that your data is supposed to be linear? Images delivered from a camera is NOT supposed to be linear ; rendered luminance is supposed to be a power law of color value, with an power of usually 1.9 to 2.3 that is called gamma. This is for various reasons owing to eye response not being linear at all, as well as older CRT technology. Typically, webcam images are encoded this way - and gamma value may often be adjusted. JPEG images from a DSLR are also encoded this way, but not RAW images.

I'm pretty sure that CCD sensors are usually linear (that's an important property used everywhere in research, in astronomy for example) ; I don't know exactly for CMOS but I suppose that's also the case.