1. A method of image processing in a structured light imaging system, the method comprising: receiving a captured image of a scene, wherein the captured image is captured by a camera of a projector-camera pair in the structured light imaging system, and wherein the captured image comprises a binary pattern projected into the scene by the projector; rectifying the captured image to generate a rectified captured image; applying a bilateral filter to the rectified captured image to generate a local threshold image, wherein the local threshold image comprises a local threshold value for each pixel in the rectified captured image; extracting a binary image from the rectified captured image wherein a value of each location in the binary image is determined based on a comparison of a value of a pixel in a corresponding location in the rectified captured image to a local threshold value in a corresponding location in the local threshold image; performing a matching algorithm to match the binary image to the binary pattern by measuring a Hamming distance; determining a disparity map based on the matching algorithm; and performing triangulation to determine a 3D point cloud based on disparities in the disparity map.