Automatic centering with LµCID library by Etienne Francois
Summary Requisites How does it work ? Next step
Requisites PyFAI (Jerome Kiefer, Dimitrios Karkoulis) OpenCV 2.x
How does it work ? Communication with mxCuBE Time performance Based on the manual procedure with 3 click centering Step by step with visual information Time performance About 200ms to locate the center of the loop in the image Between 25 and 30s for the entire procedure
How does it work ? Algorithm for mxCuBE Find the loop Minimal zoom (level 1 in mxCuBE) Usually once (5 try at most) If not visible, rotate back step by step to estimate the position Test centering Middle zoom (level 3 in mxCuBE) Switch off the back light Switch on the front light Usually once (2 try at most) Inform on fail or success
How does it work ? Image processing with LµCID Pre-treatment (with PyFAI lib) Treatment (with OpenCV lib)
How does it work ? Pre-treatment Light up the corners Improve the detection and limit false detections After Before
How does it work ? Treatment Adaptive threshold After Before
How does it work ? Median filter after contours detection and fill. 0 0 0 0 0 255 255 255 255 After Before
How does it work ? Morphological mathematic Erosion Dilatation
How does it work ? First erosion then dilatation Erode then dilate After Before
How does it work ? Then use the result of erosion/dilatation as a mask to the previous image Delete the robot and the sample holder to have just the loop
How does it work ? We can now take measures and determine the center of the loop A third from the right for the moment but it might be improved
Next step : edge detection for mesh scan Create a mesh for the loop Centered loop in face position Determine all the consistent points Mesh the founded area
To be continued … The automatic centering is currently in test phase Some improvement are needed Some promising results yet The automatic mesh scan is currently in development