This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

addView

Class: viewSet

Add a new view to view set object

Syntax

vSet = addView(vSet,viewId)
vSet = addView(vSet,viewId,Name,Value)

Description

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

vSet = addView(vSet,viewId,Name,Value) uses additional options specified by one or more Name,Value pair arguments.

Input Arguments

expand all

viewSet object.

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

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside quotes. You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

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.

Orientation of the second camera relative to the first, specified as the comma-separated pair consisting of 'Orientation' and a 3-by-3 matrix.

Location of the second camera relative to the first, specified as the comma-separated pair consisting of 'Location' and a three-element vector.

Output Arguments

expand all

viewSet object containing the added view specified by viewId.

Examples

expand 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(rgb2gray(I));

Add the points to the object.

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

Introduced in R2016a