Image data encoding method and electronic device

By converting the image matrix into a data matrix and combining it with differential level transmission, the problem of balancing coding efficiency and quality in traditional image data encoding technology is solved, achieving efficient and stable image data transmission.

CN116962365BActive Publication Date: 2026-07-10CHINA MOBILE COMM GRP TERMINAL +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA MOBILE COMM GRP TERMINAL
Filing Date
2022-10-28
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

Traditional image data encoding techniques struggle to balance encoding efficiency and quality, leading to encoding misalignment or code loss during image data transmission.

Method used

The method of converting the image matrix into a data matrix is ​​adopted. Superpixels are generated through clustering and image segmentation algorithms. The superpixels are encoded by combining the transformation matrix and the sparse vector of matrix coefficients. The image compression code is transmitted using differential level transmission. The receiving end improves the data transmission quality by identifying and discarding differential signal jitter.

Benefits of technology

It improves coding efficiency, reduces the mean absolute error of coding, lowers the bit error rate during transmission, and ensures stable transmission of image data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116962365B_ABST
    Figure CN116962365B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide an image data encoding method, an electronic device and a storage medium. The method is applied to a first electronic device, and the method comprises: obtaining an image matrix of an original image; converting the image matrix into a data matrix, wherein the data matrix is a product of a transformation matrix of the image and a matrix coefficient sparse vector, and the conversion of the image matrix into the data matrix comprises: calculating the transformation matrix of the image; and calculating the matrix coefficient sparse vector. According to the image data encoding method, the encoding efficiency can be improved, and the average absolute error of encoding can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of cloud computing, and more particularly to an image data encoding method and an electronic device. Background Technology

[0002] A cloud platform is a cluster of multiple computers built by a cloud operator using computer network technology. Computer management technology is then applied to dynamically and automatically allocate these hardware and software resources, which users can access via the internet. Cloud platform services store all resources in the cloud, managed and maintained uniformly by the cloud operator. Users or businesses using this service do not need to equip themselves with equipment or management personnel to enjoy professional services, thus saving many enterprises significant costs.

[0003] In certain application scenarios when using cloud platforms, image data needs to be transmitted between terminal devices and the cloud platform. Due to the large amount of image data to be transmitted, it is necessary to encode the image data before transmitting the encoded image data.

[0004] However, traditional image data encoding techniques have problems. Encoding efficiency and encoding quality are difficult to balance, and image data is prone to encoding misalignment or code loss during transmission.

[0005] Therefore, an image data encoding method is needed to stably transmit image data, improve the efficiency and quality of image data encoding, and reduce the probability of encoding misalignment or code loss during transmission. Summary of the Invention

[0006] To address the issues of improving the efficiency and quality of image data encoding and reducing the probability of encoding misalignment or code loss during transmission under existing technologies, this application provides an image data encoding method and an electronic device.

[0007] The embodiments of this application adopt the following technical solutions:

[0008] In a first aspect, this application provides an image data encoding method, the method being applied to a first electronic device, the method comprising:

[0009] Obtain the image matrix of the original image;

[0010] The image matrix is ​​transformed into a data matrix, wherein the data matrix is ​​the product of the image transformation matrix and the sparse vector of matrix coefficients. The transformation of the image matrix into a data matrix includes:

[0011] Calculate the transformation matrix of the image;

[0012] Calculate the sparse vector of the matrix coefficients.

[0013] In one implementation of the first aspect, obtaining the image matrix of the original image includes:

[0014] Using a clustering method, superpixels are generated based on the original pixels of the original image;

[0015] The image matrix is ​​obtained using an image segmentation algorithm based on the superpixels.

[0016] In one implementation of the first aspect, calculating the transformation matrix of the image includes:

[0017] Based on the image matrix, a coordinate system is established according to the values ​​of the superpixels;

[0018] Based on the coordinate system, the pixel values ​​of the corresponding encoded image are constructed to obtain the encoded image;

[0019] Obtain the raster scan vector of the encoded image;

[0020] The raster scan vector is used as the column vector of the transformation matrix of the image.

[0021] In one implementation of the first aspect, calculating the sparse vector of matrix coefficients includes:

[0022] Calculate the sparse vector of the matrix coefficients based on the constraints.

[0023] Secondly, this application provides an image data decoding method, which is applied to a second electronic device, and the method includes:

