Brightness adjustment method and device

By dividing the endoscopic image into regions and calculating the influence value of the light source, precise brightness adjustment of the endoscopic light source can be achieved, solving the problem of abnormal brightness of the endoscope in the bronchus and improving the clarity of the field of vision and the success rate during the operation.

CN116862810BActive Publication Date: 2025-11-14SHANGHAI MICROPORT MEDBOT (GRP) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310935269.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-27
Publication Date
2025-11-14
Estimated Expiration
2043-07-27

AI Technical Summary

Technical Problem

When the endoscope moves inside the bronchus, changes in the distance between the lens and the bronchial wall, as well as changes in the diameter, cause abnormal brightness in the endoscopic image, requiring real-time adjustment of the light source brightness.

Method used

By acquiring the target endoscopic image and dividing it into multiple regions, areas with abnormal brightness are identified. The influence of the light source on the region is calculated based on the pixel grayscale value of the single-light-source virtual endoscopic image, and the brightness of the light source is adjusted to achieve the optimal imaging quality.

Benefits of technology

Accurately identify areas of abnormal brightness, reduce the workload of adjusting light source brightness, improve brightness adjustment efficiency, and enhance the clarity of the surgical field and success rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116862810B_ABST
    Figure CN116862810B_ABST
Patent Text Reader

Abstract

This application relates to a brightness adjustment method, apparatus, computer device, storage medium, and computer program product. The method includes: acquiring a target endoscopic image; dividing the target endoscopic image into multiple regions based on the number of light sources; identifying regions that meet image brightness characteristic conditions as first target regions of the target endoscopic image; acquiring a single-light-source virtual endoscopic image corresponding to each light source; determining the influence value of the corresponding light source on the corresponding second target region based on the grayscale value of pixels in each second target region of the single-light-source virtual endoscopic image; and adjusting the brightness of the corresponding light source based on the influence value. The second target region is mapped from the first target region. The method provided by this application can reduce the workload of adjusting light source brightness, improve brightness adjustment efficiency, and perform different brightness adjustments for each light source to achieve optimal imaging quality of the endoscopic image, thereby improving the visual clarity during surgery.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of endoscopy technology, and in particular to a brightness adjustment method and apparatus. Background Technology

[0002] Because the bronchus is a tree-like branching cavity, and the diameter of the bronchus decreases from the head to the lower part, when the endoscope moves inside the bronchus, the brightness of the endoscopic image may become abnormal due to changes in the distance between the lens and the bronchial wall in front, as well as changes in the diameter of the bronchus. It is necessary to adjust the brightness of the endoscopic light source in real time. Summary of the Invention

[0003] Therefore, it is necessary to provide a brightness adjustment method, device, computer equipment, computer-readable storage medium, and computer program product that can independently adjust the brightness of each endoscope light source to address the above-mentioned technical problems.

[0004] Firstly, this application provides a brightness adjustment method, the method comprising:

[0005] Acquire the target endoscopic image, divide the target endoscopic image into multiple regions based on the number of light sources, and determine the region that meets the image brightness characteristic condition as the first target region of the target endoscopic image. The target endoscopic image is either a real endoscopic image or a multi-light source virtual endoscopic image.

[0006] Acquire the corresponding single-light source virtual endoscope image for each light source. Based on the grayscale value of the pixels of each second target region in the single-light source virtual endoscope image, determine the influence value of the corresponding light source on the corresponding second target region. Based on the influence value, adjust the brightness of the corresponding light source. The second target region is obtained by mapping the first target region.

[0007] In one embodiment, the image brightness feature is the exposure state; the region that meets the image brightness feature condition is determined as the first target region of the target endoscopic image, including:

[0008] Obtain the percentage of first pixels in each region whose grayscale value is greater than the first grayscale threshold, and the percentage of second pixels in each region whose grayscale value is less than the second grayscale threshold;

[0009] If the proportion of the first pixel count is greater than the proportion of the second pixel count, and is also greater than the first preset proportion, the exposure status of the corresponding area is determined to be overexposed.

[0010] If the proportion of the second pixel count is greater than the proportion of the first pixel count and also greater than the second preset proportion, the exposure status of the corresponding area is determined to be underexposed.

[0011] Regions with overexposure or underexposure are defined as the first target region; and / or, the image brightness feature is contrast; regions that meet the image brightness feature conditions are defined as the first target region of the target endoscopic image, including:

[0012] Regions with contrast less than a first contrast threshold are defined as low-contrast regions, and regions with contrast greater than a second contrast threshold are defined as high-contrast regions. The low-contrast regions and high-contrast regions are used as the first target regions.

[0013] In one embodiment, acquiring a single-light-source virtual endoscopic image corresponding to each light source includes:

[0014] The first pose relationship between the positioning sensor and each light source, the second pose relationship between the positioning sensor and the endoscope lens, the mapping relationship between the real bronchus and the bronchus model, and the first pose of the positioning sensor in the real bronchus are obtained.

[0015] Based on the first pose, the first pose relationship, and the mapping relationship, the second pose of each light source in the bronchial model is calculated, and based on the first pose, the second pose relationship, and the mapping relationship, the third pose of the endoscope lens in the bronchial model is calculated.

[0016] The current brightness of each light source is obtained. Based on the current brightness of the light source, the bronchus model, the second pose and third pose of the light source, and the initial illumination model of the light source, a virtual endoscopic image of the corresponding single light source is generated.

[0017] In one embodiment, the influence value of the corresponding light source on the corresponding second target region is determined based on the grayscale values ​​of all pixels in each second target region in a single-light-source virtual endoscopic image, including:

[0018] Based on the number of pixels in each second target region and the gray value of each pixel, the average gray value of the second target region is calculated, and the average gray value is used as the influence value of the light source on the second target region.

[0019] In one embodiment, adjusting the brightness of the corresponding light source based on the influence value includes:

[0020] For a second target region where different light sources are in the same relative position, the target light source is determined from among the light sources based on the influence value of each light source on the corresponding second target region.

[0021] Based on the influence value of the target light source on the corresponding second target area, determine the single brightness adjustment value for the target light source;

[0022] The brightness of the target light source is adjusted based on the image brightness characteristics and single brightness adjustment value of the target light source on the corresponding second target area.

[0023] In one embodiment, for a second target region where different light sources are at the same relative position, a target light source is determined from the light sources based on the influence value of each light source on the corresponding second target region, including:

