eszdman / PhotonCamera

Android Camera that uses Enhanced image processing
GNU General Public License v3.0
757 stars 72 forks source link

NoiseModeler: Handle zeroed models #57

Closed RealJohnGalt closed 3 years ago

RealJohnGalt commented 3 years ago

On sensors without noise models in bin, inModel is pairs of 0.0 which are not caught here. Additionally, if no specific model is added, there are two changes that cause breakages on these sensors:

004851f4334a6ab1f45d4e84ea8594905d62bcc9 -- results in black jpeg output without model 7294c96fe2a9248819626084ca3d8ccdda7d96ef -- results in white jpeg output without model

Verified with this change and a sensor specific noise model (which with this change is not required for usage), my unfortunate sensor has working jpeg output on pcam again. In addition to OnePlus devices with this issue, this also is known to impact OV13B10 on Apollo.