CN118175340A - Image transmission method and device - Google Patents

Image transmission method and device Download PDF

Info

Publication number
CN118175340A
CN118175340A CN202410077604.XA CN202410077604A CN118175340A CN 118175340 A CN118175340 A CN 118175340A CN 202410077604 A CN202410077604 A CN 202410077604A CN 118175340 A CN118175340 A CN 118175340A
Authority
CN
China
Prior art keywords
random access
image
code stream
length information
image processing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410077604.XA
Other languages
Chinese (zh)
Inventor
刘建伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Aixin Yuanzhi Semiconductor Co ltd
Original Assignee
Aixin Yuanzhi Semiconductor Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Aixin Yuanzhi Semiconductor Co ltd filed Critical Aixin Yuanzhi Semiconductor Co ltd
Priority to CN202410077604.XA priority Critical patent/CN118175340A/en
Publication of CN118175340A publication Critical patent/CN118175340A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/85Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/119Adaptive subdivision aspects, e.g. subdivision of a picture into rectangular or non-rectangular coding blocks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/46Embedding additional information in the video signal during the compression process

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)

Abstract

The application provides an image transmission method and device. The method obtains an image processing unit by dividing a target image, and constructs a random access unit by the image processing unit. The compressed image processing unit may obtain the compressed image processing unit and calculate second compressed length information of the random access unit based on the first compressed length information of the compressed image processing unit. The compressed image processing unit is input into the image transmission code stream to perform image transmission. After the second compressed length information is stored in the information table, the second compressed length information can be used for positioning a code stream segment corresponding to the random access unit from the image transmission code stream when the image is accessed, so that the random access to the image is realized. Based on the segmentation of the image, different compression modes can be adopted for different compression image processing units in the compression process, so that the flexibility of image processing is improved. The random access unit can realize random access of the image, and the flexibility of image processing is further improved.

Description

