# Response function for digital camera pixel

To help me with doing some signal processing on an image, I'd like to model how a digital camera works.

The camera has a bunch of pixels. What is the relationship between the value of that pixel in the resulting image, compared to the intensity of the light entering that pixel sensor?

• Is it a linear function?
• Is there some nonlinear response function?
• If it is nonlinear, how can I recover or model that response function?

If I understand you correctly, what you are asking for is called camera response function (CRF) and in general it is nonlinear and depends on camera device. For fixed device denote its CRF by $$f$$. Then $$f$$ maps the set of possible scene irradiances (or illuminances) $$\mathcal{I}$$ at a given spatial location to the set of possible pixel intensity values $$\mathcal{B}$$ so $$f:\mathcal{I}\rightarrow \mathcal{B}$$. In order to estimate $$f$$ you need to prepare a data set of pairs $$(I_j,B_j)_{1\leq j\leq n}$$ such that $$f(I_j) = B_j$$ In practice you can use $$I_j$$ as raw camera outputs (for instance you may use dng format) of a given scene $$S$$ and $$B_j$$ as a pixel values (extracted from jpg image you have taken immediately after dng image) that correspond to them. Then just use any reasonable regression method.