Image compression method and device, electronic equipment and storage medium

By processing the point cloud data of the three-dimensional model data and generating compressed images, the problem of low data transmission efficiency of the three-dimensional model is solved and efficient data compression and transmission is achieved.

CN119722440AActive Publication Date: 2025-03-28NUCTECH CO LTD +2
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411858392.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-16
Publication Date
2025-03-28
Estimated Expiration
2044-12-16

AI Technical Summary

Technical Problem

The prior art is difficult to effectively compress three-dimensional model data, making it difficult to achieve real-time transmission and application in the industrial field.

Method used

By obtaining the point cloud data of the detection object, processing the three-dimensional information based on the conversion relationship, obtaining two-dimensional position information, texture information and depth information, and generating a compressed image for the projection plane.

Benefits of technology

It realizes effective compression of three-dimensional model data, reduces data size, improves transmission efficiency and application capabilities, and retains key information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119722440A_ABST
    Figure CN119722440A_ABST
Patent Text Reader

Abstract

The invention provides an image compression method and apparatus, an electronic device and a storage medium. The image compression method comprises the steps of obtaining point cloud data of a detection object; on the basis of a conversion relation, multiple pieces of three-dimensional information included in the point cloud data are processed, at least one of two-dimensional position information, texture information and depth information is obtained, and the conversion relation is determined according to limit 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; 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.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the fields of image processing, point cloud processing and industrial technology, and more specifically, to an image compression method, device, electronic device and storage medium. Background Art

[0002] With the development of industrial technology, 3D model data is increasingly used in various industrial fields. However, due to the limitations of graphics card processing power and network bandwidth, 3D model data is difficult to transmit in real time, making it difficult to effectively apply 3D model data in the industrial field.

[0003] In one example, the transmission capacity of the 3D model data can be improved by increasing the investment in hardware equipment. However, this method not only increases the cost of use but also fails to solve the problem that it is difficult to effectively apply the 3D model data in the industrial field.

[0004] In another example, the 3D model data may be compressed before transmission to improve the application capability of the 3D model data in the industrial field. Image compression refers to the process of reducing the size of the 3D model data.

[0005] Therefore, how to achieve more effective compression of three-dimensional model data is an urgent problem to be solved. Summary of the invention

[0006] In view of this, the present disclosure provides an image compression method, device, electronic device and storage medium.

[0007] According to one aspect of the present disclosure, there is provided an image compression method, comprising: acquiring point cloud data of a detection object; based on a conversion relationship, processing multiple three-dimensional information included in the point cloud data respectively to obtain at least one of two-dimensional position information, texture information and depth information, wherein the conversion relationship is determined based on the extreme position information of the point cloud data relative to a projection plane, or the projection angle of the three-dimensional information relative to the projection plane; and, based on at least one of the two-dimensional position information, texture information and depth information, generating a compressed image of the detection object for the projection plane.

[0008] According to another aspect of the present disclosure, an image compression device is provided, including: a first acquisition module, used to acquire point cloud data of a detection object; a first processing module, used to process multiple three-dimensional information included in the above point cloud data respectively based on a conversion relationship to obtain at least one of two-dimensional position information, texture information and depth information, wherein the above conversion relationship is determined based on the extreme position information of the above point cloud data relative to the projection plane, or the projection angle of the above three-dimensional information relative to the above projection plane; and a first generation module, used to generate a compressed image of the above detection object for the above projection plane based on at least one of the above two-dimensional position information, texture information and depth information.

[0009] According to another aspect of the present disclosure, an electronic device is provided, comprising: one or more processors; and a memory for storing one or more instructions, wherein when the one or more instructions are executed by the one or more processors, the one or more processors implement the method described in the present disclosure.

[0010] According to another aspect of the present disclosure, a computer-readable storage medium is provided, on which executable instructions are stored. When the executable instructions are executed by a processor, the processor implements the method described in the present disclosure.

[0011] According to another aspect of the present disclosure, a computer program product is provided. The computer program product includes computer executable instructions. When the computer executable instructions are executed, they are used to implement the method described in the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The above and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:

