dilevin / computer-graphics-raster-images

Computer Graphics Assignment about Raster Images
2 stars 10 forks source link

Strange Demosaic Edge #91

Closed grandrx10 closed 2 months ago

grandrx10 commented 2 months ago

Hi, my demosaic image was producing some strange anomalies around the edges of the photo. I am using the GBRB pattern and if there are missing tiles, I ignore them in the averaging process. If the color is directly on the tile, I use the exact color as specified. I was wondering what could be causing the edges to be strangely colored like such?

At the very least, is my conceptualization for how to get the edge colors correct?

image

Zhecheng-Wang commented 2 months ago

The Bayer pattern should be GRBG. The interpolation method you described is correct.

grandrx10 commented 2 months ago

image Are you sure that it is GRBG? I thought you stated in a different post that it should be GBRG.

Zhecheng-Wang commented 2 months ago

Sorry, it should be GBRG, refer to header file. You mentioned you used GBRB though.

grandrx10 commented 2 months ago

Ah, I figured it out. The weird effect was coming with the way I was handling unsigned chars. I apologize for eating up your time, and I thank you for your assistance.