An image transmission method and apparatus

By segmenting images into processing units and constructing random access units, and employing flexible compression methods, the flexibility problem of ISP systems in image data processing is solved, achieving random access and efficient transmission, and adapting to various application scenarios.

CN118175340BActive Publication Date: 2025-12-26AXERA SEMICON (SHANGHAI) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410077604.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-18
Publication Date
2025-12-26
Estimated Expiration
2044-01-18

AI Technical Summary

Technical Problem

ISP systems lack flexibility in image data processing, making it difficult to adapt to various application scenarios and lacking support for random access to image data, which reduces the flexibility of image processing.

Method used

By segmenting the target image into image processing units and constructing random access units, different compression methods are used to compress the image processing units, the compression length information of the random access units is calculated, and the information is stored in an information table to achieve random access and flexible transmission of images.

Benefits of technology

It improves the flexibility of image processing and the reusability of data, adapts to various application scenarios, and enables random access and efficient transmission of image data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118175340B_ABST
    Figure CN118175340B_ABST
Patent Text Reader

Abstract

The application provides an image transmission method and device. The method obtains image processing units by dividing a target image, and constructs random access units based on the image processing units. Compressing the image processing units can obtain compressed image processing units, and the second compression length information of the random access units is calculated based on the first compression length information of the compressed image processing units. Inputting the compressed image processing units into an image transmission code stream can perform image transmission. The second compression length information is stored in an information table, and can be used to locate the code stream segment corresponding to the random access unit from the image transmission code stream when accessing the image, so as to realize random access of the image. Based on the division of the image, different compression methods can be used for different compressed image processing units in the compression process, so as to improve the flexibility of image processing. Random access of the image can be realized based on the random access unit, and the flexibility of image processing is further improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image transmission technology, and in particular to an image transmission method and apparatus. Background Technology

[0002] In ISP (Image Signal Processing) systems, image data has a large size and bit width, thus requiring significant system memory and bandwidth. Given limited system memory and bandwidth, image data compression is necessary to improve processing performance and transmission capabilities.

[0003] When compressing image data, compression methods can be categorized into lossless compression and lossy compression based on the quality of the compressed image. Lossless compression guarantees the quality of the compressed image, while lossy compression is beneficial for image data transmission. Furthermore, image data can be compressed and transmitted using either fixed-bitstream or variable-bitstream methods. Fixed-bitstream transmission is advantageous for data scheduling, while variable-bitstream transmission supports image data access methods such as random access.

[0004] However, in practical applications of ISP systems, to improve operational efficiency, IPS systems typically only incorporate specific compression algorithms, choosing either lossless or lossy compression. This results in poor flexibility in image data compression, making it difficult to adapt to various application scenarios. Furthermore, the algorithms configured in ISP systems generally lack support for random access to image data, thus limiting the efficiency of data reuse and reducing the flexibility of ISP systems in image data processing. Summary of the Invention

[0005] This application provides an image transmission method and apparatus to solve the problem of low flexibility in ISP systems when processing image data.

[0006] In a first aspect, this application provides an image transmission method, comprising:

[0007] The target image is segmented to obtain an image processing unit; the image processing unit is used to construct a random access unit.

[0008] The image processing unit is compressed to obtain a compressed image processing unit;

[0009] The second compression length information of the random access unit is calculated based on the first compression length information of the compressed image processing unit.

[0010] The second compressed length information is stored in an information table as stream positioning information, and is used for positioning the stream segment corresponding to the random access unit in the image transmission stream; wherein the stream segment has a mapping relationship with the random access unit.

[0011] The compressed image processing unit is input into an image transmission stream.

[0012] In some possible embodiments, the random access unit includes at least two image processing units; and the at least two image processing units have one of the following positional relationships in the target image: horizontal continuity, vertical continuity, and horizontal and vertical continuity.

[0013] In some possible embodiments, the method further includes:

[0014] Based on the first initial length information of the image processing unit, second initial length information of the random access unit is determined;

[0015] Based on the first initial length information, first compressed length information of the compressed image processing unit is calculated.

[0016] In some possible embodiments, the second compressed length information of the random access unit is calculated based on the first compressed length information of the compressed image processing unit, and includes:

[0017] An equal division position is set according to the second initial length information;

[0018] The equal division position is marked based on the first compressed length information;

[0019] The first compressed length information is padded according to the padded equal division position, to obtain the second compressed length information.

[0020] In a second aspect, the application provides another image transmission method, including:

[0021] Based on a segmentation manner of an image, a sequence number of a random access unit corresponding to a target stream segment is calculated;

