Main Content

size

Return size of points object

Description

sz = size(points) returns the size of the points object. sz is defined as the vector [length(points),1].

example

sz = size(points,1) returns the length of points.

sz = size(points,dimension) returns the length of the points in the specified dimension.

[M,N] = size(points) returns length(points) for M and 1 for N

Examples

collapse all

Read an image.

I = imread('cameraman.tif');

Detect corner features.

featurePoints = detectHarrisFeatures(I);

Find the size of the feature points object.

sz = size(featurePoints)
sz = 1×2

   184     1

Plot feature image with detected features.

imshow(I); hold on;
plot(featurePoints);

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

Input Arguments

collapse all

Points object,specified as one of the point feature objects described in Point Feature Types. The object contains information about the feature points detected in the input image. To obtain points, use the appropriate detect function that pairs with the point feature type.

Dimension, returned as an integer. For dim >= 2, the object returns 1.

Version History

Introduced in R2012a