在使用DLP4500进行结构光三维点云生成时,使用的是微软相机.
TIDA-00254: Accurate Point Cloud Generation for 3D Machine Vision Applications Using DLP® Technology and Industrial Camera只给出了微软相机的接线方式,后面的配置都是基于pointgray相机。
所以对于微软相机具体应该怎么配置?
Jeremy Wu:
1. 安装参考文档资料http://www.ti.com/lit/pdf/dlpu019 (17页,2.2)
2使用参考http://www.ti.com/lit/pdf/dlpu019 第24页3.2,3.3(25,26页)指出了两个配置的区别.
kai zhu1:
回复 Jeremy Wu:
17页2.2已安装。25页接线正确。26页(3.3)配置上:
1、选择ALGORITHM_TYPE=0,这个和相机无关
2、CAMERA_TYPE选择的是OpenCV interface(native camera interface 是Point Gray相机所以没选)
3、资料上config_camera.txt中配置的全是Point Gray Camera下的参数。
剩下所有的配置都是和相机无关的。(按以上配置在system calibrate时出现了问题,DLP不投图像)
所以不是很理解对于微软相机该如何配置。
Jeremy Wu:
回复 kai zhu1:
Lifecam参数是在install后配置的.
After the camera sofware has been installed, the camera should be configured so that the auto-exposureand auto-focus are both turned off.1. Open the LifeCam software with the camera connected and a live view should open. Click the arrow onthe right side of the window.2. A new window will open to adjust effects of settings of the camera. Click the gear button at the top ofthe window to show the settings.3. Uncheck the "truecolor" checkbox.4. Click the "Properties" button.5. From the "Camera Control" tab, uncheck the auto-focus checkbox and click "Apply."6. Change to the "Video Settings" tab, and set the "Brightness" and "Saturation" settings to their absoluteminimum values.7. Uncheck both the auto-white balance and auto-exposure checkboxes and click "Apply."8. With the LightCrafter projecting a white test pattern, adjust the Exposure settings until the image is wellexposed but not over-exposed.
kai zhu1:
回复 Jeremy Wu:
这个我也按照说明配置好了。现在的问题是在system calibrate的时候在DLP调焦距的时候没有出现棋盘。
但是如果我把如下参数改成 Internal Trigger(资料里默认为1,外部触发,没改动)的话就会在聚焦时候出现棋盘。
##For below parameter## 1 – External Positive Trigger## 0 – Internal TriggerLCR4500_PARAMETERS_TRIGGER_SOURCE =
但是在正是开始标定时候,始终只有全亮的投影,捕捉不到棋盘。(我用lightcrafter4500软件读取时发现图像序列只有一个图,大概就是那个全亮的)
Jeremy Wu:
回复 kai zhu1:
TI缺省的是使用camera来触发LightCrafter4500,因此配置为External Trigger.
但是LifeCam没有触发接口,因此要更改为Internal Trigger(DLP LightCrafter4500).
kai zhu1:
回复 Jeremy Wu:
并没有用。改成internal触发之后图像序列播放不和这个相机同步,还是捕捉不了。所有的配置方式我几乎都试过了,都不能行。有没有人用微软相机成功过?我感觉真的不行啊。
Jeremy Wu:
回复 kai zhu1:
请提供联系方式,讨论一下系统配置.
kai zhu1:
回复 Jeremy Wu:
邮箱1564861584@qq.com 电话13476819882
Jeremy Wu:
回复 kai zhu1:
请参考配置:
Webcam通常是卷帘彩色相机, 3 Phase shift算法不适用.
整个速度在5-10HZ或更低.
Configuration changes –
File – DLP_LightCrafter_4500_3D_Scan_Application_Config.txt
#Camera type
# 0 – Uses OpenCV camera interface
# 1 – Native camera interface – PointGrey
CAMERA_TYPE = 0
# Algorithm type
# 0 – GrayCode
# 1 – Hybrid Three Phase Shift
ALGORITHM_TYPE = 0
CONNECT_ID_PROJECTOR = 0
CONNECT_ID_CAMERA = 0
CONFIG_FILE_PROJECTOR = config/config_projector.txt
CONFIG_FILE_CAMERA = config/config_camera.txt
CONFIG_FILE_CALIBRATION_PROJECTOR = config/calibration_projector.txt
CONFIG_FILE_CALIBRATION_CAMERA = config/calibration_camera.txt
CONFIG_FILE_GEOMETRY = config/geometry.txt
CONFIG_FILE_STRUCTURED_LIGHT_1 = config/algorithm_vertical.txt
CONFIG_FILE_STRUCTURED_LIGHT_2 = config/algorithm_horizontal.txt
CONTINUOUS_SCANNING = 0
CALIBRATION_DATA_FILE_PROJECTOR = calibration/data/projector.xml
CALIBRATION_DATA_FILE_CAMERA = calibration/data/camera.xml
DIRECTORY_CAMERA_CALIBRATION_IMAGE_OUTPUT = calibration/camera_images/
DIRECTORY_SYSTEM_CALIBRATION_IMAGE_OUTPUT = calibration/system_images/
DIRECTORY_CALIBRATION_DATA = calibration/data/
DIRECTORY_SCAN_DATA_OUTPUT = output/scan_data/
DIRECTORY_SCAN_IMAGES_OUTPUT = output/scan_images/
OUTPUT_NAME_IMAGE_CAMERA_CALIBRATION_BOARD = camera_calibration_board
OUTPUT_NAME_IMAGE_CAMERA_CALIBRATION = camera_calibration_capture_
OUTPUT_NAME_IMAGE_SYSTEM_CALIBRATION = system_calibration_capture_
OUTPUT_NAME_IMAGE_DEPTHMAP = _depthmap
OUTPUT_NAME_XYZ_POINTCLOUD = _pointcloud
File – config_camera.txt
CAMERA_PARAMETERS_FRAME_BUFFER_SIZE = 72
####################
##OpenCV Camera #
####################
OPENCV_CAM_PARAMETERS_EXPOSURE = 0
####################
##PointGrey Camera #
####################
#PG_FLYCAP_PARAMETERS_GAIN_DB = 18
# For below parameter set
# Rolling shutter color Camera – MONO8
# Global shutter Monochrome camera – RAW8
PG_FLYCAP_PARAMETERS_PIXEL_FORMAT = RAW8
PG_FLYCAP_PARAMETERS_SHUTTER_EXPOSURE_MS = 33
PG_FLYCAP_PARAMETERS_FRAME_RATE_HZ = 30
PG_FLYCAP_PARAMETERS_STROBE_SOURCE = 2
PG_FLYCAP_PARAMETERS_STROBE_ENABLE = 1
PG_FLYCAP_PARAMETERS_STROBE_POLARITY = 1
# For below parameter
# Rolling shutter color camera – 5.0
# Glocal shutter Monochrome camera – 0.0
PG_FLYCAP_PARAMETERS_STROBE_DELAY = 0.0
PG_FLYCAP_PARAMETERS_STROBE_DURATION = 1.0
PG_FLYCAP_PARAMETERS_AUTOEXPOSURE = 0
PG_FLYCAP_PARAMETERS_EXPOSURE = 1.0
kai zhu1:
回复 Jeremy Wu:
很遗憾这样做还是不行。我看了一下源码,猜测问题可能如下:
ret = projector->DisplayPatternInSequence(0,true);//放出棋盘用于聚焦
……
dlp::CmdLine::PressEnterToContinue("Press ENTER after the projector has been focused…");
……
camera_view.Open("System Calibration – press SPACE to capture or ESC to exit");//打开摄像头窗口
……
projector->ProjectSolidWhitePattern();//放标定图像序列
对于有外部出发相机的情况(设定为外部触发),等相机拍照时同步触发图像序列。而没有外部触发(采用内部触发),则根据电路的内部脉冲自动播放了导致不能和相机同步。
稍微修改一下代码就好。有时间的话我试试(看了下资料编译过程挺复杂的,不知道能不能搞好)。