Image processing method and device

文档序号:1802476 发布日期:2021-11-05 浏览:21次 中文

阅读说明:本技术 图像处理方法及装置 (Image processing method and device ) 是由 张凯 于 2021-06-15 设计创作,主要内容包括:本公开提供一种图像处理方法及装置,涉及电子信息技术领域,能够解决发送设备或者接收设备在处理图像时造成图像质量差的问题。具体技术方案为:在获取目标图像后,通过预设的发送端传输该目标图像至预设的接收端,并获取传输过程中预设发送端的目标压缩率和预设接收端的目标解码率,通过对比预设发送端的目标压缩率和预设发送端的固定压缩率,确定是否增加预设发送端,或通过对比预设接收端的目标解码率和预设接收端的固定解码率,确定是否增加预设解码端。本公开用于图像处理。(The disclosure provides an image processing method and an image processing device, relates to the technical field of electronic information, and can solve the problem of poor image quality caused by image processing of a sending device or a receiving device. The specific technical scheme is as follows: after a target image is obtained, the target image is transmitted to a preset receiving end through a preset transmitting end, a target compression rate of the preset transmitting end and a target decoding rate of the preset receiving end are obtained in the transmission process, whether the preset transmitting end is added or not is determined by comparing the target compression rate of the preset transmitting end with a fixed compression rate of the preset transmitting end, or whether the preset decoding end is added or not is determined by comparing the target decoding rate of the preset receiving end with a fixed decoding rate of the preset receiving end. The present disclosure is for image processing.)

1. An image processing method, characterized in that the method comprises:

acquiring a target image, and determining a preset sending end and a preset receiving end corresponding to the target image;

acquiring a target transmission result of the target image, wherein the preset transmission result is as follows: transmitting a result of the target image to a preset receiving end through the preset transmitting end, wherein the preset transmission result at least comprises a target compression ratio of the preset transmitting end when the target image is transmitted;

acquiring a preset compression rate of the preset sending end, wherein the preset compression rate is determined according to the coding performance of the preset sending end;

and when the target compression ratio of the preset sending ends is smaller than the preset compression ratio, determining to increase the number of the preset sending ends.

2. The method of claim 1, wherein the preset transmission result at least comprises a target decoding rate of the preset receiving end in transmitting the target image, and the method further comprises:

acquiring a preset decoding rate of the preset receiving end, wherein the preset decoding rate is determined according to the decoding performance of the preset sending end;

and when the target decoding rate of the preset receiving end is greater than the preset decoding rate of the preset receiving end, determining to increase the number of the preset receiving ends.

3. The method of claim 1, further comprising:

acquiring parameter information of the target image, wherein the parameter information at least comprises resolution;

and searching a preset sending terminal and a preset receiving terminal which are matched with the parameter information in a database according to the parameter information of the target image, wherein the database at least comprises a first mapping and a second mapping, the first mapping is used for indicating the corresponding relationship between the parameter information of the image and at least one sending terminal, and the second mapping is used for indicating the corresponding relationship between the parameter information of the image and at least one receiving terminal.

4. The method of claim 1, further comprising:

acquiring an input code stream and an output code stream of the preset sending terminal in the process of transmitting the target image;

and determining a target compression ratio of the preset sending terminal when the preset sending terminal transmits the target image according to the input code stream and the output code stream of the preset sending terminal.

5. The method of claim 2, further comprising:

acquiring an input code stream and an output code stream of the preset receiving end in the process of transmitting the target image;

and determining the target decoding rate of the preset receiving end when the preset receiving end transmits the target image according to the input code stream and the output code stream of the preset receiving end.

6. The method of claim 1, further comprising:

when the number of the preset sending ends is determined to be increased, acquiring the coding performance of the preset sending ends and the parameter information of the target image;

determining the number of the added preset sending terminals to be x according to the coding performance of the preset sending terminals and the parameter information of the target image;

and according to the number x of the preset sending terminals, carrying out segmentation processing on the target image, and determining the image area matched with each preset sending terminal after the segmentation processing.

