Data processing method and device, electronic equipment and computer readable medium

By acquiring the laser camera scanned images, calculating pixel prediction deviation values ​​and using Huffman tree encoding in the depth map data processing, the problem of low processing efficiency of depth map data in the prior art is solved, and efficient data transmission and fast decoding are achieved.

CN119996581APending Publication Date: 2025-05-13YISHI TECH (NINGBO) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411974277.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

While improving transmission efficiency, the existing depth map data processing solutions have problems such as high cost, long development cycle, low encoding efficiency, slow decoding speed and high complexity.

Method used

By acquiring the scanned image of the laser camera and performing difference encoding, the pixel prediction deviation values ​​of all pixels in the entire depth map are calculated, and the Huffman tree is used to compress the pixel prediction deviation values.

Benefits of technology

The data transmission efficiency is improved, and the accumulated errors caused by decoding errors are reduced by processing based on the continuity of adjacent pixels in the image, and efficient compression and fast decoding are achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119996581A_ABST
    Figure CN119996581A_ABST
Patent Text Reader

Abstract

The invention discloses a data processing method and device, electronic equipment and a computer readable medium. The data processing method comprises the steps of obtaining a scanning image of a laser camera and performing difference value coding; calculating pixel prediction deviation values of all pixels of the whole depth map of the scanned image; and carrying out compressed coding on the pixel prediction deviation value by adopting a Huffman tree according to the pixel prediction deviation value. The method has the beneficial effects that data processing is carried out based on the characteristic that adjacent pixels in the image have certain continuity, so that the transmission efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a data processing method, device, electronic device and computer-readable medium. Background Art

[0002] With the rapid development of industry, the rapid transmission and processing of data has become an urgent problem that needs to be solved. For 3D line lasers, the amount of data itself is huge, and how to improve the transmission efficiency has become a difficulty in the industry. There are two traditional ways to speed up data processing: using a 10G network with a higher transmission bandwidth; and a depth map data processing solution.

[0003] In some related technologies, the main solutions for depth map compression are: reducing the number of bits representing the depth map, for example, from 16 bits to a fixed 12 bits, so as to increase transmission efficiency; performing Huffman coding compression on the original depth map data; and using deep learning to optimize the Huffman tree to increase coding efficiency.

[0004] However, these solutions either have high costs and long development cycles, or have low encoding efficiency, slow decoding speed, and high complexity. Summary of the invention

[0005] The content of this application is used to introduce concepts in a brief form, which will be described in detail in the detailed implementation section below. The content of this application is not intended to identify the key features or essential features of the technical solution claimed for protection, nor is it intended to limit the scope of the technical solution claimed for protection.

[0006] Some embodiments of the present application propose methods, devices, electronic devices, and computer-readable media to solve the technical problems mentioned in the above background technology section.

[0007] As a first aspect of the present application, some embodiments of the present application provide a data processing method, including: acquiring a scanned image of a laser camera and performing difference encoding; calculating pixel prediction deviation values ​​of all pixels of the entire depth map of the scanned image; and based on the pixel prediction deviation values, using a Huffman tree to perform compression encoding of the pixel prediction deviation values.

[0008] Optionally, in some embodiments of the present application, the pixel prediction deviation value is a deviation value between a prediction value calculated based on preset pixels around the target pixel and a true value of the domain pixel.

[0009] Optionally, in some embodiments of the present application, the number of preset pixels is 3.

[0010] Optionally, in some embodiments of the present application, one of the preset pixels is set in the upper left direction of the target pixel.

[0011] Optionally, in some embodiments of the present application, one of the preset pixels is arranged above the target pixel.

[0012] Optionally, in some embodiments of the present application, one of the preset pixels is set to the left of the target pixel.

[0013] Optionally, in some embodiments of the present application, when the Huffman tree is used to perform compression encoding of pixel prediction deviation values, the encoding length is calculated using a statistical optimal length method.