[0013] Figure 1 The system architecture to which the image compression method according to the embodiment of the present disclosure can be applied is schematically shown;

[0014] Figure 2 The flowchart of the image compression method according to the 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 schematically shows an image compression device according to an embodiment of the present disclosure; and

[0018] Figure 6 A block diagram of an electronic device suitable for implementing an image compression method according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION

[0019] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.

[0020] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.

[0021] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled 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 this specification and should not be interpreted in an idealized or overly rigid manner.

[0022] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).

[0023] In the technical solution of the present invention, the user information (including but not limited to user personal information, user image information, user device information, such as location information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved are all information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with relevant laws, regulations and standards, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0024] In one example, the image compression method may include a sampling-based compression method and a geometric feature-based compression method.

[0025] The sampling-based compression method can refer to a method of reducing the amount of data by downsampling the 3D model data, thereby achieving compression. However, the sampling-based compression method will lose the accuracy of the 3D model data. Since this method is prone to data loss, it is not suitable for scenes with high precision requirements.

[0026] The compression method based on geometric features may refer to a method of treating the three-dimensional model data as a two-dimensional network image with a geometric structure, and achieving compression by analyzing and compressing the two-dimensional network image. For example, the compression method based on geometric features may include a compression method based on curvature and a compression method based on polyhedron fitting. However, since the calculation process of the compression method based on geometric features is relatively complicated, the compression process of this method takes a long time.

[0027] Therefore, how to more effectively compress the three-dimensional model data and reconstruct the compressed image data is an urgent problem to be solved.

[0028] To this end, the present disclosure provides an image compression method, device, electronic device and storage medium, which can be applied to image processing, point cloud processing and industrial technology fields. The image compression method includes: acquiring point cloud data of a detection object; based on a conversion relationship, processing multiple three-dimensional information included in the point cloud data respectively to obtain at least one of two-dimensional position information, texture information and depth information, and 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; and generating a compressed image of the detection object for the projection plane according to at least one of the two-dimensional position information, texture information and depth information.

[0029] Figure 1 The system architecture to which the image compression method according to the embodiment of the present disclosure can be applied is schematically shown. It should be noted that: Figure 1 What is shown is merely an example of a system architecture to which the embodiments of the present disclosure can be applied, in order to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that the embodiments of the present disclosure cannot be used in other devices, systems, environments or scenarios.

[0030] like Figure 1 As shown, the system architecture 100 according to this embodiment may 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 in the embodiment of the present disclosure can generally be executed by the server 105. Accordingly, the image compression device provided in the embodiment of the present disclosure can generally be set in the server 105.

[0032] Alternatively, the image compression method provided in the embodiment of the present disclosure may also be executed by the first terminal device 101, the second terminal device 102 or the third terminal device 103. Accordingly, the image compression apparatus provided in the embodiment of the present disclosure may 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 embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0034] It should be noted that the sequence numbers of the operations in the following method are only used as representations of the operations for the purpose of description, and should not be regarded as representing the execution order of the operations. Unless explicitly stated, the method does not need to be executed completely 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. Figure 2 For example, the image compression process of the present disclosure is further described.

[0036] Figure 2 The flowchart of the image compression method according to the embodiment of the present disclosure is schematically shown.

[0037] like Figure 2 As shown, the image compression method 200 includes operations S210-S230.

[0038] In operation S210 , point cloud data of the detection object is acquired.

[0039] In operation S220, based on the conversion relationship, multiple three-dimensional information included in the point cloud data are processed separately to obtain at least one of the two-dimensional position information, texture information and depth information. 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.

