A multi-depth-of-field photography fusion method and system in microsurgery

Through multi-scale decomposition and saliency detection of microscope multi-depth-of-field images, combined with cropping and interpolation processing, efficient and accurate fusion of multi-depth-of-field images in microsurgery is achieved, solving the problems of inaccurate and slow fusion in the existing technology. Improved image clarity and computational efficiency.

CN114936994BInactive Publication Date: 2024-09-17THE FIRST MEDICAL CENT CHINESE PLA GENERAL HOSPITAL
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210557889.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-19
Publication Date
2024-09-17
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing multi-depth-of-field fusion methods have inaccurate fusion and slow calculation speed in microsurgery, and cannot fully utilize the imaging characteristics of microscopic images, resulting in unclear fusion images.

Method used

By adjusting the microscope to high magnification to capture a sequence of multi-depth-of-field images, and performing multi-scale image decomposition, saliency detection and weight calculation, combined with cropping, decomposition and upward interpolation processing, the fusion method of high-frequency and low-frequency images is used to achieve seamless fusion of images. .

Benefits of technology

The clarity and accuracy of the fused image are improved, while the computational efficiency and real-time performance are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114936994B
    Figure CN114936994B
Patent Text Reader

Abstract

The present invention proposes a multi-depth photography fusion method and system in microsurgery, which relates to the field of image fusion technology. By acquiring and decomposing a multi-depth image sequence at a high magnification, a corresponding multi-layer high-frequency image sequence and a low-frequency image sequence are obtained, and then the low-frequency image sequence is subjected to saliency detection and a high-frequency fusion weight value sequence is calculated. Then, the image at a low magnification is acquired and processed accordingly to obtain the corresponding high-frequency image to be replaced and the low-frequency image to be replaced. Then, the high-frequency image at the highest level of each multi-depth image is replaced with the high-frequency image to be replaced, and the low-frequency image at the highest level of each multi-depth image is replaced with the low-frequency image to be replaced, to obtain the corresponding high-frequency image sequence to be fused and the low-frequency image sequence to be fused. Finally, the high-frequency image sequence to be fused and the low-frequency image sequence to be fused are fused separately, and then the total fusion is performed to obtain the final fused image, so that the fused image is clearer and more accurate, and the fusion effect is better.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image fusion, and in particular to a multi-depth-of-field photography fusion method and system in microsurgery. Background Art

[0002] The surgical microscope is an indispensable surgical observation tool for otolaryngology, neurosurgery, ophthalmology, etc. However, there are certain problems when taking pictures with a surgical microscope. Take ear microsurgery as an example. During the surgical exposure, the field of view has a large depth range. The depth of field of the microscope, that is, the clear imaging range, is limited and cannot completely cover the depth of field range. Therefore, it is impossible to present the entire surgical field of view through a single imaging. This greatly limits the scope of surgical operation, affects the efficiency of the operation, and brings many inconveniences to surgical field observation or surgical teaching.

[0003] Faced with this situation, relevant professionals in the industry mostly use multi-depth-of-field fusion methods to obtain image sequences with different depths of field and perform multi-depth-of-field fusion on the images. The commonly used multi-depth-of-field fusion method has obvious defects that make it not well suited for microsurgery. The traditional multi-depth-of-field image fusion method generally uses images of the same magnification with different focus points, identifies the clear parts in the image, calculates different fusion weights, and finally fuses the images according to the fusion weights. However, this fusion method does not fully utilize the imaging characteristics of microscopic images. Its fusion speed is relatively slow and it is prone to inaccurate fusion in complex scenes. Summary of the invention

[0004] The purpose of the present invention is to provide a multi-depth photography fusion method and system in microsurgery, which can make full use of the imaging principles and characteristics of the surgical microscope to make the final fused image clearer and more accurate, while having the beneficial effect of high computational real-time performance.

[0005] The embodiment of the present invention is achieved as follows:

[0006] In a first aspect, an embodiment of the present application provides a multi-depth-of-field photography fusion method in microsurgery, which comprises the following steps:

[0007] Adjust the microscope to Z 1 The magnification is set, and the step length S is used as the focusing step length to take pictures, and a multi-depth image sequence I is obtained. n , where n represents the sequence number of a certain image in the multi-depth image sequence, n≥1;

[0008] For multi-depth image sequence I n Perform multi-scale image decomposition on each image in to obtain a high-frequency image sequence of the corresponding image and low frequency image sequences Where L represents the number of layers of image decomposition, L ≥ 1;

[0009] For each image, the low-frequency image sequence B n L Perform saliency detection to obtain the corresponding saliency image sequence And calculate the weight of each saliency image to obtain a high-frequency fusion weight value sequence

[0010] Adjust the microscope to Z 2 Take a picture at a magnification to obtain the image to be processed I Z2 ;

[0011] The image to be processed I Z2 Perform cropping, decomposition and upward interpolation in sequence to obtain the image to be processed I Z2 The corresponding high-frequency image to be replaced I Z2cropfullH and the low-frequency image to be replaced I Z2cropfullL ;

