Abstract:
A method for testing a 3D camera is provided. The method includes: making a first camera of the 3D camera align with a first picture of a reference picture, wherein, the reference picture includes a second picture, a central point of the first picture and the second picture respectively has a first label and a second label; obtaining an image captured by a second camera of the 3D camera; identifying the first label, the second label, and a central point of the image; calculating an actual angle difference and an actual distance difference according to coordinates of the first label, the second label, and the central point; determining whether the 3D camera is installed appropriately by comparing the actual distance difference with the reference distance difference and the actual angle difference with the reference angle difference respectively.

Description:
BACKGROUND 
       [0001]    1. Technical Field 
         [0002]    The present disclosure relates to test devices, particularly, to a camera testing device. 
         [0003]    2. Description of Related Art 
         [0004]    Nowadays, 3D cameras (three-dimensional cameras) are more and more popular. Usually, a 3D camera includes two cameras, and in order to guarantee the quality of the 3D camera, a test for the camera is needed before leaving the factory. An important test item is to test whether the images captured by the two cameras are superposed within a certain range. However, conventional testing devices are usually expensive. 
         [0005]    Therefore, it is desirable to provide a camera testing device and method to overcome the described limitations. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0006]    Many aspects of the present disclosure are better understood with reference to the drawings. The components in the drawings are not necessarily drawn to scale, the emphasis instead being placed upon clearly illustrating the principles of the present disclosure. Moreover, in the drawings, like reference numerals designate corresponding parts throughout the several views. 
           [0007]      FIG. 1  is a block diagram of a camera testing device for testing a 3D camera, in accordance with an exemplary embodiment. 
           [0008]      FIG. 2  is a schematic diagram showing a reference picture set on the front of the 3D camera tested by the camera testing device of  FIG. 1 . 
           [0009]      FIG. 3  is a schematic diagram showing an image captured by one camera of the 3D camera tested by the camera testing device of  FIG. 1 . 
           [0010]      FIG. 4  is a flowchart illustrating a method for testing a 3D camera applied in a camera testing device, such as that of  FIG. 1 , in accordance with an exemplary embodiment. 
       
    
    
     DETAILED DESCRIPTION 
       [0011]    Embodiments of the present disclosure will now be described in detail, with reference to the accompanying drawings. 
         [0012]    Referring to  FIGS. 1 and 2 , a camera testing device  1  connected to a 3D camera  2  for testing whether the installation of a first camera  21  and a second camera  22  of the 3D camera  2  satisfy general requirements is shown. The camera testing device  1  includes an image capturing module  101 , a particular point determining module  102 , a calculating module  103 , a storage module  104 , and an analysis module  105 . 
         [0013]    The image capturing module  101  obtains images captured by the first camera  21  and the second camera  22  of the 3D camera  2 . In the embodiment, the 3D camera  2  is aimed at a reference picture P as shown in  FIG. 2  to capture an image corresponding to the reference picture P. As shown in  FIG. 2 , the reference picture P includes a first picture P 1  and a second picture P 2 . In the embodiment, the first picture P 1  and the second picture P 2  both are rectangles which correspond to the finder frame (not shown) of the first camera  21  and the second camera  22 , and a central point of the first picture P 1  has a first label A 0 , a central point of the second picture P 2  has a second label B 0 . The first label A 0  and the second label B 0  can be a distinctive object, for example, such as a red point, or a small ring set on the first figure P 1  and the second figure P 2  by a user. 
         [0014]    In the embodiment, the first camera  21  is aligned with the first picture P 1  to allow the first picture P 1  to overlap with the image captured by the first camera  21 . In the embodiment, the position of the 3D camera  2  can be adjusted to make the first camera  21  align with the first picture P 1 . For example, the reference picture P is set on the front of the 3D camera  2 , the 3D camera  2  is placed on a six-axis platform, and the user adjusts the position of the 3D camera  2  to make the first camera  21  align with the first picture P 1 . 
         [0015]    Referring also to  FIG. 3 , in the embodiment, if the installation of the 3D camera  2  is in the perfect state, that is, the first camera  21  is aligned with the first picture P 1  completely and the second camera  22  is also aligned with the second picture P 2  completely, the second camera  22  is regarded as being in a standard position. However, in fact, when the first camera  21  is aligned with the first picture P 1 , the second camera  22  cannot be aligned with the second picture P 2  completely. As shown in  FIG. 3 , an image IM captured by the second camera  22  is not overlapping with the second picture P 2 . 
         [0016]    The particular point determining module  102  analyzes the image IM captured by the second camera  22 , and identifies the first label A 0 , the second label B 0 , and the central point R 0  of the image IM. For example, the particular point determining module  102  analyzes image data of the image IM to determine the red point or the small ring to identify the first label A 0  and the second label B 0 , and then determines the central point RO of the image IM. In the embodiment, each pixel point of the image IM corresponds to one coordinates of a coordinate system, such as a rectangular coordinate system, the horizontal bottom side of the image IM is regarded as an X-axis of the rectangular coordinate system, and the vertical left side of the image IM is regarded as a Y-axis of the rectangular coordinate system. 
         [0017]    The calculating module  103  determines the coordinates of the first label A 0 , the second label B 0 , and the central point R 0  of the image IM, and calculates an actual angle difference and an actual distance difference between the actual position of the second camera  22  and the standard position which will be described in detail below. 
         [0018]    In detail, as described above, if the second camera  22  is at the standard position, the image IM overlaps the second picture P 2  when the first camera  21  is aligned with the first picture P 1 , namely, the second label B 0  overlaps the central point R 0  of the image, and a connection line L 1  of the first label A 0  and the second label B 0  is parallel to a horizontal side of the image IM. In the embodiment, when the second camera  22  is not in the standard position, the distance difference between the central point R 0  of the image IM and the second label B 0  is regarded as the actual distance difference between the actual position of the second camera  22  and the standard position, the angle difference between the connection line L 1  and the horizontal side of the image IM is regarded as the actual angle difference between the actual position of the camera  22  and the standard position. 
         [0019]    The calculating module  103  calculates a coordinate distance according to the coordinates of the central point R 0  of the image IM and the coordinates of the second label B 0  to obtain the actual distance difference between the actual position of the second camera  22  and the standard position, and calculates a slope of the connection line L 1  according to the coordinates of the first label A 0  and the coordinates of the second label B 0  to obtain the actual angle difference between the actual position of the camera  22  and the standard position. 
         [0020]    The storage module  104  stores a reference distance difference and a reference angle difference. The reference distance difference is the permitted maximum distance difference between the actual position of the camera  22  and the standard position, and the reference angle difference is the permitted maximum angle difference between the actual position of the camera  22  and the standard position. 
         [0021]    The analysis module  105  compares the actual distance difference with the reference distance difference and compares the actual angle difference with the reference angle difference respectively to obtain corresponding comparison results, and determines whether the installation of the 3D camera  2  satisfies the requirement according to the comparison results. In detail, the analysis module  105  determines the installation of the 3D camera  2  satisfies the requirement if the actual distance difference is less than the reference distance difference and the angle difference is less than the reference angle difference. The analysis module  105  determines the 3D camera is not installed appropriately if the actual distance difference is greater than the reference distance difference or the angle difference is greater than the reference angle difference. 
         [0022]    In the embodiment, the camera testing device  1  also includes a prompt module  106 . The analysis module  105  controls the prompt module  106  to produce corresponding prompt signals according to the comparison results. For example, the prompt module  106  can be a LED (Light-Emitting Diode) unit, the analysis module  105  controls the prompt module  106  to show the light on when the 3D camera  2  is installed appropriately, and controls the prompt module  106  to flash the light when the 3D camera  2  is not installed appropriately. In other embodiments, the prompt module  106  can be an audio output unit. 
         [0023]    In the embodiment, the first camera  21  is a left camera of the 3D camera  2  and the second camera  21  is a right camera of the 3D camera  2 . In other embodiments, the first camera  21  can be the right camera of the 3D camera  2  and the second camera  22  can be the left camera of the 3D camera  2 . 
         [0024]      FIG. 4  is a flowchart showing a method for testing a 3D camera, applied in the camera testing device of  FIG. 1 . 
         [0025]    In step S 401 , the position of the 3D camera  2  is adjusted to make the first camera  21  of the 3D camera  2  align with the first picture P 1  of the reference picture P. 
         [0026]    In step S 402 , the image capturing module  101  obtains the image IM captured by the second camera  22  of the 3D camera  2 . 
         [0027]    In step S 403 , the particular point determining module  102  analyzes the image IM captured by the second camera  22 , and identifies the first label A 0 , the second label B 0 , and the central point R 0  of the image IM. 
         [0028]    In step S 404 , the calculating module  103  determines the coordinates of the first label A 0 , the second label B 0 , and the central point R 0  of the image IM, and calculates the actual angle difference and the actual distance difference between the actual position of the second camera  22  and the standard position according to the coordinates of the first label A 0 , the second label B 0 , and the central point R 0  of the image IM. 
         [0029]    In step S 405 , the analysis module  105  compares the actual distance difference with the reference distance difference and compares the actual angle difference with the reference angle difference respectively to obtain corresponding comparison results, and determines whether the installation of the 3D camera  2  satisfies the requirement according to the comparison results. In detail, the analysis module  105  determines the installation of the 3D camera  2  satisfies the requirement if the distance difference is less than the reference distance difference and the angle difference is less than the reference angle difference. The analysis module  105  determines the 3D camera  2  does not satisfy the requirement if the distance difference is greater than the reference distance difference or the angle difference is greater than the reference angle difference. 
         [0030]    In step S 406 , the analysis module  105  controls the prompt module  106  to produce corresponding prompt signal according to the comparison results. 
         [0031]    It is believed that the present embodiments and their advantages will be understood from the foregoing description, and it will be apparent that various changes may be made thereto without departing from the spirit and scope of the disclosure or sacrificing all of its material advantages, the examples hereinbefore described merely being exemplary embodiments of the present disclosure.