Project Type: Class Project, MEE 623 – Robot Vision Control
Date: March 2026
This project developed a computer-vision system for measuring the maximum dimension of randomly placed three-dimensional objects using a single camera. The target objects could include a ball, box, phone, or spoon, and the final measurement was reported in millimeters.
Although only one camera was used, two images were captured sequentially from different viewpoints. A printed AprilTag of known size established metric scale and helped estimate the camera pose in each image. This converted the two views into a calibrated stereo pair without requiring a second physical camera.
The user identified the dimension of interest by drawing a line between two endpoints in the first image. Feature matching related the two views, the selected endpoints were reconstructed in three dimensions, and their Euclidean separation produced the object measurement
The measurement pipeline uses the following inputs:
Two images captured from distinct viewpoints with the same camera
Camera intrinsic matrix K and lens-distortion coefficients
AprilTag size and tag dictionary
SIFT ratio-test threshold and minimum accepted match count
Two endpoints selected by the user's click-and-drag line
The system converts two calibrated views into a metric three-dimensional measurement through the following sequence:
Capture and correct the images
Acquire two views of the scene and undistort both images using the saved camera-calibration parameters.
Estimate both camera poses
Detect the AprilTag in each view and use solvePnP with the known tag geometry to estimate the rotation R and translation T of the camera.
Construct the projection matrices
Form one projection matrix for each view using P = K[R | t]. These matrices connect three-dimensional scene points to image coordinates.
Find reliable image correspondences
Detect SIFT keypoints and descriptors, match them with brute-force matching, and retain distinctive matches using the ratio test.
Reject incorrect matches
Estimate a homography with RANSAC so outlier correspondences do not dominate the mapping between the two images.
Select the object dimension
Let the user drag a line over the object in the first image. Map the two selected endpoints into the second image using the estimated correspondence model.
Reconstruct the endpoints in 3D
Triangulate each left-right point pair with P1 and P2, then convert the homogeneous results into Cartesian coordinates X1 and X2.
Calculate and display the measurement
Compute D = sqrt((x2 - x1)^2 + (y2 - y1)^2 + (z2 - z1)^2) and report D in millimeters.
The computer vision system generates a real-time annotated video stream containing the detection and classification results.
Thank you for reading! Please check out my other projects as well, and let me know if you have any suggestions for improvement.