Image processing method and device, electronic equipment and storage medium
By decomposing and mapping the RGB images formed based on preset light sources in the endoscopic system, the problem of halving the image frame rate when switching the imaging mode is solved, high-precision pathological information extraction and image fluency improvement are achieved, and diagnostic accuracy is improved.
Patent Information
- Application Number
- CN202510495597.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-21
- Publication Date
- 2025-05-16
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
When the existing endoscopic system switches white light imaging and narrowband light imaging modes, the frame rate of the image display is halved, resulting in a decrease in fluency and real-time performance, affecting the observation and diagnosis of lesions.
By acquiring the RGB image formed based on the preset light source, decomposing the color channel of the composite band, obtaining a sub-image of single narrowband band information, and mapping the sub-image using the mapping adjustment matrix corresponding to the imaging mode, obtaining the imaging images of each of the two imaging modes.
The imaging images of both imaging modes are obtained at the same time without switching the imaging mode, which improves the accuracy of extraction of pathological information, avoids image quality reduction, maintains a high image update speed, significantly improves the fluency and real-timeness of the image, and thus improves the accuracy of diagnosis.
Smart Images

Figure CN120013836A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image recognition, and in particular to an image processing method, device, electronic device and storage medium. Background Art
[0002] With the widespread application of endoscopic technology, doctors have an increasing demand for high-quality imaging. Especially in gastrointestinal endoscopy, diagnosis and treatment, white light imaging mode is often used for routine operations, while narrow-band light imaging mode is used to further observe lesions and provide richer pathological information. However, the existing technology has obvious deficiencies when switching between the two imaging modes, which affects doctors' observation and diagnosis of lesions.
[0003] In the related art, endoscope systems usually use an automatic frame switching mode to alternately display white light imaging and narrow-band light imaging images. For example, when the system displays a single imaging mode at a frame rate of 30 frames per second (fps), 30 frames of images can be displayed per second. However, in the switching mode, the 30 frames of images per second are evenly distributed to the two imaging modes, and the actual frame rate of each mode is reduced to 15fps.
[0004] Therefore, in the automatic frame-to-frame switching mode, the image display frame rate of the endoscope system will be halved, resulting in a decrease in smoothness and real-time performance, thereby affecting the doctor's observation and diagnosis of lesions. Summary of the invention
[0005] The embodiments of the present application provide an image processing method, device, electronic device and storage medium, which are used to solve the problem that the existing technical solutions cannot directly reflect the specific information generated by the two light sources on tissues and blood vessels, thereby weakening the enhancement effect on the lesion area.
[0006] On the one hand, an embodiment of the present application provides an image processing method, including:
[0007] Acquire an RGB image formed based on a preset light source; wherein the emitted light of the preset light source includes wavelength bands corresponding to two imaging modes;
[0008] Based on the spectral center wavelength corresponding to the preset light source, the color channels with composite bands in the RGB image are decomposed to obtain multiple sub-images containing only single narrowband band information;
[0009] Based on two mapping adjustment matrices corresponding to the two imaging modes, mapping processing is performed on the multiple sub-images respectively to obtain imaging images corresponding to the two imaging modes respectively.
[0010] On the one hand, an embodiment of the present application provides an image processing device, including:
[0011] An acquisition module, used to acquire an RGB image formed based on a preset light source; wherein the emitted light of the preset light source includes wavelength bands corresponding to two imaging modes;
[0012] A decomposition module, configured to decompose the color channels with composite bands in the RGB image based on the central wavelength of the spectrum corresponding to the preset light source, to obtain a plurality of sub-images containing only single narrowband band information;
[0013] A mapping module is used to perform mapping processing on the multiple sub-images based on two mapping adjustment matrices corresponding to the two imaging modes, so as to obtain imaging images corresponding to the two imaging modes respectively.
[0014] In a possible embodiment, the acquisition module is used to: acquire an initial image formed by reflection of the output light of a preset light source irradiating an image acquisition object; perform image processing on the initial image to obtain an RGB image; wherein the image processing includes multiple processing flows, and the central flow among the multiple processing flows is gamma transformation.
[0015] In a possible embodiment, the decomposition module is used to: classify the spectral center wavelength into a corresponding color channel based on the wavelength range to which the spectral center wavelength corresponding to a preset light source belongs, and the color channel includes an R channel, a G channel, and a B channel; based on the classification result, determine whether there is a target channel in the color channel; wherein the target channel represents a color channel having a composite band in the RGB image; if so, perform image decomposition on the target channel based on the band components corresponding to the composite band to obtain multiple sub-images containing only single narrowband band information.
[0016] In a possible embodiment, the decomposition module is also used to: determine whether there is a target channel in the color channel; if not, based on two mapping adjustment matrices corresponding to the two imaging modes, respectively map the RGB image to obtain imaging images corresponding to the two imaging modes.
[0017] In a possible embodiment, the decomposition module is used to: obtain the spectral reflectance of the image acquisition object under a preset light source, and the calibrated response value in the endoscope system under the preset light source; based on the spectral reflectance and the calibrated response value, perform image decomposition on the target channel to obtain multiple sub-images containing only single narrowband band information.
[0018] In a possible embodiment, the mapping module is used to: construct two mapping adjustment matrices corresponding to the two imaging modes, and construct column vectors corresponding to multiple sub-images; calculate the product between the two mapping adjustment matrices and the column vectors respectively, to obtain the imaging images corresponding to the two imaging modes respectively.
[0019] On the one hand, an embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores program code, and when the program code is executed by the processor, the processor executes any one of the above-mentioned image processing methods.
[0020] On the one hand, an embodiment of the present application provides a computer-readable storage medium, which includes a program code. When the storage medium is run on an electronic device, the program code is used to enable the electronic device to execute any of the above-mentioned image processing methods.
[0021] In one aspect, an embodiment of the present application provides an endoscope, comprising an illumination unit, a processing unit, and a display unit;
[0022] An illumination unit is used to provide an illumination light source, and an initial image is obtained after the image acquisition object of the illumination light source is reflected; wherein the output light of the preset light source includes wavelength bands corresponding to the two imaging modes;
[0023] A processing unit, configured to pre-process the initial image to obtain an RGB image, perform any of the above-mentioned image processing methods on the RGB image to obtain imaging images corresponding to the two imaging modes respectively, and perform gamma transformation on the imaging images;
[0024] The display unit is used to display the gamma-transformed images respectively.
[0025] The beneficial effects of this application are as follows:
[0026] An image processing method, device, electronic device and storage medium provided in the embodiments of the present application decompose and map the RGB image formed by a preset light source, so that imaging images corresponding to two imaging modes can be simultaneously acquired without switching the imaging mode. This processing method can more accurately extract pathological information, avoid the image quality degradation caused by switching modes, maintain a high image update speed, significantly improve the smoothness and real-time performance of the image, and thus improve the accuracy of diagnosis. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0028] Figure 1 This is a flowchart of an implementation of an image processing method in an embodiment of the present application.
[0029] Figure 2This is a flowchart of an implementation of a spectral mapping method in an embodiment of the present application.
[0030] Figure 3 Schematic diagram of the structure of an image processing device in an embodiment of the present application.
[0031] Figure 4 A schematic diagram of the hardware structure of an electronic device in an embodiment of the present application.
[0032] Figure 5 This is a schematic diagram of the structure of an endoscope in an embodiment of the present application. DETAILED DESCRIPTION
[0033] In order to make the purpose, technical scheme and advantages of the present application clearer, the technical scheme in the embodiment of the present application will be clearly and completely described below in conjunction with the drawings in the embodiment of the present application. Obviously, the described embodiment is only a part of the embodiment of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application. In the absence of conflict, the embodiments in the present application and the features in the embodiments can be arbitrarily combined with each other. In addition, although the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in an order different from that here.
[0034] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchanged where appropriate, so that the embodiments of the invention described herein can be implemented in sequences other than those illustrated or described herein.
[0035] The following is a brief introduction to the design concept of the embodiment of the present application:
[0036] With the development of endoscopic technology, doctors need high-quality imaging during gastrointestinal endoscopy. Usually, doctors use white light imaging for routine operations and switch to narrow-band light imaging when necessary to obtain richer pathological information. However, the existing technology automatically switches between modes between frames, alternating between the image frames of the two imaging modes, which will cause the actual frame rate of each imaging mode to be halved. This slows down the image update speed, affects the smoothness and real-time performance, and causes freezes or flickers when switching, which in turn affects the doctor's observation and diagnosis of the lesion.
[0037] In view of this, the embodiments of the present application provide an image processing method, device, electronic device and storage medium, wherein the method includes: obtaining an RGB image formed based on a preset light source; wherein the emitted light of the preset light source includes bands corresponding to two imaging modes; based on the spectral center wavelength corresponding to the preset light source, performing image decomposition on the color channel with a composite band in the RGB image to obtain multiple sub-images containing only single narrowband band information; based on two mapping adjustment matrices corresponding to the two imaging modes, respectively performing mapping processing on the multiple sub-images to obtain imaging images corresponding to the two imaging modes. In this way, by decomposing and mapping the RGB image formed by the preset light source, imaging images corresponding to the two imaging modes can be simultaneously obtained without switching the imaging mode. This processing method can more accurately extract pathological information, avoid the degradation of image quality caused by switching modes, maintain a high image update speed, significantly improve the smoothness and real-time performance of the image, and thus improve the accuracy of diagnosis.
[0038] refer to Figure 1 , is a flowchart of an implementation of an image processing method provided in an embodiment of the present application, and the specific implementation process of the method is as follows:
[0039] S101, acquiring an RGB image formed based on a preset light source; wherein the emitted light of the preset light source includes wavelength bands corresponding to two imaging modes.
[0040] In the embodiment of the present application, the lighting unit provides an illumination light source for the endoscope system. The illumination light source may be composed of LEDs with multiple non-overlapping wavelengths, specifically, five types of LEDs, namely, a narrow-band blue-violet light source, a narrow-band blue light source, a narrow-band green light source, a narrow-band amber light source, and a narrow-band red light source. These five types of LEDs can synthesize white light or any other combination of multi-spectrum mixed light. Specifically, the central wavelength range of the narrow-band blue-violet light source is [405nm, 425nm], the central wavelength range of the narrow-band blue light source is [450nm, 470nm], the central wavelength range of the narrow-band green light source is [530nm, 550nm], the central wavelength range of the narrow-band amber light source is [590nm, 610nm], and the central wavelength range of the narrow-band red light source is [620nm, 640nm].
[0041] Before starting imaging, the lighting unit obtains two imaging modes corresponding to the current image, as well as the bands corresponding to each of the two imaging modes, and counts the non-overlapping bands between the bands. By enabling the LED light source corresponding to the band to provide a preset light source for the current image, the output light of the preset light source includes the bands corresponding to the two imaging modes.
[0042] Further, an initial image is obtained after the output light of the preset light source is irradiated to the image acquisition object and then reflected. In the endoscope application scenario, the image acquisition object is usually a tissue part of the patient, such as the stomach wall, blood vessels, bleeding tissue, etc. The output light of the preset light source is irradiated to the image acquisition object to form reflected light, and the reflected light passes through the lens and the image sensor to form an initial image, wherein the initial image is a Bayer format image.
[0043] Further, the initial image is processed to obtain an RGB image. Figure 2 As shown, image processing includes multiple processing flows, including black level correction, demosaicing, gamma conversion, image denoising, image enhancement, etc., wherein the central flow among the multiple processing flows is gamma conversion, and the number of processing flows before gamma conversion is the same as the number of processing flows after gamma conversion. In an RGB image, the blue channel is denoted as B, the green channel is denoted as G, and the red channel is denoted as R.
[0044] By obtaining an RGB image based on the above method, the imaging links of the two imaging modes to be decomposed contained in the RGB image can share a set of image processing architecture as much as possible before decomposition, so as to save resources and improve processing efficiency.
[0045] S102, based on the spectral center wavelength corresponding to the preset light source, image decomposition is performed on the color channel with the composite band in the RGB image to obtain a plurality of sub-images containing only single narrowband band information.
[0046] In the embodiment of the present application, after acquiring the RGB image, based on the spectral center wavelength corresponding to the preset light source, the color channel with the composite band in the RGB image is decomposed to obtain multiple sub-images containing only single narrowband band information, including:
[0047] Based on the wavelength range to which the spectral center wavelength corresponding to the preset light source belongs, the spectral center wavelength is classified into the corresponding color channel, which includes the R channel, the G channel, and the B channel. The spectral center wavelength corresponding to the LED enabled by the current image that is less than the first wavelength is classified as the B channel, the spectral center wavelength that is greater than the first wavelength and less than the second wavelength is classified as the G channel response, and the spectral center wavelength that is greater than the second wavelength is classified as the R channel response, and the classification result is obtained.
[0048] Based on the classification results, it is determined whether there is a target channel in the color channel, wherein the target channel represents the color channel with a composite band in the RGB image. Specifically, according to the classification results, the number of narrow-band spectra of each of the B, G, and R channels is counted, and based on the statistical results, it is determined whether there is a color channel with a narrow-band spectrum number greater than 1 in the B, G, and R channels. If so, the color channel is used as the target channel.
[0049] If it is determined that there is a target channel, the target channel is image decomposed based on the band components corresponding to the composite band to obtain multiple sub-images containing only single narrowband information. For example, taking the R channel as an example, if it contains spectral information of two bands with central wavelengths of 600nm and 630nm, the R channel needs to be image decomposed to obtain a sub-image with the spectrum of the central wavelength of 600nm as the main response component and a sub-image with the spectrum of the central wavelength of 630nm as the main response component. The same applies to other channels.
[0050] Among them, based on the band components corresponding to the composite band, the target channel is image decomposed to obtain multiple sub-images containing only single narrowband band information, including: obtaining the spectral reflectance of the image acquisition object under a preset light source, and the calibrated response value in the endoscope system under the preset light source; based on the spectral reflectance and the calibrated response value, the target channel is image decomposed to obtain multiple sub-images containing only single narrowband band information.
[0051] Preferably, before performing image decomposition on the target channel, an inverse gamma transform is performed on the RGB image to obtain a linearized image, and then image decomposition is performed on the target channel, including performing image decomposition on the color channel corresponding to the target image in the linearized image to obtain multiple sub-images containing only single narrowband band information.
[0052] For example, the RGB image is recorded as ,right Perform inverse gamma transform to get linearized image Where, if the gamma transformation curve is expressed as , then the inverse gamma transform can be expressed as = .like Figure 2 The multiple processing steps shown include color adjustment. After performing the inverse gamma transform, perform inverse color mapping to obtain the inverse color image ,in, , is the color adjustment matrix corresponding to the color adjustment process. Figure 2 The multiple processing flows shown do not include a color adjustment flow. is the identity matrix, = .
[0053] In addition, the target channel is recorded as , express The corresponding B channel, G channel, R channel, Decompose the image to obtain multiple sub-images containing only single narrowband information , where n is a positive integer. To obtain the sub-image For example, let ,in, is a single-component estimation matrix related to the system spectral response characteristics, It can be expressed as: , is the spectral reflectance of the image acquisition object in the corresponding light band, is the calibrated response value of the image acquisition object in the endoscope system under the corresponding light band and corresponding light power. The main ingredients are derived from ,therefore Can be simplified to ,at this time is the calibrated response value of the image acquisition object in the endoscope system under the corresponding optical band and corresponding optical power. and The method is to construct a target scene, measure the spectral reflectance of the target object offline by a spectrophotometer, and traverse the optical power level of the corresponding light source at the same time, and record the corresponding endoscope system calibration response value under each level; The spectral reconstruction techniques used include R matrix method, principal component analysis method, Wiener estimation method and comparative measurement method.
[0054] In one embodiment, determining whether there is a target channel in the color channel includes: determining whether there is a target channel in the color channel; if not, directly executing step S103.
[0055] Through the above method, the RGB image can be decomposed into multiple sub-images containing only single narrowband band information, which can more accurately reflect the pathological characteristics of the tissue.
[0056] S103 , based on two mapping adjustment matrices corresponding to the two imaging modes, respectively perform mapping processing on the multiple sub-images to obtain imaging images corresponding to the two imaging modes respectively.
[0057] After performing image decomposition on a color channel with a composite band to obtain a plurality of sub-images corresponding to the RGB image, further mapping processing is performed on the plurality of sub-images based on two mapping adjustment matrices corresponding to the two imaging modes to obtain imaging images corresponding to the two imaging modes, including: constructing two mapping adjustment matrices corresponding to the two imaging modes, and constructing column vectors corresponding to the plurality of sub-images; and then, obtaining the product between the two mapping adjustment matrices and the column vectors to obtain imaging images corresponding to the two imaging modes.
[0058] Specifically, the two imaging modes are respectively recorded as the first imaging mode and the second imaging mode. The mapping adjustment matrix corresponding to the first imaging mode is constructed as , and the mapping adjustment matrix corresponding to the second imaging mode diagram is The multiple sub-images corresponding to the RGB image that only contain single narrowband information are represented as Then, the mapping formula for generating the imaging images corresponding to the two imaging modes is:
[0059] (1)
[0060] (2)
[0061] In formula (1), represents a first imaging image corresponding to the first imaging mode, , , Respectively represent the red channel, green channel, and blue channel of the first imaging image.
[0062] In formula (2), represents a second imaging image corresponding to the second imaging mode, , , Respectively represent the red channel, green channel, and blue channel of the second imaging image.
[0063] If the first image The corresponding sub-images include , , , , ; Second imaging image The corresponding sub-images include , , , where the G channel has only A sub-image, indicating that the channel does not need to be decomposed, that is . According to the above formula, it can be expressed as:
[0064]
[0065] = (3)
[0066]
[0067] (4)
[0068] In formula (3), ~ , ~ , ~ for The matrix elements of .
[0069] In formula (4), , , , , , , , , for The matrix elements of .
[0070] Further, the first imaging image , the second imaging image Gamma transformation is performed respectively to obtain the first output image that conforms to human vision , the second output image , and output to the display unit of the endoscope system. The gamma transform curve is expressed as ,but = ;like The gamma transform curve is expressed as ,but = . The display unit receives , After that, the display unit will process the , The display processing methods include but are not limited to the same-ratio picture-on-picture (POP) display mode, different-ratio POP display mode, and picture-in-picture (PIP) display mode.
[0071] Based on the above image processing method, by decomposing and mapping the RGB image formed by the preset light source, the imaging images corresponding to the two imaging modes can be obtained simultaneously without switching the imaging mode. This processing method can extract pathological information more accurately, avoid the image quality degradation caused by switching modes, maintain a high image update speed, and significantly improve the smoothness and real-time performance of the image, thereby improving the accuracy of diagnosis.
[0072] Based on the same inventive concept, the present application embodiment provides an image processing device, such as Figure 3 FIG. 1 is a schematic diagram of a structure of an image processing device provided in an embodiment of the present application, comprising:
[0073] An acquisition module 301 is used to acquire an RGB image formed based on a preset light source; wherein the emitted light of the preset light source includes wavelength bands corresponding to two imaging modes;
[0074] A decomposition module 302 is used to decompose the color channel with a composite band in the RGB image based on the spectral center wavelength corresponding to the preset light source to obtain a plurality of sub-images containing only single narrowband band information;
[0075] The mapping module 303 is used to perform mapping processing on the multiple sub-images based on the two mapping adjustment matrices corresponding to the two imaging modes, so as to obtain imaging images corresponding to the two imaging modes respectively.
[0076] In a possible embodiment, the acquisition module 301 is used to: obtain an initial image formed by reflection after the outgoing light of a preset light source is irradiated onto an image acquisition object; perform image processing on the initial image to obtain an RGB image; wherein the image processing includes multiple processing flows, and the central flow among the multiple processing flows is the gamma transform.
[0077] In a possible embodiment, the decomposition module 302 is used to: classify the spectral center wavelength into a corresponding color channel based on the wavelength range to which the spectral center wavelength corresponding to a preset light source belongs, and the color channel includes an R channel, a G channel, and a B channel; based on the classification result, determine whether there is a target channel in the color channel; wherein the target channel represents a color channel having a composite band in the RGB image; if so, perform image decomposition on the target channel based on the band components corresponding to the composite band to obtain multiple sub-images containing only single narrowband band information.
[0078] In a possible embodiment, the decomposition module 302 is also used to: determine whether there is a target channel in the color channel; if not, based on two mapping adjustment matrices corresponding to the two imaging modes, respectively map the RGB image to obtain imaging images corresponding to the two imaging modes.
[0079] In a possible embodiment, the decomposition module 302 is used to: obtain the spectral reflectance of the image acquisition object under a preset light source, and the calibrated response value in the endoscope system under the preset light source; based on the spectral reflectance and the calibrated response value, perform image decomposition on the target channel to obtain multiple sub-images containing only single narrowband band information.
[0080] In a possible embodiment, the mapping module 303 is used to: construct two mapping adjustment matrices corresponding to the two imaging modes, and construct column vectors corresponding to multiple sub-images; calculate the product between the two mapping adjustment matrices and the column vectors respectively, to obtain the imaging images corresponding to the two imaging modes respectively.
[0081] The technical effects achieved by the above-mentioned image processing device can be referred to the above-mentioned image processing method embodiment, which will not be described in detail here.
[0082] In some possible implementations, the image processing apparatus according to the present application may include at least a processor and a memory. The memory stores program code, and when the program code is executed by the processor, the processor executes the steps of the image processing method according to various exemplary implementations of the present application described in this specification. For example, the processor may execute the following steps: Figure 1 Follow the steps shown in .
[0083] Based on the same inventive concept, an electronic device is also provided in an embodiment of the present application, and the electronic device can implement the functions of the aforementioned image processing method and apparatus. Referring to the figure, the electronic device includes:
[0084] At least one processor 401, and a memory 402 connected to the at least one processor 401. The specific connection medium between the processor 401 and the memory 402 is not limited in the embodiment of the present application. Figure 4 In the example, the processor 401 and the memory 402 are connected via the bus 400. The bus 400 is Figure 4 The connection between other components is shown by bold lines, and is not intended to be limiting. The bus 400 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. Alternatively, the processor 401 can also be called a controller, and there is no limitation on the name.
[0085] In the embodiment of the present application, the memory 402 stores instructions that can be executed by at least one processor 401. The at least one processor 401 can execute the image processing method discussed above by executing the instructions stored in the memory 402. The processor 401 can implement Figure 3 The functions of each module in the device shown.
[0086] Among them, the processor 401 is the control center of the device, and can use various interfaces and lines to connect the various parts of the entire control device. By running or executing instructions stored in the memory 402 and calling the data stored in the memory 402, the various functions of the device and process data, the device can be monitored as a whole.
[0087] In one possible design, the processor 401 may include one or more processing units, and the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the modem processor may not be integrated into the processor 401. In some embodiments, the processor 401 and the memory 402 may be implemented on the same chip, and in some embodiments, they may also be implemented separately on separate chips.
[0088] The processor 401 may be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component, and may implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the image processing method disclosed in the embodiments of the present application may be directly embodied as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.
[0089] The memory 402 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory 402 may include at least one type of storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory, a random access memory (Random Access Memory, RAM), a static random access memory (Static Random Access Memory, SRAM), a programmable read-only memory (Programmable Read Only Memory, PROM), a read-only memory (Read Only Memory, ROM), an electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), a magnetic memory, a disk, an optical disk, etc. The memory 402 is any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 402 in the embodiment of the present application can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.
[0090] By programming the processor 401, the code corresponding to the image processing method described in the above embodiment can be fixed into the chip, so that the chip can execute the image processing method when running. Figure 2The steps of the image processing method of the embodiment shown are as follows: How to design and program the processor 401 is a technique well known to those skilled in the art and will not be described in detail here.
[0091] Based on the same inventive concept, an embodiment of the present application further provides a storage medium, which stores computer instructions. When the computer instructions are executed on a computer, the computer executes the image processing method discussed above.
[0092] In some possible implementations, various aspects of the image processing method provided by the present application may also be implemented in the form of a program product, which includes a program code. When the program product is run on an apparatus, the program code is used to enable the control device to execute the steps of the image processing method according to various exemplary implementations of the present application described above in this specification.
[0093] Based on the same inventive concept, the present application also provides an endoscope, such as Figure 5 5 is a schematic diagram of the structure of an endoscope provided in an embodiment of the present application, comprising an illumination unit 501, a processing unit 502, and a display unit 503; the illumination unit 501 is used to provide an illumination light source, and the image acquisition object of the illumination light source is reflected to obtain an initial image; wherein the output light of the preset light source includes two bands corresponding to the imaging modes; the processing unit 502 is used to pre-process the initial image to obtain an RGB image, and perform Figure 1 The image processing method shown obtains imaging images corresponding to the two imaging modes respectively, and performs gamma transformation on the imaging images; the display unit 503 is used to display the imaging images after the gamma transformation respectively.
[0094] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0095] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0096] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0097] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0098] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. An image processing method, characterized in that: The method comprises: Acquire an RGB image formed based on a preset light source; wherein the emitted light of the preset light source includes wavelength bands corresponding to two imaging modes; Based on the central wavelength of the spectrum corresponding to the preset light source, image decomposition is performed on the color channel with the composite band in the RGB image to obtain a plurality of sub-images containing only single narrowband band information; Based on the two mapping adjustment matrices corresponding to the two imaging modes, mapping processing is performed on the multiple sub-images respectively to obtain imaging images corresponding to the two imaging modes respectively.
2. The method according to claim 1, characterized in that: The obtaining of an RGB image formed based on a preset light source comprises: Acquire an initial image formed by reflection after the emitted light of the preset light source irradiates the image acquisition object; Performing image processing on the initial image to obtain the RGB image; wherein the image processing includes multiple processing flows, and a central flow among the multiple processing flows is gamma transformation.
3. The method according to claim 1, characterized in that: The image decomposition is performed on the color channel with a composite band in the RGB image based on the central wavelength of the spectrum corresponding to the preset light source to obtain a plurality of sub-images containing only single narrowband band information, including: Based on the wavelength range to which the spectral center wavelength corresponding to the preset light source belongs, the spectral center wavelength is classified into a corresponding color channel, where the color channel includes an R channel, a G channel, and a B channel; Based on the classification result, determining whether there is a target channel in the color channel; wherein the target channel represents a color channel with a composite band in the RGB image; If so, the target channel is image decomposed based on the band components corresponding to the composite band to obtain a plurality of sub-images containing only single narrowband band information.
4. The method according to claim 3, characterized in that: The determining whether there is a target channel in the color channel comprises: Determine whether there is a target channel in the color channel; If not, mapping processing is performed on the RGB image based on two mapping adjustment matrices corresponding to the two imaging modes to obtain imaging images corresponding to the two imaging modes respectively.
5. The method according to claim 3, characterized in that: The image decomposition of the target channel based on the band components corresponding to the composite band to obtain a plurality of sub-images containing only single narrowband band information includes: Acquiring the spectral reflectance of the image acquisition object under the preset light source and the calibrated response value in the endoscope system under the preset light source; Based on the spectral reflectance and the calibration response value, the target channel is image decomposed to obtain a plurality of sub-images containing only single narrowband band information.
6. The method according to claim 1, characterized in that: The mapping process is performed on the plurality of sub-images based on the two mapping adjustment matrices corresponding to the two imaging modes to obtain imaging images corresponding to the two imaging modes respectively, including: Constructing two mapping adjustment matrices corresponding to the two imaging modes, and constructing column vectors corresponding to the multiple sub-images; The products of the two mapping adjustment matrices and the column vectors are obtained to obtain imaging images corresponding to the two imaging modes.
7. An image processing device, characterized in that: include: An acquisition module, used to acquire an RGB image formed based on a preset light source; wherein the emitted light of the preset light source includes wavelength bands corresponding to two imaging modes; A decomposition module, configured to decompose the color channel having a composite band in the RGB image based on the central wavelength of the spectrum corresponding to the preset light source, to obtain a plurality of sub-images containing only single narrowband band information; A mapping module is used to perform mapping processing on the multiple sub-images based on two mapping adjustment matrices corresponding to the two imaging modes, so as to obtain imaging images corresponding to the two imaging modes respectively.
8. An electronic device, characterized in that: It includes a processor and a memory, wherein the memory stores a program code, and when the program code is executed by the processor, the processor executes the method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The storage medium comprises a program code, and when the storage medium is run on an electronic device, the program code is used to enable the electronic device to execute the method described in any one of claims 1 to 6.
10. An endoscope, characterized in that: comprising a lighting unit, a processing unit, and a display unit; The lighting unit is used to provide an illumination light source, and the image acquisition object of the illumination light source is reflected to obtain an initial image; wherein the output light of the preset light source includes wavelength bands corresponding to two imaging modes; The processing unit is used to preprocess the initial image to obtain an RGB image, and execute the method described in any one of claims 1 to 6 on the RGB image to obtain imaging images corresponding to the two imaging modes respectively, and perform gamma transformation on the imaging image; The display unit is used to display the imaging images after gamma transformation.
Citation Information
Patent Citations
Dual-spectrum imaging control system and method, storage medium and device
CN118924213A
Image processing method and device, electronic equipment and storage medium
CN119722541A
Image signal processor, imaging system, and electronic endoscope system
JP2013022219A
Processor for endoscope
JP2015223249A