Holographic image multi-target automatic fusion method, device, equipment, medium and product

Through the full image reconstruction and adaptive binary processing of holographic images, combined with the connection area analysis and measurement curve construction, the reconstruction images are directly fused, which solves the complex holographic image fusion process and poor effect on small batch data in the prior art. The problem of this achieves a simplified fusion process and high-quality fusion effect.

CN118644406BActive Publication Date: 2025-02-07ZHEJIANG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411109961.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-14
Publication Date
2025-02-07
Estimated Expiration
2044-08-14

AI Technical Summary

Technical Problem

The existing holographic image fusion algorithm is complex and requires manual or automatic focus to acquire focal plane images. The neural network-based method requires a large amount of training data, long preparation time and poor effect on small batches or random data.

Method used

Reconstructed image datasets are obtained through full image reconstruction, and binary processing is performed using adaptive binarization algorithm, connecting area analysis and measurement curve construction are carried out, focusing distance is determined and mask is generated, and the reconstruction image is directly fused, avoiding focusing Image generation and neural network training.

Benefits of technology

The holographic image fusion process is simplified, the fusion effect is improved, it is suitable for small samples or random samples, and the effect is good for multi-target images, and the fusion quality does not decrease due to too many targets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118644406B_ABST
    Figure CN118644406B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device, equipment, medium and product for automatic fusion of holographic images, and relates to the field of holographic image fusion. The method for automatic fusion of holographic images includes: reconstructing and binarizing the holographic image in its entirety to construct a binary image data set; performing connected region analysis on each binary image in the binary image data set, and calculating parameter information of the connected regions of each target in each binary image; constructing a measurement curve for each connected region; determining the focal distance of the connected regions of each target in the holographic image; generating a background mask and a target mask of each target based on the regional pixel information of each connected region in each binary image; and fusing the reconstructed images in the reconstructed image data set based on the background mask, the target mask corresponding to each target and the focal distance of each target. The present application can simplify the process of holographic image fusion and improve the effect of holographic image fusion.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of holographic image fusion, and in particular to a method, device, equipment, medium and product for automatic fusion of multi-target holographic images. Background Art

[0002] At present, the digital holographic image fusion algorithm is mainly aimed at the multiple focal plane images of the holographic image after focusing. It is necessary to first obtain the focused images of each focal plane of the holographic image through automatic or manual focusing, and then fuse the above focused images through the image fusion algorithm to obtain the fused image. The feasible image fusion methods here are mainly divided into two categories: one is the image fusion method based on traditional image processing methods, such as the image fusion method based on wavelet transform, etc.; the other is the image fusion method based on neural networks, such as image fusion based on PCNN (Pulse Coupled Neural Network), FCN (Fully Convolutional Networks) and other neural networks. Since the above methods are all aimed at multiple focused images of the holographic image, the process is relatively complicated and divided into two stages. First, the holographic image needs to be automatically or manually focused to obtain the focused image of the focal plane, and then the above method is used for these focused images to obtain the fused image. In addition, the use of neural network-based image fusion methods requires a large amount of data for training, and preparing training data requires considerable time for manual labeling. There is room for improvement in the effect of small batches or individual data that have not been trained. There are certain problems with the effect of using random targets obtained in actual research, such as blurred edges or incorrect fusion target selection found in actual use. Summary of the invention

[0003] The purpose of this application is to provide a method, device, equipment, medium and product for automatic fusion of multi-target holographic images, which can simplify the process of holographic image fusion and improve the effect of holographic image fusion.

[0004] To achieve the above objectives, this application provides the following solutions:

[0005] In a first aspect, the present application provides a method for automatic fusion of multiple targets of a holographic image, and the method for automatic fusion of multiple targets of a holographic image comprises:

[0006] Performing full image reconstruction on the holographic image to obtain a reconstructed image data set corresponding to the holographic image; the reconstructed image data set includes reconstructed images at different reconstruction distances;

[0007] Using an adaptive binarization algorithm, binarizing each reconstructed image in the reconstructed image data set to obtain a binarized image data set; the binarized image data set includes binarized images at different reconstruction distances;

[0008] Performing connected region analysis on each binary image in the binary image data set, respectively, obtaining connected regions of each target in each binary image, and calculating parameter information of the connected regions of each target in each binary image; the parameter information at least includes measurement and regional pixel information;