[0014] As a second aspect of the present application, some embodiments of the present application provide a data processing device, including: an acquisition module, used to acquire a scanned image of a laser camera and perform difference encoding; a calculation module, used to calculate pixel prediction deviation values ​​of all pixels of the entire depth map of the scanned image; and an encoding module, used to perform compression encoding of the pixel prediction deviation values ​​using a Huffman tree based on the pixel prediction deviation values.

[0015] As the third aspect of the present application, some embodiments of the present application provide an electronic device, comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by one or more processors, the one or more processors implement the method described in any implementation manner of the above-mentioned first aspect.

[0016] As a fourth aspect of the present application, some embodiments of the present application provide a computer-readable medium on which a computer program is stored, wherein when the program is executed by a processor, the method described in any implementation of the above-mentioned first aspect is implemented.

[0017] The beneficial effect of the present application is that data processing is performed based on the characteristic that there is a certain continuity between adjacent pixels in an image, thereby improving transmission efficiency.

[0018] More specifically, some embodiments of the present application may produce the following specific beneficial effects: The current pixel is predicted based on the domain pixel, and the prediction deviation is encoded. At the same time, the optimal Huffman coding tree depth is determined by statistical analysis, and the check value is added every N rows to reduce the cumulative error caused by decoding errors, which leads to information loss problems. For decoding, the multi-threaded parallel processing method is introduced to perform real-time fast decoding to restore data, which can effectively improve the compression rate. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The drawings constituting a part of this application are used to provide a further understanding of this application, so that other features, purposes and advantages of this application become more obvious. The illustrative embodiment drawings and their descriptions of this application are used to explain this application and do not constitute an improper limitation on this application.

[0020] In addition, throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that the components and elements are not necessarily drawn to scale.

[0021] In the attached picture: Figure 1 is a schematic diagram of the main steps of a data processing method according to an embodiment of the present application; Figure 2 is a schematic diagram of an image compression and decompression process according to an embodiment of the present application; Figure 3 is a structural schematic diagram of a data processing device according to an embodiment of the present application; Figure 4 It is a schematic diagram of the structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0022] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0023] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present disclosure can be combined with each other.

[0024] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0025] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0026] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0027] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.

[0028] Reference Figure 1 As shown, as the first aspect of the present application, the data processing method of the present application mainly includes the following steps: S101: Acquire a scanned image from a laser camera and perform difference encoding.

[0029] S102: Calculate pixel prediction deviation values ​​of all pixels of the entire depth map of the scanned image.

[0030] S103: According to the pixel prediction deviation value, a Huffman tree is used to perform compression coding on the pixel prediction deviation value.

[0031] Optionally, in some embodiments of the present application, the pixel prediction deviation value is a deviation value between a prediction value calculated based on preset pixels around the target pixel and a true value of the domain pixel.

[0032] In some implementations of the present application, the number of preset pixels is 3.

[0033] In some embodiments of the present application, one of the preset pixels is set in the upper left direction of the target pixel.

[0034] In some embodiments of the present application, one of the preset pixels is arranged above the target pixel.

[0035] In some embodiments of the present application, one of the preset pixels is arranged to the left of the target pixel.

[0036] In some embodiments of the present application, when the Huffman tree is used to compress and encode the pixel prediction deviation value, the encoding length is calculated by using a statistical optimal length method.

[0037] Reference Figure 2 As shown, as a specific solution, the technical solution of this application specifically adopts Figure 2 The process shown.

[0038] Specifically, the specific process includes: obtaining a depth map (that is, a scanned image of a laser camera), calculating a prediction value deviation (that is, a pixel prediction deviation value), determining the Huffman tree depth based on the calculation result, and finally using the Huffman tree to compress and encode the pixel prediction deviation value.