[0012] Using the high-frequency image I to be replaced Z2cropfullH Replace each image with a high frequency image sequence The Lth layer high-frequency image in the image is obtained to obtain the high-frequency image sequence to be fused, and the low-frequency image to be replaced is used Z2cropfullL Replace each image with a sequence of low-frequency images The L-th layer low-frequency image in is obtained to obtain a low-frequency image sequence to be fused;

[0013] The high-frequency image sequence to be fused for each image is fused according to the high-frequency fusion weight value sequence W n L Perform fusion to obtain a high-frequency fused image D;

[0014] Fusing the low-frequency image sequence to be fused of each image to obtain a low-frequency fused image B;

[0015] The high-frequency fused image D and the low-frequency fused image B are added together to obtain the final fused image F.

[0016] Based on the first aspect, in some embodiments of the present invention, the multi-depth image sequence I n Perform multi-scale image decomposition on each image in to obtain a high-frequency image sequence of the corresponding image and low frequency image sequences The steps specifically include:

[0017] Calculate the number of image decomposition layers L;

[0018] For multi-depth image sequence I n Each image in is subjected to L low-pass filtering processes to obtain the low-frequency image sequence corresponding to each image.

[0019] Calculate the low-frequency image sequence of each image separately The difference between two adjacent low-frequency images in the image is used to obtain the high-frequency image sequence corresponding to each image.

[0020] Based on the first aspect, in some embodiments of the present invention, the low-frequency image sequence of each image is Perform saliency detection to obtain the corresponding saliency image sequence The steps specifically include:

[0021] Calculating Multiple Depth Image Sequences I n The low-frequency image sequence corresponding to each image in Each low-frequency image B in i The arithmetic average pixel value of each low-frequency image B is obtained i The corresponding average pixel value image B u , where i≤L;

[0022] For each low-frequency image B i Perform Gaussian low-pass filtering to obtain the filtered image B g ;

[0023] According to the formula S i =|B u -B g |Calculate each low-frequency image B i The corresponding saliency image S i , and count the low-frequency image sequences corresponding to each image Each low-frequency image B in i The corresponding saliency image S i , and obtain the salient image sequence

[0024] Based on the first aspect, in some embodiments of the present invention, the weight of each saliency image is calculated to obtain a high-frequency fusion weight value sequence. The steps specifically include:

[0025] For multi-depth image sequence I n The salient image sequence corresponding to each image in Each salient image S in i , according to the formula Calculate the saliency image S i The salient image sequence in which it is located The ratio of the sum of i ;

[0026] Count the salient image sequences corresponding to each image Each salient image S ini The weight W i , get the high-frequency fusion weight value sequence

[0027] Based on the first aspect, in some embodiments of the present invention, the image to be processed I Z2 The steps of clipping, decomposing and upward interpolation processing in sequence specifically include:

[0028] Get the image to be processed I Z2 The original width W 0 and high H 0 ;

[0029] According to the formula Calculate the width W and height H of the cropped rectangular area respectively to get the cropped image I Z2crop ;

[0030] Image I Z2crop Decompose to obtain the corresponding high-frequency image and low-frequency image;

[0031] Image I Z2crop The corresponding high-frequency image and low-frequency image are The value is interpolated upwards at a factor of .

[0032] Based on the first aspect, in some embodiments of the present invention, the high-frequency image sequence to be fused of each image is fused according to the high-frequency fusion weight value sequence. The steps of fusing and obtaining the high-frequency fused image D specifically include:

[0033] According to the formula All the high-frequency images to be fused of each image are fused according to the corresponding high-frequency fusion weights to obtain a high-frequency fused image D, where k≤L, and N represents the number of multi-depth image sequences.

[0034] Based on the first aspect, in some embodiments of the present invention, the step of fusing the low-frequency image sequence to be fused of each image to obtain the low-frequency fused image B specifically includes:

[0035] The calculation formula using the average method is: The low-frequency image sequence to be fused is fused to obtain a low-frequency fused image B.

[0036] In a second aspect, the present application provides a multi-depth-of-field photography fusion system for microsurgery, which includes:

[0037] The first multi-depth camera module is used to adjust the microscope to Z 1 The magnification is set, and the step length S is used as the focusing step length to take pictures, and a multi-depth image sequence I is obtained. n, where n represents the sequence number of a certain image in the multi-depth image sequence, n≥1;

[0038] Multi-scale image decomposition module, used for multi-depth image sequence I n Perform multi-scale image decomposition on each image in to obtain a high-frequency image sequence of the corresponding image and low frequency image sequences Where L represents the number of layers of image decomposition, L ≥ 1;

[0039] The saliency detection module is used to detect the low-frequency image sequence of each image. Perform saliency detection to obtain the corresponding saliency image sequence And calculate the weight of each saliency image to obtain a high-frequency fusion weight value sequence

[0040] The second multi-depth camera module is used to adjust the microscope to Z 2 Take a picture at a magnification to obtain the image to be processed I Z2 ;

[0041] The image decomposition module is used to decompose the image to be processed I Z2 Perform cropping, decomposition and upward interpolation in sequence to obtain the image to be processed I Z2 The corresponding high-frequency image to be replaced I Z2cropfullH and the low-frequency image to be replaced I Z2cropfullL ;