7. The method of claim 1, further comprising:

when the number of the preset sending ends is determined to be increased, the coding performance of the preset receiving ends and the parameter information of the target image are obtained;

determining the number of the preset receiving ends to be increased to be y according to the coding performance of the preset receiving ends and the parameter information of the target image;

and according to the number y of the preset receiving ends, carrying out segmentation processing on the target image, and determining an image area which is matched with each preset receiving end and subjected to segmentation processing.

8. The method of claim 2, further comprising:

updating the first mapping according to the increased number of the preset sending terminals and the parameter information of the target image;

or updating the second mapping according to the increased number of the preset receiving ends and the parameter information of the target image.

9. An image processing apparatus, characterized in that the apparatus comprises: a first obtaining module, a second obtaining module, a third obtaining module and a determining module,

the first acquisition module is used for acquiring a target image and determining a preset sending end and a preset receiving end corresponding to the target image;

the second obtaining module is configured to obtain a target transmission result of the target image, where the preset transmission result is: transmitting a result of the target image to a preset receiving end through the preset transmitting end, wherein the preset transmission result at least comprises a target compression ratio of the preset transmitting end when the target image is transmitted;

the third obtaining module is configured to obtain a preset compression rate of the preset sending end, where the preset compression rate is determined according to the coding performance of the preset sending end;

the determining module is configured to determine to increase the number of the preset sending terminals when the target compression ratio of the preset sending terminals is smaller than the preset compression ratio of the preset sending terminals.

10. The apparatus of claim 9, wherein the predetermined transmission result at least comprises a target decoding rate of the predetermined receiving end in transmitting the target image,

the third obtaining module is further configured to obtain a preset decoding rate of the preset receiving end, where the preset decoding rate is determined according to the decoding performance of the preset sending end;

the determining module is configured to determine to increase the number of the preset receiving ends when the target decoding rate of the preset receiving ends is greater than the preset decoding rate of the preset receiving ends.

Technical Field

The present disclosure relates to the field of electronic information technologies, and in particular, to an image processing method and apparatus.

Background

With the continuous development of image processing technology, the quality of images is improved, and in the prior art, when a high-resolution image is transmitted, encoding transmission is performed by a transmitting device capable of supporting the high resolution, and decoding is performed by an image receiving device capable of supporting the high resolution, but when the image is encoded and decoded, processing resources of a transmitting end or a receiving end cannot process the high-resolution image, and the quality of the image after encoding/decoding processing is deteriorated. For example, if the image to be transmitted is an 8K image, the receiving end of the image needs to be able to support 8K image processing, and then the existing receiving end can only process 2K, which may cause poor display effect after the receiving end receives the image.

Disclosure of Invention

The embodiment of the disclosure provides an image processing method and an image processing device, which can solve the problem of poor image quality caused by image processing of a sending device or a receiving device. The technical scheme is as follows:

according to a first aspect of embodiments of the present disclosure, there is provided an image processing method, including:

acquiring a target image, and determining a preset sending end and a preset receiving end corresponding to the target image;

acquiring a target transmission result of the target image, wherein the preset transmission result refers to: transmitting the result of the target image to the preset receiving end through the preset transmitting end, wherein the preset transmission result at least comprises a target compression ratio of the preset transmitting end when the target image is transmitted;

acquiring a preset compression rate of the preset sending end, wherein the preset compression rate is determined according to the coding performance of the preset sending end;

and when the target compression ratio of the preset sending end is smaller than the preset compression ratio of the preset sending end, determining to increase the number of the preset sending ends.

In one embodiment, the method includes that the preset transmission result at least includes a target decoding rate of the preset receiving end when the target image is transmitted, and the method further includes:

acquiring a preset decoding rate of the preset receiving end, wherein the preset decoding rate is determined according to the decoding performance of the preset sending end;

and when the target decoding rate of the preset receiving end is greater than the preset decoding rate of the preset receiving end, determining to increase the number of the preset receiving ends.

