odd beat pattern in RAW mosaic display

Using version 5.4 to look at sensor data in RAW files from a Pentax K-50 with no demosaicing. I’m seeing what I would call a “beat pattern” that seems not right. The “bleed” into other-color pixels in particular is not as expected. See attached screenshot of the green channel. The pattern exists in all 3 color channels and luminosity separately with the same apparent position and periodicity. Image is fine once demosaiced. I’ve confirmed it’s present in other images from the K-50 but not for images from K-1. Bug or teachable moment?

  • George

Maybe lens correction is enabled?

1 Like

We have a winner! :slight_smile: Teachable moment it is.

Many thanks,

  • George
1 Like

Why would lens correction cause this?

I never analyzed this. It simply causes this effect on undemosaiced files.

Without looking at the code I can make a plausible guess… Geometric lens distortion corrections generally are made by resampling the image with a periodic interpolation function of distance from the center of the image. So I imagine what I’m seeing actual is essentially a beat pattern between the spatial frequency of the sensor array and the spatial frequency of the resampling function. It would be in play for any image, just more noticeable in regions of high frequency high contrast, and so extra noticeable for the raw sensor mosaic images because of the black stripes. The “corrected” formerly-black pixels are presumably going to be brightest when the distance of the correction is exactly the pixel spacing - in that case the pixel that used to be black is corrected to the value of an adjacent uncorrected bright pixel, basically a bright pixel moves to the place where the black pixel used to be. In between there are interpolations.

Just a guess, mind you…

  • George
1 Like