To overlay detected objects onto 360° oriented imagery and streamline the process of identifying and removing noisy objects, you can use a custom implementation with Photo Sphere Viewer. This tool allows you to display markers, polygons, and other overlays directly on a 360° image.
https://photo-sphere-viewer.js.org/demos/markers/polygon-pattern.html
Add Detected Objects as Markers
- Parse the GeoJSON to extract object positions and other details.
- Add markers or polygons to the viewer using the coordinates of detected objects. Example code:
const viewer = new PhotoSphereViewer.Viewer({
container: document.getElementById('viewer'),
panorama: 'path/to/your/image.jpg', // Replace with your 360° image path
plugins: [
[PhotoSphereViewer.MarkersPlugin],
],
});
const markersPlugin = viewer.getPlugin(PhotoSphereViewer.MarkersPlugin);
// Example marker data
const detectedObjects = [
{ id: 'object1', longitude: 2.3, latitude: 1.1, label: 'Detected Object 1' },
{ id: 'object2', longitude: 2.5, latitude: 1.3, label: 'Detected Object 2' },
];
detectedObjects.forEach(obj => {
markersPlugin.addMarker({
id: obj.id,
longitude: obj.longitude,
latitude: obj.latitude,
tooltip: obj.label,
color: 'rgba(255, 0, 0, 0.5)', // Red overlay for detection
});
});