[0024] For the second target area, the influence values ​​of the corresponding light sources are sorted in descending order, and the light sources corresponding to the first preset number of influence values ​​are determined as the target light sources for the second target area.

[0025] In one embodiment, based on the influence value of the target light source on the corresponding second target area, a single brightness adjustment value for the target light source is determined, including:

[0026] Based on the maximum brightness of the target light source and the preset brightness adjustment segment, determine the preset brightness adjustment value of the target light source;

[0027] Calculate the total influence value of all target light sources corresponding to the second target area, and determine the single brightness adjustment value of the target light source based on the preset brightness adjustment value, the influence value of each target light source, and the total influence value.

[0028] In one embodiment, the image brightness features include exposure state and / or contrast; adjusting the brightness of the target light source based on the image brightness features of the corresponding second target region and the single brightness adjustment value of the target light source includes:

[0029] If the exposure state of the second target area is overexposed or the second target area is a high-contrast area, then increase the brightness of the corresponding target light source according to the single brightness adjustment value;

[0030] If the exposure status of the second target area is underexposed or the second target area is a low-contrast area, then the brightness of the corresponding target light source is reduced according to the single brightness adjustment value.

[0031] In one embodiment, the target endoscopic image is a multi-source virtual endoscopic image; acquiring the target endoscopic image includes:

[0032] Obtain the third pose relationship between different light sources, and based on the third pose relationship and the initial lighting model of each light source, establish the target lighting model among all light sources;

[0033] Based on the current brightness of the light source, the bronchial model, the second and third poses of the light source, and the target illumination model, a multi-light source virtual endoscopic image is generated.

[0034] In one embodiment, the method further includes:

[0035] Obtain a set of candidate poses for the endoscope lens in the bronchial model;

[0036] Obtain the target light source corresponding to each candidate pose in the candidate pose set. If there is no target region in the target endoscopic image corresponding to the candidate pose, determine the brightness of the target light source as the optimal brightness of the target light source under the candidate pose.

[0037] Obtain the target pose that is most similar to the current pose from the candidate pose set, and adjust the brightness of the target light source corresponding to the target pose according to the optimal brightness of the target light source corresponding to the target pose.

[0038] In one embodiment, obtaining a set of candidate poses of the endoscope lens in a bronchial model includes:

[0039] Multiple first candidate points are determined from the centerline of the bronchial model based on a first preset distance;

[0040] A bronchial model section perpendicular to the centerline is obtained for each first candidate point, and multiple second candidate points are determined on each bronchial model section based on a second preset distance;

[0041] Construct a cube centered on each second candidate point, and determine the points at preset positions within the cube as third candidate points;

[0042] All first candidate points, second candidate points, and third candidate points are identified as target candidate points. Based on the position data of the target candidate points and all possible poses of the endoscope lens at the target candidate points, a set of candidate poses is determined.

[0043] Secondly, this application also provides a brightness adjustment device, the device comprising:

[0044] The first acquisition module is used to acquire the target endoscopic image, divide the target endoscopic image into multiple regions based on the number of light sources, and determine the region that meets the image brightness characteristic condition as the first target region of the target endoscopic image. The target endoscopic image is a real endoscopic image or a multi-light source virtual endoscopic image.

[0045] The second acquisition module is used to acquire the corresponding single-light source virtual endoscope image for each light source, determine the influence value of the corresponding light source on the corresponding second target area based on the gray value of the pixel of each second target area in the single-light source virtual endoscope image, and adjust the brightness of the corresponding light source based on the influence value. The second target area is obtained by mapping the first target area.

[0046] Thirdly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements the steps of the methods in any of the above embodiments.

[0047] The aforementioned brightness adjustment method, apparatus, computer equipment, storage medium, and computer program product divide the acquired target endoscopic image into multiple regions and determine the target region from the divided regions based on image brightness characteristics. This accurately identifies regions in the target endoscopic image where brightness is abnormal, allowing brightness adjustment to be performed only on these abnormal regions, reducing the workload of adjusting the brightness of other light sources and improving brightness adjustment efficiency. Based on the grayscale value of each pixel in the target region of the corresponding single-light source virtual endoscopic image, the influence value of each light source on the target region is determined. This allows for different brightness adjustments to each light source based on the magnitude of its influence value on the target region, achieving optimal imaging quality for the endoscopic image, thereby improving the clarity of the field of vision during surgery and increasing the success rate of the surgery. Attached Figure Description

[0048] Figure 1 This is an application environment diagram of the brightness adjustment method in one embodiment;

[0049] Figure 2 This is a schematic diagram of an endoscope unit in one embodiment;

[0050] Figure 3 This is a flowchart illustrating a brightness adjustment method in one embodiment;

[0051] Figure 4 This is a schematic diagram of a target endoscopic image with abnormal exposure in one embodiment;

[0052] Figure 5 This is a schematic diagram of a target endoscopic image with abnormal contrast in one embodiment;

[0053] Figure 6 This is a flowchart illustrating a single-light-source virtual endoscopic image generation method in one embodiment;

[0054] Figure 7 This is a schematic diagram illustrating the mapping relationship between the positioning sensor and the electromagnetic positioning unit in one embodiment;

[0055] Figure 8 This is a schematic diagram illustrating the calculation principle of the second and third poses in one embodiment;

[0056] Figure 9 This is a schematic diagram of a spotlight model in one embodiment;

[0057] Figure 10 This is a schematic diagram of a bronchial model in one embodiment;

[0058] Figure 11 This is a schematic diagram of an endoscope unit equipped with four light sources in one embodiment;

[0059] Figure 12 Here is a histogram of influence values ​​from one embodiment;

[0060] Figure 13 This is a schematic diagram of an endoscope unit used to analyze a single brightness adjustment value in one embodiment;

[0061] Figure 14 This is a schematic diagram of a bronchial model used to determine a set of candidate poses in one embodiment;

[0062] Figure 15 This is a schematic diagram of the brightness adjustment system in another embodiment;

[0063] Figure 16 This is a structural block diagram of the brightness adjustment device in one embodiment;