[0039] More specifically, the FPGA (Field Programmable Gate Array) acquires line laser scanning profile data (depth map data) in real time, and performs difference encoding by acquiring two rows of data (the first row and the second row, the second row and the third row... the Nth row and the N+1th row, and so on, with each two rows forming a group) (the difference calculation method in the "difference encoding" here refers to the calculation method immediately below, predicting the current value through the upper left corner, above, and left, and performing Huffman encoding on the deviation between the predicted value and the current value).

[0040] Among them, the present application defines the combination of the target pixel and its surrounding preset pixels as a domain, and the pixels in the domain are defined as domain pixels. As a specific example, the values ​​of the domain pixels include P00, P01, P10, and P, which respectively represent the pixel position values ​​of the upper left corner, above, and left of the P pixel and its true value. The P point uses P00, P01, and P10 to predict the P value, and then calculates the deviation between the predicted value and the true value to obtain the pixel prediction deviation value of the entire depth map, and uses the Huffman tree with the statistical optimal length for deviation value encoding.

[0041] During fast transmission, not only the depth of the Huffman coding tree is considered from the perspective of compression rate, but also the decoding speed of the PC is taken into account, so the coding length is calculated through statistics.

[0042] This article uses a fixed-depth Huffman tree and encodes the predicted difference. For example, the main difference values ​​-5, -4, -3, ... 3, 4, 5 and values ​​outside this difference range are represented by other and Huffman encoded. This part describes "encoding with the original value". In other words, as long as it is other, the original depth map bit number is used for encoding. This is to meet the needs of those scenes with large fluctuations, but the encoding compression efficiency is not that high.

[0043] Since there may be "abnormal" values ​​with particularly large differences in images, this paper uses the original numerical encoding method to meet adaptability.

[0044] The solution of this application divides decoding into difference map decoding and depth map recovery. Since the depth map transmission itself is packaged and sent in M ​​rows, and the difference itself does not involve dependencies, a multi-threaded bitstream decoding strategy is used to improve the speed of decoding the difference map. For specific scenarios, the compression rate can be effectively improved.

[0045] More specifically, the pixel positions are as follows: P00P01 Relative position of P10 and P11 pixels The predicted value of P11 position is: P=P10+P01–P00; The differences were: P11–P; For example, two lines of depth map data are originally 2x10 size depth map data: 10000, 10001, 9998, 10002, 9999, 10001, 10000, 9998, 10002, 10010 9997, 10001, 10000, 10002, 9998, 10002, 9999, 10001, 9999, 10001 Calculate the difference (when calculating the difference, the first row and first column of the depth map are the original data); 10000, 10001, 9998, 10002, 9999, 10001, 10000, 9998, 10002, 100010 9997,3,1,-2,-1,2,-2,4,-6,-6 coding In 1, the blue is the original data, and the red is the difference data. Here: Huffman only encodes the difference data within the range of -5, -4, . . . 4, and 5, and any other difference is represented by "other", that is, a Huffman coding tree is generated for -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, and other. Then the difference data is encoded according to the Huffman coding tree. The prefix of the difference beyond the range of -5~5 is represented by the corresponding code "other" followed by the corresponding actual bit (for the difference part above and -6, the "other" code plus the original bit length is used, such as 16bit, encoding method).

[0046] From the above description, we can know that since this article uses the field method to perform predictive difference encoding, the decoding depends on the data in the upper left corner, above, and left. If an error occurs during the transmission and decoding process, it may cause the subsequent data decoding errors. To address this problem, this article uses only the row direction data difference (the current pixel is defined as P, the pixel on the previous row is defined as P10, and the difference is P10-P) to encode every N rows to reduce the cumulative error of decoding.

[0047] like Figure 3As shown, as the second aspect of the present application, the present application provides a data processing device, comprising: an acquisition module, a calculation module and an encoding module. The acquisition module is used to acquire the scanned image of the laser camera and perform difference encoding; the calculation module is used to calculate the pixel prediction deviation values ​​of all pixels of the entire depth map of the scanned image; the encoding module is used to compress and encode the pixel prediction deviation values ​​using a Huffman tree according to the pixel prediction deviation values.

