? ?? Function 'find' is not defined for values of class 'cell'. Error in ==> mathcorner at 67 upperLeftCornerX = find(B(1,:), 1, 'first');
[B,L] = bwboundaries(g,'holes');
imshow(label2rgb(L, @jet, [.1 .1 .1]))
hold on
for k = 1:length(B)
boundary = B{k};
plot(boundary(:,2), boundary(:,1), 'w', 'LineWidth', 1)
end
upperLeftCornerX = find(B(1,:), 1, 'first');
upperRightCornerX = find(B(1,:), 1, 'last');
lowerLeftCornerX = find(B(end,:), 1, 'first');
lowerRightCornerX = find(B(end,:), 1, 'last');
upperLeftCornerX
upperRightCornerX
lowerLeftCornerX
lowerRightCornerX