[0064] Figure 17 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0065] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0066] The brightness adjustment method provided in this application embodiment can be applied to, for example... Figure 1 The application environment diagram shown includes an endoscope unit 102, a computing unit 104, and a positioning unit 106. (See diagram below.) Figure 2 As shown, the endoscope unit 102 includes an endoscope lens, a light source array, and an endoscope instrument channel. The endoscope lens is used to acquire endoscopic images of the actual bronchus. The light source array includes multiple light sources, the brightness of which can be adjusted individually. The light source array is used to provide illumination for the endoscope lens. The endoscope instrument channel is used to introduce tools and instruments during endoscopic examinations and surgeries. All light sources are rigidly connected, and the connection between the endoscope lens and the light source array is also rigid. The calculation unit 104 is connected to the endoscope unit 102 and the positioning unit 106. It is used to analyze the endoscopic images acquired by the endoscope unit 102, calculate the brightness of each light source, and output the calculated brightness of each light source to the endoscope unit 102. The positioning unit 106 includes at least one positioning sensor for transmitting its own pose to the calculation unit 104. The positioning unit 106 is rigidly connected to the endoscope unit 102.

[0067] In one embodiment, such as Figure 3 As shown, a brightness adjustment method is provided. Taking the application of this method to a computing unit as an example, the method includes the following steps:

[0068] S302. Obtain the target endoscopic image, divide the target endoscopic image into multiple regions based on the number of light sources, and determine the region that meets the image brightness characteristic condition as the first target region of the target endoscopic image. The target endoscopic image is a real endoscopic image or a multi-light source virtual endoscopic image.

[0069] Among them, the real endoscopic image is the image inside the real bronchus captured by the endoscope lens, and the multi-source virtual endoscopic image is a virtual endoscopic image corresponding to the real endoscopic image generated based on the mapping relationship between the real bronchus and the bronchus model, as well as the illumination model between all light sources. The multi-source virtual endoscopic image is used to reflect the brightness of all light sources in the real bronchus.

[0070] The shapes and areas of the multiple regions obtained by dividing the target endoscopic image can be the same or different. This application does not impose specific restrictions on this. The number of regions and the number of light sources can have a functional relationship. For example, the ratio between the number of regions and the number of light sources is 1.

[0071] After dividing the target endoscopic image into regions, mathematical statistical methods can be used to analyze the image quality of each region. Image quality can be measured by the brightness of each region. Image brightness feature conditions can be used to determine whether the brightness of each region is abnormal. If a region meets at least one of the image brightness feature conditions, it indicates that the brightness of that region is abnormal and needs to be adjusted. For example, if the exposure of a region is greater than the preset exposure in the image brightness feature conditions, it indicates that the region is overexposed and is identified as the first target region.

[0072] S304. Obtain the corresponding single-light source virtual endoscope image for each light source. Based on the grayscale value of the pixel in each second target region in the single-light source virtual endoscope image, determine the influence value of the corresponding light source on the corresponding second target region. Based on the influence value, adjust the brightness of the corresponding light source. The second target region is obtained by mapping the first target region.

[0073] Among them, the single-source virtual endoscope image is a virtual endoscope image generated based on the mapping relationship between the real bronchus and the bronchus model, as well as the illumination model of the corresponding light source, and is a virtual endoscope image corresponding to the real endoscope image. The single-source virtual endoscope image is used to reflect the brightness of a single light source in the real bronchus. Since both the single-source virtual endoscope image and the multi-source virtual endoscope image are virtual endoscope images corresponding to the real endoscope image, the region division result obtained by dividing the target endoscope image and the determined first target region can be mapped to the single-source virtual endoscope image accordingly.

[0074] The grayscale value of each pixel can be calculated from the channel values ​​of the three channels of the color information of each pixel. For example, the grayscale value Gray can be calculated using the following formula:

[0075] Gray=0.299*R+0.578*G+0.114*B

[0076] In the formula, R, G, and B are the channel values ​​corresponding to the red, green, and blue color information, respectively.

[0077] The influence value reflects the impact of each light source on the brightness of the second target area. A preset function can be used to process the grayscale values ​​of all pixels in each second target area of ​​the single-light source virtual endoscopic image into a single result value, which is then used as the influence value of the corresponding light source on the second target area. After determining the influence value, the brightness of each light source can be adjusted to different degrees based on the magnitude of the influence value. Alternatively, the influence values ​​can be filtered, and only the light sources corresponding to the filtered influence values ​​can have their brightness adjusted. This application embodiment does not specifically limit this approach.

[0078] In the aforementioned brightness adjustment method, the acquired target endoscopic image is divided into multiple regions, and the target region is determined from these regions based on image brightness characteristics. This accurately identifies regions in the target endoscopic image where brightness is abnormal, allowing for brightness adjustment only in these abnormal regions, reducing the workload of adjusting the brightness of other light sources and improving brightness adjustment efficiency. Based on the grayscale value of each pixel in the target region of the corresponding single-light source virtual endoscopic image, the influence value of each light source on the target region is determined. This allows for different brightness adjustments to each light source based on the magnitude of its influence value on the target region, achieving optimal imaging quality for the endoscopic image, thereby improving the clarity of the field of vision during surgery and increasing the success rate of the operation.

[0079] In one embodiment, the image brightness feature is the exposure state; determining the region that meets the image brightness feature condition as the first target region of the target endoscopic image includes: obtaining the percentage of first pixels in each region whose grayscale value is greater than a first grayscale threshold, and the percentage of second pixels in each region whose grayscale value is less than a second grayscale threshold; if the percentage of first pixels is greater than the percentage of second pixels and is greater than a first preset percentage, determining the exposure state of the corresponding region as overexposed; if the percentage of second pixels is greater than the percentage of first pixels and is greater than a second preset percentage, determining the exposure state of the corresponding region as underexposed; and determining the region with an overexposed or underexposed exposure state as the first target region.

[0080] Exposure status refers to the amount of light received by an image during shooting. Exposure status includes three conditions: overexposure, normal exposure, and underexposure. Overexposure means that the bright details of the image are overexposed, becoming too bright; underexposure means that the dark details of the image are over-darkened, becoming too dark. Exposure status can be determined based on the grayscale values ​​of all pixels in each region.

[0081] like Figure 4 As shown, when the proportion of the first pixel count is greater than the first preset proportion, or the proportion of the second pixel count is greater than the second preset proportion, it indicates that the brightness of the corresponding area is abnormal, and the exposure state is either overexposed or underexposed. It is necessary to adjust the brightness of the light source to improve the exposure state. However, the same area may simultaneously meet the above-mentioned overexposed and underexposed judgment conditions. In order to facilitate the adjustment of the light source brightness, only one exposure state can be determined for the same area in the same analysis process. This requires adding another judgment condition to determine the final exposure state of the above-mentioned area. The added judgment condition can be a comparison between the proportion of the first pixel count and the proportion of the second pixel count. The added judgment condition can also be other, and this application embodiment does not specifically limit it.

