Contextualize
For asset-centric (legacy) or hybrid projects, you can contextualize 360° images in two ways:- Use your own tooling to read 360° images, run text detection, and create contextualization approvals.
- Use the Vision API to detect text regions from your 360° images and then create annotations with the Annotations API.
Run text detection
Use the Vision API text detection to get text regions from your 360° images.Trigger text detection with the Cognite Python SDK:
file_ids: List of CDF file IDs for your 360° images.Match text to CogniteAssets
To link detections to core data model CogniteAssets, match the detected text to the right asset.
Exact matching
Exact matching
Retrieve the CogniteAssets of your interest, then match detected text to asset properties such as
name or externalId using exact string match.Fuzzy matching
Fuzzy matching
Use fuzzy matching (for example, trigram similarity using Python’s
difflib library) so that optical character recognition (OCR) issues still match the correct asset. Fuzzy matching helps when detected text has typos, spaces, or misread characters.Create annotations
To contextualize 360° images with the matched text, create annotations with the Annotations API. Use the annotation type
images.AssetLink (legacy) or images.InstanceLink (hybrid) in the request items → data. Each annotation links one 360° image (file) to one asset and can include the spatial region where the text was detected.Create annotations URL: https://{cluster}.cognitedata.com/api/v1/projects/{project}/annotationsExample request body (hybrid — images.InstanceLink):