[0042] The image replacement module is used to use the high-frequency image I to be replaced Z2cropfullH Replace each image with a high frequency image sequence The Lth layer high-frequency image in the image is obtained to obtain the high-frequency image sequence to be fused, and the low-frequency image to be replaced is used Z2cropfullL Replace each image with a sequence of low-frequency images The L-th layer low-frequency image in is obtained to obtain a low-frequency image sequence to be fused;

[0043] The high-frequency image fusion module is used to combine the high-frequency image sequence to be fused of each image according to the high-frequency fusion weight value sequence. Perform fusion to obtain a high-frequency fused image D;

[0044] A low-frequency image fusion module is used to fuse the low-frequency image sequence to be fused of each image to obtain a low-frequency fused image B;

[0045] The image fusion module is used to add the high-frequency fused image D and the low-frequency fused image B to obtain the final fused image F.

[0046] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory for storing one or more programs; and a processor. When the one or more programs are executed by the processor, the method described in any one of the first aspects is implemented.

[0047] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method as described in any one of the above-mentioned first aspects.

[0048] Compared with the prior art, the embodiments of the present invention have at least the following advantages or beneficial effects:

[0049] The embodiment of the present invention provides a multi-depth photography fusion method and system in microsurgery. First, the microscope is adjusted to a high magnification to make the local area to be observed clearly imaged and photographed to obtain a multi-depth image sequence, and then multi-scale image decomposition is performed to obtain a high-frequency image sequence and a low-frequency image sequence of the corresponding image. At this time, the high-frequency image sequence reflects the local detail characteristics of the image, and the low-frequency image sequence reflects the contour edge characteristics of the image. Then, the low-frequency image sequence of each image is decomposed into a multi-depth image sequence. Perform saliency detection to obtain the corresponding saliency image sequence And calculate the weight of each saliency image to obtain a high-frequency fusion weight value sequence For the fusion of high-frequency images. Then, the microscope is adjusted to a low magnification for taking pictures, so that all the areas to be observed are clearly imaged, so as to obtain an image to be processed, and the image is cropped, decomposed and interpolated upward in turn to obtain a high-frequency image to be replaced and a low-frequency image to be replaced corresponding to the image to be processed. Then, the high-frequency image to be replaced is used to replace the highest-level high-frequency image in the high-frequency image sequence of each image, and the low-frequency image to be replaced is used to replace the highest-level low-frequency image in the low-frequency image sequence of each image, so as to obtain a high-frequency image sequence to be fused and a low-frequency image sequence to be fused, respectively, so that the image information at low magnification can be seamlessly integrated into the image at high magnification to enhance the fusion effect. Finally, the high-frequency image sequence to be fused is fused according to the high-frequency fusion weight value sequence to obtain a high-frequency fused image, and the low-frequency image sequence to be fused is fused according to the average method to obtain a low-frequency fused image, and then the high-frequency fused image and the low-frequency fused image are fused to obtain the final fused image. This method makes the fused image clearer and more accurate by replacing first, then fusing separately, and finally fusing in total, while the calculation efficiency is high and the real-time performance is strong. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0051] Figure 1 A flowchart of an embodiment of a multi-depth-of-field photography fusion method in microsurgery provided by the present invention;

[0052] Figure 2 In one embodiment of a multi-depth-of-field photography fusion method in microsurgery provided by the present invention, a multi-depth-of-field image sequence I is n Perform multi-scale image decomposition on each image in to obtain a high-frequency image sequence of the corresponding image and low frequency image sequences A detailed flowchart of the steps;

[0053] Figure 3 In one embodiment of a multi-depth-of-field photography fusion method for microsurgery provided by the present invention, a low-frequency image sequence of each image is Perform saliency detection to obtain the corresponding saliency image sequence And calculate the weight of each saliency image to obtain a high-frequency fusion weight value sequence A detailed flowchart of the steps;

[0054] Figure 4 A structural block diagram of a multi-depth-of-field photography fusion system in microsurgery provided by the present invention;

[0055] Figure 5 A structural block diagram of an electronic device provided by an embodiment of the present invention.

[0056] Icons: 1. Memory; 2. Processor; 3. Communication interface; 11. First multi-depth-of-field photography module; 12. Multi-scale image decomposition module; 13. Saliency detection module; 14. Second multi-depth-of-field photography module; 15. Image decomposition module; 16. Image replacement module; 17. High-frequency image fusion module; 18. Low-frequency image fusion module; 19. Image fusion module. DETAILED DESCRIPTION

[0057] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various different configurations.

[0058] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for which protection is sought, but merely represents selected embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.

[0059] Example

[0060] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0061] See also Figure 1 , Figure 1 The flowchart of a multi-depth-of-field photography fusion method in microsurgery provided by an embodiment of the present application is shown, and the method includes the following steps:

[0062] Step S1: Adjust the microscope to Z 1 The magnification is set, and the step length S is used as the focusing step length to take pictures, and a multi-depth image sequence I is obtained. n , where n represents the sequence number of an image in the multi-depth image sequence, n≥1.

