matlab - 图像峰度函数

标签 matlab image-processing statistics

我想在 matlab 中计算图像的峰度。 Matlab 有一个函数kurtosis 我可以在矩阵上使用这个函数。例如:

m = rand([4 5]);
kurtosis(m(:));

虽然当我使用这个灰度图像时:enter image description here

I = imread('0.tiff');
kurtosis(I(:));

我收到这个错误:

Error using - Integers can only be combined with integers of the same class, or scalar doubles.

Error in kurtosis (line 39) x0 = x - repmat(nanmean(x,dim), tile);

我现在的问题是:我哪里做错了,我该如何计算图像的峰度。

最佳答案

峰度需要我是双倍的。这有效:

kurtosis(double(I(:)));

或者这个

kurtosis(double(I));

关于matlab - 图像峰度函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12527812/

相关文章:

wolfram-mathematica - 求解一个变量的混合方程

matlab - 在 C DLL 中使用 delphi 数据类型的问题

java - 允许数组中的线程不安全

r - 如何在R中的向量中找到一个值与其最接近的值之间的差异?

python - MATLAB 生成的 Python 包与 Ubuntu 上的 PyQt5 冲突——可能是库问题

python - 如何使用 sphinxcontrib-matlabdomain 记录具有多个类的 Matlab 项目?

image-processing - 从带有圆形物体的图像中去除噪声

algorithm - 维奥拉·琼斯实验(训练集)

c++ - 用 C++ 快速实现反不完全 Beta 函数

python - 我怎样才能改进这个方程,使负面投票多于正面投票的项目返回更有用的威尔逊分数