Details Realization Technique 1 - JustinTArthur/Intricate GitHub Wiki

We'll call the source stacked material s and the realized material r. We'll assume that the source images have been aligned. Take a single square s pixel, break up into a grid of 9 square r pixels. The RGB info for an s pixel on a single source image is called an incident. Each s incident of similar RGB values for an s pixel is grouped into an incident group for that s pixel. Each group has an incidence score, simply based on the number of incidents in that group. This score can later be used to filter out incidents assumed to be noise by setting a threshold. The incident group(s) with the highest score integer for an s pixel are averaged to realize the RGB value for the middle r pixel (of the 9 broken out from the s).

Neighbors

An s pixel's 8 neighbors are examined as a pair, and the incident groups from the pair of s pixels are coupled if they are similar. The highest couple of groups is chosen, their RGB is averaged (weighted by the two scores of those two incidence groups) and the result is that the r pixel adjacent (or tangent in the case of the diagonals) to where the other s pixel's group is in this current pair receives that RGB value.