我有一组向量x和y,它包含图像的像素坐标.我需要使用Matlab将这些值转换为图像.我该如何使用这些值?哪个功能最适合它?我使用的代码是:
I = imread('D:\majorproject\image\characters\ee.jpg');
imshow(I)
BW =im2bw(I);
BW=imcomplement(BW);
imshow(BW)
dim = size(BW);
col = round(dim(2)/2)-90;
row = find(BW(:,col), 1 );
boundary = bwtraceboundary(BW,[row, col],'N');
imshow(I)
hold on;
plot(boundary(:,2),boundary(:,1),'0','LineWidth',3);
BW_filled = imfill(BW,'holes');
boundaries = bwboundaries(BW_filled);
for k=1:10
b = boundaries{k};
plot(b(:,2),b(:,1),'g','LineWidth',3);
end
Run Code Online (Sandbox Code Playgroud)
从中我得到了坐标值.谢谢.