Endoscope light source compensation method and endoscope system

文档序号:76005 发布日期:2021-10-08 浏览:18次 中文

阅读说明:本技术 一种内窥镜光源补偿方法及内窥镜系统 (Endoscope light source compensation method and endoscope system ) 是由 师永涛 袁谋堃 黎建霞 付豪 陈魁 于 2021-06-23 设计创作,主要内容包括:本发明公开了一种内窥镜光源补偿方法及内窥镜系统,其中,内窥镜光源补偿方法包括以下步骤:S3:获取第N-X帧图片亮度值,其中,X为非0自然数;S4:判断第N-X帧图片亮度值是否在当前的亮度等级范围内,若是,进入步骤S5,若否,调节电位计且X加1后回到步骤S3;S5:判断当前亮度等级是否达到最大亮度等级,若是,结束,若否,亮度等级加1后回到步骤S3。本发明能有效解决光源长时间使用配光亮度变化导致的图像效果变差的问题,不仅适用于内窥镜领域,也适用于其他图像采集领域,通过自动补偿方案,安全可靠、有效简便地调节使光源亮度,直至达到预配的配比状态,从而达到补偿的目的。(The invention discloses an endoscope light source compensation method and an endoscope system, wherein the endoscope light source compensation method comprises the following steps: s3, obtaining the Nth X A frame picture brightness value, wherein X is a non-0 natural number; s4, judging the Nth X If the frame picture brightness value is within the current brightness level range, entering step S5, otherwise, adjusting the potentiometer and returning to step S3 after adding 1 to X; and S5, judging whether the current brightness level reaches the maximum brightness level, if so, ending, if not, adding 1 to the brightness level and returning to the step S3. The invention can effectively solve the problem of poor image effect caused by the change of light distribution brightness when the light source is used for a long time, is not only suitable for the field of endoscopes, but also suitable for other image acquisition fields, and can safely, reliably, effectively, simply and conveniently adjust the brightness of the light source through an automatic compensation scheme until reaching a pre-prepared ratio state, thereby achieving the purpose of compensation.)

1. An endoscope light source compensation method is characterized by comprising the following steps:

s3, obtaining the NthXA frame picture brightness value, wherein X is a non-0 natural number;

s4, judging the NthXIf the frame picture brightness value is within the current brightness level range, entering step S5, otherwise, adjusting the potentiometer and returning to step S3 after adding 1 to X;

and S5, judging whether the current brightness level reaches the maximum brightness level, if so, ending, if not, adding 1 to the brightness level and returning to the step S3.

2. The endoscope light source compensation method of claim 1, wherein: further comprising the steps of:

s1, initializing the brightness level;

and S2, setting a light measuring channel.

3. The endoscope light source compensation method of claim 1, wherein: the step S1 is preceded by a step of setting brightness levels, and the different brightness values are set in different levels according to size.

4. The endoscope light source compensation method of claim 1, wherein: in step S4, if yes, the current digital potentiometer shift position is recorded and stored, and then the potentiometer is adjusted.

5. The endoscope light source compensation method of claim 1, wherein: if the judgment result in the step S5 is no, the lighting device further includes a step of adjusting the potentiometer and adding X to 1, and the process returns to the step S3.

6. An endoscope system, characterized by: including image processing system (03), image processing system (03) includes image processing unit (11), image processing unit (11) are provided with photometry module (14), image processing unit (11) still connect image processing system the control unit (15), image processing system the control unit (15) are connected with light source system the control unit (17) of light source system (04) through control interface (16), light source system the control unit (17) are connected with storage module (20) and brightness control switch unit (18), brightness control switch unit (18) are connected with light source drive unit (19).

7. The endoscopic system of claim 6 wherein: the storage module (20) stores a brightness level table, different brightness values are set in different brightness levels according to the brightness level table, and each brightness level corresponds to one potentiometer gear.

8. The endoscopic system of claim 6 wherein: the image processing unit (11) and the light source driving unit (19) are both connected with a mirror body (2), and a reference target disc (10) is arranged at the front end of the mirror body (2).

9. The endoscopic system of claim 8 wherein: the relative position of the lens body (2) and the reference target disc (10) is fixed.

10. The endoscopic system of claim 8 wherein: the reference target disc (10) is a reflection type gray scale card.

Technical Field

The invention relates to the technical field of endoscopes, in particular to an endoscope light source compensation method and an endoscope system.

Background

The endoscope includes an image processing system, a light source system, a scope, a display, a cart, and the like. The light source system is an important component and provides a light source for the whole system to acquire images. In order to display details of blood vessels or lesions in the stomach and intestine, a light source system generally adopts a two-color or multi-color light source, and light sources used by a endoscope body can be combined according to a certain proportion, and the light source system loads light source proportion parameters of various colors presenting the optimal image effect when the endoscope leaves a factory. However, dust adheres to the optical filter of the light source system after a period of use, or brightness of the light source lamp is attenuated, which may cause the ratio of the light source to be shifted, thereby affecting the image display effect of the endoscope system.

