![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1004910/image.png)
Hello! I have an aspheric lens and I need to know the parameters of this lens, for that I need to know the surface's equation, can I use MATLAB to know the lens coordinates?
6 ビュー (過去 30 日間)
古いコメントを表示
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1003500/image.jpeg)
0 件のコメント
採用された回答
yanqi liu
2022 年 5 月 20 日
yes,sir,may be use image segment to get the edge,and then use fit_ellipse to get the parameters,such as
im = imread('https://www.mathworks.com/matlabcentral/answers/uploaded_files/1003500/image.jpeg');
bw = ~im2bw(im);
bw = imclearborder(bw);
bw = bwareafilt(bw,1);
bw2 = imclose(bw, strel('disk', 19));
bw2 = imfill(bw2,'holes');
bw2 = imclose(bw2, strel('disk', 100));
be = bwperim(bw2);
figure; imshow(be);
then,we can get the edge location,and get ellipse
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1004910/image.png)
a: 300.8214
b: 293.0813
phi: 0.3815
X0: 69.8848
Y0: 941.7797
X0_in: 415.5356
Y0_in: 848.0348
long_axis: 601.6429
short_axis: 586.1626
status: ''
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Read, Write, and Modify Image についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!