CN116862810A - Brightness adjusting method and device - Google Patents

Brightness adjusting method and device Download PDF

Info

Publication number
CN116862810A
CN116862810A CN202310935269.8A CN202310935269A CN116862810A CN 116862810 A CN116862810 A CN 116862810A CN 202310935269 A CN202310935269 A CN 202310935269A CN 116862810 A CN116862810 A CN 116862810A
Authority
CN
China
Prior art keywords
target
light source
brightness
pose
endoscopic image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310935269.8A
Other languages
Chinese (zh)
Inventor
马菁阳
请求不公布姓名
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Microport Medbot Group Co Ltd
Original Assignee
Shanghai Microport Medbot Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Microport Medbot Group Co Ltd filed Critical Shanghai Microport Medbot Group Co Ltd
Priority to CN202310935269.8A priority Critical patent/CN116862810A/en
Publication of CN116862810A publication Critical patent/CN116862810A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10068Endoscopic image

Landscapes

  • Endoscopes (AREA)

Abstract

The present application relates to a brightness adjustment method, an apparatus, a computer device, a storage medium and a computer program product. The method comprises the following steps: the method comprises the steps of obtaining a target endoscopic image, dividing the target endoscopic image into a plurality of areas based on the number of light sources, determining the areas meeting the characteristic conditions of the brightness of the images as a first target area of the target endoscopic image, obtaining 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 area based on the gray value of pixels of each second target area in the single-light-source virtual endoscopic image, and adjusting the brightness of the corresponding light source based on the influence value, wherein the second target area is mapped by the first target area. The method provided by the application can reduce the workload of adjusting the brightness of the light sources, improve the brightness adjusting efficiency, and adjust the brightness of each light source differently so as to ensure that the endoscopic image achieves the optimal imaging quality, thereby improving the visual field definition in the operation process.

Description

