Log in

View Full Version : request on generalconvolution


AVIL
12th March 2007, 22:51
Hi,

I'm testing convolution kernels as sharpeners. If the kernel is not separable, I rely on generalconvolution to do the job:

myclip.converttorgb32(matrix="PC.601").generalconvolution(0,"
-1 -1 -1 -1 -1
-1 4 4 4 -1
-1 4 0 4 -1
-1 4 4 4 -1
-1 -1 -1 -1 -1", 16, False).converttoyv12(matrix="PC.601")

żIs it possible to extend generalconvolution to yuy2 and yv12 yo avoid colorspace conversions?. Chroma could be uspsampled to luma size. Or left untouched.

cwk
13th March 2007, 20:12
Masktools has a convolution function that allows custom matrices and supports YV12. Perhaps you can use this??

AVIL
14th March 2007, 10:12
@cwk

Thans for the tip but isn not possible (AFAIK) with masktools do a 5x5 kernel convolution if it is not separable (able to be processed first by rows after by cols).