[0009] Constructing a measurement curve of each target in the holographic image according to the reconstruction distance of each binary image and the measurement of the connected area of ​​each target in each binary image; the measurement curve is a curve in which the measurement changes with the reconstruction distance;

[0010] Determine the focusing distance of each target according to the measurement curve of each target; the focusing distance is the reconstruction distance corresponding to the maximum value point of the measurement curve;

[0011] Generate a background mask and a target mask corresponding to each target according to the regional pixel information of the connected area of ​​each target in each binary image;

[0012] According to the background mask, the target masks corresponding to each target and the focus distance of each target, the reconstructed images in the reconstructed image data set are fused to obtain a fused image.

[0013] Optionally, the holographic image is fully reconstructed, which may also include:

[0014] The following formula is used to preprocess the holographic image;

[0015] ;

[0016] in, is the preprocessed holographic image, is the Gaussian blur function, It's a holographic image.

[0017] Optionally, using an adaptive binarization algorithm to perform binarization processing on each reconstructed image in the reconstructed image dataset to obtain a binarized image dataset specifically includes:

[0018] The reconstructed image is filtered by using a minimum filtering method to obtain a filtered reconstructed image;

[0019] Use the following formula to calculate the binarization threshold of the filtered reconstructed image;

[0020] ;

[0021] in, is the binarization threshold, is the reconstructed image after filtering;

[0022] The filtered reconstructed image is binarized based on the binarization threshold to obtain a binarized image corresponding to the reconstructed image.

[0023] Optionally, generating a background mask and a target mask corresponding to each target according to the regional pixel information of the connected region of each target in each binary image specifically includes:

[0024] Generate an initial target mask of each target in the holographic image according to the regional pixel information of each connected region in each binary image;

[0025] Use a Gaussian filter kernel with a convolution kernel size of 30 and a variance of 20 to filter the initial target mask of each target to obtain the target mask corresponding to each target;

[0026] According to the target mask corresponding to each target, the background mask is obtained using the following formula;

[0027] ;

[0028] in, is the background mask, is the target mask corresponding to the i-th target.

[0029] Optionally, according to the background mask, the target masks corresponding to the respective targets and the focus distances of the respective targets, the reconstructed images in the reconstructed image data set are fused to obtain a fused image, specifically including:

[0030] Performing bitwise multiplication on the target mask of each target and the reconstructed image in the reconstructed image data set whose reconstruction distance is the focusing distance of the target, to obtain a target image corresponding to each target;

[0031] Perform bitwise multiplication on the background mask and the holographic image to obtain the background image;

[0032] The target image corresponding to each target and the background image are spliced ​​to obtain a fused image.

[0033] Optionally, a background mask and a target mask corresponding to each target are generated according to the regional pixel information of the connected area of ​​each target in each binary image, and the method also includes:

[0034] The parameter information of the connected areas whose centroid distance in the same binary image is less than the first centroid distance threshold is merged.

[0035] Optionally, a measurement curve of each target in the holographic image is constructed according to the reconstruction distance of each binary image and the measurement of the connected area of ​​each target in each binary image, specifically including:

[0036] The connected regions whose centroid distance in each two adjacent binary images at the reconstruction distances is less than the second centroid distance threshold are determined as the connected regions of the same target at different reconstruction distances;

[0037] According to the measures of connected areas of the same target at different reconstruction distances, a measure curve of the target is constructed.

[0038] In a second aspect, the present application provides a holographic image multi-target automatic fusion device, wherein the holographic image multi-target automatic fusion device applies the above-mentioned holographic image multi-target automatic fusion method, and the holographic image multi-target automatic fusion device comprises:

[0039] An image reconstruction module, used to perform full image reconstruction on the holographic image to obtain a reconstructed image data set corresponding to the holographic image; the reconstructed image data set includes reconstructed images at different reconstruction distances;

[0040] A binarization module is used to use an adaptive binarization algorithm to perform binarization processing on each reconstructed image in the reconstructed image data set to obtain a binarized image data set; the binarized image data set includes binarized images at different reconstruction distances;

[0041] A connected region analysis module, used to perform connected region analysis on each binary image in the binary image data set, obtain the connected region of each target in each binary image, and calculate parameter information of the connected region of each target in each binary image, wherein the parameter information at least includes measurement and regional pixel information;