Brightness adjusting method and device
Technical Field
The application relates to the technical field of endoscopes, in particular to a brightness adjusting method and device.
Background
Because the bronchus is a tree-shaped bifurcation cavity, and the diameter of the bronchus from the head to the lower part is from thick to thin, when the endoscope moves in the bronchus, the brightness of an endoscopic image is abnormal due to the change of the distance between a lens and the wall of the front bronchus and the change of the diameter of the bronchus, and the brightness of an endoscope light source needs to be adjusted in real time.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a brightness adjustment method, apparatus, computer device, computer-readable storage medium, and computer program product that are capable of independently adjusting the brightness of each endoscope light source.
In a first aspect, the present application provides a brightness adjustment method, the method comprising:
acquiring a target endoscopic image, dividing the target endoscopic image into a plurality of areas based on the number of light sources, and determining the area meeting the brightness characteristic condition of the image as a first target area of the target endoscopic image, wherein the target endoscopic image is a real endoscopic image or a multi-light source virtual endoscopic image;
acquiring a single-light-source virtual endoscopic image corresponding to each light source, determining an influence value of the corresponding light source on the corresponding second target area based on the gray value of pixels of each second target area in the single-light-source virtual endoscopic image, and adjusting the brightness of the corresponding light source based on the influence value, wherein the second target area is mapped by the first target area.
In one embodiment, the image brightness feature is an exposure state; determining an area meeting the image brightness characteristic condition as a first target area of the target endoscopic image, wherein the first target area comprises:
acquiring a first pixel quantity ratio of pixels with gray values larger than a first gray threshold value in each region in the corresponding region and a second pixel quantity ratio of pixels with gray values smaller than a second gray threshold value in the corresponding region;
determining that the exposure state of the corresponding area is overexposure under the condition that the first pixel quantity ratio is larger than the second pixel quantity ratio and larger than a first preset ratio;
determining the exposure state of the corresponding area as underexposure under the condition that the second pixel number ratio is larger than the first pixel number ratio and larger than a second preset ratio;
determining a region with the exposure state being overexposed or underexposed as a first target region; and/or the image brightness characteristic is contrast; determining an area meeting the image brightness characteristic condition as a first target area of the target endoscopic image, wherein the first target area comprises:
the region with the contrast smaller than the first contrast threshold is determined as a low-contrast region, the region with the contrast larger than the second contrast threshold is determined as a high-contrast region, and the low-contrast region and the high-contrast region are determined as a first target region.
In one embodiment, obtaining a single-light-source virtual endoscopic image corresponding to each light source includes:
acquiring a first pose relation between a positioning sensor and each light source, a second pose relation between the positioning sensor and an endoscope lens, a mapping relation between a real bronchus and a bronchus model, and a first pose of the positioning sensor in the real bronchus;
calculating a second pose of each light source in the bronchial model based on the first pose, the first pose relation and the mapping relation, and calculating a third pose of the endoscope lens in the bronchial model based on the first pose, the second pose relation and the mapping relation;
the current brightness of each light source is obtained, and a single-light-source virtual endoscopic image corresponding to the light source is generated 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.
In one embodiment, determining the impact value of the respective light source on the respective second target area based on the gray values of all pixels of each second target area in the single light source virtual endoscopic image comprises:
and calculating a gray average value of the second target area based on the number of pixels of each second target area and the gray value of each pixel, and taking the gray average value as an influence value of the light source on the second target area.
In one embodiment, adjusting the brightness of the respective light source based on the impact value comprises:
determining target light sources from the light sources based on the influence values of the light sources on the corresponding second target areas aiming at the second target areas with the same relative positions among different light sources;
determining a brightness single adjustment value for the target light source based on the influence value of the target light source on the corresponding second target area;
and adjusting the brightness of the target light source based on the image brightness characteristic and the brightness single-time adjustment value of the target light source to the corresponding second target area.
In one embodiment, for a second target area where the relative positions between different light sources are the same, determining a target light source from the light sources based on the influence value of each light source on the corresponding second target area includes:
and sequencing the influence values of the corresponding light sources according to the sequence from large to small for the second target area, and determining the light sources corresponding to the preset number of influence values as the corresponding target light sources of the second target area.
In one embodiment, determining the luminance single adjustment value for the target light source based on the impact value of the target light source on the respective second target region comprises:
Determining a preset brightness adjustment value of the target light source based on the brightness maximum value of the target light source and the preset brightness adjustment section number;
and calculating the total influence value of all the target light sources corresponding to the second target area, and determining the brightness single-time adjustment value of the target light sources based on the preset brightness adjustment value, the influence value of each target light source and the total influence value.
In one embodiment, the image brightness features include exposure status and/or contrast; adjusting the brightness of the target light source based on the image brightness characteristic and the brightness single-time adjustment value of the target light source to the corresponding second target area, comprising:
if the exposure state of the second target area is overexposure or the second target area is a high contrast area, increasing the brightness of the corresponding target light source according to the brightness single-time adjustment value;
and if the exposure state of the second target area is underexposure or the second target area is a low-contrast area, reducing the brightness of the corresponding target light source according to the brightness single-time adjustment value.
In one embodiment, the target endoscopic image is a multiple light source virtual endoscopic image; obtaining an endoscopic image of a target, comprising:
acquiring a third pose relation among different light sources, and establishing a target illumination model among all the light sources based on the third pose relation and an initial illumination model of each light source;
And generating a multi-light source virtual endoscopic image based on the current brightness of the light source, the bronchus model, the second pose, the third pose and the target illumination model of the light source.
In one embodiment, the method further comprises:
acquiring a candidate pose set of an endoscope lens in a bronchus model;
acquiring 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 under the condition that a target area does not exist in a target endoscopic image corresponding to the candidate pose;
and obtaining the target pose which is most similar to the current pose from the candidate pose set, and adjusting the brightness of the target light source corresponding to the program target pose according to the optimal brightness of the target light source corresponding to the target pose.
In one embodiment, obtaining a set of candidate poses of an endoscope lens in a bronchial model includes:
determining a plurality of first candidate points from a centerline of the bronchial model based on the first preset distance;
acquiring a bronchus model tangent plane which is perpendicular to the central line and passes through each first candidate point, and determining a plurality of second candidate points on each bronchus model tangent plane based on a second preset distance;
Establishing a cube by taking each second candidate point as a center, and determining a point at a preset position in the cube as a third candidate point;
and determining all the first candidate points, the second candidate points and the third candidate points as target candidate points, and determining a candidate pose set based on the position data of the target candidate points and all possible poses of the endoscope lens at the target candidate points.
In a second aspect, the present application also provides a brightness adjustment device, including:
the first acquisition module is used for acquiring a target endoscopic image, dividing the target endoscopic image into a plurality of areas based on the number of light sources, determining the area meeting the brightness characteristic condition of the image as a first target area of the target endoscopic image, wherein the target endoscopic image is a real endoscopic image or a multi-light source virtual endoscopic image;
the second acquisition module is used for acquiring a single-light-source virtual endoscopic image corresponding to each light source, determining an 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 endoscopic image, and adjusting the brightness of the corresponding light source based on the influence value, wherein the second target area is mapped by the first target area.
In a third aspect, the present application also provides a computer-readable storage medium. A computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of the method of any of the embodiments described above.
According to the brightness adjustment method, the device, the computer equipment, the storage medium and the computer program product, the obtained target endoscopic image is divided into a plurality of areas, and the target area is determined from the divided areas based on the characteristic conditions of the brightness of the image, so that the area with abnormal brightness in the target endoscopic image can be accurately determined, brightness adjustment can be performed only on the area with abnormal brightness, the workload for adjusting the brightness of a light source is reduced, and the brightness adjustment efficiency is improved; the influence value of each light source on the target area is determined based on the gray value of the pixel of each target area in the single-light-source virtual endoscopic image corresponding to each light source, so that different brightness adjustment can be performed on each light source based on the influence value of each light source on the target area, the endoscopic image can reach optimal imaging quality, the visual field definition in the operation process is improved, and the operation success rate is improved.
Drawings
FIG. 1 is a diagram of an application environment of a brightness adjustment method in one embodiment;
FIG. 2 is a schematic view of an endoscope unit in one embodiment;
FIG. 3 is a flow chart of a brightness adjustment method according to an embodiment;
FIG. 4 is a schematic diagram of an endoscopic image of a target with abnormal exposure status in one embodiment;
FIG. 5 is a schematic diagram of a contrast anomalous target endoscopic image in an embodiment;
FIG. 6 is a flow chart of a method for generating a single-light source virtual endoscopic image in an embodiment;
FIG. 7 is a schematic diagram of a mapping relationship between a positioning sensor and an electromagnetic positioning unit in one embodiment;
FIG. 8 is a schematic diagram of a calculation principle of the second pose and the third pose in one embodiment;
FIG. 9 is a schematic diagram of a spotlight model in one embodiment;
FIG. 10 is a schematic illustration of a bronchial model in one embodiment;
FIG. 11 is a schematic view of an endoscope unit with 4 light sources mounted in one embodiment;
FIG. 12 is a histogram of impact value analysis in one embodiment;
FIG. 13 is a schematic diagram of an endoscope unit for analyzing brightness single adjustment values in one embodiment;
FIG. 14 is a schematic representation of a bronchial model for use in determining a set of candidate poses in one embodiment;
FIG. 15 is a schematic diagram of a brightness adjustment system according to another embodiment;
FIG. 16 is a block diagram showing a structure of a brightness adjusting device according to an embodiment;
fig. 17 is an internal structural view of a computer device in one embodiment.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
The brightness adjustment method provided by the embodiment of the application can be applied to an application environment diagram shown in fig. 1, wherein the diagram comprises an endoscope unit 102, a computing unit 104 and a positioning unit 106. As shown in fig. 2, the endoscope unit 102 includes an endoscope lens for collecting an endoscopic image in a real bronchus, a light source array including a plurality of light sources, each of which has a brightness that can be individually adjusted, and an endoscopic instrument channel for providing illumination to the endoscope lens, for introducing tools and instruments in endoscopy and surgery, all of which are connected in a rigid manner, and also connected in a rigid manner; the calculating unit 104 is connected to the endoscope unit 102 and the positioning unit 106, and is configured to analyze the endoscopic image 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 pose to the computing unit 104, and the positioning unit 106 is connected to the endoscope unit 102 in a rigid manner.
In one embodiment, as shown in fig. 3, a brightness adjustment method is provided, and the method is applied to a computing unit for illustration, and includes the following steps:
s302, acquiring a target endoscopic image, dividing the target endoscopic image into a plurality of areas based on the number of light sources, and determining the area meeting the brightness characteristic condition of the image as a first target area of the target endoscopic image, wherein the target endoscopic image is a real endoscopic image or a multi-light source virtual endoscopic image.
The real endoscopic image is an image in a real bronchus acquired by an endoscope lens, the multi-light source virtual endoscopic image is a virtual endoscopic image corresponding to the real endoscopic image and generated based on a mapping relation between the real bronchus and a bronchus model and an illumination model among all light sources, and the multi-light source virtual endoscopic image is used for reflecting brightness conditions of all the light sources in the real bronchus.
The shapes and areas of the multiple regions obtained by dividing the target endoscopic image may be the same or different, which is not particularly limited in the embodiment of the present application, and the number of regions and the number of light sources may be in a functional relationship, for example, the ratio between the number of regions and the number of light sources is 1.
After the target endoscopic image is divided into regions, the image quality of each region can be analyzed by a mathematical statistical method, the image quality can be the brightness condition of each region, whether the brightness in each region is abnormal or not can be defined by using the image brightness characteristic conditions, if a certain region at least meets one of the image brightness characteristic conditions, the brightness of the region is abnormal, brightness adjustment is required, for example, the exposure state of a certain region is greater than the preset exposure state in the image brightness characteristic conditions, the overexposure of the region is indicated, and the region is determined as the first target region.
S304, acquiring a single-light-source virtual endoscopic image corresponding to each light source, determining an 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 endoscopic image, and adjusting the brightness of the corresponding light source based on the influence value, wherein the second target area is mapped by the first target area.
The single-light-source virtual endoscopic image is a virtual endoscopic image corresponding to the real endoscopic image generated based on a mapping relation between a real bronchus and a bronchus model and an illumination model of a corresponding light source, and is used for reflecting the brightness condition of the single light source in the real bronchus.
The Gray value of each pixel may be calculated from the channel values of three channels of the color information of each pixel, for example, the Gray value Gray may be calculated from the following equation:
Gray=0.299*R+0.578*G+0.114*B
wherein R, G, B is the channel value corresponding to the red, green and blue color information respectively.
The influence value is used for reflecting the influence condition of each light source on the brightness of the second target area, the gray values of all pixels of each second target area in the single-light-source virtual endoscopic image can be processed into a result value by using a preset function, and the result value is used as the influence value of the corresponding light source on the second target area. After the influence value is determined, brightness adjustment of different degrees can be directly performed on each light source based on the magnitude of the influence value, or brightness adjustment can be performed only on the light source corresponding to the influence value obtained by screening the influence value.
In the brightness adjustment method, the obtained target endoscopic image is divided into a plurality of areas, and the target area is determined from the divided areas based on the characteristic conditions of the brightness of the image, so that the area with abnormal brightness in the target endoscopic image can be accurately determined, brightness adjustment can be performed only on the area with abnormal brightness, the workload for adjusting the brightness of a light source is reduced, and the brightness adjustment efficiency is improved; the influence value of each light source on the target area is determined based on the gray value of the pixel of each target area in the single-light-source virtual endoscopic image corresponding to each light source, so that different brightness adjustment can be performed on each light source based on the influence value of each light source on the target area, the endoscopic image can reach optimal imaging quality, the visual field definition in the operation process is improved, and the operation success rate is improved.
In one embodiment, the image brightness feature is an exposure state; determining an area meeting the image brightness characteristic condition as a first target area of the target endoscopic image, wherein the first target area comprises: acquiring a first pixel quantity ratio of pixels with gray values larger than a first gray threshold value in each region in the corresponding region and a second pixel quantity ratio of pixels with gray values smaller than a second gray threshold value in the corresponding region; determining that the exposure state of the corresponding area is overexposure under the condition that the first pixel quantity ratio is larger than the second pixel quantity ratio and larger than a first preset ratio; determining the exposure state of the corresponding area as underexposure under the condition that the second pixel number ratio is larger than the first pixel number ratio and larger than a second preset ratio; an area whose exposure state is overexposed or underexposed is determined as a first target area.
The exposure state refers to the amount of light received by the image during shooting, and the exposure state comprises three conditions of overexposure, normal exposure or underexposure, wherein overexposure indicates that bright details of the image are overexposed and become excessively bright, and underexposure indicates that dark details of the image are excessively darkened and become excessively dark. The exposure state may be determined according to gray values of all pixels in each region.
As shown in fig. 4, when the first pixel number ratio is greater than the first preset ratio or the second pixel number ratio is greater than the second preset ratio, it is indicated that the brightness of the corresponding area is abnormal, and the exposure state is overexposure or underexposure, and the exposure state needs to be improved by adjusting the brightness of the light source. However, the same area may also satisfy the above overexposure and underexposure conditions, so that in order to facilitate adjustment of the brightness of the light source, only one exposure state of the same area may be determined in the same analysis process, and this requires adding a determination condition for determining the final exposure state of the area, where the added determination condition may be a comparison between the first pixel number ratio and the second pixel number ratio, and the added determination condition may also be other, which is not limited in particular in the embodiment of the present application.
In this step, whether each region satisfies the conditions of overexposure and underexposure is determined based on the gray values of all pixels in each region, so that whether the exposure state of the region is normal can be determined, and the exposure state of the region can be accurately determined by comparing the ratio of the number of first pixels corresponding to overexposure and the ratio of the number of second pixels corresponding to underexposure.
In one embodiment, the image brightness characteristic is contrast; determining an area meeting the image brightness characteristic condition as a first target area of the target endoscopic image, wherein the first target area comprises: the region with the contrast smaller than the first contrast threshold is determined as a low-contrast region, the region with the contrast larger than the second contrast threshold is determined as a high-contrast region, and the low-contrast region and the high-contrast region are determined as a first target region.
The contrast represents the brightness change degree between adjacent pixels in each area, and excessive contrast may cause excessive contrast between the brightest part and the darkest part in the image, so that details of the image are lost, and excessive contrast may cause lack of clear boundaries and subtle color changes in the image, so that details of the image are blurred.
Specifically, as shown in fig. 5, the contrast of each region may be analyzed by using a histogram, and regions in the target endoscopic image having a contrast greater than the second contrast threshold, between the first contrast and the second contrast, and less than the first contrast threshold are respectively placed in different rectangular boxes of the histogram, so as to determine the contrast of all regions in the target endoscopic image.
In the step, the area with abnormal brightness in the target endoscopic image is determined from the angle of contrast, and the area with overlarge brightness difference or overlarge brightness difference of the bright and dark part can be screened out for brightness adjustment, so that the visual field definition in the operation process is improved, and the success rate of the operation is improved.
In one embodiment, as shown in fig. 6, obtaining a single-light-source virtual endoscopic image corresponding to each light source includes:
s602, acquiring a first pose relation between a positioning sensor and each light source, a second pose relation between the positioning sensor and an endoscope lens, a mapping relation between a real bronchus and a bronchus model and a first pose of the positioning sensor in the real bronchus.
The pose comprises a position and a pose, a plurality of poses can be correspondingly arranged at the same position, and the pose relation can be represented by a matrix; the mapping relation represents the coordinate corresponding relation of the real bronchus and the bronchus model in the respective coordinate systems, and the bronchus model is a three-dimensional model constructed based on the structural data of the real bronchus and the mapping relation.
The computing unit may directly obtain the first pose of the positioning sensor, or may obtain the converted first pose, for example, as shown in fig. 7, according to the mapping relationship between the positioning sensor and the electromagnetic positioning unit in the respective coordinate systems, the first pose of the positioning sensor may be converted into the pose of the electromagnetic positioning unit by the electromagnetic positioning unit, and the computing unit may obtain the pose of the converted electromagnetic positioning unit.
S604, calculating a second pose of each light source in the bronchus model based on the first pose, the first pose relation and the mapping relation, and calculating a third pose of the endoscope lens in the bronchus model based on the first pose, the second pose relation and the mapping relation.
Specifically, as the positioning sensor and the endoscope unit are rigidly connected, the computing unit only needs to obtain the first pose of the positioning sensor, namely the pose of each light source and the endoscope lens in the real bronchus can be obtained based on the first pose relation and the second pose relation, and then the second pose of each light source and the third pose of the endoscope lens can be obtained based on the mapping relation between the real bronchus and the bronchus model, wherein the computing principle of the second pose and the third pose is shown in fig. 8, and the computing formulas of the second pose and the third pose are shown as the following two formulas respectively:
Pli=Li -1 *Ps*M
Pc=C -1 *Ps*M
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 relation, C is the second pose relation, ps is the first pose, and M is the mapping relation between a real bronchus and a bronchus model.
S606, obtaining the current brightness of each light source, and generating a single-light-source virtual endoscopic image corresponding to the light source 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.
The initial illumination model of the light source characterizes the change condition of illumination intensity of each light source, and the initial illumination model can be selectively set according to operation requirements. As shown in fig. 9, fig. 9 is a schematic view of a spotlight model, in which the illumination intensity varies with the illumination direction and the illumination distance, and the illumination range of the spotlight model includes a first cone range and a second cone range, where the illumination in the first cone range is strongest, the second cone range is secondary, and the illumination intensity outside the second cone range is 0. The spotlight model is shown in the following formula:
Clight=Clight0*Fdist(d)*Fdir(α)
wherein, clight is the total illumination intensity of the spotlight model, clight0 is the illumination intensity in the first cone, d is the distance between the light source and the illuminated object, fdist (d) is the illumination intensity attenuation value obtained according to d, alpha is the actual illumination angle, and Fdir (alpha) is the illumination intensity attenuation value obtained according to angle alpha.
Specifically, as shown in fig. 10, after determining the second pose of each light source and the third pose of the endoscope lens, the pose situation of the endoscope unit in the real bronchus can be simulated in the bronchus model, and the illumination situation of each light source in the real bronchus can be simulated in the bronchus model based on the current brightness and the initial illumination model of each light source, so that when the endoscope unit is in each pose, a single-light-source virtual endoscopic image corresponding to each light source can be generated according to the illumination situation, as shown in fig. 11, and fig. 11 is an endoscope unit provided with 4 light sources, wherein each light source corresponds to one Shan Guangyuan virtual endoscopic image.
In the step, a single-light-source virtual endoscopic image corresponding to each light source is obtained for each pose of the endoscope unit, so that the influence of each light source on a target area with abnormal brightness can be analyzed based on the single-light-source virtual endoscopic image, and different brightness adjustment can be performed on each light source.
In one embodiment, determining the impact value of the respective light source on the respective second target area based on the gray values of all pixels of each second target area in the single light source virtual endoscopic image comprises: and calculating a gray average value of the second target area based on the number of pixels of each second target area and the gray value of each pixel, and taking the gray average value as an influence value of the light source on the second target area.
Specifically, firstly, calculating the sum of gray values of all pixels of each target area in a single-light-source virtual endoscopic image, and then determining the quotient of the sum of the gray values and the number of pixels of the target area as an influence value of a corresponding light source on the target area, wherein the calculation formula of the influence value is shown as follows:
GrayA=∑Gray/Cnt
in the formula, gray is the Gray average value of the target area, namely 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.
In the step, aiming at the single-light-source virtual endoscopic image corresponding to each light source, the gray average value of each target area is used as the influence value of the light source on the target area, and the influence value of the gray average value is determined to more accurately reflect the influence condition of each light source on the brightness of the target area.
In one embodiment, adjusting the brightness of the respective light source based on the impact value comprises: determining target light sources from the light sources based on the influence values of the light sources on the corresponding second target areas aiming at the second target areas with the same relative positions among different light sources; determining a brightness single adjustment value for the target light source based on the influence value of the target light source on the corresponding second target area; and adjusting the brightness of the target light source based on the brightness characteristic and the brightness adjustment value of the target light source to the corresponding second target area.
The method and the device can determine an influence value range according to the historical influence condition of each light source on the brightness of the endoscopic image, determine all light sources with corresponding influence values within the influence value range as target light sources, or determine the preset number of the target light sources first, and then screen out the light sources with the preset number from all the light sources with the corresponding influence values within the influence value range as target light sources.
According to the corresponding influence value of each target light source and operation experience, different brightness single adjustment values can be set for each target light source, the brightness single adjustment values with the same size can be set for all target light sources directly according to actual conditions, the maximum brightness value of each light source can be divided into a plurality of parts, one part is used as the brightness single adjustment value of the corresponding light source, and the method for determining the brightness single adjustment value is not particularly limited in the embodiment of the application.
Specifically, the brightness condition of the second target area may be determined according to the image brightness characteristics of the second target area, and according to the brightness condition, brightness adjustment is performed on each light source by using the brightness single adjustment value.
In the step, the brightness of each light source is adjusted based on the image brightness characteristic of the second target area and the brightness adjustment value of each light source, so that the adjustment process is more in line with the actual brightness requirement of the endoscopic image, and the smooth operation can be ensured.
In one embodiment, for a second target area where the relative positions between different light sources are the same, determining a target light source from each light source based on the impact value of each light source on the corresponding second target area, includes: and sequencing the influence values of the corresponding light sources according to the sequence from large to small for the second target area, and determining the light sources corresponding to the preset number of influence values as the corresponding target light sources of the second target area.
The preset number is determined according to the historical influence condition of each light source on the brightness of the endoscopic image, the influence of the light sources with the influence value arranged behind the preset number on the brightness of the target area is small and even negligible, and therefore the light sources with the influence value arranged in front of the preset number are determined as target light sources.
All the influence values can be analyzed by adopting a mathematical statistical method so as to determine the target light source. For example, as shown in fig. 12, the influence values corresponding to all the light sources are placed in different bins of the histogram, the influence value corresponding to the bin of the preset number of the preceding height rows is determined as the target influence value, and the light source corresponding to the target influence value is determined as the target light source.
In this step, the light source having a large influence on the second target area is determined as the target light source, and only the target light source is subjected to brightness adjustment, so that the brightness adjustment efficiency can be improved, the workload can be reduced, and the brightness adjustment result of the endoscopic image can not be influenced.
In one embodiment, determining the luminance single adjustment value for the target light source based on the impact value of the target light source on the respective second target region comprises: determining a preset brightness adjustment value of the target light source based on the brightness maximum value of the target light source and the preset brightness adjustment section number; and calculating the total influence value of all the target light sources corresponding to the second target area, and determining the brightness single-time adjustment value of the target light sources based on the preset brightness adjustment value, the influence value of each target light source and the total influence value.
Specifically, the number of preset brightness adjustment segments can be determined according to actual situations, the brightness maximum value of the corresponding target light source can be divided into multiple parts based on the number of preset brightness adjustment segments, one part is the preset brightness adjustment value of the target light source, and the sum of the influence values of all the target light sources is determined as the total influence value of the corresponding second target area. For example, as shown in fig. 13, there are 4 target light sources corresponding to a certain second target area, and the impact values of the 4 target light sources are sequentially I1, I2, I3, and I4 from large to small, so the total impact value of the second target area is ii=i1+i2+i3+i4, and if the brightness maximum value and the preset brightness adjustment value of the 4 target light sources are the same, respectively are M and N, the preset brightness adjustment value of each target light source is s=m/N, and thus the brightness single adjustment value of each target light source is sequentially s×i1/II, s×i2/II, s×i3/II, and s×i4.
In this step, the luminance single adjustment value of each target light source is determined based on the luminance maximum value, the influence value and the preset luminance adjustment segment number of each target light source, and the luminance single adjustment value thus determined more meets the luminance adjustment requirement of each second target area.
In one embodiment, the image brightness features include exposure status and/or contrast; adjusting the brightness of the target light source based on the image brightness characteristic and the brightness single-time adjustment value of the target light source to the corresponding second target area, comprising: if the exposure state of the second target area is overexposure or the second target area is a high contrast area, increasing the brightness of the corresponding target light source according to the brightness single-time adjustment value; and if the exposure state of the second target area is underexposure or the second target area is a low-contrast area, reducing the brightness of the corresponding target light source according to the brightness single-time adjustment value.
Specifically, after the abnormal brightness condition of the second target area is determined according to the brightness characteristic of the image, the brightness of the corresponding target light source is adjusted according to the brightness single-time adjustment value, after brightness adjustment of all the second target areas in all the single-light-source virtual endoscopic images corresponding to the target endoscopic image is completed, whether the first target area with abnormal brightness exists in the target endoscopic image is judged, if so, the brightness of the light source is readjusted according to the method of the application until the first target area does not exist in the target endoscopic image.
In the step, brightness adjustment is performed on the target light source in different directions based on the brightness characteristics of the image, and after the brightness adjustment, judgment is performed on whether the brightness of the target endoscopic image is abnormal, so that the adjusted target endoscopic image can be ensured to be in a normal brightness state, and the normal operation is facilitated.
In one embodiment, the target endoscopic image is a multiple light source virtual endoscopic image; obtaining an endoscopic image of a target, comprising: acquiring a third pose relation among different light sources, and establishing a target illumination model among all the light sources based on the third pose relation and an initial illumination model of each light source; and generating a multi-light source virtual endoscopic image based on the current brightness of the light source, the bronchus model, the second pose, the third pose and the target illumination model of the light source.
The target illumination model characterizes common illumination intensity variation of all light sources, and illumination conditions of all light sources in a real bronchus can be truly reflected by constructing a multi-light-source virtual endoscopic image, so that the multi-light-source virtual endoscopic image can be utilized to replace the real endoscopic image for brightness analysis.
In the step, based on the current brightness of all the light sources, the initial illumination model and the third pose relation among different light sources, a multi-light source virtual endoscopic image is generated, so that the brightness condition in the multi-light source virtual endoscopic image is more consistent with the brightness condition of a real endoscopic image.
In one embodiment, the method further comprises: acquiring a candidate pose set of an endoscope lens in a bronchus model; acquiring 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 under the condition that a target area does not exist in a target endoscopic image corresponding to the candidate pose; and obtaining the target pose which is most similar to the current pose from the candidate pose set, and adjusting the brightness of the target light source corresponding to the program target pose according to the optimal brightness of the target light source corresponding to the target pose.
The candidate pose set comprises all possible positions and poses of the endoscope lens in the bronchus model, when the endoscope lens is in each candidate pose, the influence value of all light sources on each target area is obtained according to the method, the corresponding target light source of each target area is obtained based on the influence value, and the target light source of all the target areas corresponding to each candidate pose is determined to be the corresponding target light source of the candidate pose.
Specifically, comparing the current pose of the endoscope lens with the candidate pose set, the candidate pose which is closest to the current pose and is the most similar to the current pose can be directly determined as the target pose, and each candidate pose and the current pose can be input into a preset similarity function to obtain a function value, the target pose is determined from all the candidate poses according to the size of the function value, and the method for determining the target pose is not particularly limited. And after the target pose is determined, adjusting all the target light sources corresponding to the target pose to the optimal brightness.
In the step, the brightness condition of the real endoscopic image under the current pose is improved directly by adjusting the brightness of the target light source corresponding to the target pose which is the most similar to the current pose, so that the accuracy of brightness adjustment can be ensured, and the analysis process can be reduced.
In one embodiment, obtaining a set of candidate poses of the endoscope lens in the bronchial model comprises: determining a plurality of first candidate points from a centerline of the bronchial model based on a first preset distance; acquiring a bronchus model tangent plane which is perpendicular to the central line and passes through each first candidate point, and determining a plurality of second candidate points on each bronchus model tangent plane based on a second preset distance; establishing a cube by taking each second candidate point as a center, and determining a point at a preset position in the cube as a third candidate point; and determining all the first candidate points, the second candidate points and the third candidate points as target candidate points, and determining the candidate pose set based on the position data of the target candidate points and all possible poses of the endoscope lens at the target candidate points.
Specifically, as shown in fig. 14, bronchial centerline data, that is, bronchial model skeleton data, is obtained, the centerline data is sampled according to a distance interval Δl to obtain K points, for each of the K points, a tangent plane to a centerline at the point is sampled according to a distance interval Δd to obtain M points, a cube is built on each of the M points on the tangent plane with the point as a center, and a point on a preset position of the cube is obtained, for example, the preset position may be all vertices, center points of all sides, and center points of the plane, and finally k×m×a target candidate points are determined.
In the step, in the bronchus model, the target candidate points are acquired from multiple dimensions such as lines, planes and bodies, so that the acquired target candidate points are more comprehensive, and the accuracy of subsequent brightness adjustment can be improved.
In one embodiment, another brightness adjustment method is provided, a system diagram of which is shown in fig. 15, and the method includes the following steps:
(1) And acquiring a mapping relation Li between the positioning sensor and each light source and a mapping relation C between the positioning sensor and an endoscope lens, establishing an illumination Model Lm among all the light sources based on the actual light source distribution of the endoscope, and acquiring a patient bronchus Model and a mapping relation M between a patient real bronchus and a patient bronchus Model.
The pose information Ps of the positioning sensor is acquired in real time, the pose Pli of each light source in the bronchus model is calculated based on the Ps, the Li and the M, and the pose Pc of the endoscope lens in the bronchus model is calculated based on the Ps, the C and the M.
(2) Real endoscopic images are acquired in real time, the images are divided into n areas according to the number of the light sources, whether the areas are subjected to overexposure, underexposure, overlarge contrast and other problems is judged based on various information of the images, the problem areas are marked as P, for the problem areas P, the light source brightness Lu is obtained for each light source in real time, the data such as Model, lu, pli, pc, lm are used for generating virtual endoscopic images, and the influence value I of each light source on the problem areas P is obtained based on various information of the images.
(3) And adjusting the brightness of the m light sources one by one according to a certain method until the brightness of the image meets the requirement.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a brightness adjusting device for realizing the brightness adjusting method. The implementation of the solution provided by the device is similar to that described in the above method, so the specific limitation of one or more embodiments of the brightness adjustment device provided below may be referred to the limitation of the brightness adjustment method hereinabove, and will not be repeated here.
In one embodiment, as shown in fig. 16, there is provided a brightness adjustment device 1600 comprising: a first acquisition module 1601 and a second acquisition module 1602, wherein:
the first obtaining module 1601 is configured to obtain a target endoscopic image, divide the target endoscopic image into a plurality of regions based on the number of light sources, and determine a region satisfying a brightness characteristic condition of the image as a first target region of the target endoscopic image, where the target endoscopic image is a real endoscopic image or a multi-light source virtual endoscopic image.
The second obtaining module 1602 is configured to obtain a single-light-source virtual endoscopic image corresponding to each light source, determine an influence value of the corresponding light source on the corresponding second target area based on a gray value of a pixel of each second target area in the single-light-source virtual endoscopic image, and adjust brightness of the corresponding light source based on the influence value, where the second target area is mapped by the first target area.
In some embodiments, the first acquisition module 1601 is further configured to: acquiring a first pixel quantity ratio of pixels with gray values larger than a first gray threshold value in each region in the corresponding region and a second pixel quantity ratio of pixels with gray values smaller than a second gray threshold value in the corresponding region; determining that the exposure state of the corresponding area is overexposure under the condition that the first pixel quantity ratio is larger than the second pixel quantity ratio and larger than a first preset ratio; determining the exposure state of the corresponding area as underexposure under the condition that the second pixel number ratio is larger than the first pixel number ratio and larger than a second preset ratio; an area whose exposure state is overexposed or underexposed is determined as a target area.
In some embodiments, the first acquisition module 1601 is further configured to: the region with the contrast smaller than the first contrast threshold is determined as a low-contrast region, the region with the contrast larger than the second contrast threshold is determined as a high-contrast region, and the low-contrast region and the high-contrast region are determined as target regions.
In some embodiments, the second acquisition module 1602 is further configured to: acquiring a first pose relation between a positioning sensor and each light source, a second pose relation between the positioning sensor and an endoscope lens, a mapping relation between a real bronchus and a bronchus model, and a first pose of the positioning sensor in the real bronchus; calculating a second pose of each light source in the bronchial model based on the first pose, the first pose relation and the mapping relation, and calculating a third pose of the endoscope lens in the bronchial model based on the first pose, the second pose relation and the mapping relation; the current brightness of each light source is obtained, and a single-light-source virtual endoscopic image corresponding to the light source is generated 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.
In some embodiments, the second acquisition module 1602 is further configured to: and calculating a gray average value of the second target area based on the number of pixels of each second target area and the gray value of each pixel, and taking the gray average value as an influence value of the light source on the second target area.
In some embodiments, the second acquisition module 1602 includes:
the first determining unit is used for determining target light sources from the light sources based on the influence values of the light sources on the corresponding second target areas aiming at the second target areas with the same relative positions among different light sources.
And a second determining unit for determining a brightness single adjustment value for the target light source based on the influence value of the target light source on the corresponding second target region.
And the adjusting unit is used for adjusting the brightness of the target light source based on the brightness characteristic and the brightness adjusting value of the target light source to the corresponding second target area.
In some embodiments, the first determining unit is further configured to: and sequencing the influence values of the corresponding light sources according to the sequence from large to small for the second target area, and determining the light sources corresponding to the preset number of influence values as the corresponding target light sources of the second target area.
In some embodiments, the second determining unit is further configured to: determining a preset brightness adjustment value of the target light source based on the brightness maximum value of the target light source and the preset brightness adjustment section number; and calculating the total influence value of all the target light sources corresponding to the second target area, and determining the brightness single-time adjustment value of the target light sources based on the preset brightness adjustment value, the influence value of each target light source and the total influence value.
In some embodiments, the adjusting unit is further configured to: if the exposure state of the second target area is overexposure or the second target area is a high contrast area, increasing the brightness of the corresponding target light source according to the brightness single-time adjustment value; and if the exposure state of the second target area is underexposure or the second target area is a low-contrast area, reducing the brightness of the corresponding target light source according to the brightness single-time adjustment value.
In some embodiments, the first acquisition module 1601 is further configured to: acquiring a third pose relation among different light sources, and establishing a target illumination model among all the light sources based on the third pose relation and an initial illumination model of each light source; and generating a multi-light source virtual endoscopic image based on the current brightness of the light source, the bronchus model, the second pose, the third pose and the target illumination model of the light source.
In some embodiments, brightness adjustment device 1600 further comprises:
and the third acquisition module is used for acquiring a candidate pose set of the endoscope lens in the bronchus model.
The fourth acquisition module is used for acquiring 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 under the condition that a target area does not exist in the target endoscopic image corresponding to the candidate pose.
And a fifth acquisition module, configured to acquire a target pose most similar to the current pose in the candidate pose set, and adjust the brightness of the target light source corresponding to the program target pose according to the optimal brightness of the target light source corresponding to the target pose.
In some embodiments, the third acquisition module is further to: determining a plurality of first candidate points from a centerline of the bronchial model based on the first preset distance; acquiring a bronchus model tangent plane which is perpendicular to the central line and passes through each first candidate point, and determining a plurality of second candidate points on each bronchus model tangent plane based on a second preset distance; establishing a cube by taking each second candidate point as a center, and determining a point at a preset position in the cube as a third candidate point; and determining all the first candidate points, the second candidate points and the third candidate points as target candidate points, and determining a candidate pose set based on the position data of the target candidate points and all possible poses of the endoscope lens at the target candidate points.
The respective modules in the above-described brightness adjustment device may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 17. The computer device includes a processor, a memory, an Input/Output interface (I/O) and a communication interface. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface is connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is for storing luminance data. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a brightness adjustment method.
It will be appreciated by those skilled in the art that the structure shown in FIG. 17 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when executed by a processor, carries out the steps of the method embodiments described above.
It should be noted that, the user information (including but not limited to user equipment information, user personal information, etc.) and the data (including but not limited to data for analysis, stored data, presented data, etc.) related to the present application are information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data need to comply with the related laws and regulations and standards of the related country and region.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the embodiments provided herein may include at least one of a relational database and a non-relational database. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processor referred to in the embodiments provided in the present application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, or the like, but is not limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the application and are described in detail herein without thereby limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of the application should be assessed as that of the appended claims.