[0040] In operation S230, a compressed image of the detection object with respect to 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 may refer to the process of compressing point cloud data in a three-dimensional space into a compressed image in a two-dimensional plane. The detection object may refer to a target or object that needs to be paid attention to during the image compression process. The point cloud data of the detection object may refer to data composed of a series of three-dimensional information on the surface of the target or object. The point cloud data characterizes the external shape, structure and geometric information of the detection object. The point cloud data includes multiple points. The three-dimensional information may include three-dimensional position information and texture information. The three-dimensional position information may characterize the position of each point in the three-dimensional space relative to a certain reference origin. For example, the three-dimensional position information may include an X coordinate, a Y coordinate and a Z coordinate. The method for acquiring point cloud data can be configured according to actual business needs and is not limited here. For example, the method for acquiring point cloud data may include at least one of the following: an acquisition method based on laser radar, an acquisition method based on structured light projection, and an acquisition method based on stereo matching of binocular or multi-eye cameras, etc.

[0042] After obtaining the point cloud data, the multiple three-dimensional information in the point cloud data can be processed separately based on the conversion relationship to obtain at least one of the two-dimensional position information, texture information and depth information. The two-dimensional position information can represent the position of each point of the detected object in the two-dimensional plane relative to a reference origin. For example, the two-dimensional position information can include an X coordinate and a Y coordinate, 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 viewing angle or a reference plane.

[0043] In one example, the conversion relationship can be determined based on the extreme position information of the point cloud data relative to the projection plane. The extreme position information can include the maximum coordinate value and the minimum coordinate value of the point cloud data in the two coordinate axes of the projection plane, the positive direction and the negative direction 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 into points in the two-dimensional plane, and obtain at least one of the two-dimensional position information, texture information and depth information.

[0044] In another example, the conversion relationship can be determined based on the projection angle of the three-dimensional information relative to the projection plane. The projection angle may refer to the angle at which the three-dimensional information is projected on the projection plane, that is, the angle between a 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 a 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 point in the three-dimensional space to a point in the two-dimensional plane to obtain at least one of the two-dimensional position information, texture information, and depth information.

[0045] After obtaining at least one of the two-dimensional position information, texture information and 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 by compressing the three-dimensional information in a three-dimensional space for representing the detection object when projecting it onto a two-dimensional plane in order to reduce the file size of the three-dimensional information or speed up the transmission speed.

[0046] The method for generating a compressed image can be configured according to actual business needs and is not limited here. For example, the method for generating a compressed image may include at least one of the following: generating a compressed image according to two-dimensional position information and texture information; generating a compressed image according to two-dimensional position information and depth information; generating a compressed image according to two-dimensional position information, texture information and depth information. The file format of the compressed image may be Portable Network Graphics (PNG) and Bitmap (BMP) format.

[0047] The shape of the detection object can be configured according to actual business needs and is not limited here. For example, the shape of the detection object may include at least one of the following: a sphere, a cube, a cylinder, a cone, a polyhedron, and an irregular shape. In one example, the spherical detection object may include a workpiece with a spherical or spherical shape, which may be a complete sphere or a partial sphere, such as a spherical surface and a hemispherical surface.

[0048] According to an embodiment 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, it is helpful to improve the accuracy of the two-dimensional position information, texture information and depth information. In this process, since the conversion relationship is determined based on 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, it can adapt to the needs of different scenes and improve the flexibility and applicability of the three-dimensional information conversion. On this basis, by generating a compressed image of the detection object based on at least one of the two-dimensional position information, texture information and depth information, the amount of image data can be effectively reduced while retaining key information.

[0049] In the embodiment 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. Figure 3 The process of achieving image compression based on a transformation relationship determined according to the extreme position information of the point cloud data relative to the projection plane is further described.

[0050] Figure 3 An example schematic diagram of an image compression process according to an embodiment of the present disclosure is schematically shown.

[0051] In 300, the image compression process is described by taking the detection object as a sphere and the projection plane as the XOY plane as an example. A target image resolution of the compressed image to be generated can be preset, and an initialized compressed image can be generated based on the target image resolution.

[0052] like Figure 3 As shown, the point cloud data can be divided into two hemispheres based on the XOY projection plane, namely, 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 method of determining the two-dimensional position information based on the three-dimensional position information can be configured according to actual business needs and is not limited here. For example, the determination method may include at least one of the following: projection method, dimensionality reduction method and coordinate conversion method. The projection method refers to projecting the three-dimensional position information onto a two-dimensional plane through an orthogonal projection or perspective projection to obtain the two-dimensional position information. The dimensionality reduction method refers to converting the three-dimensional position information into two-dimensional position information using dimensionality 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 preset mathematical formula.