[0042] A measurement curve construction module is used to construct a measurement curve of each target in the holographic image according to the reconstruction distance of each binary image and the measurement of the connected area of ​​each target in each binary image; the measurement curve is a curve in which the measurement changes with the reconstruction distance;

[0043] A focusing distance determination module, used to determine the focusing distance of each target according to the measurement curve of each target; the focusing distance is the reconstruction distance corresponding to the maximum value point of the measurement curve;

[0044] A mask generation module, used to generate a background mask and a target mask corresponding to each target according to the regional pixel information of the connected area of ​​each target in each binary image;

[0045] The image fusion module is used to fuse the reconstructed images in the reconstructed image data set according to the background mask, the target masks corresponding to each target and the focus distance of each target to obtain a fused image.

[0046] In a third aspect, the present application provides a computer device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-mentioned method for automatic fusion of multi-target holographic images.

[0047] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-mentioned method for automatic fusion of multiple targets of holographic images.

[0048] According to the specific embodiments provided in this application, this application discloses the following technical effects:

[0049] The present application provides a method, device, equipment, medium and product for automatic fusion of multiple targets of holographic images. The present invention automatically obtains the reconstruction distance and divides the fusion target area by measuring the reconstructed image as the reconstruction distance changes, and uses its measurement curve to solve the crosstalk problem between targets, thereby eliminating the generation of focused images in image preprocessing. The present application is directly based on the reconstructed image calculation, without the need for network training, and has good effects for small samples or random samples, and has good effects for multi-target images, and the fusion quality will not decrease due to too many targets. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0051] Figure 1 This is an application environment diagram of a holographic image multi-target automatic fusion method in an embodiment of the present application;

[0052] Figure 2 A schematic diagram of a flow chart of a method for automatic fusion of multiple targets of a holographic image provided in one embodiment of the present application;

[0053] Figure 3 A detailed flowchart of a multi-target automatic fusion method for holographic images provided in one embodiment of the present application;

[0054] Figure 4 A schematic diagram of a holographic image provided by an embodiment of the present application;

[0055] Figure 5 A schematic diagram of a target, a softening mask and a target image provided by an embodiment of the present application;

[0056] Figure 6 A schematic diagram of a fused image provided by an embodiment of the present application;

[0057] Figure 7 A schematic diagram of the structure of a computer device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0058] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0059] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0060] The holographic image multi-target automatic fusion method provided in the embodiment of the present application can be applied to Figure 1In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be set up separately, integrated on the server 104, or placed on the cloud or other servers. The terminal 102 can send a holographic image to the server 104, and the server 104 receives the holographic image. The server 104 reconstructs the holographic image in its entirety to obtain a reconstructed image data set corresponding to the holographic image; uses an adaptive binarization algorithm to binarize each reconstructed image in the reconstructed image data set to obtain a binarized image data set; performs connected area analysis on each binary image in the binary image data set to obtain the connected areas of each target in each binary image, and calculates the parameter information of the connected areas of each target in each binary image; according to the reconstruction distance of each binary image and each The measurement of the connected area of ​​each target in the binary image is used to construct a measurement curve for each target in the holographic image; the measurement curve is a curve in which the measurement changes with the reconstruction distance; the focusing distance of each target is determined according to the measurement curve of each target; the focusing distance is the reconstruction distance corresponding to the maximum point of the measurement curve; according to the regional pixel information of the connected area of ​​each target in each binary image, a background mask and a target mask corresponding to each target are generated; according to the background mask, the target mask corresponding to each target and the focusing distance of each target, the reconstructed images in the reconstructed image data set are fused to obtain a fused image. The server 104 can feed back the obtained fused image to the terminal 102. In addition, in some embodiments, the holographic image multi-target automatic fusion method can also be implemented by the server 104 or the terminal 102 alone, such as the terminal 102 can directly process the holographic image, or the server 104 can obtain the holographic image from the data storage system and process the holographic image.

[0061] The terminal 102 may be, but is not limited to, various desktop computers, laptop computers, smart phones, tablet computers, IoT devices, and portable wearable devices. The IoT devices may be smart speakers, smart TVs, smart air conditioners, smart vehicle-mounted devices, etc. The portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. The server 104 may be implemented as an independent server or a server cluster consisting of multiple servers, or may be a cloud server.

