Glossary |
VNG - Variable Number of Gradients |
updated: 2024-03-19 |
The VNG method stands for Variable Number of Gradients. It works on a 5x5 pixel neighborhood around each source pixel in a Bayer Pattern. The method first computes intensity gradients in the eight directions around the current pixel. Then it computes a threshold and takes only gradients below this threshold. In the last step, the missing color components for the pixel are interpolated from neighboring pixels along the directions of the remaining gradients. This method preserves edges much better than bilinear interpolation. It also produces much less color artifacts and less chrominance noise.
As the method works on a 5x5 pixel matrix, it can't directly recover colors for 2-pixel wide image borders. The current implementation copies border pixel values from neighboring pixels.
The following image schematically shows how the method works and the output it produces. Gray arrows represent gradients with too high values, which have been discarded for color interpolation.
Reference: PixInsight Reference Documentation | Debayer
Created with the Personal Edition of HelpNDoc: Make your documentation accessible on any device with HelpNDoc