[0054] For example, in an application scenario where the detection object is a sphere, the detection object may be a workpiece with a spherical or spherical shape. The point cloud data may include a set of three-dimensional position information of a sphere or a spherical shape obtained by a point cloud acquisition device, and correspondingly, the compressed image may include a set of two-dimensional position information of a circle or a semicircle corresponding to the detection object.

[0055] In one example, the limit position information may include the maximum coordinate value and the minimum coordinate value of the point cloud data on the two coordinate axes of the projection plane. The maximum coordinate value and the minimum coordinate value of the point cloud data on the two coordinate axes of the projection plane may refer to the projection range of the point cloud data on the two coordinate axes. The maximum coordinate value represents the farthest point position of the point cloud data in the positive direction of the coordinate axis and the closest point position in the negative direction, while the minimum coordinate value represents the farthest point position of the point cloud data in the negative direction of the coordinate axis and the closest point position in the positive direction.

[0056] On this basis, the first ratio can be determined according to the coordinate values ​​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 values ​​corresponding to the projection plane may refer to the coordinate values ​​of the projection of the detection object in 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, it is simultaneously projected onto the x-coordinate and y-coordinate of the XOY plane. These projection coordinates can be used to describe the position of the detection object on the XOY projection plane, but do not include the position information of the detection object in the direction perpendicular to the projection plane. For example, in an application scenario where the detection object is a sphere, the coordinate values ​​corresponding to the projection plane may refer to the coordinate values ​​of the points corresponding to the diameter of the circle or semicircle obtained by projecting the point cloud data onto the projection plane.

[0058] In a specific example, the process of processing the three-dimensional position information according to the extreme position information to obtain the two-dimensional position information can be shown in the following formulas (1) and (2).

[0059] #timg# (1) #timg# (2)

[0060] in, and Represents the coordinate value corresponding to the projection plane in the three-dimensional position information, Represents the minimum coordinate value of the point cloud data on the X-axis. Represents the maximum coordinate value of the point cloud data on the X-axis. Represents the minimum coordinate value of the point cloud data on the Y coordinate axis. Represents the maximum coordinate value of the point cloud data on the Y coordinate axis. Characterizes the width information in the target image resolution, Characterizes the height information in the target image resolution, and Represents two-dimensional position information.

[0061] According to the embodiments of the present disclosure, the first ratio is determined by using 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, so that 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 appear clearer and more accurate at the required resolution.

[0062] In one example, after obtaining the two-dimensional position information corresponding to each point in the 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 according to the attribute information of each of the multiple three-dimensional position information corresponding to the two-dimensional position information. The attribute information may include the color, density, material and other attributes of the three-dimensional position information. For example, a predetermined condition may be set, and it is determined whether the multiple attribute information corresponding to the two-dimensional position information meets the predetermined condition. The predetermined condition may be determined based on the predetermined attribute information, and the predetermined attribute information may be 0.

[0063] In another example, when multiple attribute information corresponding to the two-dimensional position information meets a predetermined condition, the target attribute information can be determined according to the predetermined attribute information. For example, an accumulated value can be determined according to the predetermined attribute information and a preset value, and the accumulated value can be determined as the target attribute information. The preset value can be 1.

[0064] Alternatively, when the multiple attribute information corresponding to the two-dimensional position information does not meet the predetermined condition, the target attribute information can be determined from the attribute information of each of the multiple three-dimensional position information corresponding to the two-dimensional position information. The method for determining the target attribute information can be configured according to actual business needs and is not limited here.