[0022] Based on the sequence number of the random access unit and second compressed length information of the random access unit, a target stream segment is extracted from the image transmission stream; the second length information of the random access unit is stored in an information table; wherein the second compressed length information is calculated from first compressed length information, and the first compressed length information is used to represent a data length of an image processing unit included in the random access unit after compression;

[0023] The random access unit corresponding to the target stream segment is decompressed to obtain a decompressed image processing unit.

[0024] The image-based segmentation manner is used to obtain the original image corresponding to the target code stream segment by the decompression image processing unit.

[0025] In some possible embodiments, based on the sequence number of the random access unit and the second compressed length information of the random access unit, a target code stream segment is extracted from the image transmission code stream, including:

[0026] The second compressed length information of the previous random access unit whose sequence number is less than the sequence number of the random access unit in the storage structure is traversed;

[0027] The second compressed length information of the previous random access unit is accumulated to obtain a starting position of the target code stream segment corresponding to the random access unit in the image transmission code stream;

[0028] Based on the starting position and the second compressed length information of the random access unit, the target code stream segment is extracted.

[0029] In a third aspect, the present application provides an image transmission device, including a preprocessing module, a compression module, a calculation module, a storage module and a transmission module;

[0030] The preprocessing module is used to segment a target image to obtain an image processing unit; the image processing unit is used to construct a random access unit;

[0031] The compression module is used to compress the image processing unit to obtain a compressed image processing unit;

[0032] The calculation module is used to calculate the second compressed length information of the random access unit based on the first compressed length information of the compressed image processing unit;

[0033] The storage module is further used to store the second compressed length information in an information table; the second compressed length information is used to locate a code stream segment corresponding to the random access unit in an image transmission code stream; wherein the code stream segment has a mapping relationship with the random access unit;

[0034] The transmission module is used to input the compressed image processing unit into the image transmission code stream.

[0035] In a fourth aspect, the present application provides another image transmission device, including a calculation module, a decision module, a decompression module and a restoration module;

[0036] The calculation module is used to calculate the sequence number of a random access unit corresponding to a target code stream segment based on an image-based segmentation manner;

[0037] The decision module is configured to extract a target code stream segment from the image transmission code stream based on a sequence number of the random access unit and second compression length information of the random access unit, the second compression length information of the random access unit being stored in an information table, wherein the second compression length information is calculated from first compression length information, and the first compression length information is used to represent a compressed data length of an image processing unit included in the random access unit.

[0038] The decompression module is configured to decompress the random access unit corresponding to the target code stream segment to obtain a decompressed image processing unit.

[0039] The restoration module is configured to obtain a native image corresponding to the target code stream segment based on a segmentation manner of an image and the decompressed image processing unit.

[0040] In a fifth aspect, the present application provides an electronic device, comprising:

[0041] a processor, and a memory connected to the processor in communication;

[0042] The memory stores instructions executable by the processor, so that the processor executes the steps of the method in the first aspect.

[0043] In a sixth aspect, the present application provides a computer readable storage medium, comprising:

[0044] The computer readable storage medium comprises at least one computer instruction, and the at least one computer instruction is used to make a computer execute the steps of the method in the first aspect.

[0045] From the above technical content, the present application provides an image transmission method and device. The method obtains an image processing unit by segmenting a target image, and constructs a random access unit based on the image processing unit. Compressing the image processing unit can obtain a compressed image processing unit, and the second compression length information of the random access unit is calculated based on the first compression length information of the compressed image processing unit. Inputting the compressed image processing unit into an image transmission code stream can perform image transmission. After storing the second compression length information in an information table, it can be used to locate the code stream segment corresponding to the random access unit from the image transmission code stream when accessing the image, so as to realize random access of the image. Based on the segmentation of the image, different compression methods can be used for different compressed image processing units in the compression process, so as to improve the flexibility of image processing. Based on the random access unit, random access of the image can be realized, and the flexibility of image processing is further improved. BRIEF DESCRIPTION OF DRAWINGS

[0046] In order to more clearly illustrate the technical solutions of the present application, the following will briefly introduce the drawings needed in the embodiments. Obviously, for those skilled in the art, other drawings can also be obtained based on these drawings without any creative effort.

[0047] Figure 1 An image compression schematic diagram provided for the embodiments of the present application;

[0048] Figure 2 A lossy compression and lossless compression schematic diagram provided for the embodiments of the present application;

[0049] Figure 3 A random access unit construction schematic diagram provided for the embodiments of the present application;