In one embodiment, the method further comprises:

acquiring parameter information of the target image, wherein the parameter information at least comprises resolution;

according to the parameter information of the target image, a preset sending terminal and a preset receiving terminal which are matched with the parameter information are searched in a database, the database at least comprises a first mapping and a second mapping, the first mapping is used for indicating the corresponding relation between the parameter information of the image and at least one sending terminal, and the second mapping is used for indicating the corresponding relation between the parameter information of the image and at least one receiving terminal.

In one embodiment, the method further comprises:

acquiring an input code stream and an output code stream of the preset sending terminal in the process of transmitting the target image;

and determining a target compression ratio of the preset sending end when the preset sending end transmits the target image according to the input code stream and the output code stream of the preset sending end.

In one embodiment, the method further comprises:

acquiring an input code stream and an output code stream of the preset receiving end in the process of transmitting the target image;

and determining the target decoding rate of the preset receiving end when the preset receiving end transmits the target image according to the input code stream and the output code stream of the preset receiving end.

In one embodiment, the method further comprises:

when the number of the preset sending terminals is determined to be increased, acquiring the coding performance of the preset sending terminals and the parameter information of the target image;

determining the number of the added preset sending terminals as x according to the coding performance of the preset sending terminals and the parameter information of the target image;

and according to the number x of the preset sending terminals, carrying out segmentation processing on the target image, and determining the image area matched with each preset sending terminal after the segmentation processing.

In one embodiment, the method further comprises:

when the number of the preset sending ends is determined to be increased, the coding performance of the preset receiving end and the parameter information of the target image are obtained;

determining the number of the preset receiving ends to be increased to be y according to the coding performance of the preset receiving ends and the parameter information of the target image;

and according to the number y of the preset receiving ends, carrying out segmentation processing on the target image, and determining the image area matched with each preset receiving end after the segmentation processing.

In one embodiment, the method further comprises:

updating the first mapping according to the increased number of the preset sending terminals and the parameter information of the target image;

or updating the second mapping according to the increased number of the preset receiving ends and the parameter information of the target image.

According to a second aspect of the embodiments of the present disclosure, there is provided an image processing apparatus including: a first obtaining module, a second obtaining module, a third obtaining module and a determining module,

the first acquisition module is used for acquiring a target image and determining a preset sending end and a preset receiving end corresponding to the target image;

the second obtaining module is configured to obtain a target transmission result of the target image, where the preset transmission result is: transmitting the result of the target image to the preset receiving end through the preset transmitting end, wherein the preset transmission result at least comprises a target compression ratio of the preset transmitting end when the target image is transmitted;

the third obtaining module is configured to obtain a preset compression rate of the preset sending end, where the preset compression rate is determined according to the coding performance of the preset sending end;

the determining module is configured to determine to increase the number of the preset sending terminals when the target compression ratio of the preset sending terminal is smaller than the preset compression ratio of the preset sending terminal.

In one embodiment, the predetermined transmission result at least includes a target decoding rate of the predetermined receiving end when transmitting the target image,

the third obtaining module is further configured to obtain a preset decoding rate of the preset receiving end, where the preset decoding rate is determined according to the decoding performance of the preset sending end;

the determining module is configured to determine to increase the number of the preset receiving terminals when the target decoding rate of the preset receiving terminals is greater than the preset decoding rate of the preset receiving terminals.

It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.

Drawings

The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.

FIG. 1 is a block diagram of an image processing system provided by an embodiment of the present disclosure;

FIG. 1a is a block diagram of an image processing system according to an embodiment of the present disclosure 1;

fig. 2 is a flowchart of an image processing method provided by an embodiment of the present disclosure;

fig. 2a is a schematic diagram 1 of an adding device in an image processing method according to an embodiment of the disclosure;

fig. 2b is a schematic diagram of an adding device in an image processing method according to an embodiment of the disclosure;

fig. 2c is a schematic diagram of an adding device in an image processing method according to an embodiment of the disclosure 3;