[0063] In the above steps, first aim the microscope at the surgical field and adjust the microscope to a suitable observation position. Then adjust the microscope to the required high magnification Z 1 Adjust the focus control device of the microscope to make the local area to be observed clearly imaged, and record the magnification Z at this time. 1 Next, adjust the focus control device of the microscope to adjust the focus point of the microscope from the lowest point of the depth of field of the surgical field to the highest point according to the adjustment step S. During each adjustment, a microscope photo operation is performed to obtain a series of multi-depth image sequences I 1 , I 2 , I 3 , ..., I n , a total of N frames. The adjustment step length S is obtained by measuring the depth of field ruler at the magnification Z of the microscope. 1 The depth of field range d is determined by adjusting the step length, for example For example, during tympanoplasty, the magnification Z 1 Take 8 times, within the depth of field range of 180mm-210mm, take pictures in sequence from the depth of field 180mm to the depth of field 210mm according to the adjustment step S = 1mm, and you can get a series of multi-depth image sequences I 1 , I 2 , I 3 , ..., I30 , in preparation for subsequent image fusion.

[0064] Step S2: multi-depth image sequence I n Perform multi-scale image decomposition on each image in to obtain a high-frequency image sequence of the corresponding image and low frequency image sequences Where L represents the number of layers of image decomposition, L ≥ 1. In this step, after multi-scale image decomposition is performed on each image, the high-frequency image sequence of the corresponding image is obtained. Reflects the detailed information of the image, such as edges, textures, etc., low-frequency image sequence It reflects the overall information of the image, including the composition area, etc.

[0065] See also Figure 2 , for multiple depth of field image sequence I n The specific steps of multi-scale image decomposition for each image in include:

[0066] Step S2-1: Calculate the number of image decomposition layers L. The number of image decomposition layers L can be calculated by the formula Calculate, where Z 1 is the magnification in the above-mentioned high-magnification imaging mode, Z 2 is the magnification in the small magnification imaging mode, preferably Therefore, the number of image decomposition levels L is preferably 3.

[0067] Step S2-2: multi-depth image sequence I n Each image in is subjected to L low-pass filtering processes to obtain the low-frequency image sequence corresponding to each image.

[0068] Exemplarily, for a multi-depth image I 1 , according to formula B k =B k-1 *A performs three filtering processes, where A represents the low-pass filter convolution kernel, B k Specifically, firstly, the original image I 1 Input into the low-pass filter, and after processing, the first filtered image B is obtained 1 , and use it as the multi-depth image I 1 The first layer of low-frequency image Then the first filtered image B 1 As the input image, it is input into the low-pass filter to obtain the second filtered image B 2 , and use it as the multi-depth image I 1 The second layer of low frequency image Then the second filtered image B 2 Input, get the third filtered image B3 , and use it as the multi-depth image I 1 The third layer low frequency image The low-frequency image obtained by statistical three-time filtering That is, we get a multi-depth image I 1 The corresponding low-frequency image sequence Sequentially multi-depth image sequence I n Perform the above L low-pass filtering operations on each image in to obtain the low-frequency image sequence corresponding to each image. Optionally, the low-pass filtering process may adopt mean filtering, which can remove particle noise in the image and make the image smoother.

[0069] Step S2-3: Calculate the low-frequency image sequence of each image separately The difference between two adjacent low-frequency images in the image is used to obtain the high-frequency image sequence corresponding to each image.

[0070] Exemplarily, for a multi-depth image I 1 , according to formula D k =B k-1 -B k Calculate the pixel difference between the corresponding pixels of two adjacent low-frequency images to obtain the high-frequency image D k Specifically, first calculate the original image I 1 With the first filtered image B 1 The pixel difference between them is used to obtain the high-frequency image D 1 , and use it as the multi-depth image I 1 The first layer of high-frequency image Then calculate the first filtered image B 1 With the second filtered image B 2 The pixel difference between them is used to obtain the high-frequency image D 2 , and use it as the multi-depth image I 1 The second layer high frequency image Then calculate the second filtered image B 2 And the third filtered image B 3 The pixel difference between them is used to obtain the high-frequency image D 3 , and use it as the multi-depth image I 1 The third layer high frequency image Statistical three-layer high-frequency image That is, we get a multi-depth image I 1 The corresponding high-frequency image sequence Sequentially multi-depth image sequence I n Perform the above operation on each image in to obtain the high-frequency image sequence corresponding to each image

[0071] Step S3: Low-frequency image sequence of each image Perform saliency detection to obtain the corresponding saliency image sequence And calculate the weight of each saliency image to obtain a high-frequency fusion weight value sequence In this step, the obtained salient image sequence It can better characterize the grayscale features of the image as a whole, which is helpful to further identify the image boundary in a complex background. Then, the high-frequency images are fused according to different weights, which can make the fusion effect of the later images better.

[0072] See also Figure 3 , for each image's low-frequency image sequence Perform saliency detection to obtain the corresponding saliency image sequence The specific steps include:

[0073] Step S3-1: Calculate the multi-depth image sequence I n The low-frequency image sequence corresponding to each image in Each low-frequency image B in i The arithmetic average pixel value of each low-frequency image B is obtained i The corresponding average pixel value image B u , where i≤L.

[0074] Exemplarily, for a multi-depth image I 1 , calculate its first layer low-frequency image The arithmetic mean pixel value is then used to represent the first layer of low-frequency image The pixel value of each pixel in is replaced by the arithmetic average pixel value to obtain the first layer of low-frequency image The corresponding average pixel value image B u .

