Image compression method for realizing panoramic image
By extracting the features of the panoramic image and estimating the homography matrix using the RANSAC algorithm for perspective transformation and image stitching, combined with the optimized intra prediction method, the problems of low compression efficiency and poor visual quality of the panoramic image are solved, achieving more efficient compression and better visual effects.
Patent Information
- Application Number
- CN202411700377.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-04-15
AI Technical Summary
The existing panoramic image compression method is inefficient and difficult to maintain good visual quality when processing panoramic images, especially intra prediction efficiency due to distortion of reference pixels.
By detecting and extracting the feature vectors and key points of the panoramic image, RANSAC algorithm is used to estimate the homography matrix, perspective transformation and image stitching are performed, and the optimized intra prediction method is adopted to establish a mapping table based on the target projection format and the initial projection coordinate system, modify the information in the intra prediction process, and process the original image information.
It achieves higher panoramic image compression effect and good visual quality, while improving coding efficiency and better restoring and displaying image information.
Smart Images

Figure CN119835430A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of panoramic image processing, and in particular to an image compression method for realizing panoramic images. Background Art
[0002] In the field of modern digital image processing, panoramic images have become an increasingly popular application. However, due to the large amount of panoramic image data, the transmission and storage costs are very high. Therefore, it is very important to develop an efficient panoramic image compression method. In terms of background technology, there are many panoramic image compression technologies. Among them, traditional compression methods such as JPEG and PNG are widely used, but due to the failure to fully utilize the special properties of panoramic images, it is impossible to achieve a high compression ratio and maintain good visual quality.
[0003] With the rapid development of artificial intelligence technology, panoramic image compression methods based on machine learning have gradually attracted the attention of researchers. These methods further optimize the compression algorithm by extracting and learning features of panoramic images, achieving higher compression ratios and maintaining good visual quality.
[0004] The current common image compression method can achieve good results for natural images, but the use of traditional compression methods for panoramic image compression may lead to low efficiency. Therefore, it is necessary to improve the compression performance of panoramic images by changing the compression method.
[0005] The invention patent application with application number CN 115361536A discloses a panoramic image compression method, device, intelligent device and storage medium, wherein the method includes: obtaining a panoramic image to be compressed; semantically segmenting the panoramic image to be compressed and obtaining a semantically segmented image, wherein the semantically segmented image includes foreground pixels corresponding to the foreground object; obtaining a target projection format and a corresponding initial projection coordinate system, based on the target projection format, the initial projection coordinate system and the semantically segmented image, performing at least one calculation with the projection gain as the goal through a pre-set reinforcement learning algorithm and obtaining a target multi-degree-of-freedom rotation angle set; rotating the initial projection coordinate system according to the target multi-degree-of-freedom rotation angle set and obtaining a target projection coordinate system, and projecting the panoramic image to be compressed into a plane format according to the target projection format and the target projection coordinate system and compressing it. The disadvantage of this method is that the reference pixels are mainly designed for normal natural images, and the reference pixels on the left and the top are obtained for intra-frame prediction, that is, in the panoramic image process, the actual reference pixels on the left and the top are distorted, resulting in low compression efficiency. Summary of the invention
[0006] In order to solve the above technical problems, the present invention proposes an image compression method for realizing panoramic images, so as to solve the limitations of existing methods and achieve higher compression effect and good visual quality.
[0007] The present invention provides an image compression method for realizing a panoramic image, comprising acquiring a panoramic image, and further comprising the following steps:
[0008] Step 1: Detect and extract feature vectors and key points of the panoramic image;
[0009] Step 2: Match the descriptors between the two images;
[0010] Step 3: Estimate the homography matrix using the RANSAC algorithm based on the eigenvector;
[0011] Step 4: Perform perspective transformation and image stitching;
[0012] Step 5: Use the optimized intra-frame prediction method to compress the panoramic image.
[0013] Preferably, the step 1 includes using a SIFT local description operator to detect key points and feature vectors in the image.
[0014] Preferably, in any of the above solutions, the homography matrix is calculated from corresponding point pairs in two images.
[0015] In any of the above solutions, preferably, the coordinates of each corresponding point correspond to two equations respectively, the homography matrix includes at least 4 pairs of matching points, and the calculation formula is:
[0016]
[0017] Among them, (x1, y1) represents the coordinates of the first matching point in one image, (x2, y2) represents the coordinates of the second matching point in one image, (x3, y3) represents the coordinates of the third matching point in one image, (x4, y4) represents the coordinates of the fourth matching point in one image, (x′1, y′1) represents the coordinates of the first matching point in another image, (x′2, y′2) represents the coordinates of the second matching point in another image, (x′3, y′3) represents the coordinates of the third matching point in another image, (x′4, y′4) represents the coordinates of the fourth matching point in another image, and h 11 Indicates the first parameter of the homography matrix of the first matching point pair, h 12 Indicates the second parameter of the homography matrix of the first matching point pair, h 13 Indicates the third parameter of the homography matrix of the first matching point pair, h 21 Represents the first parameter of the homography matrix of the second matching point pair, h22 Indicates the second parameter of the homography matrix of the second matching point pair, h 23 Represents the third parameter of the homography matrix of the second matching point pair, h 31 Represents the first parameter of the homography matrix of the third matching point pair, h 32 Represents the second parameter of the homography matrix of the third matching point pair.
[0018] In any of the above solutions, preferably, step 3 includes selecting 4 pairs from all matching points each time, calculating the homography matrix, and then selecting the one with the largest number of internal points as the final result.
[0019] In any of the above solutions, preferably, step 3 further includes obtaining the feature vector estimation homography frame and making a one-to-one correspondence between the target projection format and the initial projection coordinate system of each original image.
[0020] In any of the above solutions, preferably, the formula for calculating the distance between two matching images is:
[0021]
[0022] Where t represents the similarity threshold and H represents the estimated homography matrix.
[0023] In any of the above solutions, preferably, the perspective transformation includes inputting an image to be distorted and a homography matrix, and outputting the shape of the image.
[0024] In any of the above solutions, preferably, step 4 includes performing image registration, transforming the images to be stitched into the same coordinate system according to the image transformation parameter matrix obtained in the image registration, and performing image stitching.
[0025] In any of the above schemes, it is preferred that the image stitching is to fuse two images using any one of direct average fusion method, median wave fusion method and average fusion method.
[0026] In any of the above solutions, preferably, the optimized intra-frame prediction method includes the following sub-steps:
[0027] Step 51: Obtain adjacent reference pixels;
[0028] Step 52: Filter the reference pixel;
[0029] Step 53: Calculate predicted pixels.
[0030] In any of the above solutions, preferably, step 51 includes the following sub-steps:
[0031] Step 511: establishing a mapping table based on the target projection format and the initial projection coordinate system;
[0032] Step 512: During the inter-frame prediction process, obtain the pixel coordinates to the left or above the reference pixel, query the mapping table, and obtain the pixel coordinates Q (Q x , Qy);
[0033] Step 513: Modify the reference pixel by using a double interpolation method.
[0034] In any of the above solutions, preferably, the double interpolation method comprises the following sub-steps:
[0035] Step 5131: According to the pixel coordinate Q(Q x , Q y ) Calculate the coordinates of the four pixels around the pixel coordinate Q as Q11, Q12, Q21 and Q22;
[0036] Step 5132: perform linear interpolation in the X direction;
[0037] Step 5133: perform linear interpolation in the Y direction;
[0038] Step 5134: Replace the coordinates of the reference pixel.
[0039] In any of the above schemes, it is preferred that the coordinates of Q11, Q12, Q21 and Q22 are Q11(Q x’ , Q y’ )、Q12(Q x” , Q y’ )、Q21(Q x’ , Q y” ) and Q22(Q x” , Q y” ), where Q x’ Q x The integer part, Q y’ Q y The integer part, Q x” Q x +1 integer part, Q y” Q y +1 for the integer part.
[0040] In any of the above schemes, preferably, step 4132 includes inserting point R1 between point Q11 and point Q21, and inserting point R2 between point Q12 and point Q22 through bilinear interpolation calculation.
[0041] In any of the above solutions, preferably, step 4133 includes inserting point P between points R1 and R2 by bilinear interpolation calculation.
[0042] In any of the above solutions, preferably, the calculation formula of the bilinear interpolation is:
[0043] f(m,n)=(1-a)(1-β)Q 11 +a(1-β)Q 12 +(1-a)BQ 21 +aβQ 22
[0044] Among them, a = m-m1 is the relative distance between the target pixel m coordinate and its nearest integer coordinate m1, β = n-n1 is the relative distance between the target pixel n coordinate and its nearest integer coordinate n1, Q 11 is the pixel value at (m1,n1), Q 12 is the pixel value at (m1+1,n1), Q 21 is the pixel value at (m1,n1+1), Q 22 is the pixel value at (m1+1,n1+1).
[0045] This formula estimates the position weight of the target pixel relative to the four neighboring pixels.
[0046] In any of the above schemes, preferably, step 4134 includes replacing the coordinates Q of the reference pixel with the coordinates of the obtained point P.
[0047] The present invention proposes an image compression method for realizing panoramic images, which can better restore image information to be displayed, improve display image quality, and greatly improve coding efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 The present invention is a flowchart of a preferred embodiment of a method for compressing panoramic images according to the present invention.
[0049] Figure 2 The figure is a schematic diagram of an embodiment of a method for realizing perspective transformation of a panoramic image according to the present invention.
[0050] Figure 3 FIG. 1 is a schematic diagram of an embodiment of a method for realizing bilinear interpolation of a panoramic image compression method according to the present invention. DETAILED DESCRIPTION
[0051] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments.
[0052] Embodiment 1
[0053] like Figure 1 As shown, step 10000 is executed to obtain a panoramic image.
[0054] Execute step 11000 to detect and extract the feature vectors and key points of the panoramic image, and use the SIFT local description operator to detect the key points and feature vectors in the image.
[0055] Execute step 12000 to match descriptors between two images.
[0056] Execute step 13000, estimate the homography matrix based on the eigenvector using the RANSAC algorithm, the homography matrix is calculated by the corresponding point pairs in the two images. The coordinates of each corresponding point correspond to two equations, and the homography matrix includes at least 4 pairs of matching points, and the calculation formula is:
[0057]
[0058] Among them, (x1, y1) represents the coordinates of the first matching point in one image, (x2, y2) represents the coordinates of the second matching point in one image, (x3, y3) represents the coordinates of the third matching point in one image, (x4, y4) represents the coordinates of the fourth matching point in one image, (x′1, y′1) represents the coordinates of the first matching point in another image, (x′2, y′2) represents the coordinates of the second matching point in another image, (x′3, y′3) represents the coordinates of the third matching point in another image, (x′4, y′4) represents the coordinates of the fourth matching point in another image, and h 11 Indicates the first parameter of the homography matrix of the first matching point pair, h 12 Indicates the second parameter of the homography matrix of the first matching point pair, h 13 Indicates the third parameter of the homography matrix of the first matching point pair, h 21 Represents the first parameter of the homography matrix of the second matching point pair, h 22 Indicates the second parameter of the homography matrix of the second matching point pair, h 23 Represents the third parameter of the homography matrix of the second matching point pair, h 31 Represents the first parameter of the homography matrix of the third matching point pair, h 32 Represents the second parameter of the homography matrix of the third matching point pair.
[0059] Each time, 4 pairs are selected from all matching points, the homography matrix is calculated, and then the one with the largest number of inliers is selected as the final result. After obtaining the feature vector estimation homography frame, the target projection format is matched one-to-one with the initial projection coordinate system of each original image. The formula for calculating the distance between two matching images is
[0060]
[0061] Where t represents the similarity threshold and H represents the estimated homography matrix.
[0062] Execute step 14000 to perform perspective transformation and image stitching, perform image registration, transform the images to be stitched into the same coordinate system according to the image transformation parameter matrix obtained in the image registration, and perform image stitching.
[0063] The perspective transformation includes inputting an image to be distorted and a homography matrix, and outputting the shape of the image.
[0064] The image stitching is to fuse two images by using any one of direct average fusion method, median wave fusion method and average fusion method.
[0065] Execute step 15000 to perform panoramic image compression using an optimized intra-frame prediction method, where the optimized intra-frame prediction method includes the following sub-steps:
[0066] Execute step 15100 to obtain adjacent reference pixels, including the following sub-steps:
[0067] Execute step 15110 to establish a mapping table based on the target projection format and the initial projection coordinate system;
[0068] Execute step 15120, in the process of inter-frame prediction, obtain the pixel coordinates on the left or above the reference pixel, query the mapping table, and obtain the pixel coordinates Q (Q x , Qy);
[0069] Execute step 15130 to modify the reference pixel by a double interpolation method, wherein the double interpolation method includes the following sub-steps:
[0070] Execute step 15131, according to the pixel coordinate Q(Q x , Q y ) Calculate the coordinates of the four pixels around the pixel coordinate Q as Q11, Q12, Q21 and Q22. The coordinates of Q11, Q12, Q21 and Q22 are Q11(Q x’ , Q y’ )、Q12(Q x” , Q y’ )、Q21(Q x’ , Q y” ) and Q22(Q x” , Q y” ), where Q x’ Q x The integer part, Q y’ Q y The integer part, Q x” Q x +1 integer part, Q y” Q y +1 for the integer part;
[0071] Execute step 15132 to perform linear interpolation in the X direction. Through linear interpolation calculation, insert point R1 between point Q11 and point Q21, and insert point R2 between point Q12 and point Q22.
[0072] Execute step 15133 to perform linear interpolation in the Y direction, and insert point P between points R1 and R2 through linear interpolation calculation;
[0073] The calculation formula of the bilinear interpolation is:
[0074] f(m,n)=(1-a)(1-β)Q 11 +a(1-β)Q 12 +(1-a)BQ 21 +aβQ 22
[0075] Among them, a = m-m1 is the relative distance between the target pixel m coordinate and its nearest integer coordinate m1, β = n-n1 is the relative distance between the target pixel n coordinate and its nearest integer coordinate n1, Q 11 is the pixel value at (m1,n1), Q 12 is the pixel value at (m1+1,n1), Q 21 is the pixel value at (m1,n1+1), Q 22 is the pixel value at (m1+1,n1+1).
[0076] The calculation formula of bilinear interpolation estimates the pixel value of the target pixel point by calculating the position weight of the target pixel point relative to the four neighboring pixels, which can provide a smoother image scaling effect than the nearest neighbor interpolation.
[0077] Execute step 15134 to replace the coordinates of the reference pixel, replacing the coordinates Q of the reference pixel with the coordinates of the obtained point P.
[0078] Execute step 15200 to filter the reference pixel.
[0079] Execute step 15300 to calculate the predicted pixel.
[0080] Embodiment 2
[0081] The present invention mainly improves the compression method of panoramic images. The current common image compression method can achieve good results when using natural images, but the use of traditional compression methods for compressing panoramic images may lead to low efficiency. Therefore, it is necessary to improve the compression method to improve the compression performance of panoramic images.
[0082] The present invention proposes an innovative panoramic image compression method to address the limitations of existing methods and achieve higher compression effect and good visual quality.
[0083] The specific steps are as follows:
[0084] Step 1: Detect and extract image features and key points;
[0085] Step 2: Match the descriptors between the two images;
[0086] Step 3: Use the RANSAC algorithm to estimate the homography matrix using our matched eigenvectors;
[0087] Step 4: Stitch the images.
[0088] Step 1 and step 2 use the SIFT local description operator to detect key points and features in the image. SIFT features are based on some local appearance points of interest on the object and are independent of the size and rotation of the image. They are also very tolerant of light, noise, and slight changes in perspective, so they are very advantageous for detecting features and key points of images to be spliced.
[0089] Step 3 is to find the overlapping parts of the pictures. After connecting all the pictures, a basic panorama can be formed. The most common way to match pictures is to use RANSAC (RANdom SAmple Consensus), which eliminates matches that do not conform to most geometric transformations. These matching points are then used to "estimate the homography matrix" (Homography Estimation), that is, to match one image with the other through correlation.
[0090] The homography matrix can be calculated from the corresponding point pairs in two images (or planes). For each corresponding point, two equations can be written, corresponding to the x and y coordinates respectively. Therefore, at least 4 pairs of matching points are required to calculate the homography matrix H.
[0091]
[0092] Then we can select 4 pairs from all matching points each time, calculate the homography matrix, and then select the one with the largest number of inliers as the final result. The method for calculating the distance between two matching images is as follows:
[0093]
[0094] In step 4, after estimating the homography matrix H, we need to stitch the two images together. Here we use a perspective transformation, inputting the image we want to distort, the homography matrix (H), and the shape of the output image. We determine the derived shape of the output image by taking the sum of the widths of the two images and then using the height of the second image. Perspective transformation is to project the image onto a new viewing plane, also known as projective mapping. Perspective transformation is like Figure 2 shown.
[0095] Since the obtained perspective transformation matrix, i.e., the homography matrix, is based on the global feature point pairs, a rigid homography matrix is used to complete the registration. In order to improve the accuracy of the registration, the image is cut into numerous small squares, and each small square is transformed by the homography matrix, which is very dependent on the feature point pairs. If the image has less high-frequency information and too few feature point pairs, the registration will be completely ineffective, and the registration effect is not very good for large-scale images. Everything depends on the number of feature point pairs.
[0096] The process of transforming multiple images at different times, from different perspectives or from different sensors into the same space and seamlessly fusing them together to obtain a large field of view, high-resolution image is called a panorama. As shown in the figure below, the original fisheye image is transformed into a panoramic image through the perspective transformation matrix.
[0097] In the above steps, the perspective transformation matrix is calculated by matching two images, and then the different original fisheye images are transformed into panoramic images through the matrix. After obtaining multiple panoramic images of the field of view scene, image fusion is required (after image registration). The purpose of image fusion is to make the transition of the overlapping area of the two images natural and smooth. In the above figure, obvious boundaries can be seen, which is unacceptable for stitching. This is mainly caused by changes in external brightness and inconsistent camera parameters during exposure. To eliminate or alleviate this phenomenon, image fusion is required.
[0098] The present invention modifies the information of the prediction block when performing intra-frame prediction during the image encoding process. Instead of directly using the information on the left and top of the panoramic image, a target projection format and a corresponding initial projection coordinate system are acquired, and a mapping table based on the target projection format and the initial projection coordinate system is established. The information of the intra-frame prediction process is modified into the information of the original image, which can better restore the image information to be displayed, provide display image quality, and greatly improve the encoding efficiency.
[0099] Embodiment 3
[0100] When transmitting images over the network, lossy compression methods such as JPEG and BPG are generally used. The basic principle is to divide the image into small blocks, and then perform discrete cosine transform and quantization on each small block. High-frequency detail information is discarded, and only low-frequency information is retained. Then the quantized data is encoded using the entropy coding method to reduce storage space. When decompressing, the reverse operation is performed to decode and dequantize the data, and finally the small blocks are merged to obtain the original image. The compression rate and image quality need to be balanced, and adjusting the quantization parameter can control the compression rate.
[0101] Image compression such as JPEG and BPG is an image compression method based on intra-frame prediction. Intra-frame prediction is used to reduce redundant information in an image by predicting pixel values to represent differences.
[0102] The principle of intra-frame prediction is as follows:
[0103] 1. Divide the original image into small blocks.
[0104] 2. Perform intra-frame prediction on each small block. During the prediction process, the current pixel value is estimated based on the surrounding pixel values. Commonly used prediction methods include horizontal prediction, vertical prediction, and average prediction.
[0105] 3. Calculate the prediction error, which is the difference between the current pixel value and the predicted pixel value. This difference is usually called the residual.
[0106] 4. Perform discrete cosine transform (DCT) on the residual to convert the spatial domain differences into frequency domain coefficients.
[0107] 5. Quantize the DCT coefficients and discard high-frequency information. High-frequency information is not important to the eye and can be discarded to reduce the amount of data.
[0108] 6. Use entropy coding technology (such as Huffman coding) to encode the quantized DCT coefficients to reduce storage space.
[0109] 7 When decompressing, the reverse operation is required: decoding and dequantizing the DCT coefficients, and then performing an inverse discrete cosine transform (IDCT) to obtain the prediction error. By adding the prediction error to the predicted pixel, the pixel value of the original image can be restored. This completes the intra-frame prediction and compression and decompression process of the JPEG image.
[0110] When a panoramic image is compressed using an intra-frame prediction-based image compression method, the reference pixels can be divided into five regions, namely, lower left, left, upper left, top and upper right, when image prediction is performed. These image pixels are deformed corresponding to the original image, resulting in reduced encoding efficiency.
[0111] Therefore, the present invention modifies the information of the prediction block when performing intra-frame prediction during the image encoding process, and does not directly use the information on the left and top of the panoramic image. Instead, it obtains the target projection format and the corresponding initial projection coordinate system, establishes a mapping table based on the target projection format and the initial projection coordinate system, and modifies the information of the intra-frame prediction process to the information of the original image, as shown in the figure below. This can better restore the image information to be displayed, provide display image quality, and greatly improve the encoding efficiency.
[0112] The difference between the optimized intra-frame compression method and the existing method is that the information of the prediction block is modified during the intra-frame prediction in the image encoding process. Instead of directly using the information on the left and top of the panoramic image, the target projection format and the corresponding initial projection coordinate system are obtained, and a mapping table based on the target projection format and the initial projection coordinate system is established to modify the information of the intra-frame prediction process to the information of the original image. The specific steps are as follows:
[0113] 1. Modify the information of the prediction block;
[0114] 2. Obtain the target projection format and the corresponding initial projection coordinate system;
[0115] Through the universal technology of panoramic images, the homography matrix of feature vector estimation is obtained, and the target projection format is matched one by one with the initial projection coordinate system of each original image;
[0116] 3. Establish a mapping table based on the target projection format and the initial projection coordinate system;
[0117] For example, the reference pixel mapping coordinate relationship on the left:
[0118] 960,540 corresponds to 959.5,539.3,
[0119] 960,539 corresponds to 950,538,
[0120] 960,538 corresponds to 949,536,
[0121] Save it as lookup.txt document for query.
[0122] 4. Query the mapping table;
[0123] During inter-frame prediction, get the pixel coordinates on the left or top, and then query them in the lookup.txt file;
[0124] For example, when obtaining the coordinates of 960,540, it will be found in the lookup.txt file as 959.5,539.3.
[0125] 5. Modify the reference pixels of the intra prediction process by interpolation method;
[0126] When the query result is 959.5, 539.3, the four pixels (959, 539), (960, 539), (959, 540), and (960, 540) in the obtained image are set as Q11, Q12, Q21, and Q22.
[0127] Then bilinear interpolation is performed to obtain new pixel values, such as Figure 3 shown.
[0128] X_out=x1,x2,x3,x4
[0129] Step 1: Linear interpolation in the X direction, insert blue point R2 into Q12, Q22, insert blue point R1 into Q11, Q21;
[0130] Step 2: Linear interpolation in the Y direction. Point P is calculated by interpolating R1 and R2 calculated in the first step in the Y direction.
[0131] The result of linear interpolation is independent of the order in which the interpolation is performed. Interpolating in the y direction first and then in the x direction will produce the same result. The result of bilinear interpolation is independent of which direction is interpolated first.
[0132] If a coordinate system is chosen so that the coordinates of the four known points are (0,0), (0,1), (1,0), and (1,1), then the interpolation formula can be simplified to
[0133] f(x,y)=f(0,0)(1-x)(1-y)+f(1,0)x(1-y)+f(0,1)(1-x)y+f(1,1)xy
[0134] To make an improvement, x=0.5 is fixed, that is, only pixel pairs are averaged to simplify the method and improve performance.
[0135] In order to better understand the present invention, the above is described in detail in conjunction with the specific embodiments of the present invention, but it is not intended to limit the present invention. Any simple modifications made to the above embodiments based on the technical essence of the present invention still fall within the scope of the technical solution of the present invention. Each embodiment in this specification focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referenced to each other. For the system embodiment, since it basically corresponds to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
Claims
1. A method for compressing a panoramic image, comprising obtaining a panoramic image, characterized in that: The following steps are also included: Step 1: Detect and extract feature vectors and key points of the panoramic image; Step 2: Match the descriptors between the two images; Step 3: Estimate the homography matrix using the RANSAC algorithm based on the eigenvector; Step 4: Perform perspective transformation and image stitching; Step 5: Use the optimized intra-frame prediction method to compress the panoramic image.
2. The method for realizing panoramic image compression according to claim 1, characterized in that: The step 1 includes using the SIFT local description operator to detect key points and feature vectors in the image.
3. The method for realizing panoramic image compression according to claim 2, characterized in that: The coordinates of each corresponding point correspond to two equations respectively, and the homography matrix includes at least 4 pairs of matching points. The calculation formula is: Among them, (x1, y1) represents the coordinates of the first matching point in one image, (x2, y2) represents the coordinates of the second matching point in one image, (x3, y3) represents the coordinates of the third matching point in one image, (x4, y4) represents the coordinates of the fourth matching point in one image, (x′1, y′1) represents the coordinates of the first matching point in another image, (x′2, y′2) represents the coordinates of the second matching point in another image, (x′3, y′3) represents the coordinates of the third matching point in another image, (x′4, y′4) represents the coordinates of the fourth matching point in another image, and h 11 Indicates the first parameter of the homography matrix of the first matching point pair, h 12 Indicates the second parameter of the homography matrix of the first matching point pair, h 13 Indicates the third parameter of the homography matrix of the first matching point pair, h 21 Represents the first parameter of the homography matrix of the second matching point pair, h 22 Indicates the second parameter of the homography matrix of the second matching point pair, h 23 Represents the third parameter of the homography matrix of the second matching point pair, h 31 Represents the first parameter of the homography matrix of the third matching point pair, h 32 Represents the second parameter of the homography matrix of the third matching point pair.
4. The method for realizing panoramic image compression according to claim 3, characterized in that: The step 3 includes selecting 4 pairs from all matching points each time, calculating the homography matrix, and then selecting the one with the largest number of inliers as the final result.
5. The method for realizing panoramic image compression according to claim 4, characterized in that: The step 3 also includes obtaining the feature vector estimation homography frame, and then making a one-to-one correspondence between the target projection format and the initial projection coordinate system of each original image.
6. The method for realizing panoramic image compression according to claim 5, characterized in that: The formula for calculating the distance between two matching images is Where t represents the similarity threshold and H represents the estimated homography matrix.
7. The method for realizing panoramic image compression according to claim 6, characterized in that: The optimized intra-frame prediction method comprises the following sub-steps: Step 51: Obtain adjacent reference pixels; Step 52: Filter the reference pixel; Step 53: Calculate predicted pixels.
8. The method for realizing panoramic image compression according to claim 7, characterized in that: The step 51 includes the following sub-steps: Step 511: establishing a mapping table based on the target projection format and the initial projection coordinate system; Step 512: During the inter-frame prediction process, obtain the pixel coordinates to the left or above the reference pixel, query the mapping table, and obtain the pixel coordinates Q (Q x , Qy); Step 513: Modify the reference pixel by using a double interpolation method.
9. The method for realizing panoramic image compression according to claim 8, characterized in that: The dual interpolation method comprises the following sub-steps: Step 5131: According to the pixel coordinate Q(Q x , Q y ) Calculate the coordinates of the four pixels around the pixel coordinate Q as Q11, Q12, Q21 and Q22; Step 5132: perform linear interpolation in the X direction; Step 5133: perform linear interpolation in the Y direction; Step 5134: Replace the coordinates of the reference pixel.
10. The method for realizing panoramic image compression according to claim 9, characterized in that: The coordinates of Q11, Q12, Q21 and Q22 are Q11(Q x’ , Q y’ )、Q12(Q x” , Q y’ )、Q21(Q x’ , Q y” ) and Q22(Q x” , Q y” ), where Q x’ Q x The integer part, Q y’ Q y The integer part, Q x” Q x +1 integer part, Q y” Q y +1 for the integer part.
Citation Information
Patent Citations
Panoramic image compression method and device, intelligent equipment and storage medium
CN115361536A