[0062] In an exemplary embodiment, Figure 2 As shown, a method for automatic fusion of multi-target holographic images is provided. The method is executed by a computer device, and can be executed by a computer device such as a terminal or a server alone, or can be executed by a terminal and a server together. In the embodiment of the present application, the method is applied to Figure 1The server 104 in the example is used as an example to illustrate, including the following steps 201 to 207. Among them:

[0063] Step 201 , fully reconstructing the holographic image to obtain a reconstructed image data set corresponding to the holographic image; the reconstructed image data set includes reconstructed images at different reconstruction distances.

[0064] Step 202: Use an adaptive binarization algorithm to perform binarization processing on each reconstructed image in the reconstructed image data set to obtain a binarized image data set; the binarized image data set includes binarized images at different reconstruction distances.

[0065] Step 203, respectively perform connected region analysis on each binary image in the binary image data set, obtain the connected region of each target in each binary image, and calculate parameter information of the connected region of each target in each binary image, wherein the parameter information includes at least measurement and regional pixel information.

[0066] Step 204, constructing a measurement curve of each target in the holographic image according to the reconstruction distance of each binary image and the measurement of the connected area of ​​each target in each binary image; the measurement curve is a curve in which the measurement changes with the reconstruction distance.

[0067] Step 205, determining the focusing distance of each target according to the measurement curve of each target; the focusing distance is the reconstruction distance corresponding to the maximum point of the measurement curve.

[0068] Step 206 , generating a background mask and a target mask corresponding to each target according to the regional pixel information of the connected region of each target in each binary image.

[0069] Step 207 , fusing the reconstructed images in the reconstructed image data set according to the background mask, the target masks corresponding to the targets and the focus distances of the targets to obtain a fused image.

[0070] Implementing the above steps 201 to 207 can simplify the process of holographic image fusion and improve the effect of holographic image fusion.

[0071] like Figure 3 As shown, the above step 201 can be replaced by the following steps 1 and 2.

[0072] Step 1: Use a single-arm coaxial or dual-arm coaxial holographic system to collect holographic images and perform preprocessing, specifically including: removing the background unevenness of the holographic image caused by the Gaussian attenuation that may exist in the imaging light source according to the following formula:

[0073] .

[0074] in, is the preprocessed holographic image, and the division here is bitwise division. is the Gaussian blur function. For an image of size 2048, its convolution kernel size is 150 and its variance is 100. It's a holographic image.

[0075] Step 2: According to a preset step size, an angular spectrum reconstruction algorithm is used to fully reconstruct the holographic image preprocessed in step 1 within a predetermined reconstruction distance range to obtain a corresponding reconstructed image data set.

[0076] like Figure 3 As shown, the above step 202 can be replaced by the following step 3.

[0077] Step 3: Preprocess the reconstructed image data set obtained in step 2. After filtering the reconstructed image twice using the minimum filter algorithm with a convolution kernel size of 4, calculate the binarization threshold of the filtered reconstructed image using the following formula.

[0078] .

[0079] in, is the binarization threshold, is the reconstructed image after filtering, and mean() is the function for finding the average.

[0080] After calculating the binarization threshold T, an adaptive threshold is used for binarization to obtain the corresponding binarized image and construct a binarized image dataset.

[0081] As a preferred implementation, the above step 202 may further include the following step 4.

[0082] Step 4: Perform morphological processing on the binary image data set in step 3 to enhance information, perform opening and filling operations on the binary image, expand, connect and fill the binary fragment areas of the same target to obtain the processed binary image.

[0083] like Figure 3 As shown, the above steps 203 to 205 can be replaced by the following steps 5 to 9.

[0084] Step 5, delete the area whose measure is less than the specified threshold in the binary image obtained in step 4, perform noise removal operation on the binary image, and perform connected area analysis on the target after processing to obtain the measure and regional pixel information of the connected area; wherein the regional pixel information includes the coordinates of the pixel points of the connected area, and further calculates the centroid coordinates of the connected area, etc. Specifically, the calculation formula of the centroid coordinates is as follows:

[0085] .

[0086] In the formula, [ ] is the centroid coordinate, [ ] is the pixel coordinates of the connected area, is the measure of the connected area.

