Using Realtime 3D Scanning module, we can perform realtime 3D scanning on any object. We just need a camera and a projector. Camera could be a webcam or any other type, there is no need to worry about fps (frames per second) of the camera, because camera and pattern phase-shifts are perfectly synchronized. The time delay for capturing images can be adjusted in the real-time 3D scanning, and for any low speed camera, the delay can be increased for perfect results.
In order to scan offline, the projected fringe patterns are captured using any camera, and once the images are captured, we just need to import all images to the module for wrapping and unwrapping, that’s it.
Here I would like to write a short introduction about some useful features of the scanning module. Whenever we want to scan an object using structured light technology, we need to setup the reference plane for accurate height extraction. Because the height is equal to object phase minus reference phase. So in order to get the reference phase, there are commonly two methods.
- Pre-compute the reference phase by projecting the fringe patterns onto the flat reference plane.
- Compute the reference plane by using the object phase data. It means that there will not be any need of the reference plane. We can compute the reference plane using the object phase data. In this case, the reference plane can be adjusted using skew and scale factors.
Based on these two methods, I created two sections in the 3D scanning module.
- Left section is for only object phase images. There is no need to capture the reference plane images. With this method, it is hard to achieve exact 3D measurements. (Less accurate method)
- Middle section can be used for calculating the exact and accurate 3D measurements. In order to use this section, we have to capture the reference plane images. This section requires many scanning parameters such as focal length of the camera, pitch of the projected fringe pattern etc. Several phase-to-coordinate conversion algorithms can be selected for coordinates extraction.
The most right section can be used for the real-time 3D scanning. Both left and middle sections can be also be used for it. There are three phase-shifting methods which are added into the scanning module such as 3-step (requires three phase shifted patterns with 2π/3 degree), commonly used 4-step (requires four phase shifted patterns with π/2 degree), and highly accurate 5-step (requires five phase shifted fringe patterns with π/2 degree).
Sinusoidal Fringe Pattern Generation Module:
In order to capture the real-time projected fringe patterns, camera must be initialized from this module. Two modes (Gray and Color) are defined for the video display.
- Gray mode is created for specifically real-time 3D scanning. This mode requires the dimensions of the captured screen, offset in x, y, and camera argument number (It can be 0,1,2,3,… etc. based on how many devices attached to the computer). At any time images can be saved by pressing the Save button.
- Color mode is defined for display the full resolution of the camera. Both modes can be switched at any time by pressing the switch button.
Videos (Gray or Color) can be recorded at any desired frame rate. This feature is in demo stage because of OpenCV issue. In fact, OpenCV developers are working hard to fix this issue.
Flip feature is also introduced for making upside down and left side right. Well sometime we need this feature. So, I just created it.