[0075] Step S3-2: For each low-frequency image B i Perform Gaussian low-pass filtering to obtain the filtered image B g .

[0076] Exemplarily, the multi-depth image I 1 The first layer of low-frequency image Perform Gaussian low-pass filtering to obtain the first layer of low-frequency image The corresponding filtered image B g The purpose of Gaussian low-pass filtering is to eliminate Gaussian noise in the image, making the image smoother without losing details, and better retaining the boundary information in the image, which is conducive to the fusion of subsequent images.

[0077] Step S3-3: According to formula S i =|B u -B g |Calculate each low-frequency image B i The corresponding saliency image S i , and count the low-frequency image sequences corresponding to each image Each low-frequency image B in i The corresponding saliency image S i , and obtain the salient image sequence

[0078] For example, according to formula S i =|B u -B g Calculate multi-depth images I 1 The first layer of low-frequency image The corresponding average pixel value image B u Image B after Gaussian low-pass filtering g The pixel difference between them is used to obtain the multi-depth image I 1 The first layer of low-frequency image The corresponding saliency image S 1 ,Right now

[0079] Then, for the multi-depth image I 1 The second layer of low frequency image and the third layer low frequency image The above steps S3-1 to S3-3 are performed to obtain a multi-depth image I 1 Low frequency image sequence The corresponding salient image sequence Then, the multi-depth image sequence I is n Each image in is processed according to the above steps S3-1 to S3-3 to obtain a low-frequency image sequence corresponding to each multi-depth image The corresponding salient image sequence

[0080] See also Figure 3 , calculate the weight of each salient image and obtain the high-frequency fusion weight value sequence The steps specifically include:

[0081] Step S3-4: multi-depth image sequence I n The salient image sequence corresponding to each image in Each salient image S in i , according to the formula Calculate the saliency image S iand its salient image sequence S n L The ratio of the sum of i , where i≤L.

[0082] Step S3-5: Count the salient image sequences corresponding to each image Each salient image S in i The weight W i , get the high frequency fusion weight value sequence

[0083] Exemplarily, the multi-depth image I is obtained according to the above steps. 1 Low frequency image sequence The corresponding salient image sequence Afterwards, according to the formula Calculate the weight corresponding to each salient image. Specifically, for the salient image Divide its pixel value by the three saliency images The sum of the pixel values ​​of The corresponding weight W 1 , that is, W 1 1 Then, the saliency images are calculated sequentially The corresponding weight W 2 , W 3 , you can get the multi-depth image I by statistics 1 Low frequency image sequence Corresponding salient image sequence The corresponding weight value sequence W 1 , W 2 , W 3 , and use it as the multi-depth image I 1 High frequency image sequence The high-frequency fusion weight value sequence W 1 1 , W 1 2 , W 1 3 .

[0084] Then, the multi-depth image sequence I is n Each image in is processed according to the above steps S3-4 to obtain a low-frequency image sequence of each multi-depth image Corresponding salient image sequence The corresponding high-frequency fusion weight value sequence

[0085] Step S4: Adjust the microscope to Z 2Take a picture at a magnification to obtain the image to be processed I Z2 .

[0086] In this step, the microscope needs to be adjusted to the required small magnification Z 2 Make the whole area to be observed clearly and record the magnification Z at this time. 2 , and then perform a microscope photography operation to obtain the image in the current field of view, i.e., the image to be processed I Z2 . For example, Z 2 The value of can be determined by the following formula: That is, the magnification Z in the small magnification imaging mode 2 is the magnification Z in high-magnification imaging mode 1 one third of.

[0087] Step S5: The image to be processed I Z2 Perform cropping, decomposition and upward interpolation in sequence to obtain the image to be processed I Z2 The corresponding high-frequency image to be replaced I Z2cropfullH and the low-frequency image to be replaced I Z2cropfullL .

[0088] In this step, firstly, the above-mentioned image to be processed I Z2 To crop, first obtain the image to be processed I Z2 The original width W 0 and high H 0 , then according to the formula Calculate the width W and height H of the cropped rectangular area respectively to get the cropped image I Z2crop For example, the image to be processed I Z2 The original width W 0 and high H 0 The original pixel size is 3840*2160, and then a rectangular area with a pixel size of 1280*720 is cropped with the center of the image as the center, that is, the cropped image I is obtained. Z2crop Then, image I Z2crop Decompose according to the above steps S2-2 and S2-3 to obtain image I Z2crop The corresponding high-frequency image and low-frequency image are interpolated upward to obtain the image to be processed I Z2 The corresponding high-frequency image to be replaced I Z2cropfullH and the low-frequency image to be replaced I Z2cropfullL The upward interpolation of the image can increase the pixel size of the image without generating pixels, thereby improving the resolution of the image and making the image clearer, so as to improve the effect of subsequent image fusion. This belongs to the prior art and will not be described in detail here.

[0089] Step S6: Using the high-frequency image I to be replaced Z2cropfullH Replace each image with a high-frequency image sequence D n L The Lth layer high-frequency image in the image is obtained to obtain the high-frequency image sequence to be fused, and the low-frequency image to be replaced is used Z2cropfullL Replace each image with a sequence of low-frequency images The L-th layer low-frequency image in is obtained to obtain a low-frequency image sequence to be fused;

