91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡介

使用matlab識別出圖像中的圓形,計算并標注出原形坐標和圓的位置

資源截圖

代碼片段和文件信息

%識別圖像中的圓,并畫出來。
function[xy]?=step2(ImageFile)
%?Step?1:?讀入彩色圖像
RGB?=?imread(‘08.jpg‘);
figure
imshow(RGB)
title(‘Original?Image‘);

%?Step?2:?轉化為灰度圖像?
GRAY?=?rgb2gray(RGB);
figure
imshow(GRAY)
title(‘Gray?Image‘);

%?Step?3:?圖像二值化,以便為邊界跟蹤做準備
threshold?=?graythresh(GRAY);
BW?=?im2bw(GRAY?threshold);
figure
imshow(BW)
title(‘Binary?Image‘);

%?Step?4:?二值圖像反色
BW?=?~?BW;
figure
imshow(BW)
title(‘Inverted?Binary?Image‘);

%?Step?5:?尋找圖像的外邊界,參數值選用noholes可避免搜索內部輪廓以加速處理過程
[BL]?=?bwboundaries(BW?‘noholes‘);

%?Step?6:?決定對象屬性
STATS?=?regionprops(L?‘all‘);?%?we?need?‘BoundingBox‘?and?‘Extent‘

%?Step?7:?判斷形狀
%?Squ

評論

共有 條評論