Summary of the invention
Technical problem to be solved by this invention is to provide a kind of method of detecting the imageing sensor of camera head and checkout gear, 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:
To the method that the imageing sensor of camera head detects, comprising:
Control light source enters a state in opening and closed condition, in the lighttight confined space that the camera lens part that wherein said light source is arranged on an occlusion part and described camera head is formed;
When described light source is in a described state, whether detected image transducer collects the first image, and after collecting described first image, obtains described first image and control described light source to enter another state in opening and closed condition;
When described light source is in another state described, whether detected image transducer collects the second image, and after collecting described second image, obtains described second image;
Described first image and the second image are analyzed, obtains the testing result of described imageing sensor.
Preferably, in above-mentioned method,
Intercept still image further by the video flowing collected from described imageing sensor, obtain described first image and the second image.
Preferably, in above-mentioned method,
Described camera head includes a processing unit and memory cell, and described memory cell preserves the register configuration parameter of described processing unit and described imageing sensor;
Before described imageing sensor is detected, read the register configuration parameter in described memory cell by described processing unit, and corresponding register is configured.
Preferably, in above-mentioned method,
When controlling described light source and entering opening, the configuration on state of time for exposure of described imageing sensor and the luminance gain of described light source further; And
When controlling described light source and entering closed condition, the dark-state time for exposure of the described imageing sensor of configuration further.
Present invention also offers a kind of checkout gear that the imageing sensor of camera head is detected, comprising:
Light source and occlusion part, wherein said light source, in the lighttight confined space that the camera lens part being arranged on described occlusion part and described camera head is formed;
Detecting unit, during for being in a state in opening and closed condition at described light source, detect described imageing sensor and whether collect the first image, and when described light source is in another state described, whether detected image transducer collects the second image;
Switch unit, a state in opening and closed condition is entered for controlling light source, and after described detecting unit detects that described imageing sensor collects described first image, control described light source and enter another state in opening and closed condition;
Image acquisition unit, for obtaining described first image and the second image;
Image analyzing unit, for analyzing described first image and the second image, obtains the testing result of described imageing sensor.
Preferably, in above-mentioned detection device,
Described image acquisition unit, being further used for intercepting still image in the video flowing by collecting from described imageing sensor, obtaining described first image and the second image.
Preferably, in above-mentioned detection device,
Described camera head includes a processing unit and memory cell, and described memory cell preserves the register configuration parameter of described processing unit and described imageing sensor;
Described checkout gear also comprises:
First dispensing unit, for before detecting described imageing sensor, is read the register configuration parameter of preserving in described memory cell, and is configured corresponding register by described processing unit.
Preferably, in above-mentioned detection device, also comprise:
Second dispensing unit, for control at described switch unit described light source enter opening time, the further configuration on state of time for exposure of described imageing sensor and the luminance gain of described light source; And described switch unit control described light source enter closed condition time, the further dark-state time for exposure of the described imageing sensor of configuration.
Preferably, in above-mentioned detection device, described occlusion part is the lens cap that described camera lens part is corresponding.
Preferably, in above-mentioned detection device, also comprise:
Based on the USB interface of general-purpose serial bus USB 2.0 standard, described USB interface is connected with described camera head.
As can be seen from the above, method that the imageing sensor of camera head is detected provided by the invention and checkout gear, a lighttight confined space is formed by the camera lens part of an occlusion part and described camera head, and a light source is set in this confined space, the test environment of an on state of can be obtained when light source is opened, the test environment of a dark-state can be obtained when light source is closed, thus pass through the unlatching or the closedown that control this light source, the conversion of test environment can be realized easily.Meanwhile, the present invention, when specifically testing, collects under image just automatically switches to another test environment once imageing sensor and tests, compared to the manual switching test environment of prior art, effectively can save the testing time, improves testing efficiency.
Embodiment
Present invention improves over the testing environment of existing imageing sensor, and by the testing process of automation, coherent detection is carried out to imageing sensor, thus decrease manual hand manipulation in checking process, greatly reduce detection complexity, improve detection efficiency.Below with reference to accompanying drawing, by specific embodiment, the present invention is described further.
First, please refer to Fig. 2, the method that the imageing sensor of camera head is detected described in the embodiment of the present invention, after the image collecting function opening imageing sensor, specifically comprise the following steps:
Step 11, control light source enters a state in opening and closed condition, in the lighttight confined space that the camera lens part that wherein said light source is arranged on an occlusion part and described camera head is formed;
Step 12, when described light source is in a described state, whether detected image transducer collects the first image, and after collecting described first image, obtains described first image and control described light source to enter another state in opening and closed condition;
Step 13, when described light source is in another state described, whether detected image transducer collects the second image, and after collecting described second image, obtains described second image;
Step 14, analyzes described first image and the second image, obtains the testing result of described imageing sensor.
As can be seen from above step, a lighttight confined space is formed by the camera lens part of an occlusion part and described camera head in the present embodiment, described occlusion part is removably mounted on camera lens part, be combined with camera lens part to form airtight lighttight space, and a light source (as LED light source) is set in this confined space.The test environment of an on state of can be obtained when light source is opened, the test environment of a dark-state can be obtained when light source is closed, thus pass through the unlatching or the closedown that control this light source, the conversion of test environment can be realized easily.Meanwhile, the present embodiment, when specifically testing, collects under image just automatically switches to another test environment once imageing sensor and tests, compared to the manual switching test environment of prior art, effectively can save the testing time, improves testing efficiency.
As a kind of preferred embodiments, in above-mentioned steps 12 and step 13, intercept still image by the video flowing that collects from imageing sensor, obtain described first image and the second image.Concrete can be connected with imageing sensor by SampleGrabber interface, utilizes this interface directly from video flowing, to obtain still image.This processing mode, relative to prior art by imageing sensor obtain Image Saving to computer, then in the image preserved from computer, select the image meeting test request to carry out the processing mode of testing again, can image acquisition time be saved, improve testing efficiency.
Except imageing sensor, camera head also includes processing unit and memory cell usually.Before concrete test starts, need according to test needs, the register of described processing unit and described imageing sensor is configured, such as, the numerical value of the related register in configuration image transducer, to arrange the parameter such as picture format, size, more such as, the numerical value of the related register of configuration processor, with the timing parameter etc. of placement processor.Prior art is when detecting imageing sensor, normally computer is connected with camera head, this computer is utilized to be configured these registers, particular by the driver on computer, be configured via USB control channel (USBcontrolpipe) register to imageing sensor and processor.The present embodiment improves this configuration of prior art further, the register configuration parameter of described processing unit and described imageing sensor is kept at the memory cell (as E2pROM) of camera head, described register configuration parameter comprises timing parameter and image parameter; Then, before described imageing sensor is detected, read the register configuration parameter in described memory cell by described processing unit, and corresponding register is configured.
In concrete test process, the present embodiment configures the relevant parameter under concrete test further.Such as, when controlling described light source and entering opening, the configuration on state of time for exposure of described imageing sensor and the luminance gain of described light source further; And when controlling described light source and entering closed condition, the dark-state time for exposure of the described imageing sensor of configuration further.
Below more by reference to the accompanying drawings 3, the flow process of the present embodiment under concrete on state of test environment is described, specifically comprises:
Step 21, open light source, light source is made to enter opening, enter the on state of test environment of imageing sensor, and the on state of time for exposure of described imageing sensor and the luminance gain of described light source are configured, the white light that the luminance gain of light source makes the generation of described light source meet on state of test request is advisable.
Step 22, by SampleGrabber interface, directly intercepts the still image under on state of environment from the video flowing that imageing sensor collects.
Step 23, analyzes the still image under above-mentioned on state of environment, obtains the analysis result under on state of environment and export.
Here, after getting still image in above-mentioned steps 22, light source can be closed, directly enter dark-state test environment, by SampleGrabber interface, from the video flowing that imageing sensor collects, directly intercept the still image under dark-state environment, and then perform above-mentioned steps 23 and the analysis to the still image under dark-state environment, and the analysis result of still image under comprehensive on state of, dark-state environment, obtain the testing result of imageing sensor, testing result specifically comprises bad point on imageing sensor and coordinate thereof.
Be explained above the method for the detection of the imageing sensor of the present embodiment.Based on said method, the present embodiment additionally provides a kind of checkout gear detected the imageing sensor of camera head.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, in the lighttight confined space that the camera lens part being arranged on described occlusion part and described camera head is formed; Here, described occlusion part is removably mounted on camera lens part, is combined to form airtight lighttight space with camera lens part;
Detecting unit, during for being in a state in opening and closed condition at described light source, detect described imageing sensor and whether collect the first image, and when described light source is in another state described, whether detected image transducer collects the second image;
Switch unit, a state in opening and closed condition is entered for controlling light source, and after described detecting unit detects that described imageing sensor collects described first image, control described light source and enter another state in opening and closed condition;
Image acquisition unit, for obtaining described first image and the second image;
Image analyzing unit, for analyzing described first image and the second image, obtains the testing result of described imageing sensor.
As a preferred embodiments, described image acquisition unit, being further used for intercepting still image in the video flowing by collecting from described imageing sensor, obtaining described first image and the second image.
In the present embodiment, described camera head includes a processing unit and memory cell, and described memory cell preserves the register configuration parameter of described processing unit and described imageing sensor, and described register configuration parameter comprises timing parameter and image parameter.Now, described checkout gear also comprises:
First dispensing unit, for before detecting described imageing sensor, is read the register configuration parameter of preserving in described memory cell, and is configured corresponding register by described processing unit.
Second dispensing unit, for control at described switch unit described light source enter opening time, the further configuration on state of time for exposure of described imageing sensor and the luminance gain of described light source; And described switch unit control described light source enter closed condition time, the further dark-state time for exposure of the described imageing sensor of configuration.
Preferably, the lens cap of occlusion part described in the present embodiment corresponding to the camera lens part of described camera head.Described light source can be connected by exporting (GPIO) pin with the universal input of processor, thus by the level of this checkout gear control GPIO pin automatically, to control unlatching or the closedown of light source, thus reduces manual intervention, save the testing time.
Preferably, the checkout gear shown in Fig. 3, also comprise one based on the USB interface of USB2.0 standard, described USB interface is connected with described camera head.Adopt this USB interface, the message transmission rate between checkout gear and camera head can be improved, save the testing time further, improve testing efficiency.
After adopting the checkout gear of the present embodiment and detection method, the present embodiment can shorten the detection time of imageing sensor greatly, improves testing efficiency.
The above is only embodiments of the present invention; it should be pointed out that for those skilled in the art, under the premise without departing from the principles 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.