[0024] Referring to the encoding process, the same parameter set is used to obtain a transformation matrix with the same phase as the encoding process, wherein the encoding process adopts the image data encoding method as described in the first aspect;

[0025] Image data decoding is performed based on the transformation matrix.

[0026] Thirdly, this application provides an image data transmission method, which is applied to a third electronic device, and the method includes:

[0027] Obtain the original image;

[0028] The original image is encoded based on the image data encoding method described in the first aspect to obtain image compression encoding;

[0029] The image compression code is transmitted using a differential level transmission method.

[0030] In one implementation of the third aspect, transmitting the image compression code based on differential level transmission includes:

[0031] Determine the preset data transmission baud rate and clock frequency;

[0032] The effective continuous clock count for high and low level data bits is calculated based on the data transmission baud rate and the clock frequency.

[0033] Fourthly, this application provides an image data receiving method, the method being applied to a fourth electronic device, the method comprising:

[0034] Receive a differential signal, wherein the differential signal is an image compression code transmitted based on a differential level transmission method, and the image compression code is obtained by encoding the original image based on the image data encoding method according to any one of claims 1-4.

[0035] In one implementation of the fourth aspect, receiving the differential signal includes:

[0036] Identify normal data and noise data in the differential signal;

[0037] Identify differential signal jitter in the normal data;

[0038] Discard the differential signal jitter.

[0039] Fifthly, this application provides an electronic device, characterized in that the electronic device includes a memory for storing computer program instructions and a processor for executing the computer program instructions, wherein when the computer program instructions are executed by the processor, the electronic device is triggered to perform the steps of the method described in the first aspect, or the second aspect, or the third aspect, or the fourth aspect.

[0040] The image data encoding method according to the embodiments of this application can improve encoding efficiency and reduce the average absolute error of encoding. Attached Figure Description

[0041] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0042] Figure 1 The diagram shown is a flowchart of an image data encoding method according to an embodiment of this application;

[0043] Figure 2 The diagram shown is a flowchart of an image data transmission method according to an embodiment of this application;

[0044] Figure 3The diagram shown is a schematic flowchart of an image data transmission method according to an embodiment of this application. Detailed Implementation

[0045] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0046] The terminology used in the implementation section of this application is for the purpose of explaining specific embodiments of this application only, and is not intended to limit this application.

[0047] In application scenarios where terminal devices transmit image data to cloud platforms, a feasible solution is to have the terminal devices transmit the raw image data to the cloud platform without compressing it, based on the basic image data transmission link.

[0048] In this way, although it can avoid consuming the CPU resources of the terminal device, the original data of high-definition images is very large. The bandwidth transmission between the terminal device and the cloud platform is simply insufficient to support the transmission of high-definition image data without compression. Basically, only about three frames of high-definition image data can be transmitted per second.

[0049] Another feasible solution is for the terminal device to compress and encode the image data, and then transmit the compressed image data to the cloud platform.

[0050] While this reduces the amount of data transmitted, allowing some bandwidth between the terminal device and the cloud platform to meet the needs of transmitting high-definition image data, inherent problems with the compression encoding method itself make it difficult to balance encoding efficiency and quality. This can lead to encoding misalignment or code loss during image data transmission.

[0051] To address the aforementioned problems, this application provides an image data encoding method in one embodiment. Specifically, in one embodiment, the conversion coefficients are solved using the RGB color matrix vector of the image to convert the RGB color matrix into a data matrix composed of 0s and 1s. The image data encoding method according to this application embodiment can improve encoding efficiency and reduce the mean absolute error of encoding.

[0052] It should be noted that the image data encoding method provided in this application embodiment can be applied to any image data transmission scenario, and is not limited to the scenario where a terminal device sends image data to a cloud platform. For example, image transmission between two terminal devices; image transmission between two cloud servers; or image transmission from a cloud server to a terminal device.

[0053] Specifically, in one embodiment, assuming the original image has m pixels, the original image can be represented as an RGB color matrix:

[0054] Y∈{R m}, (1)

[0055] In Formula 1, R represents the RGB color of a pixel.

[0056] Convert the RGB color matrix into a data matrix:

[0057] Y = Ax, (2)

[0058] To achieve image data encoding compression, in Formula 2: The transformation matrix of the image.

[0059] This represents a sparse vector of matrix coefficients.