[0065] Based on the screening rules, the target attribute information can be determined in the attribute information of each of the multiple three-dimensional position information corresponding to the two-dimensional position information. The screening rules can include at least one of the following: maximum method, weighted average method, threshold method or area method. The maximum method can refer to selecting the attribute information with the largest value as the target attribute information. The weighted average method can refer to performing weighted averaging on the values ​​of multiple attribute information according to a certain weight to obtain the target attribute information. The threshold method can refer to setting a threshold to select attribute information above or below the threshold as the target attribute information. The area method can refer to selecting the target attribute information according to the spatial position relationship between the attribute information.

[0066] On this basis, the texture image 303 corresponding to the hemisphere 301 can be generated according to the target attribute information of each two-dimensional position information. For example, the attribute information corresponding to the point A0 (x1, y1, z1) in the point cloud data is stored in the position corresponding to the point A1 (ix1, iy1) in the texture image 303.

[0067] In addition, the three-dimensional position information can also be processed to obtain the 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 position corresponding to the point A1 (ix1, iy1) in the depth image 304.

[0068] For example, in an application scenario where the detection object is a sphere, the point cloud data may include a set of three-dimensional position information of the sphere obtained using a point cloud acquisition device, and correspondingly, the texture image 303 and the depth image 304 may include a set of two-dimensional position information of a circle corresponding to the detection object.

[0069] According to the embodiments of the present disclosure, by automatically judging and selecting attribute information that meets predetermined conditions, and by setting screening rules, the target attribute information is determined from the attribute information of each of the multiple three-dimensional position information, so that the selected attributes can be more representative, which helps to improve the subsequent texture image generation effect. On this basis, by using the maximum value or average value as the target attribute information, it helps to eliminate the interference of random noise on the attribute information, making the data processing results more consistent and stable. In addition, by generating a texture image based on 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 limit position information may also include the maximum coordinate value and the minimum coordinate value 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 of the point cloud data in the positive direction perpendicular to the projection plane and the nearest point position in the negative direction, while the minimum coordinate value represents the nearest point position of the point cloud data in the positive direction perpendicular to the projection plane and the farthest point position in the negative direction.

[0071] On this basis, the 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 may include scaling or addition and subtraction.

[0072] The coordinate value corresponding to the coordinate axis perpendicular to the projection plane can refer to the height or depth in 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 in the positive direction of the z coordinate and the coordinate value in the negative direction of the z coordinate can be used to describe the detection object in the direction perpendicular to the projection plane, that is, the height or depth position of the object in three-dimensional space. For example, in an application scenario where the detection object is a sphere, 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 onto a plane perpendicular to the projection plane.

[0073] In a specific example, the process of processing the three-dimensional position information according to the extreme position information to obtain the depth information can be shown in the following equations (3) and (4).

[0074] #timg# (3) #timg# (4)

[0075] in, Represents the coordinate value corresponding to the coordinate axis perpendicular to the projection plane in the three-dimensional position information, Represents the minimum coordinate value of the point cloud data in the negative direction perpendicular to the projection plane. Represents the maximum coordinate value of the point cloud data in the negative direction perpendicular to the projection plane. Represents the depth information of the two-dimensional position information in the negative direction perpendicular to the projection plane, Represents the minimum coordinate value of the point cloud data in the positive direction perpendicular to the projection plane. Represents the maximum coordinate value of the point cloud data in the positive direction perpendicular to the projection plane. Characterizes 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 using the coordinate values ​​corresponding to the coordinate axis perpendicular to the projection plane in the three-dimensional position information, the depth information of the detected object can be obtained more accurately, 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 a depth image according to the 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 may 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. This process may be shown in the following equations (5) to (9).

[0078] #timg# (5) #timg# (6) #timg# (7) #timg# (8) #timg# (9)

[0079] in, and Characterize the projection angle. It should be noted that some formulas provided in the present disclosure are given with the detection object being a sphere as an example, but the shape of the detection object to which the image compression method of the present disclosure is applicable can be configured according to actual business needs and is not limited here.

[0080] In the hemisphere 302 along the positive direction of the Z axis, the three-dimensional position information (x2, y2, z2) of any point B0 in the hemisphere 302 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 each of the multiple three-dimensional position information corresponding to the two-dimensional position information. In addition, the three-dimensional position information can also be processed to obtain the depth information of the corresponding point.

