Professional Documents
Culture Documents
jpg');
%%%%%%%%%%%%%%%%%%%%%%%
edgeImg(vertcat(edgeRegs.PixelIdxList)) = 1;
% Do hough transform on edge image to find angles at which bone pieces are
% found
% Use max value of Hough transform vs angle to find angles at which lines
% are oriented. If there is more than one major angle contribution there
% will be two peaks detected but only one peak if there is only one major
% breaks + 1)
[H,T,R] = hough(edgeImg,'RhoResolution',1,'Theta',-90:2:89.5);
figure(1)
plot(T, maxHough);
hold on
hold of
if numel(HoughPeaks) > 1;
for m = 1:numel(HoughPeaks);
end
% (within tolerance) should be where the break is. Have to filter out
[BpY, BpX] = find(abs(dif(BreakStack, 1, 3)) < BreakLineTolerance*max(BreakStack(:)) & edgeImg > 0);
'Orientation', 'Centroid');
else
brReg = [];
end
figure(2)
imshow(img)
hold on
colormap('gray')
if ~isempty(brReg)
end
hold of