[0060] Taking a specific application scenario as an example, the sender of image data (the first electronic device) can be a mobile phone, set-top box or other terminal device.

[0061] After encoding the image data, the first electronic device sends the encoded image data, which is then received by the image data receiver (the second electronic device). The image data receiver (the second electronic device) can be a cloud server, a printer, etc.

[0062] Figure 1 The diagram shown is a flowchart of an image data encoding method according to an embodiment of this application.

[0063] Before transmitting image data to the second electronic device, the first electronic device performs the following... Figure 1 The following steps are shown to encode image data.

[0064] S101: Using a simple linear iterative clustering method based on k-means, superpixels are generated from the original pixels of the original image (superpixels have better performance in terms of boundary compliance).

[0065] Specifically, in S101, adjacent original pixels with the same color or whose color similarity meets the pixel merging requirements are merged into a superpixel. The superpixel set is a part of the original image matrix.

[0066] Specifically, the simple linear iterative clustering method based on k-means automatically clusters similar samples into one place, and different clustering effects can be achieved by setting reasonable values.

[0067] The implementation steps of the simple linear iterative clustering method based on k-means are as follows:

[0068] (1) Select an initial cluster center for each cluster;

[0069] (2) Assign the sample values ​​of the cluster to the nearest neighbor cluster according to the principle of minimum distance;

[0070] (3) Update the cluster centers using the sample values ​​of each cluster;

[0071] (4) Repeat steps (2) and (3) until the cluster centers no longer change;

[0072] (5) Output the final clustering results.

[0073] Furthermore, in S101, a cluster center is first selected for each pixel, and each pixel is assigned to a neighboring cluster according to the minimum distance from the cluster center, thus obtaining a new pixel sample value; the cluster center is updated again using the new pixel sample value, and the new pixel sample value is still assigned according to the minimum distance; the above steps are repeated until the cluster center no longer changes, thus obtaining the superpixel sample value of the original image, that is, obtaining the superpixel of the original image.

[0074] Furthermore, in S101, during the aforementioned conversion from original pixels to superpixels, the search space for cluster centers is restricted to a region proportional to the superpixel size, ensuring a linear relationship between the number of original pixels and the number of superpixels. Furthermore, a weighted distance measurement method, combining color and spatial proximity, is used to provide control over the size and compactness of the superpixels.

[0075] S102: Based on the superpixels of the obtained original image, use an image segmentation algorithm to obtain the image matrix.

[0076] Specifically, image segmentation divides the original image into several non-overlapping regions based on its features, so that these features exhibit consistency or similarity within the same region and distinct differences between different regions.

[0077] Image segmentation algorithms are based on preset parameters n and l, where k is the number of regions to be segmented and l is the weight that balances color similarity and spatial proximity. Different n and l will yield different segmentation results.

[0078] Specifically, in one embodiment, for example, the superpixel set after image segmentation is as shown in Formula 3:

[0079] M = {(n1, l1), (n2, l2) ... (n z ,l z )}。 (3)

[0080] In Formula 3, z represents a constant.

[0081] S103, Based on the image matrix obtained from image segmentation, calculate the transformation matrix A of the image (the definition of A is given in Formula 2).

[0082] Specifically, a coordinate system is established based on the obtained superpixel values. in

[0083] Based on the established coordinate system L (h) Construct the pixel values ​​of the corresponding encoded image. To obtain the encoded image.

[0084] The corresponding pixel values ​​are shown in Formulas 4 and 5;

[0085] If i, j belong to coordinate system L (h) (4)

[0086] If i and j do not belong to coordinate system L (h) (5)

[0087] Obtain the raster scan vector of the encoded image and use it as the column vector of the transformation matrix A.

[0088] S104: Calculate the sparse vector x of the matrix coefficients (the definition of x is given in Formula 2).

[0089] Specifically, based on the constraints, calculate the sparse vector x of the matrix coefficients.

[0090]

[0091] Calculate the sparse vector x of the matrix coefficients.

[0092] In Formula 6, ||x||0 represents a non-zero value of x; constraint B is a positive number used to control the value within the range of x. The number of non-zero values ​​within the interval.

[0093] Specifically, in one embodiment, assuming x′ represents the optimal solution of Equation 4, according to

[0094]

[0095] Calculate x′.