[0050] Figure 4 A second compression length schematic diagram provided for the embodiments of the present application;

[0051] Figure 5 A code stream segment and random access unit correspondence relationship schematic diagram provided for the embodiments of the present application;

[0052] Figure 6 An image decompression schematic diagram provided for the embodiments of the present application. DETAILED DESCRIPTION

[0053] The embodiments will be described in detail below, examples of which are shown in the drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following embodiments are not intended to represent all implementations consistent with the present application. They are merely examples of illustrative systems and methods consistent with some aspects of the present application as detailed in the appended claims.

[0054] Image data can be processed in an ISP system, which is an image processing system built around an ISP chip. Because the size and bit width of the image data are large, the demand for memory resources and bandwidth resources of the ISP system is high during the processing of the image data. In order to ensure the image processing performance and transmission efficiency of the ISP system in the application scenario of limited memory resources and bandwidth resources, the image data can be compressed before image data transmission. And the image is decompressed after the image data transmission is completed, so as to improve the transmission efficiency.

[0055] In the process of compressing image data, the image data can be compressed based on residual compression, frequency domain residual compression and the like, and lossy compression or lossless compression can be achieved by designing parameters and processes in the compression process. The lossy compression will cause a certain loss of image quality, but can obtain a higher compression ratio to facilitate image data transmission. Lossless compression can ensure the image quality of the image data, but will occupy more memory resources and bandwidth resources during transmission. When using lossless compression or lossy compression in ISP systems, it lacks flexibility in different application scenarios that require high transmission efficiency and high image quality. At the same time, it is also difficult to balance the requirements of transmission efficiency and image quality.

[0056] After the image data is compressed, the compressed image data can be input to an image transmission code stream to realize the transmission of the image data. The image data transmission can be transmitted based on a fixed code stream. The fixed code stream transmission mode means that the encoder outputs the compressed image data at a constant code rate after compressing the image data, which is beneficial to data scheduling and has stable application effect in various application scenarios.

[0057] When the ISP system uses a single lossless compression algorithm or lossy compression algorithm, it is beneficial to apply the fixed code stream transmission mode in various scenarios, but its application effect is still limited by bandwidth, memory and other resources. Moreover, in some scenarios with special requirements for image quality and transmission efficiency, the image processing effect cannot be good.

[0058] And based on the streaming compression and streaming decompression mode of the fixed code stream, the image quality is focused on, and the support for the back-end application is relatively single. For example, when providing ROI (Region of interest) for a third-party application, random access to the data in the image transmission code stream is not supported, the image data needs to be decompressed as a whole, which wastes system bandwidth and limits the reuse efficiency of data, resulting in low flexibility of the ISP system.

[0059] Based on the above problems, as shown in Figure 1 The present application provides an image transmission method, comprising:

[0060] S100: dividing a target image to obtain an image processing unit;

[0061] The image processing unit can be used to construct a random access unit. It can be understood that the sizes of the image processing units obtained by dividing the target image are the same. For example, the target image can be divided into a plurality of 2*8 pixel image processing units. And a random access unit can be constructed according to adjacent image processing units, for example, a random access unit is constructed with two adjacent image processing units, and the size of the obtained random access unit is 2*16 pixels.

[0062] As shown in Figure 2 The at least two image processing units are arranged in a position relationship of one of horizontal continuity, vertical continuity, and horizontal and vertical continuity in the target image.

[0063] In some embodiments, the horizontal continuity, the vertical continuity, and the horizontal and vertical continuity all represent that the position relationship of the image processing units constituting the random access unit in the target image is adjacent. The similarity between the adjacent image processing units is higher, and the case of missing pixels in the target image can be reduced, thereby improving the continuity and quality of the image. In this way, when the image processing units are compressed, it is also beneficial to ensure the image quality corresponding to the image processing units.

[0064] In the above embodiments, the number of image processing units used to construct the random access unit can also be adjusted according to actual needs. When the number of image processing units is fixed, the more the number of image processing units included in each random access unit, the higher the compression rate of the target image when the image processing units are compressed in units of random access units, which is equivalent to compressing more image processing units. Conversely, the fewer the number of image processing units included in the random access unit, the more the number of random access units corresponding to the target object, that is, the more the code stream segments corresponding to the random access units in the image transmission code stream. The more the code stream segments in the image transmission code stream, the more choices when accessing the image transmission code stream, thereby facilitating to improve the flexibility of random access.

