File Exchange

image thumbnail

Cuboid fit (RANSAC)

version (483 KB) by Usama Mehmood
Fit cuboids in 3D point data.


Updated 11 Oct 2018

GitHub view license on GitHub

The program can be used to fit cuboids in 3D point data. The inlier and outlier sets are also returned. The 3D point-cloud and the cuboid model are displayed in a figure. The heuristic is based on Random Sample Consensus.

Sample 3D point data is also included for immediate testing. Use runme.m to execute the example.
Refer to for instructions to run the code.

Cite As

Usama Mehmood (2019). Cuboid fit (RANSAC) (, GitHub. Retrieved .

Comments and Ratings (2)

Ebube Ezi



Updated Title


Updated description

Updated description

Notes updated

Updated to Matlab's convex-hull function in minset(),
CuboidRANSAC returns inliers and outliers,
runme.m displays both inliers and outliers with the model.

Reformatted the input to RANSAC function.

Updated Title

Updated title

Detail on how to run the code is added.

MATLAB Release Compatibility
Created with R2017a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Discover Live Editor

Create scripts with code, output, and formatted text in a single executable document.

Learn About Live Editor