[0096] In Formula 7, q represents the quantization bit rate of the image, and qB represents the volume information of x′. This represents the recovery of volume information at non-zero locations.

[0097] Furthermore, corresponding to the image data encoding method proposed in the embodiments of this application, an embodiment of this application also proposes an image data decoding method.

[0098] Specifically, in the decoding stage, the image data receiver (second electronic device) uses the same parameter set as the encoding process to obtain a transformation matrix A with the same phase as the encoding process.

[0099] Y * =Ax * (8)

[0100] Decode the image data to obtain the recovered image.

[0101] Furthermore, in one embodiment, in order to evaluate the quality of image compression, the mean absolute difference (MAD) is used to measure the difference between the original image and the restored image, which is calculated by Equation 9.

[0102]

[0103] In Formula 9, X i,j Represents the original image. This indicates that the image has been restored.

[0104] For example, if n∈{50,100,200} and l∈{1,5,10,15}, then the positions of the non-zero values ​​are:

[0105] (50+100+200)×4÷8=175, (10)

[0106] If L is set to 240 and the superpixel parameter value is set to 7, then the algorithm needs 422 bytes to recover the image.

[0107] Furthermore, one embodiment of this application also proposes an image data transmission method. Specifically, in one embodiment, image data is transmitted using a differential level transmission method (Low Voltage Differential Signaling (LVDS)).

[0108] Low Voltage Differential Signaling (LVDS) is a differential signal with very low amplitude vibration. It has the advantages of low power consumption, low bit error rate, low crosstalk and low radiation.

[0109] Differential transmission refers to transmitting signals on both signal lines, with the two signals having the same amplitude but opposite phase.

[0110] LVDS differential level transmission specifically involves transmitting data through signal lines or balanced cables on a pair of differential circuit boards. LVDS differential level transmission can transmit data at speeds up to several thousand Mbps. Because LVDS is a low-amplitude differential signal, it generates extremely low noise and consumes very little power during data transmission, achieving high-efficiency data transmission. Therefore, LVDS differential level transmission is used to send data to cloud platforms.

[0111] The cloud OS platform and user terminals communicate using the Message Queuing Telemetry Transport Protocol (MQTT), which, like HTTP, is compatible with the TCP / IP protocol. HTTP communicates in a request / response manner: the client sends a request to the server, the server receives the request, retrieves the data, and finally sends the retrieved data as a response to the client. This process reduces communication efficiency and real-time performance. Unlike HTTP, MQTT is a lightweight, topic-based publish / subscribe messaging protocol. Its publish / subscribe mechanism involves a client publishing messages on topic A to an MQTT broker server. The broker server then forwards the messages to other clients subscribed to topic A. MQTT is a transport protocol that defines the content format of transmitted data and the response mechanism between master and slave devices, but the data transmission method is still LVDS.

[0112] In LVDS transmission:

[0113] (1) Implementation method: The MQTT protocol requires an MQTT broker server and one or more clients to implement communication.

[0114] (2) Quality of Service: When transmitting messages, the quality of messages is specified in three levels: the first level "at most once", this type of message publishing is highly dependent on the TCP / IP network and is suitable for ordinary push that does not matter if one record is lost; the second level "at least once", which can ensure that the message is delivered, but may be pushed repeatedly; the third level "only once", which ensures that the message arrives once, is a high-quality message publishing service.

[0115] (3) MQTT message transmission: When building a network transmission of the MQTT protocol, an ordered, high-quality, byte-based bidirectional transmission connection is established between the client and the server, and the topic name and quality of service are associated.

[0116] (4) Roles of MQTT Client and Server: The client publishes messages that other clients may subscribe to, subscribes to / unsubscribes from messages published by other clients, and disconnects from the server. The server handles client connection, subscription / unsubscription, message forwarding, and other requests.

[0117] Taking a specific application scenario as an example, the sender of image data (the third electronic device) can be a mobile phone, set-top box, or other terminal device. Refer to the first electronic device.

[0118] After encoding the image data, the third electronic device sends the encoded image data, which is then received by the image data receiver (the fourth electronic device). The image data receiver (the fourth electronic device) can be a cloud server, printer, etc. Refer to the second electronic device.

[0119] Figure 2 The diagram shown is a flowchart of an image data transmission method according to an embodiment of this application.

