Select to view content in your preferred language

Convolution of raster

82
0
11-21-2024 03:41 AM
Labels (3)
Unit3blr1
New Contributor

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;

0 Kudos
0 Replies