[0065] It should be noted that the above embodiments of segmenting images and constructing random access units are applicable to image data in various formats such as bayer, rgb (Red, Green, Blue), yuv (brightness, chroma), and the like, thereby making the ISP system have good applicability to various data formats.

[0066] In addition, based on the different sizes of the target image, several ways of horizontal continuity, vertical continuity, and horizontal and vertical continuity can be combined to construct the random access unit, so as to reduce the omission of pixels in the target image and thereby ensure the image quality.

[0067] S200: compressing the image processing units to obtain compressed image processing units;

[0068] In some embodiments, the image processing units in the random access unit are compressed in units of random access units to obtain compressed image processing units. It can be understood that the data length of the compressed image processing units is smaller than that of the image processing units before compression, and therefore it is beneficial to reduce the demand for memory and bandwidth in the ISP system when transmitting image data.

[0069] It should be noted that different compression methods can be used for different compressed image processing units. For example, for image processing units representing important features in the target image, lossless compression can be used to ensure that important features in the target image can be restored without error after decompression. For image processing units with low weight levels in the target image, such as image processing units representing the background, lossy compression can be used for compression, and the compression rate can be controlled to adapt to different scenarios.

[0070] The specific methods of lossy compression and lossless compression are not the focus of the embodiments of the present application, and therefore are not limited. The embodiments of the present application aim to construct random access units based on image segmentation and image processing units, which can use different compression methods for different image processing units to improve the flexibility of image processing and make the ISP system applicable to more application scenarios.

[0071] In the embodiments of the present application, the data length of the random access unit can be calculated according to the data length of the image processing unit, so as to locate the position of the code stream segment corresponding to the random access unit in the image transmission code stream through the data length of the random access unit. The image data input into the image transmission code stream is a compressed image processing unit, so the data length of the compressed image processing unit needs to be calculated, that is, in some embodiments, the image transmission method further comprises:

[0072] determining second initial length information of the random access unit based on the first initial length information of the image processing unit;

[0073] calculating first compressed length information of the compressed image processing unit based on the first initial length information.

[0074] It can be understood that the image processing unit has an initial length after segmentation, that is, the first initial length information. Based on the first initial length information, the initial length of the random access unit to which the image processing unit belongs can be calculated, that is, the second initial length information. For example, each random access unit includes two image processing units that are horizontally continuous in position, and the second initial length information can be determined as twice the first initial length information.

[0075] At the same time, based on the difference in compression method, the first compressed length information of the compressed image processing unit can be calculated. As shown in Figure 2 When the image processing unit is compressed, it is equivalent to rearranging the data arrangement relationship used to represent the image processing unit to achieve compression.

[0076] For example, when the data used to represent the image processing unit is 1579, the data bits occupied by it are 16 bits, and after compression, the arrangement order of "5179" can be modified to "1579", and the data bits occupied by "1579" are 14 bits. Such a compression method is a kind of lossless compression, and the content represented by each bit of data is not modified, but only the arrangement of each bit of data is rearranged to reduce the number of bits occupied by the data, thereby achieving compression.

[0077] For another example, after compression, "5179" can be compressed to "1577", and the data bits occupied by "1577" are 11 bits. Such a compression method is a kind of lossy compression, which not only modifies the arrangement order of the data, but also compresses one bit of data.

[0078] Therefore, in the embodiments of the present application, the first compressed length information of the compressed image processing unit can be calculated based on different compression methods and the first initial length information of the image processing unit. It can be understood that based on the first compressed length information, the second compressed length information of the random access unit corresponding to the compressed image processing unit can be calculated.

[0079] S300: calculating the second compressed length information of the random access unit based on the first compressed length information of the compressed image processing unit;

[0080] It can be understood that the first initial length information of the image processing unit is a relatively regular value, so it is easy to arrange and apply, and the second initial length information of the random access unit to which it belongs is also a relatively regular value. For example, the size of a random access unit composed of two image processing units with a size of 2*8 pixels is 2*16 pixels. However, after compression, the corresponding first compressed length information of the image processing unit may no longer be regular, and thus the second compressed length information of the random access unit is also no longer regular, which is not conducive to data access and decompression operations.

[0081] Therefore, in some embodiments, the first compressed length information needs to be padded to obtain relatively regular length information data in the process of calculating the second compressed length information of the random access unit based on the first compressed length information of the compressed image processing unit:

[0082] Setting the padding position according to the second initial length information;

[0083] Based on the first compressed length information, marking the padding position;

[0084] Padding the first compressed length information according to the padding position to obtain the second compressed length information.