[0082] In this step, based on the grayscale values ​​of all pixels in each region, it is determined whether each region meets the criteria for overexposure and underexposure, thus determining whether the exposure state of the region is normal. By comparing the proportion of the first pixel corresponding to overexposure and the proportion of the second pixel corresponding to underexposure, the exposure state of the region can be accurately determined.

[0083] In one embodiment, the image brightness feature is contrast; determining the region that meets the image brightness feature condition as the first target region of the target endoscopic image includes: determining the region with contrast less than a first contrast threshold as a low contrast region, determining the region with contrast greater than a second contrast threshold as a high contrast region, and using the low contrast region and the high contrast region as the first target region.

[0084] Contrast ratio refers to the degree of brightness variation between adjacent pixels in each region. Too high a contrast ratio may result in an excessive contrast between the brightest and darkest parts of the image, leading to a loss of image details. Too low a contrast ratio may result in a lack of clear boundaries and subtle color variations in the image, leading to blurred image details.

[0085] Specifically, such as Figure 5 As shown, a histogram can be used to analyze the contrast of each region. Regions in the target endoscopic image with contrast greater than the second contrast threshold, between the first and second contrast thresholds, and less than the first contrast threshold are placed in different rectangles of the histogram, thereby determining the contrast of all regions in the target endoscopic image.

[0086] In this step, areas with abnormal brightness in the target endoscopic image are identified from the perspective of contrast. Areas with excessively large or small differences in brightness between light and dark parts can be screened out and their brightness adjusted, thereby improving the clarity of the field of vision during the operation and increasing the success rate of the operation.

[0087] In one embodiment, such as Figure 6 As shown, the corresponding single-light source virtual endoscopic image for each light source is obtained, including:

[0088] S602, obtain the first pose relationship between the positioning sensor and each light source, the second pose relationship between the positioning sensor and the endoscope lens, the mapping relationship between the real bronchus and the bronchus model, and the first pose of the positioning sensor in the real bronchus.

[0089] Among them, pose includes position and posture. There can be multiple postures at the same position. The pose relationship can be represented by a matrix. The mapping relationship represents the coordinate correspondence between the real bronchus and the bronchial model in their respective coordinate systems. The bronchial model is a three-dimensional model constructed based on the structural data of the real bronchus and the mapping relationship.

[0090] The computing unit can directly obtain the first pose from the positioning sensor, or it can obtain the first pose after transformation, for example, Figure 7 As shown, based on the corresponding mapping relationship between the positioning sensor and the electromagnetic positioning unit in their respective coordinate systems, the electromagnetic positioning unit can convert the first pose of the positioning sensor into the pose of the electromagnetic positioning unit, and the calculation unit can obtain the converted pose of the electromagnetic positioning unit.

[0091] S604. Based on the first pose, the relationship between the first pose and the mapping relationship, calculate the second pose of each light source in the bronchial model, and based on the relationship between the first pose, the second pose and the mapping relationship, calculate the third pose of the endoscope lens in the bronchial model.

[0092] Specifically, since the positioning sensor and the endoscope unit are rigidly connected, the computing unit only needs to obtain the first pose of the positioning sensor to obtain the pose of each light source and the endoscope lens within the real bronchus based on the first pose relationship and the second pose relationship. Then, based on the mapping relationship between the real bronchus and the bronchus model, the second pose of each light source and the third pose of the endoscope lens can be obtained. The calculation principles of the second and third poses are as follows: Figure 8 As shown, the calculation formulas for the second pose and the third pose are as follows:

[0093] Pli = Li -1 *Ps*M

[0094] Pc = C -1*Ps*M

[0095] In the formula, Pli is the second pose of each light source, Pc is the third pose of the endoscope lens, Li is the first pose relationship, C is the second pose relationship, Ps is the first pose, and M is the mapping relationship between the real bronchus and the bronchial model.

[0096] S606. Obtain the current brightness of each light source, and based on the current brightness of the light source, the bronchus model, the second pose and the third pose of the light source, and the initial illumination model of the light source, generate a corresponding single-light source virtual endoscopic image of the light source.

[0097] The initial illumination model represents the variation in light intensity for each light source, and this model can be selected and set according to surgical needs. For example... Figure 9 As shown, Figure 9 This is a schematic diagram of a spotlight model. In the spotlight model, the light intensity varies with the direction and distance of the light. The illumination range of the spotlight model includes a first cone area and a second cone area. The light intensity is strongest within the first cone area, followed by the second cone area, and the light intensity outside the second cone area is 0. The spotlight model is shown in the following equation:

[0098] Clight=Clight0*Fdist(d)*Fdir(α)

[0099] In the formula, Clight is the total illumination intensity of the spotlight model, Clight0 is the illumination intensity within the first cone, d is the distance between the light source and the illuminated object, Fdist(d) is the illumination intensity attenuation value obtained from d, α is the actual illumination angle, and Fdir(α) is the illumination intensity attenuation value obtained from angle α.

[0100] Specifically, such as Figure 10 As shown, after determining the second pose of each light source and the third pose of the endoscope lens, the pose of the endoscope unit within the real bronchus can be simulated within the bronchial model. Furthermore, based on the current brightness and initial illumination model of each light source, the illumination of each light source within the real bronchus can be simulated within the bronchial model. Thus, based on the illumination conditions, a single-light source virtual endoscopic image can be generated for each pose of the endoscope unit, such as... Figure 11 As shown, Figure 11 An endoscope unit is equipped with four light sources, each corresponding to a single-light source virtual endoscopic image.

[0101] In this step, for each pose of the endoscope unit, a single-light source virtual endoscope image is obtained for each light source. This allows us to analyze the impact of each light source on the target area with abnormal brightness based on the single-light source virtual endoscope image, and thus make different brightness adjustments for each light source.

[0102] In one embodiment, determining the influence value of a corresponding light source on a corresponding second target region based on the grayscale values ​​of all pixels in each second target region in a single-light source virtual endoscopic image includes: calculating the average grayscale value of the second target region based on the number of pixels in each second target region and the grayscale value of each pixel, and using the average grayscale value as the influence value of the light source on the second target region.