Therefore, those skilled in the art are devoted to develop a method and system for compensating an endoscope light source, which is used to adjust the brightness of the endoscope light source until a preset state is achieved, so as to achieve the purpose of compensation.

Disclosure of Invention

In view of the above-mentioned defects of the prior art, the technical problem to be solved by the present invention is to provide an endoscope light source compensation method and an endoscope system, which are used for adjusting the brightness of an endoscope light source until a preset state is achieved, so as to achieve the compensation purpose.

In order to achieve the above object, the present invention provides an endoscope light source compensation method, comprising the steps of:

s3, obtaining the NthXA frame picture brightness value, wherein X is a non-0 natural number;

s4, judging the NthXIf the frame picture brightness value is within the current brightness level range, entering step S5, otherwise, adjusting the potentiometer and returning to step S3 after adding 1 to X;

and S5, judging whether the current brightness level reaches the maximum brightness level, if so, ending, if not, adding 1 to the brightness level and returning to the step S3.

Preferably, the method further comprises the following steps:

s1, initializing the brightness level;

and S2, setting a light measuring channel.

Preferably, the method further includes a step of setting brightness levels before the step S1, wherein different brightness values are set in different levels according to size.

Preferably, in step S4, if yes, the current digital potentiometer shift position is recorded and stored, and then the potentiometer is adjusted.

Preferably, when the determination in step S5 is no, the method further includes the step of adjusting the potentiometer and adding X to 1, and then returns to step S3.

The invention also provides an endoscope system, which comprises an image processing system, wherein the image processing system comprises an image processing unit, the image processing unit is provided with a photometric module, the image processing unit is also connected with an image processing system control unit, the image processing system control unit is connected with a light source system control unit of a light source system through a control interface, the light source system control unit is connected with a storage module and a brightness adjusting switch unit, and the brightness adjusting switch unit is connected with a light source driving unit.

Preferably, the storage module stores a brightness level table, the brightness level table sets different brightness values in different brightness levels according to the size, and each brightness level corresponds to a potentiometer shift position.

Preferably, the image processing unit and the light source driving unit are both connected with a mirror body, and a reference target disc is arranged at the front end of the mirror body.

Preferably, the relative positions of the mirror body and the reference target disk are fixed.

Preferably, the reference target disk is a reflective gray scale card.

The invention has the beneficial effects that: the invention can effectively solve the problem of poor image effect caused by the change of light distribution brightness when the light source is used for a long time, is not only suitable for the field of endoscopes, but also suitable for other image acquisition fields, and can safely, reliably, effectively, simply and conveniently adjust the brightness of the light source through an automatic compensation scheme until reaching a pre-prepared ratio state, thereby achieving the purpose of compensation.

Drawings

FIG. 1 is a flow chart of a method for compensating an endoscope light source according to an embodiment of the present invention.

FIG. 2 is a schematic structural view of an endoscopic system according to an embodiment of the present invention.

Detailed Description

The invention is further illustrated by the following figures and examples.

An endoscope light source compensation method, as shown in fig. 1, but before step S1, further includes a step of setting brightness levels, i.e., setting different brightness values in different levels by size. A brightness level may be a range of brightness values. In this embodiment, the implementation is realized by setting a brightness level table, which can be as shown in table 1.

TABLE 1 Brightness rating Table

Brightness level Range of brightness values
1 2-10
2 10-20
…… ……
M 90-100

Specifically, the endoscope light source compensation method of the present invention includes the steps of:

and S1, initializing the brightness level, wherein in the embodiment, after the brightness level is initialized, the brightness level of the light source system can be returned to the lowest level, which is set to be 1 in the embodiment.

S2, a photometric channel is set, namely, the photometric channel of the configuration system can be an R channel, a G channel, a B channel or a combination of the channels.

S3, obtaining the NthXAnd (3) frame picture brightness value, wherein X is a non-0 natural number. The endoscope body 02 collects images at the current light source level, and sends the images to the light measuring module 14 of the image processing system 03, so as to obtain the brightness value of the image. X is a non-0 natural number. The pictures in this step need to be collected in a dark room or under the protection of a light shield.

S4, judging the NthXIf the frame picture brightness value is within the current brightness level brightness value range, the process proceeds to step S5, otherwise, the potentiometer is adjusted and X is increased by 1 and then the process returns to step S3. In this step, if the Nth step is judgedXIf the frame picture brightness value is not within the current brightness level brightness value range, it indicates that the brightness of the light source has been attenuated, the potentiometer needs to be adjusted to increase the brightness of the light source lamp, and after adding 1 to X, the brightness value of the next picture is obtained, and the process returns to step S3. Assume that the brightness level is 1, the set brightness value is 2-10, but N1The frame picture brightness value is actually 1, if the frame picture brightness value is not in the current brightness level brightness value range, the potentiometer is adjusted, the brightness of the light source lamp is improved, then the light source lamp is shot, and N is obtained2And (4) the brightness value of the frame picture is within the current brightness level brightness value range.

And S5, judging whether the current brightness level reaches the maximum brightness level, if so, ending, if not, adding 1 to the brightness level and returning to the step S3. In this embodiment, if the determination is no, the brightness level is increased by 1, and the step of adjusting the potentiometer and increasing X by 1 is performed again in step S3. Namely, after the brightness value adjustment of the brightness level 1 is finished, the potentiometer is adjusted, and the X is added with 1 to adjust the brightness value of the brightness level 2, so that the adjustment of the levels one by one is finished until the brightness value adjustment of the last brightness level is finished, and the compensation of the endoscope light source is finished.

In step S4, if yes, the current digital potentiometer shift position is recorded and stored, and the digital potentiometer shift position corresponding to the originally recorded brightness level is updated. In the brightness level table, a column of digital potentiometer shift positions may be added, as shown in table 2.

TABLE 2 Brightness grade table with additional potentiometer gears

Brightness level Digital potentiometer shift Range of brightness values
1 101 0-10
2 205 10-20
…… …… ……
M 1000 90-100

It should be noted that table 1 and table 2 are only form example tables, and specifically how many brightness values are taken for each level, what digital potentiometer gear is set, and the adjustment can be performed according to needs and different equipment configurations, and the setting is completed by a manufacturer before the manufacturer leaves a factory.

When the endoscope light source is compensated by adopting the method of the invention, if the judgment in the step S4 is no, the digital potentiometer gear is adjusted, and the next frame of picture is obtained again, then the judgment in the step S4 is carried out until the brightness value of the picture reaches the range of the currently set brightness level, the digital potentiometer gear at the moment is recorded, and the original gear value is updated.

As shown in fig. 2, the present invention further provides an endoscope system, which is used for implementing the endoscope light source compensation method, and includes an image processing system 03, where the image processing system 03 includes an image processing unit 11, the image processing unit 11 is provided with a light measuring module 14, the image processing unit 11 is connected to an image processing system control unit 15, the image processing system control unit 15 is connected to a light source system control unit 17 of a light source system 04 through a control interface 16, the light source system control unit 17 is connected to a storage module 20 and a brightness adjustment switch unit 18, and the brightness adjustment switch unit 18 is connected to a light source driving unit 19. The light source system 04 performs a brightness matching test of all brightness levels before leaving the factory, generates a corresponding table (as shown in table 1 and table 2) of brightness adjustment levels and brightness values, and stores the corresponding table in the storage module 20. The storage module 20 stores a brightness level table, and the brightness level table sets different brightness values in different levels according to the size, and each brightness level corresponds to a potentiometer shift position.

In this embodiment, the brightness adjusting switch unit 18 adopts a brightness adjusting circuit, the light source driving unit 19 is a light source driving circuit, the brightness adjusting circuit can be divided into a plurality of grades, such as 1-1024 grades, different grades correspond to different potential values of the light source driving circuit, and the light source system control unit 17 and the brightness adjusting switch unit 18 drive the light source driving unit 19 to adjust the brightness by adjusting the grades.

The image processing unit 11 and the light source driving unit 19 are both connected with the mirror body 2, the front end of the mirror body 2 is provided with a reference target disk 10, and the reference target disk 10 in the embodiment is a reflective gray card, so that the brightness contrast of three colors of RGB can be better restored. The reference target disk 10 may be fixed to the image processing system 03, the light source processing system 04, or the carriage. Meanwhile, the front end of the mirror body 02 is fixed by adopting a structural part, so that the relative positions of the mirror body 02 and the reference target disk 10 are fixed, and the mirror body is kept in a dark room or a light shield when in use, so as to ensure the standard consistency of the collected images.

When the microscope is used, the brightness adjustment levels of the light source system 04 are set one by one from the lowest level, and the mirror body 02 collects the image of the reference target disk 10 under the brightness of the light source 13 with the set level and sends the image to the light measuring module 14 of the image processing system 03. The light measuring module 14 measures and calculates the brightness value of the corresponding color light in the light source based on the R/G/B three channels, and sends the brightness value to the image processing system control unit 15, the image processing system control unit 15 transmits the brightness value to the light source system control unit 17 through the control interface 16, the light source system control unit 17 compares the received measured brightness value with the pre-stored brightness value, if the brightness value is not consistent with the pre-stored brightness value, the brightness adjusting switch unit 18 is controlled to adjust the potential value of the light source driving unit 19 to adjust the brightness of the corresponding light source lamp, and the factory pre-prepared matching state is achieved until the compensation purpose is achieved.

The foregoing detailed description of the preferred embodiments of the invention has been presented. It should be understood that numerous modifications and variations could be devised by those skilled in the art in light of the present teachings without departing from the inventive concepts. Therefore, the technical solutions available to those skilled in the art through logic analysis, reasoning and limited experiments based on the prior art according to the concept of the present invention should be within the scope of protection defined by the claims.

8页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种基于无线网络连接的耳鼻喉探入式诊疗设备

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!