fig. 3 is a flowchart 1 of an image processing method provided by an embodiment of the present disclosure;

fig. 4 is a structural diagram of an image processing apparatus according to an embodiment of the present disclosure.

Detailed Description

Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.

As shown in fig. 1, an embodiment of the present disclosure includes a graph transmission system, which includes a source end, a collection end (sending end), and a receiving end (receiving end), where the source end and the collection end are connected to each other at least through an HDMI line and a USB line.

Specifically, the source terminal includes a server, a PC, and the like. The source end can respond based on the control signal, and the newly generated picture is collected by the collection end through the HDMI line.

Specifically, the sending end collects pictures from the source end through the HDMI line, encodes the pictures and sends the coded pictures to the corresponding receiving end.

Specifically, the sending end is further configured to send a control signal (e.g., a keyboard and mouse message) fed back by the receiving end to the source end through the USB cable.

Specifically, each receiving end is connected to an image fusion device, and the image fusion device is configured to fuse and process the segmented target image regions, so as to obtain an overall target image.

In particular implementation deployment, the image transmission system may be as shown in fig. 1 a: the image source end collects images and transmits the images to the plurality of sending ends, the sending ends transmit the images to the corresponding receiving ends after the images are coded and processed, the receiving ends send the images to the fusion equipment, and the fusion equipment sends the images to the display equipment after fusion processing of the image areas.

An embodiment of the present disclosure provides an image processing method, as shown in fig. 2, the image processing method includes the following steps:

201. and acquiring a target image, and determining a preset sending end and a preset receiving end corresponding to the target image.

The preset transmitting end may include at least one transmitting device.

The preset receiving end may include at least one receiving device.

The preset transmitting end and the preset receiving end of the target image may be determined according to parameter information of the target image and a historical image transmission result, and the determining step may include:

acquiring parameter information of the target image, wherein the parameter information at least comprises resolution;

according to the parameter information of the target image, a preset sending terminal and a preset receiving terminal which are matched with the parameter information are searched in a database, the database at least comprises a first mapping and a second mapping, the first mapping is used for indicating the corresponding relation between the parameter information of the image and at least one sending terminal, and the second mapping is used for indicating the corresponding relation between the parameter information of the image and at least one receiving terminal.

If the target image with the resolution of 8K is processed, determining that the image with the resolution of 8K corresponds to 2 sending ends supporting the resolution of 4K according to the first mapping; or according to the second mapping, determining that the image with the resolution of 8K corresponds to 4 receiving ends supporting the resolution of 2K.

The parameter information of the target image may comprise a parameterization representing the image quality, such as the image resolution.

Specifically, the image resolution refers to the amount of information stored in the image, that is, the number of pixels.

202. And acquiring a target transmission result of the target image.

The preset transmission result is that: and transmitting the result of the target image to the preset receiving end through the preset transmitting end.

Specifically, the transmission process may be: the sending terminal collects pictures from the source terminal through the HDMI line, encodes the pictures and sends the coded pictures to the corresponding receiving terminal.

The preset transmission result at least comprises one of a target compression rate when the preset sending end transmits the target image or a target decoding rate when the preset receiving end transmits the target image.

The method provided by the present disclosure further includes the following steps: acquiring a code stream of each transmission node, and determining a compression rate and a decoding rate according to the code stream of each transmission node so as to determine a preset transmission result, wherein the specific nodes comprise: a first node, a second node, a third node, and a fourth node.

The first node is an output end of the source end, namely an input end of the input end; the second node refers to the output end of the sending end; the third node refers to the input end of the receiving end; the fourth node refers to an output terminal of the receiving terminal.

Because the sending end needs to encode the collected image, the code stream of the input end of the sending end is the code stream before encoding, and the code stream of the output end of the sending end is the encoded code stream; the input end of the receiving end decodes the front code stream, and the output end of the receiving end decodes the rear code stream.

In the above steps, the method provided by the present disclosure further includes calculating, according to the code stream of each node in transmission, a compression ratio of the transmitting end and a decoding ratio of the receiving end:

