It turns out that the algorithm is susceptible to reporting the same ellipse multiple times. Wait.what? bestFits contains paramaters for 30 detections (a manual count informs me that there are 26 ellipses wholly contained in the image), but when visualizing the results, it appears that there are far fewer. Params.numBest = 30 %(Number of chips = 26) bestFits = ellipseDetection(edgeMask, params) Params.minAspectRatio = 0.4 %1 = circle 0 = line Then I used protractor to get a sense of the orientations of the ellipses:Īfter a few minutes, I found my way to: params.minMajorAxis = 55 First, I used imdistline to measure the major and minor axes lengths: To improve the performance, I judiciously selected input parameters to reduce the computational cost. (By the way, calling ellipseDetection() on the binary mask of the warped chips without first calculating the edges took upwards of 20 minutes, and the results were even worse!) Improving the Results The operation completed in (just) less than a second, but the results were underwhelming: With this binary edge mask in hand, I was ready to search for ellipses-first, naively: bestFits = ellipseDetection(edgeMask) In just a few minutes, I had an edge image in which to detect those ellipses:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |