Main Content

updateView

(To be removed) Modify existing view in view set object

The viewSet object and its updateView function will be removed in a future release. Use the imageviewset object and its updateView function instead. For more information, see Version History.

Description

vSet = updateView(vSet,viewId) modifies the view specified by viewId in the specified viewSet object, vSet.

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

example

vSet = updateView(vSet,views) modifies a view or a set of views specified by the view table.

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

Add the points to the object.

vSet = addView(vSet,1,'Points',points);

Update the view to specify the camera pose.

vSet = updateView(vSet, 1,'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.

Camera views, specified as a table. The table must contain a column named ViewID, and one or more columns named Points, Orientation, or Location.

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.

Orientation of the second camera relative to the first camera, specified as the comma-separated pair consisting of 'Orientation' and a 3-by-3 matrix that represents the [x,y,z] orientation of the second camera.

Location of the second camera relative to the first camera, specified as the comma-separated pair consisting of 'Location' and a three-element vector that represents the [x,y,z] location of the second camera in the first camera’s coordinate system.

Output Arguments

collapse all

viewSet object containing the modified view specified by viewId.

Version History

Introduced in R2016a

collapse all

R2020a: updateView function of viewSet object will be removed

The viewSet object and its updateView function will be removed in a future release. Instead, manage views and pairwise connections between views of data using use the imageviewset object. Update connections between views of the imageviewset object using its updateView function.