Image processing method, device, electronic device and computer readable storage medium
By deconvolution processing of images captured by the terminal microscope, image restoration is performed using the point diffusion function of the target shooting component, the problem of low image clarity of the microscope shooting is solved, and higher image clarity and greater depth of field are achieved scope.
Patent Information
- Application Number
- CN202110930303.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-13
- Publication Date
- 2025-01-10
- Estimated Expiration
- 2041-08-13
AI Technical Summary
The image captured by the terminal using a microscope has poor sharpness, mainly due to the small depth of field and the focus distance beyond the depth of field range caused by the user's hand shaking, resulting in poor overall sharpness of the image.
By obtaining the original image of the target shooting component and the preset image restoration parameters, deconvolution processing is performed according to the point diffusion function corresponding to the respective fields of view of the target shooting component to obtain the restored image, thereby improving the clarity of the image.
Through deconvolution processing, the sharpness of the restored image is greater than the sharpness of the original image, which improves the clarity of the image taken by the target shooting component, obtains clear photo effects within a larger depth of field range, shortens the photo time and improves the photo shoot Shooting efficiency.
Smart Images

Figure CN113674171B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to an image processing method, device, electronic device and computer-readable storage medium. Background Art
[0002] With the continuous upgrading of the hardware carried by the terminals, most terminals have image capture functions, and some terminals even have microscopic imaging functions. Microscopic imaging is generally achieved by configuring a microscope lens in the terminal.
[0003] Taking a microscope lens as an example, its depth of field is very small. If the surface of the object being photographed is uneven, the image taken by the microscope lens may be clear in some places and blurred in others, that is, the overall clarity of the image is poor. In addition, when a user uses a handheld terminal to take pictures through a microscope lens, the user's hand shaking may also cause the focusing distance of the microscope lens to exceed the depth of field range of the microscope lens, resulting in poor clarity of the image taken by the microscope lens.
[0004] In view of this, how to improve the clarity of images taken by the terminal using a microscope lens has become a problem that needs to be solved urgently. Summary of the invention
[0005] The embodiments of the present application provide an image processing method, device, electronic device and computer-readable storage medium, which can improve the clarity of images taken by a terminal.
[0006] In a first aspect, an image processing method is provided, the method comprising:
[0007] Obtaining the original image captured by the target shooting component;
[0008] Acquiring preset image restoration parameters, wherein the image restoration parameters are determined according to point spread functions corresponding to each field of view of the target shooting component;
[0009] The original image is deconvolved based on the image restoration parameters to obtain a restored image.
[0010] In a second aspect, an image processing device is provided, the device comprising:
[0011] A first acquisition module is used to acquire an original image captured by the target shooting component;
[0012] A second acquisition module, used to acquire preset image restoration parameters, wherein the image restoration parameters are determined according to point spread functions corresponding to each field of view of the target shooting component;
[0013] The processing module is used to perform deconvolution processing on the original image based on the image restoration parameters to obtain a restored image.
[0014] In a third aspect, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the image processing method as described in the first aspect is implemented.
[0015] In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the image processing method as described in the first aspect is implemented.
[0016] The beneficial effects brought by the technical solution provided by the embodiment of the present application include at least:
[0017] By acquiring an original image captured by a target shooting component and acquiring a preset image restoration parameter, the image restoration parameter is determined according to a point spread function corresponding to each field of view of the target shooting component, and then, based on the image restoration parameter, the original image is deconvolved to obtain a restored image. In this way, since during the image capturing process of the target shooting component, an image formed by a point on the surface of the photographed object after passing through the target shooting component is diffused into multiple points by performing a convolution process on the point using a corresponding point spread function, that is, the original image captured by the target shooting component is obtained by performing a convolution process on each point on the surface of the photographed object using a corresponding point spread function. Therefore, the embodiment of the present application uses the image restoration parameter determined according to the point spread function corresponding to each field of view of the target shooting component to perform a deconvolution process on the original image, so that the diffusion phenomenon in the original image can be restored to obtain a clear restored image. The clarity of the restored image is greater than that of the original image, thereby improving the clarity of the image captured by the target shooting component. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] 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 or the description of the prior art 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.
[0019] Figure 1 is a flowchart of an image processing method in one embodiment;
[0020] Figure 2 is a schematic diagram of field of view division of an exemplary target shooting component;
[0021] Figure 3 is a flowchart of an image processing method in another embodiment;
[0022] Figure 4A flowchart of obtaining a target point spread function corresponding to each field of view of a target shooting component in another embodiment;
[0023] Figure 5 It is a schematic diagram of sampling corresponding to 49 fields of view of a target shooting component and one color channel under an exemplary single wavelength;
[0024] Figure 6 is a flowchart of step 402 in another embodiment;
[0025] Figure 7 is a flowchart of step 103 in another embodiment;
[0026] Figure 8 is a schematic diagram of an exemplary clarity comparison between an original image and a restored image;
[0027] Fig. 9 is a structural block diagram of an image processing device in one embodiment;
[0028] Fig.10 FIG. 1 is a schematic diagram of the internal structure of an electronic device in an embodiment. DETAILED DESCRIPTION
[0029] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0030] In traditional technology, no matter the shooting component carried by the terminal is a conventional shooting lens or a microscope lens, during the image capturing process, the image formed by a point on the surface of the photographed object after passing through the shooting component is diffused into multiple points by convolution processing of the point using the corresponding point spread function (PSF), that is, a point on the surface of the photographed object exists as a diffused "light spot" in the original image captured by the shooting component, resulting in poor clarity of the original image; further, in the case where the shooting component is a microscope lens, the small depth of field of the microscope lens will cause the clarity of the original image to be even worse, seriously affecting the user's shooting experience.
[0031] In view of this, an embodiment of the present application provides an image processing method, in which an original image captured by a target shooting component is obtained, and pre-set image restoration parameters are obtained, the image restoration parameters are determined according to the point spread function corresponding to each field of view of the target shooting component, and then, the original image is deconvolved based on the image restoration parameters to obtain a restored image. In this way, the original image is deconvolved using the image restoration parameters determined according to the point spread function corresponding to each field of view of the target shooting component, so that the diffusion phenomenon in the original image can be restored to obtain a clear restored image. The clarity of the restored image is greater than that of the original image, thereby improving the clarity of the image captured by the target shooting component and obtaining a clear photo effect within a larger depth of field.
[0032] It should be noted that the image processing method provided in the embodiment of the present application may be executed by an image processing device, which may be implemented as part or all of a terminal through software, hardware, or a combination of software and hardware.
[0033] In the following method embodiments, the execution subject is taken as an example to illustrate, wherein the terminal can be a terminal device such as a smart phone, a laptop computer, a tablet computer, a smart watch, a smart bracelet, smart glasses, etc., and there is no specific restriction on the type of terminal.
[0034] Please refer to Figure 1 , which shows a flow chart of an image processing method provided by an embodiment of the present application. Figure 1 As shown, the image processing method may include the following steps:
[0035] Step 101: The terminal obtains an original image captured by a target capturing component.
[0036] The terminal uses the target shooting component to shoot an image of the object to be shot to obtain an original image. The object to be shot can be any shooting target, such as a person, an animal, a building, a plant, and the like.
[0037] Among them, the target shooting component can be a front shooting component or a rear shooting component configured in the terminal, the target shooting component can be a conventional shooting lens, or it can be a microscope lens for achieving high magnification, and the magnification of the microscope lens is greater than the magnification of the conventional shooting lens.
[0038] Step 102: The terminal obtains preset image restoration parameters.
[0039] The image restoration parameters are determined according to the point spread functions corresponding to the fields of view of the target shooting component. In the embodiment of the present application, the field of view of the target shooting component can be divided into a plurality of different fields of view.
[0040] See also Figure 2 , which is a schematic diagram of the field of view division of an exemplary target shooting component. Figure 2 As shown, Figure 2 Each square in can represent a field of view of the target shooting component. Figure 2 The field of view of the target capture assembly shown is divided into 49 fields of view.
[0041] It should be noted that, in the embodiment of the present application, the field of view division method of the target shooting component is not limited to Figure 2 In the manner shown, for example, the field of view of the target shooting component can also be divided into multiple different fields of view in a concentric circle manner. In this way, each field of view of the target shooting component includes a circular central field of view including the center of the circle and other fields of view in a circular ring shape outside the central field of view. Here, there is no specific limitation on the method of dividing the field of view of the target shooting component.
[0042] In the embodiment of the present application, the terminal is pre-set with image restoration parameters, and the image restoration parameters are determined according to the point spread function corresponding to each field of view of the target shooting component. Optionally, the point spread function corresponding to each field of view can be obtained by measuring the actual point spread function corresponding to each field of view based on a point spread function measurement device in advance, and the terminal then performs corresponding processing on each measured actual point spread function to obtain the image restoration parameter, and stores the image restoration parameter in a preset storage address of the terminal; optionally, the image restoration parameter can also be determined according to the lens type of the target shooting component during the factory process of the target shooting component, and burned into the preset module of the terminal.
[0043] In this way, when the terminal needs to perform deconvolution processing on the original image captured by the target shooting component to restore the clarity of the original image, the terminal can obtain the image restoration parameters from the terminal.
[0044] Step 103: The terminal performs deconvolution processing on the original image based on the image restoration parameters to obtain a restored image.
[0045] The terminal uses a deconvolution algorithm to deconvolve the original image using the image restoration parameters as algorithm parameters to obtain a restored image with a clarity greater than that of the original image. The deconvolution algorithm can be a Lucy-Richardson deconvolution method, a Wiener deconvolution algorithm, and the like.
[0046] In this way, the diffusion phenomenon in the original image can be restored through deconvolution processing to obtain a clear restored image. The clarity of the restored image is greater than the clarity of the original image. The restored image is used as the image output finally captured by the target shooting component, which improves the clarity of the image captured by the target shooting component and obtains a clear photo effect within a larger depth of field.
[0047] The image restoration effect of the deconvolution process is closely related to the accuracy of the image restoration parameters. For the target shooting component, the point spread functions of different depths of field and different fields of view of the target shooting component are quite different. If the point spread function of a single depth of field or a single field of view (such as the central field of view) is used as the image restoration parameter to perform deconvolution on the original image, the point spread function of the edge field of view will have a large error with the point spread function used, which will cause an obvious ringing effect, resulting in a shallow depth of field of the restored image and poor clarity of the restored image.
[0048] In view of this, in the embodiment of the present application, the image restoration parameters are determined based on the point spread functions corresponding to each field of view of the target shooting component, thereby improving the accuracy of the image restoration parameters. In this way, when the terminal uses the image restoration parameters to perform deconvolution processing on the original image, the point spread functions corresponding to each field of view of the target shooting component all participate in the deconvolution processing process, thereby effectively improving the clarity of the restored image and expanding the depth of field range of the restored image.
[0049] Furthermore, in a possible implementation, the target photographing component includes a phase plate, and the phase plate is used to modulate a change amount of a point spread function of the target photographing component at different depths of field to be less than a preset change amount threshold.
[0050] Exemplarily, the phase plate can be positioned against the inner wall of the lens barrel of the target shooting component, and the phase plate has a diffraction microstructure. In this way, when the light passes through the phase plate, it can pass through the diffraction microstructure of the phase plate and generate diffraction, thereby adjusting the phase of the light to increase the depth of field when the target shooting component is shooting, and through phase adjustment, the change of the point spread function of the target shooting component at different depths of field can be made less than a preset change threshold, that is, the degree of diffusion of the point spread function of the target shooting component with the change of depth of field is significantly reduced, and the imaging clarity of the scene within a long range before and after the optimal imaging object distance of the target shooting component is close, thereby improving the clarity of the original image taken by the terminal, which is conducive to further improving the clarity of the restored image.
[0051] In addition, in the related art, in order to improve the clarity of the image taken by the shooting component, there is also a method of fusing multiple images at different depth of field positions into a clear image with a full field of view. However, this method requires controlling the shooting component to move to multiple positions for shooting. The clear area of the image taken at each position is different. Multiple images are fused through an algorithm to obtain a clear image with a full field of view. The process in the image acquisition stage is relatively cumbersome, resulting in problems such as long shooting time. In the embodiment of the present application, only one original image taken by the target shooting component is obtained, and then, the implementation method of the above embodiment is used to obtain the pre-set image restoration parameters, and then the original image is deconvoluted based on the image restoration parameters, so that a restored image with a clear full field of view can be obtained without controlling the shooting component to move to multiple positions for shooting, thereby shortening the shooting time and improving the shooting efficiency.
[0052] The above-mentioned embodiment obtains the original image captured by the target shooting component and obtains the preset image restoration parameters, which are determined according to the point spread function corresponding to each field of view of the target shooting component. Then, based on the image restoration parameter, the original image is deconvolved to obtain the restored image. In this way, since the image formed by a point on the surface of the photographed object after passing through the target shooting component during the image shooting process of the target shooting component is a plurality of points diffused by convolution processing of the point using the corresponding point spread function, that is, the original image captured by the target shooting component is obtained by convolution processing and diffusion of each point on the surface of the photographed object using the corresponding point spread function. Therefore, the embodiment of the present application uses the image restoration parameters determined according to the point spread function corresponding to each field of view of the target shooting component to perform deconvolution processing on the original image, so that the diffusion phenomenon in the original image can be restored to obtain a clear restored image. The clarity of the restored image is greater than the clarity of the original image, thereby improving the clarity of the image captured by the target shooting component.
[0053] In one embodiment, based on Figure 1 The embodiment shown, see Figure 3 , this embodiment involves the process of setting image restoration parameters. The image restoration parameters in this embodiment include target restoration parameters of each color channel, such as Figure 3 As shown, the process of setting the image restoration parameters includes step 104:
[0054] Step 104 , the terminal obtains, for each color channel, a target point spread function corresponding to each field of view of the target shooting component and the color channel, and obtains a target restoration parameter of the color channel according to the target point spread function corresponding to each field of view.
[0055] The image captured by the target capturing component may have one or more color channels. For example, the original image may have three color channels: R channel, G channel, and B channel. In the embodiment of the present application, for each color channel, the terminal may obtain the target restoration parameters corresponding to each color channel to form the image restoration parameters.
[0056] In an embodiment of the present application, the point spread function corresponding to each field of view includes the target point spread function of each color channel. Therefore, for each color channel, the terminal first obtains the target point spread function corresponding to each field of view of the target shooting component and the color channel, and then obtains the target restoration parameter of the color channel based on the target point spread function corresponding to each field of view.
[0057] Continuing with the above example, for example, the field of view of the target shooting component is divided into 49 fields of view. For the R channel, the terminal obtains the target point spread functions of the 49 fields of view corresponding to the R channel, and then, the terminal obtains the target restoration parameters of the R channel according to the target point spread functions of the 49 fields of view corresponding to the R channel. Similarly, the terminal obtains the target restoration parameters of the G channel and the target restoration parameters of the B channel, and the target restoration parameters of the R channel, the target restoration parameters of the G channel, and the target restoration parameters of the B channel constitute the image restoration parameters.
[0058] In one possible implementation, see Figure 4 , the terminal can execute Figure 4 Steps 401 and 402 shown in the figure implement the process of obtaining the target point spread function corresponding to each field of view and color channel of the target shooting component:
[0059] Step 401: For each field of view, the terminal obtains candidate point spread functions corresponding to the field of view and a plurality of different wavelengths.
[0060] The point spread function describes the response of the imaging system (target shooting component) to the light point. Generally, the light in the shooting environment is diverse and has different wavelengths, and the target shooting component responds differently to light of different wavelengths. In view of this, in the embodiment of the present application, for each field of view in each color channel, the terminal first obtains the candidate point spread functions corresponding to the field of view and multiple different wavelengths.
[0061] In a possible implementation, taking measurement by the point spread function measuring device described above as an example, the wavelength of light in the shooting environment is generally in the range of 400nm to 700nm, and 61 wavelengths are set at an average interval of 5nm. For each field of view in each color channel, light of different wavelengths is projected from the field of view of the point spread function measuring device (the point spread function measuring device simulates the target shooting component) to the point spread function measuring device (the pupil sampling in the projection process can be set by itself during implementation, for example, set to 128*128), and then, according to the response of the point spread function measuring device to different wavelengths, candidate point spread functions corresponding to the field of view and multiple different wavelengths are obtained.
[0062] In another possible implementation manner, the terminal may further perform the following steps A1 and A2 to obtain candidate point spread functions corresponding to the field of view and multiple different wavelengths:
[0063] Step A1: The terminal obtains the initial point spread function corresponding to the field of view and each wavelength.
[0064] In step A2, the terminal samples each initial point spread function according to a preset first sampling strategy to obtain each candidate point spread function.
[0065] That is, for each field of view in each color channel, light of different wavelengths is projected from the field of view of the point spread function measuring device onto the point spread function measuring device, and the initial point spread function corresponding to the field of view and each wavelength is obtained according to the response of the point spread function measuring device to different wavelengths. Then, the terminal samples each initial point spread function according to a preset first sampling strategy to obtain each candidate point spread function. That is, the second implementation shown in steps A1 and A2 has an additional sampling process compared to the first implementation.
[0066] Among them, the first sampling strategy may be a sampling strategy corresponding to image plane sampling. For example, the image plane sampling interval is selected as 0.1 μm, and correspondingly, according to the size of the image captured by the target shooting component, the image plane sampling rate is determined to be 1024*1024, so that the terminal samples each initial point spread function at a sampling rate of 1024*1024 to obtain each candidate point spread function. Therefore, by selecting a higher image plane sampling rate, the data density of the candidate point spread function can be improved, thereby improving the accuracy of the candidate point spread function.
[0067] For example, see Figure 5 , Figure 5 The figure is a schematic diagram of sampling of a color channel of 49 fields of view of a target shooting component under an exemplary single wavelength.
[0068] Step 402: The terminal performs fusion processing on each candidate point spread function to obtain a target point spread function corresponding to the field of view.
[0069] Then, the terminal performs a fusion process on each candidate point spread function to obtain a target point spread function corresponding to the field of view. Exemplarily, the terminal may perform a fusion process such as averaging or weighted summing on each candidate point spread function to obtain a target point spread function corresponding to the field of view.
[0070] Thus, according to the above implementation, the terminal can obtain the target point spread function corresponding to each field of view and the color channel for each color channel. Then, the terminal can obtain the target restoration parameter of the color channel according to the target point spread function corresponding to each field of view.
[0071] In this way, since the different responses of the target shooting component to light of different wavelengths are taken into account, for each field of view in each color channel, the target point spread function corresponding to the field of view is obtained by fusing the candidate point spread functions corresponding to different wavelengths, thereby improving the accuracy of the target point spread function, thereby improving the accuracy of the target restoration parameters of the color channel, which is beneficial to improving the image clarity of the restored image.
[0072] In one embodiment, based on Figure 4 The embodiment shown, see Figure 6 This embodiment relates to a process in which a terminal performs fusion processing on each candidate point spread function to obtain a target point spread function corresponding to the field of view.
[0073] like Figure 6 As shown, step 402 includes Figure 6 Step 601 and step 602 are shown:
[0074] Step 601: The terminal obtains the weight coefficient corresponding to each candidate point spread function.
[0075] In an embodiment of the present application, for each field of view in each color channel, the terminal obtains the candidate point spread functions corresponding to the field of view and multiple different wavelengths through the implementation method of the above embodiment, and then obtains the weight coefficients corresponding to each candidate point spread function to perform weighted summation of each candidate point spread function.
[0076] In a possible implementation, the terminal may read the weight coefficients corresponding to the candidate point spread functions from a preset storage address of the terminal. The weight coefficients corresponding to the candidate point spread functions may be manually set based on experience.
[0077] In another possible implementation manner, the terminal may perform the following steps B1 and B2 to implement a process of obtaining a weight coefficient corresponding to each candidate point spread function:
[0078] Step B1: The terminal obtains a spectral response curve corresponding to a color channel.
[0079] The spectral response curve includes spectral response data corresponding to each wavelength.
[0080] Exemplarily, light of different wavelengths (such as the light of 61 wavelengths in the above example) can be projected onto the spectrometer respectively, and the spectral response curve can be determined according to the spectral response data of the spectrometer to the light of each different wavelength.
[0081] The horizontal axis of the spectral response curve may be, for example, the wavelength of light, and the vertical axis of the spectral response curve may be, for example, the spectral response data corresponding to each wavelength. The spectral response data may be response data such as the energy of light of the wavelength absorbed by the spectrometer.
[0082] Step B2: For each wavelength, the terminal determines a weight coefficient of a candidate point spread function corresponding to the wavelength according to the spectral response data corresponding to the wavelength.
[0083] For example, the terminal can normalize the spectral response data corresponding to each wavelength to the interval [0,1] in equal proportion, and then use the normalized value of the spectral response data corresponding to each wavelength as the weight coefficient of the candidate point spread function corresponding to each wavelength. It can be understood that the weight coefficient is positively correlated with the spectral response data.
[0084] Step 602: The terminal performs weighted summation on each candidate point spread function according to the weight coefficient corresponding to each candidate point spread function to obtain a target point spread function corresponding to the field of view.
[0085] In a possible implementation, the terminal multiplies each candidate point spread function by its corresponding weight coefficient to obtain a product, and adds the products corresponding to each candidate point spread function to obtain the point spread function of the color channel.
[0086] In another possible implementation, the terminal may perform the following steps C1 and C2 to implement the process of step 602:
[0087] Step C1: The terminal performs weighted summation on each candidate point spread function according to each weight coefficient to obtain a summed point spread function.
[0088] Step C2: The terminal samples the summed point spread function according to a preset second sampling strategy to obtain a target point spread function corresponding to the field of view.
[0089] That is, for each field of view in each color channel, the terminal performs weighted summation on each candidate point spread function according to each weight coefficient, and obtains the result as the summed point spread function. Then, the summed point spread function is sampled according to the preset second sampling strategy to obtain the target point spread function corresponding to the field of view.
[0090] Among them, the second sampling strategy can be to downsample the summed point spread function to the image sensor pixel size of the target shooting component. For example, the image plane sampling interval of the summed point spread function and the candidate point spread function in the above example is consistent, both of which are 0.1μm. The terminal downsamples the data interval of the summed point spread function to the image sensor pixel size of 1.1μm through the downsampling algorithm, that is, every 11*11 sampling points in the summed point spread function are summed into one point to obtain the target point spread function corresponding to the field of view.
[0091] In this way, the weight coefficient of the candidate point spread function corresponding to each wavelength is determined by the spectral response curve, and then the candidate point spread function is weighted and summed according to the weight coefficient corresponding to each candidate point spread function to obtain the target point spread function corresponding to the field of view. Since the weight coefficient is determined in combination with the spectral response curve, the accuracy of the target point spread function corresponding to each field of view can be improved, thereby improving the accuracy of the target restoration parameters of the color channel and the image restoration parameters, which is beneficial to improving the image clarity of the restored image.
[0092] In one embodiment, based on Figure 3 The embodiment shown in this embodiment relates to a process of how a terminal obtains target restoration parameters of a color channel according to a target point spread function corresponding to each field of view.
[0093] Exemplarily, the terminal may perform non-negative matrix decomposition on the target point spread function corresponding to each field of view to obtain the target restoration parameters of the color channel. The target restoration parameters include multiple intrinsic point spread functions and spatial variation coefficients corresponding to each intrinsic point spread function, the intrinsic point spread function is used to characterize the data characteristics of each target point spread function, and the spatial variation coefficient is used to characterize the spatial variation characteristics of each target point spread function.
[0094] That is, for each color channel, after the terminal obtains the target point spread function corresponding to each field of view of the target shooting component and the color channel, the terminal performs non-negative matrix decomposition on the target point spread function corresponding to each field of view in the color channel to obtain the target restoration parameters of the color channel.
[0095] In a possible implementation, before non-negative matrix decomposition, the terminal may first perform singular value decomposition on the target point spread function corresponding to each field of view as a matrix, and use the result of the singular value decomposition as the initial value of non-negative matrix decomposition for the next step of non-negative matrix decomposition.
[0096] The following briefly introduces the process of singular value decomposition. Exemplarily, the terminal may perform singular value decomposition by the following formula 1:
[0097] A=UΣV H Formula 1
[0098] Wherein, A is the matrix formed by the target point spread function corresponding to each field of view (according to the above example, the target shooting component has 49 fields of view, and the size of the target point spread function obtained by each field of view based on the second sampling strategy is 93*93 (93=1024 / 11), so the size of A can be 93*93*49); U and V are both square matrices, Σ is the same size as A, and V H Represents the Hermitian transpose of V.
[0099] In this way, during the singular value decomposition, the two-dimensional matrix of each field of view 93*93 is transformed into a one-dimensional matrix, that is, 8649 data, so the A matrix is transformed into 8659*49, and the singular value simplified decomposition is performed according to formula 1, decomposed into U(8659*49)S(49*49)V(49*49), then, the first N items of U (1≤N≤49, assuming N is 25, the first N items are 8659*25) can be used as the initial value of the non-negative matrix decomposition for non-negative matrix decomposition.
[0100] In this way, through singular value decomposition, the two-dimensional matrix is transformed into a one-dimensional matrix for the next step of non-negative matrix decomposition, thereby reducing the amount of data calculation for non-negative matrix decomposition, improving the efficiency of non-negative matrix decomposition and saving storage space.
[0101] After the singular value decomposition is completed, the terminal performs non-negative matrix decomposition on the initial value obtained by the singular value decomposition to obtain multiple orthogonal and spatially independent intrinsic point spread functions and the spatial variation coefficients corresponding to each intrinsic point spread function. The intrinsic point spread function is used to characterize the data characteristics of each target point spread function, and the spatial variation coefficient is used to characterize the spatial variation characteristics of each target point spread function. Then, the product sum of each intrinsic point spread function and the spatial variation coefficient corresponding to each intrinsic point spread function is calculated to obtain the target restoration parameter of the color channel.
[0102] Thus, for a color channel, the relationship between the target restoration parameter of the color channel, the decomposed image corresponding to the color channel (obtained by decomposing the original image captured by the target capturing component), and the decomposed restoration image corresponding to the color channel can be as follows:
[0103]
[0104] Among them, I represents the decomposed image corresponding to the color channel, S represents the decomposed and restored image corresponding to the color channel, and a irepresents the spatial variation coefficient in the target restoration parameters of the color channel, p i Represents the intrinsic point spread function in the target restoration parameters of the color channel, and N is the number of modes.
[0105] In this way, after the terminal obtains the target restoration parameters of each color channel, it can use the target restoration parameters of each color channel as image restoration parameters, and deconvolute the original image based on the image restoration parameters to obtain a clear restored image with a large depth of field, thereby improving the quality of the images taken by the terminal.
[0106] In one embodiment, see Figure 7 This embodiment relates to a process of how a terminal performs deconvolution processing on an original image based on image restoration parameters to obtain a restored image. Figure 7 As shown, step 103 may include step 701, step 702 and step 703:
[0107] Step 701: The terminal decomposes the original image into decomposed images corresponding to each color channel.
[0108] As described above, the original image captured by the target shooting component may have one or more color channels, for example, three color channels: R channel, G channel and B channel. The terminal decomposes the original image into decomposed images corresponding to each color channel, that is, a decomposed image corresponding to the R channel, a decomposed image corresponding to the G channel and a decomposed image corresponding to the B channel.
[0109] Step 702: the terminal performs deconvolution processing on the decomposed image corresponding to each color channel according to the target restoration parameter of the color channel to obtain the decomposed and restored image corresponding to the color channel.
[0110] The image restoration parameters include target restoration parameters of each color channel. Thus, the terminal uses the target restoration parameters of each color channel to perform deconvolution processing on the decomposed image of the corresponding color channel to obtain a decomposed restoration image corresponding to each color channel.
[0111] In the following, taking a color channel as an example, a process is introduced in which a terminal performs deconvolution processing on a decomposed image according to a target restoration parameter of the color channel to obtain a decomposed and restored image corresponding to the color channel.
[0112] Exemplarily, for a decomposed image corresponding to a color channel, the terminal may perform iterative deconvolution processing on the decomposed image according to a target restoration parameter of the color channel to obtain a decomposed and restored image corresponding to the color channel.
[0113] Among them, the K-th iterative deconvolution processing includes: obtaining image restoration correction data according to the target restoration parameters, the decomposed image and the intermediate image, and obtaining the output image corresponding to the K-th iterative deconvolution processing according to the intermediate image and the image restoration correction data; wherein, when K is equal to 1, the intermediate image is the decomposed image, when K is greater than 1, the intermediate image is the output image corresponding to the previous iterative deconvolution processing, and when K is equal to the preset number of iterations, the output image corresponding to the K-th iterative deconvolution processing is the decomposed restoration image corresponding to the color channel.
[0114] In a possible implementation, referring to the following formula 2-4, the terminal may perform the Kth iterative deconvolution process according to the following formula 2-4:
[0115]
[0116]
[0117] S K =S k-1 ·F -1 {E * k-1} Formula 4
[0118] Among them, a i represents the spatial variation coefficient in the target restoration parameter of the color channel, p i represents the intrinsic point spread function in the target restoration parameters of the color channel; N is the number of modes, for example, it can be 25; S K-1 is the intermediate image; p i ~ for p i The flipped intrinsic point spread function is obtained by flipping the matrix; I is the decomposed image corresponding to the color channel; E K-1 is the image restoration correction data; the * indicates the frequency domain transformation of the variable; F indicates Fourier transform, F -1 represents inverse Fourier transform; S K is the output image corresponding to the K-th iterative deconvolution process. When K is equal to the preset number of iterations, the output image corresponding to the K-th iterative deconvolution process is the decomposed and restored image corresponding to the color channel.
[0119] In actual implementation, the number of iterations can be set by yourself, for example, set to 20 times, and so on.
[0120] In another possible implementation, the terminal may obtain the output image corresponding to the K-th iterative deconvolution process according to the intermediate image and the image restoration correction data, which may include the following steps D1 and D2:
[0121] In step D1, the terminal obtains regularization term data according to the intermediate image and the preset regularization term coefficient.
[0122] For example, see Formula 5:
[0123]
[0124] Among them, TV K-1 is the regular term data, -λ TV is the preset regularization coefficient, λ TV You can set it yourself during implementation, for example, to 0.001. Represents the intermediate image S K-1 The gradient of , div means divergence.
[0125] Step D2, the terminal obtains the output image corresponding to the K-th iterative deconvolution processing according to the intermediate image, the image restoration correction data and the regularization term data.
[0126] Referring to the following formula 6, the terminal may perform the Kth iterative deconvolution process according to the above formulas 2, 3, 5 and the following formula 6:
[0127]
[0128] Among them, S K-1 is the intermediate image, E K-1 is the image restoration correction data, and the * indicates the frequency domain transformation of the variable, S K is the output image corresponding to the Kth iterative deconvolution process, TV K-1 is the regularization term data. When K is equal to the preset number of iterations, the output image corresponding to the Kth iterative deconvolution process is the decomposed and restored image corresponding to the color channel.
[0129] In this way, through the total variation regularized deconvolution processing method, the terminal can obtain a clear decomposed and restored image corresponding to each color channel.
[0130] Step 703: The terminal performs fusion processing on the decomposed and restored images corresponding to each color channel to obtain a restored image.
[0131] After the terminal obtains the decomposed and restored images corresponding to each color channel through deconvolution processing, it performs fusion processing on the decomposed and restored images corresponding to each color channel to obtain a clear restored image, the clarity of which is greater than that of the original image.
[0132] For example, see Figure 8 , Figure 8 A schematic diagram of an exemplary original image and a restored image. Figure 8The left side of the figure is the original image, and the right side is the restored image. It can be seen that the acquired image restoration parameters are used in the total variation regularized deconvolution algorithm for image restoration. After this algorithm, the clarity of different depths of field and field of view areas in the image is significantly improved, and restored images with clear and smooth transitions in each field of view are obtained.
[0133] In this way, the restored image is used as the image output finally captured by the target shooting component, which improves the clarity of the image captured by the target shooting component and obtains a clear photo effect within a larger depth of field.
[0134] In one embodiment, an image processing method is provided, comprising:
[0135] Step a: For each field of view of the target shooting component under each color channel, the terminal obtains the initial point spread function corresponding to the field of view and each wavelength, and samples each initial point spread function according to a preset first sampling strategy to obtain each candidate point spread function; the terminal obtains the weight coefficient corresponding to each candidate point spread function, and performs weighted summation on each candidate point spread function according to the weight coefficient corresponding to each candidate point spread function to obtain the target point spread function corresponding to the field of view.
[0136] Among them, obtaining the weight coefficient corresponding to each candidate point spread function includes: obtaining the spectral response curve corresponding to the color channel, the spectral response curve includes spectral response data corresponding to each wavelength; for each wavelength, according to the spectral response data corresponding to the wavelength, determining the weight coefficient of the candidate point spread function corresponding to the wavelength, the weight coefficient is positively correlated with the spectral response data.
[0137] Among them, according to the weight coefficients corresponding to the candidate point spread functions, the candidate point spread functions are weighted summed to obtain the target point spread function corresponding to the field of view, including: according to the weight coefficients, the candidate point spread functions are weighted summed to obtain the summed point spread function; according to the preset second sampling strategy, the summed point spread function is sampled to obtain the target point spread function corresponding to the field of view.
[0138] In step b, the terminal performs non-negative matrix decomposition on the target point spread function corresponding to each field of view in the color channel to obtain the target restoration parameters of the color channel.
[0139] Among them, the target restoration parameters include multiple intrinsic point spread functions and spatial variation coefficients corresponding to each intrinsic point spread function. The intrinsic point spread function is used to characterize the data characteristics of each target point spread function, and the spatial variation coefficient is used to characterize the spatial variation characteristics of each target point spread function.
[0140] Step c: the terminal obtains the original image captured by the target shooting component.
[0141] The target shooting component includes a phase plate, and the phase plate is used to modulate the change amount of the point spread function of the target shooting component at different depths of field to be less than a preset change amount threshold.
[0142] In step d, the terminal obtains preset image restoration parameters, where the image restoration parameters include target restoration parameters of each color channel.
[0143] Step e, the terminal decomposes the original image into decomposed images corresponding to each color channel;
[0144] In step f, the terminal performs iterative deconvolution processing on the decomposed image corresponding to each color channel according to the target restoration parameter of the color channel to obtain the decomposed and restored image corresponding to the color channel.
[0145] Among them, the K-th iterative deconvolution processing includes: obtaining image restoration correction data according to the target restoration parameters, the decomposed image and the intermediate image, and obtaining the output image corresponding to the K-th iterative deconvolution processing according to the intermediate image and the image restoration correction data; wherein, when K is equal to 1, the intermediate image is the decomposed image, when K is greater than 1, the intermediate image is the output image corresponding to the previous iterative deconvolution processing, and when K is equal to the preset number of iterations, the output image corresponding to the K-th iterative deconvolution processing is the decomposed restoration image corresponding to the color channel.
[0146] Among them, the terminal obtains the output image corresponding to the K-th iterative deconvolution processing based on the intermediate image and the image restoration correction data, including: obtaining the regularization term data based on the intermediate image and the preset regularization term coefficient; obtaining the output image corresponding to the K-th iterative deconvolution processing based on the intermediate image, the image restoration correction data and the regularization term data.
[0147] In step g, the terminal performs fusion processing on the decomposed and restored images corresponding to each color channel to obtain a restored image.
[0148] It should be understood that, although the various steps in the above-mentioned flow chart are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the above-mentioned flow chart may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0149] Fig. 9 FIG. 1 is a structural block diagram of an image processing device according to an embodiment. Fig. 9 As shown, the device comprises:
[0150] A first acquisition module 100 is used to acquire an original image captured by a target capturing component;
[0151] A second acquisition module 200 is used to acquire preset image restoration parameters, where the image restoration parameters are determined according to point spread functions corresponding to each field of view of the target shooting component;
[0152] The processing module 300 is used to perform deconvolution processing on the original image based on the image restoration parameters to obtain a restored image.
[0153] Optionally, the point spread function corresponding to each of the fields of view includes a target point spread function of each color channel, the image restoration parameter includes a target restoration parameter of each of the color channels, and the device further includes:
[0154] A third acquisition module is used to acquire, for each color channel, a target point spread function corresponding to each field of view of the target shooting component and the color channel;
[0155] A fourth acquisition module is used to acquire the target restoration parameter of the color channel according to the target point spread function corresponding to each of the fields of view.
[0156] Optionally, the third acquisition module includes:
[0157] An acquisition unit, configured to acquire, for each of the fields of view, candidate point spread functions corresponding to the field of view and a plurality of different wavelengths;
[0158] A fusion unit is used to fuse the candidate point spread functions to obtain the target point spread function corresponding to the field of view.
[0159] Optionally, the acquisition unit is specifically used to acquire an initial point spread function corresponding to the field of view and each of the wavelengths; and sample each of the initial point spread functions according to a preset first sampling strategy to obtain each of the candidate point spread functions.
[0160] Optionally, the fusion unit is specifically used to obtain a weight coefficient corresponding to each of the candidate point spread functions; and according to the weight coefficient corresponding to each of the candidate point spread functions, weighted summation is performed on each of the candidate point spread functions to obtain the target point spread function corresponding to the field of view.
[0161] Optionally, the fusion unit is specifically used to obtain a spectral response curve corresponding to the color channel, the spectral response curve including spectral response data corresponding to each of the wavelengths; for each of the wavelengths, according to the spectral response data corresponding to the wavelength, determine the weight coefficient of the candidate point spread function corresponding to the wavelength, and perform weighted summation on each of the candidate point spread functions according to each of the weight coefficients to obtain a summed point spread function; according to a preset second sampling strategy, sample the summed point spread function to obtain the target point spread function corresponding to the field of view, wherein the weight coefficient is positively correlated with the spectral response data.
[0162] Optionally, the fourth acquisition module is specifically used to perform non-negative matrix decomposition on the target point spread function corresponding to each of the fields of view to obtain the target restoration parameters of the color channel;
[0163] Among them, the target restoration parameters include multiple intrinsic point spread functions and spatial variation coefficients corresponding to each of the intrinsic point spread functions, the intrinsic point spread function is used to characterize the data characteristics of each of the target point spread functions, and the spatial variation coefficient is used to characterize the spatial variation characteristics of each of the target point spread functions.
[0164] Optionally, the image restoration parameters include target restoration parameters of each color channel, and the processing module 300 includes:
[0165] A decomposition unit, used for decomposing the original image into decomposed images corresponding to each color channel;
[0166] A first processing unit is configured to perform a deconvolution process on the decomposed image corresponding to each color channel according to the target restoration parameter of the color channel to obtain a decomposed and restored image corresponding to the color channel;
[0167] The second processing unit is used to perform fusion processing on the decomposed and restored images corresponding to each of the color channels to obtain the restored image.
[0168] Optionally, the first processing unit is specifically used to perform iterative deconvolution processing on the decomposed image according to the target restoration parameters of the color channel to obtain the decomposed and restored image corresponding to the color channel; wherein the K-th iterative deconvolution processing includes: obtaining image restoration correction data according to the target restoration parameters, the decomposed image and the intermediate image, and obtaining an output image corresponding to the K-th iterative deconvolution processing according to the intermediate image and the image restoration correction data; wherein, when K is equal to 1, the intermediate image is the decomposed image, and when K is greater than 1, the intermediate image is the output image corresponding to the previous iterative deconvolution processing, and when K is equal to a preset number of iterations, the output image corresponding to the K-th iterative deconvolution processing is the decomposed and restored image corresponding to the color channel.
[0169] Optionally, the first processing unit is specifically used to obtain regularization term data based on the intermediate image and a preset regularization term coefficient; and to obtain an output image corresponding to the Kth iterative deconvolution processing based on the intermediate image, the image restoration correction data and the regularization term data.
[0170] Optionally, the target photographing component comprises a phase plate, and the phase plate is used to modulate a change amount of a point spread function of the target photographing component at different depths of field to be less than a preset change amount threshold.
[0171] The division of the modules in the above-mentioned image processing device is only for illustration. In other embodiments, the image processing device may be divided into different modules as needed to complete all or part of the functions of the above-mentioned image processing device.
[0172] For the specific definition of the image processing device, please refer to the definition of the image processing method above, which will not be repeated here. Each module in the above-mentioned image processing device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the electronic device in the form of hardware, or can be stored in the memory of the electronic device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0173] The implementation of each module in the image processing device provided in the embodiment of the present application may be in the form of a computer program. The computer program may be run on a terminal or a server. The program module constituted by the computer program may be stored in a memory of an electronic device. When the computer program is executed by a processor, the steps of the method described in the embodiment of the present application are implemented.
[0174] Fig.10Schematic diagram of the internal structure of an electronic device in an embodiment. The electronic device can be any terminal device such as a mobile phone, a tablet computer, a laptop computer, a desktop computer, a PDA (Personal Digital Assistant), a POS (Point of Sales), a car computer, a wearable device, etc. The electronic device includes a processor and a memory connected via a system bus. Among them, the processor may include one or more processing units. The processor may be a CPU (Central Processing Unit) or a DSP (Digital Signal Processing), etc. The memory may include a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The computer program can be executed by the processor to implement an image processing method provided in each of the above embodiments. The internal memory provides a cache operating environment for the operating system computer program in the non-volatile storage medium.
[0175] The embodiment of the present application further provides a computer-readable storage medium, one or more non-volatile computer-readable storage media containing computer-executable instructions, which, when executed by one or more processors, enable the processors to perform the steps of the image processing method.
[0176] The embodiment of the present application also provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute the image processing method.
[0177] Any reference to memory, storage, database or other medium used in this application may include non-volatile and / or volatile memory. Non-volatile memory may include ROM (Read-Only Memory), PROM (Programmable Read-only Memory), EPROM (Erasable Programmable Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-only Memory) or flash memory. Volatile memory may include RAM (Random Access Memory), which is used as an external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as SRAM (Static Random Access Memory), DRAM (Dynamic Random Access Memory), SDRAM (Synchronous Dynamic Random Access Memory), Double Data Rate DDRSDRAM (Double Data Rate Synchronous Dynamic Random Access memory), ESDRAM (Enhanced Synchronous Dynamic Random Access memory), SLDRAM (Sync Link Dynamic Random Access Memory), RDRAM (Rambus Dynamic Random Access Memory), and DRDRAM (Direct Rambus Dynamic Random Access Memory).
[0178] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. An image processing method, characterized in that: include: Obtaining the original image captured by the target shooting component; Acquiring preset image restoration parameters, wherein the image restoration parameters are determined according to point spread functions corresponding to each field of view of the target shooting component; Performing deconvolution processing on the original image based on the image restoration parameters to obtain a restored image; Wherein, the target shooting component comprises a phase plate, and the phase plate is used to modulate the change amount of the point spread function of the target shooting component at different depths of field to be less than a preset change amount threshold; The point spread function corresponding to each of the fields of view includes a target point spread function of each color channel, the image restoration parameters include a target restoration parameter of each of the color channels, and the process of setting the image restoration parameters includes: For each of the color channels, obtaining a target point spread function corresponding to each of the fields of view of the target shooting component and the color channel, performing non-negative matrix decomposition on the target point spread function corresponding to each of the fields of view, and obtaining the target restoration parameter of the color channel; Among them, the target restoration parameters include multiple intrinsic point spread functions and spatial variation coefficients corresponding to each of the intrinsic point spread functions, the intrinsic point spread function is used to characterize the data characteristics of each of the target point spread functions, and the spatial variation coefficient is used to characterize the spatial variation characteristics of each of the target point spread functions.
2. The method according to claim 1, characterized in that The obtaining of the target point spread function corresponding to each of the fields of view of the target shooting component and the color channel includes: For each of the fields of view, obtaining candidate point spread functions corresponding to the field of view and a plurality of different wavelengths; The candidate point spread functions are fused to obtain the target point spread function corresponding to the field of view.
3. The method according to claim 2, characterized in that The obtaining of candidate point spread functions corresponding to the field of view and a plurality of different wavelengths includes: Acquire an initial point spread function corresponding to the field of view and each of the wavelengths; According to a preset first sampling strategy, each of the initial point spread functions is sampled to obtain each of the candidate point spread functions.
4. The method according to claim 2, characterized in that: The fusing process of the candidate point spread functions to obtain the target point spread function corresponding to the field of view includes: Obtaining a weight coefficient corresponding to each of the candidate point spread functions; According to the weight coefficients corresponding to the candidate point spread functions, weighted summation is performed on the candidate point spread functions to obtain the target point spread function corresponding to the field of view.
5. The method according to claim 4, characterized in that The obtaining of the weight coefficient corresponding to each of the candidate point spread functions includes: Acquire a spectral response curve corresponding to the color channel, wherein the spectral response curve includes spectral response data corresponding to each of the wavelengths; For each of the wavelengths, the weight coefficient of the candidate point spread function corresponding to the wavelength is determined according to the spectral response data corresponding to the wavelength, wherein the weight coefficient is positively correlated with the spectral response data.
6. The method according to claim 4, characterized in that The step of performing weighted summation on each of the candidate point spread functions according to a weight coefficient corresponding to each of the candidate point spread functions to obtain the target point spread function corresponding to the field of view includes: Performing weighted summation on each of the candidate point spread functions according to each of the weight coefficients to obtain a summed point spread function; The summed point spread function is sampled according to a preset second sampling strategy to obtain the target point spread function corresponding to the field of view.
7. The method according to claim 1, characterized in that The image restoration parameters include target restoration parameters of each color channel, and the deconvolution processing is performed on the original image based on the image restoration parameters to obtain a restored image, including: Decomposing the original image into decomposed images corresponding to each of the color channels; For the decomposed image corresponding to each of the color channels, performing deconvolution processing on the decomposed image according to the target restoration parameter of the color channel to obtain a decomposed and restored image corresponding to the color channel; The decomposed and restored images corresponding to the color channels are fused to obtain the restored image.
8. The method according to claim 7, characterized in that The step of performing deconvolution processing on the decomposed image according to the target restoration parameter of the color channel to obtain the decomposed restoration image corresponding to the color channel includes: Performing iterative deconvolution processing on the decomposed image according to the target restoration parameter of the color channel to obtain the decomposed restoration image corresponding to the color channel; Among them, the K-th iterative deconvolution processing includes: obtaining image restoration correction data according to the target restoration parameters, the decomposed image and the intermediate image, and obtaining the output image corresponding to the K-th iterative deconvolution processing according to the intermediate image and the image restoration correction data; wherein, when K is equal to 1, the intermediate image is the decomposed image, when K is greater than 1, the intermediate image is the output image corresponding to the previous iterative deconvolution processing, and when K is equal to the preset number of iterations, the output image corresponding to the K-th iterative deconvolution processing is the decomposed restoration image corresponding to the color channel.
9. The method according to claim 8, characterized in that The step of obtaining an output image corresponding to the K-th iterative deconvolution process according to the intermediate image and the image restoration correction data includes: Obtaining regularization term data according to the intermediate image and a preset regularization term coefficient; According to the intermediate image, the image restoration correction data and the regularization term data, an output image corresponding to the K-th iterative deconvolution process is obtained.
10. An image processing device, characterized in that: include: A first acquisition module is used to acquire an original image captured by the target shooting component; A second acquisition module, used to acquire preset image restoration parameters, wherein the image restoration parameters are determined according to point spread functions corresponding to each field of view of the target shooting component; A processing module, configured to perform a deconvolution process on the original image based on the image restoration parameters to obtain a restored image; Wherein, the target shooting component comprises a phase plate, and the phase plate is used to modulate the change amount of the point spread function of the target shooting component at different depths of field to be less than a preset change amount threshold; The point spread function corresponding to each of the fields of view includes a target point spread function of each color channel, the image restoration parameters include a target restoration parameter of each of the color channels, and the device further includes: A third acquisition module is used to acquire, for each color channel, a target point spread function corresponding to each field of view of the target shooting component and the color channel; A fourth acquisition module is used to perform non-negative matrix decomposition on the target point spread function corresponding to each of the fields of view to obtain the target restoration parameters of the color channel; Among them, the target restoration parameters include multiple intrinsic point spread functions and spatial variation coefficients corresponding to each of the intrinsic point spread functions, the intrinsic point spread function is used to characterize the data characteristics of each of the target point spread functions, and the spatial variation coefficient is used to characterize the spatial variation characteristics of each of the target point spread functions.
11. An electronic device comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the computer program is executed by the processor, the processor is caused to perform the steps of the method according to any one of claims 1 to 9.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.
Citation Information
Patent Citations
Image processing method, device and storage medium
CN110533617A
Microscopic image restoration method based on multi-view-field segmentation
CN111062895A