目的
本文將介紹 Halcon 校正流程中對於取得 Calibration Images 的規範, 內容皆來自於 Halcon 文件,有三份資料,當中的描述大多數都相同,如果你不想一個個看下去,你可以直接看結論。結論會把所有的規範整合在一起。
Calibration Images 的規範
Calibration Process 過程中,Calibration Image 品質的好壞,決定了校正的品質,如果你不在意,那麼校正後的結果可能會比未校正前的結果還糟。
本文整理 Halcon document ([1], [2], [3])中對 Calibration Images 品質要求的條件,列點如下。
From [1], Rules for Acquiring Calibration Images
Use a clean calibration plate.
乾淨的校正板
Conver the whole field of view with multiple images, i.e, place the calibration plate in all areas of the field of view at least once.[1]
拍攝多張校正片影像,這些影像要覆蓋可視範圍的所有區域,每個區域至少要有一張校正片影像
Vary the orientations of the calibration plate. This includes rotations around the x- and y-axis of the calibration plate, such that the perspective distortions of the calibration pattern are clearly visible. Whthout some tilted calibration plates the focal length can not be calculated properly (a tilt angle of approximately 45 degrees is recommended). [1]
旋轉校正片。包含 x, y 軸的旋轉,讓校正板的 perspective distortion 都清晰可見。校正板影像應該要有傾斜的角度,這樣才能正確計算焦距,建議傾斜 45 度
Use at leaset 10-15 images. [1]
至少 10-15 張影像
Use an illumination where the background is darker than the calibration plate. [1]
使用光源,背景應比校正板暗
The bright parts of the calibration plate should have a gray value of at least 100. [1]
校正板明亮部份(白色)的灰階值至少是 100
The contrast between the bright and the dark parts of the calibration plate shoudl be more than 100 gray values. [1]
校正板的明亮對比灰階值應大於 100
Use an illumination where the calibration plate is homogeneous. [1]
使用光源讓照射到校正板的上光源是均勻的
The images should not be overexposed (the gray values of the bright parts of the images should be strictly below 255) [1]
影像不能過度曝光,灰階值應小於 255
The diameter of a circle should be at least 10 pixels [1]
校正版中的圓直徑至少要有 10 pixels
The calibration plate should be completely visible inside the image. [1]
校正板應該要完全在影像的可視範圍內
The images should contain as little noise as possible. [1]
影像應該儘可能的包含一些雜訊
The images should be sharply focused, i.e., transitions between objects should be clearly delimited. [1]
影像應該要是銳利聚焦的圖像
From [2], Acquiring Images for a Successful Calibration
Use a calibration plate that is big enough to fill a large part of the image (at least one fourth of the image's total area).
校正板至少要是影像可視範圍的 1/4 大小
The minimum diameter of the circular marks should be 10 pixels. To check this, move the mouse pointer over a calibration mark and examine whether the difference between the start and end position, as displayed in the row/column section of the Status Bar, is more than 10 pixels.
校正板中的圓直徑至少是 10 pixels
Use an illumination where the background is dark and the calibration plate is bright
使用光源,讓背景的比校正板黑
The white background of the calibration plate should have a gray value of at least 100. You can check the gray value of an area by moving the mouse pointer on the particular area in the graphics window. The gray value is then displayed in the HDevelop Status Bar.
校正板白色部份的灰階值至少是 100
The contrast between the foreground and the background of the calibration plate, i.e., its bright and dark parts, respectively, should be better than 100 gray values.
校正板的前景與背景對比灰階值應該要大於 100 比較好
Use an illumination where the calibration plate is represented with homogeneous gray values.
使用光源,讓校正板照射到的光源具有平均的灰階值
The images must not be overexposed, which means that they should not have a peak at 255 in the histogram. You can use the Live mode and run the tests, which can be found under Quality Issues, to check that no part of the calibration plate is totally white. Another option is checking the gray values in the status bar as described above. If your image is too bright, close the lens aperture a bit more or use an illumination that is less bright. If your image is too dark, use a brighter illumination or open the lens aperture a bit more until you achieve a satisfying image from which the marks can be segmented easily. Then, push the Snap button to keep your image.
影像不能過度曝光,灰階值要小於 255
In this way, cover the whole field of view with multiple images, i.e., position the calibration plate in all areas of the field of view (upper left corner, upper right corner, lower left corner, lower right corner and image middle). Do not forget to also take images right in the corners and along the margins of the field of view.
用多張影像覆蓋所有的可視區域 (亦即,把校正板放在可視區域的左上角,右上角,左下角,右下角和中心),可視區域的轉角及邊緣也應該拍攝影像
Use various orientations of the calibration plate: Use at least four images with different tilt in every direction as shown in Figure 6.1 (we recommend to tilt the plate in every quadrant of the image twice and vary the tilting direction)
旋轉校正板:每個方向至少有4個不同傾斜的影像 (建議每一個象限有 2 個不同的傾斜角度的影像)
In total you should acquire at least 10, better 15 to 20 images
最少要有10張影像,最好是 15-20 張
From [3], How to take a set of suitable images?
At least a total of 10 to 20 images should be taken into account.
至少10-20張影像
The calibration plate has to be completely visible (incl. border!).
校正板全部都要在影像的可視範圍內 (包含邊框)
Reflections etc. on the calibration plate should be avoided
Within the set of images the calibration plate should appear in different positions and orientations: Once left in the image, once right, once (left and right) at the bottom, once (left or right) at the top, from different distances etc. At this, the calibration plate should be rotated around its x- and/or y-axis, so the perspective distortions of the calibration object are clearly visible. Thus, the exterior camera parameters (camera pose with regard of the calibration plate) should be set to a large variety of different values!
校正板必須在不同的位置和方向拍攝影像: 左邊一張,右邊一張,左下,右下各一張,左上或右上一張,不同的
The calibration plate should fill at least a quarter of the whole image to ensure the robust detection of the marks.
校正板至少要是影像可視範圍的 1/4 大小以保證能夠偵測到 marks
結論
這裡總結[1][2][3]所描述的規範並作簡易的分類,描述會作部份的修正,若更改幅度過大,會列出原始內容。
校正版的硬體條件
- 乾淨的校正板
- 校正板至少是影像可視範圍的 1/4 大小
- 使用光源讓照射到校正板的上光源是均勻的
校正板影像的影像條件
- 背景應比校正板暗
- 校正板明亮部份(白色)的灰階值至少是 100
- 校正板的明亮對比灰階值應大於 100
- 影像不能過度曝光,灰階值應小於 255
- 校正版中的圓直徑至少要有 10 pixels
- 影像應該要是銳利聚焦的圖像
- 影像應該儘可能的包含一些雜訊
校正板影像拍攝範圍
- 校正板全部都要在影像的可視範圍內 (包含邊框)
- 拍攝多張校正片影像,這些影像要覆蓋可視範圍的所有區域,每個區域至少要有一張校正片影像
- 最少要有10張影像,最好是 15-20 張
校正片影像拍攝位置及角度
拍攝位置及角度: 左上角,右上角,左下角,右下角及中心,每個位置有 3 個不同旋轉角度的影像及 1 個傾斜 45 度的影像。合計為 20 張 (原始條件如下)
- 旋轉校正片。包含 x, y 軸的旋轉,讓校正板的 perspective distortion 都清晰可見。校正板影像應該要有傾斜的角度,這樣才能正確計算焦距,建議傾斜 45 度
- 用多張影像覆蓋所有的可視區域 (亦即,把校正板放在可視區域的左上角,右上角,左下角,右下角和中心),可視區域的轉角及邊緣也應該拍攝影像
- 旋轉校正板:每個方向至少有4個不同傾斜的影像 (建議每一個象限有 2 個不同的傾斜角度的影像)
References
[1] Halcon Document, Solution Guide III 3D Vision Section 3.2.4.1 Rules for Acquiring Calibration Images
[2] Halcon Document, HDevelop User's Guide 6.2 Calibration Assistant,Section 6.2.2.2.1 Acquiring Images for a Successful Calibration
[3] Halcon Document, HALCON Reference Manual 10.0, camera_calibration (Operator)
系列文章
[1] Camera Calibration with Halcon (鏡頭校正使用 Halcon)
[2] How to Obtain a Suitable Calibration Plate (如何取得合適的校正板)
[3] Rules for Acquiring Calibration Images (Halcon 校正流程中,取得校正板影像的規範) -- 本文
沒有留言:
張貼留言