my code not working for convolution functionality as mentioned below
private async Task<Raster> ApplyConvolutionFilter(Raster raster, float[] kernel)
{
try
{
// Raster function to apply the convolution filter
RasterFunction convolutionFunction = new RasterFunction
{
FunctionName = "Convolution",
Arguments = new object[]
{
new RasterFunctionArgument(raster),
new RasterFunctionArgument(kernel)
}
};
// Apply the convolution asynchronously
Raster filteredRaster = await convolutionFunction.ExecuteAsync();
return filteredRaster;