如何在垂直方向上在Matlab中绘制图像的强度分布图

时间:2019-07-09 21:18:47

标签: matlab

我想在垂直方向上绘制图像的强度曲线。

我在水平方向上找到了图像的强度分布,但在垂直方向上找不到了。

I = imread('Intensity1.jpg');
x = [0 size(I,2)];
y = [size(I,1)/2 size(I,1)/2];
c = improfile(I,x,y);
figure
subplot(2,1,1)
imshow(I)
hold on
plot(x,y,'r')
subplot(2,1,2)
plot(c(:,1,1),'r')
hold on
plot(c(:,1,2),'g')
plot(c(:,1,3),'b')

0 个答案:

没有答案