Compression method for light-field image
Through the all-optical image encoding and decoding method based on dynamic cropping and splicing of micro-images, the problem of low light field image compression efficiency in the existing technology is solved, and efficient light field image compression and transmission is achieved, which is suitable for multiple application fields.
Patent Information
- Application Number
- PCT/CN2024/100217
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-06-17
- Filing Date
- 2024-06-19
- Publication Date
- 2024-09-19
AI Technical Summary
Existing technologies cannot effectively utilize the special structure and characteristics of light field images, resulting in low compression efficiency of light field images and difficulty in meeting efficient transmission and storage requirements.
A plenoptic image coding and decoding method based on dynamic cropping and splicing of micro-images is adopted. By preprocessing the light field image, it is converted into a rectangular image suitable for processing by the existing two-dimensional image coding algorithm, and a deep learning model is used for end-to-end image processing. Preprocessing and inverse transformation on the end, optimizing the blocking and splicing process, and improving compression efficiency.
It significantly improves the compression efficiency of light field images, reduces data transmission bandwidth and storage space, and is suitable for many fields such as virtual reality, computational photography, and 3D reconstruction.
Smart Images

Figure CN2024100217_19092024_PF_FP_ABST
Abstract
Description
A light field image compression method Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to a plenoptic image encoding and decoding method based on dynamic cropping and splicing of micro-images. Background Art
[0002] A focused light field image (lenslet) is an image captured by a focused light field camera. A focused light field camera uses a microlens array to capture light information in a scene, thereby recording rich angle and position data. The image captured by each microlens is called a microimage (MI), which contains scene information seen from different angles. Light field images can provide more depth and perspective information than traditional images, which makes them widely used in virtual reality, computational photography, 3D reconstruction, medical imaging and other fields.
[0003] While traditional imaging techniques can only record the brightness of a scene from a single perspective, light field cameras can capture how light changes at different angles and positions, offering significant advantages for image processing and analysis. For example, in virtual reality applications, light field images can provide a more realistic and immersive user experience; in computational photography, the focus and plane can be flexibly adjusted after capture; and in 3D reconstruction, light field images can more accurately restore a scene's depth information. However, light field images are data-intensive, particularly those captured by high-resolution microlens arrays, which far exceed the data volume of traditional two-dimensional images. This poses significant challenges to data transmission and storage.
[0004] Currently, the transmission and storage of light field images primarily rely on existing video compression technologies, such as H.264 and H.265. However, these compression technologies are designed for traditional two-dimensional video and cannot effectively utilize the unique structure and characteristics of light field images. Consequently, directly applying these technologies results in low compression efficiency, making it difficult to meet the efficient transmission and storage requirements of practical applications.
[0005] The disclosure of the above background technology content is only used to assist in understanding the concept and technical solution of the present invention. It does not necessarily belong to the prior art of this patent application. In the absence of clear evidence that the above content has been disclosed on the filing date of this patent application, the above background technology should not be used to evaluate the novelty and creativity of this application.
[0006] Summary of the Invention
[0007] To solve the above technical problems, the present invention proposes a light field image compression method, which can improve the compression efficiency of light field images and reduce data transmission bandwidth and storage space.
[0008] In order to achieve the above object, the present invention adopts the following technical solutions:
[0009] In a first aspect, the present invention discloses a method for compressing a light field image, comprising the following steps:
[0010] S1: Acquire a light field image and preprocess the light field image, wherein the light field image includes a plurality of microlens images arranged in an array, and the preprocessing includes: taking a block from each of the microlens images and splicing the blocked microlens images to generate a rectangular image;
[0011] S2: Encode the rectangular image in step S1 using an image / video encoding algorithm to generate a compressed light field image.
[0012] Preferably, the optimization problem of the preprocessing is to minimize the bit rate, and the constraints include: the sum of the errors between the restored microlens image matrix and the original microlens image matrix does not exceed a first preset value, wherein the restored microlens image matrix refers to the microlens image matrix obtained after splicing and then inverse transformation, and the original microlens image matrix refers to the microlens image matrix in the acquired light field image.
[0013] Preferably, the optimization problem of extracting blocks from each microlens image in step S1 is: maximizing the unique information amount of the intercepted area selected from each microlens image in the step of extracting blocks, and minimizing the redundant information amount of the intercepted area;
[0014] The optimization problem of stitching the blocked microlens images is to minimize the area of the stitched rectangular images, with the constraint that the stitched rectangular images are the enclosing rectangles of all the intercepted areas.
[0015] Preferably, step S1 specifically uses a deep learning model to perform end-to-end preprocessing on the light field image, and the shape intercepted in the block extraction step is a rectangle and can be rotated, wherein the deep learning model includes an encoder and a decoder, wherein the encoder is used to identify significant features in the image and dynamically adjust the size and rotation angle of the rectangle to convert each microlens image into a square block suitable for splicing and perform splicing, and the decoder is used to restore the shape and position of each square block to restore the spliced square blocks to the original light field image, wherein the encoder and the decoder are symmetrically designed, and a jump connection is provided between the encoder and the decoder, and the loss functions used in the training process include reconstruction loss, adversarial loss and cycle consistency loss.
[0016] Preferably, the shape intercepted in the block extraction step in step S1 is a non-rotatable and resizable rectangle, wherein:
[0017] The block extraction step specifically includes: detecting edges in each microlens image using an edge detection algorithm; performing connected component analysis on the detected edges to identify connected edge regions; determining the maximum circumscribed rectangle of each connected edge region; and determining a intercepted rectangular region of each microlens image based on the maximum circumscribed rectangle of the connected edge regions.
[0018] The splicing step specifically includes the following steps a or b:
[0019] a. Take all the determined rectangular areas as input and stitch them into a minimum rectangular area. Use an adaptive rectangle stitching algorithm to place each rectangular area in a preset position for stitching, ensuring no overlap and minimizing the overall area. If there are gaps in the stitching process, fill them with a preset color.
[0020] b. Use an image similarity metric to evaluate the similarity between blocks, calculate the similarity score between each pair of blocks, and generate a similarity matrix, where a block refers to the rectangular area intercepted in the block extraction step; use a clustering algorithm to cluster the similarity matrix, and classify blocks with similar content into the same category; sort the blocks based on the clustering results to ensure that blocks with similar content are adjacent when spliced; use all sorted rectangular areas as input and splice them into a minimum rectangular area; use an adaptive rectangular splicing algorithm to place each rectangular area in a preset position for splicing, ensuring that there is no overlap and minimizing the overall area; if there are gaps during the splicing process, fill the gaps with a preset color.
[0021] Preferably, the shape intercepted in the block extraction step in step S1 is a dynamic rectangle with its center at the center of the circle, wherein:
[0022] The block extraction step specifically includes: detecting edges in each microlens image using an edge detection algorithm; performing connected component analysis on the detected edges to identify connected edge regions; determining a maximum circumscribed rectangle of each connected edge region with its center at the center of a circle; and determining a rectangular region to be intercepted from each microlens image based on the maximum circumscribed rectangle of the connected edge regions.
[0023] The stitching step specifically includes: taking all determined rectangular areas as input and stitching them into a minimum rectangular area; using an adaptive rectangular stitching algorithm to place each rectangular area at a preset position for stitching, ensuring no overlap and minimizing the overall area; if there are gaps during the stitching process, filling the gaps with a preset color.
[0024] Preferably, the shape intercepted in the block extraction step in step S1 is a non-rotatable and resizable rectangle, wherein:
[0025] The block extraction step specifically includes: detecting edges in each microlens image using an edge detection algorithm; performing connected component analysis on the detected edges to identify connected edge regions; determining the maximum circumscribed rectangle of each connected edge region and finding the minimum rectangular region that can contain the connected edge region; selecting the size of the maximum circumscribed rectangle in all microlens images as a fixed intercepted rectangular region, thereby unifying the intercepted rectangle size of all microlens images;
[0026] The stitching step specifically includes: using a fixed intercepted rectangular area to stitch the largest circumscribed rectangles of all microlens images; wherein each microlens image is cropped according to a uniform intercepted rectangle size, and stitched according to the position of each microlens image in the light field image.
[0027] Preferably, the shape intercepted in the block extraction step in step S1 is an inscribed square, wherein:
[0028] The block extraction step specifically includes: intercepting an inscribed square from each microlens image;
[0029] The stitching step specifically includes: cropping each microlens image according to a fixed square size, and stitching according to the position of each microlens image in the light field image.
[0030] Preferably, the light field image compression method further includes:
[0031] S3: Transmit the compressed light field image to the receiving end;
[0032] S4: Decompressing the compressed light field image using a decoding algorithm corresponding to the image / video encoding algorithm in step S2 to restore the spliced rectangular image;
[0033] S5: Performing inverse transformation on the rectangular image in step S4 to restore the light field image.
[0034] Preferably, step S5 specifically includes: re-splitting the rectangular image in step S4 into multiple clipped areas during pre-processing in step S1, and placing these clipped areas back to their original positions according to the splicing order and positions in step S1 to restore the light field image.
[0035] In a second aspect, the present invention discloses a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein the computer program is configured to be executed by a processor to perform the light field image compression method described in the first aspect.
[0036] Compared with the prior art, the advantageous effects of the present invention are as follows: the light field image compression method proposed in the present invention comprehensively considers the redundancy between information of different perspectives in the light field image, fully utilizes the characteristics of the light field image to perform efficient compression, significantly improves the compression efficiency of the light field image, and also significantly reduces the compressed data size, greatly reducing the data transmission bandwidth and storage space. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] FIG1 is a flow chart of a light field image compression method according to a preferred embodiment of the present invention;
[0038] FIG2a to FIG2f show examples of partial light field images when step S1 and step S5 respectively correspond to the fifth optimization scheme in the present invention;
[0039] FIG3 a is the result of not using the MCA treatment of the present invention;
[0040] FIG3b shows the results of the MCA treatment using the present invention. DETAILED DESCRIPTION
[0041] The following is a detailed description of the embodiments of the present invention. It should be emphasized that the following description is only exemplary and is not intended to limit the scope of the present invention and its application.
[0042] It should be noted that when an element is referred to as being "fixed to" or "disposed on" another element, it can be directly on the other element or indirectly on the other element. When an element is referred to as being "connected to" another element, it can be directly connected to the other element or indirectly connected to the other element. In addition, connection can be used for both fixing and circuit / signal communication.
[0043] It should be understood that the terms "length", "width", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating the orientation or position relationship, are based on the orientation or position relationship shown in the accompanying drawings, and are only for the convenience of describing the embodiments of the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operate in a specific orientation, and therefore cannot be understood as limiting the present invention.
[0044] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of such features. In the description of the embodiments of the present invention, "plurality" means two or more, unless otherwise specifically defined.
[0045] Although some existing compression methods specifically for light field images have improved compression efficiency to a certain extent, they still have shortcomings. Research has found that these methods often ignore the redundancy between information from different perspectives in light field images and fail to fully utilize the characteristics of light field images for efficient compression. As a result, the compressed data is still large and the transmission and storage efficiency is low. To address these problems, the present invention proposes a new light field image compression and transmission scheme, which aims to overcome the shortcomings of the existing technology, improve the compression efficiency of light field images, and reduce the data transmission bandwidth and storage space. By preprocessing the light field image and converting it into a format suitable for processing by existing efficient compression algorithms, the overall compression efficiency is improved.
[0046] The preferred embodiment of the present invention discloses a new light field image compression and transmission scheme, which is a full-optical image encoding and decoding method based on dynamic cropping and splicing of micro-images. By performing multi-step pre-processing and post-processing on the light field image, the overall compression efficiency is improved.
[0047] As shown in Figure 1, first, through the microimage cropping and alignment (MCA) preprocessing step, the light field image includes multiple microlens images arranged in an array. A block operation is performed on each microlens image, and a splicing operation is performed based on the blocks obtained in the blocking step to generate a rectangular image suitable for processing by existing two-dimensional image coding algorithms. Then, the preprocessed rectangular image is encoded using an existing high-efficiency video coding algorithm to achieve efficient compression. The compressed data stream is transmitted to the receiving end via a network or other transmission medium, where it is decoded to restore the original rectangular image. Finally, through the MCA inverse transformation processing step, the decoded rectangular image is restored to the original microlens image array, i.e., the light field image, thereby achieving efficient light field image transmission and storage.
[0048] The steps in the light field image compression method of the present invention are specifically as follows:
[0049] S1: MCA pretreatment
[0050] The purpose of MCA preprocessing is to convert the focused light field image (lenlet) into square blocks suitable for processing by existing two-dimensional image coding algorithms through cropping and splicing operations to improve compression efficiency.
[0051] The optimization problem formula for MCA preprocessing is:
[0052] The optimization problem represented by formula (1) is to minimize the area A(S) of the spliced rectangular image S. The rectangular image is preferably a square image.
[0053] The constraints are:
[0054] The constraint condition expressed by formula (2) is that each intercepted area B i,j The area A(B i,j ) does not exceed the preset maximum value A max , and the restored microlens image matrix The error between the original image matrix I The total does not exceed the preset maximum value E max , maximum value A max and the maximum value E max The preset values respectively.
[0055] Specifically, MCA pretreatment includes the following steps:
[0056] S11: Block extraction: Analyze the microlens image (MI) captured by each microlens and select the area with the highest information richness for interception. The intercepted area can be of any shape and size to maximize the retention of effective information.
[0057] Let I i,j is the sub-image (i.e., microlens image) in the i-th row and j-th column of the original microlens image matrix, B i,j is from sub-image I i,j The area intercepted in the i,j ) is the intercepted area B i,j The unique information content, R(B i,j ) is the intercepted area B i,j The amount of redundant information.
[0058] The optimization problem formula for the block-taking step is:
[0059] The optimization problem expressed by formula (3) is as follows: The goal is to maximize the i,j Select the cropped area B i,j The unique information amount U(B i,j ), while minimizing the intercepted area B i,j The amount of redundant information R(B i,j ), where λ is a weight parameter used to balance unique information and redundant information. The constraint is that each intercepted area B i,j The area A(B i,j ) does not exceed the preset maximum value A max .
[0060] S12: Stitching: Stitching the captured areas into a rectangular image, allowing for empty spaces that can be filled with black or white. The goal of stitching is to minimize the area of the rectangular image, thereby reducing the bit rate during encoding.
[0061] The optimization problem formula in the splicing step is:
[0062] The optimization problem expressed by formula (4) is as follows: the goal is to minimize the area A(S) of the spliced rectangular image S; the constraint condition is that the spliced image S is all the intercepted areas B i,j The enclosing rectangle of .
[0063] In a further embodiment, step S1 may further adopt the following five optimization schemes.
[0064] The first optimization solution:
[0065] The simplified idea of this optimization solution is that the intercepted shape must be a rectangle that can be rotated. Specifically, it adopts a deep learning solution that dynamically transforms rectangles.
[0066] In this solution, a deep learning model is used to perform end-to-end processing on the original microlens image array (i.e., light field image lenslet), enabling the interception and splicing of dynamically resized and rotated rectangles. To ensure the feasibility of the inverse transformation, the model design must ensure the symmetry of encoding and decoding, as well as information preservation. This solution mainly includes the following steps:
[0067] A1: Model Design
[0068] The model architecture includes an encoder and a decoder.
[0069] Encoder: Converts the original microlens image into square blocks suitable for stitching. The encoder should be able to identify salient features in the image and dynamically adjust the size and rotation angle of the rectangles.
[0070] Decoder: Restores the original microlens image from the encoded square blocks. The decoder should be able to accurately restore the shape and position of each block to ensure image restoration quality.
[0071] The encoder and decoder need to be designed symmetrically to ensure that each encoding step has a corresponding decoding step, which can be achieved through symmetrical convolution and deconvolution layers.
[0072] Skip connections are added between the encoder and decoder to ensure that detailed information is not lost during the encoding process and can be effectively restored during the decoding process.
[0073] A2: Training Data Preparation
[0074] Pairs of original microlens images and encoded rectangular images are required as training data. This training data can be generated through simulation or extracted from actual microlens images. The training data can be augmented through operations such as rotation and scaling to improve the robustness of the model.
[0075] A3: Loss Function Design
[0076] The mean squared error (MSE) loss is used to ensure that the decoded image is as consistent as possible with the original image. The adversarial loss of a generative adversarial network (GAN) is introduced to improve the quality of the generated image, making it closer to the real image. Cycle consistency loss is also added to ensure that the image restored from the square block is consistent with the original image, avoiding information loss. This loss is used to train the model to accurately restore the original image from the encoded image.
[0077] A4: Training Process
[0078] First, the parameters of the encoder and decoder are initialized, and then a training loop is performed: the model parameters are optimized through multiple rounds of iterative training; each iteration includes forward propagation, loss calculation, backpropagation and parameter update; the model is trained using the training data, the reconstruction loss, adversarial loss and cycle consistency loss are calculated, and gradient descent optimization is performed.
[0079] A5: Inverse Transformation Strategy
[0080] First, record the position information: During the encoding process, record the original position and rotation angle of each rectangular block for use during decoding.
[0081] The restoration process includes: segmenting each rectangular block from the spliced rectangular image; restoring each rectangular block to its original position and rotation angle based on the recorded position information; and decoding the restored rectangular block using a decoder to restore the original microlens image.
[0082] The information retention strategies include: retaining detailed information through jump connections to ensure accurate restoration during the decoding process; and using high-order interpolation methods (such as bilinear interpolation and cubic interpolation) to fill uncovered areas to ensure image integrity.
[0083] This optimization scheme leverages a deep learning model to implement the truncation and splicing of dynamically sized and rotated rectangles, optimizing the block extraction and merging process in an end-to-end manner. During training, strategies such as symmetric design, skip connections, reconstruction loss, adversarial loss, and cycle consistency loss are used to ensure that the model retains sufficient information during encoding and decoding, thereby achieving high-quality image restoration.
[0084] The second optimization solution:
[0085] The simplified concept behind this optimization scheme is that the intercepted shape must be a non-rotatable, resizable rectangle. Specifically, edge detection and connected component analysis accurately identify information-rich regions within each sub-image. Since rotation is not permitted, determining the maximum bounding rectangle becomes more straightforward. Then, an adaptive rectangle stitching algorithm tightly stitches these rectangular regions together to form a minimized overall rectangle. This approach not only preserves the effective information within each sub-image but also significantly improves compression and transmission efficiency.
[0086] In one embodiment, the optimization scheme specifically includes the following steps:
[0087] B1: block fetch operation;
[0088] The block fetching operation specifically includes the following steps:
[0089] B11: Edge Detection:
[0090] Use edge detection algorithm (such as Canny edge detection) to detect the edge of each sub-image I i,j Detect edges in .
[0091] Purpose: Identify salient features in an image, such as the outline and boundaries of an object. These areas usually contain more effective information.
[0092] B12: Connected Component Analysis and Noise Removal:
[0093] Perform connected component analysis on the detected edges to identify connected edge regions. Remove smaller or isolated edge regions and treat them as noise and ignore them.
[0094] Purpose: Only retain larger, significant connected edge regions and exclude noise.
[0095] B13: Determine the maximum enclosing rectangle:
[0096] For each connected edge region, determine its maximum circumscribed rectangle B i,j .
[0097] Objective: Find the smallest rectangular area that can contain the connected edge area. Since rotation is not allowed, the sides of the circumscribed rectangle must be parallel to the image boundary.
[0098] B14: Select the capture area:
[0099] Determine the intercepted area B of each sub-image based on the maximum circumscribed rectangle of the connected edges i,j .
[0100] Purpose: Finalize the rectangular area B i,j It should be information-rich and as large as possible to retain more valid information.
[0101] B2: Splicing Operation
[0102] In some embodiments, the stitching operation is directly converted into a two-dimensional adaptive rectangle stitching problem, which specifically includes the following steps:
[0103] B21: Rectangle Adaptive Rectangle Stitching Problem Definition:
[0104] All the determined rectangular areas B i,j As input, stitch it into a minimum rectangular area.
[0105] Purpose: To arrange multiple rectangular areas of different sizes closely together to minimize the overall rectangular area.
[0106] B22: Select the adaptive rectangle stitching algorithm:
[0107] Select a suitable adaptive rectangular stitching algorithm to solve the stitching problem. Specifically, the adaptive rectangular stitching algorithm can adopt any of the following:
[0108] (1) First Fit Decreasing Algorithm (FFD)
[0109] The steps of the adaptive rectangle stitching algorithm include:
[0110] a. Sort all rectangles in descending order by area or side length: Sort the rectangles by area or side length from large to small, so that large rectangles can be placed first and the fragmented space can be reduced.
[0111] b. Place each rectangle in the first available position: Process each rectangle in turn and place it in the first available position. The "first available position" here refers to the first available free space that can accommodate the current rectangle, from left to right and from bottom to top.
[0112] In a specific embodiment, suppose there are three rectangles, A (6x4), B (5x3), and C (2x2). Sorted by area, they are A, B, and C. When placing rectangles, place them sequentially. Place A first: Since it's the first rectangle, place it in the lower-left corner. Place B next: Find the first free space that can accommodate B, typically to the right or above A. Finally, place C: Find the first free space that can accommodate C.
[0113] (2) Best Fit Algorithm (BF)
[0114] The steps of the adaptive rectangle stitching algorithm include:
[0115] Place each rectangle in the smallest space that can currently accommodate it: Process each rectangle in order and place it in the best space that can currently accommodate it. The "best space" here means choosing a location that best fits the current rectangle among all the available spaces, so that the space wasted after placement is minimized.
[0116] In a specific embodiment, suppose there are three rectangles, A (6x4), B (5x3), and C (2x2), placed in order. Place A first: Since it's the first rectangle, place it in the lower-left corner. Then place B: Choose the most suitable location for B among all available spaces, minimizing wasted space after placement. For example, to the right or above A. Finally, place C: Choose the most suitable location for C among all available spaces, minimizing wasted space after placement.
[0117] (3) Guillotine Packing Algorithm (GPA)
[0118] The steps of the adaptive rectangle stitching algorithm include:
[0119] Recursively divide the space into smaller rectangular regions: for each rectangle, choose a rectangular region that can accommodate it, split the region into two subregions (usually horizontally or vertically), and then recursively process these subregions. Each time you split, choose the split that minimizes the remaining space.
[0120] In a specific embodiment, assume there are three rectangles A (6x4), B (5x3), and C (2x2). To place A first: place it in the lower left corner. Then, split the remaining space: divide the remaining space into two sub-regions, one to the right of A and one above it. To place B: select an area in the two sub-regions that can accommodate B and split that area again. And split the space again: divide the selected sub-region into two smaller sub-regions. Finally, place C: select an area in the remaining sub-regions that can accommodate C.
[0121] In the Guillotine Packing Algorithm, each time a rectangle is placed, the remaining space is split into two smaller subregions. These subregions can be used again to place new rectangles, thus recursively processing the space. The goal when choosing the splitting method is to minimize wasted space and ensure that the remaining space is as compact as possible.
[0122] (4) Genetic Algorithm
[0123] The steps of the adaptive rectangle stitching algorithm include:
[0124] a. Initialize the population: Create an initial population, where each individual represents a possible rectangular arrangement scheme.
[0125] b. Evaluate fitness: Calculate the fitness of each individual. Usually the fitness function is related to the objective function, such as the total area after rectangular arrangement, wasted space, etc.
[0126] c. Selection: Individuals are selected for reproduction based on their fitness, and individuals with high fitness are more likely to be selected.
[0127] d. Crossover: Generate new individuals through crossover operation. The crossover method can be two-point crossover or single-point crossover.
[0128] e. Mutation: Perform mutation operations on individuals to introduce new genes and avoid falling into local optimal solutions.
[0129] f. Replacement: Use newly generated individuals to replace some individuals in the population to form a new generation of population.
[0130] g. Iteration: Repeat steps bf until the stopping condition (such as number of iterations, fitness threshold, etc.) is reached.
[0131] B23: Perform adaptive rectangular stitching:
[0132] Use the selected adaptive rectangle stitching algorithm to stitch each rectangular area B i,j Place them in the designated locations, ensuring there is no overlap and minimizing the overall area.
[0133] Purpose: To compactly arrange all rectangular areas and reduce invalid space.
[0134] B24: Filling the gaps:
[0135] If there are gaps during the splicing process, fill them with black or white (you can choose according to specific needs).
[0136] Purpose: To ensure that the final stitched image is a complete rectangle to facilitate subsequent encoding processing.
[0137] In a specific embodiment, the optimization scheme includes the following steps:
[0138] 1. Edge Detection and Connected Component Analysis: Perform edge detection on each sub-image to find significant edges. Perform connected component analysis to identify connected regions and remove noise. Determine the maximum bounding rectangle of the connected regions.
[0139] 2. Adaptive Rectangular Stitching: Arrange all bounding rectangles in descending order by area or side length. Use the First Fit Decreasing algorithm to pack the rectangular regions tightly together. Ultimately, a rectangular region with the smallest area is formed, encompassing all captured sub-images.
[0140] 3. Result stitching and filling: If there are gaps in the stitched rectangular area, fill them with black or white. This ensures that the final stitched image is a complete rectangle for subsequent encoding.
[0141] In another embodiment, the splicing strategy is further optimized. In the splicing strategy, blocks with similar content are placed together to improve the efficiency of subsequent general image coding. In this embodiment, the splicing step specifically includes the following steps:
[0142] B21': Content similarity measurement:
[0143] Use image similarity metrics (such as SSIM, PSNR, or eigenvectors) to evaluate the similarity between patches. Calculate the similarity score between each pair of patches and generate a similarity matrix.
[0144] B22': Cluster analysis:
[0145] Use a clustering algorithm (such as K-means or hierarchical clustering) to cluster the similarity matrix and group blocks with similar content into the same category.
[0146] Purpose: To group blocks with similar content together to reduce redundant information for subsequent encoding.
[0147] B23': Block sorting:
[0148] Based on the clustering results, the blocks are sorted to ensure that blocks with similar content are adjacent when splicing.
[0149] B24': Rectangle Adaptive Rectangle Stitching Problem Definition:
[0150] All sorted rectangular areas B i,j As input, stitch it into a minimum rectangular area.
[0151] Purpose: To arrange multiple rectangular areas of different sizes closely together to minimize the overall rectangular area.
[0152] B25': Select the adaptive rectangle stitching algorithm:
[0153] Select a suitable adaptive rectangle stitching algorithm to solve the stitching problem. Specifically, the adaptive rectangle stitching algorithm can be any of the following: (1) First Fit Decreasing (FFD) Algorithm; (2) Best Fit Algorithm; (3) Guillotine Packing Algorithm; (4) Genetic Algorithm. The specific steps of these adaptive rectangle stitching algorithms are the same as those in step B22 above and will not be repeated here.
[0154] B26': Perform adaptive rectangular stitching:
[0155] Use the selected adaptive rectangle stitching algorithm to stitch each rectangular area B i,j Place them in the designated locations, ensuring there is no overlap and minimizing the overall area.
[0156] Purpose: To compactly arrange all rectangular areas and reduce invalid space.
[0157] B27': Filling the gap:
[0158] If there are gaps during the splicing process, fill them with black or white (you can choose according to specific needs).
[0159] Purpose: To ensure that the final stitched image is a complete rectangle to facilitate subsequent encoding processing.
[0160] The third optimization solution:
[0161] The simplified idea of this optimization solution is to intercept the shape into a dynamic rectangle with the center at the center of the circle. This optimization solution specifically includes the following steps:
[0162] D1: Block fetch operation
[0163] The block fetching operation specifically includes the following steps:
[0164] D11: Edge Detection:
[0165] Use edge detection algorithm (such as Canny edge detection) to detect the edge of each sub-image I i,j Detect edges in .
[0166] Purpose: Identify salient features in an image, such as the outline and boundaries of an object. These areas usually contain more effective information.
[0167] D12: Connected Component Analysis and Noise Removal:
[0168] Connected component analysis is performed on the detected edges to identify connected edge regions.
[0169] Remove smaller or isolated edge regions, treat them as noise and ignore them.
[0170] Purpose: Only retain larger, significant connected edge regions and exclude noise.
[0171] D13: Determine the maximum enclosing rectangle:
[0172] For each connected edge region, determine the largest circumscribed rectangle B whose center is at the center of the circle i,j .
[0173] Purpose: To find the smallest rectangular area that can contain the connected edge area, with the center at the center of the microlens image, to ensure effective preservation of information.
[0174] D14: Select the interception area:
[0175] Determine the intercepted area B of each sub-image based on the maximum circumscribed rectangle of the connected edges i,j .
[0176] Purpose: Finalize the rectangular area B i,j It should be information-rich and as large as possible to retain more valid information.
[0177] D2: Splicing operation
[0178] The purpose of the stitching operation is to stitch the captured areas into a rectangular image, allowing for gaps that can be filled with black or white. The goal of stitching is to minimize the area of the rectangular image, thereby reducing the bit rate during encoding. The stitching operation specifically includes the following steps:
[0179] D21: Rectangle Adaptive Rectangle Stitching Problem Definition:
[0180] All the determined rectangular areas B i,j As input, stitch it into a minimum rectangular area.
[0181] Purpose: To arrange multiple rectangular areas of different sizes closely together to minimize the overall rectangular area.
[0182] D22: Select the adaptive rectangle stitching algorithm:
[0183] Select a suitable adaptive rectangle stitching algorithm to solve the stitching problem. Specifically, the adaptive rectangle stitching algorithm can be any of the following: (1) First Fit Decreasing (FFD) Algorithm; (2) Best Fit Algorithm; (3) Guillotine Packing Algorithm; (4) Genetic Algorithm. The specific steps of these adaptive rectangle stitching algorithms are the same as those in step B22 above and will not be repeated here.
[0184] D23: Perform adaptive rectangular stitching:
[0185] Use the selected adaptive rectangle stitching algorithm to stitch each rectangular area B i,j Place them in the designated locations, ensuring there is no overlap and minimizing the overall area.
[0186] Purpose: To compactly arrange all rectangular areas and reduce invalid space.
[0187] D24: Filling the gaps:
[0188] If there are gaps during the splicing process, fill them with black or white (you can choose according to specific needs).
[0189] Purpose: To ensure that the final stitched image is a complete rectangle to facilitate subsequent encoding processing.
[0190] The fourth optimization solution:
[0191] The simplified idea of this optimization solution is that the intercepted shape must be a non-rotatable rectangle of constant size. This optimization solution specifically includes the following steps:
[0192] E1: Block fetch operation
[0193] The block fetching operation specifically includes the following steps:
[0194] E11: Edge detection: Use edge detection algorithms (such as Canny edge detection) to detect the edges of each sub-image I i,j Detect edges and identify salient features in images, such as the outlines and boundaries of objects.
[0195] E12: Connected Component Analysis and Noise Removal: Perform connected component analysis on the detected edges to identify connected edge regions and remove smaller or isolated edge regions, treating them as noise and ignoring them.
[0196] E13: Determine the maximum enclosing rectangle: For each connected edge region, determine its maximum enclosing rectangle B i,j , find the smallest rectangular area that can contain the connected edge area.
[0197] E14: Select a fixed capture rectangle: In all sub-images I i,j In the example, the size of the largest bounding rectangle is selected as the fixed clipping rectangle, and the clipping rectangle size W×H of all sub-images is unified.
[0198] E2: Splicing operation:
[0199] Use a fixed interception rectangle to stitch the maximum bounding rectangles of all sub-images. i,j , cropping is performed according to a fixed interception rectangle size W×H, and the sub-images are spliced according to their positions in the original image to form a new complete image.
[0200] The fifth optimization solution:
[0201] The simplified idea of this optimization solution is that the intercepted shape is an inscribed square. The optimization solution specifically includes the following steps:
[0202] F1: Block operation: for each sub-image I i,j , calculate its inscribed square as the intercepted area B i,j ;
[0203] F2: stitching operation: for each sub-image I i,j , cropping is performed according to a fixed interception square size W×W, and the sub-images are spliced according to their positions in the original image to form a new complete image.
[0204] S2: General Video Coding
[0205] The purpose of this step is to encode the preprocessed rectangular image using existing efficient image / video encoding algorithms to achieve efficient compression. The specific steps are as follows: Encode the rectangular image using a standard image / video encoding algorithm (such as H.264 or H.265). The encoding algorithm converts the image into a compressed data stream for easy transmission and storage.
[0206] Step S1 and step S2 have completed the compression of the light field image, and at this point, efficient compression of the light field image has been achieved.
[0207] S3: Transfer
[0208] The purpose of this step is to transmit the encoded data stream to the receiving end via a network or other transmission medium. The specific operation steps are as follows: The encoded data stream can be transmitted via a transmission medium such as a wired or wireless network, optical fiber, or cable. Data integrity and reliability must be guaranteed during the transmission process.
[0209] S4: Universal Video Decoding
[0210] The purpose of this step is to decode the transmitted compressed data stream at the receiving end and restore the original rectangular image. The specific operation steps are: use the same decoding algorithm (such as H.264, H.265) as when encoding to decode the compressed data stream and restore the spliced rectangular image.
[0211] S5: MCA inverse transform processing
[0212] The purpose of this step is to restore the decoded rectangular image to the original light field image (lenslet) for subsequent application and processing.
[0213] Specifically, the MCA inverse transform process includes the following steps:
[0214] S51: Reverse stitching: Split the decoded rectangular image into original clipped areas again, and put these clipped areas back to their original positions according to the recorded stitching order and positions.
[0215] S52: Restoration block: Through this inverse transformation process, the complete light field image (lenslet) is finally restored.
[0216] Through the above steps, the solution of this embodiment can effectively overcome the shortcomings of the existing technology in light field image compression and transmission, improve compression efficiency, reduce data transmission bandwidth and storage space, and is suitable for multiple fields such as virtual reality, computational photography, and 3D reconstruction, and has broad application prospects.
[0217] In a further embodiment, corresponding to the five optimization schemes in step S1, this step adopts the following five corresponding optimization schemes to perform MCA inverse transformation processing.
[0218] The first optimization solution:
[0219] When step S1 adopts the first optimization scheme, that is, the intercepted shape must be a rectangle that can be rotated, this step can directly use the deep learning decoder during encoding in step S1 to perform MCA inverse transform processing.
[0220] The second optimization solution:
[0221] When step S1 adopts the second optimization scheme, the intercepted shape must be a non-rotatable and resizable rectangle. During MCA preprocessing, edge detection and connected component analysis are used to determine the maximum bounding rectangle of each sub-image, and these rectangles are tightly stitched together using an adaptive rectangle stitching algorithm. Now, it is necessary to restore these stitched rectangular blocks to the original light field image (lenslet). Since the position of the blocks has changed during the stitching process, it is necessary to record the block position information and use this information in the inverse transformation to restore the original image.
[0222] The second optimization solution adopted in this step specifically includes the following steps:
[0223] G1: record block location information
[0224] During the splicing process of MCA preprocessing, the original position of each rectangular block and its position in the spliced rectangular area are recorded.
[0225] The specific operation is: during the stitching process, save the original sub-image index (i, j) of each rectangular block and its position information in the stitched image (such as the coordinates of the upper left corner).
[0226] G2: Segmentation of the spliced rectangular image
[0227] The spliced rectangular image is divided according to the recorded rectangular size and position to obtain rectangular blocks of constant size.
[0228] The specific operation is: using the recorded rectangle size and position, the original rectangle blocks are segmented one by one from the spliced rectangle image.
[0229] G3: Restore the rectangle to its original position
[0230] According to the recorded original sub-image position, each rectangular block is restored to the corresponding position in the original microlens image matrix.
[0231] The specific operation is: according to the recorded original sub-image index (i, j) and position information, each rectangular block is placed back to the original sub-image I i,j middle.
[0232] G4: Fill the remaining part of the original sub-image
[0233] In each sub-image I i,j In the example, restore the rectangular block to the maximum enclosing rectangle B i,j Then the uncovered areas are filled to restore the original sub-image.
[0234] The specific operations of step G4 include:
[0235] G41: Place each rectangular block back to the position of its corresponding maximum enclosing rectangle.
[0236] G42: For the maximum enclosing rectangle B i,j The area not covered by the rectangular block in the image can be filled with at least one of the following filling schemes:
[0237] (1) Boundary copy filling:
[0238] For uncovered areas, first copy the boundary pixel values of adjacent rectangular blocks and fill them into the uncovered areas. This method is simple and can maintain boundary consistency.
[0239] (2) Bilinear interpolation filling:
[0240] Using bilinear interpolation, the uncovered areas are interpolated and filled based on the pixel values of adjacent rectangular blocks. Bilinear interpolation can smoothly transition the pixel values of uncovered areas and reduce visual discontinuity.
[0241] (3) High-order interpolation filling:
[0242] If higher quality image restoration is required, a higher-order interpolation method (such as cubic interpolation) can be used to fill in the uncovered areas. This method can better restore details, but the computational complexity is higher.
[0243] G5: Stitched restored sub-images
[0244] According to the recorded position information, all restored sub-images I i,j Stitching back to the original microlens image matrix ensures that the restored image matrix is consistent with the original microlens image matrix.
[0245] The specific operation is: all restored sub-images are spliced according to the positions of the original microlens image matrix to form a complete restored image.
[0246] Through the above steps, the preprocessed image can be effectively restored to the original light field image (lenslet), ensuring that each sub-image area is restored by a rectangular block of varying sizes, and the integrity of the original sub-image is restored by filling the uncovered area.
[0247] The third optimization solution:
[0248] When step S1 adopts the third optimization scheme, that is, the intercepted shape is a dynamic rectangle with its center at the center of the circle, if it is necessary to restore the square block image formed by the MCA preprocessing to the original microlens image matrix, the following steps are specifically included:
[0249] H1: Record location information:
[0250] During the splicing process of MCA preprocessing, the original position of each rectangular block and its position in the spliced rectangular area are recorded.
[0251] H2: Segmented and stitched rectangular image:
[0252] The spliced rectangular image is segmented according to the recorded rectangular size and position to obtain rectangular blocks of dynamic size.
[0253] H3: Restore the rectangle to its original position:
[0254] According to the recorded original sub-image position, each rectangular block is restored to the corresponding position in the original microlens image matrix.
[0255] H4: Fill the remaining part of the original sub-image:
[0256] In each sub-image I i,j In the example, restore the rectangular block to the maximum circumscribed rectangle B with its center at the center of the circle i,j Then the uncovered areas are filled to restore the original sub-image.
[0257] In step H4, filling the uncovered area may adopt at least one of the following solutions:
[0258] (1) Boundary copy filling:
[0259] For uncovered areas, first copy the boundary pixel values of adjacent rectangular blocks and fill them into the uncovered areas. This method is simple and can maintain boundary consistency.
[0260] (2) Bilinear interpolation filling:
[0261] Using bilinear interpolation, the uncovered areas are interpolated and filled based on the pixel values of adjacent rectangular blocks. Bilinear interpolation can smoothly transition the pixel values of uncovered areas and reduce visual discontinuity.
[0262] (3) High-order interpolation filling:
[0263] If higher quality image restoration is required, a higher-order interpolation method (such as cubic interpolation) can be used to fill in the uncovered areas. This method can better restore details, but the computational complexity is higher.
[0264] H5: stitched and restored sub-images
[0265] According to the recorded position information, all restored sub-images I i,j Stitching back to the original microlens image matrix. The specific steps are as follows:
[0266] Initialize the original image matrix: Create a blank matrix of the same size as the original microlens image matrix to place the restored sub-image.
[0267] Place the restored sub-images: Place each restored sub-image I according to the position information recorded in step H1. i,j Place it in the corresponding position in the original image matrix. Make sure each sub-image is placed at the correct index position I i,j .
[0268] Processing edges and overlapping areas: If there are overlapping areas or misaligned edges, use interpolation or boundary replication to ensure image continuity and integrity.
[0269] The fourth optimization solution:
[0270] When step S1 adopts the fourth optimization scheme, the intercepted shape is a non-rotatable rectangle of constant size. This step also adopts the fourth optimization scheme, which specifically includes the following steps:
[0271] I1: Segmented and stitched rectangular image
[0272] The spliced rectangular image is divided into fixed rectangular blocks of size W×H to obtain fixed-size rectangular blocks.
[0273] The specific operation is: using a fixed-size rectangle of size W×H, segmenting the spliced rectangular image into fixed-size rectangular blocks one by one.
[0274] I2: Restore the rectangular block to its original position
[0275] According to the recorded original sub-image position, each fixed-size rectangular block is restored to the corresponding position in the original microlens image matrix.
[0276] The specific operation is: according to the position of each fixed-size rectangular block recorded in the preprocessing stage, put it back to the original sub-image I i,j middle.
[0277] I3: Fill the remaining part of the original sub-image
[0278] In each sub-image I i,j In the example, the fixed-size rectangular block is restored to the maximum enclosing rectangle B. i,j , and then fill in the remainder (if any) to restore the original sub-image.
[0279] The specific operations of step I3 include:
[0280] I31: Place each fixed-size rectangular block back to its corresponding maximum enclosing rectangle position.
[0281] I32: For the maximum enclosing rectangle B i,j The area not covered by the fixed-size rectangular block in the image is filled using interpolation or other methods to restore the original sub-image. For example, any of the following filling schemes can be used to fill the area not covered by the fixed-size rectangular block:
[0282] (1) Boundary copy filling:
[0283] For uncovered areas (e.g., the right and bottom sides of the bounding rectangle), copy and fill the pixel values at the boundary. For the uncovered right area, copy and fill the pixel values at the right boundary of the fixed rectangular block. For the uncovered bottom area, copy and fill the pixel values at the bottom boundary of the fixed rectangular block.
[0284] (2) Bilinear interpolation filling:
[0285] Perform bilinear interpolation on uncovered areas to smoothly fill in the pixel values of uncovered areas. Calculate the weighted average of neighboring pixels and fill in the uncovered areas.
[0286] (3) High-order interpolation filling:
[0287] If higher quality restoration is required, the cubic interpolation method is used to calculate the pixel values of the uncovered areas to ensure smooth transitions and detail restoration.
[0288] I4: stitched restored sub-image
[0289] All restored sub-images I i,j Stitching back to the original microlens image matrix ensures that the restored image matrix is consistent with the original microlens image matrix.
[0290] The specific operation is: all restored sub-images are spliced according to the positions of the original microlens image matrix to form a complete restored image.
[0291] Through these steps, the preprocessed image can be effectively restored to the original light field image (lenslet), ensuring that each sub-image area is restored by a fixed-size rectangular block and the integrity of the original sub-image is restored by filling the remaining part.
[0292] The fifth optimization solution:
[0293] When the fifth optimization scheme is adopted in step S1, the intercepted shape is an inscribed square. This step also corresponds to the fifth optimization scheme, which specifically includes the following steps:
[0294] J1: Segmented and stitched rectangular image
[0295] The spliced rectangular image is divided into fixed squares of size W×W to obtain inscribed square blocks.
[0296] The specific operation is: use a fixed square size W×W to segment the inscribed square blocks from the spliced rectangular image block by block.
[0297] J2: Expand the square block into a circular area
[0298] Expand each inscribed square block to its circumscribed circular area.
[0299] The specific operations of step J2 include:
[0300] J21: Calculate the center of the inscribed square and the radius of the circumscribed circle.
[0301] J22: Fill the arc area of the square circumcircle with the pixel value of the nearest boundary, that is, fill the arc part of the circumcircle by copying the pixel value of the square boundary.
[0302] J3: Restore to a circular area
[0303] Expand the inscribed square block into its circumscribed circle to ensure the integrity of the circular area.
[0304] The specific operation is: for each inscribed square block, fill the arc area of the circumscribed circle according to its center and radius.
[0305] J4: stitched and restored sub-images
[0306] All restored sub-images I i,j The original microlens image matrix is stitched back according to the original position to ensure that the restored image matrix is consistent with the original microlens image matrix.
[0307] The specific operation is: all restored sub-images are spliced according to the positions of the original microlens image matrix to form a complete restored image.
[0308] Steps S1 to S5 complete the complete steps of compression, transmission, and decompression of light field images, reducing data transmission bandwidth and storage space. The process is applicable to multiple fields such as virtual reality, computational photography, and 3D reconstruction, and has broad application prospects.
[0309] As shown in Figures 2a to 2f, steps S1 and S5 of the present invention correspond to example demonstrations on a portion of the light field image when the fifth optimization scheme is adopted, wherein Figure 2a is the pixel division in the original light field image, Figure 2b is the aligned block after MCA processing, and Figure 2c is the block after MCA inverse processing, in which the gray area is the filling pixel. Figures 2d, 2e, and 2f correspond to the actual images of steps 2a, 2b, and 2c in the chess sequence, respectively.
[0310] The specific embodiment of the present invention tested the corresponding results for steps S1 and S5, which correspond to the fifth optimization scheme. In scheme 1 of this specific embodiment, steps S2 and S4 use the All Intra coding mode, where All Intra is fully intra-frame, meaning that information from previous and subsequent frames in the time domain is not used, and only information within the current frame is used for coding. Therefore, All Intra can only evaluate the method's effectiveness in eliminating spatial redundancy. In scheme 2 of this specific embodiment, steps S2 and S4 use the Random Access coding mode, where Random Access uses both intra-frame and inter-frame encoding, which can reduce temporal redundancy and is used to evaluate the method's effectiveness in eliminating temporal redundancy. Table 1 below shows the BD-rate ( Delta rate, Björtgaard delta rate), the smaller the BD-rate value, the better the performance.
[0311] Table 1 BD-rates obtained after two processing schemes for different sequence names
[0312] In the technical field of the present invention, it is already excellent for an encoding tool to provide a BD-rate improvement of more than -5%. However, the above-mentioned solutions 1 and 2 in the embodiments of the present invention can both provide an average BD-rate improvement of more than 25%, which is a very significant effect.
[0313] In addition, the following describes the fifth optimization scheme used to apply step S1 and step S5 of the present invention to the compression of actual images. In this specific scheme, MCA (VVC encoding QP = 37 center views) is used. QP is the quantization step size. The smaller the QP, the better the quality, but the corresponding encoding time becomes longer and the amount of data after encoding increases. Figure 3a shows the result without using MCA (VVC encoding QP = 37 center views), and Figure 3b shows the result with MCA as above. By comparing Figures 3a and 3b, it can be seen that whether or not to use MCA has almost no effect on the quality of multi-view rendering, but can significantly reduce the bit rate by about 40%.
[0314] The preferred embodiment of the present invention introduces a multi-step pre-processing and post-processing process for light field images, which specifically includes the following aspects:
[0315] (1) MCA preprocessing (cropping and stitching): This paper proposes a region cropping and stitching method based on information richness. By analyzing the microlens image (MI) captured by each microlens, the region with the highest information richness is selected for cropping, and these cropped regions are stitched into a rectangular image. Compared with the existing technology, this method can effectively reduce the redundant information in the light field image and improve the compression efficiency. Since the stitched image is square, it is suitable for processing by existing two-dimensional image compression algorithms, and therefore can be further compressed using existing efficient compression technology.
[0316] (2) Universal Video Coding: After preprocessing, the spliced rectangular images are encoded using existing high-efficiency video coding algorithms (such as H.264 and H.265). Existing high-efficiency video coding technologies have high compression efficiency but are only applicable to traditional two-dimensional images. Through the preprocessing steps of the present invention, the light field images are converted into a format suitable for processing by these algorithms, thereby achieving efficient compression.
[0317] (3) Inverse MCA transformation (reverse stitching): At the receiving end, the decoded rectangular image is restored to the original microlens image matrix by recording the stitching order and position. This process ensures efficient compression without losing the effective information in the original light field image, thus ensuring the quality of the decoded image.
[0318] (4) End-to-end optimization: The first optimization solution of this invention uses an end-to-end optimization approach, further improving compression efficiency by jointly optimizing the truncation and splicing processes. Compared with traditional step-by-step optimization methods, end-to-end optimization can better balance the relationships between the various steps and maximize overall performance.
[0319] Through these innovations, the present invention effectively overcomes the shortcomings of existing technologies in light field image compression and transmission, improves compression efficiency, reduces data transmission bandwidth and storage space, and is suitable for multiple fields such as virtual reality, computational photography, and 3D reconstruction, with broad application prospects.
[0320] Another preferred embodiment of the present invention discloses a storage medium storing a computer program, wherein the computer program is configured to be executed by a processor to perform the steps of the light field image compression method in the above preferred embodiment.
[0321] Optionally, the storage medium may include but is not limited to various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.
[0322] The background section of the present invention may contain background information about the problem or environment of the present invention rather than describing prior art by others. Therefore, the inclusion of content in the background section is not an admission by the applicant that the prior art is available.
[0323] The above description further details the present invention in conjunction with specific / preferred embodiments, and the specific implementation of the present invention should not be construed as being limited to these descriptions. Persons skilled in the art will appreciate that, without departing from the spirit of the present invention, they may make various substitutions or modifications to the described embodiments, and these substitutions or modifications should be considered to fall within the scope of protection of the present invention. Throughout this specification, reference to terms such as "one embodiment," "some embodiments," "preferred embodiments," "examples," "specific examples," or "some examples" indicates that the specific features, structures, materials, or characteristics described in conjunction with such embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of these terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, those skilled in the art may combine and assemble the different embodiments or examples described in this specification, as well as features from different embodiments or examples, without conflicting opinions. Although the embodiments of the present invention and their advantages have been described in detail, it should be understood that various changes, substitutions, and modifications may be made herein without departing from the scope of the appended claims.
Claims
1. A light field image compression method, It is characterized in that The following steps are involved: S1: Acquire a light field image, and preprocess the light field image, wherein the light field image includes a plurality of microlens images arranged in an array, and the preprocessing includes: taking blocks from each of the microlens images, and splicing the microlens images after taking blocks to generate a rectangular image; S2: Encode the rectangular image in step S1 using an image / video encoding algorithm to generate a compressed light field image.
2. The method for compressing a field image according to claim 1, It is characterized in that The optimization problem of the preprocessing is to minimize the bit rate, and the constraints include: the sum of the errors between the restored microlens image matrix and the original microlens image matrix does not exceed a first preset value, wherein the restored microlens image matrix refers to the microlens image matrix obtained after splicing and then inverse transformation, and the original microlens image matrix refers to the microlens image matrix in the acquired light field image.
3. The light field image compression method according to claim 1, It is characterized in that The optimization problem of extracting blocks for each of the microlens images in step S1 is: maximizing the unique information amount of the intercepted area selected from each microlens image in the step of extracting blocks, and minimizing the redundant information amount of the intercepted area; The optimization problem of stitching the blocked microlens images is to minimize the area of the stitched rectangular images, with the constraint that the stitched rectangular images are the enclosing rectangles of all the intercepted areas.
4. The light field image compression method according to claim 1, It is characterized in that In step S1, a deep learning model is specifically used to perform end-to-end preprocessing on the light field image, and the shape intercepted in the block extraction step is a rectangle and can be rotated, wherein the deep learning model includes an encoder and a decoder, wherein the encoder is used to identify significant features in the image and dynamically adjust the size and rotation angle of the rectangle to convert each microlens image into a square block suitable for splicing and perform splicing, and the decoder is used to restore the shape and position of each square block to restore the spliced square blocks to the original light field image, wherein the encoder and the decoder are symmetrically designed, and a jump connection is provided between the encoder and the decoder, and the loss functions used in the training process include reconstruction loss, adversarial loss and cycle consistency loss.
5. The light field image compression method according to claim 1, It is characterized in that The shape intercepted in the block extraction step in step S1 is a non-rotatable and resizeable rectangle, wherein: The block extraction step specifically includes: using an edge detection algorithm to detect edges in each microlens image; performing connected component analysis on the detected edges to identify connected edge regions; determining the maximum circumscribed rectangle of each connected edge region; and determining the intercepted rectangular region of each microlens image according to the maximum circumscribed rectangle of the connected edge region. The splicing step specifically includes the following steps a or b: a. All determined rectangular areas are taken as input and stitched into a minimum rectangular area; an adaptive rectangular stitching algorithm is used to place each rectangular area at a preset position for stitching, ensuring that there is no overlap and minimizing the overall area; if there are gaps during the stitching process, the gaps are filled with a preset color; b. Use image similarity metrics to evaluate the similarity between blocks, calculate the similarity scores between each pair of blocks, and generate a similarity matrix, where a block refers to the rectangular area intercepted in the block extraction step; use a clustering algorithm to cluster the similarity matrix, and classify blocks with similar contents into the same category; sort the blocks according to the clustering results to ensure that blocks with similar contents are adjacent when spliced; use all sorted rectangular areas as input and splice them into a minimum rectangular area; use an adaptive rectangular splicing algorithm to place each rectangular area at a preset position for splicing, ensure that there is no overlap and minimize the overall area; if there are gaps during the splicing process, fill the gaps with a preset color.
6. The light field image compression method according to claim 1, It is characterized in that The shape intercepted in the block extraction step in step S1 is a dynamic rectangle with its center at the center of the circle, wherein: The block extraction step specifically includes: using an edge detection algorithm to detect edges in each microlens image; performing connected component analysis on the detected edges to identify connected edge regions; determining a maximum circumscribed rectangle with the center of each connected edge region at the center of a circle; and determining a rectangular region intercepted by each microlens image according to the maximum circumscribed rectangle of the connected edge region. The stitching step specifically includes: taking all determined rectangular areas as input and stitching them into a minimum rectangular area; using an adaptive rectangular stitching algorithm to place each rectangular area at a preset position for stitching, ensuring that there is no overlap and minimizing the overall area; if there are gaps during the stitching process, filling the gaps with a preset color.
7. The light field image compression method according to claim 1, It is characterized in that The shape intercepted in the block extraction step in step S1 is a non-rotatable and resizable rectangle, wherein: The block extraction step specifically includes: using an edge detection algorithm to detect edges in each microlens image; performing connected component analysis on the detected edges to identify connected edge regions; determining the maximum circumscribed rectangle of each connected edge region and finding the minimum rectangular region that can contain the connected edge region; selecting the size of the maximum circumscribed rectangle in all microlens images as a fixed intercepted rectangular region to unify the intercepted rectangular size of all microlens images; The stitching step specifically includes: using a fixed intercepted rectangular area to stitch the maximum circumscribed rectangles of all microlens images; wherein each microlens image is cropped according to a uniform intercepted rectangle size, and stitched according to the position of each microlens image in the light field image.
8. The light field image compression method according to claim 1, It is characterized in that The shape intercepted in the block extraction step in step S1 is an inscribed square, wherein: The block extraction step specifically includes: intercepting an inscribed square from each microlens image; The stitching step specifically includes: cutting each microlens image according to a fixed intercepted square size, and stitching according to the position of each microlens image in the light field image.
9. The light field image compression method according to claim 1, It is characterized in that Also includes: S3: Transmit the compressed light field image to the receiving end; S4: Decompressing the compressed light field image using a decoding algorithm corresponding to the image / video encoding algorithm in step S2 to restore the spliced rectangular image; S5: Performing an inverse transformation on the rectangular image in step S4 to restore the light field image.
10. The light field image compression method according to claim 9, It is characterized in that Step S5 specifically includes: re-splitting the rectangular image in step S4 into a plurality of clipped areas pre-processed in step S1, and placing the clipped areas back to their original positions according to the splicing order and positions in step S1 to restore the light field image.
11. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, wherein the computer program is configured to be executable by a processor to execute the light field image compression method according to any one of claims 1 to 10.
Citation Information
Cited By
Redundancy characteristic compression method based on physical characteristics of light field
CN122530334A
