week3
Week3
15/03/2023
Goals:
- Extraction coordinates
- Fitting the sphere
1. Extraction coordinates
1) First version:
the image pixels are first kept the same size as their pixel matrix and then converted to a heat map:
After binarisation:
At this point we find that the extracted edge curves do not accurately represent the position of the lens surface because of the binarization process, and we used a different, more accurate method.
2) More accurate version
Masking: taking the four points on the lens through the luminance curve and substituting them to obtain the equation of the sphere, which is used as a mask to eliminate the image interference of platforms and stray points in the image data.
Extraction of coordinates: Based on the masked 3d pixel matrix, get the exact 3d lens coordinate position by taking the point with the largest pixel value in the z-axis pixel curve along the plane formed by the x-axis and y-axis.
2.Sphere fitting
constructing a loss function to quantify the loss between all data points and the sphere equation, and then fitting the sphere equation that minimizes the loss at all data points by making the first order partial derivative equal to zero.
Fitting result:





评论
发表评论