[0103] Specifically, firstly, the sum of gray values ​​of all pixels in each target region in a single-light source virtual endoscopic image is calculated. Then, the quotient of the sum of gray values ​​and the number of pixels in the target region is determined as the influence value of the corresponding light source on the target region. The formula for calculating the influence value is as follows:

[0104] GrayA = ∑Gray / Cnt

[0105] In the formula, GrayA is the average gray value of the target area, i.e., the influence value, Gray is the gray value of each pixel in the target area, and Cnt is the number of pixels in the target area.

[0106] In this step, for each light source, the average gray value of each target area is used as the influence value of the light source on the target area in the corresponding single-light source virtual endoscopic image. Determining the average gray value as the influence value can more accurately reflect the influence of each light source on the brightness of the target area.

[0107] In one embodiment, adjusting the brightness of a corresponding light source based on its influence value includes: for a second target region where different light sources are in the same relative position, determining a target light source from among the light sources based on the influence value of each light source on the corresponding second target region; determining a single brightness adjustment value for the target light source based on the influence value of the target light source on the corresponding second target region; and adjusting the brightness of the target light source based on the image brightness characteristics and brightness adjustment value of the target light source on the corresponding second target region.

[0108] In this embodiment, an influence value range can be determined based on the historical influence of each light source on the brightness of the endoscopic image. All light sources with influence values ​​within the influence value range can be identified as target light sources. Alternatively, a preset number of target light sources can be determined first, and then a preset number of light sources can be selected from all light sources with influence values ​​within the influence value range as target light sources. This application does not impose specific limitations on this.

[0109] Based on the influence value of each target light source and surgical experience, different single brightness adjustment values ​​can be set for each target light source. Alternatively, the same single brightness adjustment value can be set for all target light sources based on the actual situation. Or, the maximum brightness value of each light source can be divided into multiple parts, and one part can be used as the single brightness adjustment value for the corresponding light source. This application does not specifically limit the method for determining the single brightness adjustment value.

[0110] Specifically, the brightness of the second target area can be determined based on the image brightness characteristics of the second target area, and the brightness of each light source can be adjusted using a single brightness adjustment value based on the brightness characteristics.

[0111] In this step, the brightness of each light source is adjusted based on the image brightness characteristics of the second target region and the brightness adjustment value of each light source, so that the adjustment process is more in line with the actual brightness requirements of the endoscopic image and can ensure the smooth progress of the surgery.

[0112] In one embodiment, for a second target area where different light sources are in the same relative position, a target light source is determined from the light sources based on the influence value of each light source on the corresponding second target area. This includes: for the second target area, sorting the influence values ​​of the corresponding light sources in descending order, and determining the light sources corresponding to the first preset number of influence values ​​as the target light sources for the second target area.

[0113] The preset number is determined based on the historical impact of each light source on the brightness of the endoscopic image. Light sources with influence values ​​after the preset number have a small impact on the brightness of the target area, or even a negligible impact. Therefore, the light sources with influence values ​​in the first preset number are determined as the target light sources.

[0114] Mathematical statistical methods can be used to analyze all influencing values ​​to determine the target light source. For example, Figure 12 As shown, the influence values ​​of all light sources are placed in different bars of the histogram. The influence values ​​of the bars with the highest heights are determined as the target influence values, and the light sources corresponding to the target influence values ​​are determined as the target light sources.

[0115] In this step, the light source that has a greater impact on the second target area is identified as the target light source. The brightness of the target light source is adjusted only. This can improve the brightness adjustment efficiency, reduce the workload, and will not affect the brightness adjustment results of the endoscopic image.

[0116] In one embodiment, determining a single brightness adjustment value for a target light source based on the influence value of the target light source on the corresponding second target area includes: determining a preset brightness adjustment value for the target light source based on the maximum brightness value of the target light source and a preset number of brightness adjustment segments; calculating the total influence value of all target light sources corresponding to the second target area; and determining a single brightness adjustment value for the target light source based on the preset brightness adjustment value, the influence value of each target light source, and the total influence value.

[0117] Specifically, the preset number of brightness adjustment segments can be determined according to the actual situation. Based on the preset number of brightness adjustment segments, the maximum brightness value of the corresponding target light source can be divided into multiple parts, one of which is the preset brightness adjustment value of the target light source. The sum of the influence values ​​of all target light sources is determined as the total influence value of the corresponding second target area. For example, Figure 13 As shown, there are four target light sources corresponding to a certain second target area. The influence values ​​of these four target light sources, from largest to smallest, are I1, I2, I3, and I4. Therefore, the total influence value of the second target area is II = I1 + I2 + I3 + I4. If the maximum brightness value and the preset brightness adjustment value of these four target light sources are the same, namely M and N, then the preset brightness adjustment value of each target light source is S = M / N. Therefore, the single brightness adjustment value of each target light source is S*I1 / II, S*I2 / II, S*I3 / II, and S*I4, respectively.

[0118] In this step, based on the maximum brightness, influence value, and preset brightness adjustment segment number of each target light source, the single brightness adjustment value of each target light source is determined. The single brightness adjustment value determined in this way better meets the brightness adjustment needs of each second target area.

[0119] In one embodiment, the image brightness features include exposure state and / or contrast; adjusting the brightness of the target light source based on the image brightness features of the corresponding second target region and the single brightness adjustment value of the target light source includes: if the exposure state of the second target region is overexposed or the second target region is a high-contrast region, then increasing the brightness of the corresponding target light source according to the single brightness adjustment value; if the exposure state of the second target region is underexposed or the second target region is a low-contrast region, then decreasing the brightness of the corresponding target light source according to the single brightness adjustment value.

[0120] Specifically, after determining the brightness anomaly of the second target region based on the image brightness characteristics, the brightness of the corresponding target light source is adjusted according to the single brightness adjustment value. After the brightness adjustment of all second target regions in all single-light source virtual endoscope images corresponding to the target endoscope image is completed, it is determined whether there is still a first target region with abnormal brightness in the target endoscope image. If so, the brightness of the light source is readjusted according to the method in this application until there is no first target region in the target endoscope image.

[0121] In this step, the brightness of the target light source is adjusted in different directions based on the image brightness characteristics. After the brightness adjustment, the brightness of the target endoscopic image is judged to determine whether it is abnormal. This ensures that the adjusted target endoscopic image is in a normal brightness state, which is beneficial to the normal progress of the surgery.