[0090] Exemplarily, for a multi-depth image I 1 High frequency image sequence and low frequency image sequences Using the above high-frequency image I to be replaced Z2cropfullH Replace the third layer high frequency image Get multi-depth image I 1 The high-frequency image sequence to be fused, and the low-frequency image to be replaced I Z2cropfullL Replace the third layer low frequency image Get multi-depth image I 1 The low-frequency image sequence to be fused. n This operation is performed for each image in , so as to obtain a high-frequency image sequence to be fused and a low-frequency image sequence to be fused corresponding to each multi-depth image. 2 The image information collected under the microscope is seamlessly integrated into the high magnification Z 1 In the image, the overall fusion effect is enhanced.

[0091] Step S7: The high-frequency image sequence to be fused of each image is fused according to the high-frequency fusion weight value sequence The fusion is performed to obtain a high-frequency fused image D.

[0092] Since each high-frequency image in the high-frequency image sequence to be fused of each multi-depth image contains the detail information corresponding to the multi-depth image, and the importance of the useful information contained in each high-frequency image is different, by fusing each high-frequency image according to its corresponding high-frequency fusion weight value, a better fusion effect can be achieved, and the obtained high-frequency fused image D contains more comprehensive detail information, and the image is clearer and more accurate. Specifically, according to the formula All high-frequency images to be fused of all multi-depth images are fused according to the corresponding high-frequency fusion weights to obtain a multi-depth image sequence I n The high-frequency fused image D is , where k≤L, and N represents the number of multi-depth image sequences.

[0093] Step S8: Fusing the low-frequency image sequence to be fused of each image to obtain a low-frequency fused image B.

[0094] Since the low-frequency images in the high-frequency image sequences to be fused of each multi-depth image reflect the overall information of the image, which mainly includes the image area, boundary and other information, by fusing the high-frequency image sequences to be fused of each multi-depth image, the area and boundary information contained in the obtained low-frequency fused image B can be more comprehensive and the image contour clearer. Specifically, the average method can be used to calculate the formula The low-frequency image sequence to be fused is fused to obtain a multi-depth image sequence I n Low-frequency fusion image B. The calculation method of the averaging method is simple, which can reduce the amount of calculation and improve the speed of image fusion to a certain extent.

[0095] Step S9: Add the high-frequency fused image D and the low-frequency fused image B to obtain a final fused image F.

[0096] The multi-depth image sequence I obtained through the above steps S1-S8 n The pixel values ​​of the high-frequency fusion image D and the low-frequency fusion image B are calculated according to the formula F=B+D to obtain the final fusion image F.

[0097] Based on the same inventive concept, the present invention also proposes a multi-depth photography fusion system for microsurgery, please refer to Figure 4 , Figure 4 The figure shows a structural block diagram of a multi-depth photography fusion system in microsurgery provided by an embodiment of the present invention. The system includes:

[0098] The first multi-depth-of-field photographing module 11 is used to adjust the microscope to Z 1 The magnification is set, and the step length S is used as the focusing step length to take pictures, and a multi-depth image sequence I is obtained. n , where n represents the sequence number of a certain image in the multi-depth image sequence, n≥1;

[0099] The multi-scale image decomposition module 12 is used to decompose the multi-depth image sequence I n Perform multi-scale image decomposition on each image in to obtain a high-frequency image sequence of the corresponding image and low frequency image sequences Where L represents the number of layers of image decomposition, L ≥ 1;

[0100] The saliency detection module 13 is used to detect the low-frequency image sequence of each image. Perform saliency detection to obtain the corresponding saliency image sequence And calculate the weight of each saliency image to obtain a high-frequency fusion weight value sequence

[0101] The second multi-depth-of-field photographing module 14 is used to adjust the microscope to Z2 Take a picture at a magnification to obtain the image to be processed I Z2 ;

[0102] The image decomposition module 15 is used to decompose the image to be processed I Z2 Perform cropping, decomposition and upward interpolation in sequence to obtain the image to be processed I Z2 The corresponding high-frequency image to be replaced I Z2cropfullH and the low-frequency image to be replaced I Z2cropfullL ;

[0103] The image replacement module 16 is used to use the high-frequency image I to be replaced Z2cropfullH Replace each image with a high frequency image sequence The Lth layer high-frequency image in the image is obtained to obtain the high-frequency image sequence to be fused, and the low-frequency image to be replaced is used Z2cropfullL Replace each image with a sequence of low-frequency images The L-th layer low-frequency image in is obtained to obtain a low-frequency image sequence to be fused;

[0104] The high-frequency image fusion module 17 is used to combine the high-frequency image sequence to be fused of each image according to the high-frequency fusion weight value sequence. Perform fusion to obtain a high-frequency fused image D;

[0105] The low-frequency image fusion module 18 is used to fuse the low-frequency image sequence to be fused of each image to obtain a low-frequency fused image B;

[0106] The image fusion module 19 is used to add the high-frequency fused image D and the low-frequency fused image B to obtain a final fused image F.

