A walkthrough of building a single-image photogrammetry pipeline in Ruby using ruby-libgd. The approach uses a credit card as a known-size reference object in a photo, then applies edge detection (Sobel via native C), a Hough transform (pure Ruby) to find straight lines, credit card rectangle detection for scale calibration, and finally draws measurement overlays (door width, window height, wall length) on the original image. Full Ruby code is provided for each step, along with performance benchmarks and constraints around the single-plane assumption.

6m read timeFrom rubystacknews.com
Post cover image
Table of contents
Support RubyStackNewsThe ideaThe pipelineStep 1 to 3: Edge detection (native C)Step 4: Hough transform (Ruby)Step 6: Credit card detectionStep 7: Scale calibrationStep 8 to 9: Measure and overlayThe constraint: one flat planePerformance summaryWhat this opens upSupport RubyStackNewsShare this:Related

Sort: