← সব লেখা

aiNov 22, 20263 মিনিটে পড়া যায়

Can We Build 3D Live? From Structure from Motion to SLAM

In this series we have seen how Structure from Motion (SfM) turns many photos into a 3D model. In the last post we even did the full maths for one method. A common question is: can this happen live, while the camera is still moving? The answer is yes. Your phone does it every time you use an AR app. When it runs live, it usually has a different name: SLAM, which stands for Simultaneous Localization and Mapping. In plain words: “find where I am, and draw the map, at the same time”.

Why normal SfM is not live

A tool like COLMAP waits until it has all the photos. Then it adjusts every camera and every 3D point together, again and again, until everything fits. This gives very good results, but it can take minutes or hours. A robot or a phone cannot wait that long. It needs an answer for every new photo, many times per second.

The trick: split the work into two jobs

Diagram: tracking runs for every photo and finds where the camera is; mapping runs for key photos, makes new 3D points, fixes the last few cameras and looks for loops
Live SLAM splits the work into a fast job and a slower job.

The first job is tracking. It runs for every photo and must be very fast. The camera already has a small map of 3D points. In the new photo, it finds some of those points again. If you know where a few known points appear in a photo, you can work out where the camera must be standing. It is like knowing your position in a room by looking at the door, the window and the lamp.

The second job is mapping. It runs only for some photos, called key photos. These are the ones that show a lot of new things. From a key photo and an older one, the mapper makes new 3D points with triangulation, the same idea as in normal SfM. Then it fixes only the last few cameras and points together, not the whole map. This is what keeps it fast.

The two jobs run at the same time on the computer. Tracking says where the camera is now. Mapping makes the map better in the background.

The problem: small errors add up

Animation: top view of a room; a camera walks in a loop and adds map points; its estimated path slowly drifts away from the real one, then loop closure snaps the path and the map back
Code-generated illustration (simulated room and camera), not real data.

Every step has a tiny error. One tiny error is harmless, but they add up. Say each metre of walking adds 1 centimetre of error. After 100 metres, the camera can be 1 metre away from where it thinks it is. In the GIF, the orange path slowly moves away from the real path, and the map of the walls bends with it. This is called drift.

The fix: “I have been here before!”

When the camera comes back to a place it has already seen, the system can recognise it. Now it knows two things: the path should end where it started, but its estimate says otherwise. That difference tells it how much drift has built up. It spreads the correction back over the whole path, and the map snaps back into shape. This is called loop closure, the last part of the GIF.

Where this is used

  • Phones: AR apps (ARKit, ARCore) track the phone so a virtual chair stays on the real floor.
  • Robots and drones: they map rooms, farms and factories while they move.
  • Self-driving and inspection vehicles: cameras, often with other sensors, keep track of the vehicle’s position.

Well-known open systems include ORB-SLAM3, which makes a light map of points, and newer deep-learning methods such as DROID-SLAM, which make denser maps but need a GPU.

What one camera cannot know

With a single camera, SLAM finds the shape but not the true size. A small room filmed up close and a big hall filmed from far away can look the same. So real systems often add a second camera or a motion sensor (IMU) to find the real scale in metres.

So, can SfM give us 3D live? Yes, if we split the work into a fast part and a slow part, and fix the drift when we come back to a known place.

মন্তব্য

মন্তব্য · 1

মন্তব্য লিখুন

আপনার ইমেইল কখনো প্রকাশ করা হবে না। যাচাইয়ের পর মন্তব্য দেখা যাবে।