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

資源簡介

基于matlab的霍夫變換處理案例,使用的是matlab編寫的

資源截圖

代碼片段和文件信息

close?all;?clear?all;?clc;?
I?=?im2double(imread(‘test8.jpg‘));?
level?=?graythresh(I);?%?獲取全局閾值
J?=?im2bw(I?level);?
figure;?
subplot(121)?imshow(I);?
subplot(122)?imshow(J);?
%先進行取反的操作
JF=imcomplement(J);
%%進行旋轉(zhuǎn)30
JF=imrotate(JF30‘nearest‘‘crop‘);
%%進行對應的霍夫變換
[Hthetarho]?=?hough(JF);
title(‘圖像邊緣檢測‘);
xlabel(‘\theta?(degrees)‘)?ylabel(‘\rho‘);
axis?on?axis?normal?hold?on;
colormap(hot)
P?=?houghpeaks(H1000);
%x?=?theta(P(:2));
%y?=?rho(P(:1));
%plot(xy‘s‘‘color‘‘black‘);
lines?=?houghlines(JFthetarhoP‘FillGap‘5‘MinLength‘7);
imshow(JF);
max_len?=?0;

評論

共有 條評論