[0085] For example, Figure 3As shown, along with the above embodiment, the size of the random access unit composed of two image processing units with a size of 2*8 pixels is 2*16 pixels, and the second initial length information, i.e., the maximum code stream corresponding to the random access unit, can be evenly divided into 8 parts. When the two image processing units are compressed, the total length of the data exceeds half of the second initial length, but is less than 5 / 8 of the second initial length. Therefore, the 5 / 8 of the second initial length can be marked as a padding equal division position, and the first compressed length information can be padded to the padding equal division position based on the padding equal division position to obtain the second compressed length information. As shown, Figure 4 As shown, the black part is the first compressed length information, and the dashed part is the padding part. And the data of 3 bits can be represented by "101" to represent 5, and then represent the second compressed length information. It can be understood that according to the second compressed length information, the second initial length information can be solved, and then the first initial length information of the image processing unit can be solved, and the original image corresponding to the image processing unit can be restored.

[0086] S400: Store the second compressed length information as code stream positioning information in the information table;

[0087] The information table can be a pre-defined data structure for storing the second compressed length information, such as a pre-defined header. It should be noted that the code stream segment has a mapping relationship with the random access unit, and therefore the second compressed length information can be used as code stream positioning information and used to locate the code stream segment corresponding to the random access unit in the image transmission code stream.

[0088] It should be noted that when the target image is divided according to the pre-set division manner, the number of image processing units obtained can be calculated according to the division manner. In some embodiments, 144 image processing units with a size of 2*8 pixels can be obtained by dividing a target image with a size of 48*48 pixels, and the number of random access units composed of two image processing units is 72. Then the sequence number of the random access unit can be calculated according to the division order during the division. The sequence number can represent the mapping relationship between the second compressed length information stored in the header and the random access unit, and the sequence number can also represent the order of performing the compression operation, so as to locate the target code stream segment in the image transmission code stream according to the second compressed length information. It can be understood that the sequence number can also be stored in the header corresponding to the second compressed length information, so as to be called.

[0089] S500: Input the compressed image processing unit into the image transmission code stream.

[0090] It can be understood that the compressed image processing units in the image transmission code stream also have a certain transmission order. The transmission order is related to the image division manner and the compression order. As shown, Figure 5As shown, the division manner in the above embodiment is used, and the image processing units in the random access unit are compressed in sequence from left to right. Then, the sequence numbers of the random access units corresponding to the code stream segments in the image transmission code stream are "1-2-3-4", which respectively correspond to the No. 1 region, the No. 2 region, the No. 3 region and the No. 4 region on the target image. Further, when accessing the partial image of the target image, the code stream segment can be extracted based on the mapping relationship between the code stream segment and the random access unit and the second compression length information, and the accessed partial image is obtained by restoring the code stream segment.

[0091] In the image data transmission in the embodiment of the present application, in the compression stage of the image data, the manner of obtaining a plurality of image processing units based on the division of the image can adopt different compression manners for different image processing units, and further has the loss compression and lossless compression manners when processing the target image data. Different compression manners can be performed on different image processing units according to requirements, and further improves the flexibility of the image compression stage, which is beneficial to adapt to various application scenarios.

[0092] The process of constructing the random access unit based on the image processing unit, calculating the second length compression information of the random access unit, and storing the second length compression information into the table header can realize the random access of the partial image of the target image in the image processing process, and further improves the flexibility of the image data processing, which is beneficial to adapt to various application scenarios.

[0093] In the embodiment of the present application, when the image data is transmitted based on the image transmission code stream, the image data can be randomly accessed to improve the reuse rate of the image data and the flexibility of the image transmission. Corresponding to the image compression process, as shown, Figure 6 The present application further provides an image transmission method for randomly accessing partial image data from an image code stream, the method comprising:

[0094] S600: calculating the sequence number of the random access unit corresponding to the target code stream segment based on the division manner of the image;

[0095] The process of obtaining the sequence number of the random access unit based on the division manner of the image has been described in the above embodiment, which will not be repeated here. It should be noted that when the image processing unit is compressed, the sequence number of the random access unit composed of the image processing unit or the sequence number of the compression operation can not be calculated. However, when the image data is randomly accessed, the sequence number of the random access unit needs to be calculated according to the division manner of the image, so as to extract the target code stream segment corresponding to the target access data in the image transmission code stream.

[0096] S700: extracting the target code stream segment in the image transmission code stream based on the sequence number of the random access unit and the second compression length information of the random access unit;