[0087] Step 6: Measure the connected areas whose centroid distance is less than the first centroid distance threshold, merge the centroid coordinates and regional pixel information, and correspond to each reconstruction distance. The measurement refers to the number of regional pixels. The specific formula for centroid merging is as follows:

[0088] .

[0089] In the formula, [ ] is the centroid coordinate of the connected region after merging, [ ]and[ ] are the centroid coordinates of the two connected regions to be merged, is the measure of the two connected regions to be merged.

[0090] Step 7: Repeat steps 5 and 6 for each binary image in the binary image data set in step 4, and obtain and record the measurement, centroid coordinates, regional pixel information, etc. corresponding to the connected area of ​​each target in all binary images in the binary image data set.

[0091] Step 8: Analyze the connected areas according to the reconstruction distance, determine the connected areas whose centroid distances in adjacent reconstruction distances are less than the second centroid distance threshold, as the connected areas of the same target, obtain the connected areas of the same target at different reconstruction distances, and construct the measurement curve of the target based on the measurement of the connected areas of the same target at different reconstruction distances.

[0092] Step 9: Based on the measurement curve of each target obtained in step 8, extract the reconstruction distance where the maximum value of each target on the corresponding measurement curve is located as the focusing distance of the target.

[0093] like Figure 3 As shown, the above steps 206 and 207 can be replaced by the following steps 10 and 11.

[0094] Step 10: For each target, generate an initial target mask based on the regional pixel information in step 8, and use a Gaussian filter kernel with a convolution kernel size of 30 and a variance of 20 to filter the initial target mask to soften the edge and obtain the target mask. , and perform bitwise multiplication with the reconstructed image corresponding to the focus distance in step 9 in the reconstructed image set in step 2 to obtain the target image corresponding to each target.

[0095] Step 11: Based on the mask in step 10 and the holographic image, obtain the background mask according to the following formula: .

[0096] .

[0097] in, , is the number of targets, and the background mask and the holographic image are bitwise multiplied to obtain the background image. The background image is spliced ​​with the target image in step 10 according to the following formula to obtain the fused image:

[0098] .

[0099] in, To fuse the images, is the target image corresponding to each i-th target, For the background image.

[0100] The example image is a marine copepod mixed with other organisms and impurities taken by a single-arm coaxial digital holographic system. Figure 4 The holographic image shown is preprocessed according to the formula in step 1 to remove the Gaussian attenuation of the single-arm coaxial system light source to reduce the judgment of the focus of the reconstructed image. The preprocessed holographic image is reconstructed in the interval [0.02, 0.08] (unit: m) with a step length of 0.0005 m to obtain 120 reconstructed images.