[0107] See also Figure 5 , Figure 5 A schematic structural block diagram of an electronic device provided in an embodiment of the present application. The electronic device includes a memory 1, a processor 2 and a communication interface 3, and the memory 1, the processor 2 and the communication interface 3 are electrically connected to each other directly or indirectly to realize data transmission or interaction. For example, these components can be electrically connected to each other through one or more communication buses or signal lines. The memory 1 can be used to store software programs and modules, such as program instructions / modules corresponding to a multi-depth photography fusion system in microsurgery provided in an embodiment of the present application. The processor 2 executes various functional applications and data processing by executing the software programs and modules stored in the memory 1. The communication interface 3 can be used for signaling or data communication with other node devices.

[0108] Among them, the memory 1 can be, but is not limited to, a random access memory (RAM), a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable read-only memory (EEPROM), etc.

[0109] Processor 2 can be an integrated circuit chip with signal processing capabilities. The processor 2 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0110] Understandably, Figure 5 The structure shown is for illustration only. The electronic device may also include Figure 5 More or fewer components as shown, or with Figure 1 Different configurations are shown. Figure 5 Each component shown in the figure can be implemented by hardware, software or a combination thereof.

[0111] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to the multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing 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 consecutive boxes 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 and / or the flowchart, and the combination of boxes in the block diagram and / or the flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0112] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0113] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0114] In summary, the embodiment of the present application provides a method and system for fusion of multi-depth photography in microsurgery. First, the microscope is adjusted to a high magnification to make the local area to be observed clearly imaged and photographed to obtain a multi-depth image sequence, and then multi-scale image decomposition is performed to obtain a high-frequency image sequence and a low-frequency image sequence of the corresponding image. At this time, the high-frequency image sequence reflects the local detail characteristics of the image, and the low-frequency image sequence reflects the contour edge characteristics of the image. Next, the low-frequency image sequence B of each image is decomposed.n L Perform saliency detection and obtain the corresponding saliency image sequence S n L , and calculate the weight of each salient image to obtain the high-frequency fusion weight value sequence W n L , for the fusion of high-frequency images. Then, the microscope is adjusted to a low magnification for taking pictures, so that the entire area to be observed is clearly imaged, so as to obtain an image to be processed, and the image is cropped, decomposed and interpolated upward in turn to obtain a high-frequency image to be replaced and a low-frequency image to be replaced corresponding to the image to be processed. Then, the high-frequency image to be replaced is used to replace the highest-level high-frequency image in the high-frequency image sequence of each image, and the low-frequency image to be replaced is used to replace the highest-level low-frequency image in the low-frequency image sequence of each image, so as to obtain a high-frequency image sequence to be fused and a low-frequency image sequence to be fused, respectively, so that the image information at low magnification can be seamlessly integrated into the image at high magnification to enhance the fusion effect. Finally, the high-frequency image sequence to be fused is fused according to the high-frequency fusion weight value sequence to obtain a high-frequency fused image, and the low-frequency image sequence to be fused is fused according to the average method to obtain a low-frequency fused image, and then the high-frequency fused image and the low-frequency fused image are fused to obtain the final fused image. This method makes the fused image clearer and more accurate by replacing first, then fusing separately, and finally fusing in total, while the calculation efficiency is high and the real-time performance is strong.

[0115] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

[0116] It will be apparent to those skilled in the art that the present application is not limited to the details of the exemplary embodiments described above, and that the present application can be implemented in other specific forms without departing from the spirit or essential features of the present application. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the present application is defined by the appended claims rather than the above description, and it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims be included in the present application. Any reference numeral in a claim should not be considered as limiting the claim to which it relates.

Claims

1. A multi-depth photography fusion method in microsurgery, characterized in that: include: Adjust the microscope to Z1 magnification and take pictures with step length S as the focusing step length to obtain a multi-depth image sequence I n , where n represents the sequence number of a certain image in the multi-depth image sequence, n≥1; For multi-depth image sequence I n Perform multi-scale image decomposition on each image in to obtain a high-frequency image sequence of the corresponding image and low frequency image sequences Where L represents the number of layers of image decomposition, L ≥ 1; For each image, the low-frequency image sequence Perform saliency detection to obtain the corresponding saliency image sequence And calculate the weight of each saliency image to obtain a high-frequency fusion weight value sequence Adjust the microscope to Z2 magnification to take pictures and obtain the image I to be processed. Z2 ; The image to be processed I Z2 Perform cropping, decomposition and upward interpolation in sequence to obtain the image to be processed I Z2 The corresponding high-frequency image to be replaced I Z2cropfullH and the low-frequency image to be replaced I Z2cropfullL ; Using the high-frequency image I to be replaced Z2cropfullH Replace each image with a high frequency image sequence The Lth layer high-frequency image in the image is obtained to obtain the high-frequency image sequence to be fused, and the low-frequency image to be replaced is used Z2cropfullL Replace each image with a sequence of low-frequency images The L-th layer low-frequency image in is obtained to obtain a low-frequency image sequence to be fused; The high-frequency image sequence to be fused for each image is fused according to the high-frequency fusion weight value sequence Perform fusion to obtain a high-frequency fused image D; Fusing the low-frequency image sequence to be fused of each image to obtain a low-frequency fused image B; The high-frequency fused image D and the low-frequency fused image B are added together to obtain the final fused image F.