[0097] The second compression length information is stored in the information table; wherein the second compression length information is calculated from the first compression length information, and the first compression length information is used to represent the data length of the compressed image processing unit included in the random access unit. The calculation process of the first compression length information and the second compression length information has been mentioned in the process of image compression, and will not be repeated here.

[0098] In some embodiments, the code stream segments in the image transmission code stream are arranged in the order of image segmentation and compression, that is, the sequence number of the random access unit can represent the position of the code stream segment corresponding to the random access unit in the image transmission code stream. However, in the process of random access, it is not easy to directly extract the target code stream segment through the sequence number. Therefore, the second compression length information of the random access unit, that is, the data length of the code stream segment, is also needed to extract the target code stream segment in the image transmission code stream.

[0099] It should be noted that the starting position of the target code stream segment also needs to be confirmed, and the target code stream segment can be extracted in the image transmission code stream only by combining the data length. That is, based on the sequence number of the random access unit and the second compression length information of the random access unit, the target code stream segment is extracted in the image transmission code stream, including:

[0100] Traverse the second compression length information of the previous access processing unit in the storage structure;

[0101] Accumulate the second compression length information of the previous random processing unit to obtain the starting position of the target code stream segment corresponding to the random access unit in the image transmission code stream;

[0102] Based on the starting position and the second compression length information of the random access unit, the target code stream segment is extracted.

[0103] It can be understood that the sequence number of the previous random access unit is less than the sequence number of the random access unit. Therefore, based on the comparison of the sequence number, the starting position of the target code stream segment corresponding to the random access unit in the image transmission code stream can be obtained by accumulating the second compression length of the previous random processing unit. Then, the target code stream segment accessed can be extracted in the image transmission code stream by combining the second compression length of the random access unit.

[0104] It should be noted that the number of previous random access units is related to the sequence number of the random access unit, so the number of previous random access units can be one or more. In some embodiments, when the sequence number of the random access unit is 1, the starting position of the target code stream segment does not need to be determined by accumulating the data length (second compression length) of the previous random access unit, and the target code stream segment can be extracted by combining the second compression length information of the random access unit and the starting position of the image transmission code stream.

[0105] Based on the extracted target code stream segment, a random access unit corresponding to the target code stream segment can be determined, and a compressed image processing unit in the random access unit can be decompressed to obtain a native image corresponding to the target code stream segment.

[0106] S800: decompressing the random access unit corresponding to the target code stream segment to obtain a decompressed image processing unit;

[0107] For the decompression mode of each compressed image processing unit, it is sufficient to correspond to the compression mode, and no limitation is made herein. The decompression of the random access unit can be understood as decompression of the compressed image processing unit included in the random access unit to obtain the decompressed image processing unit.

[0108] It can be understood that the native image represented by the decompressed image processing unit obtained after decompression of the lossless compressed image processing unit is consistent with the native image represented by the image processing unit before lossless compression. The native image represented by the decompressed image processing unit obtained after decompression of the lossy compressed image processing unit has a certain loss compared to the image before compression.

[0109] S900: obtaining a native image corresponding to the target code stream segment based on the image segmentation mode and the decompressed image processing unit.

[0110] Taking an example of two decompressed image processing units included in each random access unit, after obtaining the two decompressed image processing units through decompression, the decompressed image processing units need to be arranged according to the image segmentation mode to restore the native image corresponding to the target access data. The image segmentation mode here refers to the way in which the image processing units constitute the random access unit. For example, the random access unit is composed of two image processing units in horizontal continuity, and the two decompressed image processing units need to be arranged according to the horizontal continuity to restore the native image corresponding to the target access data.

[0111] In the embodiments of the present application, based on the implementation of constructing the random access unit by the image processing unit and storing the second compression length information of the random access unit into the table header, the code stream segment in the image transmission code stream can be randomly accessed. When randomly accessing a target image in any target access region, only the sequence number of the target access region based on the image segmentation mode and the data length of the previous random access unit in the image transmission code stream need to be calculated to obtain the starting position of the target code stream segment corresponding to the target access region. Combined with the data length of the target code stream segment (the second compression length information), the target code stream segment can be extracted and the native image can be restored.

[0112] Therefore, in the embodiments of the present application, any region of the target image can be randomly accessed in the process of transmission or processing, thereby improving the data reuse rate in the image transmission code stream and the flexibility of the image processing process, and being conducive to adapting to multiple application scenarios.

[0113] In some embodiments, the present application provides an image transmission device, comprising: a preprocessing module, a compression module, an operation module, a storage module and a transmission module;

[0114] The preprocessing module is configured to segment a target image to obtain an image processing unit; and the image processing unit is configured to construct a random access unit;

