I have read some instructions on a scientific paper about how to reproduce moire patterns caused by shooting screens by means of digital image processing methods. But the statements are rather ambiguous. Besides, since I am not familiar with LCD and Bayer CFA, it is quite difficult for me to fulfil it. I will state my step in detail and show some experimental results. I hope you can help me to finish this task. Thanks a lot.
First, I will list the instructions from the paper (https://arxiv.org/pdf/1804.03809.pdf) I mentioned above.
Resample the input image into a mosaic of RGB subpixels as in Fig. 1a to simulate the image displayed on the LCD;
Apply a projective transformation with a certain degree of randomness on the image to simulate different relative positions and orientations of the display and camera;
Use radial distortion function to simulate lens distortion;
Apply a flat top Gaussian filter to simulate anti-aliasing filter; 5. Resample the image using Bayer CFA as in Fig. 1b to simulate the raw reading of the camera sensor;
Add Gaussian noise to simulate sensor noise;
Apply to demosaic;
Apply the denoising filter;
Compress the image using JPEG to add compression noise;
Output the decompressed image as the synthetic image with moire patterns.
Unfortunately, my reputation is not enough for posting images. I will describe my operations for each step above.
For step 1, given an RGB digital image with 3 channels, I first resample it as a single channel image with RGB values side by side to simulate the display on LCD screen as follows: RGBRGBRGBRGBRGBRGB RGBRGBRGBRGBRGBRGB RGBRGBRGBRGBRGBRGB RGBRGBRGBRGBRGBRGR
For the second step, I just apply a random perspective transformation to the LCD image I get above. However, this perspective transformation will significantly change the relative positions of RGB pixels in the LCD image, which will make the following-up Bayer CFA sampling step hard to be applied.
Is any step wrong in my experiment? I think the instruction from the scientific paper is reasonable, but there are so many details need clarification in practice. However, I am not familiar with LCD and Bayer CFA, so I turn to you for help. Thanks.