Histogram matching of two colored images in matlab

↘锁芯ラ 提交于 2019-11-30 08:26:49

You can just do:

im2(:, :, 1) = red2n;

etc.

Well it's been months since the original question was posted but I think everyone can use an alternative approach to what was suggested: the following code puts the three color channels into one RGB image:

rgb_out = cat(3, red2n, green2n, blue2n);

Matlab now has a built-in function in the Image Processing Toolbox to do this: http://www.mathworks.com/help/images/ref/imhistmatch.html

But if you have an older version of Matlab (I have 2010b and it does not include imhistmatch.m), this is function that does classic histogram matching: https://www.mathworks.com/matlabcentral/fileexchange/27396-matchhistograms

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!