[0115] The compression module is configured to compress the image processing unit to obtain a compressed image processing unit;

[0116] The operation module is configured to calculate second compression length information of the random access unit based on first compression length information of the compressed image processing unit;

[0117] The storage module is further configured to store the second compression length information in an information table; the second compression length information is configured to locate a code stream segment corresponding to the random access unit in an image transmission code stream; and the code stream segment has a mapping relationship with the random access unit;

[0118] The transmission module is configured to input the compressed image processing unit into the image transmission code stream.

[0119] The device mentioned in this embodiment can be an image transmission device based on an ISP system, configured to segment, compress and transmit an image in an image processing process. The device can have both loss compression and lossless compression based on the implementation of segmenting a target image, thereby improving the flexibility of image processing and being conducive to adapting to multiple application scenarios. Furthermore, by constructing a random access unit and storing the data length of the random access unit in an information table, any region of the target image can be randomly accessed when the target image is accessed, thereby further improving the flexibility of image processing.

[0120] In some embodiments, the present application provides an image transmission device, comprising: a calculation module, a decision module, a decompression module and a restoration module;

[0121] The calculation module is configured to calculate a sequence number of a random access unit corresponding to a target code stream segment based on a segmentation manner of an image;

[0122] The decision module is configured to extract a target code stream segment from the image transmission code stream based on the sequence number of the random access unit and second compression length information of the random access unit, the second compression length information of the random access unit being stored in an information table, wherein the second compression length information is calculated from first compression length information, and the first compression length information is used to represent the data length of the compressed image processing unit included in the random access unit.

[0123] The decompression module is configured to decompress the random access unit corresponding to the target code stream segment to obtain a decompressed image processing unit.

[0124] The restoration module is configured to obtain the original image corresponding to the target code stream segment based on the segmentation manner of the image and the decompressed image processing unit.

[0125] The image transmission device mentioned in this embodiment can also be an image transmission device based on an ISP system, which is configured to randomly access any region of a target image in an image processing process. Based on the segmentation and compression of the target image and the length information of the random access unit stored in the information table, the target code stream segment in the image transmission code stream can be extracted, and then the random access to any region of the target image can be realized, so that the data in the image transmission code stream can be reused, and the flexibility of the image processing process can be improved, and then the image processing process can be adapted to various application scenarios.

[0126] In some embodiments, the present application provides an electronic device, comprising:

[0127] A processor and a memory connected to the processor in communication. Wherein the memory stores instructions executable by the processor to cause the processor to perform the steps of the method as described in the method embodiment.

[0128] In some embodiments, the present application provides a computer readable storage medium, comprising:

[0129] The computer readable storage medium comprises at least one computer instruction, and the at least one computer instruction is used to make the computer execute the steps of the method as described in the method embodiment.

[0130] According to the technical contents above, the application provides an image transmission method and device. The method obtains image processing units by dividing a target image, and constructs random access units based on the image processing units. Compressing the image processing units can obtain compressed image processing units, and the second compression length information of the random access units can be calculated based on the first compression length information of the compressed image processing units. Inputting the compressed image processing units into an image transmission code stream can perform image transmission. After storing the second compression length information into an information table, the second compression length information can be used to locate the code stream segment corresponding to the random access unit in the image transmission code stream when accessing the image, so as to realize random access to the image. Based on the division of the image, different compression methods can be used for different compressed image processing units in the compression process, so as to improve the flexibility of image processing. Based on the random access unit, random access to the image can be realized, and the flexibility of image processing is further improved.

[0131] The similar parts among the embodiments provided by the application can be referred to each other, the specific embodiments provided above are only several examples under the general concept of the application, and do not limit the protection scope of the application. Any other embodiments extended according to the application scheme without creative labor belong to the protection scope of the application for the person skilled in the art.

Claims

1. An image transmission method characterized by, The method comprises the following steps: segmenting a target image to obtain an image processing unit; the image processing unit is used to construct a random access unit; compressing the image processing unit to obtain a compressed image processing unit; determining second initial length information of the random access unit based on first initial length information of the image processing unit; calculating first compressed length information of the compressed image processing unit based on the first initial length information; calculating second compressed length information of the random access unit based on the first compressed length information of the compressed image processing unit; storing the second compressed length information as code stream positioning information in an information table; the second compressed length information is used to locate a code stream segment corresponding to the random access unit in an image transmission code stream; wherein the code stream segment has a mapping relationship with the random access unit; inputting the compressed image processing unit into the image transmission code stream; the step of calculating the second compressed length information of the random access unit based on the first compressed length information of the compressed image processing unit comprises the following steps: setting a division position according to the second initial length information; marking a complemented division position based on the first compressed length information; complementing the first compressed length information according to the complemented division position to obtain the second compressed length information.

