Image compression method, device, electronic equipment and storage medium
By converting 3D model data into 2D position, texture, and depth information to generate compressed images, the problem of difficult 3D model data transmission is solved, achieving efficient image compression and reconstruction, which is applicable to the industrial and technical fields.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2026-03-20
AI Technical Summary
Due to limitations in the processing power of graphics cards and network bandwidth, 3D model data is difficult to transmit in real time, which restricts its application in the industrial field. Existing compression methods, such as sampling-based compression methods, lose accuracy, while geometric feature-based compression methods are computationally complex and time-consuming.
By acquiring point cloud data of the detected object, the three-dimensional information is converted into two-dimensional position information, texture information and depth information based on the transformation relationship, and a compressed image is generated. The transformation relationship is determined based on the extreme position information or projection angle of the point cloud data relative to the projection plane.
It effectively reduces the amount of image data while retaining key information, improves the flexibility and applicability of 3D information conversion, adapts to different scenario requirements, and reduces storage space and transmission time.
Smart Images

Figure CN119722440B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the fields of image processing, point cloud processing and industrial technology, and more particularly, to an image compression method, device, electronic equipment and storage medium. BACKGROUND
[0002] With the development of industrial technology, three-dimensional model data is increasingly widely used in various industrial fields. However, due to the limitations of the processing power of graphics cards and network bandwidth, it is difficult to transmit three-dimensional model data in real time, and thus it is difficult to effectively apply three-dimensional model data in industrial fields.
[0003] In one example, the transmission capacity of three-dimensional model data can be improved by increasing the investment in hardware devices. However, this method not only increases the use cost but also cannot solve the problem of difficult application of three-dimensional model data in industrial fields.
[0004] In another example, it can be considered to compress three-dimensional model data before transmission to improve the application capacity of three-dimensional model data in industrial fields. Image compression refers to the process of reducing the size of three-dimensional model data.
[0005] Therefore, how to effectively compress three-dimensional model data is a problem to be solved. SUMMARY
[0006] Therefore, the present disclosure provides an image compression method, device, electronic equipment and storage medium.
[0007] According to one aspect of the present disclosure, an image compression method is provided, comprising: obtaining point cloud data of a detection object; processing a plurality of three-dimensional information included in the point cloud data based on a conversion relationship to obtain at least one of two-dimensional position information, texture information and depth information, the conversion relationship being determined according to extreme position information of the point cloud data relative to a projection plane or a projection angle of the three-dimensional information relative to the projection plane; and generating a compressed image of the detection object for the projection plane according to at least one of the two-dimensional position information, the texture information and the depth information.
[0008] According to another aspect of the present disclosure, an image compression apparatus is provided, comprising: a first obtaining module configured to obtain point cloud data of a detection object; a first processing module configured to process a plurality of three-dimensional information included in the point cloud data based on a conversion relationship to obtain at least one of two-dimensional position information, texture information and depth information, the conversion relationship being determined according to extreme position information of the point cloud data relative to a projection plane or a projection angle of the three-dimensional information relative to the projection plane; and a first generating module configured to generate a compressed image of the detection object relative to the projection plane according to the at least one of the two-dimensional position information, the texture information and the depth information.
[0009] According to another aspect of the present disclosure, an electronic device is provided, comprising: one or more processors; a memory configured to store one or more instructions, wherein the one or more instructions, when executed by the one or more processors, cause the one or more processors to implement a method as described in the present disclosure.
[0010] According to another aspect of the present disclosure, a computer-readable storage medium is provided, having stored thereon executable instructions that, when executed by a processor, cause the processor to implement a method as described in the present disclosure.
[0011] According to another aspect of the present disclosure, a computer program product is provided, comprising computer executable instructions for implementing a method as described in the present disclosure when executed by a processor. BRIEF DESCRIPTION OF DRAWINGS
[0012] The above and other objects, features and advantages of the present disclosure will become more apparent from the following description when taken in conjunction with the accompanying drawings, in which:
[0013] Figure 1 A system architecture to which an image compression method according to an embodiment of the present disclosure can be applied is schematically shown;
[0014] Figure 2 A flowchart of an image compression method according to an embodiment of the present disclosure is schematically shown;
[0015] Figure 3 An example schematic diagram of an image compression process according to an embodiment of the present disclosure is schematically shown;
[0016] Figure 4 An example schematic diagram of an image compression process according to another embodiment of the present disclosure is schematically shown;
[0017] Figure 5 A block diagram of an image compression apparatus according to an embodiment of the present disclosure is schematically shown; and
[0018] Figure 6 A block diagram of an electronic device suitable for implementing an image compression method according to an embodiment of the disclosure is schematically shown. DETAILED DESCRIPTION
[0019] Hereinafter, embodiments of the disclosure will be described with reference to the accompanying drawings. It should be understood, however, that the description is merely exemplary of the disclosure and is not intended to limit the scope of the disclosure. In the following detailed description of the embodiments of the disclosure, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the disclosure. However, it would be apparent to one skilled in the art that the embodiments of the disclosure can be practiced without these specific details. In other instances, well-known structures and techniques have not been described in detail in order to avoid obscuring aspects of the disclosure.
[0020] The terms used herein are merely used to describe specific embodiments and are not intended to limit the disclosure. The terms "include", "comprise" and the like used herein indicate the presence of the described features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0021] All terms used herein, including technical and scientific terms, have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of the specification, and should not be interpreted in an idealized or overly formal manner.
[0022] In the case of using expressions similar to "at least one of A, B, and C, etc.", in general, it should be interpreted as having the meaning of including at least one of the items, but not limited to the items (for example, "a system having at least one of A, B, and C" should include a system having A alone, a system having B alone, a system having C alone, a system having A and B together, a system having A and C together, a system having B and C together, and / or a system having A, B, and C together, etc.).
[0023] In the technical solutions of the present disclosure, the user information (including but not limited to user personal information, user image information, user equipment information, such as location information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved are information and data authorized by the user or authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of related data comply with relevant laws, regulations and standards, necessary security measures are taken, do not violate public order and good customs, and provide corresponding operation portal for user to choose authorization or refusal.
[0024] In one example, the image compression method can include a sampling-based compression method and a geometry feature-based compression method.
[0025] The sampling-based compression method can refer to a method of reducing the amount of data by down-sampling the three-dimensional model data to achieve compression. However, the sampling-based compression method can lose the accuracy of the three-dimensional model data, and since this method is prone to data loss, it cannot be applied to scenarios with high accuracy requirements.
[0026] The geometry feature-based compression method can refer to a method of regarding the three-dimensional model data as a two-dimensional network image with geometric structure, analyzing and compressing the two-dimensional network image to achieve compression. For example, the geometry feature-based compression method can include a curvature-based compression method and a polyhedral fitting-based compression method. However, since the calculation process of the geometry feature-based compression method is relatively complex, the compression process of this method is time-consuming.
[0027] Therefore, how to effectively compress three-dimensional model data and reconstruct compressed image data is an urgent problem to be solved.
[0028] To this end, the present disclosure provides an image compression method, device, electronic equipment and storage medium, which can be applied to the fields of image processing, point cloud processing and industrial technology. The image compression method comprises: obtaining point cloud data of a detection object; processing a plurality of three-dimensional information included in the point cloud data respectively based on a conversion relationship to obtain at least one of two-dimensional position information, texture information and depth information, the conversion relationship being determined according to extreme position information of the point cloud data relative to a projection plane or a projection angle of the three-dimensional information relative to the projection plane; and generating a compressed image of the detection object for the projection plane according to the at least one of the two-dimensional position information, the texture information and the depth information.
[0029] Figure 1 The system architecture to which the image compression method according to the embodiments of the present disclosure can be applied is schematically shown. It should be noted that, Figure 1 The system architecture shown is only an example of the system architecture to which the embodiments of the present disclosure can be applied, to help those skilled in the art understand the technical content of the present disclosure, but does not mean that the embodiments of the present disclosure cannot be applied to other devices, systems, environments or scenarios.
[0030] As Figure 1 shown, the system architecture 100 according to this embodiment can include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104 and a server 105. The network 104 is a medium for providing a communication link between different devices.
[0031] It should be noted that the image compression method provided by the embodiments of the present disclosure can generally be executed by the server 105. Accordingly, the image compression device provided by the embodiments of the present disclosure can generally be arranged in the server 105.
[0032] Alternatively, the image compression method provided by the embodiments of the present disclosure can also be executed by the first terminal device 101, the second terminal device 102 or the third terminal device 103. Correspondingly, the image compression apparatus provided by the embodiments of the present disclosure can also be arranged in the first terminal device 101, the second terminal device 102 or the third terminal device 103.
[0033] It should be understood that Figure 1 The number of terminal devices, networks and servers in the above system architecture is only illustrative. According to the implementation needs, there can be any number of terminal devices, networks and servers.
[0034] It should be noted that the serial numbers of the various operations in the following method are only used to represent the operations for description, and should not be regarded as representing the execution sequence of the various operations. Unless explicitly indicated, the method does not need to be executed in the order shown.
[0035] The above describes the system architecture to which the image compression method provided by the present disclosure can be applied. The following will further describe the image compression process of the present disclosure by taking Figure 2 as an example.
[0036] Figure 2 A flowchart of the image compression method according to the embodiments of the present disclosure is schematically shown.
[0037] As shown in Figure 2 , the image compression method 200 includes operations S210-S230.
[0038] In operation S210, point cloud data of a detection object is acquired.
[0039] In operation S220, based on a conversion relationship, a plurality of three-dimensional information included in the point cloud data is respectively processed to obtain at least one of two-dimensional position information, texture information and depth information, the conversion relationship being determined according to extreme position information of the point cloud data relative to a projection plane, or a projection angle of the three-dimensional information relative to the projection plane.
[0040] In operation S230, a compressed image of the detection object for the projection plane is generated according to at least one of the two-dimensional position information, the texture information and the depth information.
[0041] The image compression process can refer to a process of compressing point cloud data in a three-dimensional space into a compressed image in a two-dimensional plane. The detected object can refer to a target or object that needs to be focused on in the image compression process. The point cloud data of the detected object can refer to data composed of a series of three-dimensional information on the surface of the target or object. The point cloud data represents the external shape, structure, and geometric information of the detected object. The point cloud data includes a plurality of points. The three-dimensional information can include three-dimensional position information and texture information. The three-dimensional position information can represent the position of each point in the three-dimensional space relative to a certain reference origin. For example, the three-dimensional position information can include X, Y, and Z coordinates. The acquisition method of the point cloud data can be configured according to actual business needs, which is not limited here. For example, the acquisition method of the point cloud data can include at least one of the following: a laser radar-based acquisition method, a structured light projection-based acquisition method, and a stereo matching-based acquisition method using a binocular or multi-view camera, etc.
[0042] After obtaining the point cloud data, at least one of the two-dimensional position information, the texture information, and the depth information can be obtained by processing the plurality of three-dimensional information in the point cloud data based on the conversion relationship. The two-dimensional position information can represent the position of each point of the detected object in the two-dimensional plane relative to a certain reference origin. For example, the two-dimensional position information can include X and Y coordinates, where the X coordinate is used to describe the position of the point in the horizontal direction, and the Y coordinate is used to describe the position of the point in the vertical direction. The depth information can represent the distance between each point and the perspective or a certain reference surface.
[0043] In one example, the conversion relationship can be determined according to the extreme position information of the point cloud data relative to the projection plane. The extreme position information can include the maximum and minimum coordinate values of the point cloud data on the two coordinate axes of the projection plane, and the positive and negative directions perpendicular to the projection plane. In this case, the three-dimensional information can be processed based on the extreme position information to convert the points in the three-dimensional space to points in the two-dimensional plane, to obtain at least one of the two-dimensional position information, the texture information, and the depth information.
[0044] In another example, the conversion relationship can be determined according to the projection angle of the three-dimensional information relative to the projection plane. The projection angle can refer to the angle of the three-dimensional information projected on the projection plane, i.e., the angle between a certain point in the three-dimensional space and the projection plane. The projection angle is obtained by projecting the three-dimensional information in the three-dimensional space onto the two-dimensional plane and calculating the angle between the projected vector and the normal vector of the projection plane. In this case, the three-dimensional information can be processed based on the projection angle to convert the points in the three-dimensional space to points in the two-dimensional plane, to obtain at least one of the two-dimensional position information, the texture information, and the depth information.
[0045] After obtaining at least one of the two-dimensional position information, the texture information and the depth information, a compressed image of the detection object for the projection plane can be generated. The compressed image can refer to an image in a two-dimensional plane obtained after compression processing of three-dimensional information for representing the detection object in a three-dimensional space is performed to reduce a file size of the three-dimensional information or to speed up transmission when the three-dimensional information is projected to the two-dimensional plane.
[0046] The generation manner of the compressed image can be configured according to actual business requirements, which is not limited herein. For example, the generation method of the compressed image can include at least one of the following: generating the compressed image according to the two-dimensional position information and the texture information; generating the compressed image according to the two-dimensional position information and the depth information; and generating the compressed image according to the two-dimensional position information, the texture information and the depth information. The file format of the compressed image can be a Portable Network Graphics (PNG) and a Bitmap (BMP) format.
[0047] The shape of the detection object can be configured according to actual business requirements, which is not limited herein. For example, the shape of the detection object can include at least one of the following: a sphere, a cube, a cylinder, a cone, a polyhedron and an irregularly shaped body, etc. In an example, the detection object of the sphere can include a workpiece with a spherical or approximately spherical shape, which can be a complete sphere or a partial sphere, such as a spherical surface and a hemispherical surface, etc.
[0048] According to the embodiments of the present disclosure, by processing the three-dimensional information of the detection object in the three-dimensional space in combination with the conversion relationship, the accuracy of the two-dimensional position information, the texture information and the depth information can be improved. In this process, since the conversion relationship is determined according to the extreme position information of the point cloud data relative to the projection plane, or the projection angle of the three-dimensional information relative to the projection plane, the conversion relationship can adapt to the needs of different scenes, and the flexibility and applicability of the three-dimensional information conversion are improved. On this basis, by generating the compressed image of the detection object according to at least one of the two-dimensional position information, the texture information and the depth information, the amount of image data can be effectively reduced while the key information is retained.
[0049] In the embodiments of the present disclosure, the conversion relationship can be determined according to the extreme position information of the point cloud data relative to the projection plane, which will be described below in combination with Figure 3 The process of realizing image compression based on the conversion relationship determined according to the extreme position information of the point cloud data relative to the projection plane will be further described.
[0050] Figure 3 An example schematic diagram of the process of image compression according to an embodiment of the present disclosure is schematically shown.
[0051] In 300, taking a sphere as the detection object and an XOY plane as the projection plane as an example, the image compression process is illustrated. The target image resolution of the compressed image to be generated can be pre-configured, and an initialized compressed image is generated based on the target image resolution.
[0052] As shown in Figure 3 Based on the XOY projection plane, the point cloud data can be divided into two hemispheres, i.e., a hemisphere 301 along the positive direction of the Z axis and a hemisphere 302 along the negative direction of the Z axis.
[0053] In the hemisphere 301 along the positive direction of the Z axis, for the three-dimensional position information (x1, y1, z1) of any point A0 in the hemisphere 301, the three-dimensional position information can be projected into a two-dimensional plane to obtain the two-dimensional position information (ix1, iy1) of the corresponding point A1. The manner of determining the two-dimensional position information from the three-dimensional position information can be configured according to actual business requirements, which is not limited herein. For example, the determination manner can include at least one of the following: projection method, dimension reduction method, coordinate conversion method, etc. The projection method refers to projecting the three-dimensional position information through a projection plane onto a two-dimensional plane to obtain the two-dimensional position information through orthogonal projection or perspective projection. The dimension reduction method refers to converting the three-dimensional position information into two-dimensional position information using dimension reduction techniques such as principal component analysis. The coordinate conversion method refers to converting the three-dimensional position information into two-dimensional position information using a pre-set mathematical formula.
[0054] For example, in the application scenario where the detection object is a sphere, the detection object can be a workpiece with a spherical or approximately spherical shape. The point cloud data can include a set of three-dimensional position information of the sphere or the approximately spherical workpiece obtained by a point cloud acquisition device, and correspondingly, the compressed image can include a set of two-dimensional position information of a circular or semi-circular shape corresponding to the detection object.
[0055] In one example, the limit position information can include the maximum coordinate value and the minimum coordinate value of the point cloud data on each of the two coordinate axes of the projection plane. The maximum coordinate value and the minimum coordinate value of the point cloud data on each of the two coordinate axes of the projection plane can refer to the range of the point cloud data projected on the two coordinate axes. The maximum coordinate value represents the farthest point position in the positive direction and the nearest point position in the negative direction of the coordinate axis, while the minimum coordinate value represents the farthest point position in the negative direction and the nearest point position in the positive direction of the coordinate axis.
[0056] On this basis, the first ratio can be determined according to the coordinate value corresponding to the projection plane in the three-dimensional position information, and the distance between the maximum coordinate value and the minimum coordinate value. The two-dimensional position information is determined based on the target image resolution and the first ratio.
[0057] The coordinate value corresponding to the projection plane can refer to a coordinate value of a projection of the detection object in the three-dimensional space on the projection plane. For example, taking the XOY projection plane as an example, when the detection object is projected onto the XOY projection plane, the x coordinate and the y coordinate that are simultaneously projected onto the XOY plane can be used to describe the position of the detection object on the XOY projection plane, but do not contain the position information of the detection object in the direction perpendicular to the projection plane. For example, in the application scenario in which the detection object is a sphere, the coordinate value corresponding to the projection plane can refer to the coordinate value of a point corresponding to the diameter of a circular or semicircular shape obtained by projecting the point cloud data on the projection plane.
[0058] In one specific example, the process of processing the three-dimensional position information according to the limit position information to obtain the two-dimensional position information can be shown in the following formula (1) and formula (2).
[0059] (1) (2)
[0060] wherein, and the coordinate value corresponding to the projection plane in the three-dimensional position information, the minimum coordinate value of the point cloud data on the X coordinate axis, the maximum coordinate value of the point cloud data on the X coordinate axis, the minimum coordinate value of the point cloud data on the Y coordinate axis, the maximum coordinate value of the point cloud data on the Y coordinate axis, the width information in the target image resolution, the height information in the target image resolution, and the two-dimensional position information.
[0061] According to the embodiments of the present disclosure, by utilizing the distance between the coordinate value corresponding to the projection plane and the maximum coordinate value and the minimum coordinate value in the three-dimensional position information to determine the first ratio, the two-dimensional position information can be accurately determined at different spatial positions. On this basis, by determining the two-dimensional position information based on the target image resolution and the first ratio, since the target image resolution can be flexibly adjusted according to actual needs, the detection object can be made to perform more clearly and accurately at the required resolution.
[0062] In one example, after obtaining the two-dimensional position information corresponding to each point in hemisphere 301, since the same two-dimensional position information may correspond to multiple three-dimensional position information, the target attribute information of each two-dimensional position information can be determined based on the attribute information of each of the multiple three-dimensional position information corresponding to that two-dimensional position information. The attribute information may include attributes such as color, density, and material of the three-dimensional position information. For example, predetermined conditions can be set, and it can be determined whether the multiple attribute information corresponding to the two-dimensional position information meets the predetermined conditions. The predetermined conditions can be determined based on predetermined attribute information, which can be 0.
[0063] In another example, if multiple attribute information corresponding to the two-dimensional location information meets predetermined conditions, the target attribute information can be determined based on the predetermined attribute information. For example, an accumulated value can be determined based on the predetermined attribute information and a preset value, and the accumulated value can be used as the target attribute information. The preset value can be 1.
[0064] Alternatively, if multiple attribute information corresponding to the two-dimensional location information does not meet the predetermined conditions, the target attribute information can be determined from the attribute information of each of the multiple three-dimensional location information corresponding to the two-dimensional location information. The method for determining the target attribute information can be configured according to actual business needs and is not limited here.
[0065] Target attribute information can be determined from the attribute information of multiple three-dimensional location information corresponding to two-dimensional location information based on filtering rules. Filtering rules can include at least one of the following: maximum value method, weighted average method, threshold method, or region method. The maximum value method selects the attribute information with the largest value as the target attribute information. The weighted average method calculates the target attribute information by averaging the values of multiple attribute information according to certain weights. The threshold method sets a threshold to select attribute information that is higher or lower than the threshold as the target attribute information. The region method selects the target attribute information based on the spatial relationship between attribute information.
[0066] Based on this, a texture image 303 corresponding to hemisphere 301 can be generated according to the target attribute information of each two-dimensional location information. For example, the attribute information corresponding to point A0 (x1, y1, z1) in the point cloud data can be stored in the texture image 303 at the position corresponding to point A1 (ix1, iy1).
[0067] In addition, the three-dimensional position information can be processed to obtain depth information of the corresponding point A1. On this basis, the depth image 304 corresponding to the hemisphere 301 can be generated according to the depth information of each two-dimensional position information. For example, the z1 value corresponding to the point A0 (x1, y1, z1) in the point cloud data is stored in the depth image 304 corresponding to the point A1 (ix1, iy1).
[0068] For example, in the application scenario where the detected object is a sphere, the point cloud data can include a set of three-dimensional position information of the sphere obtained by using a point cloud acquisition device, and the texture image 303 and the depth image 304 can include a set of two-dimensional position information corresponding to the detected object in the form of a circle.
[0069] According to an embodiment of the present disclosure, by automatically determining and selecting attribute information meeting predetermined conditions, and determining target attribute information from attribute information of each of the plurality of three-dimensional position information by setting a filtering rule, it can be ensured that the selected attribute is more representative, which helps to improve the generation effect of the subsequent texture image. On this basis, by taking the maximum value or the average value as the target attribute information, it helps to eliminate the interference of random noise on the attribute information, so that the data processing result is more consistent and stable. In addition, by generating the texture image according to the target attribute information of each two-dimensional position information, the compression effect of the point cloud data can be effectively improved.
[0070] In one example, the extreme position information can further include maximum coordinate values and minimum coordinate values of the point cloud data in the positive direction and the negative direction perpendicular to the projection plane. The maximum coordinate value represents the farthest point position in the positive direction and the closest point position in the negative direction of the point cloud data perpendicular to the projection plane, and the minimum coordinate value represents the closest point position in the positive direction and the farthest point position in the negative direction of the point cloud data perpendicular to the projection plane.
[0071] On this basis, a second ratio can be determined based on the coordinate value corresponding to the coordinate axis perpendicular to the projection plane in the three-dimensional position information, and the distance between the maximum coordinate value and the minimum coordinate value. The depth information is determined based on the target image resolution and the second ratio. In addition, the depth information can be further processed to obtain processed depth information. The processing method can include scaling, adding or subtracting, etc.
[0072] The coordinate value corresponding to the coordinate axis perpendicular to the projection plane can refer to the height or depth in the three-dimensional space. For example, taking the XOY projection plane as an example, when the detection object is projected onto the XOY projection plane, the coordinate value of the positive direction of the z coordinate and the coordinate value of the negative direction of the z coordinate can be used to describe the height or depth position of the detection object in the direction perpendicular to the projection plane, i.e., the height or depth position of the object in the three-dimensional space. For example, in the application scenario where the detection object is a sphere, the coordinate value corresponding to the coordinate value perpendicular to the projection plane can refer to the coordinate value of the point corresponding to the diameter of the circle or semicircle obtained by projecting the point cloud data on the plane perpendicular to the projection plane.
[0073] In one specific example, the process of processing the three-dimensional position information according to the limit position information to obtain the depth information can be as shown in the following formula (3) and formula (4).
[0074] (3) (4)
[0075] wherein, characterizing the coordinate value corresponding to the coordinate axis perpendicular to the projection plane in the three-dimensional position information, characterizing the minimum coordinate value of the point cloud data in the negative direction perpendicular to the projection plane, characterizing the maximum coordinate value of the point cloud data in the negative direction perpendicular to the projection plane, characterizing the depth information of the two-dimensional position information in the negative direction perpendicular to the projection plane, characterizing the minimum coordinate value of the point cloud data in the positive direction perpendicular to the projection plane, characterizing the maximum coordinate value of the point cloud data in the positive direction perpendicular to the projection plane, characterizing the depth information of the two-dimensional position information in the positive direction perpendicular to the projection plane.
[0076] According to the embodiments of the present disclosure, by utilizing the coordinate value corresponding to the coordinate axis perpendicular to the projection plane in the three-dimensional position information, the depth information of the detection object can be more accurately obtained, the error caused by the change of the viewing angle is reduced, and the reliability of the depth information is improved. On this basis, by generating the depth image according to the respective depth information of each two-dimensional position information, the compression effect of the point cloud data can be effectively improved.
[0077] In another specific example, the three-dimensional position information can also be processed according to the projection angle of the three-dimensional position information relative to the projection plane to obtain at least one of the two-dimensional position information and the depth information. The process can be as shown in the following formula (5)~formula (9).
[0078] (5) (6) (7) (8) (9)
[0079] wherein, and The projection angle is characterized. It should be noted that part of the formula provided in the disclosure is given taking the detection object as a sphere as an example, but the shape of the detection object to which the image compression method of the disclosure is applicable can be configured according to actual business needs, which is not limited here.
[0080] In the hemisphere 302 along the positive direction of the Z axis, for the three-dimensional position information (x2, y2, z2) of any point B0 in the hemisphere 302, the three-dimensional position information can be projected into a two-dimensional plane to obtain the two-dimensional position information (ix2, iy2) of the corresponding point B1.
[0081] After obtaining the two-dimensional position information corresponding to each point in the hemisphere 302, the target attribute information of each two-dimensional position information can be determined according to the attribute information of the respective three-dimensional position information corresponding to the two-dimensional position information. In addition, the three-dimensional position information can be processed to obtain the depth information of the corresponding point.
[0082] The generation method of the compressed image can be configured according to actual business needs, which is not limited here. For example, considering the least storage, a texture image can be generated based on the attribute information of each two-dimensional position information, and a depth image can be generated based on the depth information of each two-dimensional position information. Alternatively, considering the number of images or in the case where the accuracy requirement is not high, the attribute information and the depth information of each two-dimensional position information can be stored in different channels of the same compressed image.
[0083] In 300, taking the example that the compressed image includes a texture image and a depth image, the texture image can be used to store the attribute information of each point, and the depth image can be used to store the depth information of each point. The texture image 305 corresponding to the hemisphere 302 can be generated according to the target attribute information of each two-dimensional position information. For example, the attribute information corresponding to the point B0 (x2, y2, z2) in the point cloud data is stored in the texture image 305 corresponding to the point B1 (ix2, iy2). The depth image 306 corresponding to the hemisphere 302 can be generated according to the depth information of each two-dimensional position information. For example, the z2 value corresponding to the point B0 (x2, y2, z2) in the point cloud data is stored in the depth image 306 corresponding to the point B1 (ix2, iy2).
[0084] For example, in the application scenario where the detection object is a sphere, the point cloud data can include a set of three-dimensional position information of the sphere obtained by using a point cloud acquisition device, and corresponding to which, the texture image 305 and the depth image 306 can include a set of two-dimensional position information corresponding to the detection object in a circle.
[0085] It should be noted that the adjustment of the compression level can be realized by adjusting the target image resolution. For example, in the case of needing to retain high-precision details, the compression level is high, and the target image resolution can be set to a higher resolution. Alternatively, in the case of needing to display the compressed image in real time, the compression level is low, and the target image resolution can be set to a lower resolution. In addition, in the case of reducing the target image resolution, the problem of the generated compressed image having obvious light-dark boundaries due to the uneven brightness of the perspective images can be reduced.
[0086] After obtaining the texture image 303 and the depth image 304 corresponding to the hemisphere 301, and the texture image 305 and the depth image 306 corresponding to the hemisphere 302, the point cloud data, the texture image 303, the depth image 304, the texture image 305, and the depth image 306 can also be stored in association.
[0087] For example, the size of the point cloud data is 1.36G, and in the case of the target image resolution being 10328*5164, the size of the generated compressed image is 82.9M, the storage space is reduced, and the information retention reaches more than 98.2%.
[0088] In the embodiments of the present disclosure, the conversion relationship can also be determined according to the projection angle of the three-dimensional position information relative to the projection plane, which will be described below in combination with Figure 4 The process of realizing image compression based on the conversion relationship determined according to the projection angle of the three-dimensional position information relative to the projection plane will be further described.
[0089] Figure 4 An example schematic diagram of the image compression process according to another embodiment of the present disclosure is schematically shown.
[0090] As Figure 4 shown, in 400, taking the detection object as a sphere and XOY as the projection plane as an example, the image compression process is described. The target image resolution of the compressed image expected to be generated can be set in advance, and an initialized compressed image is generated based on the target image resolution.
[0091] As Figure 4 shown, for the three-dimensional position information (x3, y3, z3) of any point C0 in the point cloud data, the three-dimensional position information can be projected into the two-dimensional plane XOY to obtain the two-dimensional position information (ix3, iy3) of the corresponding point C1. The projection angle can refer to the observation or projection direction adopted when the three-dimensional position information is projected into the two-dimensional plane XOY, which can be defined as the direction of the ray starting from the origin in the three-dimensional space.
[0092] On this basis, the third ratio can be determined according to the projection angle and the preset angle range. The two-dimensional position information is determined according to the target image resolution and the third ratio. The preset angle range can represent the viewing angle of the point cloud data acquisition device, that is, the observation angle or field of view of the acquisition device when acquiring the point cloud data.
[0093] In one example, the projection angle can include a first pitch angle and a first azimuth angle . The first pitch angle may refer to the angle between the positive direction of the Z axis and the position of the three-dimensional position information in the three-dimensional space relative to the XOY plane, usually varying between -π / 2 and π / 2, and the first pitch angle may be used to describe the height or depth of the three-dimensional position information relative to the XOY plane. The first azimuth angle may refer to the angle between the positive direction of the Z axis and the projection of the three-dimensional position information on the XOY plane relative to the positive direction of the Z axis, usually varying between 0 and 2π, and the first azimuth angle may be used to describe the position of the three-dimensional position information on the horizontal plane.
[0094] For example, in the application scenario where the detected object is a sphere, the detected object can be a workpiece with a spherical or approximately spherical shape. The point cloud data can include a set of three-dimensional position information of the sphere or approximately spherical object obtained by the point cloud acquisition device, and the corresponding compressed image can include a set of two-dimensional position information in the form of a circle or a semicircle.
[0095] In one specific example, the process of processing the three-dimensional position information according to the projection angle of the three-dimensional position information relative to the projection plane to obtain the two-dimensional position information can be as shown in the following formulas (10)~(14). Formulas (10)~(12) are used to convert the three-dimensional position information into a point in the two-dimensional plane, and formulas (13) and (14) are used to convert the point in the two-dimensional plane into a point in the compressed image according to the target image resolution.
[0096] (10) (11) (12) (13) (14)
[0097] wherein, represents the first pitch angle, represents the first azimuth angle, and represents the two-dimensional position information, represents the width information in the target image resolution, represents the height information in the target image resolution, the preset angle range corresponding to the first pitch angle is , and the preset angle range corresponding to the first azimuth angle is .
[0098] According to the embodiments of the present disclosure, by combining the three-dimensional position information, the projection angle and the preset angle range, the three-dimensional to two-dimensional position information conversion can be more accurate, thereby improving the accuracy of the obtained two-dimensional position information. In addition, since the target image resolution can be flexibly adjusted according to actual needs, the detection object can be made to appear clearer and more accurate at the required resolution.
[0099] After obtaining the two-dimensional position information corresponding to each point in the point cloud data, the target attribute information of each two-dimensional position information can be determined according to the attribute information or the depth information of the respective three-dimensional position information corresponding to the two-dimensional position information. The determination method of the target attribute information is the same as the above-mentioned method of determining the target attribute information according to the extreme position information of the point cloud data relative to the projection plane, which will not be repeated here.
[0100] On this basis, the compressed image corresponding to the point cloud data can be generated according to the target attribute information or the depth information of each two-dimensional position information. For example, the attribute information corresponding to point C0(x3, y3, z3) in the point cloud data is stored in the position corresponding to point C1(ix3, iy3) in the compressed image. When the image brightness of multiple perspectives is not uniform, the brightness in the compressed image can be made more uniform by reducing the target image resolution, so as to improve the compression effect. For example, in the application scenario where the detection object is a sphere, the point cloud data can include a set of three-dimensional position information of the sphere obtained by the point cloud acquisition device, and the compressed image can include a set of two-dimensional position information corresponding to the detection object in the form of a circle.
[0101] Figure 5 A block diagram of an image compression apparatus according to an embodiment of the present disclosure is schematically shown.
[0102] As shown in Figure 5 , the image compression apparatus 500 can include a first acquisition module 510, a first processing module 520 and a first generation module 530.
[0103] The first acquisition module 510 is configured to acquire point cloud data of a detection object.
[0104] The first processing module 520 is configured to process a plurality of three-dimensional information included in the point cloud data based on a conversion relationship to obtain at least one of two-dimensional position information, texture information and depth information, the conversion relationship being determined according to extreme position information of the point cloud data relative to a projection plane, or a projection angle of the three-dimensional information relative to the projection plane.
[0105] The first generation module 530 is configured to generate a compressed image of the detection object for the projection plane according to at least one of the two-dimensional position information, the texture information and the depth information.
[0106] Any of the modules according to embodiments of the present disclosure, or at least portions of any of the modules, can be implemented in one module. Any of the modules according to embodiments of the present disclosure can be split into multiple modules. Any of the modules according to embodiments of the present disclosure can be implemented at least in part as a hardware circuit, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system on chip, a system on board, a system on package, an application specific integrated circuit (ASIC), or any other reasonable manner of hardware or firmware by integrating or packaging circuits, or in software, hardware, and firmware in any one of them or in a proper combination of any of them. Alternatively, one or more of the modules according to embodiments of the present disclosure can be implemented at least in part as computer program modules that, when executed, perform corresponding functions.
[0107] It should be noted that the image compression device part in embodiments of the present disclosure corresponds to the image compression method part in embodiments of the present disclosure, and the description of the image compression device part is specifically referred to the image compression method part, which will not be repeated here.
[0108] Figure 6 A block diagram of an electronic device suitable for implementing the image compression method according to embodiments of the present disclosure is schematically shown. Figure 6 The electronic device shown is merely an example and should not impose any limitation on the functions and use range of embodiments of the present disclosure.
[0109] As shown in Figure 6 The computer electronic device 600 according to embodiments of the present disclosure includes a processor 601, which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 602 or loaded from a storage part 608 into a random access memory (RAM) 603. The processor 601 can include, for example, a general-purpose microprocessor (such as a CPU), an instruction set processor, and / or a related chipset, and / or a special-purpose microprocessor (such as an application specific integrated circuit (ASIC)), etc. The processor 601 can also include an on-board memory for cache use. The processor 601 can include a single processing unit or multiple processing units for performing different actions of the method processes according to embodiments of the present disclosure.
[0110] In the RAM 603, various programs and data required for the operation of the electronic device 600 are stored. The processor 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604.
[0111] According to an embodiment of the present disclosure, the electronic device 600 can further include an input / output (I / O) interface 605 that is also connected to the bus 604. The electronic device 600 can further include one or more of the following components connected to the input / output (I / O) interface 605: an input part 606 including, for example, a keyboard and a mouse; an output part 607 including, for example, a cathode ray tube (CRT), a liquid crystal display (LCD), and a speaker; a storage part 608 including, for example, a hard disk; and a communication part 609 including, for example, a LAN card, a modem, and the like. The communication part 609 performs communication processing via a network such as the Internet. A driver 610 is also connected to the input / output (I / O) interface 605 as necessary. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, and the like is mounted on the driver 610 as necessary, so that a computer program read therefrom is installed in the storage part 608 as necessary.
[0112] The present disclosure also provides a computer readable storage medium, which can be included in the device / apparatus / system described in the above embodiments, or can exist separately without being assembled into the device / apparatus / system. The above computer readable storage medium carries one or more programs, which, when executed, implement the image compression method according to the embodiments of the present disclosure.
[0113] In the present disclosure, the computer readable storage medium can be any tangible medium that contains or stores a program, which can be used by or in connection with an instruction execution system, apparatus, or device.
[0114] Embodiments of the present disclosure also include a computer program product, which includes a computer program containing program codes for executing the method provided by the embodiments of the present disclosure, and when the computer program product is run on an electronic device, the program codes are used to make the electronic device implement the image compression method provided by the embodiments of the present disclosure.
[0115] When the computer program is executed by the processor 601, the above functions defined in the system / apparatus of the embodiments of the present disclosure are performed. According to an embodiment of the present disclosure, the system, apparatus, module, unit, etc. described above can be implemented by computer program modules.
[0116] According to an embodiment of the present disclosure, the program codes of the computer program for executing the embodiments of the present disclosure can be written in any combination of one or more programming languages.
[0117] The flow diagrams and the block diagrams in the drawings are illustrations of possible architectures, functions, and operations for systems, methods, and computer program products in accordance with various embodiments of the present disclosure. It should also be noted that each block in the block diagrams and flow diagrams can be implemented in various ways. As an example, the functionality of the blocks can be implemented by a processor, operating system, or other logic that executes instructions. In this way, blocks can be viewed as specifying functionality rather than as structural elements of a system.
[0118] The embodiments of the present disclosure have been described above. However, these embodiments are merely for the purpose of illustration and not for the purpose of limiting the scope of the present disclosure. Although the respective embodiments are described above separately, this does not mean that the measures in the respective embodiments cannot be used advantageously in combination. The scope of the present disclosure is defined by the appended claims and their equivalents. Various alternatives and modifications can be made to the embodiments of the present disclosure without departing from the scope of the present disclosure, and such alternatives and modifications are intended to fall within the scope of the present disclosure.
Claims
1. An image compression method, comprising: Acquire point cloud data of the object to be detected; Based on the transformation relationship, the multiple three-dimensional information included in the point cloud data are processed respectively to obtain at least one of two-dimensional position information, texture information, and depth information. The transformation relationship is determined based on the extreme position information of the point cloud data relative to the projection plane, or the transformation relationship is determined based on a preset angle range, the target image resolution, and the projection angle of the three-dimensional information relative to the projection plane. The extreme position information includes the maximum and minimum coordinate values of the point cloud data on the two coordinate axes of the projection plane, and along the positive and negative directions perpendicular to the projection plane. The preset angle range characterizes the viewing angle of the point cloud data acquisition device. as well as A compressed image of the detected object relative to the projection plane is generated based on at least one of the two-dimensional position information, texture information, and depth information.
2. The method according to claim 1, wherein, The three-dimensional information includes three-dimensional location information; Based on the transformation relationship, the point cloud data is processed to obtain at least one of the following: two-dimensional position information, texture information, and depth information: For each of the three-dimensional position information, Based on the coordinate values corresponding to the projection plane in the three-dimensional position information, and the distance between the maximum and minimum coordinate values, a first ratio is determined; and The two-dimensional position information is determined based on the target image resolution and the first ratio.
3. The method according to claim 2, further comprising: The second ratio is determined based on the coordinate values corresponding to the coordinate axes perpendicular to the projection plane in the three-dimensional information, and the distance between the maximum coordinate value and the minimum coordinate value; as well as The depth information is determined based on the target image resolution and the second ratio.
4. The method according to any one of claims 1 to 3, wherein, The point cloud data also includes attribute information, and the compressed image includes the texture image of the detected object relative to the projection plane and the depth image of the detected object relative to the projection plane; Generating a compressed image of the detected object based on at least one of the two-dimensional position information, texture information, and depth information includes: The texture image is generated based on each of the two-dimensional position information and the texture information; as well as The depth image is generated based on each of the two-dimensional position information and the depth information.
5. The method according to claim 4, wherein, The step of generating the texture image based on each of the two-dimensional position information and the texture information includes: Based on the filtering rules, target attribute information is determined from the attribute information of each of the multiple three-dimensional information corresponding to the two-dimensional position information. The filtering rules include one of the following: the attribute information with the largest value among the multiple attribute information is taken as the target attribute information. The average value determined based on multiple attribute information is used as the target attribute information; and The texture image is generated based on the target attribute information of each of the two-dimensional positional information.
6. The method according to claim 5, further comprising: If multiple attribute information corresponding to the two-dimensional location information does not meet predetermined conditions, the target attribute information is determined based on the predetermined attribute information, wherein the predetermined conditions are determined based on the predetermined attribute information.
7. The method according to claim 1, wherein, The three-dimensional information includes three-dimensional location information; Based on the transformation relationship, the point cloud data is processed to obtain at least one of the following: two-dimensional position information, texture information, and depth information: For each of the three-dimensional position information, A third ratio is determined based on the projection angle and the preset angle range; and The two-dimensional position information is determined based on the target image resolution and the third ratio.
8. The method according to claim 7, wherein, The point cloud data further includes attribute information, and generating a compressed image of the detected object based on at least one of the two-dimensional position information, texture information, and depth information includes: Based on the filtering rules, target attribute information is determined from the attribute information of multiple three-dimensional information corresponding to the two-dimensional position information; and The compressed image is generated based on the target attribute information of each of the two-dimensional location information.
9. The method according to claim 1, wherein, The object being detected is a sphere.
10. An image compression apparatus, comprising: The first acquisition module is used to acquire point cloud data of the detected object; The first processing module is used to process multiple three-dimensional information included in the point cloud data based on a transformation relationship to obtain at least one of two-dimensional position information, texture information, and depth information. The transformation relationship is determined based on the extreme position information of the point cloud data relative to the projection plane, or the transformation relationship is determined based on a preset angle range, the target image resolution, and the projection angle of the three-dimensional information relative to the projection plane. The extreme position information includes the maximum and minimum coordinate values of the point cloud data on the two coordinate axes of the projection plane, along the positive and negative directions perpendicular to the projection plane. The preset angle range characterizes the viewing angle of the point cloud data acquisition device. as well as The first generation module is used to generate a compressed image of the detected object relative to the projection plane based on at least one of the two-dimensional position information, texture information, and depth information.
11. An electronic device, comprising: One or more processors; Memory, used to store one or more computer programs. The characteristic feature is that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 9.
12. A computer-readable storage medium having a computer program or instructions stored thereon, characterized in that, When the computer program or instructions are executed by a processor, they implement the steps of the method according to any one of claims 1 to 9.
13. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by a processor, they implement the steps of the method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Information processing apparatus and information processing method
CN117242779A
Ordered reconstruction method of laser radar point cloud and computer readable storage medium
CN117607829A
Point cloud coding and decoding method and device based on two-dimensional regularization plane projection
CN118433400A