[0122] In one embodiment, the target endoscopic image is a multi-source virtual endoscopic image; acquiring the target endoscopic image includes: acquiring the third pose relationship between different light sources; establishing a target illumination model among all light sources based on the third pose relationship and the initial illumination model of each light source; and generating a multi-source virtual endoscopic image based on the current brightness of the light source, the bronchus model, the second pose and the third pose of the light source, and the target illumination model.

[0123] The target illumination model represents the common light intensity change of all light sources. By constructing a multi-source virtual endoscopic image, the illumination of all light sources in the real bronchus can be realistically reflected. Therefore, the multi-source virtual endoscopic image can be used to replace the real endoscopic image for brightness analysis.

[0124] In this step, based on the current brightness of all light sources, the initial lighting model, and the third pose relationship between different light sources, a multi-light source virtual endoscopic image is generated, so that the brightness of the multi-light source virtual endoscopic image is more consistent with the brightness of the real endoscopic image.

[0125] In one embodiment, the method further includes: obtaining a set of candidate poses for the endoscope lens in a bronchial model; obtaining a target light source corresponding to each candidate pose in the candidate pose set; and determining the brightness of the target light source as the optimal brightness of the target light source under the candidate pose when there is no target region in the target endoscopic image corresponding to the candidate pose; obtaining the target pose most similar to the current pose in the candidate pose set, and adjusting the brightness of the target light source corresponding to the target pose according to the optimal brightness of the target light source corresponding to the target pose.

[0126] The candidate pose set includes all possible positions and orientations of the endoscope lens in the bronchial model. According to the aforementioned method, the influence values ​​of all light sources on each target area are obtained when the endoscope lens is in each candidate pose. Based on the influence values, the target light source corresponding to each target area is obtained, and the target light sources of all target areas corresponding to each candidate pose are determined as the target light sources corresponding to that candidate pose.

[0127] Specifically, the current pose of the endoscope lens is compared with a set of candidate poses. The candidate pose that is closest to the current pose and has the most similar posture can be directly determined as the target pose. Alternatively, each candidate pose and the current pose can be input into a preset similarity function to obtain a function value. The target pose is then determined from all candidate poses based on the magnitude of the function value. This application embodiment does not specifically limit the method for determining the target pose. After determining the target pose, all target light sources corresponding to the target pose are adjusted to their optimal brightness.

[0128] In this step, the brightness of the target light source corresponding to the target pose most similar to the current pose is directly adjusted to improve the brightness of the real endoscopic image under the current pose. This ensures the accuracy of brightness adjustment and reduces the analysis process.

[0129] In one embodiment, obtaining a set of candidate poses for the endoscope lens in the bronchial model includes: determining multiple first candidate points along the centerline of the bronchial model based on a first preset distance; obtaining a bronchial model section passing through each first candidate point and perpendicular to the centerline, and determining multiple second candidate points on each bronchial model section based on a second preset distance; constructing a cube centered on each second candidate point, and determining points at preset positions within the cube as third candidate points; determining all first, second, and third candidate points as target candidate points, and determining the set of candidate poses based on the position data of the target candidate points and all possible poses of the endoscope lens at the target candidate points.

[0130] Specifically, such as Figure 14 As shown, bronchial centerline data, i.e. bronchial model skeleton data, is obtained. The centerline data is sampled at a distance interval Δl to obtain K points. For each of the K points, the cross-section of the centerline at that point is sampled at a distance interval Δd to obtain M points. For each of the M points on the cross-section, a cube is constructed with that point as the center, and A points are obtained at preset positions on the cube. For example, the preset positions can be the center points of all vertices, all edges, and the face. Finally, K*M*A target candidate points are determined.

[0131] In this step, target candidate points are obtained from multiple dimensions such as lines, surfaces, and volumes in the bronchial model, making the obtained target candidate points more comprehensive, thereby improving the accuracy of subsequent brightness adjustment.

[0132] In one embodiment, another brightness adjustment method is provided, the system diagram of which is shown below. Figure 15 As shown, the method includes the following:

[0133] (1) Obtain the mapping relationship Li from the positioning sensor to each light source and the mapping relationship C from the positioning sensor to the endoscope lens. Based on the actual light source distribution of the endoscope, establish the illumination model Lm between all light sources, obtain the patient bronchus model Model, and the mapping relationship M between the patient's real bronchus and the patient bronchus model.

[0134] The pose information Ps of the positioning sensor is collected in real time. Based on Ps, Li and M, the pose Pli of each light source in the bronchial model is calculated. Based on Ps, C and M, the pose Pc of the endoscope lens in the bronchial model is calculated.

[0135] (2) Real-time acquisition of real endoscopic images, dividing the image into n regions according to the number of light sources, judging whether the region has problems such as overexposure, underexposure, excessive contrast, or insufficient contrast based on various information of the image, and recording the problem region as P. For the problem region P, for each light source, the light source brightness Lu is acquired in real time. Using data such as Model, Lu, Pli, Pc, and Lm, a virtual endoscopic image is generated. Based on various information of the image, the influence value I of each light source on the problem region P is obtained.

[0136] (3) Adjust the brightness of each of the m light sources one by one according to a certain method until the brightness of the image meets the requirements.

[0137] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0138] Based on the same inventive concept, this application also provides a brightness adjustment device for implementing the brightness adjustment method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more brightness adjustment device embodiments provided below can be found in the limitations of the brightness adjustment method described above, and will not be repeated here.

[0139] In one embodiment, such as Figure 16 As shown, a brightness adjustment device 1600 is provided, including: a first acquisition module 1601 and a second acquisition module 1602, wherein:

[0140] The first acquisition module 1601 is used to acquire the target endoscopic image, divide the target endoscopic image into multiple regions based on the number of light sources, and determine the region that meets the image brightness characteristic condition as the first target region of the target endoscopic image. The target endoscopic image is a real endoscopic image or a multi-light source virtual endoscopic image.

[0141] The second acquisition module 1602 is used to acquire the corresponding single-light source virtual endoscope image for each light source, determine the influence value of the corresponding light source on the corresponding second target area based on the gray value of the pixel of each second target area in the single-light source virtual endoscope image, and adjust the brightness of the corresponding light source based on the influence value. The second target area is obtained by mapping the first target area.

[0142] In some embodiments, the first acquisition module 1601 is further configured to: acquire the percentage of first pixels in each region whose grayscale value is greater than a first grayscale threshold and the percentage of second pixels in each region whose grayscale value is less than a second grayscale threshold; determine that the exposure state of the corresponding region is overexposed when the percentage of first pixels is greater than the percentage of second pixels and is greater than a first preset percentage; determine that the exposure state of the corresponding region is underexposed when the percentage of second pixels is greater than the percentage of first pixels and is greater than a second preset percentage; and determine the region whose exposure state is overexposed or underexposed as the target region.