respectively calculating a compression ratio S1 for a transmitting end and a decoding ratio R1 for a receiving end;

where compression ratio S1 refers to the actual compression ratio and R1 refers to the actual decoding ratio.

S1 is the codestream size of the second node/the codestream size of the first node.

R1 is the codestream size of the third node/the codestream size of the fourth node.

203. And acquiring the preset compression rate of the preset sending end.

The preset compression ratio of the preset sending end in the method is an inherent attribute of the sending end hardware, is a numerical value obtained through multiple image coding tests under the condition that all coding resources in the sending end are utilized, and can embody the coding performance of the preset sending end, so that whether the preset sending end can code and process a target image or not is convenient to determine, the problem that the coding performance of the preset sending end cannot meet the coding requirement of the target image is avoided, and the image quality is reduced.

204. And when the target compression ratio of the preset sending end is smaller than the preset compression ratio of the preset sending end, determining to increase the number of the preset sending ends.

The method provided by the disclosure can determine whether the coding processing performance of the preset sending end is matched with the coding processing performance required by the target image or not by comparing the target compression ratio of the sending end when the sending end transmits the target image with the preset compression ratio of the inherent hardware capability of the sending end, specifically:

and when the target compression ratio is smaller than the preset compression ratio of the preset sending end, determining to increase the number of the preset sending ends, namely, the coding processing performance of the preset sending end is not matched with the coding processing performance required by the target image.

If the number of the preset sending terminals is 1, the highest resolution capable of processing the image by the coding performance indication is 4K, and the resolution of the target image is 8K, the number of the preset sending terminals needs to be increased when the preset sending terminals process the target image by coding: the 8K target image is processed by 2 transmitting end codes capable of processing the resolution 4K.

The resolution in the above example is only schematically illustrated and is used to identify the encoding performance of the sending end capable of processing the image, and the encoding performance may also be determined by other parameter information of the image in the process of actually processing the image.

In the method provided by the present disclosure, when the target compression ratio is greater than or equal to the preset compression ratio of the preset sending end, it is determined that the number of the preset sending ends is not needed, that is, the encoding processing performance of the preset sending end matches the encoding processing performance required by the target image.

If the number of the preset sending terminals is 1, the coding performance indicates the highest resolution 8K capable of processing the image, and the resolution of the target image is 4K, the number of the preset sending terminals does not need to be increased when the preset sending terminals code and process the target image.

The step of determining to increase the number x of the preset transmitting terminals in the method provided by the present disclosure may include:

when the number of the preset sending terminals is determined to be increased, acquiring the coding performance of the preset sending terminals and the parameter information of the target image;

and determining the number of the added preset sending terminals as x according to the coding performance of the preset sending terminals and the parameter information of the target image.

Further, after the number of the added preset sending terminals is determined to be x, the target image is segmented according to the number x of the preset sending terminals, and an image area which is matched with each preset sending terminal and is segmented is determined.

Wherein the encoding performance includes parameter information of an image that can be processed by the transmitting end.

Specifically, the encoding performance includes the highest encoding and decoding performance that the transmitting end can support, for example, the encoding performance indicates that the transmitting end can support the encoding process of the image with the resolution of 2K at the highest, and then the transmitting end can only encode and decode image data below 2K (including 2K).

When the resolution of the image to be processed is 4K, and the image is encoded by the transmitting end with the encoding performance of 2K, because the encoding capability of the transmitting end is insufficient, part of pixel points of the original image can be discarded in the encoding process, and even if a 4K device is used for decoding at the decoding end, the decoded image is still a 2K image, and the displayed image is unclear.

The target transmission result in the method provided by the present disclosure further includes: presetting a target decoding rate of a receiving end, and determining whether to increase the number of the preset receiving ends according to the target decoding rate of the preset receiving end in the target transmission result, which specifically comprises the following steps:

acquiring a preset decoding rate of a preset receiving end;

and when the target decoding rate is less than the preset decoding rate of the preset sending end, determining to increase the number of the preset decoding ends.