[0082] The method of generating compressed images can be configured according to actual business needs and is not limited here. For example, considering the minimum 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 when the accuracy requirement is not high, the attribute information and depth information of each two-dimensional position information can be stored in different channels of the same compressed image.

[0083] In 300, taking the compressed image including a texture image and a depth image as an example, 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. A 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 position corresponding to the point B1 (ix2, iy2) in the texture image 305. A 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 position corresponding to the point B1 (ix2, iy2) in the depth image 306.

[0084] For example, in an application scenario where the detection object is a sphere, the point cloud data may include a three-dimensional position information set of the sphere obtained using a point cloud acquisition device, and correspondingly, the texture image 305 and the depth image 306 may include a two-dimensional position information set of a circle corresponding to the detection object.

[0085] It should be noted that the compression level can be adjusted by adjusting the target image resolution. For example, when it is necessary to retain high-precision details, the compression level is high and the target image resolution can be set to a higher resolution. Alternatively, when it is necessary 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, when the target image resolution is reduced, the problem of obvious light-dark dividing lines in the generated compressed image caused by uneven brightness of images at each viewing angle can be reduced.

[0086] After obtaining the texture image 303 and depth image 304 corresponding to the hemisphere 301 and the texture image 305 and depth image 306 corresponding to the hemisphere 302 , the point cloud data, texture image 303 , depth image 304 , texture image 305 and depth image 306 may also be stored in association.

[0087] For example, the size of the point cloud data is 1.36G. When the target image resolution is 10328*5164, the size of the compressed image produced is 82.9M, which reduces the storage space and retains more than 98.2% of the information.

[0088] In the embodiment 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. Figure 4 The process of achieving image compression based on a conversion relationship determined according to the projection angle of the three-dimensional position information relative to the projection plane is further described.

[0089] Figure 4 An example schematic diagram of an image compression process according to another embodiment of the present disclosure is schematically shown.

[0090] like Figure 4 As shown, in 400, the image compression process is described by taking the detection object as a sphere and XOY as a projection plane as an example. The target image resolution of the compressed image to be generated can be preset, and the initialized compressed image is generated based on the target image resolution.

[0091] like Figure 4 As 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 used when projecting the three-dimensional position information into the two-dimensional plane XOY, and can define 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 acquisition device used for point cloud data, that is, the observation angle or field of view of the acquisition device when acquiring point cloud data.

[0093] In one example, the projection angle may include a first pitch angle and the first azimuth . First pitch angle It can 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 and the XOY plane, which usually varies between -π / 2 and π / 2. The first pitch angle It can be used to describe the height or depth of three-dimensional position information relative to the XOY plane. It can 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 and the positive direction of the Z axis, usually ranging from 0 to 2π. It can be used to describe the position of three-dimensional position information on the horizontal plane.

[0094] For example, in an application scenario where the detection object is a sphere, the detection object may be a workpiece with a spherical or spherical shape. The point cloud data may include a set of three-dimensional position information of a sphere or a spherical shape obtained by a point cloud acquisition device, and correspondingly, the compressed image may include a set of two-dimensional position information of a circle or a semicircle.

[0095] In a 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 shown in the following equations (10) to (14). Equations (10) to (12) are used to convert the three-dimensional position information into points in the two-dimensional plane, and equations (13) and (14) are used to convert the points in the two-dimensional plane into points in the compressed image according to the target image resolution.

[0096] #timg# (10) #timg# (11) #timg# (12) #timg# (13) #timg# (14)