Image transmission method and device
Technical Field
The present application relates to the field of image transmission technologies, and in particular, to an image transmission method and apparatus.
Background
In an ISP (IMAGE SIGNAL Process, image signal processing) system, the size and bit width of image data are relatively large, and thus the memory and bandwidth requirements for the system are high. In the case of limited system memory and bandwidth, image data needs to be compressed in order to improve processing performance and transmission capability of the image data.
When image data is compressed, the compression method can be divided into two types, namely lossless compression and lossy compression, according to the quality of the compressed image. The lossless compression can ensure the quality of the compressed image, and the lossy compression is beneficial to the transmission of the image data. In addition, the image data can be compressed and transmitted based on the mode of fixed code stream transmission or code stream transformation. The fixed code stream transmission mode is favorable for data scheduling, and the variable code stream transmission mode can support image data access modes such as random access and the like.
However, in practical application of the ISP system, in order to improve the operation efficiency of the ISP system, only a specific compression algorithm is carried in the IPS system, i.e. one of lossless compression and lossy compression is selected. The flexibility of image data compression is poor, and the method is not easy to adapt to various application scenes. Moreover, algorithms configured by the ISP system generally lack support for random access of image data, thereby limiting the efficiency of data reuse, resulting in reduced flexibility in image data processing by the ISP system.
Disclosure of Invention
The application provides an image transmission method and device, which are used for solving the problem of lower flexibility when an ISP system processes image data.
In a first aspect, the present application provides an image transmission method, including:
Dividing the target image to obtain an image processing unit; the image processing unit is used for constructing a random access unit;
compressing the image processing unit to obtain a compressed image processing unit;
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 into an information table; the second compressed length information is used for positioning a code stream segment corresponding to the random access unit in the image transmission code stream; wherein, the code stream segment and the random access unit have a mapping relation;
and inputting the compressed image processing unit into an image transmission code stream.
In some possible embodiments, the random access unit comprises at least two image processing units; the positional relationship of the at least two image processing units in the target image is one of transverse continuity, longitudinal continuity and transverse and longitudinal simultaneous continuity.
In some possible embodiments, further comprising:
determining second initial length information of the random access unit based on the first initial length information of the image processing unit;
First compressed length information of the compressed image processing unit is calculated based on the first initial length information.
In some possible embodiments, the calculating the second compressed length information of the random access unit based on the first compressed length information of the compressed image processing unit includes:
setting equal division positions according to the second initial length information;
marking a full bisection position based on the first compressed length information;
And according to the filling and dividing positions, filling the first compressed length information to obtain the second compressed length information.
In a second aspect, the present application provides another image transmission method, including:
Calculating a sequence number of a random access unit corresponding to the target code stream segment based on the segmentation mode of the image;
Extracting a 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; the second length information of the random access unit is stored in an information table; the second compressed length information is calculated by first compressed length information, and the first compressed length information is used for representing the data length of the image processing unit compressed 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;
And obtaining a primary image corresponding to the target code stream section based on the image segmentation mode and the decompressed image processing unit.
In some possible embodiments, 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 compressed length information of the random access unit includes:
Traversing second compressed length information of a preamble random access unit in the storage structure, wherein the sequence number of the preamble random access unit is smaller than that of the random access unit;
Accumulating the second compressed length information of the preamble random access unit to obtain the initial position of the target code stream segment corresponding to the random access unit in the image transmission code stream;
and extracting the target code stream segment based on the starting position and the second compressed length information of the random access unit.
In a third aspect, the present application provides an image transmission apparatus, including a preprocessing module, a compression module, an operation module, a storage module, and a transmission module;
The preprocessing module is used for dividing the 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 second compressed length information of the random access unit based on the first compressed length information of the compressed image processing unit;
The storage module is further used for storing the second compressed length information into an information table; the second compressed length information is used for positioning a code stream segment corresponding to the random access unit in the image transmission code stream; wherein, the code stream segment and the random access unit have a mapping relation;
the transmission module is used for inputting the compressed image processing unit into an image transmission code stream.
In a fourth aspect, the present application provides another image transmission apparatus, comprising: the system comprises a calculation module, a decision module, a decompression module and a reduction module;
The calculating module is used for calculating the sequence number of the random access unit corresponding to the target code stream segment based on the image segmentation mode;
the decision module is used for extracting a 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; the second compressed length information of the random access unit is stored in an information table; the second compressed length information is calculated by first compressed length information, and the first compressed length information is used for representing the data length of the image processing unit compressed 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 primary image corresponding to the target code stream segment based on the image segmentation mode and the decompressed image processing unit.
In a fifth aspect, the present application provides an electronic device, comprising:
A processor, and a memory communicatively coupled to the processor;
Wherein the memory stores instructions executable by the processor to cause the processor to perform the steps of the method as described in the first aspect.
In a sixth aspect, the present application provides a computer readable storage medium comprising:
the computer-readable storage medium includes at least one computer instruction therein for causing a computer to perform the steps of the method as described in the first aspect.
As can be seen from the above technical content, the present application provides an image transmission method and apparatus. The method obtains an image processing unit by dividing a target image, and constructs a random access unit by the image processing unit. The compressed image processing unit may obtain the compressed image processing unit and calculate second compressed length information of the random access unit based on the first compressed length information of the compressed image processing unit. The compressed image processing unit is input into the image transmission code stream to perform image transmission. After the second compressed length information is stored in the information table, the second compressed length information can be used for positioning a code stream segment corresponding to the random access unit from the image transmission code stream when the image is accessed, so that the random access to the image is realized. Based on the segmentation of the image, different compression modes can be adopted for different compression image processing units in the compression process, so that the flexibility of image processing is improved. The random access unit can realize random access of the image, and the flexibility of image processing is further improved.
Drawings
In order to more clearly illustrate the technical solution of the present application, the drawings that are needed in the embodiments will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a schematic diagram of image compression according to an embodiment of the present application;
FIG. 2 is a schematic diagram of lossy compression and lossless compression according to an embodiment of the present application;
fig. 3 is a schematic diagram of random access unit construction according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a second compressed length according to an embodiment of the present application;
Fig. 5 is a schematic diagram of a corresponding relationship between a code stream segment and a random access unit according to an embodiment of the present application;
fig. 6 is a schematic diagram of image decompression according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to the embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The embodiments described in the examples below do not represent all embodiments consistent with the application. Merely exemplary of systems and methods consistent with aspects of the application as set forth in the claims.
The image data may be processed in an ISP system, which is an image processing system built around an ISP chip. Because of the large size and bit width of image data, there is a high demand for memory resources and bandwidth resources of ISP systems in processing image data. In order to ensure image processing performance and transmission efficiency in the application scene of limited memory resources and bandwidth resources, the ISP system can compress image data before transmitting the image data. And decompressing the image after the image data transmission is completed to improve the transmission efficiency.
In the process of compressing image data, the image data can be compressed based on residual compression, frequency domain residual compression and other modes, and lossy compression or lossless compression can be realized by designing parameters and processes in the compression process. Wherein, the lossy compression can form a certain image quality loss, but can obtain higher compression rate so as to facilitate image data transmission. Lossless compression can ensure the image quality corresponding to the image data, but occupies more memory resources and bandwidth resources during transmission. Lossless compression or lossy compression is adopted, and flexibility is not available when an ISP system faces different application scenes with high transmission efficiency requirements, high image quality requirements and the like. Meanwhile, the requirements of transmission efficiency, image quality and the like are difficult to be met.
The compressed image data can be input into an image transmission code stream to realize the transmission of the image data. The image data transmission can be based on a fixed code stream. The transmission mode of the fixed code stream refers to that after the encoder compresses the image data, the compressed image data is output at a constant code rate, so that the data scheduling is facilitated, and the application effect in various application scenes is stable.
The ISP system is favorable for being applied in various scenes by matching with the transmission mode of the fixed code stream when the lossless compression algorithm or the lossy compression algorithm is singly configured, but the application effect is still limited by resources such as bandwidth, memory and the like. And in some scenes having special requirements for image quality, transmission efficiency, etc., a good image processing effect cannot be obtained.
And the streaming compression and streaming decompression modes based on the fixed code stream focus on ensuring the image quality, and support for the back-end application is single. For example, when providing an ROI (Region of interest ) for third party applications, random access to data in an image transmission code stream is not supported, decompression of the entire image data is required, system bandwidth is wasted, and the reuse efficiency of the data is limited, resulting in low flexibility of the ISP system.
Based on the above-mentioned problems, as shown in fig. 1, the present application provides an image transmission method, comprising:
s100: dividing the target image to obtain an image processing unit;
The image processing unit may be used to construct a random access unit, it being understood that the image processing units resulting from the segmentation of the target image are of the same size. For example, the target image may be segmented into a plurality of 2*8 pixels of image processing units. And the random access unit may be constructed from adjacent image processing units, for example, by constructing the random access unit from two adjacent image processing units, the resulting random access unit having a size of 2 x 16 pixels.
As shown in fig. 2, the random access unit includes at least two image processing units, and the positional relationship of the at least two processing units in the target image is one of continuous in the lateral direction, continuous in the longitudinal direction, and continuous in the lateral direction and the longitudinal direction at the same time.
In some embodiments, the horizontal succession, the vertical succession, and the horizontal and vertical simultaneous succession each characterize a positional relationship of an image processing unit constituting the random access unit in the target image as being adjacent. The similarity between adjacent image processing units is higher, the condition of missing pixels in the target image can be reduced, and the continuity and quality of the image are improved. Thus, when the image processing unit is compressed, the image quality corresponding to the image processing unit is also beneficial to ensuring.
In the above embodiment, the number of image processing units used to construct the random access unit may also be adjusted according to actual requirements. When the number of image processing units is fixed, the number of image processing units included in each random access unit is larger, and the compression rate of the target image is higher when the image processing units are compressed in units of random access units, which corresponds to the compression processing of more image processing units. Conversely, the smaller the number of image processing units included in the random access units, the larger the number of random access units corresponding to the target object, that is, the larger the number of code stream segments corresponding to the random access units in the image transmission code stream. The more code stream sections in the image transmission code stream, the more choices are provided when the image transmission code stream is accessed, thereby being beneficial to improving the flexibility of random access.
It should be noted that the above embodiments of dividing an image and constructing a random access unit are applicable to image data in various formats such as bayer, rgb (Red, green, blue, red, green, and blue color codes), yuv (brightness and chromaticity color codes), and thus the ISP system has better applicability to various data formats.
In addition, based on the different sizes of the target images, a random access unit can be constructed in a combination of several modes of transverse continuity, longitudinal continuity and transverse and longitudinal simultaneous continuity, so that omission of pixels in the target images is reduced, and further image quality is ensured.
S200: compressing the image processing unit to obtain a compressed image processing unit;
In some embodiments, the compressed image processing units may be obtained by performing compression processing on the image processing units in the random access units in units of random access units. It will be appreciated that the data length of the compressed image processing unit is less than the data length of the image processing unit prior to compression, thereby facilitating a reduction in memory and bandwidth requirements in the ISP system during image data transmission.
It should be noted that, for different compressed image processing units, different compression modes may be adopted. For example, for an image processing unit that characterizes important features in a target image, a lossless compression may be employed to ensure that the important features in the target image may be indifferently restored upon decompression. For an image processing unit with a lower weight level in the target image, for example, an image processing unit for representing the background, the compression can be performed in a lossy compression mode, and the compression rate can be controlled to adapt to different scenes.
The specific manner of lossy compression and lossless compression is not critical to the description of the embodiments of the present application and is not limited thereto. The embodiment of the application aims at adopting different compression modes for different image processing units based on image segmentation and a mode of constructing a random access unit based on the image processing units so as to improve the flexibility of image processing and enable an ISP system to be suitable for more application scenes.
In the embodiment of the application, the data length of the random access unit can be calculated according to the data length of the image processing unit, so that the position of the code stream segment corresponding to the random access unit is positioned in the image transmission code stream through the data length of the random access unit. The image data of the input 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 includes:
determining second initial length information of the random access unit based on the first initial length information of the image processing unit;
First compressed length information of the compressed image processing unit is calculated based on the first initial length information.
It is understood that the image processing unit has an initial length, i.e., first initial length information, after segmentation. The initial length of the random access unit to which the image processing unit belongs, namely, the second initial length information, can be calculated based on the first initial length information. For example, if two image processing units whose positional relationship is laterally continuous are included in each random access unit, it is possible to determine the first initial length information that the second initial length information is 2 times.
Meanwhile, based on the difference in compression modes, the first compression length information of the compressed image processing unit may be calculated. As shown in fig. 2, when the image processing unit is subjected to compression processing, it is equivalent to rearranging the data arrangement relation for characterizing the image processing unit to achieve compression.
For example, when the data used to characterize the image processing unit is 1579, the number of data bits occupied by it is 16 bits, and the arrangement order of "5179" can be modified to "1579" and the number of data bits occupied by "1579" is 14 bits after compression. The compression mode is a lossless compression mode, the content of each bit of data representation is not modified, and compression is realized only by rearranging each bit of data to reduce the bit number occupied by the data.
For another example, "5179" may be compressed to "1577" and the number of data bits occupied by "1577" may be 11 bits. Such a compression method is one of lossy compression, and not only the arrangement order of data is modified, but also one bit of data therein is compressed.
Therefore, in the embodiment of the present application, the first compressed length information of the compressed image processing unit may be calculated based on different compression modes and the first initial length information of the image processing unit. It is understood that, based on the first compressed length information, second compressed length information of a random access unit corresponding to the compressed image processing unit may be calculated.
S300: calculating second compressed length information of the random access unit based on the first compressed length information of the compressed image processing unit;
It can be understood that the first initial length information of the image processing unit is a more regular value, so that the image processing unit is easy to arrange and apply, and the second initial length information of the random access unit to which the image processing unit belongs is also a more regular value. For example, a random access unit constituted by 2 image processing units of 2*8 pixels in size is 2×16 pixels in size. However, the compressed image processing unit may not have the corresponding first compressed length information regular, so that the second compressed length information of the random access unit is not regular, which is not beneficial to the operations such as data access and decompression.
Therefore, in some embodiments, it is necessary to perform padding on the first compressed length information 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, so as to obtain more regular length information data:
setting equal division positions according to the second initial length information;
marking a full bisection position based on the first compressed length information;
And according to the filling and dividing positions, filling the first compressed length information to obtain the second compressed length information.
As shown in fig. 3, along with the size of the random access unit formed by 2 image processing units with sizes of 2*8 pixels being 2×16 pixels in the above embodiment, the second initial length information, that is, the maximum code stream corresponding to the random access unit, can be equally divided into 8 parts. When all 2 image processing units are compressed, the total data length is more than half of the second initial length, but less than 5/8 of the second initial length. Therefore, 5/8 of the second initial length can be marked as a full-aliquoting position, and the first compressed length information is full-aliquoting position based on the full-aliquoting position, so that the second compressed length information is obtained. As shown in fig. 4, the black part is the first compressed length information, and the dotted line part is the supplementary part. And may characterize 5 with data occupying 3 bits of "101" and thus 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, so as to solve the first initial length information of the image processing unit, and restore the original image corresponding to the image processing unit.
S400: storing the second compressed length information as code stream positioning information into an information table;
The information table may be a predefined data structure for storing the second compressed length information, such as a predefined header. It should be noted that, the code stream segment has a mapping relationship with the random access unit, so the second compressed length information may be used as code stream positioning information and used to position the code stream segment corresponding to the random access unit in the image transmission code stream.
It should be noted that, when the target image is segmented according to the preset segmentation method, the number of the obtained image processing units may be calculated according to the segmentation method. In some embodiments, 144 image processing units with sizes of 2*8 pixels can be obtained by segmentation in the target image with sizes of 48×48 pixels, and the number of random access units formed by 2 image processing units is 72. The sequence number of the random access unit may be calculated according to the segmentation order during segmentation, the sequence number may represent a mapping relationship between the second compressed length information stored in the header and the random access unit, and the sequence number may also represent an 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 will be appreciated that the sequence number may also be stored in the header corresponding to the second compressed length information for ease of recall.
S500: and inputting the compressed image processing unit into an image transmission code stream.
It will be appreciated 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 segmentation mode and the order of compression. As shown in fig. 5, the image processing units in the random access unit are compressed in the division manner in the above-described embodiment and in the order from left to right. 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, and correspond to the No. 1 area, the No. 2 area, the No. 3 area and the No. 4 area on the target image respectively. And when the local image of the target image is accessed, the code stream segment can be extracted based on the mapping relation between the code stream segment and the random access unit and the second compressed length information, and the accessed local image can be obtained by restoring the code stream segment.
When the image data is transmitted in the embodiment of the application, in the compression stage of the image data, the mode of obtaining a plurality of image processing units based on the segmented image can adopt different compression modes for different image processing units, and further, the mode of lossy compression and lossless compression is realized when the target image data is processed. Different compression modes can be executed on different image processing units according to requirements, so that the flexibility of an image compression stage is improved, and the method is beneficial to adapting to various application scenes.
The random access unit is constructed based on the image processing unit, the second length compressed information of the random access unit is calculated, and the second length compressed information is stored in the header, so that the random access to the local image of the target image in the image processing process can be realized, the flexibility of image data processing is further improved, and the method is beneficial to adapting to various application scenes.
In the embodiment of the application, when the image data is transmitted based on the image transmission code stream, the image data can be randomly accessed so as to improve the repeated use rate of the image data and the flexibility of image transmission. In correspondence to the image compression process, as shown in fig. 6, the present application further provides an image transmission method for randomly accessing a part of image data from an image code stream, the method comprising:
s600: calculating a sequence number of a random access unit corresponding to the target code stream segment based on the segmentation mode of the image;
The process of obtaining the random access unit sequence number based on the segmentation method of the image is already described in the above embodiments, and will not be described herein. In compressing the image processing unit, the sequence number of the random access unit constituted by the image processing unit or the sequence number of the compression operation may 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 segmentation mode of the image so as to extract the target code stream segment corresponding to the target access data from the image transmission code stream.
S700: extracting a 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;
The second compressed length information is stored in the information table; the second compressed length information is calculated by the first compressed length information, and the first compressed length information is used for representing the data length of the image processing unit included in the random access unit after compression. The calculation process of the first compression length information and the second compression length information is already mentioned in the process of image compression, and will not be described herein.
In some embodiments, the code stream segments in the image transmission code stream are arranged in the order of image segmentation and compression, i.e. the sequence number of the random access unit may characterize the position of the code stream segment corresponding to the random access unit in the image transmission code stream. However, in the random access process, the target code stream segment is not easy to be extracted directly through the sequence number. Therefore, the second compressed length information of the random access unit, namely the data length of the code stream segment, is combined to extract the target code stream segment from the image transmission code stream.
It should be noted that, the starting position of the target code stream segment needs to be confirmed, and the target code stream segment can be extracted from the image transmission code stream by combining the data length. Namely, extracting a 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, comprising:
Traversing the second compressed length information of the preamble access processing unit in the storage structure;
Accumulating the second compressed length information of the preamble random processing unit to obtain the initial position of the target code stream segment corresponding to the random access unit in the image transmission code stream;
and extracting the target code stream segment based on the starting position and the second compressed length information of the random access unit.
It will be appreciated that the sequence number of the preamble random access unit is smaller than the sequence number of the random access unit. Therefore, based on the comparison of the serial numbers, 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 preamble random processing unit. And combining the second compressed length of the random access unit to extract the accessed target code stream segment from the image transmission code stream.
It should be noted that the number of preamble random access units is related to the sequence number of the random access units, and thus the number of preamble random access units may be 1 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 is not required to be determined by accumulating the data length (the second compressed length) of the preamble random access unit, and the target code stream segment can be extracted by combining the second compressed length information of the random access unit and the starting position of the image transmission code stream.
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 is decompressed to obtain a native image corresponding to the target code stream segment.
S800: decompressing the random access unit corresponding to the target code stream segment to obtain a decompressed image processing unit;
The decompression method of each compressed image processing unit may correspond to the compression method, and is not limited in any way. The decompression random access unit may be understood as decompressing a compressed image processing unit included in the random access unit to obtain a decompressed image processing unit.
It can be understood that the original image represented by the decompressed image processing unit obtained after decompression by the lossless compression image processing unit is consistent with the original image represented by the image processing unit before lossless compression. And compared with the original image represented by the decompressed image processing unit, the original image obtained after decompression by the lossy compressed image processing unit has certain loss.
S900: and obtaining a primary image corresponding to the target code stream section based on the image segmentation mode and the decompressed image processing unit.
Taking 2 decompressed image processing units in each random access unit as an example, after 2 decompressed image processing units are obtained through decompression, the decompressed image processing units need to be arranged according to the segmentation mode of the image so as to restore the original image corresponding to the target access data. The image segmentation method refers to a method that an image processing unit forms a random access unit, for example, the random access unit is formed by two image processing units which are laterally continuous, and then the 2 decompressed image processing units are required to be arranged according to the laterally continuous method so as to restore and obtain a native image corresponding to the target access data.
In the embodiment of the application, the implementation mode of constructing the random access unit based on the image processing unit and storing the second compressed length information of the random access unit into the header is adopted, so that the code stream segment in the image transmission code stream can be randomly accessed. When random access is performed to any target access area of the target image, the starting position of the target code stream segment corresponding to the target access area can be calculated only by calculating the sequence number of the target access area and the data length of the accumulation preamble random access unit in the image transmission code stream based on the image segmentation mode. And then combining the data length (second compressed length information) of the target code stream segment, namely extracting the target code stream segment and restoring the original image.
Therefore, in the embodiment of the application, any region of the target image can be randomly accessed in the transmission or processing process, so that the repeated utilization rate of data in the image transmission code stream and the flexibility of the image processing process are improved, and the method is beneficial to adapting to a plurality of application scenes.
In some embodiments, the present application provides an image transmission apparatus including: the device comprises a preprocessing module, a compression module, an operation module, a storage module and a transmission module;
The preprocessing module is used for dividing the 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 second compressed length information of the random access unit based on the first compressed length information of the compressed image processing unit;
The storage module is further used for storing the second compressed length information into an information table; the second compressed length information is used for positioning a code stream segment corresponding to the random access unit in the image transmission code stream; wherein, the code stream segment and the random access unit have a mapping relation;
the transmission module is used for inputting the compressed image processing unit into an image transmission code stream.
The device mentioned in this embodiment may be an image transmission device built based on an ISP system for dividing, compressing and transmitting images during image processing. The device can have two compression modes of lossy compression and lossless compression based on the implementation mode of dividing the target image, so that the flexibility of image processing is improved, and the device is favorable for adapting to various scene applications. And by constructing the random access unit and storing the data length of the random access unit into the information table, the random access unit is beneficial to randomly accessing any area of the target image when accessing the target image, and the flexibility of image processing is further improved.
In some embodiments, the present application provides an image transmission apparatus including: the system comprises a calculation module, a decision module, a decompression module and a reduction module;
The calculating module is used for calculating the sequence number of the random access unit corresponding to the target code stream segment based on the image segmentation mode;
the decision module is used for extracting a 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; the second compressed length information of the random access unit is stored in an information table; the second compressed length information is calculated by first compressed length information, and the first compressed length information is used for representing the data length of the image processing unit compressed 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 primary image corresponding to the target code stream segment based on the image segmentation mode and the decompressed image processing unit.
The image transmission device mentioned in this embodiment may also be an image transmission device built based on an ISP system for randomly accessing any area of a target image during image processing. Based on the process of dividing and compressing 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, random access to any area of the target image is further realized, the data in the image transmission code stream can be reused, the flexibility of the image processing process is improved, and the method is further suitable for various application scenes.
In some embodiments, the present application provides an electronic device comprising:
a processor, and a memory communicatively coupled to the processor. 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 class embodiments.
In some embodiments, the present application provides a computer readable storage medium comprising:
The computer-readable storage medium includes at least one computer instruction therein for causing a computer to perform the steps of the method as described in the method class embodiments.
As can be seen from the above technical matters, the present application provides an image transmission method and apparatus. The method obtains an image processing unit by dividing a target image, and constructs a random access unit by the image processing unit. The compressed image processing unit may obtain the compressed image processing unit and calculate second compressed length information of the random access unit based on the first compressed length information of the compressed image processing unit. The compressed image processing unit is input into the image transmission code stream to perform image transmission. After the second compressed length information is stored in the information table, the second compressed length information can be used for positioning a code stream segment corresponding to the random access unit in the image transmission code stream when the image is accessed, so that the random access to the image is realized. Based on the segmentation of the image, different compression modes can be adopted for different compression image processing units in the compression process, so that the flexibility of image processing is improved. The random access unit can realize random access of the image, and the flexibility of image processing is further improved.
The above-provided detailed description is merely a few examples under the general inventive concept and does not limit the scope of the present application. Any other embodiments which are extended according to the solution of the application without inventive effort fall within the scope of protection of the application for a person skilled in the art.