The preset target decoding rate of the decoding end comprises the following steps:

acquiring an input code stream and an output code stream of the preset receiving end in the process of transmitting the target image;

and determining the target decoding rate of the preset receiving end when the preset receiving end transmits the target image according to the input code stream and the output code stream of the preset receiving end.

The preset decoding rate of the preset receiving end in the method provided by the disclosure is an inherent attribute of the receiving end hardware, and is a numerical value obtained through multiple image decoding tests under the condition that all decoding resources in the receiving end are utilized, and the preset compression rate is used for reflecting the decoding performance of the preset receiving end.

In the method provided by the present disclosure, determining to increase the number y of the preset receiving ends may include:

when the number of the preset sending ends is determined to be increased, the coding performance of the preset receiving end and the parameter information of the target image are obtained;

and determining the number of the preset receiving ends to be increased to be y according to the coding performance of the preset receiving ends and the parameter information of the target image.

Further, when the number of the preset receiving ends is increased, the number of the preset receiving ends can be increased one by one.

Further, after the number y of the preset receiving terminals is determined, the target image is segmented according to the decoding performance of the preset receiving terminals and the parameter information of the target image, and an image area matched with each preset receiving terminal after segmentation is determined.

Based on the system deployment structure mentioned in fig. 1, a specific example is set forth here, and after determining to increase the number of preset transmitting ends or the number of preset receiving ends according to the method, the deployment manner of each device end in the system is as follows:

example one: when only the number of the preset receiving end devices needs to be increased:

when the resolution of the target image is 8K, if the image resolution supportable by the transmitting end is 8K and the image resolution supportable by the receiving end is 2K, 4 receiving ends need to be matched according to the resolution of the target image to meet the requirements of the encoding and decoding of the image, and the quality of the image after encoding and decoding is prevented from being reduced.

The image processing system architecture as shown in fig. 2a comprises: and one sending end corresponds to a plurality of receiving ends, data splitting is carried out when the sending end codes, the split data are respectively sent to the receiving ends, and finally the split data are fused by the fusion equipment and then displayed.

Example two: increase the quantity of presetting the sending end and presetting the receiving end equipment simultaneously as required:

when the resolution of the target image is 8K, if the image resolution supportable by the transmitting end is 2K and the image resolution supportable by the receiving end is 2K, 4 preset transmitting ends and 4 receiving ends need to be matched according to the resolution of the target image to meet the requirements of encoding and decoding of the image, and the quality of the image after encoding and decoding is prevented from being reduced.

The image processing system structure shown in fig. 2b comprises: and the plurality of sending terminals correspond to the plurality of receiving terminals, data splitting is carried out after the source terminals collect the data, the split data are respectively sent to the sending terminals, each sending terminal is sent to the corresponding receiving terminal, and finally the data are fused by the fusion equipment and then displayed.

Example three: when the number of the preset sending ends is required to be increased:

when the resolution of the target image is 8K, if the image resolution supportable by the transmitting end is 2K and the image resolution supportable by the receiving end is 8K, 4 preset transmitting ends need to be matched according to the resolution of the target image to meet the requirements of the encoding and decoding of the image, and the quality of the image after encoding and decoding is prevented from being reduced.

The image processing system structure shown in fig. 2c comprises: and a plurality of sending terminals correspond to one receiving terminal, data splitting is carried out after the data are collected by the source terminal, the split data are respectively sent to each sending terminal, each sending terminal is sent to the receiving terminal, and finally, the receiving terminal carries out data fusion and then displays the data.

The image processing method provided by the embodiment of the disclosure transmits a target image to a preset receiving end through a preset transmitting end after acquiring the target image, and acquires a target compression rate of the preset transmitting end and a target decoding rate of the preset receiving end in the transmission process, determines whether to increase the preset transmitting end by comparing the target compression rate of the preset transmitting end with a fixed compression rate of the preset transmitting end, or determines whether to increase the preset decoding end by comparing the target decoding rate of the preset receiving end with a fixed decoding rate of the preset receiving end, thereby avoiding the problem of quality degradation after image coding/decoding processing caused by the fact that the compression rate of the preset receiving end is not matched with the compression rate required by the target image or the decoding rate of the preset receiving end is not matched with the decoding rate required by the target image.

The image processing method provided by the embodiment of the disclosure aims at a processing method for reducing image quality caused by insufficient coding and decoding capacity of a receiving end or a transmitting end.

According to the method, after the target image is obtained, the packet loss rate when the target image is transmitted is calculated by the sending end and the receiving end respectively, the compression rate or the decoding rate of the equipment of the sending end and the receiving end is obtained, whether the quantity of the sending ends is increased or not is determined according to the comparison result of the packet loss rate and the compression rate, or whether R is increased or not is determined according to the comparison result of the packet loss rate and the decoding rate.

For example, the calculation power of one receiving end can be 2K picture data, when the transmitting end transmits 8K data, the data amount is about 4 times of 2K data, and when the actual decoding rate of the receiving end is far high, the decoding capability of the receiving end is insufficient.

(this solution is more suitable for local area network, because the probability of packet loss is very small, in local area network, the second port data and the third port data can be equal to approximately equal, if it is wide area network, the data flow of each port must be measured separately)

The method includes that a sending end is added with a multi-path receiving end device list, when the calculation force of the sending end is insufficient, the sending end can judge whether a receiving end needs to be added or not according to the actual decoding rate of the sending end, if the actual decoding rate is far larger than the decoding rate of the receiving end, the fact that the calculation capability is achieved and the actual decoding rate is far larger than the decoding rate of the receiving end can be generally understood that the difference between the actual decoding rate and the decoding rate of the receiving end is larger than a certain threshold value, for example, the threshold value is set to be one half of the decoding rate of the receiving end.

Based on the image processing method described in the embodiment corresponding to fig. 1, as shown in fig. 3, the following is another implementation method of the apparatus of the present disclosure, which can be used to execute the embodiment of the method of the present disclosure.

301. After the source end collects the images, the images are sent to the corresponding receiving end through the preset sending end, and the receiving end decodes the images and sends the decoded images to the display equipment for display.

302. And acquiring code streams of all nodes in the image transmission process.

Specifically, each node in the above steps includes: a first node, a second node, a third node, and a fourth node.

The first node is an output end of the source end, namely an input end of the S end; the second node refers to the output end of the sending end; the third node refers to the input end of the receiving end; the fourth node refers to an output terminal of the receiving terminal.

Because the sending end needs to encode, the code stream of the input end of the sending end is the code stream before encoding, and the output end of the sending end is the code stream after encoding; the input end of the receiving end decodes the front code stream, and the output end of the receiving end decodes the rear code stream.

303. According to the code streams of the nodes in the transmission process, a compression ratio S1 for the transmitting end and a decoding ratio R1 for the receiving end are respectively calculated.

Specifically, the compression ratio S1 in the above step refers to an actual compression ratio, and R1 refers to an actual decoding ratio.

S1 is the codestream size of the second node/the codestream size of the first node.

R1 is the codestream size of the third node/the codestream size of the fourth node.

304. Obtaining the fixed compression ratio S2 of the transmitting end, comparing the fixed compression ratio S2 with the compression ratio S1, obtaining the fixed decoding rate R2 of the receiving end, and comparing the fixed decoding rate R2 with the decoding rate R1.

Specifically, among the above steps, S2 and R2 are inherent properties of S and R, and are generally conclusions drawn from a plurality of tests in the case of full codec. I.e. the attribute values in case of codec capability.

There are several results:

(1) s1 is much smaller than S2, which indicates that the encoding capability of the transmitting end cannot satisfy the transmission of the video source, and a part of data is lost at the first interface, and at this time, the number of transmitting ends needs to be increased, optionally, sequentially increased.

