Three-dimensional light scene deep compression method and device based on depth curve estimation network, and electronic equipment
Through a method based on the depth curve estimation network, the attention mechanism is used to automatically determine the depth of field compression result of the three-dimensional light scene depth map, which solves the problem of low depth of field compression efficiency in the existing technology and achieves more efficient depth of field compression and better depth. Perceptual effects.
Patent Information
- Application Number
- CN202410717210.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-04
- Publication Date
- 2024-10-01
AI Technical Summary
Existing three-dimensional light scene depth compression methods have complex processing procedures, resulting in low depth of field compression efficiency.
A method based on the depth curve estimation network is used to obtain the channel attention image and spatial attention image through the attention mechanism, automatically determine the depth of field compression result of the depth map to be compressed, and improve the depth of field compression efficiency.
It effectively improves the depth of field compression efficiency, retains the invariance of depth perception of the three-dimensional scene, and reduces the complexity of the depth of field compression process.
Smart Images

Figure CN118735981A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of three-dimensional display technology, and in particular to a three-dimensional light scene depth compression method, device and electronic equipment based on a depth curve estimation network. Background Art
[0002] Depth of field is an important characteristic of three-dimensional (3D) displays. Depth of field means that a 3D display can only display a clear 3D light field within a certain depth of field range. Parts beyond the depth of field range will be out of focus, blurry, and ghosting. Therefore, it is necessary to compress the depth of field of the 3D scene beyond the depth of field range and preserve the depth perception invariance of the 3D scene to the greatest extent possible visually.
[0003] The existing 3D light scene depth compression method adopts the strategy of optimizing a single depth map one by one to perform depth compression on the depth map under the 3D light field. However, the processing process of this method is relatively complicated, resulting in low depth compression efficiency. Summary of the invention
[0004] The present invention provides a three-dimensional light scene depth compression method, device and electronic device based on a depth curve estimation network, so as to solve the defect that the processing process of the existing three-dimensional light scene depth compression method is relatively complicated, resulting in low depth of field compression efficiency. The method adopts a depth curve estimation network model, which can automatically determine the depth of field compression result corresponding to the depth map to be compressed, and can effectively improve the depth of field compression efficiency.
[0005] The present invention provides a three-dimensional light scene depth compression method based on a depth curve estimation network, comprising the following steps.
[0006] Get the depth map to be compressed in the three-dimensional light field.
[0007] The channel attention image and the spatial attention image corresponding to the depth image to be compressed are determined by estimating the attention mechanism in the depth curve network model.
[0008] The depth curve estimation network model is used to determine a depth of field compression result according to the channel attention image and the spatial attention image.
[0009] According to a three-dimensional light scene depth compression method based on a depth curve estimation network provided by the present invention, the depth curve estimation network model is trained based on the following steps: obtaining depth map samples and depth compression result samples corresponding to the depth map samples; determining channel attention image samples and spatial attention image samples corresponding to the depth map samples through the attention mechanism in the original depth curve estimation network model; determining predicted depth compression results according to the channel attention image samples and the spatial attention image samples through the original depth curve estimation network model; updating model parameters of the original depth curve estimation network model according to the predicted depth compression results and the depth compression result samples to obtain a trained depth curve estimation network model.
[0010] According to a three-dimensional light scene depth compression method based on a depth curve estimation network provided by the present invention, the obtaining of depth map samples includes: determining a Coswell contour corresponding to an initial depth map sample based on a Coswell illusion; and adding the Coswell contour to the initial depth map sample to obtain the depth map sample.
[0011] According to a three-dimensional light scene depth compression method based on a depth curve estimation network provided by the present invention, the method determines the Coswell contour corresponding to the initial depth map sample based on the Coswell illusion, including: performing spatial frequency band decomposition on the initial depth map sample to obtain multiple spatial frequency band samples; determining the low-frequency component corresponding to the initial depth map sample according to the scaling factors corresponding to each of the multiple spatial frequency band samples; determining the high-frequency component corresponding to the initial depth map sample based on the Coswell illusion and in combination with the low-frequency component; and determining the high-frequency component as the Coswell contour.
[0012] According to a three-dimensional light scene depth compression method based on a depth curve estimation network provided by the present invention, the predicted depth of field compression result is determined according to the channel attention image samples and the spatial attention image samples through the original depth curve estimation network model, including: fusing the channel attention image samples and the spatial attention image samples through the original depth curve estimation network model to obtain a fused image sample; extracting parameters of the fused image samples through the original depth curve estimation network model to obtain mapping parameters, and constructing a mapping function based on the mapping parameters; remapping multiple depth values corresponding to the fused image samples through the original depth curve estimation network model based on the mapping function to obtain the predicted depth of field compression result.
[0013] According to a three-dimensional light scene depth compression method based on a depth curve estimation network provided by the present invention, the method also includes: performing denormalization processing on the depth compression result to obtain a reconstructed true value map; performing point cloud reconstruction processing on the reconstructed true value map to obtain a reconstructed scene map; determining multiple disparity maps based on the reconstructed scene map; performing scene reconstruction processing on the multiple disparity maps to obtain a scene reconstruction result corresponding to the depth compression result; wherein the scene reconstruction processing includes: fusion processing and back projection processing.
[0014] According to a three-dimensional light scene depth compression method based on a depth curve estimation network provided by the present invention, the model parameters of the original depth curve estimation network model are updated according to the predicted depth compression result and the depth compression result sample to obtain the trained depth curve estimation network model, including: determining the loss value between the predicted depth compression result and the depth compression result sample according to a loss function; and updating the model parameters of the original depth curve estimation network model according to the loss value to obtain the trained depth curve estimation network model.
[0015] The present invention also provides a three-dimensional light scene depth compression device based on a depth curve estimation network, comprising the following modules.
[0016] The acquisition module is used to acquire the depth map to be compressed in the three-dimensional light field.
[0017] A processing module is used to determine the channel attention image and the spatial attention image corresponding to the depth map to be compressed through the attention mechanism in the depth curve estimation network model; and determine the depth of field compression result according to the channel attention image and the spatial attention image through the depth curve estimation network model.
[0018] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a three-dimensional light scene depth compression method based on a depth curve estimation network as described above is implemented.
[0019] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the three-dimensional light scene depth compression method based on a depth curve estimation network as described in any one of the above is implemented.
[0020] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any of the above-mentioned three-dimensional light scene depth compression methods based on a depth curve estimation network.
[0021] The present invention provides a three-dimensional light scene depth compression method, device and electronic device based on a depth curve estimation network, which obtains a depth map to be compressed under a three-dimensional light field; determines the channel attention image and the space attention image corresponding to the depth map to be compressed through the attention mechanism in the depth curve estimation network model; and determines the depth compression result according to the channel attention image and the space attention image through the depth curve estimation network model. The method adopts a depth curve estimation network model, which can automatically determine the depth compression result corresponding to the depth map to be compressed, and can effectively improve the depth compression efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0023] Figure 1 It is a flow chart of a three-dimensional light scene depth compression method based on a depth curve estimation network provided by the present invention.
[0024] Figure 2 It is a schematic diagram of a scene for obtaining sub-initial depth map samples provided by the present invention.
[0025] Figure 3 It is a schematic diagram of the basic mapping curve provided by the present invention.
[0026] Figure 4 It is a schematic diagram of a scenario for training an original depth curve estimation network model provided by the present invention.
[0027] Figure 5 It is a schematic diagram of a depth map to be compressed and a depth of field compression result provided by the present invention.
[0028] Figure 6 It is a schematic diagram comparing the depth perception thermal maps of different solutions provided by the present invention.
[0029] Figure 7 It is a structural schematic diagram of a three-dimensional light scene depth compression device based on a depth curve estimation network provided by the present invention.
[0030] Figure 8 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0031] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0032] In order to better understand the embodiments of the present invention, the background technology is first described in detail.
[0033] Compared with two-dimensional display technology, three-dimensional display technology provides depth information, can better express the spatial relationship of the scene, and meet human's perception needs for the three-dimensional world.
[0034] The current 3D display technology is mainly divided into two categories: binocular stereo display technology and free stereo display technology. Among them, binocular stereo display technology requires the observer to wear specific visual aids such as 3D glasses to obtain a 3D visual effect; free stereo display technology does not require the observer to wear visual aids to view the 3D scene, and free stereo display technology can also be called naked eye 3D.
[0035] Different three-dimensional displays have different characteristic parameters. In order to achieve the best three-dimensional display effect, it is necessary to select appropriate three-dimensional content for display according to the characteristic parameters of the three-dimensional display. Depth of field, as an important characteristic of a three-dimensional display, determines how far the observer can see the three-dimensional scene. There is a major problem in the current three-dimensional display technology, that is, when a three-dimensional scene is displayed on a three-dimensional display, due to the inherent depth of field range of the three-dimensional display, the three-dimensional scene beyond the depth of field range will appear out-of-focus blur and ghosting. In order to solve this problem, the prior art provides two solutions: on the one hand, the design structure of the three-dimensional display can be improved to expand the depth of field range of the three-dimensional display; on the other hand, the three-dimensional scene depth remapping technology can be used to compress the three-dimensional scene beyond the depth of field range to adapt to the depth of field range of the three-dimensional display. However, directly linearly compressing the depth will lead to a weakening of the contrast between the depth values, which in turn leads to a significant decrease in the stereoscopic sense of the content of the compressed three-dimensional scene, which reduces the quality of depth perception and greatly affects the viewing experience. Therefore, there is an urgent need for a solution that can compress the depth value to within the depth of field range while retaining the depth perception invariance of the three-dimensional scene to the greatest extent.
[0036] Taking the grating stereo display as an example, the depth of field range of the grating stereo display can be represented by the maximum spatial frequency:
[0037] Among them, f εrepresents the maximum spatial frequency of the plane where the three-dimensional light field is located at a distance d from the display screen of the grating stereo display; f0 = N a / 2p,N a represents the number of viewpoints of the grating stereo display, p represents the spacing between adjacent cylindrical lenses in the grating stereo display, and h represents the device thickness of the grating stereo display. From the above formula, we can see that when |d|+(h / 2)≤N a h, the maximum spatial frequency f ε is a constant. In other cases, the maximum spatial frequency f ε As the distance d increases, it decreases and the three-dimensional scene becomes blurred.
[0038] The existing 3D light scene depth compression method adopts the strategy of optimizing a single depth map one by one to perform depth compression on the depth map under the 3D light field. However, the processing process of this method is relatively complicated, resulting in low depth compression efficiency.
[0039] To solve the above problems, an embodiment of the present invention provides a three-dimensional light scene depth compression method, device and electronic device based on a depth curve estimation network. The method adopts a depth curve estimation network model, which can automatically determine the depth compression result corresponding to the depth map to be compressed, thereby effectively improving the depth compression efficiency.
[0040] It should be noted that the execution subject involved in the embodiment of the present invention can be a three-dimensional light scene depth compression device based on a depth curve estimation network, or it can be an electronic device. Optionally, the electronic device can include: a computer and a mobile terminal, etc.
[0041] The embodiment of the present invention is further described below by taking an electronic device as an example.
[0042] like Figure 1 , which is a flow chart of a three-dimensional light scene depth compression method based on a depth curve estimation network provided by the present invention, including the following steps 101 to 103.
[0043] 101. Obtain a depth map to be compressed in a three-dimensional light field.
[0044] Among them, three-dimensional light field refers to a physical concept that describes the propagation direction and intensity distribution of light in three-dimensional space. By capturing and storing three-dimensional light field information, three-dimensional stereoscopic display with a sense of depth and reality can be achieved.
[0045] The depth map to be compressed refers to an image corresponding to a three-dimensional scene that needs to be compressed in depth of field.
[0046] Optionally, the electronic device may first obtain an initial depth map to be compressed, and perform normalization processing on the initial depth map to be compressed to obtain a depth map to be compressed.
[0047] Among them, the main purpose of normalization processing is to convert multiple depth values corresponding to the initial depth map to be compressed into a suitable range (such as [0,1]) to meet the depth of field compression requirements of the depth curve estimation network model.
[0048] 102. Estimating the attention mechanism in the network model through the depth curve, determining the channel attention image and the spatial attention image corresponding to the depth map to be compressed.
[0049] Exemplarily, the attention mechanism can be implemented using a Convolutional Block Attention Module (CBAM) in a deep curve estimation network model.
[0050] Among them, the CBAM module is an attention module that combines the channel attention mechanism and the spatial attention mechanism. In other words, the above attention mechanism includes: channel attention mechanism and spatial attention mechanism.
[0051] The electronic device determines the channel attention image corresponding to the depth map to be compressed through the channel attention mechanism in the depth curve estimation network model, and determines the spatial attention image corresponding to the depth map to be compressed through the spatial attention mechanism in the depth curve estimation network model. These two attention mechanisms jointly improve the understanding and processing capabilities of the depth curve estimation network model for the input depth map to be compressed. By comprehensively considering the importance of feature channels and spatial positions, the depth curve estimation network model can more comprehensively utilize the features of the depth map to be compressed, thereby improving the accuracy of the depth curve estimation network model.
[0052] 103. Through the depth curve estimation network model, the depth of field compression result is determined according to the channel attention image and the spatial attention image.
[0053] The depth of field compression result refers to the depth map after the depth of field compression corresponding to the depth map to be compressed.
[0054] After determining the channel attention image and the spatial attention image, the electronic device can process the channel attention image and the spatial attention image through the depth curve estimation network model to obtain the depth of field compression result corresponding to the depth map to be compressed. The whole process has a high degree of automation, which can effectively improve the efficiency of depth of field compression.
[0055] In some embodiments, the depth curve estimation network model is trained based on the following steps: an electronic device obtains a depth map sample and a depth compression result sample corresponding to the depth map sample; the electronic device determines the channel attention image sample and the spatial attention image sample corresponding to the depth map sample through the attention mechanism in the original depth curve estimation network model; the electronic device determines the predicted depth compression result based on the channel attention image sample and the spatial attention image sample through the original depth curve estimation network model; the electronic device updates the model parameters of the original depth curve estimation network model based on the predicted depth compression result and the depth compression result sample to obtain a trained depth curve estimation network model.
[0056] The depth map samples include a large number of sub-depth map samples, and the depth of field compression result samples include a large number of sub-depth of field compression result samples. Each sub-depth map sample may correspond to at least one sub-depth of field compression result sample.
[0057] The predicted depth compression result refers to the depth map after the depth compression corresponding to the depth map sample.
[0058] In the process of training the original depth curve estimation network model, the electronic device may first obtain a depth map sample and a depth of field compression result sample corresponding to the depth map sample. Then, the electronic device determines the channel attention image sample and the spatial attention image sample corresponding to the depth map sample through the attention mechanism in the original depth curve estimation network model. Then, the electronic device processes the channel attention image sample and the spatial attention image sample through the original depth curve estimation network model to obtain a predicted depth of field compression result corresponding to the depth map sample. Then, based on the predicted depth of field compression result and in combination with the above-mentioned depth of field compression result sample, the electronic device iteratively updates the model parameters of the original depth curve estimation network model to obtain a trained depth curve estimation network model. The depth curve estimation network model has high accuracy and strong generalization ability, and can ensure the image quality of the output result.
[0059] In some embodiments, the electronic device obtains the depth map sample, which may include: the electronic device determines the Coswell contour corresponding to the initial depth map sample based on the Coswell illusion; the electronic device adds the Coswell contour to the initial depth map sample to obtain the depth map sample.
[0060] Among them, the Kongswei illusion refers to a visual illusion phenomenon. The Kongswei illusion takes advantage of the difference in the human eye's perception of brightness and contrast. In the Kongswei illusion image, there will be a discontinuous boundary between two areas of the same brightness, and the brightness value will gradually decrease on both sides. This change causes the observer to perceive the brightness of the two areas differently, that is, one side looks brighter and the other side looks darker.
[0061] The initial depth map sample includes a large number of sub-initial depth map samples.
[0062] Optionally, the electronic device may use Blender software to render each of the multiple three-dimensional light field models to obtain a corresponding sub-initial depth map sample. Figure 2 , which is a schematic diagram of a scene for obtaining sub-initial depth map samples provided by the present invention.
[0063] Among them, Blender software is an open source 3D graphics software.
[0064] After obtaining the initial depth map sample, the electronic device can determine the Kangswei contour corresponding to the initial depth map sample based on the Kangswei illusion, and then add the Kangswei contour to the initial depth map sample to obtain the depth map sample. Throughout the process, the introduction of the Kangswei contour solves the problems of reduced contrast and weakened stereoscopic effect in the prior art, and effectively improves the depth contrast.
[0065] In some embodiments, the electronic device determines a Kangswei profile corresponding to an initial depth map sample based on a Kangswei illusion, which may include: the electronic device performs spatial frequency band decomposition on the initial depth map sample to obtain multiple spatial frequency band samples; the electronic device determines a low-frequency component corresponding to the initial depth map sample based on scaling factors corresponding to each of the multiple spatial frequency band samples; the electronic device determines a high-frequency component corresponding to the initial depth map sample based on the Kangswei illusion in combination with the low-frequency component; and the electronic device determines the high-frequency component as the Kangswei profile.
[0066] The low-frequency component refers to the part with low frequency in the initial depth map sample.
[0067] The high frequency component refers to the portion with high frequency in the initial depth map samples.
[0068] Specifically, the electronic device can use the Gaussian pyramid to perform spatial frequency decomposition on the initial depth map samples, and further perform spatial frequency band decomposition to decompose the initial depth map samples into depth contents of multiple spatial frequency bands, that is, multiple spatial frequency band samples; then, the electronic device calculates the Gaussian difference values between adjacent levels in the Gaussian pyramid in the logarithmic domain, that is, the difference values between adjacent spatial frequency band samples in the multiple spatial frequency band samples, and then, the electronic device performs weighted fusion on all the difference values based on the scaling factors corresponding to each of the multiple spatial frequency band samples to obtain the low-frequency components corresponding to the initial depth map samples; then, the electronic device determines the high-frequency components corresponding to the initial depth map samples based on the Cosswell illusion in combination with the low-frequency components, and determines the high-frequency components as Cosswell contours, so that the Cosswell contours can be subsequently added to the initial depth map samples to obtain depth map samples.
[0069] During the entire process, the electronic device reduces the loss of stereoscopic perception caused by depth of field compression by constructing a Kangswei outline, visually retaining the depth perception invariance of the three-dimensional scene to the greatest extent.
[0070] In some embodiments, the electronic device determines the predicted depth of field compression result based on the channel attention image samples and the spatial attention image samples through the original depth curve estimation network model, which may include: the electronic device fuses the channel attention image samples and the spatial attention image samples through the original depth curve estimation network model to obtain a fused image sample; the electronic device extracts parameters of the fused image samples through the original depth curve estimation network model to obtain mapping parameters, and constructs a mapping function based on the mapping parameters; the electronic device remaps multiple depth values corresponding to the fused image samples based on the mapping function through the original depth curve estimation network model to obtain a predicted depth of field compression result.
[0071] Exemplarily, the electronic device may define a basic mapping curve through an original depth curve estimation network model, such as Figure 3 Shown is a schematic diagram of the basic mapping curve provided by the present invention. Figure 3 In , α1 represents the adaptive curve parameter corresponding to the basic mapping curve, and the value of α1 depends on the input depth map sample; the horizontal and vertical coordinates are both normalized depth value ranges. Subsequently, a high-order curve can be obtained through multiple iterations of the basic mapping curve.
[0072] Exemplarily, the original depth curve estimation network model includes 7 convolutional layers (6 hidden layers and 1 output layer), and these 7 layers are all 3×3 convolutional layers of equal length (stride=1). Among them, the 6 hidden layers adopt a symmetrical jump structure, that is, the outputs of the 3rd hidden layer and the 4th hidden layer will be spliced together and sent to the 5th hidden layer, the outputs of the 2nd hidden layer and the 5th hidden layer will be spliced together and sent to the 6th hidden layer, and the outputs of the 1st hidden layer and the 6th hidden layer will be spliced together and sent to the 7th layer (i.e., the output layer). After the output layer, each pixel of the depth map sample has 4 channels, which represent 4 iterations of the high-order curve.
[0073] For example, Figure 4 , which is a schematic diagram of a scene for training the original depth curve estimation network model provided by the present invention. Figure 4It can be seen that the electronic device inputs the depth map sample into the original depth curve estimation network model, encodes and decodes the depth map sample through the original depth curve estimation network model, and then sends the decoded depth map sample to the 7-layer convolution layer for processing. The channel attention mechanism in the original depth curve estimation network model determines the channel attention image sample corresponding to the decoded depth map sample, and the spatial attention mechanism in the original depth curve estimation network model determines the spatial attention image sample corresponding to the decoded depth map sample, and fuses the channel attention image sample and the spatial attention image sample to obtain a fused image sample. Then, the electronic device extracts parameters of the fused image sample through the original depth curve estimation network model, and the original depth curve estimation network model outputs mapping parameters A1, ..., A n , where A1 = {α 1,(i,j)}, A n ={α n,(i,j)}, n represents the number of iterations, (i, j) represents the position coordinates of the element in the i-th row and j-th column of the fused image sample; then, the electronic device estimates the network model through the original depth curve, based on the mapping parameters A1, ..., A n , construct the mapping function in, represents the pixel coordinates of the depth map samples, α n Represents the adaptive curve parameter corresponding to the n-order curve; Then, the electronic device estimates the network model through the original depth curve, based on the mapping function The multiple depth values corresponding to the fused image sample are remapped point-to-point to obtain a predicted depth compression result, so that the model parameters of the original depth curve estimation network model can be updated in combination with the depth compression result sample.
[0074] In some embodiments, the electronic device updates the model parameters of the original depth curve estimation network model according to the predicted depth of field compression result and the depth of field compression result sample to obtain a trained depth curve estimation network model, which may include: the electronic device determines the loss value between the predicted depth of field compression result and the depth of field compression result sample according to the loss function; the electronic device updates the model parameters of the original depth curve estimation network model according to the loss value to obtain the trained depth curve estimation network model.
[0075] Optionally, the loss function may include a structural similarity index (SSIM) loss function and a deep smoothing loss function.
[0076] For example, in order to keep the compressed depth map as accurate as possible in reflecting the geometric structure and depth order hierarchy of the three-dimensional scene during the depth remapping process, and to reduce the visual deviation problems of depth compression, such as distortion, it is necessary to constrain the loss of the depth map structure consistency. SSIM is an indicator for measuring the similarity between two images. The SSIM loss function is a loss function based on the SSIM indicator and is used to train neural networks. The calculation formula of the SSIM loss function is: Where p represents the predicted depth of field compression result; q represents the depth of field compression result sample; μ p represents the mean of p; μ q represents the mean value of q; represents the variance of p; represents the variance of q; σ pq represents the covariance of p and q; c1 and c2 are two constants used to avoid the denominator being zero.
[0077] For example, in the process of remapping multiple depth values point to point, it is necessary to ensure the depth smoothness of adjacent points and adjacent areas to avoid holes and noise. The depth smoothness loss function can help reduce noise and discontinuity in the depth map. The calculation formula of the depth smoothness loss function is: in, Represents the depth value of the i-th row and j-th column in the predicted depth of field compression result. Represents the pixel value of the i-th row and j-th column in the predicted depth of field compression result, and Respectively The gradient values in the x and y directions, and Respectively Gradient values in the x and y directions; c represents the preset coefficient.
[0078] Combination Figure 4 After determining the predicted depth of field compression result, the electronic device can determine the loss value between the predicted depth of field compression result and the depth of field compression result sample according to the loss function; then, the electronic device can iteratively update the model parameters of the original depth curve estimation network model according to the loss value to obtain a trained depth curve estimation network model, which has high accuracy and strong generalization ability, and can ensure the image quality of the output result.
[0079] In some embodiments, after step 103, the method may further include: the electronic device performs denormalization processing on the depth of field compression result to obtain a reconstructed true value map; the electronic device performs point cloud reconstruction processing on the reconstructed true value map to obtain a reconstructed scene map; the electronic device determines multiple disparity maps based on the reconstructed scene map; the electronic device performs scene reconstruction processing on the multiple disparity maps to obtain a scene reconstruction result corresponding to the depth of field compression result; wherein the scene reconstruction processing includes: fusion processing and back projection processing.
[0080] After determining the depth of field compression result, which is normalized, the electronic device first performs a denormalization process on the depth of field compression result to obtain a reconstructed true value map; then, the electronic device performs a point cloud reconstruction process on the reconstructed true value map to obtain a reconstructed scene map, which is a multi-viewpoint reconstructed image of a three-dimensional scene; then, the electronic device can determine multiple disparity maps based on the reconstructed scene map, and then perform fusion processing, back-projection processing, etc. on the multiple disparity maps to achieve scene reconstruction of multiple disparity maps, and obtain a scene reconstruction result corresponding to the depth of field compression result. The entire process can achieve stereoscopic reconstruction of the three-dimensional scene corresponding to the depth of field compression result.
[0081] In an embodiment of the present invention, a depth map to be compressed in a three-dimensional light field is obtained; the channel attention image and the spatial attention image corresponding to the depth map to be compressed are determined through the attention mechanism in the depth curve estimation network model; the depth curve estimation network model is used to determine the depth of field compression result according to the channel attention image and the spatial attention image. The method adopts a depth curve estimation network model, which can automatically determine the depth of field compression result corresponding to the depth map to be compressed, and can effectively improve the depth of field compression efficiency.
[0082] The experimental results related to the embodiments of the present invention are further described below.
[0083] For example, Figure 5 FIG. 1 is a schematic diagram of a depth map to be compressed and a depth of field compression result provided by the present invention. Figure 5 It can be seen that compared with the depth map to be compressed, the depth of field compression result has a better and more obvious depth perception effect.
[0084] For example, Figure 6 , which is a schematic diagram comparing depth perception heat maps of different solutions provided by the present invention. Figure 6 In the present invention, the first scheme is a 3D light scene depth compression method based on a depth curve estimation network; the second scheme is a depth linear compression method in the prior art. Figure 6It can be seen that under the condition of compression to the same depth range, the depth perception heat map clearly shows that the image obtained by the first scheme has a better and more obvious depth perception effect than the image obtained by the second scheme; at the same time, in the image obtained by the first scheme, there is an obvious Kangswei outline at the edge of the object, which greatly enhances the contrast between objects in the three-dimensional scene.
[0085] The following is a description of a three-dimensional light scene depth compression device based on a depth curve estimation network provided by the present invention. The three-dimensional light scene depth compression device based on a depth curve estimation network described below and the three-dimensional light scene depth compression method based on a depth curve estimation network described above can refer to each other.
[0086] like Figure 7 , which is a schematic diagram of the structure of a three-dimensional light scene depth compression device based on a depth curve estimation network provided by the present invention, including the following acquisition module 701 and processing module 702.
[0087] The acquisition module 701 is used to acquire a depth map to be compressed in a three-dimensional light field.
[0088] Processing module 702 is used to determine the channel attention image and the spatial attention image corresponding to the depth map to be compressed through the attention mechanism in the depth curve estimation network model; through the depth curve estimation network model, determine the depth of field compression result according to the channel attention image and the spatial attention image.
[0089] Optionally, the depth curve estimation network model is trained based on the following steps: obtaining depth map samples and depth of field compression result samples corresponding to the depth map samples; determining the channel attention image samples and the spatial attention image samples corresponding to the depth map samples through the attention mechanism in the original depth curve estimation network model; determining the predicted depth of field compression result based on the channel attention image samples and the spatial attention image samples through the original depth curve estimation network model; updating the model parameters of the original depth curve estimation network model based on the predicted depth of field compression result and the depth of field compression result sample to obtain a trained depth curve estimation network model.
[0090] Optionally, based on the Kongswei illusion, a Kongswei contour corresponding to the initial depth map sample is determined; and the Kongswei contour is added to the initial depth map sample to obtain the depth map sample.
[0091] Optionally, the initial depth map sample is decomposed into spatial frequency bands to obtain multiple spatial frequency band samples; based on the scaling factors corresponding to the multiple spatial frequency band samples, a low-frequency component corresponding to the initial depth map sample is determined; based on the Kongsville illusion, in combination with the low-frequency component, a high-frequency component corresponding to the initial depth map sample is determined; and the high-frequency component is determined as the Kongsville contour.
[0092] Optionally, the channel attention image sample and the spatial attention image sample are fused through the original depth curve estimation network model to obtain a fused image sample; the parameters of the fused image sample are extracted through the original depth curve estimation network model to obtain mapping parameters, and a mapping function is constructed based on the mapping parameters; the multiple depth values corresponding to the fused image sample are remapped based on the mapping function through the original depth curve estimation network model to obtain the predicted depth of field compression result.
[0093] Optionally, the processing module 702 is further used to perform denormalization processing on the depth of field compression result to obtain a reconstructed true value map; perform point cloud reconstruction processing on the reconstructed true value map to obtain a reconstructed scene map; determine multiple disparity maps based on the reconstructed scene map; perform scene reconstruction processing on the multiple disparity maps to obtain a scene reconstruction result corresponding to the depth of field compression result; wherein the scene reconstruction processing includes: fusion processing and back projection processing.
[0094] Optionally, according to the loss function, a loss value between the predicted depth of field compression result and the depth of field compression result sample is determined; and the model parameters of the original depth curve estimation network model are updated according to the loss value to obtain the trained depth curve estimation network model.
[0095] like Figure 8 As shown, it is a structural schematic diagram of an electronic device provided by the present invention, and the electronic device may include: a processor (processor) 810, a communication interface (CommunicationsInterface) 820, a memory (memory) 830 and a communication bus 840, wherein the processor 810, the communication interface 820, and the memory 830 complete mutual communication through the communication bus 840. The processor 810 can call the logic instructions in the memory 830 to execute a three-dimensional light scene depth compression method based on a depth curve estimation network, and the method includes: obtaining a depth map to be compressed under a three-dimensional light field; determining a channel attention image and a spatial attention image corresponding to the depth map to be compressed through the attention mechanism in the depth curve estimation network model; and determining a depth of field compression result according to the channel attention image and the spatial attention image through the depth curve estimation network model.
[0096] In addition, the logic instructions in the above-mentioned memory 830 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program codes.
[0097] On the other hand, the present invention also provides a computer program product, which includes a computer program, which can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the three-dimensional light scene depth compression method based on the depth curve estimation network provided by the above methods, and the method includes: obtaining a depth map to be compressed under a three-dimensional light field; determining a channel attention image and a spatial attention image corresponding to the depth map to be compressed through an attention mechanism in a depth curve estimation network model; and determining a depth of field compression result based on the channel attention image and the spatial attention image through the depth curve estimation network model.
[0098] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the three-dimensional light scene depth compression method based on a depth curve estimation network provided by the above-mentioned methods, the method comprising: obtaining a depth map to be compressed under a three-dimensional light field; determining a channel attention image and a spatial attention image corresponding to the depth map to be compressed through an attention mechanism in a depth curve estimation network model; determining a depth of field compression result according to the channel attention image and the spatial attention image through the depth curve estimation network model.
[0099] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0100] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0101] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A three-dimensional light scene depth compression method based on a depth curve estimation network, characterized in that: include: Obtain a depth map to be compressed in a three-dimensional light field; Determine the channel attention image and the spatial attention image corresponding to the depth image to be compressed by estimating the attention mechanism in the network model through the depth curve; The depth curve estimation network model is used to determine a depth of field compression result according to the channel attention image and the spatial attention image.
2. The method according to claim 1, characterized in that: The depth curve estimation network model is trained based on the following steps: Obtaining a depth map sample and a depth of field compression result sample corresponding to the depth map sample; Determine the channel attention image sample and the spatial attention image sample corresponding to the depth map sample by estimating the attention mechanism in the network model through the original depth curve; Determine a predicted depth of field compression result according to the channel attention image sample and the spatial attention image sample through the original depth curve estimation network model; According to the predicted depth of field compression result and the depth of field compression result sample, the model parameters of the original depth curve estimation network model are updated to obtain a trained depth curve estimation network model.
3. The method according to claim 2, characterized in that The obtaining of the depth map sample comprises: Based on the Kangswei illusion, determine the Kangswei contour corresponding to the initial depth map sample; The Kangswei contour is added to the initial depth map sample to obtain the depth map sample.
4. The method according to claim 3, characterized in that The method of determining the Kangswei contour corresponding to the initial depth map sample based on the Kangswei illusion includes: Performing spatial frequency band decomposition on the initial depth map sample to obtain a plurality of spatial frequency band samples; Determine, according to the scaling factors corresponding to the plurality of spatial frequency band samples, low-frequency components corresponding to the initial depth map samples; determine, based on the Coswell illusion, high-frequency components corresponding to the initial depth map samples in combination with the low-frequency components; The high frequency component is determined as the Kongswei profile.
5. The method according to claim 2, characterized in that: The method of estimating the original depth curve network model and determining the predicted depth of field compression result according to the channel attention image sample and the spatial attention image sample comprises: fusing the channel attention image sample and the spatial attention image sample through the original depth curve estimation network model to obtain a fused image sample; Extracting parameters of the fused image sample through the original depth curve estimation network model to obtain mapping parameters, and constructing a mapping function based on the mapping parameters; The original depth curve estimation network model is used to remap multiple depth values corresponding to the fused image samples based on the mapping function to obtain the predicted depth of field compression result.
6. The method according to claim 1, characterized in that The method further comprises: Performing a denormalization process on the depth of field compression result to obtain a reconstructed true value map; Performing point cloud reconstruction processing on the reconstructed truth value image to obtain a reconstructed scene image; Determining a plurality of disparity maps according to the reconstructed scene graph; Performing scene reconstruction processing on the multiple disparity maps to obtain a scene reconstruction result corresponding to the depth of field compression result; The scene reconstruction process includes: fusion processing and back-projection processing.
7. The method according to claim 2, characterized in that The method of updating the model parameters of the original depth curve estimation network model according to the predicted depth of field compression result and the depth of field compression result sample to obtain a trained depth curve estimation network model includes: Determining a loss value between the predicted depth of field compression result and the depth of field compression result sample according to a loss function; The model parameters of the original depth curve estimation network model are updated according to the loss value to obtain the trained depth curve estimation network model.
8. A three-dimensional light scene depth compression device based on a depth curve estimation network, characterized in that: include: An acquisition module, used for acquiring a depth map to be compressed in a three-dimensional light field; A processing module is used to determine the channel attention image and the spatial attention image corresponding to the depth map to be compressed through the attention mechanism in the depth curve estimation network model; and determine the depth of field compression result according to the channel attention image and the spatial attention image through the depth curve estimation network model.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the three-dimensional light scene depth compression method based on the depth curve estimation network as described in any one of claims 1 to 7 is implemented.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the three-dimensional light scene depth compression method based on the depth curve estimation network as claimed in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Image processing device, imaging device and image processing method
CN103516983A
Three-dimensional display depth adjusting method and device based on multi-frequency decomposition
CN105812767A
Convolutional neural network-based real-time low-illumination image target detection method
CN117115616A
Method of Customizing 3D Computer-Generated Scenes
US20090021513A1
