Skip to main content

Class: Image

viewer.Image

classdesc Represents a image in the navigation graph.

Explanation of position and bearing properties:

When images are uploaded they will have GPS information in the EXIF, this is what is called originalLngLat Image.originalLngLat.

When Structure from Motions has been run for a image a computedLngLat that differs from the originalLngLat will be created. It is different because GPS positions are not very exact and SfM aligns the camera positions according to the 3D reconstruction Image.computedLngLat.

At last there exist a lngLat property which evaluates to the computedLngLat from SfM if it exists but falls back to the originalLngLat from the EXIF GPS otherwise Image.lngLat.

Everything that is done in in the Viewer is based on the SfM positions, i.e. computedLngLat. That is why the smooth transitions go in the right direction (nd not in strange directions because of bad GPS).

E.g. when placing a marker in the Viewer it is relative to the SfM position i.e. the computedLngLat.

The same concept as above also applies to the compass angle (or bearing) properties originalCa, computedCa and ca.

Accessors#

cameraParameters#

• get cameraParameters(): number[]

Get cameraParameters.

description Will be undefined if SfM has not been run.

Camera type dependent parameters.

For perspective and fisheye camera types, the camera parameters array should be constructed according to

[focal, k1, k2]

where focal is the camera focal length, and k1, k2 are radial distortion parameters.

For spherical camera type the camera parameters are unset or emtpy array.

Returns#

number[]

The parameters related to the camera type.

Defined in#

graph/Image.ts:110


cameraType#

• get cameraType(): string

Get cameraType.

description Will be undefined if SfM has not been run.

Returns#

string

The camera type that captured the image.

Defined in#

graph/Image.ts:121


capturedAt#

• get capturedAt(): number

Get capturedAt.

description Timestamp of the image capture date and time represented as a Unix epoch timestamp in milliseconds.

Returns#

number

Timestamp when the image was captured.

Defined in#

graph/Image.ts:133


clusterId#

• get clusterId(): string

Get clusterId.

Returns#

string

Globally unique id of the SfM cluster to which the image belongs.

Defined in#

graph/Image.ts:143


compassAngle#

• get compassAngle(): number

Get compassAngle.

description If the SfM computed compass angle exists it will be returned, otherwise the original EXIF compass angle.

Returns#

number

Compass angle, measured in degrees clockwise with respect to north.

Defined in#

graph/Image.ts:171


computedAltitude#

• get computedAltitude(): number

Get computedAltitude.

description If SfM has not been run the computed altitude is set to a default value of two meters.

Returns#

number

Altitude, in meters.

Defined in#

graph/Image.ts:200


computedCompassAngle#

• get computedCompassAngle(): number

Get computedCompassAngle.

description Will not be set if SfM has not been run.

Returns#

number

SfM computed compass angle, measured in degrees clockwise with respect to north.

Defined in#

graph/Image.ts:212


computedLngLat#

• get computedLngLat(): LngLat

Get computedLngLat.

description Will not be set if SfM has not been run.

Returns#

LngLat

SfM computed longitude, latitude in WGS84 datum, measured in degrees.

Defined in#

graph/Image.ts:224


creatorId#

• get creatorId(): string

Get creatorId.

description Note that the creator ID will not be set when using the Mapillary API.

Returns#

string

Globally unique id of the user who uploaded the image.

Defined in#

graph/Image.ts:237


creatorUsername#

• get creatorUsername(): string

Get creatorUsername.

description Note that the creator username will not be set when using the Mapillary API.

Returns#

string

Username of the creator who uploaded the image.

Defined in#

graph/Image.ts:250


exifOrientation#

• get exifOrientation(): number

Get exifOrientation.

Returns#

number

EXIF orientation of original image.

Defined in#

graph/Image.ts:260


height#

• get height(): number

Get height.

Returns#

number

Height of original image, not adjusted for orientation.

Defined in#

graph/Image.ts:270


id#

• get id(): string

Get id.

Returns#

string

Globally unique id of the image.

Defined in#

graph/Image.ts:302


image#

• get image(): HTMLImageElement

Get image.

description The image will always be set on the current image.

Returns#

HTMLImageElement

Cached image element of the image.

Defined in#

graph/Image.ts:281


lngLat#

• get lngLat(): LngLat

Get lngLat.

description If the SfM computed longitude, latitude exist it will be returned, otherwise the original EXIF latitude longitude.

Returns#

LngLat

Longitude, latitude in WGS84 datum, measured in degrees.

Defined in#

graph/Image.ts:316


mergeId#

• get mergeId(): string

Get mergeId.

description Will not be set if SfM has not yet been run on image.

Returns#

string

Id of connected component to which image belongs after the aligning merge.

Defined in#

graph/Image.ts:343


merged#

• get merged(): boolean

Get merged.

Returns#

boolean

Value indicating whether SfM has been run on the image and the image has been merged into a connected component.

Defined in#

graph/Image.ts:329


mesh#

• get mesh(): MeshContract

Get mesh.

description The mesh will always be set on the current image.

Returns#

MeshContract

SfM triangulated mesh of reconstructed atomic 3D points.

Defined in#

graph/Image.ts:355


originalAltitude#

• get originalAltitude(): number

Get originalAltitude.

Returns#

number

EXIF altitude, in meters, if available.

Defined in#

graph/Image.ts:364


originalCompassAngle#

• get originalCompassAngle(): number

Get originalCompassAngle.

Returns#

number

Original EXIF compass angle, measured in degrees.

Defined in#

graph/Image.ts:374


originalLngLat#

• get originalLngLat(): LngLat

Get originalLngLat.

Returns#

LngLat

Original EXIF longitude, latitude in WGS84 datum, measured in degrees.

Defined in#

graph/Image.ts:384


ownerId#

• get ownerId(): string

Get ownerId.

Returns#

string

Globally unique id of the owner to which the image belongs. If the image does not belong to an owner the owner id will be undefined.

Defined in#

graph/Image.ts:395


private#

• get private(): boolean

Get private.

Returns#

boolean

Value specifying if image is accessible to organization members only or to everyone.

Defined in#

graph/Image.ts:407


qualityScore#

• get qualityScore(): number

Get qualityScore.

description Value should be on the interval [0, 1].

Returns#

number

A number between zero and one determining the quality of the image. Blurriness (motion blur / out-of-focus), occlusion (camera mount, ego vehicle, water-drops), windshield reflections, bad illumination (exposure, glare), and bad weather condition (fog, rain, snow) affect the quality score.

Defined in#

graph/Image.ts:424


rotation#

• get rotation(): number[]

Get rotation.

description Will not be set if SfM has not been run.

Returns#

number[]

Rotation vector in angle axis representation.

Defined in#

graph/Image.ts:435


scale#

• get scale(): number

Get scale.

description Will not be set if SfM has not been run.

Returns#

number

Scale of reconstruction the image belongs to.

Defined in#

graph/Image.ts:447


sequenceId#

• get sequenceId(): string

Get sequenceId.

Returns#

string

Globally unique id of the sequence to which the image belongs.

Defined in#

graph/Image.ts:457


width#

• get width(): number

Get width.

Returns#

number

Width of original image, not adjusted for orientation.

Defined in#

graph/Image.ts:521