Claims (10)

1. An image transmission method, comprising:
Dividing the target image to obtain an image processing unit; the image processing unit is used for constructing a random access unit;
compressing the image processing unit to obtain a compressed image processing unit;
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 into an information table; the second compressed length information is used for positioning a code stream segment corresponding to the random access unit in the image transmission code stream; wherein, the code stream segment and the random access unit have a mapping relation;
and inputting the compressed image processing unit into an image transmission code stream.
2. The method according to claim 1, wherein the random access unit comprises at least two image processing units; the positional relationship of the at least two image processing units in the target image is one of transverse continuity, longitudinal continuity and transverse and longitudinal simultaneous continuity.
3. The method as recited in claim 2, further comprising:
determining second initial length information of the random access unit based on the first initial length information of the image processing unit;
First compressed length information of the compressed image processing unit is calculated based on the first initial length information.
4. A method according to claim 3, wherein said 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:
setting equal division positions according to the second initial length information;
marking a full bisection position based on the first compressed length information;
And according to the filling and dividing positions, filling the first compressed length information to obtain the second compressed length information.
5. An image transmission method, comprising:
Calculating a sequence number of a random access unit corresponding to the target code stream segment based on the segmentation mode of the image;
Extracting a 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; the second compressed length information of the random access unit is stored in an information table; the second compressed length information is calculated by first compressed length information, and the first compressed length information is used for representing the data length of the image processing unit compressed 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;
And obtaining a primary image corresponding to the target code stream section based on the image segmentation mode and the decompressed image processing unit.
6. The method of claim 5, wherein 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 compressed length information of the random access unit comprises:
Traversing second compressed length information of a preamble random access unit in the storage structure, wherein the sequence number of the preamble random access unit is smaller than that of the random access unit;
Accumulating the second compressed length information of the preamble random access unit to obtain the initial position of the target code stream segment corresponding to the random access unit in the image transmission code stream;
and extracting the target code stream segment based on the starting position and the second compressed length information of the random access unit.
7. An image transmission device for inputting a compressed image into an image transmission code stream; the device comprises a preprocessing module, a compression module, an operation module, a storage module and a transmission module;
The preprocessing module is used for dividing the 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 second compressed length information of the random access unit based on the first compressed length information of the compressed image processing unit;
The storage module is further used for storing the second compressed length information into an information table; the second compressed length information is used for positioning a code stream segment corresponding to the random access unit in the image transmission code stream; wherein, the code stream segment and the random access unit have a mapping relation;
the transmission module is used for inputting the compressed image processing unit into an image transmission code stream.
8. An image transmission device is characterized by extracting a target code stream segment from an image transmission code stream based on a target access area, and acquiring a primary image corresponding to the target code stream segment; comprising the following steps: the system comprises a calculation module, a decision module, a decompression module and a reduction module;
The calculating module is used for calculating the sequence number of the random access unit corresponding to the target code stream segment based on the image segmentation mode;
the decision module is used for extracting a 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; the second compressed length information of the random access unit is stored in an information table; the second compressed length information is calculated by first compressed length information, and the first compressed length information is used for representing the data length of the image processing unit compressed 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 primary image corresponding to the target code stream segment based on the image segmentation mode and the decompressed image processing unit.
9. An electronic device, comprising:
A processor, and a memory communicatively coupled to the processor;
Wherein the memory stores instructions executable by the processor to cause the processor to perform the steps of the method according to any one of claims 1-4.
10. A computer-readable storage medium, comprising:
The computer readable storage medium comprising at least one computer instruction for causing a computer to perform the steps of the method of any one of claims 1-4.
CN202410077604.XA 2024-01-18 2024-01-18 Image transmission method and device Pending CN118175340A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410077604.XA CN118175340A (en) 2024-01-18 2024-01-18 Image transmission method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410077604.XA CN118175340A (en) 2024-01-18 2024-01-18 Image transmission method and device