[0120] The sender of image data (third electronic device) and the receiver of image data (fourth electronic device) perform... Figure 2 The following process is shown to achieve image data transmission.

[0121] S201: The third electronic device acquires the original image.

[0122] S202: The third electronic device compresses the original image using encoding technology to obtain compressed image data.

[0123] Specifically, in S102, the original image can be compressed using the encoding method proposed in the embodiments of this application, or other encoding methods can be used to compress the image data.

[0124] S203: The third electronic device adds a flag bit to the compressed image data.

[0125] S204: The third electronic device transmits the compressed image data with flag bits to the fourth electronic device using LVDS differential level transmission.

[0126] Specifically, after the first electronic device acquires the compressed image data, it converts the single-ended compressed image data into a differential signal and sends the differential signal using the LVDS differential level transmission method.

[0127] S205: The fourth electronic device receives the differential signal.

[0128] S206: The fourth electronic device identifies and parses the flag bits of the differential signal to obtain compressed image data.

[0129] S207: The fourth electronic device stores compressed image data.

[0130] Furthermore, one embodiment of this application also proposes an image data receiving method. The image data receiver (a fourth electronic device) receives a differential signal. This differential signal is an image compression code transmitted by a third electronic device based on a differential level transmission method.

[0131] Specifically, in one embodiment, the image compression encoding sent by the third electronic device is obtained by encoding the original image based on the image data encoding method proposed in the embodiments of this application.

[0132] Furthermore, in data transmission, data jitter refers to the short-term deviation of each valid instant of the data signal from its ideal position at that time. When using differential methods for data transmission, due to the high data rate and the influence of the embedded clock, the device is affected by jitter. Jitter can cause transmission errors, leading to higher bit error rates and performance degradation.

[0133] Figure 3 The diagram shown is a schematic flowchart of an image data transmission method according to an embodiment of this application.

[0134] To reduce data transmission distortion, such as Figure 3 As shown, in one embodiment, the differential transmission scheme includes a data stabilization strategy (S310).

[0135] The data stabilization strategy (S310) is implemented by the image data receiver (fourth electronic device). The data stabilization strategy (S310) includes:

[0136] Identify normal data and noise data in differential signals;

[0137] Identify differential signal jitter in normal data;

[0138] Discard differential signal jitter.

[0139] Specifically, such as Figure 3 As shown, the data stabilization strategy (S310) includes the following process.

[0140] (1) Analyze the noise distribution and distinguish between noise signals (noise data) and differential signals (normal data) based on the noise distribution. (S311)

[0141] For the factors that cause data jitter, the standard deviation is used to describe the impact of the factors on the data, and the probability density distribution function is shown in Equation 11.

[0142]

[0143] In Formula 11, σ is the standard deviation of the magnitude of the random error that satisfies the characteristics of a Gaussian distribution, and t represents the difference between the actual time and the real time.

[0144] Regarding the impact of periodic noise during data transmission, the characteristics of the periodic noise impact satisfy the description of Formula 12.

[0145]

[0146] In Formula 12, M represents the harmonic order of the periodic noise, and N... i ω represents the amplitude of the noise at that harmonic order. i θ represents the frequency of the noise at that harmonic order. i The phase of the noise at that harmonic order is represented by t, where t represents time.

[0147] (2) Introduce an error function to distinguish between noise signals and differential signals. (S312)

[0148] To avoid jitter during differential signal transmission, an error function is introduced. The calculation method for the error function is shown in Formula 13:

[0149] δ(i)=x(i-1 / 2)[x(n)-x(n-1)], (13)

[0150] In Formula 13, x(i) is the i-th sample value, x(i-1) is the (i-1)-th sample value, which is the sample value of the previous clock frequency, and x(i-1 / 2) is the sample value at the midpoint between two times.

[0151] When the signal is a noisy signal, the value of δ(i) is not 0; when the signal is a normal signal, the value of δ(i) is 0, that is, there is no error function.

[0152] (3) Data identification strategy: Identify differential signal jitter from the differential signal and discard differential signal jitter. (S313)

[0153] The noise duration is short and it is intermittent. A delay function is added during differential signal transmission. The delay function is used to determine whether the data signal changes from high level to low level or from low level to high level. The signal is considered valid if several sample values ​​remain at the changed level. Otherwise, it is considered differential signal jitter and the value is discarded.

