MATLAB: Minboundcircle stuck in infinate loop of a particular dataset

enc3infinite loopminbound circle

Hello. I have a dataset which represents the pixels of the center of a wheel identified from a single video frame. In my specific case, I have used minboundcircle to analyze 32,800 frames and only one seems to get stuck in an infinate loop. The problem frame has been identified as frame 89. I have attached the pixel dataset for the problem frame as well as the frame before it, frame 88. Both datasets contain 181 pixles of information and between the two dataset, only two points differ. Any ideas why frame 89 causes minboundcircle (specifically enc3 inside of minboundcircle) to get stuck?
Attached are 3 files: example88.mat – contains a dataset that works fine example89.mat – contains the problem dataset ProblemFrame.m – contains the code being used to call minboundcircle on each dataset (By commenting out line 23 and running, the code executes fully. Removing the comment and rerunning results in an infinate loop.)
FYI, minboundcircle.m came from the File Exchange. enc3.m is called from within minboundcircle.
My installation is: R2013a (8.1.0.604) 64-bin (win64)
Thanks,
Tony

Best Answer

I cannot replicate your error but get
minboundcircle(X89,Y89)
ans =
471.8077 261.8077