[0101] Perform two minimum filtering convolution kernels with a size of 4 on each reconstructed image, use 0.3 times the mean of the filtered reconstructed image as the binarization threshold, binarize the reconstructed image to generate a binary image, and repeat the opening and filling operations twice to obtain the processed binary image. Remove noise from the result to obtain a binary image containing only the target area. Perform connected region analysis on the obtained binary image, and merge the connected regions whose centroid distance is less than the first centroid distance threshold to obtain the connected regions at the reconstruction distance. After repeating the previous operation for all reconstruction distances, analyze the changes in connected regions according to the reconstruction distance. Connected regions with close centroids at adjacent reconstruction distances are considered to be the same target, and record the measurement curve of the change in measurement with reconstruction distance. Analyze the measurement curve to obtain the focus distance of the target, extract the reconstructed image of the focus distance, and generate a softened mask based on the pixel information (such as Figure 5 (a) and (b) in the figure), and obtain the target image (as shown in Figure 5 After applying the above method to all target images, they are spliced ​​with the background image to obtain a fused image, as shown in (c) in the figure. Figure 6 shown.

[0102] Compared with the prior art, the above method has the following beneficial effects:

[0103] (1) End-to-end fusion does not require manual focusing of the holographic image to obtain the focused image, and is directly applied to the holographic image without any intermediate steps.

[0104] (2) It does not require a large amount of data to train the neural network model, making it more convenient to use and more effective for small samples or untrained samples.

[0105] (3) It has good fusion effect on multi-focal length or multi-target, and the fusion effect is independent of the number of targets and focal length.

[0106] Based on the same inventive concept, the embodiment of the present application also provides a holographic image multi-target automatic fusion device for implementing the holographic image multi-target automatic fusion method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more holographic image multi-target automatic fusion device embodiments provided below can refer to the limitations of the holographic image multi-target automatic fusion method above, and will not be repeated here.

[0107] In an exemplary embodiment, a holographic image multi-target automatic fusion device is provided, comprising:

[0108] The image reconstruction module is used to fully reconstruct the holographic image to obtain a reconstructed image data set corresponding to the holographic image; the reconstructed image data set includes reconstructed images at different reconstruction distances.

[0109] The binarization module is used to use an adaptive binarization algorithm to perform binarization processing on each reconstructed image in the reconstructed image data set to obtain a binarized image data set; the binarized image data set includes binarized images at different reconstruction distances.

[0110] The connected region analysis module is used to perform connected region analysis on each binary image in the binary image data set, obtain the connected region of each target in each binary image, and calculate the parameter information of the connected region of each target in each binary image, wherein the parameter information includes at least measurement and regional pixel information.

[0111] The measurement curve construction module is used to construct a measurement curve of each target in the holographic image according to the reconstruction distance of each binary image and the measurement of the connected area of ​​each target in each binary image; the measurement curve is a curve in which the measurement changes with the reconstruction distance.

[0112] The focusing distance determination module is used to determine the focusing distance of each target according to the measurement curve of each target; the focusing distance is the reconstruction distance corresponding to the maximum value point of the measurement curve.

[0113] The mask generation module is used to generate a background mask and a target mask corresponding to each target according to the regional pixel information of the connected area of ​​each target in each binary image.

[0114] The image fusion module is used to fuse the reconstructed images in the reconstructed image data set according to the background mask, the target masks corresponding to each target and the focus distance of each target to obtain a fused image.

[0115] In an exemplary embodiment, a computer device is provided. The computer device may be a server or a terminal. The internal structure diagram thereof may be as follows: Figure 7 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data determined by complementarity. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for automatic fusion of multiple targets of a holographic image is implemented.

[0116] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0117] In an exemplary embodiment, a computer device is also provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the steps in the above-mentioned embodiment of the method for automatic fusion of multiple targets of holographic images are implemented.

[0118] In an exemplary embodiment, a computer-readable storage medium is provided, storing a computer program, which, when executed by a processor, implements the steps in the above-mentioned embodiment of the method for automatic fusion of multiple targets of holographic images.

[0119] In an exemplary embodiment, a computer program product is provided, including a computer program, which, when executed by a processor, implements the steps in the above-mentioned embodiment of the method for automatic fusion of multiple targets of holographic images.

[0120] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM may be in various forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).

[0121] The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. The non-relational database may include a distributed database based on blockchain, etc., but is not limited thereto. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, etc., but is not limited thereto.

[0122] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0123] This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core ideas of this application. At the same time, for those skilled in the art, according to the ideas of this application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.

Claims

1. A multi-target automatic fusion method for holographic images, characterized in that: The holographic image multi-target automatic fusion method comprises: Performing full image reconstruction on the holographic image to obtain a reconstructed image data set corresponding to the holographic image; the reconstructed image data set includes reconstructed images at different reconstruction distances; Using an adaptive binarization algorithm, binarizing each reconstructed image in the reconstructed image data set to obtain a binarized image data set; the binarized image data set includes binarized images at different reconstruction distances; Performing connected region analysis on each binary image in the binary image data set, respectively, obtaining connected regions of each target in each binary image, and calculating parameter information of the connected regions of each target in each binary image; the parameter information at least includes measurement and regional pixel information; According to the reconstruction distance of each binary image and the measurement of the connected area of ​​each target in each binary image, a measurement curve of each target in the holographic image is constructed; the measurement curve is a curve in which the measurement changes with the reconstruction distance; Determine the focusing distance of each target according to the measurement curve of each target; the focusing distance is the reconstruction distance corresponding to the maximum value point of the measurement curve; Generate a background mask and a target mask corresponding to each target according to the regional pixel information of the connected area of ​​each target in each binary image; According to the background mask, the target mask corresponding to each target and the focus distance of each target, the reconstructed images in the reconstructed image data set are fused to obtain a fused image; According to the regional pixel information of the connected area of ​​each target in each binary image, a background mask and a target mask corresponding to each target are generated, which specifically includes: Generate an initial target mask of each target in the holographic image according to the regional pixel information of each connected region in each binary image; Use a Gaussian filter kernel with a convolution kernel size of 30 and a variance of 20 to filter the initial target mask of each target to obtain the target mask corresponding to each target; According to the target mask corresponding to each target, the background mask is obtained using the following formula; ; in, is the background mask, is the target mask corresponding to the i-th target; According to the reconstruction distance of each binary image and the measurement of the connected area of ​​each target in each binary image, a measurement curve of each target in the holographic image is constructed, which specifically includes: The connected regions whose centroid distance in each two adjacent binary images at the reconstruction distances is less than the second centroid distance threshold are determined as the connected regions of the same target at different reconstruction distances; Constructing a measurement curve of the target according to the measurement of the connected areas of the same target at different reconstruction distances; According to the background mask, the target masks corresponding to each target and the focus distance of each target, the reconstructed images in the reconstructed image data set are fused to obtain a fused image, specifically including: Performing bitwise multiplication on the target mask of each target and the reconstructed image in the reconstructed image data set whose reconstruction distance is the focusing distance of the target, to obtain a target image corresponding to each target; Perform bitwise multiplication on the background mask and the holographic image to obtain the background image; The target image corresponding to each target and the background image are spliced ​​to obtain a fused image.

