rot = imrotate(image2,90);
h = imshow(rot,[]);
hp = impixelinfo;
set(hp,'Position',[5 1 300 20]);
r = 152;
c = 104;
trace = bwtraceboundary(rot,[r c],'W',8,Inf,'clockwise');
hold on;
plot(trace(:,2),trace(:,1),'g','LineWidth',2);
end
Hi folks, I am trying to write a script using bwtraceboundary. My image processing is correct in that I have a binary logic matrix. The real confusing part of this is down at the bottom of the code where I am trying to use the bwtraceboundary function. I keep getting an error stating index exceeds matrix dimensions because the trace variables ends up resulting as an open vector []. Any thoughts??