CN103852243A - Method for detecting optical center of wide-angle lens and optical center detecting device - Google Patents
Method for detecting optical center of wide-angle lens and optical center detecting device Download PDFInfo
- Publication number
- CN103852243A CN103852243A CN201310007748.XA CN201310007748A CN103852243A CN 103852243 A CN103852243 A CN 103852243A CN 201310007748 A CN201310007748 A CN 201310007748A CN 103852243 A CN103852243 A CN 103852243A
- Authority
- CN
- China
- Prior art keywords
- row
- wide
- testing result
- pixel
- angle lens
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Landscapes
- Image Analysis (AREA)
- Image Processing (AREA)
- Studio Devices (AREA)
Abstract
一种检测广角镜头的光学中心的方法以及光学中心检测装置。该检测广角镜头的光学中心的方法包含以下步骤:将光径改变元件套接于该广角镜头;该广角镜头经由该光径改变元件接收由光源所产生的光线以产生检测图像;以及依据该检测图像来决定该光学中心。一种光学中心检测装置,其包含广角镜头、光径改变元件以及图像处理单元。该光径改变元件套接于该广角镜头。该图像处理单元耦接于该广角镜头,用以透过该广角镜头来经由该光径改变元件接收由光源所产生的光线以产生检测图像,以及依据该检测图像来决定该广角镜头的一光学中心。
A method for detecting the optical center of a wide-angle lens and an optical center detection device. The method for detecting the optical center of a wide-angle lens includes the following steps: attaching a light path changing element to the wide-angle lens; the wide-angle lens receiving light generated by a light source through the light path changing element to generate a detection image; and determining based on the detection image. The optical center. An optical center detection device includes a wide-angle lens, a light path changing element and an image processing unit. The optical path changing element is sleeved on the wide-angle lens. The image processing unit is coupled to the wide-angle lens and used to receive light generated by the light source through the optical path changing element through the wide-angle lens to generate a detection image, and determine an optical center of the wide-angle lens based on the detection image.
Description
技术领域technical field
本发明涉及光学中心的检测,尤其涉及一种利用光径改变元件来提升受光均匀度以检测广角镜头的光学中心的方法以及其相关的光学中心检测装置。The invention relates to the detection of the optical center, in particular to a method for detecting the optical center of a wide-angle lens by using an optical path changing element to improve the uniformity of light received, and a related optical center detection device.
背景技术Background technique
在图像处理的范围中,为了得到良好的成像质量,会需要准确地决定透镜的光学中心(optical center)。对于广角镜头(wide-angle lens)(例如,鱼眼镜头(fisheye lens))来说,如果能准确地决定出光学中心的位置,则图像补偿及校正(例如,鱼眼图像校正)的效果可大幅提升。举例来说,在通过图像缝合(image stitching)处理来产生全景图像(panorama)时,所找到的光学中心位置越准确,进而产生高质量的全景图像。In the scope of image processing, in order to obtain good imaging quality, it is necessary to accurately determine the optical center of the lens. For wide-angle lenses (such as fisheye lenses), if the position of the optical center can be accurately determined, the effect of image compensation and correction (such as fisheye image correction) can be greatly improved. promote. For example, when a panoramic image (panorama) is generated through image stitching (image stitching), the found optical center position is more accurate, thereby generating a high-quality panoramic image.
传统上用来检测光学中心的方法之一,是将镜头贴平于光源箱(LightBox),再依据透过镜头所形成的图像来检测光学中心。然而,在检测鱼眼镜头的光学中心的情形下,由于鱼眼镜头具有凸形镜面,所以在将凸面的鱼眼镜头与平面光源箱贴合的步骤中,两者并无法真正地平贴。一旦鱼眼镜头与光源箱贴合的角度有所偏移,入射至鱼眼镜头的光线会不够均匀,导致所检测的光学中心产生误差。One of the methods traditionally used to detect the optical center is to attach the lens flat to the light box (LightBox), and then detect the optical center based on the image formed through the lens. However, in the case of detecting the optical center of the fisheye lens, since the fisheye lens has a convex mirror surface, in the step of attaching the convex fisheye lens to the flat light box, the two cannot be truly flat. Once the angle between the fisheye lens and the light box is offset, the light incident on the fisheye lens will not be uniform enough, resulting in an error in the detected optical center.
因此,需要一种创新的光学中心检测方法,来提升检测广角镜头的光学中心的准确性。Therefore, an innovative method for detecting the optical center is needed to improve the accuracy of detecting the optical center of the wide-angle lens.
发明内容Contents of the invention
有鉴于此,本发明的目的之一在于提供一种利用光径改变元件来提升受光均匀度以检测广角镜头的光学中心的方法以及其相关的光学中心检测装置,来解决上述问题。In view of this, one of the objectives of the present invention is to provide a method for detecting the optical center of a wide-angle lens by using an optical path changing element to improve the uniformity of light received, and its related optical center detection device to solve the above problems.
依据本发明的一实施例,其揭示一种检测一广角镜头的一光学中心的方法。该方法包含下列步骤:将一光径改变元件套接于该广角镜头;该广角镜头经由该光径改变元件接收由一光源所产生的光线以产生一检测图像;以及依据该检测图像来决定该光学中心。According to an embodiment of the present invention, a method for detecting an optical center of a wide-angle lens is disclosed. The method comprises the following steps: a light path changing element is sleeved on the wide-angle lens; the wide-angle lens receives light generated by a light source through the light path changing element to generate a detection image; and determining the optical center according to the detection image .
依据本发明的一实施例,其揭示一种光学中心检测装置。该光学中心检测装置包含一广角镜头、一光径改变元件以及一图像处理单元。该光径改变元件套接于该广角镜头。该图像处理单元耦接于该广角镜头,用以透过该广角镜头来经由该光径改变元件接收由一光源所产生的光线以产生一检测图像,以及依据该检测图像来决定该广角镜头的一光学中心。According to an embodiment of the present invention, an optical center detection device is disclosed. The optical center detection device includes a wide-angle lens, an optical path changing element and an image processing unit. The optical path changing element is sleeved on the wide-angle lens. The image processing unit is coupled to the wide-angle lens, and is used to receive light generated by a light source through the optical path changing element through the wide-angle lens to generate a detection image, and determine an optical center of the wide-angle lens according to the detection image. .
附图说明Description of drawings
图1为本发明光学中心检测系统的一实施例的示意图。FIG. 1 is a schematic diagram of an embodiment of the optical center detection system of the present invention.
图2为由图1所示的光源箱所产生的光线入射至广角镜头130的一实施例的示意图。FIG. 2 is a schematic diagram of an embodiment in which the light generated by the light source box shown in FIG. 1 enters the wide-angle lens 130 .
图3为对应于图2所示的光径而产生的一检测图像的示意图。FIG. 3 is a schematic diagram of a detection image generated corresponding to the optical path shown in FIG. 2 .
图4为依据图3所示的检测图像来决定一二值化图像的示意图。FIG. 4 is a schematic diagram of determining a binarized image according to the detection image shown in FIG. 3 .
图5为本发明检测一广角镜头的一光学中心的方法的一实施例的流程图。FIG. 5 is a flowchart of an embodiment of a method for detecting an optical center of a wide-angle lens according to the present invention.
图6为本发明检测图4所示的二值化图像的像素值以决定图像物件的几何中心的一实施例的示意图。FIG. 6 is a schematic diagram of an embodiment of the present invention for detecting pixel values of the binarized image shown in FIG. 4 to determine the geometric center of the image object.
图7为图6所示的多个行检测结果的统计示意图。FIG. 7 is a statistical schematic diagram of the detection results of multiple rows shown in FIG. 6 .
图8为于图1所示的光学中心检测装置依据环境光来产生一检测图像的一实施例的示意图。FIG. 8 is a schematic diagram of an embodiment in which the optical center detection device shown in FIG. 1 generates a detection image according to ambient light.
图9为对图8所示的检测图像进行二值化操作以及像素值修正的一实施例的示意图。FIG. 9 is a schematic diagram of an embodiment of performing a binarization operation and pixel value correction on the detection image shown in FIG. 8 .
图10为本发明检测一广角镜头的一光学中心的方法的另一实施例的流程图。FIG. 10 is a flow chart of another embodiment of the method for detecting an optical center of a wide-angle lens according to the present invention.
【主要元件符号说明】[Description of main component symbols]
100 光学中心检测系统100 Optical center detection system
110 光源箱110 Light box
120 光学中心检测装置120 Optical center detection device
130 广角镜头130 Wide-angle lens
140 管套140 Pipe Sleeve
150 图像处理单元150 Image processing unit
500、510、520、530、540、550、 步骤500, 510, 520, 530, 540, 550, steps
1032、10361032, 1036
P_11、P_12、P_1n、P_m1、P_mn 像素P_11, P_12, P_1n, P_m1, P_mn pixels
DW_H、DW_V 检测窗格DW_H, DW_V Detection Pane
RB、RB’、RBB’ 图像物件RB, RB’, RBB’ Image objects
具体实施方式Detailed ways
请参阅图1,其为本发明光学中心检测系统100的一实施例的示意图。光学中心检测系统100包含一光源箱110以及一光学中心检测装置120,其中光学中心检测装置120包含一广角镜头130、一光径改变元件(optical pathchanging device)(在此实施例中,其为一管套(sleeve)(或套筒(bushing))140)以及一图像处理单元150。管套140套接于广角镜头130。图像处理单元150耦接于广角镜头130,用以透过广角镜头130来接收由光源箱110所产生的光线以产生一检测图像,以及依据该检测图像来决定广角镜头130的一光学中心。在此实施例中,将广角镜头130套上管套140,使得广角镜头所接收的光线大多来自于管套140的内壁,不仅可使广角镜头130受光均匀,所产生的该检测图像中的成像区域也大致是广角镜头130的感光范围,因此,使用者可以不用准备可精准对位的治具,也无需将广角镜头130紧贴着光源箱110,即可依据该检测图像来得到精确的光学中心位置。进一步的说明如下。Please refer to FIG. 1 , which is a schematic diagram of an embodiment of an optical
请一并参阅图1与图2。图2为由图1所示的光源箱110所产生的光线入射至广角镜头130的一实施例的示意图。在此实施例中,广角镜头130所接收的光线以光线L1~L3来代表,其中光线L1代表由光源箱1 10所产生而直接入射至广角镜头130的光线,光线L2代表经由管套140内部的反射后才入射至广角镜头130的光线,以及光线L3代表穿透管套140之后才入射至广角镜头130的光线。由图2可知,由于管套140内壁可将光线反射至广角镜头130,并且遮蔽管套140外来自于光源箱110的部分光线,因此,广角镜头130于特定范围VR1所接收的能量会大于感光范围VR2所接收的能量,其中特定范围VR1对应于管套140的横截面。在此实施例中,管套140由可透光材质所构成。在另一实施例中,管套140也可以由不透光材质所构成(内壁可反光)。Please refer to Figure 1 and Figure 2 together. FIG. 2 is a schematic diagram of an embodiment in which the light generated by the light source box 110 shown in FIG. 1 enters the wide-angle lens 130 . In this embodiment, the rays received by the wide-angle lens 130 are represented by rays L1-L3, wherein the rays L1 represent the rays generated by the light source box 110 and are directly incident on the wide-angle lens 130, and the rays L2 represent the reflections from the inside of the
由以上可知,管套140可改变光源箱所产生的光线入射至广角镜头130的光径,使得广角镜头130的感光范围VR2内所接收到的光线可来自经由管套140反射/折射后的光线。值得注意的是,管套140作为光径改变元件仅供说明之需,并非用来作为本发明的限制,换句话说,只要是能够套接至广角镜头以使广角镜头受光更为均匀的元件,均可用来作为光径改变元件。It can be known from the above that the
请连同图2来参阅图3。图3为对应于图2所示的光径而产生的一检测图像IMG_D的示意图。由图3可知,图像范围R1对应于广角镜头130的特定范围VR1,以及图像范围R2对应于广角镜头130的感光范围VR2,其中图像范围R2的图像边界构成一对称的几何形状(亦即,圆形)。因此,可以很容易地找出图像范围R2的几何中心(亦即,圆心),进而决定出广角镜头130的光学中心。Please refer to FIG. 3 together with FIG. 2 . FIG. 3 is a schematic diagram of a detection image IMG_D generated corresponding to the optical path shown in FIG. 2 . It can be seen from FIG. 3 that the image range R1 corresponds to the specific range VR1 of the wide-angle lens 130, and the image range R2 corresponds to the photosensitive range VR2 of the wide-angle lens 130, wherein the image boundary of the image range R2 forms a symmetrical geometric shape (that is, a circle) . Therefore, the geometric center (ie, the center of the circle) of the image range R2 can be easily found out, and then the optical center of the wide-angle lens 130 can be determined.
请参阅图4,其为依据图3所示的检测图像IMG_D来决定一二值化图像的示意图。在此实施例中,图1所示的图像处理单元150对检测图像IMG_D进行一二值化操作(binary-conversion)以产生一二值化图像(binary image)IMG_B,以依据二值化图像IMG_B来决定广角镜头130的光学中心。更具体地说,图像处理单元150可将检测图像IMG_D之中各像素值(或亮度值)分别与一阈值(threshold)进行比较,来产生二值化图像IMG_B,其中该阈值可采用一预设值来设定,也可以依照每次所得到的检测图像的像素值来设定。在此实施例中,在二值化图像IMG_B的可视范围(对应于明亮/白色的图像物件RB)内,各像素的像素值均为一第一二元值(binary value)(例如,1),而可视范围外(阴暗/黑色区域)的其他像素的像素值均为一第二二元值(例如,0),其中该第二二元值不同于该第一二元值。接下来,图1所示的图像处理单元150便通过计算出图像物件RB的几何中心,来决定广角镜头130的光学中心。Please refer to FIG. 4 , which is a schematic diagram of determining a binarized image according to the detection image IMG_D shown in FIG. 3 . In this embodiment, the image processing unit 150 shown in FIG. 1 performs a binary-conversion operation (binary-conversion) on the detection image IMG_D to generate a binary image (binary image) IMG_B, so as to To determine the optical center of the wide-angle lens 130 . More specifically, the image processing unit 150 can compare each pixel value (or luminance value) in the detected image IMG_D with a threshold (threshold) to generate the binarized image IMG_B, wherein the threshold can adopt a preset It can also be set according to the pixel value of the detected image obtained each time. In this embodiment, within the visible range of the binarized image IMG_B (corresponding to the bright/white image object RB), the pixel value of each pixel is a first binary value (for example, 1 ), and the pixel values of other pixels outside the visible range (dark/black area) are all a second binary value (for example, 0), wherein the second binary value is different from the first binary value. Next, the image processing unit 150 shown in FIG. 1 determines the optical center of the wide-angle lens 130 by calculating the geometric center of the image object RB.
请参阅图5,其为本发明检测一广角镜头的一光学中心的方法的一实施例的流程图。该方法可应用于图1所示的光学中心检测装置120,并可简单归纳如下:Please refer to FIG. 5 , which is a flowchart of an embodiment of a method for detecting an optical center of a wide-angle lens according to the present invention. This method can be applied to the optical center detection device 120 shown in Figure 1, and can be simply summarized as follows:
步骤500:开始。Step 500: start.
步骤510:将一管套(亦即,一光径改变元件)套接于该广角镜头。Step 510: Connect a sleeve (ie, an optical path changing element) to the wide-angle lens.
步骤520:透过该广角镜头来经由该管套接收由一光源所产生的光线以产生一检测图像(例如,一荫蔽图像)。Step 520 : Receive light generated by a light source through the sleeve through the wide-angle lens to generate a detection image (eg, a shadow image).
步骤530:对该检测图像进行一二值化操作以产生一二值化图像。Step 530: Perform a binarization operation on the detected image to generate a binarized image.
步骤540:计算该二值化图像的可视范围(亦即,白色的图像物件)的几何中心(例如,圆心),以决定该光学中心。Step 540 : Calculate the geometric center (eg, circle center) of the visible range (ie, the white image object) of the binarized image to determine the optical center.
步骤550:结束。Step 550: end.
在步骤530中,可通过适当的阈值来进行该二值化操作,以产生具有一最大可视范围(例如,具有同一二元值的圆形)的该二值化图像。由于熟习技艺者经由阅读图1~图4的相关说明之后,应可轻易地了解图5所示的步骤510~步骤530的操作细节,故进一步的说明在此便不再赘述。值得注意的是,在步骤540中,可对该二值化图像进行像素值的检测,取得该二值化图像的可视范围的边界,进而决定出可视范围的几何中心。进一步的说明如下。In step 530, the binarization operation may be performed by an appropriate threshold to generate the binarized image with a maximum visible range (eg, circles with the same binary value). Since those skilled in the art should be able to easily understand the operation details of steps 510 to 530 shown in FIG. 5 after reading the relevant descriptions in FIGS. 1 to 4 , further descriptions are omitted here. It should be noted that in step 540, the pixel value of the binarized image can be detected to obtain the boundary of the visible range of the binarized image, and then the geometric center of the visible range can be determined. Further explanation follows.
请参阅图6,其为本发明检测图4所示的二值化图像IMG_B的像素值以决定图像物件RB的几何中心的一实施例的示意图。在此实施例中,二值化图像IMG_B具有多个像素P_11~P_mn(亦即,m行乘以n列的像素阵列)。首先,针对二值化图像IMG_B中的每一行(row)像素,以一像素为单位由左至右且由上往下地移动一水平检测窗格DW_H,以检测各行中的所有像素并产生相对应的一行检测结果,进而得到该行中各像素的像素值的分布情形;相似地,针对二值化图像IMG_B中的每一列(column)像素,以一像素为单位由上往下且由左至右地移动一垂直检测窗格DW_V,以检测各列中的所有像素并产生相对应的一列检测结果,进而得到该列中各像素的像素值的分布情形。最后,再依据m行像素所对应的多个行检测结果以及n列像素所对应的多个列检测结果来决定图像物件RB的几何中心。Please refer to FIG. 6 , which is a schematic diagram of an embodiment of the present invention for detecting the pixel values of the binarized image IMG_B shown in FIG. 4 to determine the geometric center of the image object RB. In this embodiment, the binarized image IMG_B has a plurality of pixels P_11 ˜ P_mn (ie, a pixel array of m rows by n columns). First, for each row of pixels in the binarized image IMG_B, move a horizontal detection pane DW_H from left to right and from top to bottom in units of one pixel to detect all pixels in each row and generate corresponding A row of detection results, and then obtain the distribution of the pixel values of each pixel in the row; similarly, for each column (column) pixel in the binarized image IMG_B, from top to bottom and from left to left in units of one pixel Move a vertical detection pane DW_V to the right to detect all pixels in each column and generate a corresponding detection result in a column, and then obtain the distribution of pixel values of each pixel in the column. Finally, the geometric center of the image object RB is determined according to a plurality of row detection results corresponding to m rows of pixels and a plurality of column detection results corresponding to n columns of pixels.
实作上,可将水平检测窗格DW_H设定为“1×2”的检测窗格(亦即,可同时检测同一行之中相邻的两个像素)。水平检测窗格DW_H可先从第1行的像素(亦即,像素P_11与像素P_12)开始进行检测,一次检测两个像素,并且以一像素为单位向右移动来持续检测。当水平检测窗格DW_H之中的像素具有不同的二元值时,代表水平检测窗格DW_H目前正处于图像物件RB的边界,因此,可将水平检测窗格DW_H所对应的像素位置记录下来,以供后续取得该行的像素值分布情形之用。In practice, the horizontal detection pane DW_H can be set as a “1×2” detection pane (that is, two adjacent pixels in the same row can be detected simultaneously). The horizontal detection pane DW_H may first detect the pixels in the first row (ie, the pixels P_11 and P_12 ), detect two pixels at a time, and move to the right in units of one pixel for continuous detection. When the pixels in the horizontal detection pane DW_H have different binary values, it means that the horizontal detection pane DW_H is currently at the boundary of the image object RB. Therefore, the pixel position corresponding to the horizontal detection pane DW_H can be recorded. It is used for subsequent acquisition of the pixel value distribution of the row.
在此实施例中,当水平检测窗格DW_H移动至像素位置A_1P(以水平检测窗格DW_H(A_1P)来表示)时,水平检测窗格DW_H之中左侧像素值为二元值「0」,右侧像素值为二元值「1」,其代表水平检测窗格DW_H在二值化图像IMG_B上正由黑色区域扫描至白色区域。图1所示的图像处理单元150会将目前水平检测窗格DW_H所对应的像素位置A_1P记录下来。另外,当水平检测窗格DW_H持续移动至像素位置A_1Q(以水平检测窗格DW_H(A_1Q)来表示)时,水平检测窗格DW_H之中左侧像素值为二元值「1」,右侧像素值为二元值「0」,其代表水平检测窗格DW_H在二值化图像IMG_B上正由白色区域扫描至黑色区域,因此,图1所示的图像处理单元150会将目前水平检测窗格DW_H所对应的像素位置A_1Q记录下来。在第1行所有的像素均已完成检测之后,图1所示的图像处理单元150可计算所纪录的像素位置(亦即,像素位置A_1P与像素位置A_1Q)的一平均位置,以作为行检测结果DR_R1(亦即,行检测结果DR_R1为像素位置A_1P与像素位置A_1Q两者的平均值)。接下来,水平检测窗格DW_H会继续检测第2行中各像素的像素值,直到m行中所有的像素均完成检测为止。In this embodiment, when the horizontal detection pane DW_H moves to the pixel position A_1P (represented by the horizontal detection pane DW_H (A_1P)), the value of the left pixel in the horizontal detection pane DW_H is binary value "0". , the right pixel value is a binary value "1", which represents that the horizontal detection pane DW_H is scanning from a black area to a white area on the binarized image IMG_B. The image processing unit 150 shown in FIG. 1 will record the pixel position A_1P corresponding to the current horizontal detection pane DW_H. In addition, when the horizontal detection pane DW_H continues to move to the pixel position A_1Q (represented by the horizontal detection pane DW_H (A_1Q)), the left pixel value of the horizontal detection pane DW_H is binary value "1", and the right pixel value is "1". The pixel value is a binary value "0", which represents that the horizontal detection window DW_H is scanning from a white area to a black area on the binarized image IMG_B. Therefore, the image processing unit 150 shown in FIG. The pixel position A_1Q corresponding to the grid DW_H is recorded. After all the pixels in the first row have been detected, the image processing unit 150 shown in FIG. 1 can calculate an average position of the recorded pixel positions (that is, the pixel position A_1P and the pixel position A_1Q) as the row detection The result DR_R1 (that is, the row detection result DR_R1 is the average value of the pixel position A_1P and the pixel position A_1Q). Next, the horizontal detection pane DW_H will continue to detect the pixel values of the pixels in the second row until all the pixels in the m row are detected.
在m行中所有的像素均完成检测之后,图1所示的图像处理单元150可对多个行检测结果DR_R1~DR_Rm所对应的平均位置的出现次数进行统计,以决定图像物件RB的几何中心于水平方向的坐标。请参阅图7,其为图6所示的多个行检测结果DR_R1~DR_Rm的统计示意图。在此实施例中,出现次数最多的位置为像素位置A0,换句话说,图像物件RB的几何中心于水平方向的坐标(亦即,圆心的水平坐标)为像素位置A0。After all the pixels in the m rows are detected, the image processing unit 150 shown in FIG. 1 can count the occurrence times of the average positions corresponding to the detection results DR_R1-DR_Rm of multiple rows to determine the geometric center of the image object RB coordinates in the horizontal direction. Please refer to FIG. 7 , which is a statistical schematic diagram of a plurality of row detection results DR_R1 - DR_Rm shown in FIG. 6 . In this embodiment, the location with the most occurrences is the pixel location A0 , in other words, the coordinates of the geometric center of the image object RB in the horizontal direction (ie, the horizontal coordinate of the center of the circle) is the pixel location A0 .
相似地,图1所示的图像处理单元150也可利用垂直检测窗格DW_V(例如,「2×1」的检测窗格)来检测二值化图像IMG_B中的每一列像素、记录垂直检测窗格DW_V中出现不同二元值时所对应的像素位置,以及计算该列中所记录的像素位置的一平均位置以作为该列检测结果。最后,再统计所得到的多个列检测结果,以决定图像物件RB的几何中心于垂直方向的坐标。经由以上检测步骤,便可检测出广角镜头130的光学中心的位置。Similarly, the image processing unit 150 shown in FIG. 1 can also use the vertical detection window DW_V (for example, a “2×1” detection window) to detect each column of pixels in the binarized image IMG_B, record the vertical detection window The pixel positions corresponding to different binary values appearing in the grid DW_V, and an average position of the recorded pixel positions in the row is calculated as the detection result of the row. Finally, the obtained multiple row detection results are counted to determine the coordinates of the geometric center of the image object RB in the vertical direction. Through the above detection steps, the position of the optical center of the wide-angle lens 130 can be detected.
请注意,以上以具有「1×2」的窗格尺寸的水平检测窗格DW_H来说明,因此,水平检测窗格DW_H每次移动的距离为一个像素。然而,水平检测窗格DW_H的窗格尺寸并不限定是「1×2」,因此,水平检测窗格DW_H每次移动的距离也可依据窗格尺寸来调整。相似地,垂直检测窗格DW_V的窗格尺寸并不限定是「2×1」,以及垂直检测窗格DW_V每次移动的距离也可依据窗格尺寸来调整。另外,水平检测窗格DW_H移动的方向可以是由右至左,以及垂直检测窗格DW_V移动的方向也可以是由下至上。Please note that the horizontal detection pane DW_H with a pane size of “1×2” is used for illustration above, therefore, the horizontal detection pane DW_H moves one pixel at a time. However, the pane size of the horizontal detection pane DW_H is not limited to “1×2”, therefore, the moving distance of the horizontal detection pane DW_H each time can also be adjusted according to the pane size. Similarly, the pane size of the vertical detection pane DW_V is not limited to “2×1”, and the distance of each movement of the vertical detection pane DW_V can also be adjusted according to the pane size. In addition, the moving direction of the horizontal detection pane DW_H may be from right to left, and the moving direction of the vertical detection pane DW_V may also be from bottom to top.
虽然图1所示的广角镜头130大致平贴于光源箱110,然而,本发明所提出的光学中心检测装置以及检测方法并不对光源与广角镜头之间的相对位置有所限定,也就是说,广角镜头可以不用紧贴于光源箱,以及光源箱的入射光也不一定要平行于广角镜头的光轴(optical axis),甚至可以仅通过大致均匀的环境光来检测广角镜头的光学中心(亦即,可以不需要光源箱)。Although the wide-angle lens 130 shown in FIG. 1 is approximately flat on the light source box 110, the optical center detection device and detection method proposed in the present invention are not limited to the relative position between the light source and the wide-angle lens, that is to say, the wide-angle lens can be It is not necessary to be close to the light box, and the incident light of the light box does not have to be parallel to the optical axis of the wide-angle lens (optical axis), and it is even possible to detect the optical center of the wide-angle lens only through roughly uniform ambient light (that is, it does not need light box).
请参阅图8,其为于图1所示的光学中心检测装置120依据环境光来产生一检测图像IMG_D’的一实施例的示意图。在此实施例中,检测图像IMG_D’的可视范围除了图像范围R1’(对应于管套140的横截面)与图像范围R2’(对应于广角镜头130的可视范围)以外,还包含图像范围R22’,其中图像范围R22’为环境光所造成的反光图像。另外,图像范围R1’内也呈现亮度不均的现象。Please refer to FIG. 8 , which is a schematic diagram of an embodiment in which the optical center detection device 120 shown in FIG. 1 generates a detection image IMG_D' according to ambient light. In this embodiment, in addition to the image range R1' (corresponding to the cross-section of the sleeve 140) and the image range R2' (corresponding to the visual range of the wide-angle lens 130), the visible range of the detection image IMG_D' also includes the image range R22', wherein the image range R22' is a reflective image caused by ambient light. In addition, brightness unevenness also appears in the image range R1'.
为了确保所检测的光学中心的准确性,可通过修正图像的像素值来降低/消弭反光图像或亮度不均所造成的影响。请一并参阅图9与图10。图9为对图8所示的检测图像IMG_D’进行二值化操作以及像素值修正的一实施例的示意图。图10为本发明检测一广角镜头的一光学中心的方法的另一实施例的流程图,其中图10所示的方法基于图5所示的方法。在对检测图像IMG_D’进行二值化操作之后(如步骤530所示),会产生二值化图像IMG_B’(如图9的上半部所示),其中二值化图像IMG_B’包含一白色的图像物件RB’(对应于图像范围R2’)以及一白色的图像物件RBB’(对应于图像范围R22’)。在此实施例中,图像物件RB’/图像物件RBB’之中各像素的像素值均为一第一二元值(例如,「1」)。另外,图像物件RB’包围了具有一第二二元值(例如,「0」)的空洞像素(hole pixel)(亦即,图像物件RB’所包围的黑色区域),其中该第二二元值不同于该第一二元值。In order to ensure the accuracy of the detected optical center, the pixel value of the image can be corrected to reduce/eliminate the influence caused by the reflective image or uneven brightness. Please refer to Figure 9 and Figure 10 together. Fig. 9 is a schematic diagram of an embodiment of performing a binarization operation and pixel value correction on the detected image IMG_D' shown in Fig. 8 . FIG. 10 is a flow chart of another embodiment of the method for detecting an optical center of a wide-angle lens according to the present invention, wherein the method shown in FIG. 10 is based on the method shown in FIG. 5 . After the detection image IMG_D' is binarized (as shown in step 530), a binarized image IMG_B' (as shown in the upper part of FIG. 9 ) will be generated, wherein the binarized image IMG_B' contains a white An image object RB' (corresponding to the image range R2') and a white image object RBB' (corresponding to the image range R22'). In this embodiment, the pixel value of each pixel in the image object RB'/image object RBB' is a first binary value (for example, "1"). In addition, the image object RB' surrounds a hole pixel (ie, a black area surrounded by the image object RB') with a second binary value (eg, "0"), wherein the second binary value is different from the first binary value.
在步骤1032中,图1所示的图像处理单元150首先可经由图像物件RB’与RBB’的像素数量来判断二值化图像IMG_B’中的一最大物件(亦即,图像物件RB’);接下来,将除了该最大物件以外的其他物件(亦即,图像物件RBB’)中各像素的像素值修改为该第二二元值(例如,「0」),以将其他物件设定为黑色背景(如图9的中间部分所示)。在步骤1036中,可将图像物件RB’所包围的空洞像素的像素值修改为该第一二元值(例如,「1」),以去除不想要的黑色图像(如图9的中间部分所示);最后,再依据修改后的二值化图像IMG_B’(如图9的下半部所示)来决定光学中心(如步骤540所示),举例来说,可运用图6与第7所示的检测方法来决定修改后的二值化图像IMG_B’的几何中心,以决定光学中心的位置。In step 1032, the image processing unit 150 shown in FIG. 1 can first determine a maximum object (ie, the image object RB') in the binarized image IMG_B' through the number of pixels of the image objects RB' and RBB'; Next, modify the pixel value of each pixel in objects other than the largest object (ie, the image object RBB') to the second binary value (eg, "0") to set the other objects to A black background (as shown in the middle part of Figure 9). In step 1036, the pixel value of the hole pixels surrounded by the image object RB' can be modified to the first binary value (for example, "1") to remove the unwanted black image (as shown in the middle part of FIG. 9 shown); finally, determine the optical center (as shown in step 540) according to the modified binarized image IMG_B' (as shown in the lower part of Figure 9). For example, Figure 6 and Figure 7 can be used The detection method shown is used to determine the geometric center of the modified binarized image IMG_B' to determine the position of the optical center.
值得注意的是,由于图像物件RBB’的尺寸远小于图像物件RB’的尺寸,故即便省略了将最大物件以外的其他物件设定成背景的步骤,所检测到的广角镜头130的光学中心仍是相当准确的。另外,图像物件RB’所包围的黑色区域远小于图像物件RB’的尺寸,因此,去除最大物件所包围的不想要的黑色图像的步骤也是可以省略的。换句话说,在得到最大物件之后,直接依据该最大物件来决定光学中心亦是可行的。It is worth noting that since the size of the image object RBB' is much smaller than the size of the image object RB', even if the step of setting objects other than the largest object as the background is omitted, the detected optical center of the wide-angle lens 130 is still Pretty accurate. In addition, the black area surrounded by the image object RB' is much smaller than the size of the image object RB', so the step of removing the unwanted black image surrounded by the largest object can also be omitted. In other words, after obtaining the largest object, it is also feasible to directly determine the optical center based on the largest object.
另外,在得到最大物件之后,也可以只执行将其他物件设定成背景的步骤与去除空洞像素的步骤两者的其中之一。在一实作范例中,在将图像物件RBB’设定为背景之后(如步骤1032所示),也可以直接执行步骤540来决定光学中心。在另一实作范例中,在自二值化图像IMG_B’中得到图像物件RB’之后,也可以直接去除图像物件RB’所包围的空洞像素(如步骤1036所示),并接着执行步骤540以决定光学中心。In addition, after the largest object is obtained, only one of the step of setting other objects as the background and the step of removing empty pixels may be performed. In an implementation example, after the image object RBB' is set as the background (as shown in step 1032), step 540 may also be directly executed to determine the optical center. In another implementation example, after the image object RB' is obtained from the binarized image IMG_B', the hollow pixels surrounded by the image object RB' can also be directly removed (as shown in step 1036), and then step 540 is performed to determine the optical center.
以上所述仅为本发明的优选实施例,凡依本发明权利要求书所做的均等变化与修饰,皆应属本发明的涵盖范围。The above descriptions are only preferred embodiments of the present invention, and all equivalent changes and modifications made according to the claims of the present invention shall fall within the scope of the present invention.
Claims (18)
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW101145880A TWI480578B (en) | 2012-12-06 | 2012-12-06 | Method for detecting optical center of wide-angle lens, and optical center detection apparatus |
TW101145880 | 2012-12-06 |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103852243A true CN103852243A (en) | 2014-06-11 |
CN103852243B CN103852243B (en) | 2016-07-06 |
Family
ID=50860161
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310007748.XA Expired - Fee Related CN103852243B (en) | 2012-12-06 | 2013-01-09 | Method for detecting optical center of wide-angle lens and optical center detecting device |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN103852243B (en) |
TW (1) | TWI480578B (en) |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106502039A (en) * | 2016-12-08 | 2017-03-15 | 浙江舜宇光学有限公司 | Optical detection apparatus |
CN106683135A (en) * | 2015-11-09 | 2017-05-17 | 宁波舜宇光电信息有限公司 | Method for searching optic center of lens |
CN107071400A (en) * | 2017-05-31 | 2017-08-18 | 信利光电股份有限公司 | A kind of optical centre measuring system of wide-angle imaging module |
CN107255557A (en) * | 2017-05-02 | 2017-10-17 | 深圳大学 | A kind of optical centre detection method and device of camera |
CN107306331A (en) * | 2016-04-19 | 2017-10-31 | 义晶科技股份有限公司 | Image processing method and portable electronic device |
CN107505120A (en) * | 2017-09-18 | 2017-12-22 | 歌尔股份有限公司 | Camera module photocentre location measurement method and measurement apparatus |
CN109151458A (en) * | 2018-08-31 | 2019-01-04 | 歌尔股份有限公司 | Test model building method, depth of field mould group optical centre test method and equipment |
CN109163888A (en) * | 2018-08-29 | 2019-01-08 | 歌尔股份有限公司 | Optical centre test method, device and equipment |
CN111638043A (en) * | 2020-06-10 | 2020-09-08 | 浙江大华技术股份有限公司 | Optical center determining method and device |
CN111649701A (en) * | 2020-06-30 | 2020-09-11 | 长春博信光电子有限公司 | Method and device for detecting eccentricity value of toric mirror |
CN112991202A (en) * | 2021-03-01 | 2021-06-18 | 歌尔科技有限公司 | Calibration method of optical center position, terminal device and computer readable storage medium |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI591377B (en) | 2015-12-11 | 2017-07-11 | 財團法人工業技術研究院 | Wide-angle lens correction system and method thereof |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030090586A1 (en) * | 2001-09-17 | 2003-05-15 | Gwo-Jen Jan | Method for exploring viewpoint and focal length of camera |
TWI244861B (en) * | 2004-07-06 | 2005-12-01 | Asia Optical Co Inc | Device and method for optical center detection |
CN1873389A (en) * | 2005-06-03 | 2006-12-06 | 展讯通信(上海)有限公司 | Method applicable to digital camera for calibrating optical center of camera lens |
CN101464142A (en) * | 2009-01-13 | 2009-06-24 | 洛阳汉腾光电有限公司 | Detection apparatus and detection method for plain shaft precision of camera |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4298587B2 (en) * | 2004-05-28 | 2009-07-22 | キヤノン株式会社 | Displaying eccentricity measurement results |
JP2009063420A (en) * | 2007-09-06 | 2009-03-26 | Yazaki Corp | Mounting position accuracy inspection device |
JP5405419B2 (en) * | 2010-09-09 | 2014-02-05 | 富士フイルム株式会社 | Lens inspection device |
-
2012
- 2012-12-06 TW TW101145880A patent/TWI480578B/en not_active IP Right Cessation
-
2013
- 2013-01-09 CN CN201310007748.XA patent/CN103852243B/en not_active Expired - Fee Related
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030090586A1 (en) * | 2001-09-17 | 2003-05-15 | Gwo-Jen Jan | Method for exploring viewpoint and focal length of camera |
TWI244861B (en) * | 2004-07-06 | 2005-12-01 | Asia Optical Co Inc | Device and method for optical center detection |
CN1873389A (en) * | 2005-06-03 | 2006-12-06 | 展讯通信(上海)有限公司 | Method applicable to digital camera for calibrating optical center of camera lens |
CN101464142A (en) * | 2009-01-13 | 2009-06-24 | 洛阳汉腾光电有限公司 | Detection apparatus and detection method for plain shaft precision of camera |
Cited By (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106683135A (en) * | 2015-11-09 | 2017-05-17 | 宁波舜宇光电信息有限公司 | Method for searching optic center of lens |
CN107306331A (en) * | 2016-04-19 | 2017-10-31 | 义晶科技股份有限公司 | Image processing method and portable electronic device |
CN106502039B (en) * | 2016-12-08 | 2022-04-19 | 浙江舜宇光学有限公司 | Optical detection device |
CN106502039A (en) * | 2016-12-08 | 2017-03-15 | 浙江舜宇光学有限公司 | Optical detection apparatus |
CN107255557A (en) * | 2017-05-02 | 2017-10-17 | 深圳大学 | A kind of optical centre detection method and device of camera |
CN107071400A (en) * | 2017-05-31 | 2017-08-18 | 信利光电股份有限公司 | A kind of optical centre measuring system of wide-angle imaging module |
CN107505120A (en) * | 2017-09-18 | 2017-12-22 | 歌尔股份有限公司 | Camera module photocentre location measurement method and measurement apparatus |
CN109163888A (en) * | 2018-08-29 | 2019-01-08 | 歌尔股份有限公司 | Optical centre test method, device and equipment |
CN109151458A (en) * | 2018-08-31 | 2019-01-04 | 歌尔股份有限公司 | Test model building method, depth of field mould group optical centre test method and equipment |
CN111638043A (en) * | 2020-06-10 | 2020-09-08 | 浙江大华技术股份有限公司 | Optical center determining method and device |
CN111649701A (en) * | 2020-06-30 | 2020-09-11 | 长春博信光电子有限公司 | Method and device for detecting eccentricity value of toric mirror |
CN111649701B (en) * | 2020-06-30 | 2021-10-29 | 长春博信光电子有限公司 | Method and device for detecting eccentricity value of toric mirror |
CN112991202A (en) * | 2021-03-01 | 2021-06-18 | 歌尔科技有限公司 | Calibration method of optical center position, terminal device and computer readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN103852243B (en) | 2016-07-06 |
TWI480578B (en) | 2015-04-11 |
TW201423146A (en) | 2014-06-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103852243B (en) | Method for detecting optical center of wide-angle lens and optical center detecting device | |
US9741118B2 (en) | System and methods for calibration of an array camera | |
US8400505B2 (en) | Calibration method, calibration device, and calibration system including the device | |
CN116256373B (en) | A method for detecting surface defects in perovskite battery films | |
CN114359055B (en) | Image splicing method and related device for multi-camera shooting screen body | |
CN107702898A (en) | A kind of car headlamp detection method and device | |
CN104992446B (en) | The image split-joint method of non-linear illumination adaptive and its realize system | |
JPH08226902A (en) | Container inspection machine | |
CN110766748A (en) | A non-contact vehicle attitude measurement method | |
CN104977155A (en) | Rapid measurement method of LED light distribution curve | |
CN201955551U (en) | Optical system using double optical path system interactive correction method | |
CN113487510A (en) | Method, system and equipment for detecting needle point position for automatic liquid preparation of robot | |
CN104200456B (en) | A kind of coding/decoding method for line-structured light three-dimensional measurement | |
CN105374044A (en) | Automatic calibration method of light field camera | |
CN106023193A (en) | Array camera observation method for detecting structure surface in turbid media | |
CN111025701A (en) | Curved surface liquid crystal screen detection method | |
JP2016075658A (en) | Information process system and information processing method | |
CN106651959A (en) | Optical field camera micro-lens array geometric parameter calibration method | |
JP4286835B2 (en) | Container mouth inspection device | |
CN107833223B (en) | Fruit hyperspectral image segmentation method based on spectral information | |
CN102928196A (en) | Detection method and device for free-form surface lens | |
CN111586401B (en) | Optical center testing method, device and equipment | |
JP2011101265A (en) | Method and device for calculation of calibration information, and wide angle image processing apparatus | |
CN112881428B (en) | Method for detecting outer arc defect of edge of curved surface screen based on laser ranging | |
JP2008232837A (en) | Defect enhancement / defect detection method, apparatus, and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20160706 Termination date: 20210109 |
|
CF01 | Termination of patent right due to non-payment of annual fee |