Summary of the invention
The object of the invention is to: overcome endoscope product in prior art and regulate light-source brightness automatically not regulate, or regulating effect is not good, the defects such as speed is slow, a kind of endoscope illuminator Automatic adjustment method and device are provided, effectively automatically, the brightness of endoscope illuminator can be regulated, and regulate accurately and fast, promote image quality.
In order to solve the problems of the technologies described above, the present invention adopts following technical scheme:
A method for endoscope illuminator automatic brightness adjustment, is characterized in that, comprises the following steps:
S1: obtain present image brightness value, and current luminous flux output level;
S2: according to described present image brightness value, and the brightness of image reference value preset, calculate brightness relative difference;
S3: according to described current luminous flux output level, and described brightness relative difference, find corresponding target light flux output level in the brightness relative difference table preset;
S4: adjust described endoscope illuminator to described target light flux output level.
Further, described method is further comprising the steps of:
S5: if described brightness relative difference is greater than the high-high brightness relative difference in described brightness relative difference table, then adjust described endoscope illuminator to highlight flux output level; If described brightness relative difference is less than the minimum brightness relative difference in described brightness relative difference table, then adjust described endoscope illuminator to minimum luminous flux output level.
Further, described luminous flux output level is that the diverse location by being arranged on the brake sack in described endoscope illuminator realizes.
Further, the position of described brake sack is controlled by motor, the step motor position that different luminous flux output levels is corresponding different.
Further, described brightness relative difference table is, for the combination of each initial luminous flux output level and each target light flux output level, all has a default brightness relative difference corresponding with it.
Further, in described brightness relative difference table, vertical coordinate is initial luminous flux output level, and abscissa is target light flux output level, and the element in table is the relative difference of brightness of image corresponding to brightness of image corresponding to initial luminous flux output level and target light flux output level.
The present invention also provides a kind of device of endoscope illuminator automatic brightness adjustment, comprising:
Current information acquiring unit, for obtaining present image brightness value, and current luminous flux output level;
Computing unit, for according to described present image brightness value, and the brightness of image reference value preset, calculate brightness relative difference;
Query unit, for according to described current luminous flux output level, and described brightness relative difference, in the brightness relative difference table preset, find corresponding target light flux output level;
Adjustment unit, for adjusting described endoscope illuminator to described target light flux output level.
Further, described adjustment unit also has following functions: if described brightness relative difference is greater than the high-high brightness relative difference in described brightness relative difference table, then adjust described endoscope illuminator to highlight flux output level; If described brightness relative difference is less than the minimum brightness relative difference in described brightness relative difference table, then adjust described endoscope illuminator to minimum luminous flux output level.
Further, described luminous flux output level is that the diverse location by being arranged on the brake sack in endoscope illuminator realizes.
Further, described brightness relative difference table is, for the combination of each initial luminous flux output level and each target light flux output level, all has a default brightness relative difference corresponding with it.
The invention has the beneficial effects as follows: provide a kind of endoscope illuminator automatic brightness adjustment method and apparatus, automatically the light source output intensity of endoscope can be regulated according to image quality, regulate quick, accurate, endoscope can be stablized, obtain the image of desired level rapidly.
Detailed description of the invention
In order to make object of the present invention, technical scheme and advantage clearly understand, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein only in order to explain the present invention, be not intended to limit the present invention.
As shown in Figure 1, the endoscopic system that the embodiment of the present invention adopts comprises endoscope illuminator 10, mirror body 20, processor 30 and display 40, wherein, described endoscope illuminator 10 interior details and the part that is connected with mirror body 20 are as shown in Figure 2, described endoscope illuminator 10 comprises the xenon lamp (or LED etc.) 2 of band parabolic reflecting bowl, hot mirror 3, heat absorption glass 4, lens 1 and brake sack 5, and described mirror body 20 comprises lamp guide 6, optical fiber passes light beam 7 and disperse and uses planoconcave lens (not shown).Described lamp guide 6 is positioned at one end of described mirror body 20, this end connects with described endoscope illuminator 10, between the collecting lens 1 of described brake sack 5 in described endoscope illuminator 10 and the lamp guide 6 in described mirror body 20, the other end and the optical fiber of described lamp guide 6 pass light beam 7 and connect, thus the light making described endoscope illuminator 10 send passes light beam 7 and disperses after with planoconcave lens arrive in human body, for the imaging lens in described mirror body 20 provides illumination through lamp guide 6, optical fiber.Described mirror body 20 is connected with described processor 30 again simultaneously, and processor 30 is given display 40 after the picture signal that mirror body 20 obtains being processed and demonstrated image.
Described brake sack 5 rotates around the rotating shaft perpendicular to optical axis, by its rotational angle of step motor control.In certain embodiments, brake sack 5 also can rotate around the rotating shaft being parallel to optical axis.Described brake sack 5 is divided into several position to the process of not blocking light beam completely according to the precision needed for practical application from sheltering from Beam rotation completely, it is such as N number of position, then corresponding N number of luminous flux output level, according to the imaging circumstances of endoscopic applications, realize automatically regulating between this N number of luminous flux output level.Because brake sack 5 is by step motor drive, in the automatic adjustment of therefore final body present step motor drive direction and step number, motor is to there being N number of position rank.
The light source of power stability, in certain region in space, the relative difference of brightness relative difference and light source output light flux exist as formula (1) the approximation relation of stating.
In formula (1), the brightness relative difference that Δ I represents, I
0represent target brightness value, I
crepresent present image brightness value, Δ φ represents light source output light flux relative difference, φ
0represent light source target output light flux value, φ
crepresent the current output light flux value of light source.
From formula (1), brightness of image relative difference is consistent with light source output light flux relative difference.
Described present image brightness value I
ccan be calculated by the Y-signal in present image YCbCr space and obtain, therefore the relative difference of survey calculation present image brightness value and target image brightness value can be passed through, obtain luminous flux relative difference, thus obtain target light flux output level, i.e. motor target location rank.And then adjustment motor, drive brake sack to suitable position.
Initial position due to brake sack may be any one in the rank of N number of position, it is such as i-th, in the imaging circumstances of instability, difference between the present image brightness value obtained and default brightness of image reference value is arbitrary, therefore, can each initial position of corresponding brake sack and the combination of each target location, calculate the relative different of its luminous flux, set up a luminous flux relative difference table.Because luminous flux relative difference is approximately equal to brightness relative difference, therefore may correspond to and set up brightness relative difference table, the N number of target light flux output level of its horizontally-arranged correspondence, i.e. target step motor position, the corresponding N number of initial luminous flux output level of its file, i.e. initial step motor position.After endoscopic system gets present image brightness, compare with the brightness of image reference value preset, and calculate brightness relative difference, according to this luminance difference, the value approximate with this brightness relative difference is searched in corresponding horizontally-arranged of i-th initial position, be such as a jth value, then the target location that this jth value is corresponding and described motor need the target location adjusted to.Thus realize the automatic adjustment of endoscope illuminator brightness, and a two field picture carries out primary source Drazin inverse, makes light source Drazin inverse speed consistent with video imaging speed, solves the image brilliant flash problem that light source governing speed causes slowly.
Be more than the core concept of the application, below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention be clearly and completely described.Obviously, described embodiment is only a part of embodiment of the present invention, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
embodiment one
The embodiment of the present invention one provides a kind of method of endoscope illuminator automatic brightness adjustment.See Fig. 3, the endoscope illuminator automatic brightness adjustment method of the embodiment of the present invention one comprises step S1-S4:
S1: obtain present image brightness value, and current luminous flux output level;
Obtain present image brightness value, the technology such as average metering of the prior art or peak value light-metering can be adopted, quantize the brightness value when previous frame image.Current luminous flux output level, can carry out the output level of labelling luminous flux according to rank residing for the current location of motor, requirement does not dissolve the occurrence of current luminous flux.
S2: according to described present image brightness value, and the brightness of image reference value preset, calculate brightness relative difference;
The brightness of image reference value preset, namely desirable image brightness values, described brightness relative difference is the difference of brightness of image reference value and present image brightness value, with the ratio of present image brightness value, described brightness relative difference is the foundation that endoscope illuminator luminous flux regulates.
S3: according to described current luminous flux output level, and brightness relative difference, find corresponding target light flux output level in the brightness relative difference table preset;
The brightness relative difference list structure preset as shown in Figure 4, this table comprises brake sack and moves to the luminous flux relative difference that any jth position in N number of target location produces from any i-th position N number of initial position, described luminous flux relative difference is the difference of the luminous flux of brake sack when target location and the luminous flux when initial position, with the ratio of the luminous flux when initial position, according to explanation above, the relative difference of this luminous flux approximates the relative difference of brightness of image when brake sack moves to jth target location from i-th initial position, therefore according to the brightness relative difference calculated in S2 step, in current luminous flux output level, namely the value closest with this brightness relative difference is found in horizontally-arranged corresponding to brake sack initial position, target location corresponding to this value is target light flux output level.
S4: adjust described endoscope illuminator to described target light flux output level.
According to the target light flux output level found in S3 step, drive stepping motor, mobile brake sack is to corresponding target location.
In the process of described adjustment, also may run into such situation: due to the reason of imaging circumstances, the present image brightness value that S1 step may be caused to get is crossed bright or excessively dark, make the relative luminance difference that calculates in S2 step too small or excessive, cause in S3 step, described brightness relative difference is less than the minima of horizontally-arranged middle predetermined luminance difference corresponding to its initial position, or be greater than its maximum, in this case, then regulate motor, brake sack is made to lay respectively at the minimum position of luminous flux accordingly, or maximum position.Because endoscope adopts the light source of power stability, in most cases, brightness relative difference in the brightness relative difference table preset is enough endoscope illuminator adjustment uses, above-mentioned situation is integrity in order to consider endoscope illuminator brightness regulation mechanism and arranges, and increases the robustness of this control method.
As seen from the above technical solution, the endoscope illuminator automatic brightness adjustment method of the embodiment of the present invention one, the automatic adjustment of endoscope illuminator brightness can be realized, and, one two field picture carries out primary source Drazin inverse, make light source Drazin inverse speed consistent with video imaging speed, governing speed is fast.Due to luminous flux output level precision can be determined according to actual needs, make brightness regulation meticulous, accurate.
embodiment two
See Fig. 5, the embodiment of the present invention two provides a kind of endoscope illuminator automatic brightness regulating device.Described device comprises:
Current information acquiring unit 501, for obtaining present image brightness value, and current luminous flux output level;
Computing unit 502, for according to present image brightness value, and the brightness of image reference value preset, calculate brightness relative difference;
Query unit 503, for according to current luminous flux output level, and brightness relative difference, in the brightness relative difference table preset, find corresponding target light flux output level;
Adjustment unit 504, for adjusting endoscope illuminator brightness to target light flux output level.
Preferably, adjustment unit 504 also has following functions: if the brightness relative difference that computing unit 502 calculates is greater than the high-high brightness relative difference in default brightness relative difference table, then adjust endoscope illuminator brightness to highlight flux output level; If the brightness relative difference that computing unit 502 calculates is less than the minimum brightness relative difference in default brightness relative difference table, then adjust endoscope illuminator brightness to minimum luminous flux output level.
The device of the embodiment of the present invention two is made up of the unit module run on endoscopic system processor, and because described device is corresponding with the method for the embodiment of the present invention one, so description is fairly simple, relevant part illustrates see method part.
Above a kind of endoscope illuminator automatic brightness adjustment method and apparatus that the embodiment of the present invention provides is described in detail, but the explanation of above embodiment just understands method of the present invention and core concept thereof for helping, and should not be construed as limitation of the present invention.Those skilled in the art are in the technical scope that the present invention discloses, and the change that can expect easily or replacement, all should be encompassed within protection scope of the present invention.