matlab中函数或变量x无法识别,matlab - 无法识别的函数或变量“ f”错误 - 堆栈内存溢出...

我是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

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值