Claims (12)

1. A method of brightness adjustment, the method comprising:
acquiring a target endoscopic image, dividing the target endoscopic image into a plurality of areas based on the number of light sources, and determining the area meeting the image brightness characteristic condition as a first target area of the target endoscopic image, wherein the target endoscopic image is a real endoscopic image or a multi-light source virtual endoscopic image;
Acquiring a single-light-source virtual endoscopic image corresponding to each light source, determining an influence value of the corresponding light source on the corresponding second target area based on the gray value of pixels of each second target area in the single-light-source virtual endoscopic image, and adjusting the brightness of the corresponding light source based on the influence value, wherein the second target area is mapped by the first target area.
2. The method of claim 1, wherein the image brightness characteristic is an exposure state; the determining the area meeting the image brightness characteristic condition as the first target area of the target endoscopic image comprises the following steps:
acquiring a first pixel quantity ratio of pixels with gray values larger than a first gray threshold value in each region in the corresponding region and a second pixel quantity ratio of pixels with gray values smaller than a second gray threshold value in the corresponding region;
determining that the exposure state of the corresponding area is overexposure under the condition that the first pixel quantity ratio is larger than the second pixel quantity ratio and larger than a first preset ratio;
determining that the exposure state of the corresponding area is underexposure under the condition that the second pixel quantity ratio is larger than the first pixel quantity ratio and larger than a second preset ratio;
Determining a region with the exposure state being overexposed or underexposed as a first target region; and/or the image brightness characteristic is contrast; the determining the area meeting the image brightness characteristic condition as the first target area of the target endoscopic image comprises the following steps:
the region with the contrast smaller than the first contrast threshold is determined as a low-contrast region, the region with the contrast larger than the second contrast threshold is determined as a high-contrast region, and the low-contrast region and the high-contrast region are determined as a first target region.
3. The method of claim 1, wherein the acquiring a single-light-source virtual endoscopic image corresponding to each light source comprises:
acquiring a first pose relation between a positioning sensor and each light source, a second pose relation between the positioning sensor and an endoscope lens, a mapping relation between a real bronchus and a bronchus model, and a first pose of the positioning sensor in the real bronchus;
calculating a second pose of each light source in the bronchus model based on the first pose, the first pose relation and the mapping relation, and calculating a third pose of the endoscope lens in the bronchus model based on the first pose, the second pose relation and the mapping relation;
The current brightness of each light source is obtained, and a single-light-source virtual endoscopic image corresponding to the light source is generated based on the current brightness of the light source, the bronchus model, the second pose of the light source, the third pose and the initial illumination model of the light source.
4. The method according to claim 1, wherein determining the impact value of the respective light source on the respective second target area based on the gray values of all pixels of each second target area in the single light source virtual endoscopic image comprises:
and calculating a gray average value of the second target area based on the number of pixels of each second target area and the gray value of each pixel, and taking the gray average value as an influence value of the light source on the second target area.
5. The method of claim 1, wherein adjusting the brightness of the respective light source based on the impact value comprises:
determining target light sources from the light sources based on the influence values of the light sources on the corresponding second target areas aiming at the second target areas with the same relative positions among different light sources;
determining a brightness single adjustment value for the target light source based on the influence value of the target light source on the corresponding second target area;
And adjusting the brightness of the target light source based on the brightness characteristic of the target light source to the corresponding second target area and the brightness adjustment value.
6. The method of claim 5, wherein the determining the target light source from each light source based on the impact value of each light source on the corresponding second target region for the second target region having the same relative position between the different light sources comprises:
and sequencing the influence values of the corresponding light sources according to the sequence from large to small for the second target area, and determining the light sources corresponding to the preset number of influence values as the corresponding target light sources of the second target area.
7. The method of claim 5, wherein determining a single adjustment value for the brightness of the target light source based on the impact value of the target light source on the respective second target region comprises:
determining a preset brightness adjustment value of the target light source based on the brightness maximum value of the target light source and the preset brightness adjustment segment number;
and calculating the total influence value of all the target light sources corresponding to the second target area, and determining a single brightness adjustment value of the target light sources based on the preset brightness adjustment value, the influence value of each target light source and the total influence value.
8. The method of claim 5, wherein the image brightness features include exposure status and/or contrast; adjusting the brightness of the target light source based on the image brightness characteristics of the target light source to the corresponding second target area and the brightness single-time adjustment value, including:
if the exposure state of the second target area is overexposure or the second target area is a high-contrast area, increasing the brightness of the corresponding target light source according to the brightness single-time adjustment value;
and if the exposure state of the second target area is underexposure or the second target area is a low-contrast area, reducing the brightness of the corresponding target light source according to the brightness single-time adjustment value.
9. The method of claim 1, wherein the target endoscopic image is a multi-light source virtual endoscopic image; the obtaining the target endoscopic image includes:
acquiring a third pose relation among different light sources, and establishing a target illumination model among all the light sources based on the third pose relation and an initial illumination model of each light source;
generating a multi-light source virtual endoscopic image based on the current brightness of the light source, the bronchial model, the second pose of the light source, the third pose, and the target illumination model.
10. The method of claim 5, wherein the method further comprises:
acquiring a candidate pose set of the endoscope lens in the bronchus model;
acquiring 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 under the condition that the target region does not exist in the target endoscopic image corresponding to the candidate pose;
and acquiring the target pose which is most similar to the current pose from 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.
11. The method of claim 10, wherein the obtaining the set of candidate poses of the endoscope lens in the bronchial model comprises:
determining a plurality of first candidate points from a centerline of the bronchial model based on a first preset distance;
acquiring a bronchus model tangent plane which is perpendicular to the central line and passes through each first candidate point, and determining a plurality of second candidate points on each bronchus model tangent plane based on a second preset distance;
Establishing a cube by taking each second candidate point as a center, and determining a point at a preset position in the cube as a third candidate point;
and determining all the first candidate points, the second candidate points and the third candidate points as target candidate points, and determining the candidate pose set based on the position data of the target candidate points and all possible poses of the endoscope lens at the target candidate points.
12. A brightness adjustment device, the device comprising:
the first acquisition module is used for acquiring a target endoscopic image, dividing the target endoscopic image into a plurality of areas based on the number of light sources, determining the area meeting the image brightness characteristic condition as a first target area of the target endoscopic image, wherein the target endoscopic image is a real endoscopic image or a multi-light source virtual endoscopic image;
the second acquisition module is used for acquiring a single-light-source virtual endoscopic image corresponding to each light source, determining an 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 endoscopic image, and adjusting the brightness of the corresponding light source based on the influence value, wherein the second target area is mapped by the first target area.
CN202310935269.8A 2023-07-27 2023-07-27 Brightness adjusting method and device Pending CN116862810A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310935269.8A CN116862810A (en) 2023-07-27 2023-07-27 Brightness adjusting method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310935269.8A CN116862810A (en) 2023-07-27 2023-07-27 Brightness adjusting method and device

