I = imread("example.tif");
G = imfilter(log(I), h, 'replicate');
G = exp(G);
G = G .^ (1/numel(h));
它会给出以下错误。此外,我需要写什么而不是'h‘参数?
Check for incorrect argument data type or missing argument in call to function 'log'.
发布于 2022-05-21 18:26:26
请按照下面的示例进行说明。
I = imread('example.tif');
% Convert the image to double.
I = rgb2gray(im2double(I));
% Create the function you want to apply to the image — a geometric mean filter.
fun = @(x) geomean(x(:));
% Apply the filter to the image.
G = nlfilter(I,[5 5],fun);
% Display the original image and the filtered image, side-by-side.
montage({I,G})
title('Original Image (Left) and Geometric-Mean Filtered Image (Right)')
https://stackoverflow.com/questions/72331433
复制相似问题