Summary of the invention
Technical problem to be solved by this invention provides a kind of method and checkout gear that the imageing sensor of camera head is detected, and in order to improve the automaticity of test, saves the testing time.
For solving the problems of the technologies described above, scheme provided by the invention is as follows:
A kind of method that the imageing sensor of camera head is detected comprises:
The control light source enters a state in opening and the closed condition, and wherein said light source is arranged in the formed lighttight confined space of camera lens part of an occlusion part and described camera head;
When described light source was in a described state, whether the detected image transducer collected first image, and after collecting described first image, obtained described first image and control described light source to enter another state in opening and the closed condition;
When described light source was in described another state, whether the detected image transducer collected second image, and after collecting described second image, obtains described second image;
Described first image and second image are analyzed, obtained the testing result of described imageing sensor.
Preferably, in the above-mentioned method,
Further, obtain described first image and second image by intercepting still image the video flowing that collects from described imageing sensor.
Preferably, in the above-mentioned method,
Described camera head includes a processing unit and memory cell, and described memory cell is preserved the register configuration parameter of described processing unit and described imageing sensor;
Before described imageing sensor is detected, read register configuration parameter in the described memory cell by described processing unit, and relevant register is configured.
Preferably, in the above-mentioned method,
When the described light source of control enters opening, further dispose the bright attitude time for exposure of described imageing sensor and the luminance gain of described light source; And
When the described light source of control enters closed condition, the dark attitude time for exposure of further disposing described imageing sensor.
The present invention also provides a kind of checkout gear that the imageing sensor of camera head is detected, and comprising:
Light source and occlusion part, wherein said light source is arranged in the formed lighttight confined space of camera lens part of described occlusion part and described camera head;
Detecting unit, be used for when described light source is in state of opening and closed condition, detect described imageing sensor and whether collect first image, and when described light source was in described another state, whether the detected image transducer collected second image;
Switch unit, be used for controlling the state that light source enters opening and closed condition, and after described detecting unit detects described imageing sensor and collects described first image, control described light source and enter another state in opening and the closed condition;
Image acquisition unit is used to obtain described first image and second image;
Image analyzing unit is used for described first image and second image are analyzed, and obtains the testing result of described imageing sensor.
Preferably, in the above-mentioned detection device,
Described image acquisition unit is further used for obtaining described first image and second image by intercepting still image the video flowing that collects from described imageing sensor.
Preferably, in the above-mentioned detection device,
Described camera head includes a processing unit and memory cell, and described memory cell is preserved the register configuration parameter of described processing unit and described imageing sensor;
Described checkout gear also comprises:
First dispensing unit is used for reading the register configuration parameter of preserving in the described memory cell by described processing unit before described imageing sensor is detected, and relevant register is configured.
Preferably, in the above-mentioned detection device, also comprise:
Second dispensing unit is used for further disposing the bright attitude time for exposure of described imageing sensor and the luminance gain of described light source when described switch unit is controlled described light source and entered opening; And when described switch unit is controlled described light source and entered closed condition, the dark attitude time for exposure of further disposing described imageing sensor.
Preferably, in the above-mentioned detection device, described occlusion part is the lens cap of described camera lens part correspondence.
Preferably, in the above-mentioned detection device, also comprise:
Based on the USB interface of general-purpose serial bus USB 2.0 standards, described USB interface is connected with described camera head.
From the above as can be seen, method and the checkout gear that the imageing sensor of camera head is detected provided by the invention, camera lens part by an occlusion part and described camera head forms a lighttight confined space, and a light source is set in this confined space, when opening, light source can obtain the test environment of a bright attitude, when closing, light source can obtain the test environment of a dark attitude, thereby the unlatching by controlling this light source or close can realize the conversion of test environment easily.Simultaneously, the present invention just automatically switches under another test environment and tests in case imageing sensor collects image when concrete test, than the manual switching test environment of prior art, can save the testing time effectively, improves testing efficiency.
Embodiment
The present invention has improved the testing environment of existing imageing sensor, and by the testing process of automation imageing sensor is carried out coherent detection, thereby has reduced operation manually in the checking process, greatly reduces detection complexity, has improved detection efficiency.Below with reference to accompanying drawing, the present invention is described further by specific embodiment.
At first, please refer to Fig. 2, the described method that the imageing sensor of camera head is detected of the embodiment of the invention behind the image collecting function of opening imageing sensor, specifically may further comprise the steps:
Step 11, the control light source enters a state in opening and the closed condition, and wherein said light source is arranged in the formed lighttight confined space of camera lens part of an occlusion part and described camera head;
Step 12, when described light source is in a described state, whether the detected image transducer collects first image, and after collecting described first image, obtains described first image and control described light source to enter another state in opening and the closed condition;
Step 13, when described light source was in described another state, whether the detected image transducer collected second image, and after collecting described second image, obtains described second image;
Step 14 is analyzed described first image and second image, obtains the testing result of described imageing sensor.
From above step as can be seen, camera lens part by an occlusion part and described camera head in the present embodiment forms a lighttight confined space, described occlusion part is removably mounted on the camera lens part, combine with camera lens part forming airtight lighttight space, and a light source (as led light source) is set in this confined space.When light source is opened, can obtain the test environment of a bright attitude, when light source is closed, can obtain the test environment of a dark attitude, thereby the unlatching by controlling this light source or close can realize the conversion of test environment easily.Simultaneously, present embodiment just automatically switches under another test environment and tests in case imageing sensor collects image when concrete test, than the manual switching test environment of prior art, can save the testing time effectively, improves testing efficiency.
As a kind of preferential execution mode, in above-mentioned steps 12 and step 13,, obtain described first image and second image by intercepting still image the video flowing that collects from imageing sensor.Concrete can be connected with imageing sensor by Sample Grabber interface, utilizes this interface directly to obtain still image from video flowing.This processing mode, the image that imageing sensor is obtained with respect to prior art is saved in computer, the processing mode of testing again at the image of selecting to satisfy test request from the image that computer is preserved can be saved the image acquisition time then, improves testing efficiency.
Except that imageing sensor, camera head also includes processing unit and memory cell usually.Before concrete test begins, need be according to the test needs, register to described processing unit and described imageing sensor is configured, for example, the numerical value of the related register in the configuration image transducer is to be provided with parameters such as picture format, size, more for example, the numerical value of the related register of configuration processor is with timing parameter of set handling device etc.Prior art is when detecting imageing sensor, normally computer is connected with camera head, utilize this computer that these registers are configured, specifically be by the driver on the computer, be configured via the register of USB control channel (USB control pipe) to imageing sensor and processor.Present embodiment further improves this configuration of prior art, the register configuration parameter of described processing unit and described imageing sensor is kept at the memory cell (as E2pROM) of camera head, and described register configuration parameter comprises timing parameter and image parameter; Then before described imageing sensor is detected, read register configuration parameter in the described memory cell by described processing unit, and relevant register is configured.
In concrete test process, present embodiment further disposes the relevant parameter under the concrete test.For example, when the described light source of control enters opening, further dispose the bright attitude time for exposure of described imageing sensor and the luminance gain of described light source; And when the described light source of control enters closed condition, the dark attitude time for exposure of further disposing described imageing sensor.
Below more in conjunction with the accompanying drawings 3, the flow process of present embodiment under concrete bright attitude test environment described, specifically comprise:
Step 21, open light source, make light source enter opening, enter the bright attitude test environment of imageing sensor, and the bright attitude time for exposure of described imageing sensor and the luminance gain of described light source be configured, the luminance gain of light source makes described light source produce the white light that meets bright attitude test request and is advisable.
Step 22 by Sample Grabber interface, directly intercepts the still image under the bright attitude environment from the video flowing that imageing sensor collects.
Step 23 is analyzed the still image under the above-mentioned bright attitude environment, obtains analysis result and output under the bright attitude environment.
Here, after getting access to still image in the above-mentioned steps 22, can close light source, directly enter dark attitude test environment, by Sample Grabber interface, directly from the video flowing that imageing sensor collects, intercept the still image under the dark attitude environment, and then carry out above-mentioned steps 23 and to the analysis of the still image under the dark attitude environment, and the analysis result of the still image under the comprehensive bright attitude, dark attitude environment, obtain the testing result of imageing sensor, testing result specifically comprises bad point and the coordinate thereof on the imageing sensor.
The method of detection of the imageing sensor of present embodiment more than has been described.Based on said method, present embodiment also provides a kind of checkout gear that the imageing sensor of camera head is detected.As shown in Figure 3, this checkout gear comprises light source, detecting unit, switch unit, image acquisition unit and image analyzing unit, wherein,
Described light source is arranged in the formed lighttight confined space of camera lens part of described occlusion part and described camera head; Here, described occlusion part is removably mounted on the camera lens part, combines with camera lens part to form airtight lighttight space;
Detecting unit, be used for when described light source is in state of opening and closed condition, detect described imageing sensor and whether collect first image, and when described light source was in described another state, whether the detected image transducer collected second image;
Switch unit, be used for controlling the state that light source enters opening and closed condition, and after described detecting unit detects described imageing sensor and collects described first image, control described light source and enter another state in opening and the closed condition;
Image acquisition unit is used to obtain described first image and second image;
Image analyzing unit is used for described first image and second image are analyzed, and obtains the testing result of described imageing sensor.
As a preferential execution mode, described image acquisition unit is further used for obtaining described first image and second image by intercepting still image the video flowing that collects from described imageing sensor.
In the present embodiment, described camera head includes a processing unit and memory cell, and described memory cell is preserved the register configuration parameter of described processing unit and described imageing sensor, and described register configuration parameter comprises timing parameter and image parameter.At this moment, described checkout gear also comprises:
First dispensing unit is used for reading the register configuration parameter of preserving in the described memory cell by described processing unit before described imageing sensor is detected, and relevant register is configured.
Second dispensing unit is used for further disposing the bright attitude time for exposure of described imageing sensor and the luminance gain of described light source when described switch unit is controlled described light source and entered opening; And when described switch unit is controlled described light source and entered closed condition, the dark attitude time for exposure of further disposing described imageing sensor.
Preferably, occlusion part described in the present embodiment is the pairing lens cap of camera lens part of described camera head.Described light source can be by being connected with general input and output (GPIO) pin of processor, thereby control the level of GPIO pin automatically by this checkout gear, with the unlatching of control light source or close, thereby reduces manual intervention, saves the testing time.
Preferably, checkout gear shown in Figure 3 also comprises a USB interface based on the USB2.0 standard, and described USB interface is connected with described camera head.Adopt this USB interface, can improve the message transmission rate between checkout gear and the camera head, further save the testing time, improve testing efficiency.
Adopt after the checkout gear and detection method of present embodiment, present embodiment can shorten the detection time of imageing sensor greatly, improves testing efficiency.
The above only is embodiments of the present invention; should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the principle of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.