[0143] In some embodiments, the first acquisition module 1601 is further configured to: determine regions with contrast less than a first contrast threshold as low contrast regions, determine regions with contrast greater than a second contrast threshold as high contrast regions, and use the low contrast regions and high contrast regions as target regions.

[0144] In some embodiments, the second acquisition module 1602 is further configured to: acquire the first pose relationship between the positioning sensor and each light source, the second pose relationship between the positioning sensor and the endoscope lens, the mapping relationship between the real bronchus and the bronchus model, and the first pose of the positioning sensor in the real bronchus; calculate the second pose of each light source in the bronchus model based on the first pose, the first pose relationship, and the mapping relationship, and calculate the third pose of the endoscope lens in the bronchus model based on the first pose, the second pose relationship, and the mapping relationship; acquire the current brightness of each light source, and generate a corresponding single-light source virtual endoscopic image based on the current brightness of the light source, the bronchus model, the second pose and the third pose of the light source, and the initial illumination model of the light source.

[0145] In some embodiments, the second acquisition module 1602 is further configured to: calculate the average gray value of the second target region based on the number of pixels in each second target region and the gray value of each pixel, and use the average gray value as the influence value of the light source on the second target region.

[0146] In some embodiments, the second acquisition module 1602 includes:

[0147] The first determining unit is used to determine the target light source from each light source based on the influence value of each light source on the corresponding second target region for a second target region where the relative positions of different light sources are the same.

[0148] The second determining unit is used to determine the single brightness adjustment value for the target light source based on the influence value of the target light source on the corresponding second target area.

[0149] The adjustment unit is used to adjust the brightness of the target light source based on the image brightness characteristics and brightness adjustment value of the corresponding second target area.

[0150] In some embodiments, the first determining unit is further configured to: sort the influence values ​​of the corresponding light sources in descending order for the second target area, and determine the light sources corresponding to the first preset number of influence values ​​as the corresponding target light sources for the second target area.

[0151] In some embodiments, the second determining unit is further configured to: determine a preset brightness adjustment value for the target light source based on the maximum brightness value of the target light source and the preset brightness adjustment segment number; calculate the total influence value of all target light sources corresponding to the second target area; and determine a single brightness adjustment value for the target light source based on the preset brightness adjustment value, the influence value of each target light source, and the total influence value.

[0152] In some embodiments, the adjustment unit is further configured to: if the exposure state of the second target area is overexposed or the second target area is a high-contrast area, increase the brightness of the corresponding target light source according to the single brightness adjustment value; if the exposure state of the second target area is underexposed or the second target area is a low-contrast area, decrease the brightness of the corresponding target light source according to the single brightness adjustment value.

[0153] In some embodiments, the first acquisition module 1601 is further configured to: acquire the third pose relationship between different light sources; establish a target illumination model among all light sources based on the third pose relationship and the initial illumination model of each light source; and generate a multi-light source virtual endoscopic image based on the current brightness of the light source, the bronchus model, the second pose and the third pose of the light source, and the target illumination model.

[0154] In some embodiments, the brightness adjustment device 1600 further includes:

[0155] The third acquisition module is used to acquire a set of candidate poses of the endoscope lens in the bronchial model.

[0156] The fourth acquisition module is used to acquire the target light source corresponding to each candidate pose in the candidate pose set. If there is no target area in the target endoscopic image corresponding to the candidate pose, the brightness of the target light source is determined as the optimal brightness of the target light source under the candidate pose.

[0157] The fifth acquisition module is used to acquire the target pose that is most similar to the current pose from the candidate pose set, and adjust the brightness of the target light source corresponding to the target pose according to the optimal brightness of the target light source corresponding to the target pose.

[0158] In some embodiments, the third acquisition module is further configured to: determine multiple first candidate points from the centerline of the bronchial model based on a first preset distance; acquire a bronchial model section passing through each first candidate point and perpendicular to the centerline, and determine multiple second candidate points on each bronchial model section based on a second preset distance; construct a cube with each second candidate point as the center, and determine the points at preset positions in the cube as third candidate points; determine all first candidate points, second candidate points, and third candidate points as target candidate points, and determine a set of candidate poses based on the position data of the target candidate points and all possible poses of the endoscope lens at the target candidate points.

[0159] Each module in the aforementioned brightness adjustment device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0160] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 17As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores brightness data. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When executed by the processor, the computer program implements a brightness adjustment method.

[0161] Those skilled in the art will understand that Figure 17 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0162] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.

[0163] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data shall comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0164] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0165] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0166] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A brightness adjustment method, characterized in that, The method includes: Acquire a target endoscopic image, divide the target endoscopic image into multiple regions based on the number of light sources, and determine the region that meets the image brightness characteristic condition as the first target region of the target endoscopic image. The target endoscopic image is a real endoscopic image or a multi-light source virtual endoscopic image. Acquire a single-light source virtual endoscope image corresponding to each light source. Based on the grayscale value of the pixels of each second target region in the single-light source virtual endoscope image, determine the influence value of the corresponding light source on the corresponding second target region. Based on the influence value, adjust the brightness of the corresponding light source. The second target region is obtained by mapping the first target region. The step of acquiring the corresponding single-light source virtual endoscopic image for each light source includes: The first pose relationship between the positioning sensor and each light source, the second pose relationship between the positioning sensor and the endoscope lens, the mapping relationship between the real bronchus and the bronchus model, and the first pose of the positioning sensor in the real bronchus are obtained. Based on the first pose, the first pose relationship, and the mapping relationship, calculate the second pose of each light source in the bronchial model, and based on the first pose, the second pose relationship, and the mapping relationship, calculate the third pose of the endoscope lens in the bronchial model. The current brightness of each light source is obtained, and based on the current brightness of the light source, the bronchus model, the second pose of the light source, the third pose of the light source, and the initial illumination model of the light source, a corresponding single-light source virtual endoscopic image of the light source is generated.

