主要内容

本页采用了机器翻译。点击此处可查看英文原文。

isempty

判断 points 对象是否为空

说明

如果 points 对象为空,则 isempty(points) 会返回一个 true 值。

示例

示例

全部折叠

读取一个图像。

I = imread('cameraman.tif');

从图像中检测 KAZE 点。

points = detectKAZEFeatures(I);

检查是否存在点。

if isempty(points)
    return;
end

从检测到的点中提取 KAZE 特征。

[features,validPoints] = extractFeatures(I,points);

绘制十个最强的有效提取点,并显示其方向。

imshow(I)
hold on
strongestPoints = selectStrongest(validPoints,10);
plot(strongestPoints,'showOrientation',true)
hold off

Figure contains an axes object. The hidden axes object contains 3 objects of type image, line. One or more of the lines displays its values using only markers

输入参数

全部折叠

点对象,应为Point Feature Types中描述的点要素对象之一。该对象包含关于在输入图像中检测到的特征点的信息。要获取点,请使用与点特征类型配对的适当检测函数。

版本历史记录

在 R2017b 中推出