GPU accelerated image processing for everyone
Divides a scalar s by image X pixel wise.
f(s, x) = s / x
Category: Math
Availability: Available in Fiji by activating the update sites clij and clij2. This function is part of clijx_-0.30.1.21.jar.
Ext.CLIJx_divideScalarByImage(Image image, Image destination, Number scalar);
// init CLIJ and GPU import net.haesleinhuepf.clijx.CLIJx; import net.haesleinhuepf.clij.clearcl.ClearCLBuffer; CLIJx clijx = CLIJx.getInstance(); // get input parameters ClearCLBuffer image = clijx.push(imageImagePlus); destination = clijx.create(image); float scalar = 1.0;
// Execute operation on GPU clijx.divideScalarByImage(image, destination, scalar);
// show result destinationImagePlus = clijx.pull(destination); destinationImagePlus.show(); // cleanup memory on GPU clijx.release(image); clijx.release(destination);
% init CLIJ and GPU clijx = init_clatlabx(); % get input parameters image = clijx.pushMat(image_matrix); destination = clijx.create(image); scalar = 1.0;
% Execute operation on GPU clijx.divideScalarByImage(image, destination, scalar);
% show result destination = clijx.pullMat(destination) % cleanup memory on GPU clijx.release(image); clijx.release(destination);