2. The method of claim 1, wherein, The random access unit comprises at least two image processing units; the position relationship of the at least two image processing units in the target image is one of horizontal continuity, vertical continuity, and horizontal and vertical continuity.

3. An image transmission method characterized by, The method comprises the following steps: The method further comprises the following steps: calculating a sequence number of a random access unit corresponding to a target code stream segment based on a segmentation mode of an image; extracting the target code stream segment from the image transmission code stream based on the sequence number of the random access unit and second compressed length information of the random access unit; the second compressed length information of the random access unit is stored in an information table; wherein the second compressed length information is calculated from first compressed length information, and the first compressed length information is used to represent the data length of the compressed image processing unit included in the random access unit; decompressing the random access unit corresponding to the target code stream segment to obtain a decompressed image processing unit; obtaining a native image corresponding to the target code stream segment based on the segmentation mode of the image and the decompressed image processing unit; The native image is obtained by the following steps: obtaining second initial length information and first initial length information of the image processing unit according to the second compressed length information; restoring the native image corresponding to the image processing unit according to the second initial length information and the first initial length information.

4. The method of claim 3, wherein, The step of extracting the target code stream segment from the image transmission code stream based on the sequence number of the random access unit and the second compressed length information of the random access unit comprises the following steps: traversing the second compressed length information of a previous random access unit in the storage structure; the sequence number of the previous random access unit is smaller than the sequence number of the random access unit; accumulating the second compression length information of the previous random access unit to obtain a starting position of a target code stream segment corresponding to the random access unit in the image transmission code stream; extracting the target code stream segment based on the starting position and the second compression length information of the random access unit.

5. An image transmission apparatus characterized by comprising: for inputting the compressed image into an image transmission code stream; comprising a preprocessing module, a compression module, an operation module, a storage module and a transmission module; the preprocessing module is used for segmenting a target image to obtain an image processing unit; the image processing unit is used for constructing a random access unit; the compression module is used for compressing the image processing unit to obtain a compressed image processing unit; the operation module is used for calculating the second compression length information of the random access unit based on the first compression length information of the compressed image processing unit; the storage module is further used for storing the second compression length information into an information table; the second compression length information is used for locating a code stream segment corresponding to the random access unit in the image transmission code stream; wherein the code stream segment has a mapping relationship with the random access unit; the transmission module is used for inputting the compressed image processing unit into an image transmission code stream; the operation module is further used for setting a division position according to the second initial length information; based on the first compression length information, the division position is marked to be filled up; based on the filled-up division position, the first compression length information is filled up to obtain the second compression length information.

6. An image transmission apparatus characterized by comprising: for extracting a target code stream segment from an image transmission code stream based on a target access region, and obtaining a native image corresponding to the target code stream segment; comprising: an image transmission device as claimed in claim 5; the device further comprises a calculation module, a decision module, a decompression module and a restoration module; the calculation module is used for calculating a sequence number of a random access unit corresponding to a target code stream segment based on a segmentation manner of an image; the decision module is used for extracting a target code stream segment in the image transmission code stream based on the sequence number of the random access unit and the second compression length information of the random access unit; the second compression length information of the random access unit is stored in an information table; wherein the second compression length information is calculated from the first compression length information, and the first compression length information is used for representing a data length of a compressed image processing unit included in the random access unit; the decompression module is used for decompressing the random access unit corresponding to the target code stream segment to obtain a decompressed image processing unit; the restoration module is used for obtaining a native image corresponding to the target code stream segment based on the segmentation manner of the image and the decompressed image processing unit; the restoration module is further used for obtaining second initial length information and first initial length information of the image processing unit according to the second compression length information; and restoring the native image corresponding to the image processing unit according to the second initial length information and the first initial length information.

7. An electronic device, comprising: comprising: a processor, and a memory connected with the processor in communication; The memory stores instructions executable by the processor to cause the processor to perform the steps of the method of any one of claims 1-2.

8. A computer-readable storage medium, characterized in that, comprising: The computer readable storage medium includes at least one computer instruction for causing a computer to perform the steps of the method of any one of claims 1-2.

Citation Information

Patent Citations

  • PNG coding and decoding method supporting random access to image

    CN114387355A

  • Animation image compression-encoding device

    JP1999205790A