'Extract Color Matrices Used by Filter?

I am trying to detect the color matrix applied to a filtered image so that I can apply a reasonably close approximation of the filter using fabric.

Does anyone know of a way to use before/after images to detect the RGB matrix being applied by a filter using javascript/Node?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source