2. The method according to claim 1, characterized in that, The image brightness feature is the exposure state; the region that satisfies the image brightness feature condition is determined as the first target region of the target endoscopic image, including: Obtain the percentage of first pixels in each region whose grayscale value is greater than the first grayscale threshold, and the percentage of second pixels in each region whose grayscale value is less than the second grayscale threshold; If the proportion of the first pixel count is greater than the proportion of the second pixel count, and is also greater than the first preset proportion, the exposure status of the corresponding area is determined to be overexposed. If the proportion of the second pixel count is greater than the proportion of the first pixel count and also greater than the second preset proportion, the exposure status of the corresponding area is determined to be underexposed. The region where the exposure is overexposed or underexposed is defined as the first target region; and / or, the image brightness feature is contrast; the determination of the region that meets the image brightness feature condition as the first target region of the target endoscopic image includes: Regions with contrast less than a first contrast threshold are defined as low-contrast regions, and regions with contrast greater than a second contrast threshold are defined as high-contrast regions. The low-contrast regions and high-contrast regions are used as the first target regions.

3. The method according to claim 1, characterized in that, The determination of the influence value of the corresponding light source on the corresponding second target region based on the grayscale values ​​of all pixels in each second target region of the single-light source virtual endoscopic image includes: Based on the number of pixels in each second target region and the grayscale value of each pixel, the average grayscale value of the second target region is calculated, and the average grayscale value is used as the influence value of the light source on the second target region.

4. The method according to claim 1, characterized in that, Adjusting the brightness of the corresponding light source based on the influence value includes: For a second target region where different light sources are in the same relative position, the target light source is determined from among the light sources based on the influence value of each light source on the corresponding second target region. Based on the influence value of the target light source on the corresponding second target area, determine the single brightness adjustment value for the target light source; The brightness of the target light source is adjusted based on the image brightness characteristics of the corresponding second target area and the single brightness adjustment value of the target light source.

5. The method according to claim 4, characterized in that, For the second target region where different light sources are in the same relative position, the target light source is determined from the light sources based on the influence value of each light source on the corresponding second target region, including: For the second target area, the influence values ​​of the corresponding light sources are sorted in descending order, and the light sources corresponding to the first preset number of influence values ​​are determined as the target light sources for the second target area.

6. The method according to claim 4, characterized in that, The step of determining a single brightness adjustment value for the target light source based on the influence value of the target light source on the corresponding second target area includes: Based on the maximum brightness of the target light source and the preset brightness adjustment segment, determine the preset brightness adjustment value of the target light source; Calculate the total influence value of all target light sources corresponding to the second target area, and determine the single brightness adjustment value of the target light source based on the preset brightness adjustment value, the influence value of each target light source, and the total influence value.

7. The method according to claim 4, characterized in that, The image brightness features include exposure state and / or contrast; adjusting the brightness of the target light source based on the image brightness features of the corresponding second target region and the single brightness adjustment value includes: If the exposure state of the second target area is overexposed or the second target area is a high-contrast area, then the brightness of the corresponding target light source is reduced according to the brightness single adjustment value. If the exposure state of the second target area is underexposed or the second target area is a low contrast area, then the brightness of the corresponding target light source is increased according to the brightness single adjustment value.

8. The method according to claim 1, characterized in that, The target endoscopic image is a multi-source virtual endoscopic image; acquiring the target endoscopic image includes: Obtain the third pose relationship between different light sources, and based on the third pose relationship and the initial lighting model of each light source, establish the target lighting model among all light sources; Based on the current brightness of the light source, the bronchus model, the second pose of the light source, the third pose of the light source, and the target illumination model, a multi-light source virtual endoscopic image is generated.

9. The method according to claim 4, characterized in that, The method further includes: Obtain the candidate pose set of the endoscope lens in the bronchial model; Obtain the target light source corresponding to each candidate pose in the candidate pose set. If the target region does not exist in the target endoscopic image corresponding to the candidate pose, determine the brightness of the target light source as the optimal brightness of the target light source under the candidate pose. The target pose that is most similar to the current pose is obtained from the candidate pose set, and the brightness of the target light source corresponding to the target pose is adjusted according to the optimal brightness of the target light source corresponding to the target pose.

10. The method according to claim 9, characterized in that, The step of obtaining the candidate pose set of the endoscope lens in the bronchial model includes: Multiple first candidate points are determined from the centerline of the bronchial model based on a first preset distance; A bronchial model section that passes through each first candidate point and is perpendicular to the centerline is obtained, and multiple second candidate points are determined on each bronchial model section based on a second preset distance; A cube is constructed with each second candidate point as the center, and the points at preset positions in the cube are determined as third candidate points; All first candidate points, second candidate points, and third candidate points are identified as target candidate points, and the candidate pose set is determined based on the position data of the target candidate points and all possible poses of the endoscope lens at the target candidate points.

11. The method according to claim 9, characterized in that, The step of obtaining the target light source corresponding to each candidate pose in the candidate pose set includes: Obtain the influence values ​​of all light sources on each target area when the endoscope lens is in each candidate pose; Based on the influence value, the target light source corresponding to each target region is obtained, and the target light sources of all target regions corresponding to each candidate pose in the candidate pose set are determined as the target light sources corresponding to the candidate pose.

12. A brightness adjustment device, characterized in that, The device includes: The first acquisition module is used to acquire a target endoscopic image, divide the target endoscopic image into multiple regions based on the number of light sources, and determine the region that meets the image brightness characteristic condition as the first target region of the target endoscopic image. The target endoscopic image is a real endoscopic image or a multi-light source virtual endoscopic image. The second acquisition module is used to acquire the corresponding single-light source virtual endoscope image for each light source, determine the influence value of the corresponding light source on the corresponding second target area based on the gray value of the pixel of each second target area in the single-light source virtual endoscope image, and adjust the brightness of the corresponding light source based on the influence value. The second target area is obtained by mapping the first target area. The second acquisition module is further configured to acquire the first pose relationship between the positioning sensor and each light source, the second pose relationship between the positioning sensor and the endoscope lens, the mapping relationship between the real bronchus and the bronchus model, and the first pose of the positioning sensor in the real bronchus; calculate the second pose of each light source in the bronchus model based on the first pose, the first pose relationship, and the mapping relationship, and calculate the third pose of the endoscope lens in the bronchus model based on the first pose, the second pose relationship, and the mapping relationship; acquire the current brightness of each light source, and generate a corresponding single-light source virtual endoscopic image based on the current brightness of the light source, the bronchus model, the second pose of the light source, the third pose of the light source, and the initial illumination model of the light source.

Citation Information

Patent Citations

  • Light source brightness adjusting method and device, electronic equipment and storage medium

    CN114170169A