Endoscope image imaging method and endoscope
By locating and suppressing the specular reflection component in the endoscopic image imaging method, the problem of overexposure spots in endoscopic imaging is solved and high-quality imaging effects are achieved.
Patent Information
- Application Number
- CN202511006937.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-22
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2045-07-22
AI Technical Summary
When observing at close range with an endoscope, the circular overexposure spot caused by the light source layout of the endoscope leads to poor imaging effect.
By acquiring the real-time acquisition image and light source parameters of the endoscope, the target light spot is located, and the specular reflection component of the target area is suppressed. The suppression coefficient and brightness suppression method are used to restore the original expression of the image.
Effectively suppress overexposure spots, avoid destroying normal highlight areas, restore the original expression of the image, and improve imaging quality.
Smart Images

Figure CN120510211B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to an endoscopic image imaging method and an endoscope. Background Art
[0002] An endoscope is a medical electronic optical instrument that can be inserted into the human body cavity and organ cavity for direct observation, diagnosis and treatment. It integrates advanced optical, mechanical and electrical technologies. It uses an extremely small electronic imaging element - CCD (charge-coupled device) to image the object in the cavity to be observed onto the CCD through a tiny objective optical system, and then sends the received image signal to the image processing system through a fiber optic bundle. Finally, the processed image is output on the monitor for the doctor to observe and diagnose.
[0003] Endoscopes in related technologies, such as electronic thoracoscopes and bronchoscopes, are prone to forming circular overexposure spots when observing target tissues at close range due to the light source layout of the scope, ultimately resulting in poor imaging effects.
[0004] Therefore, there is an urgent need to propose an endoscopic imaging method to solve the problem of poor imaging effect caused by paired circular overexposure spots in the endoscope in the related art. Summary of the Invention
[0005] In view of this, the present invention provides an endoscopic imaging method and an endoscope to solve the problem of poor imaging effect of the endoscope caused by paired circular overexposure spots.
[0006] In a first aspect, the present invention provides an endoscopic image imaging method, which includes: acquiring a real-time acquisition image of an endoscope and light source parameters of the endoscope; locating a target light spot in the real-time acquisition image based on the light source parameters of the endoscope; and suppressing the mirror reflection component of the target area where the target light spot is located to obtain an endoscopic imaging image.
[0007] As an exemplary embodiment, the mirror reflection component of the target area where the target light spot is located is suppressed to obtain an endoscopic imaging image, including: constructing a target neighborhood area corresponding to the target light spot; wherein the target neighborhood area is determined by preset geometric parameters with the center point of the target light spot as the geometric center; taking the reference brightness and reference color of the target neighborhood pixels in the target neighborhood area as a reference, the mirror reflection component of each target pixel is calculated based on the actual color and actual brightness of the target pixels constituting the target light spot; the brightness of the mirror reflection component is suppressed based on the actual brightness and the relative distance of the target pixel relative to the center point to obtain the corrected brightness of each target pixel; wherein the degree of the brightness suppression is inversely correlated with the relative distance and positively correlated with the actual brightness.
[0008] As an exemplary embodiment, the reference brightness and reference color of the target neighborhood pixels in the target neighborhood area are used as a reference, and the specular reflection component of each target pixel is calculated based on the actual color and actual brightness of the target pixels constituting the target light spot, including: obtaining a mapping relationship between the color in the target neighborhood area and the diffuse reflection brightness; determining the diffuse reflection brightness of the target pixel based on the actual color of the target pixel and the mapping relationship; and calculating the specular reflection component of the target pixel based on the actual brightness and the diffuse reflection brightness.
[0009] As an exemplary embodiment, obtaining the mapping relationship between the color and diffuse reflection brightness in the target neighborhood area includes: mapping the target neighborhood pixels from the RGB color space to the Lab color space to obtain the actual color value and actual brightness value of the target neighborhood pixels in the Lab color space; extracting the target neighborhood pixels based on the actual brightness value to obtain the neighborhood pixels to be sampled; wherein the actual brightness value of the neighborhood pixels to be sampled is less than the preset brightness value; dividing the neighborhood pixels to be sampled based on the color value range of the Lab color space to obtain sub-neighborhood pixels to be sampled in multiple grid units; in each of the grid units, extracting the median of the actual color value and actual brightness value corresponding to each sub-neighborhood pixel to be sampled as the sampling color value and sampling brightness value; constructing a two-dimensional lookup table based on the sampling color value and sampling brightness value to obtain the mapping relationship between the color and diffuse reflection brightness in the target neighborhood area.
[0010] As an exemplary embodiment, the brightness of the specular reflection component is suppressed based on the actual brightness and the relative distance of the target pixel relative to the center point to obtain a corrected brightness of each target pixel, including: calculating the normalized distance of each target pixel relative to the center point; calculating the brightness value difference between the actual brightness value of each target pixel and the maximum brightness value of the center point in a preset color space; determining a suppression weight for brightness suppression based on the normalized distance and the brightness value difference; wherein the suppression degree of the brightness suppression is positively correlated with the suppression weight, and the suppression weight is inversely correlated with the relative distance and positively correlated with the actual brightness; brightness of the specular reflection component is suppressed based on the suppression weight corresponding to each target pixel to obtain a suppressed brightness output value.
[0011] As an exemplary embodiment, the target light spot is positioned in the real-time acquisition image based on the light source parameters of the endoscope, including: performing correlation matching on the light spots to be screened in the real-time acquisition image to obtain candidate light spots whose actual correlation with the target double-circle template is greater than the preset correlation; wherein the target double-circle template is obtained by performing diameter range modeling and circle center distance modeling through the light source parameters; acquiring a historical acquisition image that is earlier than the real-time acquisition image in time sequence; screening the candidate light spots based on the actual circle center distance of the candidate light spots, the position change information and the area change information of the candidate light spots in the real-time acquisition image and the historical acquisition image to obtain the target light spot.
[0012] As an exemplary embodiment, the candidate light spots are screened based on the actual center distance of the candidate light spots, the position change information and the area change information of the candidate light spots in the real-time acquisition image and the historical acquisition image to obtain the target light spot, including: obtaining the actual center distance of each candidate light spot, the relative displacement and area change rate of each candidate light spot in the real-time acquisition image relative to the historical acquisition image; performing a first screening of the candidate light spots based on the actual center distance to obtain a first sub-candidate light spot whose actual center distance is in a preset center distance interval; performing a second screening of the candidate light spots based on the relative displacement to obtain a second sub-candidate light spot whose relative displacement is less than the preset relative displacement; performing a third screening of the candidate light spots based on the area change rate to obtain a third candidate sub-candidate light spot whose area change rate is less than the preset area change rate; and taking the common candidate light spot among the first sub-candidate spot, the second sub-candidate spot and the third candidate sub-candidate spot as the target light spot.
[0013] As an exemplary embodiment, after suppressing the mirror reflection component of the target area where the target light spot is located, the endoscopic image imaging method further includes: acquiring a historical acquisition image that is earlier in time than the real-time acquisition image; performing multimodal feature extraction on the target neighborhood area where the target light spot is located to obtain multimodal features of the target neighborhood area; wherein the multimodal features include image attribute features and object attribute features; performing feature matching in the historical acquisition image based on the image attribute features and the object attribute features to obtain a historical cross-frame matching area with an actual matching degree greater than a preset matching degree; in the historical cross-frame matching area, extracting target historical pixels that are not covered by the target light spot; and correcting the target neighborhood pixels in the target neighborhood area corresponding to the position based on the position, color and actual matching degree of the target historical pixels to obtain the endoscopic imaging image.
[0014] As an exemplary embodiment, the target neighborhood pixels in the target neighborhood area corresponding to the position based on the position, color and actual matching degree of the target historical pixels are corrected, including: performing affine transformation alignment on the historical cross-frame matching area and the target neighborhood area based on the target historical pixels to obtain an affine transformation matrix; performing coordinate mapping transformation based on the coordinates of the target historical pixels and the affine transformation matrix to obtain the transformed coordinates of the target historical pixels; extracting the neighborhood pixels to be corrected in the target neighborhood pixels based on the transformed coordinates; fusing the first pixel value of the target historical pixel and the second pixel value of the neighborhood pixel to be corrected based on the actual matching degree to obtain the corrected pixel value of the neighborhood pixel to be corrected; wherein, the first pixel value is positively correlated with the actual matching degree when fused, and the second pixel value is negatively correlated with the actual matching degree when fused.
[0015] In a second aspect, the present invention provides an endoscope, comprising an illumination unit, an imaging unit, and an image processing unit; the illumination unit provides a light source according to a preset optical power, and the imaging unit is capable of capturing a target image as a captured image; the image processing unit is capable of acquiring the captured image captured by the imaging unit, and the image processing unit comprises a memory and a processor, the memory and the processor being communicatively connected to each other, computer instructions being stored in the memory, and the processor executing the computer instructions to execute the endoscopic image imaging method described in any one of the above embodiments.
[0016] The present invention provides an endoscopic image imaging method and an endoscope, the endoscopic image imaging method comprising: acquiring a real-time acquisition image of an endoscope and light source parameters of the endoscope; locating a target light spot in the real-time acquisition image based on the light source parameters of the endoscope; suppressing the specular reflection component of a target area where the target light spot is located to obtain an endoscopic imaging image; the above method first locates the light spot in the real-time acquisition image based on the light source parameters to obtain the target light spot; further suppresses the specular reflection component of the target area where the target light spot is located, and can avoid global processing from destroying normal highlight areas such as highlighted bleeding points, highlighted mucosa, etc., while suppressing overexposed spots and restoring the original expression of the image. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0018] Figure 1 is a flow chart of an endoscopic imaging method according to an embodiment of the present invention;
[0019] Figure 2 Schematic diagram of the hardware structure of the endoscope according to an embodiment of the present invention. DETAILED DESCRIPTION
[0020] To make the purpose, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative efforts shall fall within the scope of protection of the present invention.
[0021] According to an embodiment of the present invention, an embodiment of an endoscopic image imaging method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0022] In one embodiment, the endoscopic imaging method is applied to an endoscope.
[0023] In one embodiment, the endoscope includes a lighting unit, an imaging unit and an image processing unit, wherein the image processing unit is used to execute the endoscopic image imaging method; under a pre-set or real-time determined light power of the lighting unit, the imaging unit can capture the target image as a real-time captured image or a historical captured image, and transmit the real-time captured image or the historical captured image to the image processing unit.
[0024] In this embodiment, an endoscopic imaging method is provided. Figure 1 FIG. 1 is a flow chart of an endoscopic imaging method according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:
[0025] Step S101: acquiring a real-time captured image of an endoscope and light source parameters of the endoscope.
[0026] For example, the real-time image captured by the endoscope can be obtained by the imaging unit included in the endoscope capturing the illumination unit illuminating the target object at a light power that is preset or determined in real time.
[0027] Exemplarily, the light source parameters of the endoscope may include light source spacing parameters.
[0028] Exemplarily, the light source spacing parameter is preset in the endoscope, and the light source spacing parameter can be determined by the endoscope model.
[0029] Step S102: locating a target light spot in the real-time acquired image based on the light source parameters of the endoscope.
[0030] After obtaining the light source parameters, the diameter range D of the circular template (D = d1mm~d2mm) can be constructed according to the light source parameters, and the target light spot can be further located in the real-time acquired image according to the diameter range of the circular template.
[0031] Endoscopes in related technologies, such as electronic thoracoscopes and bronchoscopes, are prone to forming circular over-exposure spots due to the light source layout of the scope when observing the target tissue at close range. Based on this, in one embodiment, the circular template can be a double-circle template, and the diameter range D (D=d1mm~d2mm) and the center distance L (L=l1mm~l2mm) of the circular template can be constructed according to the light source parameters. Further, the candidate area is matched in the real-time image acquisition based on the diameter range and the center distance range to obtain the target light spot.
[0032] Step S103 , suppressing the mirror reflection component of the target area where the target light spot is located to obtain an endoscopic imaging image.
[0033] When the endoscope is observing tissue at close range, circular overexposure spots appear in the captured image captured by the imaging unit due to the light source of the endoscope. The brightness of the captured image is usually determined by specular reflection and diffuse reflection, wherein diffuse reflection is usually obtained by tissue texture reflection. Based on this, in this embodiment, only specular reflection is suppressed to avoid global processing from destroying normal highlighted areas such as highlighted bleeding points and highlighted mucosa while suppressing overexposure spots and restoring the original expression of the image.
[0034] Exemplarily, when suppressing the mirror reflection component of the target area where the target light spot is located, a suppression coefficient can be set for the mirror reflection component, and the suppression coefficient is further multiplied by the mirror reflection component to obtain a corrected mirror reflection component, and finally the corrected mirror reflection component is used to obtain the endoscopic imaging image.
[0035] The endoscopic image imaging method of the present invention obtains a real-time acquisition image of an endoscope and the light source parameters of the endoscope; locates a target light spot in the real-time acquisition image based on the light source parameters of the endoscope; suppresses the mirror reflection component of the target area where the target light spot is located to obtain an endoscopic imaging image; the above method first locates the light spot in the real-time acquisition image based on the light source parameters to obtain the target light spot; further suppresses the mirror reflection component of the target area where the target light spot is located, which can avoid global processing from destroying normal highlight areas such as highlighted bleeding points, highlighted mucosa, etc., while suppressing overexposed spots and restoring the original expression of the image.
[0036] In one embodiment, the suppression coefficient may be a real number less than or equal to 1, so as to reduce the manifestation of the specular reflection component during imaging by using the real number suppression coefficient less than or equal to 1 when obtaining an endoscopic imaging image.
[0037] In one embodiment, the suppression coefficient may be a real number less than or equal to 1 and is positively correlated with the specular reflection component of the target area, so as to adaptively configure the suppression coefficient according to the size of the specular reflection component of the target area as a whole, thereby adaptively reducing the performance of the specular reflection component during imaging according to the size of the specular reflection component and the suppression coefficient.
[0038] In one embodiment, the suppression coefficient may be a real number less than or equal to 1, and is positively correlated with the specular reflection component or brightness value of the target pixels constituting the target light spot, so as to configure a suppression coefficient for each target pixel by individually considering the size adaptability of the specular reflection component of each pixel in the target pixel, and reduce the performance of the specular reflection component during imaging through the size adaptability of the specular reflection component of each pixel.
[0039] In one embodiment, since the specular reflection component or brightness value of the target light spot is generally in a manner that the center point of the target light spot is the maximum value and decreases outward, based on this, the suppression coefficient can be a real number less than or equal to 1 and is inversely correlated with the relative distance of the target pixel from the center point.
[0040] For example, for a circular target light spot, the center point of the light spot is the center of the circle.
[0041] Exemplarily, for a pair of light spots, the center point of the light spot may be the center point of the target pair of light spots.
[0042] As an exemplary embodiment, the mirror reflection component of the target area where the target light spot is located is suppressed to obtain an endoscopic imaging image, including: constructing a target neighborhood area corresponding to the target light spot; taking the reference brightness and reference color of the target neighborhood pixels in the target neighborhood area as a reference, and calculating the mirror reflection component of each target pixel based on the actual color and actual brightness of the target pixels constituting the target light spot; wherein, the target neighborhood area takes the center point of the target light spot as the geometric center and is determined by preset geometric parameters; based on the actual brightness and the relative distance of the target pixel relative to the center point, the brightness of the mirror reflection component is suppressed to obtain the corrected brightness of each target pixel; wherein, the degree of the brightness suppression is inversely correlated with the relative distance and positively correlated with the actual brightness.
[0043] In this embodiment, the specular reflection component of the target pixel of the target light spot is first calculated based on the reference brightness and reference color of the target neighborhood pixels in the target neighborhood area, and the brightness of the specular reflection component is further suppressed based on the actual brightness and relative distance of the target pixel.
[0044] Specifically, after obtaining the target light spot, a target neighborhood area corresponding to the target light spot is constructed; wherein the target neighborhood area takes the center point of the target light spot as the geometric center and is determined by preset geometric parameters.
[0045] For example, the target neighborhood area may be a circle with the center point of the target light spot as the center and a preset radius as the radius. The preset radius may be determined based on the light spot area and a preset proportional coefficient.
[0046] In one embodiment, the target neighborhood area is recorded as I 0, the area of the target neighborhood is recorded as A 0 , the area of the target spot is recorded as A spot , the preset proportional coefficient is recorded as I, but A 0 According to formula (1), we can get:
[0047] A 0 = A spot / i (1)
[0048] In formula (1), A 0 is the area of the target neighborhood, A spot is the area of the target spot, i is the preset scale factor.
[0049] In getting A 0 After that, the preset radius can be further obtained r 0.
[0050] Furthermore, after constructing the target neighborhood area, the reference brightness and reference color of the target neighborhood pixels in the target neighborhood area are used as a reference, and the specular reflection component of each target pixel is calculated based on the actual color and actual brightness of the target pixels constituting the target light spot.
[0051] Finally, the brightness of the specular reflection component is suppressed based on the actual brightness and the relative distance of the target pixel relative to the center point to obtain the corrected brightness of each target pixel; wherein the degree of the brightness suppression is inversely correlated with the relative distance and positively correlated with the actual brightness, so as to suppress the brightness of the specular reflection component based on the actual brightness and relative distance of each target pixel.
[0052] Exemplarily, when the reference brightness and reference color of the target neighborhood pixels in the target neighborhood area are used as a reference, and the mirror reflection component of each target pixel is calculated based on the actual color and actual brightness of the target pixels constituting the target light spot, for the target neighborhood pixels in the target neighborhood area, the pixels in the non-light spot area can be screened out, and the color corresponding to the pixels in the non-light spot area is used as the reference color, and the brightness of the pixels in the non-light spot area is used as the reference brightness. Further, based on the reference color and reference brightness, the actual color of the target pixels of the target light spot is matched with the reference color to obtain target similar pixels whose color similarity with each target pixel is greater than the preset color similarity. The diffuse reflection brightness of the target pixel is further determined according to the reference brightness of the target similar pixel, and finally the mirror reflection component of the target pixel is calculated based on the actual brightness and diffuse reflection brightness of the target pixel.
[0053] Exemplarily, the specular reflection component of the target pixel can also be calculated by a pre-trained specular reflection component model; wherein, the specular reflection component decomposition model can be trained using training image data containing multiple target light spots determined based on the light source parameters of the endoscope and the annotation results of the reflection components of each pixel in the training image data as a training data set, and in the process of model training, the correspondence between the overall characteristics of the image, the local characteristics of each pixel (color value and brightness value) and the reflection component is learned; further, after obtaining the specular reflection component decomposition model, the real-time collected image is input into the specular reflection component decomposition model to obtain the specular reflection component of each target pixel.
[0054] As an exemplary embodiment, the reference brightness and reference color of the target neighborhood pixels in the target neighborhood area are used as a reference, and the specular reflection component of each target pixel is calculated based on the actual color and actual brightness of the target pixels constituting the target light spot, including: obtaining a mapping relationship between the color in the target neighborhood area and the diffuse reflection brightness; determining the diffuse reflection brightness of the target pixel based on the actual color of the target pixel and the mapping relationship; and calculating the specular reflection component of the target pixel based on the actual brightness and the diffuse reflection brightness.
[0055] In this embodiment, the diffuse reflection brightness of the target pixel is determined based on the mapping relationship between the color and the diffuse reflection brightness in a predetermined target neighborhood area and the actual color of the target pixel, and the specular reflection component of the target pixel is further calculated based on the actual brightness and the diffuse reflection brightness of the target pixel.
[0056] Specifically, as an exemplary embodiment, the obtaining of the mapping relationship between the color and diffuse reflection brightness in the target neighborhood area includes: mapping the target neighborhood pixels from the RGB color space to the Lab color space to obtain the actual color value and actual brightness value of the target neighborhood pixels in the Lab color space; extracting the target neighborhood pixels based on the actual brightness value to obtain the neighborhood pixels to be sampled; wherein the actual brightness value of the neighborhood pixels to be sampled is less than the preset brightness value; dividing the neighborhood pixels to be sampled based on the color value range of the Lab color space to obtain sub-neighborhood pixels to be sampled in multiple grid units; in each of the grid units, extracting the median of the actual color value and actual brightness value corresponding to each sub-neighborhood pixel to be sampled as the sampling color value and sampling brightness value; constructing a two-dimensional lookup table based on the sampling color value and sampling brightness value to obtain the mapping relationship between the color and diffuse reflection brightness in the target neighborhood area.
[0057] In this embodiment, the target neighborhood pixel is mapped from the RGB color space to the Lab color space to obtain the actual color value and actual brightness value of the target neighborhood pixel in the Lab color space; wherein, the actual color value of the target neighborhood pixel in the Lab color space can be (a, b), which represents its value in the ab plane of the Lab space.
[0058] Furthermore, the target neighborhood pixels are extracted based on the actual brightness value to obtain the neighborhood pixels to be sampled; wherein the actual brightness value of the neighborhood pixels to be sampled is less than the preset brightness value, so as to obtain the neighborhood pixels to be sampled other than the target pixel representing the target light spot, and exclude pixels with overexposure interference; illustratively, when the target neighborhood pixels are extracted based on the actual brightness value, the actual brightness value is recorded as L , the sampling rule can be to select non-spot area and brightness L <L th Pixels, L th is the brightness threshold to exclude overexposed pixels.
[0059] Furthermore, the neighborhood pixels to be sampled are divided based on the color value range of the Lab color space to obtain sub-neighborhood pixels to be sampled within a plurality of grid units; specifically, in the Lab color space, the color value a is a∈[-128, 127], and the color value b is b∈[-128, 127], and the grid can be divided according to a∈[-128, 127] and b∈[-128, 127]; illustratively, the grid length can be a real number greater than 0, specifically, the grid length can be 1.
[0060] Furthermore, in each of the grid units, the median of the actual color value and the actual brightness value corresponding to each sub-sampled neighborhood pixel is extracted as the sampled color value and the sampled brightness value to obtain the general brightness performance of the target neighborhood pixel in the target neighborhood area under the specific color value a and the color value b.
[0061] Finally, a two-dimensional lookup table is constructed based on the sampled color values and the sampled brightness values to obtain the mapping relationship between the color and diffuse brightness in the target neighborhood area; specifically, a two-dimensional lookup table is constructed based on the sampled color values and the sampled brightness values. D ref (a,b)→ L diffuse , which represents the brightness value that should be obtained when the color coordinates are (a, b) under ideal diffuse reflection.
[0062] For example, after obtaining the mapping relationship between the color and diffuse reflection brightness in the target neighborhood area, the bilinear difference method is used to realize the diffuse reflection calculation of the target pixel; specifically, for the color ( a i , b i ) target pixel, find the four nearest reference grid points around it ( a 0, b 0), ( a 0, b 1), ( a 1, b 0), ( a 1, b 1), and use formula (2) to calculate the theoretical diffuse reflection brightness according to weighted interpolation:
[0063] (2)
[0064] In formula (2), Ldiffuse represents the calculated theoretical diffuse reflection luminance, D ref a 0, b 0), D ref a 0, b 1), D ref a 1, b 0) and D ref a 1, b 1) represent the theoretical diffuse reflection luminance of the reference grid points a 0, b 0), a 0, b 1), a 1, b 0) and a 1, b 1) based on the two-dimensional lookup table, a i b i represents the color value of the target pixel in the a-b plane corresponding to the Lab color space.
[0065] Further, the specular reflection component is calculated using formula (3):
[0066] (3)
[0067] In formula (3), is the actual luminance of the target pixel, and the difference is the specular reflection component of the target pixel.
[0068] As an exemplary embodiment, the luminance suppression of the specular reflection component based on the actual luminance and the relative distance of the target pixel relative to the center point to obtain the corrected luminance of each target pixel includes: calculating the normalized distance of each target pixel relative to the center point; calculating the luminance value difference of the actual luminance value of each target pixel relative to the maximum luminance value of the center point in a preset color space; determining the suppression weight at the time of luminance suppression based on the normalized distance and the luminance value difference; wherein the suppression degree of the luminance suppression is positively correlated with the suppression weight, the suppression weight is inversely correlated with the relative distance, and is positively correlated with the actual luminance; based on the suppression weight corresponding to each target pixel, the luminance of the specular reflection component is suppressed to obtain the luminance output value after suppression.
[0069] In this embodiment, in order to ensure the smoothness of brightness attenuation in the neighborhood of the light spot, a bilateral brightness attenuation method is used to perform brightness suppression to obtain the corrected brightness of each target pixel.
[0070] Specifically, for the target pixel within the target spot p , first calculate the normalized distance of each target pixel relative to the center point d(p) , d ∈[0,1]; where, for a single target light spot, the center point can be the geometric center of the target light spot; for paired target light spots, the center point can be the center point of the paired target light spots.
[0071] At the same time, for the target pixel p , calculate the actual brightness value of each target pixel V ( p ) relative to the maximum brightness value of the center point V max The brightness difference.
[0072] Furthermore, for the target pixel within the target spot p , and define the attenuation weight as oh ( p ),but oh ( p ) is determined based on the normalized distance and the brightness value difference; when brightness suppression is performed, the brightness output value after suppression is calculated using formula (4):
[0073] (4)
[0074] In formula (4), L out is the brightness output value after suppression, L diffuse ( p ) is the calculated theoretical diffuse reflection brightness, oh ( p ) is the attenuation weight, L specular ( p ) is the specular reflection component; wherein the degree of brightness suppression is positively correlated with the suppression weight, the suppression weight is inversely correlated with the relative distance and positively correlated with the actual brightness;
[0075] For example, the decay weight oh ( p ) can be determined by formula (5):
[0076] (5)
[0077] In formula (5), oh (p ) is the attenuation weight, d ( p ) is the normalized distance of the target pixel relative to the center point, d ∈[0,1], V ( p ) is the actual brightness value of the target pixel, V max is the brightness difference of the maximum brightness value of the center point of the target light spot, s d To control the spatial sensitivity parameter, sv is the brightness sensitivity parameter, s d and sv Can be determined by pre-calibration.
[0078] For example, after determining s d and sv When the calibration s d and sv So that the normalized distance and actual brightness value are determined oh ( p ), making the relative distance closer (i.e. d ( p ) is smaller), the actual brightness is higher (i.e. V The center of the spot (larger) obtains the maximum attenuation, and the farther the distance (i.e. d ( p ) is larger), the actual brightness is lower (i.e. V The falloff in the edge areas (smaller) is reduced to preserve the natural transition.
[0079] Exemplarily, the brightness value of the target pixel is obtained by obtaining the V value of the target pixel in the HSV space.
[0080] As an exemplary embodiment, the target light spot is positioned in the real-time acquisition image based on the light source parameters of the endoscope, including: performing correlation matching on the light spots to be screened in the real-time acquisition image to obtain candidate light spots whose actual correlation with the target double-circle template is greater than the preset correlation; wherein the target double-circle template is obtained by performing diameter range modeling and circle center distance modeling through the light source parameters; acquiring a historical acquisition image that is earlier than the real-time acquisition image in time sequence; screening the candidate light spots based on the actual circle center distance of the candidate light spots, the position change information and the area change information of the candidate light spots in the real-time acquisition image and the historical acquisition image to obtain the target light spot.
[0081] In this embodiment, when locating the target light spot in the real-time acquired image based on the light source parameters of the endoscope, correlation matching is first performed on the light spots to be screened in the real-time acquired image according to a pre-constructed double-circle template, and candidate light spots whose actual correlation is greater than a preset correlation are extracted from the light spots to be screened based on the correlation matching results; illustratively, the normalized cross-correlation method can be used to calculate the matching score between the light spot to be screened and the double-circle template, and the candidate areas whose actual scores are greater than the preset scores are screened as candidate light spots; illustratively, the preset score can be 0.85.
[0082] For the candidate light spots, further detailed screening is performed considering the temporal and spatial constraint positioning; specifically, the candidate light spots are screened based on the actual center distance of the candidate light spots, the position change information and area change information of the candidate light spots in the real-time acquisition image and the historical acquisition image.
[0083] Exemplarily, the screening of the candidate light spots based on the actual center distance of the candidate light spots, the position change information and the area change information of the candidate light spots in the real-time acquisition image and the historical acquisition image to obtain the target light spot includes: obtaining the actual center distance of each candidate light spot, the relative displacement and area change rate of each candidate light spot in the real-time acquisition image relative to the historical acquisition image; performing a first screening of the candidate light spots based on the actual center distance to obtain a first sub-candidate light spot whose actual center distance is in a preset center distance interval; performing a second screening of the candidate spots based on the relative displacement to obtain a second sub-candidate light spot whose relative displacement is less than the preset relative displacement; performing a third screening of the candidate spots based on the area change rate to obtain a third candidate sub-candidate light spot whose area change rate is less than the preset area change rate; and taking the common candidate light spot among the first sub-candidate spot, the second sub-candidate spot and the third candidate sub-candidate spot as the target light spot.
[0084] In this embodiment, the candidate light spots need to simultaneously satisfy the filtered spatial constraint, the second filtered time constraint, and the third filtered size constraint.
[0085] Specifically, during the first screening, the first sub-candidate light spot needs to meet the condition that the actual circle center distance is within a preset circle center distance interval; illustratively, the preset circle center distance interval is determined by a double circle template.
[0086] Exemplarily, the minimum value of the preset center distance interval is the minimum value of the center distance determined by the double circle template minus the preset pixel value, and the maximum value of the preset center distance interval is the maximum value of the center distance determined by the double circle template plus the preset pixel value; wherein, the preset pixel value can be 3.
[0087] Specifically, when performing the second screening, the second sub-candidate spot needs to meet the condition that the relative displacement is less than the preset relative displacement; illustratively, the preset relative displacement is set based on experience or offline experiments. In one embodiment, the preset relative displacement takes any value in the interval of [5 pixels, 15 pixels]. For example, the preset relative displacement is 10 pixels.
[0088] Specifically, when performing the third screening, the third sub-candidate spot needs to meet the condition that the area change rate is less than the preset area change rate; illustratively, the preset area change rate is set based on experience or offline experiments. In one embodiment, the preset area change rate takes any value in the range of [0.10, 0.20]. For example, the preset area change rate is 0.15.
[0089] In order to further restore the information authenticity of the endoscopic imaging image after the specular reflection component is suppressed, in the present invention, the image after the specular reflection component is suppressed is further repaired by using the color information and brightness information of the pixels not covered by the light spot in the historical acquisition image corresponding to the endoscopic imaging image; specifically, as an exemplary embodiment, after suppressing the specular reflection component of the target area where the target light spot is located, the endoscopic imaging method further includes: acquiring a historical acquisition image that is earlier in time than the real-time acquisition image; performing multimodal feature extraction on the target neighborhood area where the target light spot is located to obtain multimodal features of the target neighborhood area; wherein the multimodal features include image attribute features and object attribute features; based on the image attribute features and object attribute features, feature matching is performed in the historical acquisition image to obtain a historical cross-frame matching area with an actual matching degree greater than a preset matching degree; in the historical cross-frame matching area, target historical pixels not covered by the target light spot are extracted; and based on the position, color and actual matching degree of the target historical pixels, the target neighborhood pixels in the target neighborhood area corresponding to the position are corrected to obtain the endoscopic imaging image.
[0090] In this embodiment, a historical acquisition image that is earlier in time than the real-time acquisition image is acquired, and a historical cross-frame matching area is further matched in the historical image based on the image attribute features and object attribute features of the multimodal features, and the target neighborhood pixels are further corrected based on the position, color and matching degree of the target historical pixels not covered by the target light spot in the historical cross-frame matching area; wherein, exemplarily, the historical acquisition image is an adjacent frame that is adjacent in time to the real-time acquisition image.
[0091] For example, the multimodal features may include image attribute features such as SIFT feature points, object attribute features such as LBP local texture feature histograms, blood vessel saliency mask features, and the like.
[0092] Specifically, when extracting SIFT feature points from the target neighborhood area, the standard SIFT calculation method is applied to the V channel of the HSV color space: Gaussian difference scale space is calculated to extract key points greater than a preset number, wherein the key points need to eliminate low-contrast points whose response values are less than the preset response values, and the direction assignment adopts the gradient histogram peak method to retain the actual peak value greater than the preset secondary peak value, and finally the SIFT feature points of the target neighborhood area are obtained and recorded as S 1; wherein, illustratively, the preset response value may be 0.05, and the preset peak value may be 0.8 times the peak value.
[0093] Specifically, when performing LBP local texture feature histogram extraction on the target neighborhood area where the target light spot is located, the standard LBP calculation method is applied to the L channel of the LAB color space: neighborhood comparison and LBP value are obtained, the image is divided into blocks and the LBP value histogram of each block is counted, and the features of all blocks are connected in series to obtain the LBP local texture feature histogram.
[0094] Specifically, when extracting saliency mask features of blood vessels from the target neighborhood area where the target light spot is located, a Frangi filter response value is calculated for the target neighborhood area, and a binary mask image is generated for pixels whose filter response value is greater than a preset response value.
[0095] Furthermore, feature matching is performed in the historically collected images based on the image attribute features and the object attribute features to obtain a historical cross-frame matching area with an actual matching degree greater than a preset matching degree; specifically, a historical cross-frame matching area with a feature matching degree greater than a preset feature matching degree is searched in the historically collected images; the feature matching degree
[0096] S match It can be calculated using formula (6):
[0097] (6)
[0098] in, S match is the actual matching degree calculated, S 1 is the SIFT feature matching point pair between the target neighborhood area of the historical acquisition image and the real-time acquisition image, S th1 is the SIFT feature matching point pair threshold; S 2 is the similarity of the LBP texture histogram of the target neighborhood area between the historical acquisition image and the real-time acquisition image, S th2 is the LBP-texture histogram similarity threshold; S 3 is the overlap between the blood vessel mask images of the target neighborhood area of the historical acquisition image and the real-time acquisition image, Sth3 The blood vessel mask coincidence threshold.
[0099] When the actual matching degree is greater than the preset matching degree, it is considered that the cross-frame matching is successful; wherein, the preset matching degree can take any value in the interval [0.75, 0.85]; exemplarily, the preset matching degree takes 0.8.
[0100] After the cross-frame matching is successful, the target historical pixel in the historical cross-frame matching region which is not covered by the light spot is extracted; exemplarily, the target historical pixel is denoted as (x, y)T. N × N )。
[0101] Further, the target neighbor pixel in the target neighbor region corresponding to the position is corrected based on the position, color and actual matching degree of the target historical pixel, to obtain the endoscope imaging image.
[0102] Exemplarily, the target neighbor pixel in the target neighbor region corresponding to the position can be corrected based on the position, color and actual matching degree of the target historical pixel in a weighted fusion manner; specifically, a first fusion weight of the target historical pixel in fusion and a second fusion weight of the target neighbor pixel in fusion are determined respectively, and further, the color value and brightness value of the target historical pixel and the target neighbor pixel are fused through the first fusion weight and the second fusion weight by weight, to obtain the endoscope imaging image.
[0103] Exemplarily, in order to compensate for the scale change caused by the slight advance and retreat of the real-time acquisition image and the historical acquisition image and the endoscope, eliminate the displacement caused by the patient's breathing or the operator's hand shaking, and eliminate the displacement caused by the patient's breathing or the operator's hand shaking, in the present application, an affine transformation matrix is further calculated based on the historical cross-frame matching region and the target neighbor region, affine transformation alignment is performed, and the target neighbor pixel is corrected based on the affine transformation matrix.
[0104] Specifically, the correction of the target neighbor pixel in the target neighbor region corresponding to the position based on the position, color and actual matching degree of the target historical pixel comprises: affine transformation alignment of the historical cross-frame matching region and the target neighbor region based on the target historical pixel, to obtain an affine transformation matrix; coordinate mapping transformation based on the coordinate of the target historical pixel and the affine transformation matrix, to obtain the transformed coordinate of the target historical pixel; extraction of a to-be-corrected neighbor pixel in the target neighbor pixel based on the transformed coordinate; fusion of a first pixel value of the target historical pixel and a second pixel value of the to-be-corrected neighbor pixel based on the actual matching degree, to obtain a corrected pixel value of the to-be-corrected neighbor pixel; wherein, the first pixel value is positively correlated with the actual matching degree in fusion, and the second pixel value is inversely correlated with the actual matching degree in fusion.
[0105] In this embodiment, the historical cross-frame matching area and the target neighborhood area are aligned by affine transformation based on the target historical pixels not covered by the target spot to obtain an affine transformation matrix; for example, the radiation change matrix is recorded as
[0106] T , ,in, a , d is the scaling factor, which is used to compensate for the scale change caused by slight advancement and retreat of the endoscope; b 、 c is the rotation factor, which is used to cope with the torsion of the soft lens or the curvature of the organ surface; t x 、 t y is the pixel translation amount to eliminate the displacement caused by the patient's breathing or the operator's hand tremor.
[0107] In getting T Afterwards, the coordinates of the target historical pixels ( x pre , y pre ) Use formula (7) to calculate the coordinate mapping:
[0108] (7)
[0109] In formula (7), ( x pre , y pre ) represents the coordinates of the target historical pixel, a , d is the scaling factor, b 、 c is the rotation factor, t x 、 t y is the pixel translation amount, ( x cur , y cur ) is the transformed coordinate of the target historical pixel.
[0110] Furthermore, based on the transformed coordinates, the neighboring pixels to be corrected are extracted from the target neighboring pixels, and ( x pre , y pre ) indicates that the RGB value corresponding to the coordinate of the target historical pixel is assigned to the target neighborhood pixel ( x cur , y cur ) coordinate point.
[0111] As a further embodiment, when correcting the neighborhood pixel to be corrected, the actual matching degree is further considered for fusion; specifically, as an exemplary embodiment, the first pixel value of the target historical pixel and the second pixel value of the neighborhood pixel to be corrected are fused based on the actual matching degree to obtain the corrected pixel value of the neighborhood pixel to be corrected; wherein, the first pixel value is positively correlated with the actual matching degree when fused, and the second pixel value is negatively correlated with the actual matching degree when fused.
[0112] For example, the first pixel value is recorded as P 1, the second pixel value is recorded as P 2. The corrected pixel value of the final fused neighborhood pixel to be corrected is recorded as P out , use formula (8) to fuse the first pixel value and the second pixel value to obtain the corrected pixel value of the neighboring pixel to be corrected:
[0113] (8)
[0114] In formula (8), P out Indicates the corrected pixel value of the neighborhood pixel to be corrected, P 1 represents the first pixel value, P 2 represents the second pixel value, k represents the adjustment parameter, S match is the actual matching degree calculated.
[0115] An embodiment of the present invention also provides an endoscope, comprising an illumination unit, an imaging unit and an image processing unit; the illumination unit provides a light source according to a preset light power, the imaging unit can capture a target image as a captured image; the image processing unit can obtain the captured image captured by the imaging unit.
[0116] The image processing unit includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus, the memory is used to store computer programs; the processor is used to execute the method in any of the above embodiments by running the computer program stored in the memory.
[0117] Figure 2 is a structural block diagram of an optional endoscope according to an embodiment of the present application, such as Figure 2 As shown, it includes a processor 10, a communication interface 20, a memory 30 and a communication bus 40, wherein the processor 10, the communication interface 20 and the memory 30 communicate with each other through the communication bus 40, wherein,
[0118] Memory 30, for storing computer programs;
[0119] The processor 10 is configured to implement the endoscopic imaging method of any of the above embodiments when executing the computer program stored in the memory 30 .
[0120] Optionally, in this embodiment, the communication bus may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The communication bus may be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, Figure 2 Only one thick line is used in the diagram, but this does not mean that there is only one bus or one type of bus.
[0121] The communication interface is used for communication between the endoscope and other devices.
[0122] The memory may include RAM, or may include non-volatile memory, such as at least one disk memory. Alternatively, the memory may also be at least one storage device located away from the aforementioned processor.
[0123] The above-mentioned processor can be a general-purpose processor, which can include but is not limited to: CPU (Central Processing Unit), NP (Network Processor), etc.; it can also be DSP (Digital Signal Processing), ASIC (Application Specific Integrated Circuit), FPGA (Field-Programmable Gate Array) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0124] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment will not be described in detail here.
[0125] It can be understood by those skilled in the art that Figure 2The structure shown is for illustration only. The device for implementing any one of the methods in the above embodiments may be a terminal device, which may be a smart phone (such as an Android phone, an IOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (MID), a PAD, or other terminal devices. Figure 2 It does not limit the structure of the above electronic device. For example, the terminal device may also include Figure 2 More or fewer components (such as network interfaces, display devices, etc.) shown in, or with Figure 2 Different configurations shown.
[0126] A person skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, which can include: a flash drive, ROM, RAM, a magnetic disk or an optical disk, etc.
[0127] The serial numbers of the above embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0128] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above-mentioned computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for causing one or more endoscopes (which can be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the method in the above embodiments.
[0129] In the several embodiments provided in this application, it should be understood that the disclosed client can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is merely a logical functional division. In actual implementation, there may be other division methods, such as combining or integrating multiple units or components into another system, or ignoring or not implementing some features. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interface, indirect coupling or communication connection of units or modules, and may be electrical or other forms.
[0130] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected based on actual needs to achieve the purpose of the solution provided in this embodiment.
[0131] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0132] In the above embodiments of the present application, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0133] The above is only a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. An endoscopic imaging method, characterized in that: The endoscopic imaging method comprises: Acquiring a real-time captured image of an endoscope and light source parameters of the endoscope; Positioning a target light spot in the real-time acquired image based on the light source parameters of the endoscope; Suppressing the specular reflection component of the target area where the target light spot is located to obtain an endoscopic imaging image includes: Constructing a target neighborhood area corresponding to the target light spot; wherein the target neighborhood area is determined by preset geometric parameters with the center point of the target light spot as the geometric center; Taking the reference brightness and reference color of the target neighborhood pixels in the target neighborhood area as a reference, and calculating the specular reflection component of each target pixel based on the actual color and actual brightness of the target pixels constituting the target light spot; The brightness of the specular reflection component is suppressed based on the actual brightness and the relative distance of the target pixel relative to the center point to obtain a corrected brightness of each target pixel; wherein the degree of the brightness suppression is inversely correlated with the relative distance and positively correlated with the actual brightness.
2. The endoscopic imaging method according to claim 1, wherein: The step of calculating the specular reflection component of each target pixel based on the actual color and actual brightness of the target pixels constituting the target light spot, taking the reference brightness and reference color of the target neighborhood pixels in the target neighborhood area as a reference, includes: Obtaining a mapping relationship between color and diffuse reflection brightness within the target neighborhood area; determining the diffuse reflection brightness of the target pixel based on the actual color of the target pixel and the mapping relationship; The specular reflection component of the target pixel is calculated based on the actual brightness and the diffuse reflection brightness.
3. The endoscopic imaging method according to claim 2, wherein: The obtaining of the mapping relationship between the color and the diffuse reflection brightness in the target neighborhood area includes: Mapping the target neighborhood pixel from the RGB color space to the Lab color space to obtain the actual color value and actual brightness value of the target neighborhood pixel in the Lab color space; Extracting the target neighborhood pixels based on the actual brightness value to obtain neighborhood pixels to be sampled; wherein the actual brightness value of the neighborhood pixels to be sampled is less than a preset brightness value; Dividing the to-be-sampled neighborhood pixels based on a color value range of the Lab color space to obtain sub-to-be-sampled neighborhood pixels within a plurality of grid cells; In each of the grid cells, the median of the actual color value and the actual brightness value corresponding to each sub-neighborhood pixel to be sampled is extracted as the sampled color value and the sampled brightness value; A two-dimensional lookup table is constructed based on the sampled color values and the sampled brightness values to obtain a mapping relationship between the color and diffuse reflection brightness in the target neighborhood area.
4. The endoscopic imaging method according to claim 1, wherein: The suppressing the brightness of the specular reflection component based on the actual brightness and the relative distance of the target pixel relative to the center point to obtain the corrected brightness of each target pixel includes: Calculating the normalized distance of each target pixel relative to the center point; Calculating the brightness difference between the actual brightness value of each target pixel and the maximum brightness value of the center point in a preset color space; Determining a suppression weight for brightness suppression based on the normalized distance and the brightness value difference; wherein the degree of brightness suppression is positively correlated with the suppression weight, and the suppression weight is inversely correlated with the relative distance and positively correlated with the actual brightness; The luminance of the specular reflection component is suppressed based on the suppression weight corresponding to each of the target pixels to obtain a suppressed luminance output value.
5. The endoscopic imaging method according to claim 1, wherein: Positioning a target light spot in the real-time acquired image based on the light source parameters of the endoscope includes: performing correlation matching on the light spots to be screened in the real-time collected image to obtain candidate light spots whose actual correlation with the target double-circle template is greater than a preset correlation; wherein the target double-circle template is obtained by modeling the diameter range and the center distance of the circle using the light source parameters; Acquiring a historically acquired image that is earlier in time sequence than the real-time acquired image; The candidate light spots are screened based on the actual center distance of the candidate light spots, and the position change information and area change information of the candidate light spots in the real-time acquisition image and the historical acquisition image to obtain the target light spot.
6. The endoscopic imaging method according to claim 5, wherein: The screening of the candidate light spots based on the actual center distance of the candidate light spots, the position change information and the area change information of the candidate light spots in the real-time acquired image and the historical acquired image to obtain the target light spot includes: Obtaining the actual center distance of each candidate light spot, the relative displacement and area change rate of each candidate light spot in the real-time acquired image relative to the historical acquired image; Performing a first screening of the candidate light spots based on the actual circle center distance to obtain a first sub-candidate light spot whose actual circle center distance is within a preset circle center distance interval; Performing a second screening on the candidate light spots based on the relative displacement to obtain a second sub-candidate light spot whose relative displacement is smaller than a preset relative displacement; Performing a third screening on the candidate light spots based on the area change rate to obtain a third candidate sub-candidate light spot whose area change rate is less than a preset area change rate; A common candidate light spot among the first sub-candidate light spot, the second sub-candidate light spot and the third sub-candidate light spot is taken as the target light spot.
7. The endoscopic imaging method according to claim 1, wherein: After suppressing the specular reflection component of the target area where the target light spot is located, the endoscopic image forming method further includes: Acquiring a historically acquired image that is earlier in time sequence than the real-time acquired image; Performing multimodal feature extraction on a target neighborhood area where the target light spot is located to obtain multimodal features of the target neighborhood area; wherein the multimodal features include image attribute features and object attribute features; Performing feature matching in the historically collected images based on the image attribute features and the object attribute features to obtain a historical cross-frame matching area where the actual matching degree is greater than a preset matching degree; Extracting target historical pixels not covered by the target light spot in the historical cross-frame matching area; The target neighborhood pixels in the target neighborhood area corresponding to the position are corrected based on the position, color and actual matching degree of the target historical pixels to obtain the endoscopic imaging image.
8. The endoscopic imaging method according to claim 7, wherein: The correcting the target neighborhood pixel in the target neighborhood area corresponding to the position based on the position, color and actual matching degree of the target historical pixel includes: Performing affine transformation alignment on the historical cross-frame matching area and the target neighborhood area based on the target historical pixels to obtain an affine transformation matrix; Performing coordinate mapping transformation based on the coordinates of the target historical pixel and the affine transformation matrix to obtain the transformed coordinates of the target historical pixel; Extracting neighboring pixels to be corrected from the target neighboring pixels based on the transformed coordinates; Based on the actual matching degree, the first pixel value of the target historical pixel and the second pixel value of the neighborhood pixel to be corrected are fused to obtain the corrected pixel value of the neighborhood pixel to be corrected; wherein, the first pixel value is positively correlated with the actual matching degree when fused, and the second pixel value is negatively correlated with the actual matching degree when fused.
9. An endoscope, characterized in that: include: An illumination unit, an imaging unit, and an image processing unit; the illumination unit provides a light source according to a preset light power, and the imaging unit is capable of capturing a target image as a captured image; The image processing unit is capable of acquiring the acquired image acquired by the imaging unit. The image processing unit includes a memory and a processor. The memory and the processor are communicatively connected to each other. Computer instructions are stored in the memory. The processor executes the computer instructions to execute the endoscopic image imaging method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Endoscope imaging system and image processing method thereof
CN119006401A