通过在 Octave 中添加 2 个图像来增强图像

Image Enhancement by adding 2 images in Octave

您好!

我想在 Octave 中像这张图片中的所有步骤一样处理图像。 我想知道如何将图像添加到一起以获得像 (c) 或 (f) 这样的图片? 到目前为止我的代码是:

I = imread('343a.tif');
subplot(2,2,1);imshow(I);title('Original Image'); 
I = im2double (I);
H = fspecial('log', 11,1.5);
Laplacian = imfilter(I,H,'replicate');
subplot(2,2,2);imshow(Laplacian, []);title('Laplacian Image');
H = fspecial('sobel');
Edge = imfilter(I,H,'replicate');
subplot(2,2,4);imshow(Edge);title('Sobel Image');

非常感谢您的帮助或建议! :)

此致!

您使用 + 运算符添加图像并使用 .* 运算符将它们相乘:

c = a + b;
f = c .* e;

是的,就这么简单! :)