cd /news/computer-vision/from-42-points-to-842-debugging-a-cp… · home topics computer-vision article
[ARTICLE · art-82603] src=dev.to ↗ pub= topic=computer-vision verified=true sentiment=↑ positive

From 42 Points to 842: Debugging a CPU-Only 3D Reconstruction Pipeline

An engineer at PreserveMy.World built a CPU-only Structure-from-Motion pipeline using COLMAP to reconstruct the Moorcroft Pavilion at Shalimar Gardens, Lahore. By curating 15 tightly-overlapping images instead of 43 general ones, camera registration improved from 2/43 to 15/15 and sparse points jumped from 42 to 842, a 20x improvement. The engineer used Claude to help debug and document results, but verified all figures against actual pipeline output.

read2 min views2 publishedJul 31, 2026

Track: AI-Based 3D Scene Reconstruction — PreserveMy.World × TechRealm Internship (Charbagh Collective)

As part of my Platform & Web Engineering internship with PreserveMy.World, I built a Structure-from-Motion (SfM) pipeline using COLMAP to generate a sparse 3D point cloud of the Moorcroft Pavilion at Shalimar Gardens, Lahore — entirely on a CPU-only Windows machine, with no CUDA GPU available.

My first attempt used 43 general images of Shalimar Gardens pulled from Wikimedia Commons. COLMAP could only register 2 out of 43 cameras, producing just 42 sparse 3D points — essentially unusable. The problem: the images covered different parts of a huge garden complex with almost no consistent overlap between them. COLMAP's feature matcher had nothing reliable to connect across images.

I switched strategy: instead of broad coverage, I curated 15 tightly-overlapping images focused on a single structure, the Moorcroft Pavilion, ensuring 60–80% visual overlap between consecutive shots. That one change took camera registration from 2/43 (about 5%) to 15/15 (100%), and sparse points jumped from 42 to 842 — a 20x improvement.

I used Claude to help debug why registration was failing, to draft documentation summarizing the technical results, and to structure a before/after visual comparison in the repo README. Everything numeric — camera counts, point counts, which images were used — came from my own COLMAP runs; I verified every figure against my actual pipeline output before it went into any documentation. AI didn't run the reconstruction or generate the data — it helped me communicate results I had already produced and verified.

Dense reconstruction (patch-match stereo, which produces a full textured mesh rather than a sparse point cloud) requires a CUDA GPU I don't have access to locally. The next step would be running the same pipeline on cloud GPU compute, or capturing a dedicated, tightly-overlapping photo set on-site at Shalimar Gardens rather than relying on scattered public images.

PreserveMy.World's mission is digitizing cultural heritage sites in Pakistan. Most students and volunteers won't have access to expensive GPU hardware, so proving that a CPU-only sparse reconstruction pipeline can still produce a meaningful, structurally accurate point cloud — as long as the image capture strategy is right — matters for making heritage digitization accessible at scale, not just to teams with lab-grade equipment.

Full pipeline, scripts, and commit history: github.com/humnaattique4-sys/shalimar-gardens-3d-reconstruction

── more in #computer-vision 4 stories · sorted by recency
── more on @preservemy.world 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/from-42-points-to-84…] indexed:0 read:2min 2026-07-31 ·