Main Content

addView

(To be removed) Add new view to view set object

The viewSet object and its addView function will be removed in a future release. Use the imageviewset object and its addView function instead. For more information, see Compatibility Considerations.

Description

vSet = addView(vSet,viewId) adds the view specified by viewID to the specified viewSet object.

example

vSet = addView(vSet,viewId,Name,Value) specifies additional options using one or more name-value pair arguments.

Examples

collapse all

Create an empty viewSet object.

vSet = viewSet;

Detect interest points in the image.

imageDir = fullfile(toolboxdir('vision'),'visiondata','structureFromMotion');
I = imread(fullfile(imageDir,'image1.jpg'));
points = detectSURFFeatures(im2gray(I));

Add the points to the object.

vSet = addView(vSet,1,'Points',points,'Orientation',eye(3),'Location',[0,0,0]);

Input Arguments

collapse all

viewSet object.

Camera pose view ID in the viewSet object, specified as an integer.

Name-Value Arguments

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Before R2021a, use commas to separate each name and value, and enclose Name in quotes.

Example: 'Location','[0,0,0]'

Image points, specified as the comma-separated pair consisting of 'Points' and an M-by-2 matrix of [x,y] coordinates or any points object.

Absolute orientation of the camera, specified as the comma-separated pair consisting of 'Orientation' and a 3-by-3 matrix.

Absolute location of the camera, specified as the comma-separated pair consisting of 'Location' and a three-element vector.

Output Arguments

collapse all

viewSet object containing the added view specified by viewId.

Version History

Introduced in R2016a

expand all