[0048] like Figure 4 As shown, the electronic device 800 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage device 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the electronic device 800 are also stored. The processing device 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0049] Typically, the following devices may be connected to the I / O interface 805: input devices 806 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 807 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 808 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 809. The communication device 809 may allow the electronic device 800 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 4 The electronic device 800 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 4 Each block shown in the figure may represent one device, or may represent multiple devices as required.

[0050] In particular, according to some embodiments of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, some embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In some such embodiments, the computer program can be downloaded and installed from the network through the communication device 809, or installed from the storage device 808, or installed from the ROM 802. When the computer program is executed by the processing device 801, the above-mentioned functions defined in the method of some embodiments of the present disclosure are executed.

[0051] It should be noted that the computer-readable medium described above in some embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0052] In some embodiments of the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device, or device. In some embodiments of the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in combination with an instruction execution system, device, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0053] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperTextTransferProtocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an adhoc peer-to-peer network), as well as any currently known or future developed network.

[0054] The computer-readable medium may be included in the electronic device, or may exist independently without being installed in the electronic device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: obtains the scanned image of the laser camera and performs difference coding; calculates the pixel prediction deviation values ​​of all pixels of the entire depth map of the scanned image; and uses the Huffman tree to compress and code the pixel prediction deviation values ​​according to the pixel prediction deviation values.

[0055] Computer program code for performing the operations of some embodiments of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0056] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram may represent a module, a program segment, or a part of a code, which contains one or more executable instructions for implementing a specified logical function.

[0057] It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures.

[0058] For example, two boxes shown in succession may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of boxes in the block diagram and / or flow chart, can be implemented by a dedicated hardware-based system that performs the specified function or operation, or can be implemented by a combination of dedicated hardware and computer instructions.

[0059] The units described in some embodiments of the present disclosure may be implemented by software or by hardware.

[0060] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0061] The above descriptions are only some preferred embodiments of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above inventive concept. For example, the above features are replaced with (but not limited to) technical features with similar functions disclosed in the embodiments of the present disclosure.

Claims

1. A data processing method, characterized in that: The data processing method comprises: Obtain the scanned image of the laser camera and perform difference encoding; Calculating pixel prediction deviation values ​​of all pixels of the entire depth map of the scanned image; According to the pixel prediction deviation value, a Huffman tree is used to perform compression coding of the pixel prediction deviation value.

2. The data processing method according to claim 1, characterized in that: in, The pixel prediction deviation value is the deviation value between the prediction value calculated based on the preset pixels around the target pixel and the true value of the domain pixel.

3. The data processing method according to claim 2, characterized in that: The number of preset pixels is 3.

4. The data processing method according to claim 3, characterized in that: One of the preset pixels is arranged in the upper left direction of the target pixel.

5. The data processing method according to claim 4, characterized in that: One of the preset pixels is arranged above the target pixel.

6. The data processing method according to claim 5, characterized in that: One of the preset pixels is arranged to the left of the target pixel.

7. The data processing method according to any one of claims 1 to 6, characterized in that: in, When the Huffman tree is used to compress and encode the pixel prediction deviation value, the encoding length is calculated by using a statistical optimal length method.

8. A data processing device, comprising: An acquisition module, used for acquiring the scanned image of the laser camera and performing difference encoding; A calculation module, used for calculating pixel prediction deviation values ​​of all pixels of the entire depth map of the scanned image; The encoding module is used to perform compression encoding of the pixel prediction deviation value using a Huffman tree according to the pixel prediction deviation value.

9. An electronic device, comprising: one or more processors; a storage device having one or more programs stored thereon; When the one or more programs are executed by the one or more processors, the processors implement the method according to any one of claims 1 to 7.

10. A computer readable medium having a computer program stored thereon, wherein: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.