2. The holographic image multi-target automatic fusion method according to claim 1 is characterized in that: Full image reconstruction of the holographic image also includes: The following formula is used to preprocess the holographic image; ; in, is the preprocessed holographic image, is the Gaussian blur function, It's a holographic image.

3. The holographic image multi-target automatic fusion method according to claim 1 is characterized in that: Using an adaptive binarization algorithm, binarization is performed on each reconstructed image in the reconstructed image data set to obtain a binarized image data set, specifically including: The reconstructed image is filtered by using a minimum filtering method to obtain a filtered reconstructed image; Use the following formula to calculate the binarization threshold of the filtered reconstructed image; ; in, is the binarization threshold, is the reconstructed image after filtering, mean() is the function for finding the average; The filtered reconstructed image is binarized based on the binarization threshold to obtain a binarized image corresponding to the reconstructed image.

4. The holographic image multi-target automatic fusion method according to claim 1 is characterized in that: According to the regional pixel information of the connected area of ​​each target in each binary image, a background mask and a target mask corresponding to each target are generated, which also includes: The parameter information of the connected areas whose centroid distance in the same binary image is less than the first centroid distance threshold is merged.

5. A holographic image multi-target automatic fusion device, characterized in that: The holographic image multi-target automatic fusion device applies the holographic image multi-target automatic fusion method according to any one of claims 1 to 4, and the holographic image multi-target automatic fusion device comprises: An image reconstruction module, used to perform full image reconstruction on the holographic image to obtain a reconstructed image data set corresponding to the holographic image; the reconstructed image data set includes reconstructed images at different reconstruction distances; A binarization module is used to use an adaptive binarization algorithm to perform binarization processing on each reconstructed image in the reconstructed image data set to obtain a binarized image data set; the binarized image data set includes binarized images at different reconstruction distances; A connected region analysis module, used to perform connected region analysis on each binary image in the binary image data set, obtain the connected region of each target in each binary image, and calculate parameter information of the connected region of each target in each binary image, wherein the parameter information at least includes measurement and regional pixel information; A measurement curve construction module is used to construct a measurement curve of each target in the holographic image according to the reconstruction distance of each binary image and the measurement of the connected area of ​​each target in each binary image; the measurement curve is a curve in which the measurement changes with the reconstruction distance; A focusing distance determination module, used to determine the focusing distance of each target according to the measurement curve of each target; the focusing distance is the reconstruction distance corresponding to the maximum value point of the measurement curve; A mask generation module, used to generate a background mask and a target mask corresponding to each target according to the regional pixel information of the connected area of ​​each target in each binary image; The image fusion module is used to fuse the reconstructed images in the reconstructed image data set according to the background mask, the target masks corresponding to each target and the focus distance of each target to obtain a fused image.

6. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method for automatic fusion of multi-target holographic images according to any one of claims 1 to 4.

7. 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 for automatic fusion of multiple targets of holographic images described in any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Image processing method and device, electronic equipment and computer readable storage medium

    CN110428366A

  • Multi-target automatic focusing method for holographic imaging in complex environment

    CN115761025A