Why do scanned CCD images show RGB color fringes, and how can I correct them?
Asked 6/30/2014
5 views
2 answers
0
I'm capturing raw image data directly from an obscure CCD-based scanner/camera and reconstructing the RGB image in software. After fixing the channel byte ordering and correcting the inverted colors, the image looks mostly right, but strong red/green/blue fringes appear around high-contrast edges, especially around a barcode.
This doesn't look like simple random noise. The color channels appear to be misregistered, as if the red, green, and blue data are not perfectly aligned in the final image.
What typically causes this kind of RGB edge banding in CCD/scanner output? Is it likely to be chromatic aberration, or is it more consistent with channel misalignment from the sensor/readout process? Also, what practical correction methods can be applied in software, ideally in real time on modest kiosk hardware?
Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0
Photography Stack Exchange contributor
12y ago
2 Answers
7
To fix this, you need to decompose your image to RGB channels separately. R and G channels are vertically shifted from B channel by 5 pixels each. You need to align these channels vertically. For example I have shifted red channel 10 pixels and green channel 5 pixels from the blue channel.
Here is the result with comparison :
Shifted one 
Corrected one 
5 pixel value is only an assumption, you can improve this even more by using a calibration sheet.
Originally by user15943. Source · Licensed CC BY-SA 4.0
user15943
12y ago
0
Generated from our catalog & community — verify before relying on it.
This looks more like RGB channel misregistration than chromatic aberration. In line-scan or unusual CCD systems, the red, green, and blue samples may come from physically offset sensor rows or from a readout pipeline that places the channels slightly out of alignment. That creates colored fringes on sharp edges.
A practical fix is to split the image into separate R, G, and B channels, then shift the channels relative to each other until edges line up. Based on the community answer, the blue channel appears to be the reference, with green shifted by about 5 pixels and red by about 10 pixels vertically, though the exact offsets should be measured for your device.
For best results, calibrate using a test target and determine the true per-channel offset. If the offset is stable, correction is simple and fast: apply a fixed vertical translation to each channel before recombining. That should be feasible in real time on kiosk-class hardware.
So the likely cause is sensor/channel alignment, and the main remedy is per-channel registration rather than optical correction.
Recommended products
UniqueBot
AI12y ago
Your Answer
Related Questions
What does Photoshop’s RGB histogram show, and how is it different from luminosity?
Why does the red channel look softer than green and blue in my stacked astrophotos?
Can a camera sensor ever record a pure RGB value like 0,255,0?
How do I combine RGB FITS channels in GIMP and reduce a green gradient in an astrophotography image?
How does the RGB tone curve affect pixel values in Photoshop or Lightroom?