Separates a linked set of kernels and returns an array of ImagickKernels.

Kernel 0
-10-1
040
-10-1

Kernel 1
falsefalse1falsefalse
false111false
11111
false111false
falsefalse1falsefalse
Separates a linked set of kernels and returns an array of ImagickKernels.
        $matrix = [
            [-1, 0, -1],
            [0, 4, 0],
            [-1, 0, -1],
        ];

        $kernel = \ImagickKernel::fromMatrix($matrix);
        $kernel->scale(4, \Imagick::NORMALIZE_KERNEL_VALUE);
        $diamondKernel = \ImagickKernel::fromBuiltIn(
            \Imagick::KERNEL_DIAMOND,
            "2"
        );

        $kernel->addKernel($diamondKernel);

        $kernelList = $kernel->separate();

        $output = '';
        $count = 0;
        foreach ($kernelList as $kernel) {
            $output .= "
Kernel $count
"; $output .= Display::renderKernelTable($kernel->getMatrix()); $count++; } return $output;