[0097] in, Characterize the first pitch angle, Characterize the first azimuth, and Represents two-dimensional position information, Characterizes the width information in the target image resolution, Characterizing the height information in the target image resolution, the preset angle range corresponding to the first pitch angle is , the preset angle range corresponding to the first azimuth 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 performed more accurately, 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 displayed more clearly and accurately 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 depth information of each of the multiple three-dimensional position information corresponding to the two-dimensional position information. The method of determining the target attribute information here is the same as the 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, a compressed image corresponding to the point cloud data can be generated according to the target attribute information or 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 brightness of images from multiple perspectives is uneven, the brightness in the compressed image may be made more uniform by reducing the resolution of the target image to improve the compression effect. For example, in an application scenario where the detection object is a sphere, the point cloud data may include a set of three-dimensional position information of the sphere obtained using a point cloud acquisition device, and correspondingly, the compressed image may include a set of two-dimensional position information of a circle corresponding to the detection object.

[0101] Figure 5 A block diagram of an image compression device according to an embodiment of the present disclosure is schematically shown.

[0102] like Figure 5 As shown, the image compression device 500 may include a first acquisition module 510 , a first processing module 520 and a first generation module 530 .

[0103] The first acquisition module 510 is used to acquire point cloud data of the detection object.

[0104] The first processing module 520 is used to process the multiple three-dimensional information included in the point cloud data based on the conversion relationship to obtain at least one of the two-dimensional position information, texture information and depth information. 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.

[0105] The first generating module 530 is used to generate a compressed image of the detection object with respect to the projection plane according to at least one of the two-dimensional position information, the texture information and the depth information.

[0106] According to the embodiments of the present invention, any one or more of the modules, or at least part of the functions of any one of them, can be implemented in one module. According to the embodiments of the present invention, any one or more of the modules can be split into multiple modules for implementation. According to the embodiments of the present invention, any one or more of the modules can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or can be implemented by hardware or firmware in any other reasonable way of integrating or packaging the circuit, or in any one of the three implementation methods of software, hardware and firmware, or in any appropriate combination of any of them. Alternatively, according to the embodiments of the present invention, one or more of the modules can be at least partially implemented as a computer program module, and when the computer program module is run, the corresponding function can be executed.

[0107] It should be noted that the image compression device part in the embodiment of the present disclosure corresponds to the image compression method part in the embodiment of the present disclosure. The description of the image compression device part specifically refers 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 an image compression method according to an embodiment of the present disclosure is schematically shown. Figure 6 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0109] like Figure 6 As shown, the computer electronic device 600 according to the embodiment of the present disclosure includes a processor 601, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 602 or the program loaded from the storage part 608 to the random access memory (RAM) 603. The processor 601 may 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 (for example, an application-specific integrated circuit (ASIC)), etc. The processor 601 may also include an on-board memory for caching purposes. The processor 601 may include a single processing unit or multiple processing units for performing different actions of the method flow according to the embodiment of the present disclosure.

[0110] In the RAM 603, various programs and data necessary 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 may further include an input / output (I / O) interface 605, which is also connected to the bus 604. The electronic device 600 may further include one or more of the following components connected to the input / output (I / O) interface 605: an input portion 606 including a keyboard, a mouse, etc.; an output portion 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 608 including a hard disk, etc.; and a communication portion 609 including a network interface card such as a LAN card, a modem, etc. The communication portion 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the input / output (I / O) interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed, so that a computer program read therefrom is installed into the storage portion 608 as needed.

[0112] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the image compression method according to the embodiment of the present disclosure is implemented.

[0113] In the present disclosure, a computer readable storage medium may be any tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device.

[0114] An embodiment of the present disclosure also includes a computer program product, which includes a computer program, and the computer program contains program code for executing the method provided by the embodiment of the present disclosure. When the computer program product runs on an electronic device, the program code is used to enable the electronic device to implement the image compression method provided by the embodiment of the present disclosure.

[0115] When the computer program is executed by the processor 601, the above functions defined in the system / device of the embodiment of the present disclosure are executed. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.

[0116] According to the embodiments of the present disclosure, program codes for executing the computer programs provided by the embodiments of the present disclosure may be written in any combination of one or more programming languages.

[0117] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. It should also be noted that in some alternative implementations, the functions marked in the blocks may also occur in an order different from that marked in the accompanying drawings.

[0118] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. The scope of the present disclosure is defined by the attached claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.

Claims