[0154] Furthermore, in order to improve data transmission rates, such as Figure 3 As shown, in one embodiment, the differential transmission scheme further includes a time sampling strategy (S320).

[0155] The time sampling strategy (S320) is implemented by the sender of the image data (the third electronic device).

[0156] Specifically, such as Figure 3 As shown, the time sampling strategy (S320) includes the following process.

[0157] (1) Determine the baud rate (S321)

[0158] Determine the preset data transmission baud rate in bps.

[0159] (2) Determine the communication clock (S322)

[0160] Determine the preset clock frequency f.

[0161] (3) Time sampling strategy (S323)

[0162] The effective duration N of high and low level data bits is calculated using Formula 14 based on the data transmission baud rate and clock frequency.

[0163]

[0164] The sampling time point is selected as the midpoint between a single high and low level, that is, when the signal changes and lasts for N / 2 clock cycles.

[0165] The method according to the embodiments of this application effectively identifies normal data and noisy data, has good data anti-jitter properties, and formulates a more accurate time acquisition strategy for the characteristics of differential signals. Compared with traditional methods, it has a lower bit error rate, a simpler transmission method, and lower requirements for equipment modification.

[0166] In the description of the embodiments of this application, for the sake of convenience, the description is divided into various modules according to their functions. The division of each module is only a logical functional division. When implementing the embodiments of this application, the functions of each module can be implemented in one or more software and / or hardware.

[0167] Specifically, the apparatus proposed in this application can be fully or partially integrated onto a single physical entity, or physically separated. These modules can be implemented entirely in software via processing element calls; entirely in hardware; or partially in software via processing element calls and partially in hardware. For example, the detection module can be a separate processing element or integrated into a chip in the electronic device. The implementation of other modules is similar. Furthermore, these modules can be fully or partially integrated together, or implemented independently. During implementation, each step of the above method or each of the above modules can be completed through integrated logic circuits in the hardware of the processor element or through software instructions.

[0168] For example, these modules can be one or more integrated circuits configured to implement the above methods, such as one or more application-specific integrated circuits (ASICs), one or more digital signal processors (DSPs), or one or more field-programmable gate arrays (FPGAs). Alternatively, these modules can be integrated together as a system-on-a-chip (SOC).

[0169] An embodiment of this application also proposes an electronic device, which includes a memory for storing computer program instructions and a processor for executing the program instructions, wherein when the computer program instructions are executed by the processor, the electronic device is triggered to execute the method flow described in the embodiment of this application.

[0170] Specifically, in one embodiment of this application, the one or more computer programs are stored in the memory, and the one or more computer programs include instructions that, when executed by the device, cause the device to perform the method steps described in the embodiment of this application.

[0171] Specifically, in one embodiment of this application, the processor of the electronic device may be a device-on-a-chip (SoC), which may include a central processing unit (CPU) and may further include other types of processors. Specifically, in one embodiment of this application, the processor of the electronic device may be a PWM control chip.

[0172] Specifically, in one embodiment of this application, the processor may include, for example, a CPU, DSP, microcontroller, or digital signal processor, and may also include a GPU, embedded neural network processing units (NPUs), and image signal processors (ISPs). The processor may also include necessary hardware accelerators or logic processing hardware circuits, such as ASICs, or one or more integrated circuits for controlling the execution of the program of the technical solution of this application. Furthermore, the processor may have the function of operating one or more software programs, which may be stored in a storage medium.

[0173] Specifically, in one embodiment of this application, the memory of the electronic device may be a read-only memory (ROM), other types of static storage devices capable of storing static information and instructions, random access memory (RAM), or other types of dynamic storage devices capable of storing information and instructions. It may also be an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM), or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media, or other magnetic storage devices. Alternatively, it may be any computer-readable medium capable of carrying or storing desired program code in the form of instructions or data structures that can be accessed by a computer.

[0174] Specifically, in one embodiment of this application, the processor and memory can be combined into a single processing device, or more commonly, they are independent components. The processor executes program code stored in the memory to implement the method described in the embodiments of this application. In specific implementations, the memory can also be integrated into the processor, or it can be independent of the processor.

[0175] Furthermore, the devices, apparatuses, and modules described in the embodiments of this application may be implemented by computer chips or physical entities, or by products with certain functions.

[0176] Those skilled in the art will understand that embodiments of this application can be provided as methods, apparatus, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media containing computer-usable program code.

