Image processing method and device
By performing fusion processing of multispectral and autofluorescence images on endoscopic images to extract and fuse features, the problem of lack of depth resolution and functional information in endoscopic imaging technology is solved, and the accuracy of esophageal diagnosis and treatment efficiency are improved. real-time.
Patent Information
- Application Number
- CN202410904656.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-08
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2044-07-08
AI Technical Summary
Existing endoscopic imaging technology has limited imaging bands, limited modes, poor tissue depth resolution, inability to provide tissue functional information, and is susceptible to uneven light sources and liquid contamination in esophageal diagnosis, resulting in low imaging signal-to-noise ratio and poor image quality. Aberrations, lack of combination of real-time diagnosis and treatment.
Through image processing methods, multispectral images and autofluorescence images are combined to perform minimum value extraction, image intensity correction, multi-scale convolution and atrous convolution to extract local orthogonal components to achieve the fusion of tissue imaging features at different depths and improve imaging. quality and diagnostic accuracy.
It improves the depth resolution of esophageal endoscopic imaging and the acquisition of functional imaging information, enhances the diagnostic ability of esophageal lesions, enables drug administration while performing real-time imaging, and improves the diagnosis and treatment effect.
Smart Images

Figure CN118446910B
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of computer technology and image processing technology, and more specifically to an image processing method and device. Background Art
[0002] As a direct and efficient means of esophageal diagnosis, endoscopy plays an important role in clinical practice. Based on the images collected by the endoscope, the lesions of the internal tissues of the esophagus can be directly observed, and the location information of the lesions can be provided for drug treatment, thus improving the efficiency of clinical diagnosis and treatment.
[0003] Related technologies usually combine endoscopy with optical staining technology to obtain images corresponding to the esophagus, and distinguish the optical properties of different depths and different tissues based on the image to provide esophageal lesion information for clinical diagnosis.
[0004] In the process of implementing the present invention, it was found that the related technologies have at least the following problems: the images obtained by endoscopy and optical staining technology reflect fewer tissue details in the esophagus, have poor tissue depth resolution, and lack functional imaging information that can further reveal the physiological and pathological changes of the tissue. In addition, since digestive tract endoscopic imaging is easily affected by uneven light sources and liquid contamination inside the digestive tract, the imaging signal-to-noise ratio is low, and image distortion, blurring and ghosting are easily generated, resulting in poor imaging quality. Summary of the invention
[0005] In view of the above problems, the present invention provides an image processing method and device.
[0006] According to a first aspect of the present invention, there is provided an image processing method, the method comprising:
[0007] For a predetermined rectangular window, a minimum value extraction is performed on the occluded blurred area in the original image to obtain a dark channel image, wherein the original image includes a channel layer corresponding to a multispectral image and a channel layer corresponding to an autofluorescence image, and the multispectral image and the autofluorescence image are obtained by simultaneously collecting the detected target using an endoscope; an image intensity correction parameter is obtained by averaging pixels greater than a predetermined pixel value in the dark channel image; according to the image intensity correction parameter, a defogging process and a nonlinear correction are sequentially performed on the occluded blurred area in the original image to obtain a nonlinear corrected image; a multi-scale convolution is performed on the nonlinear corrected image to obtain a global feature; a dilated convolution and a self-attention feature extraction are sequentially performed on the nonlinear corrected image to obtain a local feature; a local orthogonal component orthogonal to the global feature is extracted from the local feature; and the local orthogonal component is fused with the global feature to obtain a fused image.
[0008] A second aspect of the present invention provides an image processing device, the device comprising:
[0009] The first obtaining module is used to perform minimum value extraction on the occluded blurred area in the original image according to a predetermined rectangular window to obtain a dark channel image, wherein the original image includes a channel layer corresponding to the multispectral image and a channel layer corresponding to the autofluorescence image, and the multispectral image and the autofluorescence image are obtained by simultaneously collecting the detected target using an endoscope;
[0010] A second obtaining module is used to average the pixels in the dark channel image that are greater than a predetermined pixel value to obtain an image intensity correction parameter;
[0011] A third obtaining module is used to perform defogging and nonlinear correction on the occluded and blurred areas in the original image in sequence according to the image intensity correction parameters to obtain a nonlinear corrected image;
[0012] The fourth obtaining module is used to perform multi-scale convolution on the nonlinear correction image to obtain global features;
[0013] The fifth obtaining module is used to perform hole convolution and self-attention feature extraction on the above nonlinear correction image in sequence to obtain local features;
[0014] An extraction module, used for extracting local orthogonal components orthogonal to the global features from the local features;
[0015] The sixth obtaining module is used to fuse the above local orthogonal components with the above global features to obtain a fused image.
[0016] According to an embodiment of the present invention, by performing minimum value extraction on the occluded blurred area in the original image according to a predetermined rectangular window, a dark channel image corresponding to the autofluorescence image and the multispectral image in the foggy occluded area of the original image can be obtained, and then the pixels in the dark channel image that are greater than a predetermined pixel value are averaged to obtain image intensity correction parameters. According to the image intensity correction parameters, the occluded blurred area in the original image is defogged and nonlinearly corrected in sequence to obtain a nonlinear corrected image, so as to improve the details of the darker pixels in the defogged image after correcting the influence of internal liquid contamination of the digestive tract on the occluded blurred area, thereby improving the quality of the data corresponding to the multispectral image and the autofluorescence image in the obtained nonlinear corrected image. Since the data corresponding to the autofluorescence image in the nonlinear corrected image reflects the characteristics of the deeper tissues in the detected target, and the data corresponding to the multispectral image reflects the characteristics of the shallower tissues in the detected target, multi-scale convolution is performed on the nonlinear corrected image to obtain global features, and hole convolution and self-attention feature extraction are performed on the nonlinear corrected image in turn to obtain local features. Local orthogonal components orthogonal to the global features are extracted from the local features to obtain features that can further reveal the physiological and pathological changes of the detected target. The local orthogonal components are fused with the global features to obtain a fused image, thereby realizing the fusion of imaging features of tissues at different depths, and obtaining an image that more comprehensively reflects the characteristics of the physiological and pathological changes of the detected target in deep and shallow tissues. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The above contents and other objects, features and advantages of the present invention will become more apparent through the following description of the embodiments of the present invention with reference to the accompanying drawings, in which:
[0018] Figure 1 An application scenario diagram of an image processing method according to an embodiment of the present invention is shown;
[0019] Figure 2 A flowchart of an image processing method according to an embodiment of the present invention is shown;
[0020] Figure 3 A schematic structural diagram of an endoscope according to an embodiment of the present invention is shown;
[0021] Figure 4 A structural block diagram of an image processing device according to an embodiment of the present invention is shown; and
[0022] Figure 5 A block diagram of an electronic device suitable for implementing an image processing method according to an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0023] Below, embodiments of the present invention will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present invention. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of embodiments of the present invention. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of concepts of the present invention.
[0024] The terms used herein are only for describing specific embodiments and are not intended to limit the present invention. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.
[0025] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.
[0026] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0027] Esophagitis is a common digestive tract disease. It is caused by certain reasons or stimulations that lead to edema, congestion and other adverse symptoms in the esophageal mucosa. If it is not treated actively, it is likely to cause more serious symptoms and may even lead to esophageal cancer. The causes of esophageal diseases are complex and can be caused by infection, stimulation, injury or esophageal endometritis. The clinical manifestations are mainly acid reflux, esophageal obstruction, heartburn, and pain behind the sternum. Common esophagitis includes radiation esophagitis, suppurative esophagitis, reflux esophagitis, corrosive esophagitis, eosinophilic esophagitis, etc., which are more harmful and can induce pharyngitis, esophageal stenosis, asthma, angina pectoris and other diseases. After the symptoms related to esophagitis appear, timely diagnosis and treatment play a very critical role in improving the treatment effect and preventing other complications.
[0028] Drug therapy is the most effective way to treat esophageal diseases, and the therapeutic effects of different drug delivery methods vary greatly. Some methods, such as capsule delivery, drug delivery in a barrel, and air bag delivery, cannot achieve precise drug delivery, are not targeted at the prone areas of esophagitis, and can cause patients to feel more uncomfortable. The operation is cumbersome, which brings certain difficulties to clinical diagnosis and treatment.
[0029] As a direct and efficient means of esophageal diagnosis, endoscopy plays an important role in clinical practice. Endoscopy can be used to directly observe the pathological changes in the internal tissues of the esophagus and provide lesion location information for drug treatment, thereby improving the efficiency of clinical diagnosis and treatment. However, existing endoscopes have problems such as a single imaging method and the imaging quality is easily affected by various in-body interferences. Improving the imaging quality of endoscopes and combining the endoscope device with a drug delivery device to locate the esophageal lesions and provide drug treatment while performing real-time imaging are of great significance and application value for improving the diagnosis and treatment of esophageal diseases.
[0030] Commonly used endoscopic imaging devices in clinical practice mainly use illumination light of different wavelengths to illuminate biological tissues based on the optical properties of biological tissues. After the incident light is reflected, scattered, and absorbed by the tissues, it is imaged by the endoscope lens, CCD (Charge-Coupled Device), etc. The image texture, brightness, and color information reflect the internal structure and composition of the tissue. According to the tissue composition and the absorption, reflection, and scattering characteristics of light in the tissue, the absorption of water, blood, bilirubin, fat, and melanin in the tissue plays a major role. In the range of 400-1000nm, the longer the wavelength, the greater the penetration depth of the tissue. For lesions of the gastrointestinal mucosa, information such as hemoglobin content can better characterize the type of disease, the depth of the lesion, and the stage of progression. In order to improve the accuracy of diagnosis, optical endoscopes often use optical staining technology to distinguish the optical properties of different depths and different tissues, providing more abundant information for clinical diagnosis.
[0031] However, esophageal endoscopic imaging currently faces the following technical problems that need to be solved:
[0032] (1) Limited imaging bands. Current optical staining technology relies on specific illumination bands. Although it can highlight the structural features of certain tissues, it cannot fully display all possible relevant tissue details, limiting the diagnostic effect of complex lesions.
[0033] (2) Limited imaging modalities. Currently, endoscopic imaging mainly reflects tissue absorption, scattering, and reflection information. However, some light will be absorbed by the tissue's fluorophores to produce autofluorescence. Although this fluorescence is very weak, it can reflect tiny lesions inside the tissue and plays a very important role in disease diagnosis. However, current endoscopic imaging devices are limited by resolution, signal-to-noise ratio, etc., and cannot image tissue autofluorescence.
[0034] (3) Poor tissue depth resolution. Many optical staining technologies for endoscopic imaging are designed mainly to take into account the imaging needs of superficial tissues. They lack the ability to image deeper tissues, which limits their application in disease diagnosis.
[0035] (4) Unable to provide tissue functional information. Commonly used optical staining techniques use different wavelength illumination image fusion. Although it can provide structural imaging of tissues and reflect tissue morphological information, it lacks functional imaging information that can further reveal the physiological and pathological changes of tissues.
[0036] (5) Since digestive tract endoscopic imaging is easily affected by uneven light sources and liquid contamination inside the digestive tract, the imaging signal-to-noise ratio is low and image distortion, blurring and ghosting are easily produced. Filters are used for filtering in multispectral and fluorescence imaging, which have a large attenuation of light intensity and also affect the imaging quality to a certain extent. During the drug administration process, part of the imaging area may be blocked due to liquid obstruction and high reflection, affecting the doctor's observation and diagnosis.
[0037] (6) Simple structure. Usually, it cannot be organically combined with a drug delivery device, and it is impossible to deliver drugs to the lesion site while performing real-time imaging, thus achieving integrated diagnosis and treatment.
[0038] In order to at least partially solve the technical problems existing in the related art, the embodiments of the present invention provide an image processing method and apparatus, which can be applied to the fields of computer technology and image processing technology.
[0039] Figure 1 An application scenario diagram of the image processing method according to an embodiment of the present invention is shown.
[0040] like Figure 1 As shown, the application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 is used to provide a medium for a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.
[0041] The user can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only for example).
[0042] The first terminal device 101, the second terminal device 102, and the third terminal device 103 may be various electronic devices having display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.
[0043] The server 105 may be a server that provides various services, such as a background management server (only as an example) that provides support for websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The background management server may analyze and process the received data such as user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.
[0044] It should be noted that the image processing method provided in the embodiment of the present invention can generally be executed by the server 105. Accordingly, the image processing device provided in the embodiment of the present invention can generally be set in the server 105. The image processing method provided in the embodiment of the present invention can also be executed by a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105. Accordingly, the image processing device provided in the embodiment of the present invention can also be set in a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105.
[0045] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0046] The following will be based on Figure 1 The scene described by Figure 2~Figure 3 The image processing method according to the embodiment of the present invention is described in detail.
[0047] Figure 2 A flow chart of an image processing method according to an embodiment of the present invention is shown.
[0048] like Figure 2 As shown, the image processing method of this embodiment includes operations S210 to S270.
[0049] In operation S210, a minimum value extraction is performed on the occluded blurred area in the original image according to a predetermined rectangular window to obtain a dark channel image, wherein the original image includes a channel layer corresponding to the multispectral image and a channel layer corresponding to the autofluorescence image, and the multispectral image and the autofluorescence image are obtained by simultaneously collecting the detected target using an endoscope.
[0050] According to an embodiment of the present invention, the detected target may be the esophagus. The multispectral image may be an image of light reflected by the endoscope from the mucosal surface of the esophagus. The autofluorescence image may be an image of the autofluorescence of the deep tissue of the esophagus from the endoscope. Therefore, the multispectral image may reflect the characteristics of the superficial tissue of the esophagus, and the autofluorescence image may reflect the characteristics of the deep tissue of the esophagus.
[0051] For example, an endoscope can be used to simultaneously emit white light and green light to the esophagus, the esophagus reflects the white light, and then the endoscope is used to filter the light reflected from the esophagus and then image it to obtain a multispectral image. The internal tissue of the esophagus emits autofluorescence based on the irradiated green light, and then the endoscope is used to filter the autofluorescence emitted by the esophagus and then image it to obtain an autofluorescence image. Among them, the multispectral image can include an image corresponding to red light, an image corresponding to green light, and an image corresponding to blue light.
[0052] According to an embodiment of the present invention, the original image includes a channel layer corresponding to the autofluorescence image, which stores the autofluorescence image. The original image includes a channel layer corresponding to the multispectral image, which stores the multispectral image.
[0053] According to the embodiment of the present invention, the image processing method provided by the embodiment of the present invention can assume that during the imaging process, in the image blur and occlusion area, there is always at least one band whose channel value is close to 0, which is called a dark band, and the image corresponding to the dark band is a dark channel image. The dark channel image J dark The mathematical expression of can be (1).
[0054] (1)
[0055] Where Ω(x) represents a predetermined rectangular window centered at pixel x; λ n represents all the spectral bands used to collect the original image; c represents one of the spectral channels, J C represents any spectral channel image of the occluded blurred area J; y represents any pixel in the predetermined rectangular window.
[0056] According to the embodiment of the present invention, the predetermined rectangular window may be selected according to actual conditions and is not limited here.
[0057] In operation S220, pixels in the dark channel image that are greater than a predetermined pixel value are averaged to obtain an image intensity correction parameter.
[0058] According to an embodiment of the present invention, the predetermined pixel value may be selected according to actual conditions and is not limited herein. dark The pixel values in are sorted from large to small, and then the pixel values of the first 0.1% brightness are extracted, and the minimum value of the pixel values of the first 0.1% brightness is determined as the predetermined pixel value.
[0059] According to an embodiment of the present invention, from the dark channel image J dark The matrix consisting of pixels greater than the predetermined pixel value extracted from the image can be expressed as M(x). The image intensity correction parameter obtained by averaging all elements in M(x) can be recorded as m av .
[0060] In operation S230, defogging and nonlinear correction are sequentially performed on the occluded blurred area in the original image according to the image intensity correction parameters to obtain a nonlinear corrected image.
[0061] According to an embodiment of the present invention, a suitable intensity ratio coefficient can be determined based on the image intensity correction parameters, and the occluded blurred area in the original image can be dehazed using the suitable intensity ratio coefficient to correct the impact of internal liquid contamination in the digestive tract on the occluded blurred area, thereby obtaining a more natural de-occluded image.
[0062] According to an embodiment of the present invention, the non-linear correction may be a gamma correction.
[0063] According to the embodiment of the present invention, a suitable gamma correction coefficient can be determined according to the image intensity correction parameter, and gamma correction is performed on the defogged image according to the suitable gamma correction coefficient to obtain a nonlinear corrected image.
[0064] According to an embodiment of the present invention, after defogging the occluded blurred area in the original image, the intensity of the defogged image obtained is equal to the image intensity correction parameter m av Related, m av Affects the brightness of the output image. When the original image is darker, m av The lower the value, the defogging image may be too low in brightness, resulting in the detection target in the defogging image not being detected by the subsequent algorithm. Therefore, by performing gamma correction on the defogging image according to the image intensity correction parameter, the brightness of the defogging image can be corrected, the brightness of the defogging image can be increased, and the imaging signal-to-noise ratio can be improved, thereby improving the details of the darker pixels in the defogging image and improving the imaging quality.
[0065] In operation S240, multi-scale convolution is performed on the nonlinearly corrected image to obtain global features.
[0066] For example, a deep residual network (ResNet) can be used to perform multi-scale convolution on the nonlinearly corrected image to obtain global features.
[0067] According to an embodiment of the present invention, by performing multi-scale convolution on the nonlinear corrected image, global features are obtained, and initial fusion of image data in the autofluorescence channel layer in the nonlinear corrected image and image data in the multispectral image channel layer is achieved to obtain initial features that can reflect the characteristics of tissues at different depths of the esophagus.
[0068] In operation S250, dilated convolution and self-attention feature extraction are sequentially performed on the nonlinear corrected image to obtain local features.
[0069] According to an embodiment of the present invention, the image data of each channel in the nonlinear corrected image can be extracted using a dilated convolution layer with different dilation rates, and then self-attention feature extraction is performed to obtain local features corresponding to each channel.
[0070] According to an embodiment of the present invention, by performing dilated convolution and self-attention feature extraction on the nonlinear corrected image in sequence, it is possible to use multi-scale dilated convolution and self-attention methods to centrally extract representative local information in the nonlinear corrected image corresponding to the multispectral image and the fluorescence image.
[0071] In operation S260, local orthogonal components orthogonal to the global features are extracted from the local features.
[0072] According to an embodiment of the present invention, by extracting local orthogonal components that are orthogonal to global features from local features, it is possible to further screen important representative information corresponding to each of the multispectral image and the fluorescence image (for example, features reflecting deeper tissues in the detected target) from local features based on the global features, and eliminate redundant information.
[0073] In operation S270, the local orthogonal components are fused with the global features to obtain a fused image.
[0074] According to an embodiment of the present invention, by performing minimum value extraction on the occluded blurred area in the original image according to a predetermined rectangular window, a dark channel image corresponding to the autofluorescence image and the multispectral image in the foggy occluded area of the original image can be obtained, and then the pixels in the dark channel image that are greater than a predetermined pixel value are averaged to obtain image intensity correction parameters. According to the image intensity correction parameters, the occluded blurred area in the original image is defogged and nonlinearly corrected in sequence to obtain a nonlinear corrected image, so as to improve the details of the darker pixels in the defogged image after correcting the influence of internal liquid contamination of the digestive tract on the occluded blurred area, thereby improving the quality of the data corresponding to the multispectral image and the autofluorescence image in the obtained nonlinear corrected image. Since the data corresponding to the autofluorescence image in the nonlinear corrected image reflects the characteristics of the deeper tissues in the detected target, and the data corresponding to the multispectral image reflects the characteristics of the shallower tissues in the detected target, multi-scale convolution is performed on the nonlinear corrected image to obtain global features, and hole convolution and self-attention feature extraction are performed on the nonlinear corrected image in turn to obtain local features. Local orthogonal components orthogonal to the global features are extracted from the local features to obtain features that can further reveal the physiological and pathological changes of the detected target. The local orthogonal components are fused with the global features to obtain a fused image, thereby realizing the fusion of imaging features of tissues at different depths, and obtaining an image that more comprehensively reflects the characteristics of the physiological and pathological changes of the detected target in deep and shallow tissues.
[0075] According to an embodiment of the present invention, dark The image intensity ratio t(x) corresponding to (x) should satisfy formula (2).
[0076] (2)
[0077] Among them, A0 represents the maximum value in M(x). dark (x) is the value of pixel x in the dark channel image.
[0078] According to an embodiment of the present invention, J can be calculated according to formula (3): dark (x) is mean filtered to obtain a mean filtered image.
[0079] (3)
[0080] According to an embodiment of the present invention, the image intensity ratio t(x) can be estimated according to the mean filter value in formula (3), and an offset value is added when estimating the image intensity ratio t(x) according to the mean filter value in formula (3). , and 0≤ ≤1.
[0081] For example, the transmittance t(x) can be obtained according to formula (4).
[0082] (4)
[0083] According to an embodiment of the present invention, the target intensity ratio coefficient may be written as .
[0084] According to the embodiment of the present invention, according to formula (4), when the value of ε is larger, the image after de-occlusion will be darker, and when the value of ε is smaller, the image after de-occlusion will be overexposed. Therefore, in order to make the de-hazed image more natural, it is necessary to select a suitable target intensity ratio coefficient to make the de-hazed image more natural.
[0085] According to an embodiment of the present invention, Figure 2 The operation S230 shown, according to the image intensity correction parameter, sequentially performs defogging and nonlinear correction on the occluded blurred area in the original image to obtain a nonlinear corrected image, which may include the following operations:
[0086] Comparing the image intensity correction parameter with the first predetermined value to obtain a normalized intensity correction parameter;
[0087] comparing the second predetermined value with the normalized intensity correction parameter to obtain an intensity ratio coefficient reference value;
[0088] Selecting a minimum value from the reference value of the intensity ratio coefficient and the predetermined intensity ratio coefficient to obtain a target intensity ratio coefficient;
[0089] The target intensity ratio coefficient is multiplied by the image data in the occluded blurred area in the original image to obtain a deoccluded image;
[0090] The de-occluded image is nonlinearly corrected according to the normalized intensity correction parameter to obtain a nonlinear corrected image.
[0091] According to an embodiment of the present invention, the first predetermined value, the second predetermined value and the predetermined intensity ratio coefficient can be selected according to actual conditions and are not limited here. For example, the first predetermined value can be 255, the second predetermined value can be 0.9, and the predetermined intensity ratio coefficient can be 0.85.
[0092] According to an embodiment of the present invention, in order to ensure The target intensity ratio coefficient is within its value range and is not too small, thereby ensuring that the detected target in the dehazed image cannot be detected by the subsequent algorithm. The target intensity ratio coefficient can be calculated according to formulas (5) to (7).
[0093] According to an embodiment of the present invention, the image intensity correction parameter can be compared with the first predetermined value according to formula (5), and the image intensity correction parameter can be normalized to obtain the normalized intensity correction parameter m.
[0094] (5)
[0095] According to an embodiment of the present invention, the second predetermined value can be compared with the normalized intensity correction parameter according to formula (6) to obtain the intensity ratio coefficient reference value ρ.
[0096] (6)
[0097] According to an embodiment of the present invention, the minimum value can be screened from the intensity ratio coefficient reference value and the predetermined intensity ratio coefficient according to formula (7) to obtain the target intensity ratio coefficient ε.
[0098] (7)
[0099] According to an embodiment of the present invention, the target intensity ratio coefficient can be multiplied by the image data in the occluded blurred area in the original image according to formula (8) to obtain a de-occluded image.
[0100] (8)
[0101] Among them, J d (y) An image representing any channel in the deoccluded image.
[0102] According to an embodiment of the present invention, since the image de-occlusion algorithm will cause the output image brightness to decrease to a certain extent, thereby affecting the identification and diagnosis of the lesion area, the image processing method provided in an embodiment of the present invention further designs an image enhancement algorithm based on gamma correction according to the requirements of clinical diagnosis for image brightness and contrast.
[0103] According to an embodiment of the present invention, performing nonlinear correction on the de-occluded image according to the normalized intensity correction parameter to obtain the nonlinear corrected image includes:
[0104] Selecting a minimum value from the normalized intensity correction parameter and the predetermined nonlinear correction parameter to obtain a target nonlinear correction coefficient;
[0105] The de-occluded image is nonlinearly corrected according to the target nonlinear correction coefficient to obtain a nonlinear corrected image.
[0106] According to the embodiment of the present invention, the predetermined nonlinear correction parameter can be selected according to actual conditions and is not limited here. For example, the predetermined nonlinear correction parameter can be 0.45.
[0107] According to an embodiment of the present invention, in the de-occlusion algorithm, the image J of any channel in the de-occlusion image d The intensity of (y) and the mean of the dark channel image, i.e. the image intensity correction parameter m av Related. av Affects the brightness of the output image. When the original image is darker, m av The lower the value, the av If the image brightness is too low, the defogging image may not be detected by the subsequent algorithm. Therefore, a suitable target nonlinear correction coefficient can be selected to perform gamma correction on the de-occluded image to increase the brightness of the defogging image and the imaging signal-to-noise ratio, thereby increasing the details of the darker pixels in the defogging image and improving the imaging quality.
[0108] According to an embodiment of the present invention, the minimum value can be screened from the normalized intensity correction parameter and the predetermined nonlinear correction parameter according to formula (9) to obtain the target nonlinear correction coefficient γ.
[0109] (9)
[0110] According to an embodiment of the present invention, nonlinear correction can be performed on the de-occluded image according to the target nonlinear correction coefficient according to formula (10) to obtain a nonlinear corrected image S.
[0111] (10)
[0112] Wherein, c is a constant. For example, c may be 1.
[0113] According to the embodiment of the present invention, it can be seen from formula (10) that when γ>1, the image brightness decreases, when γ=1, the image does not change, and when γ<1, the image brightness increases. Therefore, in order to improve the brightness of the defogging image and ensure that the detected target in the defogging image can be detected by the subsequent algorithm, it is necessary to ensure that γ<1. At the same time, in order to prevent the occurrence of overexposure due to too low γ value, it is also necessary to ensure that γ satisfies formula (9).
[0114] According to an embodiment of the present invention, an endoscope can be used to obtain a multispectral image and an autofluorescence image corresponding to the esophagus. However, multimodal optical images obtained from different channels and different angles will have spatial and geometric differences due to factors such as shooting angle, lens distortion, and tissue movement deformation, and image registration and fusion processing are required. The image processing method provided by an embodiment of the present invention can use deep local and global feature orthogonal fusion to achieve the fusion of image data corresponding to the multispectral image and the autofluorescence image in the nonlinear correction image.
[0115] For example, the image processing method provided by the embodiment of the present invention can use a deep neural network to perform feature extraction and fusion processing on the nonlinear corrected image to obtain a fused image. The deep neural network may include three modules: a local feature branch, a global feature branch, and a fusion branch. The global feature branch may include ResNet, which can implement multi-scale convolution on the nonlinear corrected image to obtain global features. The global feature branch can also perform multi-scale convolution on the nonlinear corrected image, then perform a pooling operation, and then perform linear mapping processing through a fully connected layer to obtain global features. The local feature branch may include a hole convolution module and a self-attention mechanism module to implement hole convolution and self-attention feature extraction on the nonlinear corrected image in sequence to obtain local features. The fusion branch can fuse global features and local features to obtain a fused image.
[0116] According to an embodiment of the present invention, Figure 2 The operation S250 shown in the figure, performing dilated convolution and self-attention feature extraction on the nonlinear corrected image in sequence to obtain local features, may include the following operations:
[0117] The image data corresponding to each channel in the nonlinearly corrected image is input into the dilated convolution layer with different dilation rates to obtain multiple dilated convolution features corresponding to each channel;
[0118] Multiple hole convolution features are concatenated to obtain initial local features;
[0119] Perform convolution processing on the initial local features to obtain local convolution features;
[0120] Self-attention feature extraction is performed on the local convolutional features to obtain the local features corresponding to each channel.
[0121] According to an embodiment of the present invention, the number of atrous convolutional layers and the atrous ratio of the atrous convolutional layers can be selected according to actual conditions and are not limited here.
[0122] For example, for the image data corresponding to any channel in the nonlinear corrected image, three dilated convolution layers with different dilation rates can be used to process the image data respectively, and the output features of the three dilated convolutions with different dilation rates can be spliced together to obtain feature maps with different spatial receptive fields, and obtain the initial local features corresponding to the image data. The initial local features are processed by the convolution layer, and the features output by the convolution layer are passed to the self-attention mechanism module to obtain enhanced local features, and obtain the local features corresponding to the image data. It is realized that the local features reflecting the deeper tissues in the detected target are extracted from the image data corresponding to the autofluorescence image in the nonlinear corrected image, and the local features reflecting the shallower tissues in the detected target are extracted from the image data corresponding to the multispectral image in the nonlinear corrected image.
[0123] According to an embodiment of the present invention, Figure 2 The operation S260 shown, extracting a local orthogonal component orthogonal to the global feature from the local feature, may include the following operations:
[0124] Extracting local orthogonal components orthogonal to the global features from the local features corresponding to each channel;
[0125] The local orthogonal components are fused with the global features to obtain a fused image including:
[0126] The local orthogonal components corresponding to each channel are concatenated with the global features to obtain fused features;
[0127] The fused features are pooled and fully connected in sequence to obtain a fused image.
[0128] For example, after extracting local features from the nonlinearly corrected image using the local feature branch, the local features corresponding to any channel can be expressed as f l After extracting the global features of the nonlinear correction image using the global feature branch, the obtained global features can be expressed as f g .f l Included feature point f at any coordinate position (i, j) l (i,j) is the area with the largest local change after the dilated convolution. According to formulas (11) to (14), it is possible to extract local orthogonal components orthogonal to the global features from the local features corresponding to each channel.
[0129] For example, each local feature point f can be calculated according to formula (11): l (i,j) In the global feature f g Projection on .
[0130] (11)
[0131] in,
[0132] (12)
[0133] (13)
[0134] Then, according to formula (14), the local feature is subtracted from its projection vector to obtain the global feature f g Orthogonal local components .
[0135] (14)
[0136] Among them, the weight Each point in is related to the vector f g Orthogonal. is the local feature corresponding to channel c, the feature value at the coordinate position (i, j). g,c Represents the global features corresponding to channel c. C represents the total number of channels.
[0137] According to an embodiment of the present invention, the local orthogonal components With f g They are concatenated to obtain fused features; then the new fused features are pooled, and finally a fully connected layer is used for linear mapping to generate the final fused image.
[0138] According to an embodiment of the present invention, on the basis of obtaining the optimal feature variables, in order to improve the accuracy of lesion location recognition, the image processing method provided by the embodiment of the present invention can adopt a sliding window-based multi-head self-attention structure calculation method to calculate the difference between the optimal feature variables of images at different positions to realize lesion location recognition and judgment. The recognition module can include paired window multi-head self-attention, sliding window multi-head self-attention blocks and multi-layer perceptron blocks, and the sub-layers between each module can be connected using residual edges. The window multi-head self-attention module first divides the window in different areas, and then completes the self-attention calculation separately, thereby greatly reducing the complexity of the calculation. The multi-head self-attention module first re-divides the window partitions between continuous self-attention layers, and re-obtains a new window layout through a cyclic shift sliding method, and then uses the cross-window connection technology to recalculate the attention weights inside each window of the newly generated window, so as to realize the communication of feature information between feature units in different windows, capture more different context information, and thus improve the ability to obtain global information of the network.
[0139] According to the embodiments of the present invention, the image processing method provided by the embodiments of the present invention can integrate the self-attention module with the feature recognition module, realize the global information interaction of features at different scales, reduce the impact of local feature information loss caused by the deep network, and improve the ability to obtain local attention, thereby further enhancing the ability of the network to obtain global information, so as to improve the detection level of defect targets of different sizes. The light-weight adaptive upsampling operator is used to reorganize the features to obtain strong semantic information of the features, provide complete and large amount of feature information and semantic information of local details for subsequent tasks, and improve the detection ability of target features in small lesion areas in the esophagus.
[0140] According to an embodiment of the present invention, the fused image obtained by the image processing method provided by the embodiment of the present invention contains both texture information of different bands and spectral information. In order to further identify the characteristics of the lesion, in the image processing method provided by the embodiment of the present invention, the image features can be further screened from the fused image to reduce data redundancy, retain more effective features, and facilitate direct diagnosis. When the further screened image features are applied to the subsequent disease-assisted diagnosis recognition model, due to the small amount of data and more effective information, the computational complexity of the model can be reduced, thereby improving the model efficiency.
[0141] For example, the image processing method provided by the embodiment of the present invention can use the iterative information variable retention method to screen the characteristic wavelength, thereby continuously removing the non-information variables and interference variables in an iterative manner, retaining the strong information variables and the weak information variables, and finally eliminating the best variables in reverse.
[0142] According to an embodiment of the present invention, Figure 2 The image processing method may further include:
[0143] The image data of each channel in the fused image are stitched together to obtain a stitching matrix, wherein the number of columns of the stitching matrix is equal to the number of channels of the fused image, and one column in the stitching matrix stores the image data of one channel in the fused image;
[0144] For each column of image data included in the splicing matrix, a partial least squares regression model is established, and L evaluation results corresponding to the image data are determined according to an L-fold cross-validation method, where L is an integer greater than 1;
[0145] Determine target column data including valid information from the stitching matrix according to L evaluation results corresponding to each column of image data in the stitching matrix;
[0146] Generate a target fused image based on the target column data.
[0147] According to the embodiment of the present invention, L can be selected according to actual conditions and is not limited here. For example, L can be 5 or 10.
[0148] For example, the image data of each channel in the fused image can be spliced separately, and the obtained splicing matrix can include P channels, that is, P columns, and each channel can include N pixels, that is, the latitude of the splicing matrix is N×P. For each column of image data included in the splicing matrix, the partial least squares regression model PLSR (Partial Least Squares Regression) can be used as a multivariate correction method to establish a PLSR model, and the RMSECV (Root Mean Square Error of Cross Validation) value of the 5-fold cross validation is used as an evaluation criterion to determine the target column data including valid information from the splicing matrix.
[0149] According to an embodiment of the present invention, for each column of image data included in the splicing matrix, a partial least squares regression model is established, and according to an L-fold cross-validation method, L evaluation results corresponding to the image data are determined to include:
[0150] By performing the following operations on the image data L times in a loop, L evaluation results corresponding to the image data are obtained:
[0151] Constructing a first binary matrix and a second binary matrix, wherein the dimension of the first binary matrix and the dimension of the second binary matrix are both the same as the dimension of the fused image, the first binary matrix includes randomly generated binary numbers, and the pixel values at the pixel positions corresponding to the second binary matrix and the first binary matrix are not equal;
[0152] Establishing partial least squares regression models for the image data according to the first binary values included in the first binary matrix and the first binary values included in the second binary matrix, respectively, to obtain a first regression model corresponding to the first binary matrix and a second regression model corresponding to the second binary matrix;
[0153] Predicting each data included in the image data according to the first regression model and the second regression model respectively, to obtain a first prediction deviation matrix and a second prediction deviation matrix, wherein the first prediction deviation matrix includes prediction results predicted by the first regression model corresponding to the data in the image data used for training the first regression model, and prediction results predicted by the second regression model corresponding to the data in the image data used for training the second regression model, and the second prediction deviation matrix includes prediction results predicted by the first regression model corresponding to the data in the image data other than the data used for training the first regression model, and prediction results predicted by the second regression model corresponding to the data in the image data other than the data used for training the second regression model;
[0154] According to the first prediction deviation matrix and the second prediction deviation matrix, an evaluation result corresponding to the image data is obtained.
[0155] According to an embodiment of the present invention, the first binary value may be selected according to actual conditions and is not limited here. For example, the first binary data may be 1. The first binary data in the first binary matrix and the second binary matrix both represent that the pixel value at the pixel position corresponding to the first binary data in the image data is used to construct a partial least squares regression model.
[0156] According to an embodiment of the present invention, the image data may be divided into L balanced data sets according to a predetermined rule, and then, in each cycle, a first binary matrix and a second binary matrix corresponding to one of the balanced data sets are generated. After L cycles, the first binary matrix and the second binary matrix corresponding to each of the L balanced data sets may be generated.
[0157] For example, when L is 5, in each cycle, a first binary matrix M containing only 1 and 0 can be constructed randomly or according to a predetermined rule, and its dimension is N×P. 1 and 0 respectively indicate whether the variable at the pixel position corresponding to the first binary matrix M in the image data is used for modeling, 1 represents for modeling, and 0 represents not for modeling. A PLSR model can be established based on the variables in the image data selected from each column of the first binary matrix M to obtain a first regression model corresponding to the first binary matrix M. The first regression model is used to predict each data included in the image data to obtain the result predicted by the first regression model, which is recorded as RMSECV0. RMSECV0 is a vector of size N×1.
[0158] The 1 in the i-th column (i=1, 2, ...p) of the first binary matrix M is replaced by 0 and the 0 is replaced by 1 to obtain the second binary matrix M1. Similarly, a PLSR model can be established based on the variables in the image data selected from each column of the second binary matrix M1 to obtain the second regression model corresponding to the second binary matrix M1. The second regression model is used to predict each data included in the image data to obtain the result predicted by the second regression model, which is recorded as RMSECV1. RMSECV1 is a vector of size N×1.
[0159] According to formula (15), the first prediction deviation matrix can be obtained from RMSECV0 and RMSECV1: and the second prediction deviation matrix .
[0160] (15)
[0161] Among them, M ni is the value of the nth row and ith column of the first binary matrix M, M1 ni is the value of the nth row and ith column of the second binary matrix M1.th RMSECV0 and n th RMSECV i Represents vectors RMSECV0 and RMSECV respectively i The value of the nth row in . k is the number of loops. Characterizes the first prediction deviation matrix of the kth time, Characterizes the k-th second prediction deviation matrix.
[0162] According to an embodiment of the present invention, obtaining an evaluation result corresponding to the image data according to the first prediction deviation matrix and the second prediction deviation matrix includes:
[0163] Calculate a first average value of each first prediction deviation included in the first prediction deviation matrix and a second average value of each second prediction deviation included in the second prediction deviation matrix;
[0164] Subtracting the first average value from the second average value to obtain a first information strength index;
[0165] Performing a non-parametric statistical test on each first prediction deviation included in the first prediction deviation matrix and each second prediction deviation included in the second prediction deviation matrix to obtain a second information strength index;
[0166] An evaluation result corresponding to the image data is obtained according to the first information strength index and the second information strength index.
[0167] For example, the first prediction deviation matrix can be calculated The mean of the first average value is obtained, and the second prediction deviation matrix is calculated. Subtract the first average value from the second average value to obtain the first information strength index DM i . For the first prediction deviation matrix The first prediction deviation and the second prediction deviation matrix are included Include nonparametric statistical tests (e.g., Mann-Whitney U test) for each second prediction deviation and test the first prediction deviation matrix The first prediction deviation and the second prediction deviation matrix are included The distribution of each second prediction deviation included is recorded as the second information strength index P i By comparing the first information strength indicator DM i and the second information strength index P i The image data can be divided into the following four categories of evaluation results, and the classification rules are shown in Table 1.
[0168] Table 1
[0169]
[0170] According to an embodiment of the present invention, according to L evaluation results corresponding to each column of image data in the stitching matrix, determining the target column data including valid information from the stitching matrix includes:
[0171] For each column of image data in the splicing matrix, when L evaluation results corresponding to the image data all indicate that the image data is valid data, the image data is determined as target column data.
[0172] According to an embodiment of the present invention, it can be seen from Table 1 that each iteration can divide the image data into strong information variables, weak information variables, no information variables and interference variables. When L is 5, the image data can be determined as target column data when the image data is evaluated as a strong information variable in 5 evaluation results. By eliminating weak information variables, no information and interference variables from the splicing matrix, the optimal feature variable, i.e., the target column data, is obtained, and then each target column data included in the splicing matrix is converted into an image one by one, and channel splicing is performed to obtain a target fused image.
[0173] Figure 3 A schematic structural diagram of an endoscope according to an embodiment of the present invention is shown.
[0174] like Figure 3 As shown, the endoscope 300 may include a drug reservoir 310 , a flow valve 320 , a drug delivery nozzle (with a heating wire) 330 , a spectral imaging unit 340 , a two-dimensional gradient filter 350 , a white light LED and green light LED combined light source 360 , a semi-transparent and semi-reflective mirror 370 and a housing 380 .
[0175] The drug delivery nozzle (with heating wire) 330 may include: a drug storage container, a flow valve and a drug delivery nozzle. The drug storage container is used to store the drug solution, the flow valve is used to control the volume of the drug solution sprayed each time, the spray nozzle has a built-in heating wire with a heating function, and a resistance sensor at the outlet, which can record the time and degree of resistance change when the drug passes through, so as to control the drug dosage and flow rate.
[0176] use Figure 3 The process of multimodal imaging of the esophagus is as follows: the light emitted by the white light LED and the green light LED is irradiated to the tissue to be tested in the esophagus through the semi-transparent and semi-reflective mirror 370, and the light reflected by the tissue is collected by the spectral imaging unit 340 through the semi-transparent and semi-reflective mirror 370 and further processed. Among them, the white light LED is mainly used to realize multi-spectral imaging, and the green light LED is mainly used to realize autofluorescence imaging.
[0177] The spectral imaging unit 340 includes a grating 341 , a microlens array 342 and an imaging CCD 343 .
[0178] The light incident on the spectral imaging unit 340 is split by the grating 341 to obtain light of different wavelengths after dispersion. The microlens array 342 focuses the light of different wavelengths to different areas of the imaging CCD 343, so that different positions of the same CCD can be used to image different bands, so as to achieve the purpose of collecting spectral images of multiple spectral bands at one time and obtain the original image. In order to reduce crosstalk between different channels, bandpass filters of corresponding bands can be set in different areas of the imaging CCD 343 to filter out stray light and crosstalk light, thereby improving the imaging quality.
[0179] exist Figure 3 In the endoscope 300, the esophagus can be inspected and treated, realizing the integration of inspection and treatment. At the same time, the grating continuous spectroscopy and microlens array form can be used to simultaneously perform full-spectrum multi-spectral imaging and autofluorescence imaging of the esophagus, and obtain images corresponding to multiple bands, solving the problem of limited imaging bands. The original image obtained can fully display all possible relevant tissue details.
[0180] Figure 3 The endoscope 300 in the embodiment has a soft drug delivery port and a pointed cone-shaped head for easy insertion into the esophagus. The tip is designed as a spray nozzle for easy drug attachment and absorption. Graduations can be marked on the hose to control the depth of entry into the esophagus so that the drug can be accurately delivered to the physiological stenosis and dentate line of the esophagus. The endoscope 300 has a heating function to reduce the patient's discomfort and irritation during drug administration. There is a resistance sensor at the drug outlet. During operation, the time and degree of resistance change when the drug passes through can be recorded to control the drug dosage and flow rate.
[0181] Figure 3 The endoscope 300 is fully functional and easy to operate during drug administration, which reduces the difficulty of work for medical staff. The design of the endoscope 300 can reduce the discomfort of patients, and can also control the flow and dosage of drugs to reduce waste.
[0182] According to an embodiment of the present invention, an image processing system is also provided. The system may include: Figure 2 The image processing method shown and Figure 3 The image processing system can utilize the endoscope as shown. Figure 3 The endoscope shown in FIG. 1 simultaneously collects multispectral images and autofluorescence images of the esophagus to obtain the original image, which can be used as shown in FIG. Figure 3 The image processing method shown processes the original image to obtain the target fused image.
[0183] It should be noted that, unless it is explicitly stated that there is a sequence of execution between different operations shown in the flowchart in the embodiments of the present invention, or different operations have a sequence of execution in technical implementation, otherwise, the execution order of multiple operations may not be particular, and multiple operations may also be executed simultaneously.
[0184] Based on the above image processing method, the present invention also provides an image processing device. Figure 4 The device is described in detail.
[0185] Figure 4 A structural block diagram of an image processing device according to an embodiment of the present invention is shown.
[0186] like Figure 4 As shown, the image processing device 400 of this embodiment includes a first obtaining module 410 , a second obtaining module 420 , a third obtaining module 430 , a fourth obtaining module 440 , a fifth obtaining module 450 , an extraction module 460 and a sixth obtaining module 470 .
[0187] The first obtaining module 410 is used to perform minimum value extraction on the occluded blurred area in the original image according to a predetermined rectangular window to obtain a dark channel image, wherein the original image includes a channel layer corresponding to the multispectral image and a channel layer corresponding to the autofluorescence image, and the multispectral image and the autofluorescence image are obtained by simultaneously collecting the detected target using an endoscope. In one embodiment, the first obtaining module 410 can be used to perform the operation S210 described above, which will not be repeated here.
[0188] The second obtaining module 420 is used to average the pixels in the dark channel image that are greater than a predetermined pixel value to obtain the image intensity correction parameter. In one embodiment, the second obtaining module 420 can be used to perform the operation S220 described above, which will not be described in detail here.
[0189] The third obtaining module 430 is used to perform defogging and nonlinear correction on the occluded blurred area in the original image in sequence according to the image intensity correction parameter to obtain a nonlinear corrected image. In one embodiment, the third obtaining module 430 can be used to perform the operation S230 described above, which will not be repeated here.
[0190] The fourth obtaining module 440 is used to perform multi-scale convolution on the nonlinear correction image to obtain global features. In one embodiment, the fourth obtaining module 440 can be used to perform the operation S240 described above, which will not be described in detail here.
[0191] The fifth obtaining module 450 is used to perform dilated convolution and self-attention feature extraction on the nonlinear corrected image in sequence to obtain local features. In one embodiment, the fifth obtaining module 450 can be used to perform the operation S250 described above, which will not be repeated here.
[0192] The extraction module 460 is used to extract local orthogonal components orthogonal to the global features from the local features. In one embodiment, the extraction module 460 can be used to perform the operation S260 described above, which will not be described in detail here.
[0193] The sixth obtaining module 470 is used to fuse the local orthogonal components with the global features to obtain a fused image. In one embodiment, the sixth obtaining module 470 can be used to perform the operation S270 described above, which will not be described in detail herein.
[0194] According to an embodiment of the present invention, any multiple modules of the first obtaining module 410, the second obtaining module 420, the third obtaining module 430, the fourth obtaining module 440, the fifth obtaining module 450, the extraction module 460 and the sixth obtaining module 470 can be combined in one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present invention, at least one of the first obtaining module 410, the second obtaining module 420, the third obtaining module 430, the fourth obtaining module 440, the fifth obtaining module 450, the extraction module 460 and the sixth obtaining module 470 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation modes of software, hardware and firmware or in a proper combination of any of them. Alternatively, at least one of the first obtaining module 410, the second obtaining module 420, the third obtaining module 430, the fourth obtaining module 440, the fifth obtaining module 450, the extraction module 460 and the sixth obtaining module 470 can be at least partially implemented as a computer program module, and when the computer program module is executed, the corresponding function can be performed.
[0195] It should be noted that the image processing device part in the embodiment of the present invention corresponds to the image processing method part in the embodiment of the present invention. The description of the image processing device part specifically refers to the image processing method part, which will not be repeated here.
[0196] Figure 5A block diagram of an electronic device suitable for implementing an image processing method according to an embodiment of the present invention is shown.
[0197] like Figure 5 As shown, the electronic device 500 according to an embodiment of the present invention includes a processor 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage part 508 to a random access memory (RAM) 503. The processor 501 may include, for example, a general-purpose microprocessor (such as a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (for example, an application-specific integrated circuit (ASIC)), etc. The processor 501 may also include an onboard memory for caching purposes. The processor 501 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present invention.
[0198] In RAM 503, various programs and data required for the operation of electronic device 500 are stored. Processor 501, ROM 502 and RAM 503 are connected to each other via bus 504. Processor 501 performs various operations of the method flow according to the embodiment of the present invention by executing the program in ROM 502 and / or RAM 503. It should be noted that the program can also be stored in one or more memories other than ROM 502 and RAM 503. Processor 501 can also perform various operations of the method flow according to the embodiment of the present invention by executing the program stored in one or more memories.
[0199] According to an embodiment of the present invention, the electronic device 500 may further include an input / output (I / O) interface 505, which is also connected to the bus 504. The electronic device 500 may further include one or more of the following components connected to the input / output (I / O) interface 505: an input portion 506 including a keyboard, a mouse, etc.; an output portion 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 508 including a hard disk, etc.; and a communication portion 509 including a network interface card such as a LAN card, a modem, etc. The communication portion 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the input / output (I / O) interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as needed, so that the computer program read therefrom is installed into the storage portion 508 as needed.
[0200] The flow chart and block diagram in the accompanying drawings illustrate the possible implementation architecture, function and operation of the system and method according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0201] It will be appreciated by those skilled in the art that the features described in the various embodiments of the present invention may be combined and / or combined in various ways, even if such combinations and / or combinations are not explicitly described in the present invention. In particular, without departing from the spirit and teachings of the present invention, the features described in the various embodiments of the present invention may be combined and / or combined in various ways. All of these combinations and / or combinations fall within the scope of the present invention.
[0202] The embodiments of the present invention have been described above. However, these embodiments are only for the purpose of illustration, and are not intended to limit the scope of the present invention. Although each embodiment has been described above, this does not mean that the measures in each embodiment cannot be advantageously used in combination. The scope of the present invention is limited by the attached embodiments and their equivalents. Without departing from the scope of the present invention, those skilled in the art may make various substitutions and modifications, which should all fall within the scope of the present invention.
Claims
1. An image processing method, characterized in that: The method comprises: According to a predetermined rectangular window, a minimum value is extracted for the occluded blurred area in the original image to obtain a dark channel image, wherein the original image includes a channel layer corresponding to the multispectral image and a channel layer corresponding to the autofluorescence image, and the multispectral image and the autofluorescence image are obtained by simultaneously collecting the detected target using an endoscope; averaging pixels in the dark channel image that are greater than a predetermined pixel value to obtain an image intensity correction parameter; According to the image intensity correction parameters, defogging and nonlinear correction are sequentially performed on the occluded and blurred areas in the original image to obtain a nonlinearly corrected image; Performing multi-scale convolution on the nonlinear correction image to obtain global features; Performing dilated convolution and self-attention feature extraction on the nonlinear corrected image in sequence to obtain local features; Extracting a local orthogonal component orthogonal to the global feature from the local feature; The local orthogonal components are fused with the global features to obtain a fused image.
2. The method according to claim 1, characterized in that: The step of sequentially performing defogging and nonlinear correction on the occluded and blurred areas in the original image according to the image intensity correction parameters to obtain a nonlinearly corrected image comprises: Comparing the image intensity correction parameter with a first predetermined value to obtain a normalized intensity correction parameter; Comparing the second predetermined value with the normalized intensity correction parameter to obtain an intensity ratio coefficient reference value; Selecting a minimum value from the reference value of the intensity ratio coefficient and the predetermined intensity ratio coefficient to obtain a target intensity ratio coefficient; Multiplying the target intensity ratio coefficient with the image data in the occluded blurred area in the original image to obtain a deoccluded image; The de-occluded image is nonlinearly corrected according to the normalized intensity correction parameter to obtain the nonlinear corrected image.
3. The method according to claim 2, characterized in that The performing nonlinear correction on the de-occluded image according to the normalized intensity correction parameter to obtain the nonlinear corrected image comprises: Selecting a minimum value from the normalized intensity correction parameter and the predetermined nonlinear correction parameter to obtain a target nonlinear correction coefficient; The de-occluded image is nonlinearly corrected according to the target nonlinear correction coefficient to obtain the nonlinear corrected image.
4. The method according to claim 2, characterized in that: The nonlinear correction image is sequentially subjected to dilated convolution and self-attention feature extraction to obtain local features including: Inputting the image data corresponding to each channel in the nonlinear corrected image into a dilated convolution layer with different dilation rates to obtain a plurality of dilated convolution features corresponding to each channel; Splicing the multiple hole convolution features to obtain initial local features; Performing convolution processing on the initial local features to obtain local convolution features; Self-attention feature extraction is performed on the local convolutional features to obtain local features corresponding to each channel.
5. The method according to claim 4, characterized in that The extracting a local orthogonal component orthogonal to the global feature from the local feature comprises: Extracting local orthogonal components orthogonal to the global features from the local features corresponding to each channel; The fusing the local orthogonal components with the global features to obtain a fused image comprises: The local orthogonal components corresponding to each channel are concatenated with the global feature to obtain a fused feature; The fused features are sequentially pooled and fully connected to obtain the fused image.
6. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: splicing the image data of each channel in the fused image respectively to obtain a splicing matrix, wherein the number of columns of the splicing matrix is equal to the number of channels of the fused image, and one column in the splicing matrix stores the image data of one channel in the fused image; For each column of image data included in the stitching matrix, a partial least squares regression model is established, and L evaluation results corresponding to the image data are determined according to an L-fold cross-validation method, where L is an integer greater than 1; Determining target column data including valid information from the stitching matrix according to L evaluation results corresponding to each column of image data in the stitching matrix; A target fused image is generated according to the target column data.
7. The method according to claim 6, characterized in that The method of establishing a partial least squares regression model for each column of image data included in the splicing matrix and determining L evaluation results corresponding to the image data according to an L-fold cross-validation method includes: By performing the following operations on the image data L times in a loop, L evaluation results corresponding to the image data are obtained: Constructing a first binary matrix and a second binary matrix, wherein the dimensions of the first binary matrix and the second binary matrix are both the same as the dimensions of the fused image, the first binary matrix includes randomly generated binary numbers, and the pixel values at the pixel positions corresponding to the second binary matrix and the first binary matrix are not equal; Establishing partial least squares regression models for the image data according to first binary values included in the first binary matrix and first binary values included in the second binary matrix, respectively, to obtain a first regression model corresponding to the first binary matrix and a second regression model corresponding to the second binary matrix; Predicting each data included in the image data according to the first regression model and the second regression model respectively, to obtain a first prediction deviation matrix and a second prediction deviation matrix, wherein the first prediction deviation matrix includes prediction results predicted by the first regression model corresponding to the data in the image data used for training the first regression model, and prediction results predicted by the second regression model corresponding to the data in the image data used for training the second regression model, and the second prediction deviation matrix includes prediction results predicted by the first regression model corresponding to the data in the image data other than the data used for training the first regression model, and prediction results predicted by the second regression model corresponding to the data in the image data other than the data used for training the second regression model; According to the first prediction deviation matrix and the second prediction deviation matrix, an evaluation result corresponding to the image data is obtained.
8. The method according to claim 7, characterized in that The obtaining of the evaluation result corresponding to the image data according to the first prediction deviation matrix and the second prediction deviation matrix includes: Calculating a first average value of each first prediction deviation included in the first prediction deviation matrix and a second average value of each second prediction deviation included in the second prediction deviation matrix; Subtracting the first average value from the second average value to obtain a first information strength index; Performing a non-parametric statistical test on each first prediction deviation included in the first prediction deviation matrix and each second prediction deviation included in the second prediction deviation matrix to obtain a second information strength index; An evaluation result corresponding to the image data is obtained according to the first information strength index and the second information strength index.
9. The method according to claim 6, characterized in that Determining target column data including valid information from the stitching matrix according to L evaluation results corresponding to each column of image data in the stitching matrix comprises: For each column of image data in the stitching matrix, when L evaluation results corresponding to the image data all indicate that the image data is valid data, the image data is determined as target column data.
10. An image processing device, characterized in that: The device comprises: A first obtaining module is used to perform minimum value extraction on the occluded blurred area in the original image according to a predetermined rectangular window to obtain a dark channel image, wherein the original image includes a channel layer corresponding to the multispectral image and a channel layer corresponding to the autofluorescence image, and the multispectral image and the autofluorescence image are obtained by simultaneously collecting the detected target using an endoscope; A second obtaining module is used to average the pixels in the dark channel image that are greater than a predetermined pixel value to obtain an image intensity correction parameter; A third obtaining module is used to perform defogging and nonlinear correction on the occluded and blurred areas in the original image in sequence according to the image intensity correction parameters to obtain a nonlinear corrected image; A fourth obtaining module is used to perform multi-scale convolution on the nonlinear correction image to obtain global features; A fifth obtaining module is used to perform hole convolution and self-attention feature extraction on the nonlinear corrected image in sequence to obtain local features; An extraction module, used for extracting a local orthogonal component orthogonal to the global feature from the local feature; The sixth obtaining module is used to fuse the local orthogonal components with the global features to obtain a fused image.
