In this post, I give an overview of how to align a depth image to a color image frame. The motivation was that my Realsense camera was connected to a Pi, which did not have the processing power to align depth to color. This meant I needed to send the images to a workstation PC, which can then do the alignment quickly. This blog post accompanies the demo code uploaded here: github. Running the demo code first may be helpful.
-
posts
-
Aligning depth image to color frame
-
Intersection Point of Many Lines
In this post, we will find an optimal intersection point of a set of lines that do not intersect at a point. We will phrase this problem as a least squares minimization problem. We can also give weights to each line based on our confidence on that line.
-
ROS2 CV_Bridge Example in Cpp and Python
In this post, I show how to use cv_bridge in a minimal frames publisher node in ROS2 written in C++. Python code is also included for the relevant part below.
-
Estimating joint angles from 3D body poses
-
Real time 3D body pose estimation using MediaPipe
In this post, I show how to obtain 3D body pose using mediapipe’s pose keypoints detector and two calibrated cameras. The code for this demo is uploaded to my repository: click here. I assume that you already have two calibrated cameras looking at the same scene and that the projection matrices are already known. If you need a guide on how to calibrate stereo cameras, check my pose here: click here.
-
Real time 3D hand pose estimation using MediaPipe
Most machine learning research on human body keypoints estimation deal with 2D coordinate estimations. This is because the mathematics require at least two cameras viewing the same point to triangulate a 3D coorindate. Additionally, the cameras must be calibrated and their relative orientations and positions known. This requirement is rather stringent. On the other hand, if we can detect 2D coordinates of a points from two camera views, we can simply triangulate the 3D coorindate using camera calibration parameters. In this post, I show how to do this using mediapipe’s hand keypoints detector. The code for this demo is uploaded to my repository: click here. I assume that you already have two calibrated cameras looking at the same scene and that the projection matrices are already known.
-
Orientation of QR code using OpenCV
Determining the relative position of an object with respect to a camera viewport is useful in many applications. For example, AR applications need to define a coordinates system before applying augmentations. In our lab, we use QR code or AR markers to identify objects and determine their positions in our work space. We will use openCV in this post to check if a QR code exists in camera frame and if it does, determine the rotation matrix and translation vector from QR coordinate system to camera coordinate system. The full code can be found on my repository here: link.
-
Direct Linear Transforms (DLT)
I wrote this post to make my previous post on camera calibration and triangulation more complete. That post can be found here. Here, I will detail the math behind DLT in the context of 3D point triangulation from multiple camera views. The DLT method is based on singular value decomposition (SVD). If you’re not familiar with SVD, please read up on it first. Also knowledge of homogeneous coordinates is required.
-
Simon Funk’s Netflix Recommendation System in Tensorflow, Part 2
This is part 2 of my implementation of Simon Funk’s SVD method for Netflix challenge. If you want part 1, click here. In this post, I apply the method on real data. For the rest of the post, I use The Movies Dateset from Kaggle. More specifically, I use the ratings_small.csv, which can be downloaded here: link. Please download the data and place it in your working folder.
-
Simon Funk’s Netflix Recommendation System in Tensorflow, Part 1
Back in 2006, Netflix issued a challenge to predict user scores of movies given the user’s past ratings and ratings of other users. In other words, Netflix provided 100M ratings of 17K movies by 500K users and asked to fill in certain cells, as shown in the image below. The difficulty in their provided data was that only 100M ratings were present out of 8.5B possible entries. Simon Funk used a singular value decomposition (SVD) approach that got him 3rd place in the challenge. In this post, we explore the method and math of his approach and then implement it on a toy problem using Tensorflow. In the next post, I will apply the method to real data. If you’re interested in the original post by Simon Funk, check his blog here: link.
-
Stereo Camera Calibration and Triangulation with OpenCV and Python
2022.06 UPDATE: The code in this post has be updated and turned into a package. If you just want the calibration results, go here: Stereo Camera Calibration