I have a rather complicated code for an ImageTransformation, which would benefit from some acceleration. Since every pixel is independend of every other, I tried Parallelize, which, in a simplified form, would look like
pic = Import["http://666kb.com/i/dsfr4u76175v8q277.png"] Parallelize[ImageTransformation[pic, Sin]]
but it only gives me the error message
ImageTransformation[...] cannot be parallelized; proceeding with sequential evaluation
However, when I split the PlotRange manually, for example, into four quadrants, which I render simultaneously on four kernels, the whole job only takes 1/4 of the time, because each kernel has only 1/4 of the pixels to render, and the CPU is at 100% as it should be.
I'd expect Parallelize to do the same thing, but it doesn't; on my four kernel machine only one kernel is used. The CPU is therefore only at 25% — so the whole job takes four times longer than nescessary.
Is there a way to get the same effect automatically, so that I don't have to split the PlotRange manually, and submit the calculation to four different .nb-Files (or, as many as there are available kernels on my machine) every time, and then join the four parts of the resulting image with ImageAssemble?
With four kernels, it's not that bad, but if I were to work on a 16 kernel machine, it would be a nuissance to do the breakdown every time to get the speed up. Perhaps Parallelize it the wrong way to do it. Is there is a better way to achieve the parallelization?