概述
我是Matlab的新手,我想在不使用Matlab内置函数的情况下实现霍夫变换; 因此,我正在学习这样做的可能方法。 我发现在一本书中写的一个函数似乎是正确的。 我遇到错误,无法解决。
我想实现霍夫变换功能,然后将其应用于灰度图像
% This functions makes use of sparse matrices
function [h, theta, rho] = HT(f, dtheta, drho)
% [H, THETA, RHO] = HOUGH(F, DTHETA, DRHO) computes the hough
% transform of the image F. DTHETA specifies the spacing (in degrees) of
% the the hough transform bins along the theta axis.
% DRHO specifies the spacing of the hough transform bins along the rho
% axis. H is the Hough transform matrix. It is NRHO-by-NTHETA, where
% NRHO = 2*ceil(norm(size(F))/DRHO) - 1, and NTHETA = 2*ceil(90/DTHETA).
if nargin < 3
drho = 1;
end
if nargin < 2
dtheta = 1;
end
f = double(f);
[M,N] = size(f);
theta = linspace(-90, 0, ce
最后
以上就是聪慧心情为你收集整理的matlab中函数或变量x无法识别,matlab - 无法识别的函数或变量“ f”错误 - 堆栈内存溢出...的全部内容,希望文章能够帮你解决matlab中函数或变量x无法识别,matlab - 无法识别的函数或变量“ f”错误 - 堆栈内存溢出...所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复