(2) R1 is much larger than R2, which indicates that the encoding capability of the receiving end cannot satisfy the transmission of the video source, and a part of data is lost at the third interface, and at this time, the number of receiving ends needs to be increased, optionally, in order to increase.

(3) S1 is approximately equal to S2 and R1 is approximately equal to R2, indicating that both sender and receiver processing capabilities are sufficient to process the captured images without requiring adjustment of the number of senders and receivers.

305. According to the comparison result of step 304, the number of receiving ends or transmitting ends is adjusted.

When the encoding capability of the transmitting end cannot meet the transmission requirement of the video source, the number of the transmitting ends needs to be increased.

Optionally, the number of the sending end and the corresponding number of the receiving ends may be increased at the same time.

When the encoding capability of the receiving end can not meet the transmission of the video source, the number of the receiving ends is only increased.

By increasing the number until both S1 and S2 approach the device attribute value, or there is no spare sender or receiver available. And after the number increased by the sending end or the receiving end is determined, executing the next step.

306. And according to the adjusted sending end or receiving end, segmenting the current image frame, and encoding and decoding the segmented image.

Specifically, according to the adjusted sending end or receiving end, data encoding, transmission, decoding and data fusion are performed through the corresponding number of receiving ends and sending ends respectively.

Example two

Based on the image processing method described in the embodiments corresponding to fig. 2 and fig. 3, the following is an embodiment of the apparatus of the present disclosure, which can be used to execute an embodiment of the method of the present disclosure.

An embodiment of the present disclosure provides an image processing apparatus, as shown in fig. 4, the image processing apparatus 40 including: a first acquisition module 401, a second acquisition module 402, a third acquisition module 403 and a determination module 404,

the first obtaining module 401 is configured to obtain a target image, and determine a preset sending end and a preset receiving end corresponding to the target image;

the second obtaining module 402 is configured to obtain a target transmission result of the target image, where the preset transmission result refers to: transmitting the result of the target image to the preset receiving end through the preset transmitting end, wherein the preset transmission result at least comprises a target compression ratio of the preset transmitting end when the target image is transmitted;

the third obtaining module 403, configured to obtain a preset compression rate of the preset sending end, where the preset compression rate is determined according to the coding performance of the preset sending end;

the determining module 404 is configured to determine to increase the number of the preset sending ends when the target compression ratio of the preset sending end is smaller than the preset compression ratio of the preset sending end.

In an embodiment, the preset transmission result at least includes a target decoding rate of the preset receiving end when transmitting the target image, and the third obtaining module 403 in the apparatus 40 is further configured to obtain a preset decoding rate of the preset receiving end, where the preset decoding rate is determined according to the decoding performance of the preset transmitting end;

the determining module 404 is configured to determine to increase the number of the preset receiving ends when the target decoding rate of the preset receiving ends is greater than the preset decoding rate of the preset receiving ends.

The image processing apparatus according to the embodiment of the present disclosure, after acquiring a target image, transmits the target image to a preset receiving end through a preset transmitting end, and acquires a target compression ratio of the preset transmitting end and a target decoding rate of the preset receiving end in a transmission process, determines whether to add the preset transmitting end by comparing the target compression ratio of the preset transmitting end with a fixed compression ratio of the preset transmitting end, or determines whether to add the preset decoding end by comparing the target decoding rate of the preset receiving end with a fixed decoding rate of the preset receiving end, thereby avoiding a problem of quality degradation after image transmission due to a mismatch between the compression ratio of the preset receiving end and a compression ratio required for the target image, or a mismatch between the decoding rate of the preset receiving end and a decoding rate required for the target image.

Based on the image processing method described in the embodiment corresponding to fig. 2 and fig. 3, an embodiment of the present disclosure further provides a computer-readable storage medium, for example, the non-transitory computer-readable storage medium may be a Read Only Memory (ROM), a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like. The storage medium stores computer instructions for executing the image processing method described in the embodiment corresponding to fig. 2 and fig. 3, which is not described herein again.

Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

16页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:视频压缩、解压缩方法及装置、电子设备和存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类