Publications (1)

Publication Number Publication Date
CN118175340A true CN118175340A (en) 2024-06-11

Family

ID=91359006

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410077604.XA Pending CN118175340A (en) 2024-01-18 2024-01-18 Image transmission method and device

Country Status (1)

Country Link
CN (1) CN118175340A (en)

Similar Documents

Publication Publication Date Title
CN102523367B (en) Real time imaging based on many palettes compresses and method of reducing
US6909811B1 (en) Image processing apparatus and method and storage medium storing steps realizing such method
KR100566122B1 (en) Method of compressing still pictures for mobile devices
JP5399416B2 (en) Video coding system with reference frame compression
US8213727B2 (en) Image encoding apparatus and image decoding apparatus, and control method thereof
AU2012201684A1 (en) Image compression
CN111131828B (en) Image compression method and device, electronic equipment and storage medium
KR20070104358A (en) Encoding device, encoding method, encoding program, and imaging device
WO2016172994A1 (en) Image coding and decoding method and device
JP4831547B2 (en) Method for image compression and decompression acceleration
CN116193130B (en) Method and system for improving transmission efficiency of image data in network
US20010012397A1 (en) Image processing apparatus and method
EP0875858B1 (en) Method and apparatus for compressing and decompressing image data
CN114640881A (en) Video frame alignment method and device, terminal equipment and computer readable storage medium
CN113949865A (en) Image encoding method, image encoding device, computer apparatus, storage medium, and image decoding method
CN109982091B (en) Image processing method and device
US20190289300A1 (en) Image compression system and image compression method using image compression system
EP0969675A2 (en) Image signal processing method, image signal processing system, storage medium, and image sensing apparatus
CN108182712A (en) Image processing method, apparatus and system
CN118175340A (en) Image transmission method and device
JP3469438B2 (en) Image signal processing method and apparatus, recording medium
US20230039840A1 (en) Picture processing method and apparatus
US8750648B2 (en) Image processing apparatus and method of processing image
CN113538237A (en) Image splicing system and method and electronic equipment
JP2619759B2 (en) Image data compression method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination