-
大小: 6KB文件类型: .rar金币: 1下载: 0 次发布日期: 2021-05-21
- 语言: Matlab
- 标签: hough变换 matlab houghlines houghpeaks
资源简介
hough变换matlab程序的houghlines和houghpeaks源代码。
代码片段和文件信息
function lines = houghlines(varargin)
%HOUGHLINES Extract line segments based on Hough transform.
% LINES = HOUGHLINES(BW THETA RHO PEAKS) extracts line segments
% in the image BW associated with particular bins in a Hough
% transform. THETA and RHO are vectors returned by function HOUGH.
% Matrix PEAKS which is returned by function HOUGHPEAKS
% contains the row and column coordinates of the Hough transform
% bins to use in searching for line segments. HOUGHLINES returns
% LINES structure array whose length equals the number of merged
% line segments found. Each element of the structure array has
% these fields:
%
% point1 End-point of the line segment; two-element vector
% point2 End-point of the line segment; two-element vector
% theta Angle (in degrees) of the Hough transform bin
% rho Rho-axis position of the Hough transform bin
%
% The end-point vectors contain [X Y] coordinates.
%
% LINES = HOUGHLINES(...PARAM1VAL1PARAM2VAL2) sets various
% parameters. Parameter names can be abbreviated and case
% does not matter. Each string parameter is followed by a value
% as indicated below:
%
% ‘FillGap‘ Positive real scalar.
% When HOUGHLINES finds two line segments associated
% with the same Hough transform bin that are separated
% by less than ‘FillGap‘ distance HOUGHLINES merges
% them into a single line segment.
%
% Default: 20
%
% ‘MinLength‘ Positive real scalar.
% Merged line segments shorter than ‘MinLength‘
% are discarded.
%
% Default: 40
%
% Class Support
% -------------
% BW can be logical or numeric and it must be real 2-D and nonsparse.
%
% Example
% -------
% Search for line segments corresponding to five peaks in the Hough
% transform of the rotated circuit.tif image. Additionally highlight
% the longest segment.
%
% I = imread(‘circuit.tif‘);
% rotI = imrotate(I33‘crop‘);
% BW = edge(rotI‘canny‘);
% [HTR] = hough(BW);
% imshow(H[]‘XData‘T‘YData‘R‘InitialMagnification‘‘fit‘);
% xlabel(‘\theta‘) ylabel(‘\rho‘);
% axis on axis normal hold on;
% P = houghpeaks(H5‘threshold‘ceil(0.3*max(H(:))));
% x = T(P(:2)); y = R(P(:1));
% plot(xy‘s‘‘color‘‘white‘);
%
% % Find lines and plot them
% lines = houghlines(BWTRP‘FillGap‘5‘MinLength‘7);
% figure imshow(rotI) hold on
% max_len = 0;
% for k = 1:length(lines)
% xy = [lines(k).point1; lines(k).point2];
% plot(xy(:1)xy(:2)‘LineWidth‘2‘Color‘‘green‘);
%
% % plot beginnings and ends of lines
% plot(xy(11)xy(12)‘x‘‘LineWidth‘2‘Color‘‘yellow‘);
% plot(xy(21)xy(22)‘x‘‘LineWidth‘2‘Color‘‘red‘);
%
% % determine the endpoints of the longest line segment
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 8265 2008-09-28 15:30 houghlines.m
文件 6571 2008-09-26 14:48 houghpeaks.m
----------- --------- ---------- ----- ----
14836 2
- 上一篇:高斯混合模型GMM 及高斯混合回归MATLAB程序
- 下一篇:l1-Magic工具箱
相关资源
- l1-Magic工具箱
- 高斯混合模型GMM 及高斯混合回归MAT
-
风力发电机整体MATLABSIMUli
nk建模 - 重频参差信号matlab仿真程序
- 基于matlab的滤波器BPF设计课程设计任
- matlab计算图像间的相似度程序
- matlab连续计算图像间的互信息值
- 基于自相关法的语音基音周期估计-
- mcmc程序MATLAB
- 同步电机模型的MATLAB仿真
- 最小方差自校正调节器matlab
- 有关单层小波分解与重构matlab程序
- 多层小波分解与重构matlab程序
- GNMATLAB实现
- lipschitz指数matlab程序91016
- matlab计算器源代码
- 信道化的matlab仿真实现
- matlab中jpeg tool box(tbx)编译好的mex
- 电力线通信信道模型
-
电路实验与MatlabSimuli
nk仿真 - LABVIEW和MATLAB混合编程方法研究及其在
- JPEG的matlab实现代码
- matlab 2007b注册机
- 基于MATLAB的通信系统仿真平台设计
- 异步电机矢量控制,亲测可用,版本
- 用MATLAB实现GMSK信号的产生与解调
- 勒沙杰空间计量MATLAB可做面板数据
- 移动目标检测MATLAB版
- matlab贝叶斯分类(3)-UCI数据集通用分
- 几种现代谱估计的方法Matlab程序
评论
共有 条评论