AR (Augmented Reality) data compression method and system of tenon-and-mortise product
Through homogeneous image association compression and orphan image spatial domain compression, combined with structural data predictive coding and intelligent layered encapsulation, the problems of mortise and tenon part data redundancy and loading delay are solved, and efficient AR data compression and loading are achieved.
Patent Information
- Application Number
- CN202510813611.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-18
- Publication Date
- 2025-09-05
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing technologies make it difficult to reduce data storage costs and transmission bandwidth requirements while retaining the texture details of mortise and tenon parts. In addition, data redundancy between mortise and tenon components and finished products leads to AR scene loading delays and freezes.
The homogeneous image association compression and orphan image spatial domain compression methods are adopted, combined with structural data predictive coding and intelligent layered encapsulation, to compress the component images and structural data of mortise and tenon products respectively, and optimize data transmission through serial number compression and data encapsulation.
It significantly improves the compression rate of mortise and tenon products, reduces data redundancy, improves AR loading efficiency, and optimizes delay and lag issues.
Smart Images

Figure CN120602676A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of compression algorithms, and in particular to an AR data compression method and system for mortise and tenon products. Background Art
[0002] With the continuous development of cultural heritage digitization, vocational skills training, and product display, the technical requirements for the dynamic presentation of mortise and tenon joints are increasing. AR technology provides an innovative path for this purpose. Because AR technology requires the construction of high-precision 3D models and high-definition texture data to accurately reproduce the millimeter-level precision of mortise and tenon joints, the storage and transmission volume of AR data is growing exponentially, making existing data compression algorithms unable to cope.
[0003] On the one hand, if the existing technology increases the compression ratio, the texture details of the mortise and tenon parts will easily be lost; if the texture details are retained, it will be difficult to reduce storage costs and transmission bandwidth requirements, which will seriously affect the loading efficiency and smoothness of the user end; on the other hand, when processing mortise and tenon components and finished products, the existing technology adopts a split approach, compressing and storing data separately, resulting in a large amount of duplicate data redundancy. When loading the AR scene, the component and finished product data need to be reloaded, which exacerbates the delay and lag problems. Summary of the Invention
[0004] In order to solve the above problems existing in the prior art, the present invention provides an AR data compression method and system for mortise and tenon products. The technical problem to be solved by the present invention is achieved through the following technical solutions: A method for compressing AR data of a mortise and tenon product, comprising: Acquire component images of mortise and tenon products and structural data of the mortise and tenon products, wherein the component images of the mortise and tenon products include multiple isomorphic images and a single isolated image, and the structural data of the mortise and tenon products include component orientation data, component rotation data, and component position data; Marking the component images of the mortise and tenon product so that the isomorphic image and the unique product image have image serial numbers and isomorphic serial numbers respectively, wherein the image serial number is determined by the isomorphic image and the unique product image, the isomorphic serial number is determined by the isomorphic image, and the image serial number includes the isomorphic image serial number and the unique product image serial number; Performing sequence number compression on the image sequence number and the isomorphic sequence number to obtain header information compressed data; Performing associated spatial compression on the component images of the mortise and tenon product to obtain component compressed data; Performing information matching and compression on the structural data of the mortise and tenon product to obtain structural compression data; The header information compressed data, the component compressed data and the structure compressed data are encapsulated according to the image sequence number and the isomorphic sequence number to obtain AR compressed data.
[0005] In a specific embodiment, it is characterized in that the component images of the mortise and tenon product are marked so that the isomorphic image and the orphan image have image serial numbers and isomorphic serial numbers respectively, wherein the image serial number is determined by the isomorphic image and the orphan image, the isomorphic serial number is determined by the isomorphic image, and the image serial number includes the isomorphic image serial number and the orphan image serial number, including: Assigning image serial numbers to the plurality of isomorphic images and the single orphan image respectively to obtain serial numbers of the plurality of isomorphic images and serial number of the single orphan image to form an image serial number; An isomorphic sequence number is set for each isomorphic image corresponding to the isomorphic image sequence number to obtain the isomorphic sequence number of the isomorphic image.
[0006] In a specific embodiment, the step of performing sequence number compression on the image sequence number and the isomorphic sequence number to obtain header information compressed data includes: Obtain the fixed-length data of the image sequence number according to the maximum value of the image sequence number; Obtaining isomorphic sequence number fixed-length data according to the maximum value of the isomorphic sequence number of the isomorphic image; Using preset length encoding on the image sequence number fixed length data and the isomorphic sequence number fixed length data to obtain first header compressed data; The second header compressed data and the third header compressed data are obtained by encoding the image serial number of a single orphan image and the serial numbers of multiple isomorphic images using the image serial number fixed length data respectively; The isomorphic sequence numbers of the isomorphic images are encoded using isomorphic sequence number fixed-length data to obtain fourth header compressed data; The header information compressed data is obtained by sequentially splicing the first header compressed data, the second header compressed data, the third header compressed data and the fourth header compressed data.
[0007] In a specific embodiment, the step of performing associated spatial compression on the component images of the mortise and tenon product to obtain component compressed data includes: Applying associative compression to the plurality of isomorphic images to obtain associative compressed data; Applying spatial domain compression to the single orphan product image to obtain spatial domain compressed data; The associated compressed data and the spatial domain compressed data are concatenated to obtain component compressed data.
[0008] In a specific embodiment, the step of applying associative compression to the plurality of isomorphic images to obtain associative compressed data includes: Dividing the isomorphic image into a reference image and a target image, wherein the reference image is the isomorphic image with the smallest isomorphic sequence number; Set the isomorphic image with the smallest isomorphic sequence number as the reference image, and the remaining isomorphic images as the target images; Obtaining a target residual image and a reference residual image based on the reference image and the target image, wherein the target residual image is obtained by using a method of subtracting pixels at the same position between the reference image and the target image, and the reference residual image is obtained by using a method of subtracting adjacent pixels from the reference image; Performing 32x32 DCT transformation and quantization on the target residual image and the reference residual image to obtain associated quantized images, and performing entropy coding on the associated quantized images to obtain associated compressed data.
[0009] In a specific embodiment, the applying spatial domain compression to the single orphan product image to obtain spatial domain compressed data includes: A spatial residual image is obtained by applying a spatial prediction method to the single orphan image; Performing 16x16 DCT transformation and quantization on the spatial residual image to obtain a spatial quantized image; The spatial quantized image is entropy coded to obtain spatial domain compressed data.
[0010] In a specific embodiment, performing information matching and compression on the structural data of the mortise and tenon product to obtain structural compressed data includes: Using a data prediction method to obtain structural data residuals for the structural data of the mortise and tenon product, wherein the structural data residuals include direction residuals, rotation residuals and position residuals; Obtaining an orientation residual, a rotation residual, and a position residual according to the component orientation data, the component rotation data, and the component position data, respectively, wherein the orientation residual is determined according to a forward difference method, the rotation residual is determined according to an arithmetic mean, and the position residual is determined according to a median; Exponential Golomb coding is used on the direction residual, rotation residual and position residual to obtain structure compressed data.
[0011] In a specific embodiment, encapsulating the header information compressed data, the component compressed data, and the structure compressed data according to the image sequence number and the isomorphic sequence number to obtain the AR compressed data includes: byte-level aligning of the component compressed data to obtain component spliced data, wherein the component spliced data has a preset byte length; Separately encapsulating each component splicing data according to the image serial number and the isomorphic serial number to obtain component encapsulation data so that the access address of each component encapsulation data is unique; The header information compressed data, the component packaged data and the structure compressed data are encapsulated as a whole to obtain AR compressed data.
[0012] In one embodiment, an AR data compression system for mortise and tenon products includes: an acquisition unit, configured to acquire component images of mortise and tenon products and structural data of mortise and tenon products, wherein the component images of the mortise and tenon products include multiple isomorphic images and a single isolated image, and the structural data of the mortise and tenon products include component orientation data, component rotation data, and component position data; a numbering unit for marking component images of the mortise and tenon product so that the isomorphic image and the orphan image have image serial numbers and isomorphic serial numbers respectively, wherein the image serial number is determined by the isomorphic image and the orphan image, the isomorphic serial number is determined by the isomorphic image, and the image serial number includes the isomorphic image serial number and the orphan image serial number; a sequence number compression unit, configured to perform sequence number compression on the image sequence number and the isomorphic sequence number to obtain header information compressed data; A component compression unit, configured to perform associated spatial compression on the component image of the mortise and tenon product to obtain component compressed data; A structure compression unit, configured to perform information matching and compression on the structure data of the mortise and tenon product to obtain structure compressed data; The encapsulation unit is used to encapsulate the header information compressed data, the component compressed data and the structure compressed data according to the image sequence number and the isomorphic sequence number to obtain AR compressed data.
[0013] In a specific embodiment, the encapsulation unit is configured to encapsulate the header information compressed data, the component compressed data, and the structure compressed data according to the image sequence number and the isomorphic sequence number to obtain the AR compressed data, including: a splicing subunit, configured to align the component compressed data at a byte level to obtain component splicing data, wherein the component splicing data has a preset byte length; a separate encapsulation subunit, configured to separately encapsulate each component splicing data according to the image sequence number and the isomorphic sequence number to obtain component encapsulation data so that an access address of each component encapsulation data is unique; The overall encapsulation subunit is used to overall encapsulate the header information compressed data, the component encapsulation data and the structure compressed data to obtain AR compressed data.
[0014] Beneficial effects of the present invention: The present invention provides an AR data compression method and system for mortise and tenon products. Through isomorphic image association compression and isolated image spatial domain compression, the compression rate is significantly improved while retaining the millimeter-level texture details of the mortise and tenon parts. Through structural data predictive coding and an intelligent layered packaging mechanism, data redundancy between components and finished products is eliminated, AR loading efficiency is greatly improved, and the delay and jamming problems caused by traditional solutions are optimized.
[0015] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 This is a flow chart of an AR data compression method for mortise and tenon products provided by an embodiment of the present invention; Figure 2 This is a schematic diagram of header information compression data of an AR data compression method for mortise and tenon products provided by an embodiment of the present invention; Figure 3 1 is a schematic diagram of the associated compression of an AR data compression method for a mortise and tenon product provided by an embodiment of the present invention; Figure 4 This is a module block diagram of an AR data compression system for mortise and tenon products provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0017] The present invention will be further described in detail below with reference to specific examples, but the embodiments of the present invention are not limited thereto.
[0018] Example 1 In one embodiment, see Figure 1 , Figure 1 This is a flow chart of the AR data compression method for mortise and tenon products. The specific steps are as follows: S1. Acquire component images of mortise and tenon products and structural data of mortise and tenon products, wherein the component images of mortise and tenon products include multiple isomorphic images and a single isolated image, and the structural data of mortise and tenon products include component orientation data, component rotation data, and component position data.
[0019] Since traditional methods separate processing components and finished product data, resulting in duplicate storage, we consider collecting data through classification to lay the foundation for subsequent differentiated compression.
[0020] Specifically, in component image acquisition, the homogeneous images refer to components with the same mortise and tenon structural features (such as reusable tenons or mortises), which require high-precision 3D scanning or photogrammetry to obtain multi-view images, ensuring that the texture resolution is ≥ 0.1mm / pixel to preserve the millimeter-level process details of the mortise and tenon; the unique images refer to unique components (such as special carved parts), which need to be separately collected and labeled with spatial coordinates to avoid confusion with homogeneous components. In structural data collection, it is necessary to record the assembly chips of components relative to the finished product, including: Component orientation data: This records the axial orientation of the mortise and tenon component in three-dimensional space, such as Euler angles or quaternions, for dynamic assembly and alignment in AR scenes.
[0021] Component rotation data: describes the component's rotation angle around the axis to ensure physical rationality when the mortise and tenon are engaged, such as the matching of the slope of the dovetail joint.
[0022] Component position data: The position coordinates of the component center point in three-dimensional space are marked using point cloud coordinates. The accuracy must reach ±0.5mm to meet the tight fit requirements of the mortise and tenon structure.
[0023] Data association: Structural data and component images are strictly bound through identification.
[0024] S2. Marking the component images of the mortise and tenon product so that the isomorphic image and the orphan image have image serial numbers and isomorphic serial numbers respectively, wherein the image serial number is determined by the isomorphic image and the orphan image, the isomorphic serial number is determined by the isomorphic image, and the image serial number includes the isomorphic image serial number and the orphan image serial number.
[0025] S21. Assigning image serial numbers to the plurality of isomorphic images and the single unique image respectively to obtain serial numbers of the plurality of isomorphic images and serial numbers of the single unique image to form an image serial number.
[0026] In one embodiment, each unique component is assigned a unique image serial number, such as S_001, with incremental encoding to ensure global uniqueness. For reusable homogeneous components, such as standard tenons, a shared image serial number, such as M_001, is assigned.
[0027] S22. Assign an isomorphic sequence number to each isomorphic image corresponding to the isomorphic image sequence number to obtain the isomorphic sequence number of the isomorphic image. For example, 5 standard tenons are assigned isomorphic sequence numbers such as T_000-T_004.
[0028] S3. Please see Figure 2 , Figure 2 The present invention is a schematic diagram of header information compression data of an AR data compression method for mortise and tenon products, wherein the image serial number and the isomorphic serial number are compressed to obtain header information compression data.
[0029] S31. Obtain the fixed-length image sequence data based on the maximum value of the image sequence number. For example, assuming there are five isomorphic images, whose sequence numbers are 1, 2, 3, 4, and 5, and a single, unique image has a sequence number of 6, then the maximum value is 6. The number of bits in the fixed-length image sequence data is determined based on this maximum value. For example, if the maximum value is 6, a 3-bit binary number (000-110) can be used to represent all image sequence numbers, i.e., the fixed-length image sequence data is 3.
[0030] S32. Obtain isomorphic sequence number fixed-length data based on the maximum value of the isomorphic sequence numbers of the isomorphic images. For example, assume there are three isomorphic images, whose isomorphic sequence numbers are 0, 1, and 2, respectively, and the maximum value is 2. Then, a 2-bit binary number (00-10) can be used to represent all the isomorphic sequence numbers, i.e., the isomorphic sequence number fixed-length data is 2 bits.
[0031] S33. Use preset length encoding for the image sequence number fixed-length data and the isomorphic sequence number fixed-length data to obtain the first header compressed data. For example, the image sequence number fixed-length data is 3, and the isomorphic sequence number fixed-length data is 2. Use 4-bit fixed-length encoding for each data, and after combination, the first header compressed data is an 8-bit binary number.
[0032] S34. Use image number fixed-length data encoding for the single orphan image serial number and the multiple homogeneous image serial numbers to obtain second header compressed data and third header compressed data. For example, for the single orphan image serial number 6, use 3-bit binary code (110) to represent it, and the second header compressed data is 110. For the multiple homogeneous image serial numbers 1, 2, 3, 4, and 5, use 3-bit binary numbers (001, 010, 011, 100, and 101) to represent them, and the third header compressed data are 001, 010, 011, 100, and 101, respectively.
[0033] S35. Encode the isomorphic sequence numbers of the isomorphic images using isomorphic sequence number fixed-length data to obtain fourth header compressed data. For example, isomorphic sequence numbers 0, 1, and 2 are represented by 2-bit binary numbers (00, 01, and 10), respectively, and the fourth header compressed data obtained are 00, 01, and 10, respectively.
[0034] S36. The header information compressed data is obtained by sequentially splicing the first header compressed data, the second header compressed data, the third header compressed data, and the fourth header compressed data. Correspondingly, during decompression, the first header compressed data, the second header compressed data, the third header compressed data, and the fourth header compressed data are sequentially decompressed. Specifically, the decompression process includes: 1. Separating the compressed data: During decompression, the first, second, third, and fourth header compressed data are separated from the header compressed data based on the known splicing order and length information. For example, from the above example, the first header compressed data is 01010010, the second header compressed data is 110, the third header compressed data is 001, 010, 011, 100, 101, and the fourth header compressed data is 00, 01, 10.
[0035] 2. Decoding the fixed-length image sequence number and the fixed-length isomorphic sequence number: Split the first header compressed data into the fixed-length image sequence number and the fixed-length isomorphic sequence number. For example, split 10110 into the fixed-length image sequence number 0101 (binary, corresponding to 5 in decimal) and the fixed-length isomorphic sequence number 0010 (binary, corresponding to 2 in decimal). This indicates that the image sequence number is represented using a 5-bit binary number (actually, 3 digits were specified earlier in the example, but this is assumed to be different; the actual representation should remain consistent). The isomorphic sequence number is represented using a 2-bit binary number.
[0036] 3. Decoding the single orphan image serial number: Convert the second header compressed data 110 into decimal to obtain the single orphan image serial number 6 (binary 110 corresponds to decimal 6).
[0037] 4. Decode the serial numbers of multiple isomorphic images: Convert each 3-bit binary number (001, 010, 011, 100, 101) in the third header compressed data into decimal to obtain the serial numbers of the multiple isomorphic images 1, 2, 3, 4, 5.
[0038] 5. Decode the isomorphic sequence number: Convert each 2-bit binary number (00, 01, 10) in the fourth header compressed data into decimal to obtain the isomorphic sequence number 0, 1, 2.
[0039] 6. Reconstruct the original sequence number relationship: Through the above decoding process, the original image sequence number and isomorphic sequence number relationship are reconstructed. For example, the sequence number of a single orphan image is 6, and the sequence numbers of multiple isomorphic images are 1, 2, 3, 4, and 5. The corresponding isomorphic sequence numbers are 0, 1, 2, etc., respectively. This provides accurate sequence number information for subsequent image decompression and data reconstruction.
[0040] S4. See Figure 3 , Figure 3 The present invention is a schematic diagram of an associative compression method for an AR data compression method of a mortise and tenon product, wherein associative spatial domain compression is performed on component images of the mortise and tenon product to obtain component compressed data.
[0041] S41. Associated compression is applied to the plurality of isomorphic images to obtain associated compressed data. The associated compression method utilizes the similarity between isomorphic images and reduces the amount of data by the pixel differences between the reference image and other images. The effect and efficiency thereof are good when processing isomorphic images.
[0042] S411. Divide the isomorphic image into a reference image and a target image, wherein the reference image is the isomorphic image with the smallest isomorphic sequence number. The image with the smallest isomorphic sequence number is selected as the reference image because the image is usually representative and can better reflect the common features of the isomorphic images, which facilitates subsequent difference comparison of other images.
[0043] S412. A target residual image and a reference residual image are obtained based on the reference image and the target image, wherein the target residual image is obtained by using a same-position pixel difference method for the reference image and the target image, and the reference residual image is obtained by using an adjacent pixel difference method for the reference image. The same-position pixel difference method can effectively find the difference between the target image and the reference image, and the difference is usually small and regular, which is conducive to subsequent compression. The adjacent pixel difference method can further explore the spatial redundancy of the reference image itself.
[0044] S413. Perform 32x32 DCT transformation and quantization on the target residual image and the reference residual image to obtain associated quantized images, and perform entropy coding on the associated quantized images to obtain associated compressed data. The DCT transformation can convert image data from the spatial domain to the frequency domain, so that the correlation information is concentrated in the low-frequency coefficients, which is convenient for compressing high-frequency coefficients during quantization and reducing the amount of data. Entropy coding further removes redundant information in the data to achieve lossless compression.
[0045] For example, suppose there are three isomorphic images, A, B, and C, numbered 1, 2, and 3, respectively. Image A, numbered 1, is selected as the reference image, and images B and C are selected as the target images. Comparing pixels in the same position in images B and A yields a residual image. Differences are found to be primarily concentrated in certain texture details, and these differences are relatively small. A residual image is obtained by subtracting adjacent pixels in image A, further exploring inter-pixel correlations. The residual image is then transformed with a 32x32 DCT and quantized, with high-frequency components appropriately discarded. Finally, the quantized image is entropy-encoded to produce correlated compressed data.
[0046] S42. Spatial compression is performed on the single orphan image to obtain spatially compressed data. Spatial compression exploits the uniqueness of the single orphan image and utilizes the spatial correlation of its pixels to perform compression. This method is suitable for processing single orphan images and can effectively reduce the amount of data while preserving the image's texture details.
[0047] S421. A spatial prediction method is used to obtain a spatial residual image for the single orphan image. The spatial prediction method predicts unknown pixel values and calculates residuals based on the spatial correlation between image pixels, which can effectively reduce the amount of data.
[0048] S422. Perform 16x16 DCT transformation and quantization on the spatial residual image to obtain a spatial quantized image. Similar to the associated compression, DCT transformation and quantization are used to further compress the data.
[0049] S423. Perform entropy coding on the spatial quantized image to obtain spatial domain compressed data. Entropy coding further removes redundant information to achieve lossless compression.
[0050] For example, a spatial prediction method is used for a single, isolated image. The current pixel value is predicted using the average value of neighboring pixels, resulting in a small residual image. The residual image is then transformed with a 16x16 DCT and quantized, with high-frequency components discarded. Finally, entropy coding is performed to obtain spatially compressed data.
[0051] S43. Splicing the associated compressed data and the spatial compressed data to obtain component compressed data, and splicing the associated compressed data and the spatial compressed data to form complete component compressed data. The splicing order can be based on the original arrangement order of the homogeneous images and the single orphan images, or another agreed order, so that they can be accurately distinguished and extracted during decompression.
[0052] For example, the format of component compressed data can be defined as: associated compressed data length + associated compressed data + spatial compressed data length + spatial compressed data. During decompression, the associated compressed data length is first read, the associated compressed data is extracted, then the spatial compressed data length is read and the spatial compressed data is extracted. Decompression is then performed separately to restore the original component image data.
[0053] Through the associative spatial compression method, associative compression is used for homogeneous images, and spatial compression is used for single-piece images. The compressed data of the two are then spliced together to achieve effective compression of component image data. This not only reduces storage space and transmission bandwidth requirements, but also retains the key details and features of the image, providing high-quality image data support for subsequent AR scene loading and display.
[0054] S5. Perform information matching and compression on the structural data of the mortise and tenon product to obtain structural compression data.
[0055] S51. Using a data prediction method to obtain structural data residuals for the structural data of the mortise and tenon product, wherein the structural data residuals include direction residuals, rotation residuals, and position residuals.
[0056] S52. Obtaining direction residual, rotation residual and position residual according to the component direction data, the component rotation data and the component position data, respectively, wherein the direction residual is determined according to the forward difference method, the rotation residual is determined according to the arithmetic mean, and the position residual is determined according to the median, which is specifically described as: 1. Directional residual: The component direction data is reordered to generate reordered data, with image number first and component number second. Image number and component number represent different dimensions of information, respectively. Prioritizing image number allows the overall image to be sorted first, and then arranged within the image by component number, making the data more regular and easier to process. For example, suppose there are two isomorphic images, numbered 1 and 2, each with three components numbered a, b, and c. After reordering by image number priority, the order is: a, b, c for image 1, and a, b, c for image 2.
[0057] The forward difference method is used to calculate the difference between adjacent data to obtain the coordinate angle residual for the rearranged data. The forward difference method can highlight the change trend of the data. The difference between adjacent data is usually small, which is conducive to subsequent compression.
[0058] A relative difference coding method is applied to the coordinate angle residual to obtain a direction residual. The relative difference coding is performed according to the relative relationship between the coordinate angle residual and a reference value, thereby further reducing the amount of data.
[0059] 2. Rotation residual: The arithmetic mean of the rotation data of all the components is calculated to obtain the rotation mean, which can reflect the central tendency of the rotation data and is used as a benchmark value to calculate the rotation residual.
[0060] The rotation residual is obtained by subtracting the rotation data of each component from the rotation mean. The rotation residual indicates the degree of deviation of the rotation data of each component from the mean. The absolute value is usually small, which is convenient for encoding and compression.
[0061] 3. Position residual: The median of the spatial coordinates of all the components is calculated to obtain the position median. The median is insensitive to outliers and can better represent the center position of the component position data.
[0062] The position residuals are obtained by subtracting the position data of each component from the position median. The position residuals represent the deviation of the position data of each component from the median, and usually have a certain regularity and a small value range.
[0063] For example, suppose the component orientation data is rearranged so that the x-axis angles are [30°, 32°, 35°, 33°, 34°, 36°]. Using the forward difference method, the coordinate angle residuals are [30°, 2°, 3°, -2°, 1°, 2°]. Using relative difference coding, taking the baseline value of 30° as an example, the orientation residuals are encoded as [0, +2°, +3°, -2°, +1°, +2°]. If the component rotation data is [45°, 47°, 46°, 48°], the arithmetic mean is (45+47+46+48) / 4=46.5°, and the rotation residuals are [-1.5°, +0.5°, -0.5°, +1.5°]. The component space coordinates are [(100,100,200), (101,101,201), (99,99,199), (102, 102,202)], the median is (100.5,102,200.5), and the position residuals are [(-0.5, -0.5, -0.5), (+0.5, +0.5, +0.5), (-0.5, -0.5, -0.5), (+1.5, +1.5, +1.5)].
[0064] S52. Apply Exponential Golomb coding to the structural data residual to obtain structural compressed data.
[0065] S6. Encapsulate the header information compressed data, the component compressed data, and the structure compressed data according to the image sequence number and the isomorphic sequence number to obtain AR compressed data.
[0066] S61. The component compressed data is byte-level aligned to obtain component spliced data, wherein the component spliced data has a preset byte length. The byte-level alignment is to adjust the component compressed data according to the byte boundary to ensure that the data is arranged according to a fixed byte length, thereby improving storage and transmission efficiency and facilitating subsequent reading and processing.
[0067] For example, if the length of the component compressed data is 125 bytes, 3 bytes of padding data may be added after byte-level alignment to make it 128 bytes (aligned to a 16-byte boundary) to form component spliced data.
[0068] S62. Each component splicing data is individually encapsulated according to the image serial number and the isomorphic serial number to obtain component encapsulation data so that the access address of each component encapsulation data is unique. The individual encapsulation is to distinguish the component splicing data according to the image serial number and the isomorphic serial number, and generate independent encapsulation data for each component to facilitate subsequent random access and independent processing.
[0069] For example, component stitching data includes data for homogeneous images 1, 2, and 3, and single-piece images A and B. During packaging, the data is packaged into homogeneous image 1 data packet, homogeneous image 2 data packet, and so on, according to the image sequence number and homogeneous sequence number. Each data contains the component stitching data and identification information of the corresponding image.
[0070] S63. Encapsulate the header information compressed data, the component encapsulation data and the structure compressed data as a whole to obtain AR compressed data.
[0071] For example, the following format is used: header information compressed data length (4 bytes) + header information compressed data, component package data quantity (2 bytes) + each component package data length (4 bytes) + component package data, structure compressed data length (4 bytes) + structure compressed data. Through the above steps, the header information, component and structure data are integrated into ordered AR compressed data to ensure that the subsequent decompression can correctly extract and restore the data.
[0072] The AR data compression method and system for mortise and tenon products of this embodiment significantly improve the compression rate while retaining the millimeter-level texture details of the mortise and tenon parts through homogeneous image association compression and isolated image spatial domain compression; through structural data predictive coding and intelligent layered packaging mechanism, data redundancy between components and finished products is eliminated, AR loading efficiency is greatly improved, and the delay and jamming problems caused by traditional solutions are optimized.
[0073] This implementation also provides an AR data compression system for mortise and tenon products. Figure 4 , Figure 4 This is a module block diagram of an AR data compression system for mortise and tenon products, including: The acquisition unit is used to obtain the component image of the mortise and tenon product and the structural data of the mortise and tenon product, wherein the component image of the mortise and tenon product includes multiple isomorphic images and a single solitary image, and the structural data of the mortise and tenon product includes component direction data, component rotation data and component position data.
[0074] A numbering unit is used to mark the component images of the mortise and tenon product so that the isomorphic image and the orphan image have image serial numbers and isomorphic serial numbers respectively, wherein the image serial number is determined by the isomorphic image and the orphan image, the isomorphic serial number is determined by the isomorphic image, and the image serial number includes the isomorphic image serial number and the orphan image serial number.
[0075] The sequence number compression unit is used to perform sequence number compression on the image sequence number and the isomorphic sequence number to obtain header information compressed data.
[0076] The component compression unit is used to perform associated spatial compression on the component image of the mortise and tenon product to obtain component compression data.
[0077] The structure compression unit is used to perform information matching and compression on the structure data of the mortise and tenon product to obtain structure compression data.
[0078] an encapsulation unit, configured to encapsulate the header information compressed data, the component compressed data, and the structure compressed data according to the image sequence number and the isomorphic sequence number to obtain AR compressed data, the encapsulation unit comprising: The splicing subunit is used to align the component compressed data at the byte level to obtain component splicing data, wherein the component splicing data has a preset byte length.
[0079] The separate encapsulation subunit is used to separately encapsulate each component splicing data according to the image sequence number and the isomorphic sequence number to obtain component encapsulation data so that the access address of each component encapsulation data is unique.
[0080] The overall encapsulation subunit is used to overall encapsulate the header information compressed data, the component encapsulation data and the structure compressed data to obtain AR compressed data.
[0081] Although the present application is described herein with reference to various embodiments, those skilled in the art may understand and implement other variations of the disclosed embodiments by reviewing the drawings, the disclosure, and the appended claims in the process of implementing the claimed application. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude a plurality.
[0082] The above is a further detailed description of the present invention in conjunction with specific preferred embodiments, and the specific implementation of the present invention should not be considered to be limited to these descriptions. For those skilled in the art of the present invention, without departing from the concept of the present invention, several simple deductions or substitutions can be made, which should be considered to fall within the scope of protection of the present invention.
Claims
1. A method for compressing AR data of mortise and tenon products, characterized in that: include: Acquire component images of mortise and tenon products and structural data of the mortise and tenon products, wherein the component images of the mortise and tenon products include multiple isomorphic images and a single isolated image, and the structural data of the mortise and tenon products include component orientation data, component rotation data, and component position data; Marking the component images of the mortise and tenon product so that the isomorphic image and the unique product image have image serial numbers and isomorphic serial numbers respectively, wherein the image serial number is determined by the isomorphic image and the unique product image, the isomorphic serial number is determined by the isomorphic image, and the image serial number includes the isomorphic image serial number and the unique product image serial number; Performing sequence number compression on the image sequence number and the isomorphic sequence number to obtain header information compressed data; Performing associated spatial compression on the component images of the mortise and tenon product to obtain component compressed data; Performing information matching and compression on the structural data of the mortise and tenon product to obtain structural compression data; The header information compressed data, the component compressed data and the structure compressed data are encapsulated according to the image sequence number and the isomorphic sequence number to obtain AR compressed data.
2. The AR data compression method for mortise and tenon products according to claim 1, characterized in that: The marking of the component images of the mortise and tenon product so that the isomorphic image and the orphan image have image serial numbers and isomorphic serial numbers respectively, wherein the image serial number is determined by the isomorphic image and the orphan image, the isomorphic serial number is determined by the isomorphic image, and the image serial number includes the isomorphic image serial number and the orphan image serial number, including: Assigning image serial numbers to the plurality of isomorphic images and the single orphan image respectively to obtain serial numbers of the plurality of isomorphic images and serial number of the single orphan image to form an image serial number; An isomorphic sequence number is set for each isomorphic image corresponding to the isomorphic image sequence number to obtain the isomorphic sequence number of the isomorphic image.
3. The AR data compression method for mortise and tenon products according to claim 1, characterized in that: The step of compressing the image sequence number and the isomorphic sequence number to obtain header information compressed data includes: Obtain the fixed-length data of the image sequence number according to the maximum value of the image sequence number; Obtaining isomorphic sequence number fixed-length data according to the maximum value of the isomorphic sequence number of the isomorphic image; Using preset length encoding on the image sequence number fixed length data and the isomorphic sequence number fixed length data to obtain first header compressed data; The second header compressed data and the third header compressed data are obtained by encoding the image serial number of a single orphan image and the serial numbers of multiple isomorphic images using the image serial number fixed length data respectively; The isomorphic sequence numbers of the isomorphic images are encoded using isomorphic sequence number fixed-length data to obtain fourth header compressed data; The header information compressed data is obtained by sequentially splicing the first header compressed data, the second header compressed data, the third header compressed data and the fourth header compressed data.
4. The AR data compression method for mortise and tenon products according to claim 1, characterized in that: The performing associated spatial compression on the component images of the mortise and tenon product to obtain component compressed data includes: Applying associative compression to the plurality of isomorphic images to obtain associative compressed data; Applying spatial domain compression to the single orphan product image to obtain spatial domain compressed data; The associated compressed data and the spatial domain compressed data are concatenated to obtain component compressed data.
5. The AR data compression method for mortise and tenon products according to claim 1, characterized in that: The step of applying associated compression to the plurality of isomorphic images to obtain associated compressed data includes: Dividing the isomorphic image into a reference image and a target image, wherein the reference image is the isomorphic image with the smallest isomorphic sequence number; Set the isomorphic image with the smallest isomorphic sequence number as the reference image, and the remaining isomorphic images as the target images; Obtaining a target residual image and a reference residual image based on the reference image and the target image, wherein the target residual image is obtained by using a method of subtracting pixels at the same position between the reference image and the target image, and the reference residual image is obtained by using a method of subtracting adjacent pixels from the reference image; Performing 32x32 DCT transformation and quantization on the target residual image and the reference residual image to obtain associated quantized images, and performing entropy coding on the associated quantized images to obtain associated compressed data.
6. The AR data compression method for mortise and tenon products according to claim 1, characterized in that: The step of applying spatial domain compression to the single orphan product image to obtain spatial domain compressed data includes: A spatial residual image is obtained by applying a spatial prediction method to the single orphan image; Performing 16x16 DCT transformation and quantization on the spatial residual image to obtain a spatial quantized image; The spatial quantized image is entropy coded to obtain spatial domain compressed data.
7. The AR data compression method for mortise and tenon products according to claim 1, characterized in that: The performing information matching and compression on the structural data of the mortise and tenon product to obtain structural compressed data includes: Using a data prediction method to obtain structural data residuals for the structural data of the mortise and tenon product, wherein the structural data residuals include direction residuals, rotation residuals and position residuals; Obtaining an orientation residual, a rotation residual, and a position residual according to the component orientation data, the component rotation data, and the component position data, respectively, wherein the orientation residual is determined according to a forward difference method, the rotation residual is determined according to an arithmetic mean, and the position residual is determined according to a median; Exponential Golomb coding is used on the direction residual, rotation residual and position residual to obtain structure compressed data.
8. The AR data compression method for mortise and tenon products according to claim 1, characterized in that: The encapsulating the header information compressed data, the component compressed data, and the structure compressed data according to the image sequence number and the isomorphic sequence number to obtain AR compressed data includes: byte-level aligning of the component compressed data to obtain component spliced data, wherein the component spliced data has a preset byte length; Separately encapsulating each component splicing data according to the image serial number and the isomorphic serial number to obtain component encapsulation data so that the access address of each component encapsulation data is unique; The header information compressed data, the component packaged data and the structure compressed data are encapsulated as a whole to obtain AR compressed data.
9. An AR data compression system for mortise and tenon products, characterized in that: include: an acquisition unit, configured to acquire component images of mortise and tenon products and structural data of mortise and tenon products, wherein the component images of the mortise and tenon products include multiple isomorphic images and a single isolated image, and the structural data of the mortise and tenon products include component orientation data, component rotation data, and component position data; a numbering unit for marking component images of the mortise and tenon product so that the isomorphic image and the orphan image have image serial numbers and isomorphic serial numbers respectively, wherein the image serial number is determined by the isomorphic image and the orphan image, the isomorphic serial number is determined by the isomorphic image, and the image serial number includes the isomorphic image serial number and the orphan image serial number; a sequence number compression unit, configured to perform sequence number compression on the image sequence number and the isomorphic sequence number to obtain header information compressed data; A component compression unit, configured to perform associated spatial compression on the component image of the mortise and tenon product to obtain component compressed data; A structure compression unit, configured to perform information matching and compression on the structure data of the mortise and tenon product to obtain structure compressed data; The encapsulation unit is used to encapsulate the header information compressed data, the component compressed data and the structure compressed data according to the image sequence number and the isomorphic sequence number to obtain AR compressed data.
10. The AR data compression system for mortise and tenon products according to claim 9, characterized in that: The encapsulation unit is configured to encapsulate the header information compressed data, the component compressed data, and the structure compressed data according to the image sequence number and the isomorphic sequence number to obtain AR compressed data, including: a splicing subunit, configured to align the component compressed data at a byte level to obtain component splicing data, wherein the component splicing data has a preset byte length; a separate encapsulation subunit, configured to separately encapsulate each component splicing data according to the image sequence number and the isomorphic sequence number to obtain component encapsulation data so that an access address of each component encapsulation data is unique; The overall encapsulation subunit is used to overall encapsulate the header information compressed data, the component encapsulation data and the structure compressed data to obtain AR compressed data.