Octave中是否有“imshowpair”MATLAB函数替代方案?
它似乎没有在Octave图像包中定义:
error: 'imshowpair' undefined near line 15, column 15
The 'imshowpair' function belongs to the image package from Octave Forge
but has not yet been implemented.
Please read <https://www.octave.org/missing.html> to learn how you can
contribute missing functionality.
我尝试运行的代码:
close all
clear
clc
i=imread('1.jpg');
##BW=imbinarize(i);
BW=im2bw(i);
figure;
imshow(BW);
title('Binary image')
x=input("Enter whatever u want")
cc8=bwconncomp(BW,x);
L8=labelmatrix(cc8);
RGBLabel=label2rgb(L8,'jet','k','shuffle');
figure
imshowpair(L8,RGBLabel,'montage');
title(['lable img with ',int2str(x),'connctivity']);
imwrite(RGBLabel,'label.png');
1条答案
按热度按时间cpjpxq1n1#
看来兼容版本的
imshowpair
已在Octave Image包中实现。运行Octave 8.3.0和映像包v2.14.0: