資源簡介
利用matlab處理對兩幅圖像的疊加處理
其中一幅作為前景需要提取主干信息,另一幅則作為背景圖將第一幅中提取出的主干信息疊加到第二幅圖像中
三個色面的單獨處理
代碼片段和文件信息
img=imread(‘add1.jpg‘);??
i=img;
j=imread(‘env.jpg‘);
j1=j;
im1=rgb2gray(i);??
subplot(221)imhist(im1)gridtitle(‘the?histgram?of?the?original?image‘);???????????????????????????????????????????????????????????????
title(‘the?histgram?of?the?original?R-G-B-image?‘)
xlabel(‘the?value?of?gray-grades‘)
ylabel(‘probability?of?appearance‘)
red=i(::1);%取紅色色面
subplot(222)imhist(red)gridtitle(‘the?histgram?of?the?R-image‘);
title(‘the?histgram?of?the?original?R-image‘)
xlabel(‘the?value?of?gray-grades‘)
ylabel(‘probability?of?appearance(x10)‘)
green=i(::2);%取綠色色面
subplot(223)imhist(green)gridtitle(‘the?histgram?of?the?G-image‘);
title(‘the?histgram?of?the?original?G-image‘)
xlabel(‘the?value?of?gray-grades‘)
ylabel(‘probability?of?appearance(x10)‘)
blue=i(::3);%取藍色色面
subplot(224)imhist(blue)gridtitle(‘the?histgram?of?the?B-image‘);
title(‘the?histgram?of?the?original?B-image‘)
xlabel(‘the?value?of?gray-grades‘)
ylabel(‘probability?of?appearance(x10)‘)
[mn]=size(red);
for?k=1:m
for?x=1:n
????if((0 ????????
- 上一篇:織物密度測量MATLAB實現
- 下一篇:MATLAB的S-Function編寫指導
評論
共有 條評論