Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试使用阈值来突出图像中的某些像素并将它们的协调保存在矩阵中,以便我可以突出显示不同图像中相同协调的像素。我怎么能那样做?
所选图像中的像素可以唯一标识为存储为一维向量的一组索引。只要您的第二张图像具有相同的尺寸,您就可以使用相同的索引向量来操作像素。
见下面的例子
im1=peaks; threshold=0; im2=-im1; idx=find(im1>threshold); mask=zeros(size(im2)); mask(idx)=1; imagesc(im2.*mask); figure; imagesc(im2); hold on; contour(mask);