1. An image compression method, comprising: Obtain point cloud data of the detected object; Based on the conversion relationship, the multiple three-dimensional information included in the point cloud data are processed respectively to obtain at least one of the two-dimensional position information, texture information and depth information, wherein 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; as well as A compressed image of the detection object with respect to the projection plane is generated according to at least one of the two-dimensional position information, the texture information and the depth information.

2. The method according to claim 1, wherein: The three-dimensional information includes three-dimensional position information, and the limit position information includes the maximum coordinate value and the minimum coordinate value of the point cloud data on two coordinate axes of the projection plane respectively; The step of processing the plurality of three-dimensional information included in the point cloud data based on the conversion relationship to obtain at least one of the two-dimensional position information, texture information and depth information comprises: For each of the three-dimensional position information, Determining a first ratio 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; 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, wherein: The limit position information also includes the maximum coordinate value and the minimum coordinate value of the point cloud data along the positive direction and the negative direction perpendicular to the projection plane respectively; The method further comprises: determining a second ratio based on a coordinate value corresponding to a coordinate axis perpendicular to the projection plane in the three-dimensional information and a distance between the maximum coordinate value and the minimum coordinate value; and 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 further includes attribute information, and the compressed image includes a texture image of the detection object with respect to the projection plane and a depth image of the detection object with respect to the projection plane; Generating a compressed image of the detection object according to at least one of the two-dimensional position information, the texture information, and the depth information comprises: Generate the texture image according to each of the two-dimensional position information and the texture information; as well as The depth image is generated according to each of the two-dimensional position information and the depth information.

5. The method according to claim 4, wherein: Generating the texture image according to each of the two-dimensional position information and the texture information comprises: Based on the screening rule, the target attribute information is determined in the attribute information of each of the plurality of three-dimensional information corresponding to the two-dimensional position information, wherein the screening rule includes one of the following: taking the attribute information with the largest value among the plurality of the attribute information as the target attribute information; using an average value determined based on the plurality of attribute information as the target attribute information; and The texture image is generated according to the target attribute information of each of the two-dimensional position information.

6. The method according to claim 5, further comprising: In a case where the plurality of attribute information corresponding to the two-dimensional position information do not satisfy a predetermined condition, the target attribute information is determined according to predetermined attribute information, wherein the predetermined condition is determined based on the predetermined attribute information.

7. The method according to claim 1, wherein: The three-dimensional information includes three-dimensional position information; The step of processing the plurality of three-dimensional information included in the point cloud data based on the conversion relationship to obtain at least one of the two-dimensional position information, texture information and depth information comprises: For each of the three-dimensional position information, determining a third ratio according to the projection angle and a preset angle range, wherein the preset angle range represents a viewing angle of a device for collecting the point cloud data; and The two-dimensional position information is determined according to 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 detection object according to at least one of the two-dimensional position information, texture information, and depth information includes: Based on the screening rule, determining target attribute information from the attribute information of each of the plurality of three-dimensional information corresponding to the two-dimensional position information; and The compressed image is generated according to the object attribute information of each of the two-dimensional position information.

9. The method according to claim 1, wherein: The detection object is a sphere.

10. An image compression device, comprising: A first acquisition module is used to acquire point cloud data of the detection object; A first processing module is used to process the multiple 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, wherein 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; as well as The first generating module is used to generate a compressed image of the detection object with respect to the projection plane according to at least one of the two-dimensional position information, texture information and depth information.

11. An electronic device, comprising: one or more processors; a memory for storing one or more computer programs, It is characterized in 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 instruction stored thereon, characterized in that: When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.

13. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.

Citation Information

Patent Citations

  • Range image-based 3D spatial data processing method and device

    CN101533529A

  • Self-splicing surface point cloud measurement method without active visual marking

    CN111637850A

  • Three-dimensional point cloud data processing method, device, computer equipment and storage medium

    CN111639626A

  • 3D point cloud target detection method based on attention mechanism and image feature fusion

    CN115115917A

  • Target object detection method and device, electronic equipment and readable storage medium

    CN115421122A