[0177] In the several embodiments provided in this application, any function, if implemented as a software functional unit and sold or used as an independent product, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application.

[0178] Specifically, one embodiment of this application also provides a computer-readable storage medium storing a computer program that, when run on a computer, causes the computer to execute the method provided in the embodiment of this application.

[0179] An embodiment of this application also provides a computer program product, which includes a computer program that, when run on a computer, causes the computer to perform the method provided in the embodiment of this application.

[0180] The embodiments described in this application are described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (devices), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0181] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0182] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0183] It should also be noted that in the embodiments of this application, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent the existence of A alone, the simultaneous existence of A and B, or the existence of B alone. A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of singular or plural items. For example, at least one of a, b, and c can represent: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, and c can be single or multiple.

[0184] In this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0185] This application can be described in the general context of computer-executable instructions, such as program modules, that are executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a specific task or implement a specific abstract data type. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0186] The various embodiments in this application are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the device embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0187] Those skilled in the art will recognize that the units and algorithm steps described in the embodiments of this application can be implemented using electronic hardware, computer software, or a combination of electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0188] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the devices, apparatuses, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0189] The above description is merely a specific embodiment of this application. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the protection scope of this application. The protection scope of this application should be determined by the protection scope of the claims.

Claims

1. An image data encoding method, characterized in that, The method is applied to a first electronic device, and the method includes: Obtain an image matrix of the original image, wherein the image matrix is ​​composed of multiple superpixels obtained by segmenting the original image, and each superpixel contains multiple pixels; The image matrix is ​​transformed into a data matrix, wherein the data matrix is ​​the product of the image transformation matrix and the sparse vector of matrix coefficients. The transformation of the image matrix into a data matrix includes: Calculate the transformation matrix of the image; Calculate the sparse vector of the matrix coefficients; The calculation of the transformation matrix of the image includes: Based on the multiple superpixels, establish a corresponding coordinate system for each superpixel; For each superpixel, an encoded image is constructed based on its corresponding coordinate system. In the encoded image, if the coordinates of a pixel are located within the coordinate system corresponding to the superpixel, the value of the pixel is set to 1; otherwise, it is set to 0. Obtain the raster scan vector for each encoded image; The raster scan vector of each coded image is used as a column vector to form the transformation matrix of the image.

2. The method according to claim 1, characterized in that, The process of obtaining the image matrix of the original image includes: Using a clustering method, superpixels are generated based on the original pixels of the original image; The image matrix is ​​obtained using an image segmentation algorithm based on the superpixels.

3. The method according to claim 1, characterized in that, The calculation of the sparse vector of the matrix coefficients includes: Calculate the sparse vector of the matrix coefficients based on the constraints.

4. An image data decoding method, characterized in that, The method is applied to a second electronic device, and the method includes: Referring to the encoding process, a transformation matrix with the same phase as the encoding process is obtained using the same parameter set, wherein the encoding process adopts the image data encoding method as described in any one of claims 1-3; Image data decoding is performed based on the transformation matrix.

5. A method for transmitting image data, characterized in that, The method is applied to a third electronic device, and the method includes: Obtain the original image; The original image is encoded using the image data encoding method according to any one of claims 1-3 to obtain image compression encoding; The image compression code is transmitted using a differential level transmission method.

6. The method according to claim 5, characterized in that, The transmission of the image compression code based on differential level transmission includes: Determine the preset data transmission baud rate and clock frequency; The effective continuous clock count for high and low level data bits is calculated based on the data transmission baud rate and the clock frequency.

7. A method for receiving image data, characterized in that, The method is applied to a fourth electronic device, and the method includes: Receive a differential signal, wherein the differential signal is an image compression code transmitted based on a differential level transmission method, and the image compression code is obtained by encoding the original image based on the image data encoding method according to any one of claims 1-3.

8. The method according to claim 7, characterized in that, The received differential signal includes: Identify normal data and noise data in the differential signal; Identify differential signal jitter in the normal data; Discard the differential signal jitter.

9. An electronic device, characterized in that, The electronic device includes a memory for storing computer program instructions and a processor for executing the computer program instructions, wherein when the computer program instructions are executed by the processor, the electronic device is triggered to perform the method steps as claimed in any one of claims 1-3, or claim 4, or claims 5-6, or claims 7-8.