Publications (1)

Publication Number Publication Date
CN116862810A true CN116862810A (en) 2023-10-10

Family

ID=88219013

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310935269.8A Pending CN116862810A (en) 2023-07-27 2023-07-27 Brightness adjusting method and device

Country Status (1)

Country Link
CN (1) CN116862810A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117197143A (en) * 2023-11-08 2023-12-08 深圳市聪讯智能科技有限公司 Intelligent detection method for ambient brightness based on image features

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117197143A (en) * 2023-11-08 2023-12-08 深圳市聪讯智能科技有限公司 Intelligent detection method for ambient brightness based on image features
CN117197143B (en) * 2023-11-08 2024-02-02 深圳市聪讯智能科技有限公司 Intelligent detection method for ambient brightness based on image features

Similar Documents

Publication Publication Date Title
CN111179230B (en) Remote sensing image contrast change detection method and device, storage medium and electronic equipment
CN104655403B (en) Luminance uniformity test method of dot-matrix light source
JP7004019B2 (en) Image processing methods, equipment and computer-readable recording media
CN113516939B (en) Brightness correction method and device, display equipment, computing equipment and storage medium
CN116862810A (en) Brightness adjusting method and device
US11127141B2 (en) Image processing apparatus, image processing method, and a non-transitory computer readable storage medium
US11625816B2 (en) Learning device, image generation device, learning method, image generation method, and program
CN112070682A (en) Method and device for compensating image brightness
CN116228753B (en) Tumor prognosis evaluation method, device, computer equipment and storage medium
US10957049B2 (en) Unsupervised image segmentation based on a background likelihood estimation
CN109118441B (en) Low-illumination image and video enhancement method, computer device and storage medium
CN114022529B (en) Depth perception method and device based on self-adaptive binocular structured light
CN115587948A (en) Image dark field correction method and device
Wolski et al. Selecting texture resolution using a task‐specific visibility metric
Kocdemir et al. TMO-Det: Deep tone-mapping optimized with and for object detection
CN114677393A (en) Depth image processing method, depth image processing device, image pickup apparatus, conference system, and medium
WO2022212196A1 (en) Waveguide correction map compression
CN110619677B (en) Method and device for reconstructing particles in three-dimensional flow field, electronic equipment and storage medium
CN114283081A (en) Depth recovery method based on pyramid acceleration, electronic device and storage medium
CN109328373B (en) Image processing method, related device and storage medium thereof
JP2011113177A (en) Method and program for structuring three-dimensional object model
CN116563299B (en) Medical image screening method, device, electronic device and storage medium
US11803994B2 (en) Systems and methods for encoding and rendering animation using a point cloud
US11417027B2 (en) Image data processing method and apparatus
CN114125344B (en) Video processing apparatus, video processing method, monitor device, computer device, and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination