matlab中两个彩色图像的直方图匹配 [英] Histogram matching of two colored images in matlab
问题描述
任何人都知道如何在两个彩色图像上执行RGB直方图匹配?
例如这是一个要重新映射的图像:
这是一个目标图片
然后RGB重新映射的图像看起来像这样
这是我到目前为止所做的,在这段代码中我采用了两个彩色图像 im1
和 im2
我拿了 im1
哪一个必须重新映射然后分解成
它的颜色然后我采用了每种颜色im1并使用 histeq
将他们的直方图与<$ p
im2中的每种颜色相匹配
。
我不知道如何从颜色重建重新映射的图像我匹配,任何帮助请,这将是不错的??:
im1 = imread('Atlas-Mer.png');
im2 = imread('techno-trs.png');
Red1 = im1(:,:,1);
Green1 = im1(:,:,2);
Blue1 = im1(:,:,3);
。
。
。
Red2 = im2(:,:,1);
Green2 = im2(:,:,2);
Blue2 = im2(:,:,3);
red2n = histeq(Red2,HnRed1);
green2n = histeq(Green2,HnGreen1);
blue2n = histeq(Blue2,HnBlue1);
你可以这样做:
im2(:,:,1)= red2n;
等。
Anyone knows how to perform RGB histogram matching on two colored images?
for example this is an image to be re-mapped:
and this is a target image
Then the RGB remapped image look like this
here is what I did so far, in this code I took two color images im1
and im2
I took the im1
which is the one that has to be remapped then broke it up into
its colors then I took each color of im1 and used histeq
to match their histograms to
each color in im2
.
I don't know how to reconstruct the re-mapped image from the colors I matched, any help please that would be nice??:
im1 = imread('Atlas-Mer.png');
im2 = imread('techno-trs.png');
Red1 = im1(:, :, 1);
Green1 = im1(:, :, 2);
Blue1 = im1(:, :, 3);
.
.
.
Red2 = im2(:, :, 1);
Green2 = im2(:, :, 2);
Blue2 = im2(:, :, 3);
red2n = histeq(Red2,HnRed1);
green2n = histeq(Green2,HnGreen1);
blue2n = histeq(Blue2,HnBlue1);
You can just do:
im2(:, :, 1) = red2n;
etc.
这篇关于matlab中两个彩色图像的直方图匹配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!