2. A multi-depth photography fusion method in microsurgery as claimed in claim 1, characterized in that: The multiple depth of field image sequence I n Perform multi-scale image decomposition on each image in to obtain a high-frequency image sequence of the corresponding image and low frequency image sequences The steps specifically include: Calculate the number of image decomposition layers L; For multi-depth image sequence I n Each image in is subjected to L low-pass filtering processes to obtain the low-frequency image sequence corresponding to each image. Calculate the low-frequency image sequence of each image separately The difference between two adjacent low-frequency images in the image is used to obtain the high-frequency image sequence corresponding to each image.

3. The multi-depth photography fusion method in microsurgery according to claim 1, characterized in that: The low-frequency image sequence for each image Perform saliency detection to obtain the corresponding saliency image sequence The steps specifically include: Calculating Multiple Depth Image Sequences I n The low-frequency image sequence corresponding to each image in Each low-frequency image B in i The arithmetic average pixel value of each low-frequency image B is obtained i The corresponding average pixel value image B u , where i≤L; For each low-frequency image B i Perform Gaussian low-pass filtering to obtain the filtered image B g ; According to the formula S i =|B u -B g |Calculate each low-frequency image B i The corresponding saliency image S i , and count the low-frequency image sequences corresponding to each image Each low-frequency image B in i The corresponding saliency image S i , and obtain the salient image sequence 4. A multi-depth photography fusion method in microsurgery as claimed in claim 3, characterized in that: The weight of each saliency image is calculated to obtain a high-frequency fusion weight value sequence The steps specifically include: For multi-depth image sequence I n The salient image sequence corresponding to each image in Each salient image S in i , according to the formula Calculate the saliency image S i The salient image sequence in which it is located The ratio of the sum of i ; Count the salient image sequences corresponding to each image Each salient image S in i The weight W i , get the high-frequency fusion weight value sequence 5. The multi-depth photography fusion method in microsurgery according to claim 1, characterized in that: The image to be processed I Z2 The steps of clipping, decomposing and upward interpolation processing in sequence specifically include: Get the image to be processed I Z2 The original width W0 and height H0; According to the formula Calculate the width W and height H of the cropped rectangular area respectively to get the cropped image I Z2crop ; Image I Z2crop Decompose to obtain the corresponding high-frequency image and low-frequency image; Image I Z2crop The corresponding high-frequency image and low-frequency image are The value is interpolated upwards at a factor of .

6. The multi-depth photography fusion method in microsurgery as claimed in claim 4, characterized in that: The high-frequency image sequence to be fused of each image is fused according to the high-frequency fusion weight value sequence The steps of fusing and obtaining the high-frequency fused image D specifically include: According to the formula All the high-frequency images to be fused of each image are fused according to the corresponding high-frequency fusion weights to obtain a high-frequency fused image D, where k≤L, and N represents the number of multi-depth image sequences.

7. A multi-depth photography fusion method in microsurgery as claimed in claim 6, characterized in that: The step of fusing the low-frequency image sequence to be fused of each image to obtain the low-frequency fused image B specifically includes: The calculation formula using the average method is: The low-frequency image sequence to be fused is fused to obtain a low-frequency fused image B.

8. A multi-depth photography fusion system in microsurgery, characterized in that: include: The first multi-depth-of-field photographing module is used to adjust the microscope to a Z1 magnification and take photographs with a step length S as a focusing step length to obtain a multi-depth-of-field image sequence I n , where n represents the sequence number of a certain image in the multi-depth image sequence, n≥1; Multi-scale image decomposition module, used for multi-depth image sequence I n Perform multi-scale image decomposition on each image in to obtain a high-frequency image sequence of the corresponding image and low frequency image sequences Where L represents the number of layers of image decomposition, L ≥ 1; The saliency detection module is used to detect the low-frequency image sequence of each image. Perform saliency detection to obtain the corresponding saliency image sequence And calculate the weight of each saliency image to obtain a high-frequency fusion weight value sequence The second multi-depth-of-field photographing module is used to adjust the microscope to a Z2 magnification to take a photograph and obtain an image to be processed I Z2 ; The image decomposition module is used to decompose the image to be processed I Z2 Perform cropping, decomposition and upward interpolation in sequence to obtain the image to be processed I Z2 The corresponding high-frequency image to be replaced I Z2cropfullH and the low-frequency image to be replaced I Z2cropfullL ; The image replacement module is used to use the high-frequency image I to be replaced Z2cropfullH Replace each image with a high frequency image sequence The Lth layer high-frequency image in the image is obtained to obtain the high-frequency image sequence to be fused, and the low-frequency image to be replaced is used Z2cropfullL Replace each image with a sequence of low-frequency images The L-th layer low-frequency image in is obtained to obtain a low-frequency image sequence to be fused; The high-frequency image fusion module is used to combine the high-frequency image sequence to be fused of each image according to the high-frequency fusion weight value sequence. Perform fusion to obtain a high-frequency fused image D; A low-frequency image fusion module is used to fuse the low-frequency image sequence to be fused of each image to obtain a low-frequency fused image B; The image fusion module is used to add the high-frequency fused image D and the low-frequency fused image B to obtain the final fused image F.

9. An electronic device, characterized in that: include: A memory for storing one or more programs; processor; When the one or more programs are executed by the processor, the method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.