Image coding optimization method, device and equipment
By obtaining encoding parameters in the image remote control system, image encoding and decoding, and adjusting encoding parameters according to the feature value, the problem of poor image encoding optimization effect in the prior art is solved, and higher testing accuracy and system performance are achieved.
Patent Information
- Application Number
- CN202510155521.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-12
- Publication Date
- 2025-05-16
AI Technical Summary
The prior art is difficult to obtain accurate indicators in image encoding optimization, resulting in poor optimization results, and the performance consumption of the test process will affect the performance of the image remote control system.
By obtaining encoding parameters, collecting the original image and encoding and decoding, calculating the characteristic values of the target image in the specified dimensions, and adjusting the encoding parameters to improve the effect of image encoding.
It improves the accuracy of image encoding test, optimizes the effect of image encoding, and improves the system performance of image remote control system.
Smart Images

Figure CN120017843A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of electronic information technology, and in particular to an image coding optimization method, device and equipment. Background Art
[0002] Image remote control systems are developed in response to the needs of modern digital management. They play a key role in the fields of industrial remote equipment monitoring, medical remote diagnosis, real-time security monitoring, and educational remote teaching practice. In image remote control systems, the quality of image compression and transmission effects is an important indicator for evaluating an image remote control system. When optimizing image coding, it is necessary to obtain accurate indicators to determine the optimization direction of image coding.
[0003] In the related technology, pre-recorded videos and YUV (Luma-Chrominance) data are usually used as input sources to obtain indicators of image remote control systems. Among them, if the captured and recorded video is used as the input source, the original video must be decoded first, and then compressed and decoded by the system under test, and then compared and evaluated. The original image has already been lost during the initial compression process, reducing the accuracy of the test; using YUV data as the input source, the amount of original data is huge, and additional consumption will be generated when reading. It is impossible to obtain accurate indicators, and the optimization effect of image encoding is poor.
[0004] In view of this, an image coding optimization method with good optimization effect is needed. Summary of the invention
[0005] In view of this, the present invention provides an image coding optimization method, which can obtain accurate image coding indicators and improve the optimization effect of image coding optimization.
[0006] In a first aspect, the present invention provides an image coding optimization method, which is applied to an image remote control system, and the method includes: obtaining coding parameters; acquiring an original image, and encoding the original image based on the coding parameters to generate target coding data; decoding the target coding data to obtain target decoded data; calculating the eigenvalues of the target image corresponding to the target decoded data in one or more specified dimensions, and adjusting the coding parameters based on the eigenvalues in one or more specified dimensions.
[0007] In this embodiment, by acquiring encoding parameters; collecting the original image, and encoding and decoding the original image according to the encoding parameters, a target image corresponding to the target decoding data is obtained; and by calculating the characteristic values of the target image in one or more specified dimensions, the encoding parameters in the test parameters are adjusted. Through the above scheme, according to the encoding parameters, the original image is encoded and decoded, and the characteristic values of the decoded target image in one or more specified dimensions are calculated, so that the image encoding in the image remote control system is tested, and the accuracy of the image encoding test can be improved. Then, according to the characteristic values in one or more specified dimensions, the encoding parameters are adjusted, which can improve the encoding effect of the image encoding and improve the system performance of the image remote control system.
[0008] In an optional implementation, the encoding parameter includes at least one of an encoding mode, a rate control mode and a rate control factor.
[0009] In this embodiment, the encoding parameters include at least one of an encoding mode, a bit rate control mode and a bit rate control factor, which can simulate the system's encoding of the original image in different application scenarios, and test the image encoding based on the encoding and decoding results, thereby obtaining accurate test data and improving the accuracy of image coding optimization.
[0010] In an optional embodiment, the specified dimension includes at least one of peak signal-to-noise ratio, data bandwidth, and delay.
[0011] In this embodiment, the specified dimension includes at least one of peak signal-to-noise ratio, data bandwidth and delay, so that image coding can be accurately and objectively tested.
[0012] In an optional embodiment, when the specified dimension includes a peak signal-to-noise ratio, adjusting the encoding parameters includes: comparing a first peak signal-to-noise ratio with a first peak signal-to-noise ratio threshold; and when the first peak signal-to-noise ratio is less than the first peak signal-to-noise ratio threshold, adjusting the encoding parameters until the first peak signal-to-noise ratio is not less than the first peak signal-to-noise ratio threshold.
[0013] In this embodiment, when the designated dimension includes the peak signal-to-noise ratio, by comparing the first peak signal-to-noise ratio with the first peak signal-to-noise ratio threshold and adjusting the encoding parameter based on the comparison result, the image quality of the target image corresponding to the encoding parameter can be improved to optimize the encoding parameter, thereby improving system performance.
[0014] In an optional implementation, obtaining the first peak signal-to-noise ratio includes: obtaining a mean square error between corresponding pixel values of the target image and the original image; and calculating the first peak signal-to-noise ratio of the target image based on the mean square error.
[0015] In this embodiment, by obtaining the mean square error of the pixel values corresponding to the target image and the original image, and then obtaining the first peak signal-to-noise ratio of the target image based on the mean square error, the image quality of the target image can be intuitively obtained, which is convenient for subsequent optimization of encoding parameters.
[0016] In an optional implementation, when the specified dimension includes bandwidth, adjusting the encoding parameters includes: comparing the first data bandwidth and the first data bandwidth threshold; and when the first data bandwidth is greater than the first data bandwidth threshold, adjusting the encoding parameters until the first data bandwidth is less than or equal to the first data bandwidth threshold.
[0017] In this implementation, by comparing the first data bandwidth with the first data bandwidth threshold and adjusting the encoding parameters based on the comparison result so that the first data bandwidth is less than or equal to the first data bandwidth threshold, the image transmission stability of the image remote control system can be ensured.
[0018] In an optional embodiment, when the specified dimension includes delay, adjusting the encoding parameters includes: comparing the first delay with a delay threshold; when the first delay is greater than the delay threshold, adjusting the encoding parameters until the first delay is less than or equal to the delay threshold.
[0019] In this embodiment, by comparing the first delay with the delay threshold and adjusting the encoding parameters based on the comparison result so that the first delay is less than or equal to the delay threshold, it is possible to avoid image delay in the image remote control system due to excessive image encoding delay.
[0020] In an optional implementation, when the specified dimension includes a peak signal-to-noise ratio and a data bandwidth, adjusting the encoding parameters includes: comparing a second peak signal-to-noise ratio with a second peak signal-to-noise ratio threshold; when the second peak signal-to-noise ratio is less than the second peak signal-to-noise ratio threshold, adjusting the encoding parameters until the second peak signal-to-noise ratio is greater than or equal to the second peak signal-to-noise ratio threshold; when the second peak signal-to-noise ratio is greater than or equal to the second peak signal-to-noise ratio threshold, comparing the second data bandwidth with the second data bandwidth threshold; when the second data bandwidth is greater than the second data bandwidth threshold, adjusting the encoding parameters until the second data bandwidth is less than or equal to the second data bandwidth threshold.
[0021] In this embodiment, by adjusting the encoding parameters so that when the second peak signal-to-noise ratio of the target image is greater than the second peak signal-to-noise ratio threshold, the second data bandwidth is less than or equal to the second data bandwidth threshold, the quality of the target image and the data bandwidth can be balanced to achieve optimization of the encoding parameters.
[0022] In a second aspect, the present invention provides an image coding optimization device, which includes: an acquisition module for acquiring coding parameters; an encoding module for capturing an original image, and encoding the original image based on the coding parameters to generate target coding data; a decoding module for decoding the target coding data to obtain target decoded data; an adjustment module for calculating the eigenvalues of the target image corresponding to the target decoded data in one or more specified dimensions, and adjusting the coding parameters based on the eigenvalues in one or more specified dimensions.
[0023] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the image coding optimization method of the first aspect or any corresponding embodiment thereof by executing the computer instructions. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0025] Figure 1 is a schematic diagram of a flow chart of an image coding optimization method according to an embodiment of the present invention;
[0026] Figure 2 is a schematic diagram of the system structure of an image remote control system according to an embodiment of the present invention;
[0027] Figure 3 is a flow chart of another image coding optimization method according to an embodiment of the present invention;
[0028] Figure 4 is a structural block diagram of an image coding optimization device according to an embodiment of the present invention;
[0029] Figure 5 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0030] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0031] Image output quality, latency, and bandwidth are important indicators for evaluating image remote control systems. They are of great significance in the testing, optimization, and quality evaluation of image remote control systems. For image remote control systems, high-quality image output, as low latency as possible, and as little bandwidth as possible are required. However, these important indicators are mutually exclusive, so it is necessary to test and optimize image encoding to achieve the best results.
[0032] In the related art, the image coding optimization method is usually separated from the image remote control system. By recording the original picture and the output picture of the image remote control system as the input source, the test indicators of image coding are obtained, which cannot guarantee the accuracy of the corresponding image, and after the secondary encoding during the picture recording, the data accuracy is reduced, resulting in poor accuracy of the final test results and poor image coding optimization effect. Moreover, the performance consumption of the test process itself will produce negative feedback to the image remote control system, bring great disturbance to the test data, and reduce the test accuracy. In addition, the picture of the image remote control system is unpredictable and is not necessarily a pure video scene. It is difficult to match such actual scene changes through the recorded video, resulting in a large difference between the test results and the actual application of the image remote control system, and it is impossible to achieve a good optimization effect.
[0033] In addition, when the image remote control system is separated and the acquisition module of the image remote control system cannot be called, and the image coding optimization tool also lacks an acquisition module, the original YUV data can be used as the input source to test the image coding in the image remote control system. However, the amount of original YUV data is huge, which will bring unnecessary resource consumption when reading, interfere with the test results of image coding, and is inconsistent with the actual scenario of the image remote control system.
[0034] The embodiment of the present invention provides an image coding optimization method, which obtains coding parameters; collects original images, and encodes and decodes the original images according to the coding parameters to obtain target images corresponding to target decoding data; and adjusts the coding parameters in the test parameters by calculating the eigenvalues of the target image in one or more specified dimensions. Through the above scheme, the original image is encoded and decoded according to the coding parameters, and the eigenvalues of the decoded target image in one or more specified dimensions are calculated, so that the image coding in the image remote control system is tested, and the accuracy of the image coding test can be improved. Then, according to the eigenvalues in one or more specified dimensions, the coding parameters are adjusted to improve the coding effect of the image coding and improve the system performance of the image remote control system.
[0035] According to an embodiment of the present invention, a method embodiment is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0036] In this embodiment, an image coding optimization method is provided, which is applied to an image remote control system. Figure 1 is a flowchart of an image coding optimization method according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:
[0037] Step S101, obtaining encoding parameters.
[0038] In the image remote control system, it is usually necessary to capture images of the surrounding environment at a certain frame rate. Since the amount of collected image data is very large, it needs to be encoded and compressed for the convenience of data storage and transmission. In the encoding process, it is necessary to set the encoding parameters. Figure 2 It is a structural diagram of an image remote control system. Figure 2 As shown, the image remote control system includes a collector, an encoder and a decoder. The collector is used to acquire images, which can be a camera, etc. The encoder is used to encode the image acquired by the collector according to preset encoding parameters; the decoder is used to decode the data encoded by the encoder to restore the image.
[0039] The coding parameters can be determined according to the actual application scenario of the image remote control system. In some optional implementations, coding software can be used to automatically generate coding parameters to improve the efficiency of image coding optimization.
[0040] The encoding parameters may include bit rate, frame rate, resolution, encoding format, etc. A suitable encoding format may be selected according to actual conditions.
[0041] Step S102: capturing an original image, and encoding the original image based on encoding parameters to generate target encoded data.
[0042] The original image can be directly acquired through the acquisition device of the image remote control system.
[0043] After the original image is collected, the corresponding encoding algorithm is used to encode the original image according to the encoding parameters to generate target encoded data.
[0044] In some optional implementations, the image remote control system includes several encoders and decoders, each encoder is configured with a different encoding algorithm, and each decoder is configured with a different decoding algorithm; the encoding algorithm of the encoder matches the decoding algorithm of the decoder. The encoding algorithm and the encoder corresponding to the encoding algorithm can be determined based on the encoding parameters. When the encoding parameters include several encoding algorithms, the collected original images can be simultaneously input into the corresponding encoders for encoding, so as to achieve simultaneous testing and optimization of image encoding of different encoding algorithms, thereby improving the efficiency of image encoding optimization.
[0045] Step S103, decoding the target encoded data to obtain target decoded data.
[0046] A corresponding decoding algorithm may be determined according to the encoding parameters, and the target encoded data may be decoded using the decoding algorithm to obtain target decoded data, wherein the decoding algorithm matches the encoding algorithm used in step S102.
[0047] Step S104, calculating the characteristic values of the target image corresponding to the target decoded data in one or more specified dimensions, and adjusting the encoding parameters based on the characteristic values in one or more specified dimensions.
[0048] Specified dimensions may include image quality, encoding speed, resource usage, and compression efficiency.
[0049] Among them, the characteristic value under the image quality dimension can be one of the image quality evaluation indicators to quantitatively evaluate the image quality of the target image, such as Peak Signal-to-Noise Ratio (PSNR) and Structure Similarity Index Measure (SSIM). In the case of poor image quality, the image quality of the target image can be improved by adjusting the parameters related to image quality in the encoding parameters. In practical applications, the image quality of the target image can be improved by increasing the bit rate, reducing the quantization parameter, modifying the encoding method, etc.
[0050] The characteristic value under the encoding speed dimension can obtain the encoding speed of the target image corresponding to the target decoding data by obtaining the acquisition time of the original image and the time of obtaining the corresponding target decoding data. In specific implementation, the encoding speed of image encoding can be improved by reducing the bit rate, increasing the quantization parameter, etc.
[0051] The characteristic value under the resource occupation dimension can be obtained by monitoring the memory and other resource occupation of the image remote control system. The resource occupation of image encoding can be reduced by reducing the bit rate, increasing the quantization parameter, etc.
[0052] The characteristic value under the compression efficiency dimension can be obtained by calculating the ratio of the target image file size to the original image file size. In a specific implementation, the compression efficiency can be improved by using an encoding method, reducing the bit rate, and the like.
[0053] In a specific implementation, different designated dimensions may be mutually exclusive, and the encoding parameters may be adjusted according to the application scenario of the image remote control system.
[0054] The image coding optimization method provided in this embodiment obtains coding parameters; collects the original image, and encodes and decodes the original image according to the coding parameters to obtain a target image corresponding to the target decoding data; and adjusts the coding parameters in the test parameters by calculating the eigenvalues of the target image in one or more specified dimensions. Through the above scheme, the original image is encoded and decoded according to the coding parameters, and the eigenvalues of the decoded target image in one or more specified dimensions are calculated, so as to test the image coding in the image remote control system, which can improve the accuracy of the image coding test. Then, according to the eigenvalues in one or more specified dimensions, the coding parameters are adjusted to improve the coding effect of the image coding and improve the system performance of the image remote control system.
[0055] In this embodiment, an image coding optimization method is provided, which is applied to an image remote control system and includes the following steps:
[0056] Step S201, obtaining encoding parameters.
[0057] For details, please see Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.
[0058] In some optional implementations, the encoding parameters include at least one of an encoding mode, a rate control mode, and a rate control factor.
[0059] The encoding method may include Huffman encoding, JPEG (Joint Photographic Experts Group) encoding, etc. The bit rate control method may include fixed bit rate, variable bit rate, average bit rate, etc. The bit rate control factor may include quantization parameter, frame rate, resolution, etc.
[0060] Step S202: collect an original image, and encode the original image based on encoding parameters to generate target encoded data.
[0061] For details, please see Figure 1 Step S102 of the illustrated embodiment will not be described in detail here.
[0062] Step S203, decoding the target encoded data to obtain target decoded data.
[0063] For details, please see Figure 1 Step S103 of the illustrated embodiment will not be described in detail here.
[0064] Step S204, calculating the characteristic values of the target image corresponding to the target decoding data in one or more specified dimensions, and adjusting the encoding parameters based on the characteristic values in one or more specified dimensions.
[0065] Specifically, the above-mentioned specified dimension includes at least one of peak signal-to-noise ratio, data bandwidth and delay.
[0066] In some optional implementations, when the specified dimension includes a peak signal-to-noise ratio, the above step S204 includes:
[0067] Step S2041 - 1 , comparing the first peak signal-to-noise ratio with a first peak signal-to-noise ratio threshold.
[0068] The first peak signal-to-noise ratio is the peak signal-to-noise ratio of the target image to the original image, which characterizes the image quality of the target image. The first peak signal-to-noise ratio threshold can be determined according to actual conditions. When the image remote control system has high requirements on the image quality of image encoding, the first peak signal-to-noise ratio threshold is relatively high.
[0069] In some optional implementations, acquiring the first peak signal-to-noise ratio includes:
[0070] Step a1, obtaining the mean square error of the corresponding pixel values of the target image and the original image.
[0071] Subtract the values of each corresponding pixel point of the two images to obtain the difference image, then square each pixel value of the difference image to highlight the difference, then add up the square values of all pixels and divide them by the total number of pixels in the image to get the mean square error (MSE).
[0072] In a specific implementation, for an original image I and a target image K of size m×n, the mean square error is calculated as follows:
[0073]
[0074] Step a2: Calculate a first peak signal-to-noise ratio of the target image based on the mean square error.
[0075] Determine the maximum possible value of the pixel value in the original image, and then use the calculation formula to calculate the first peak signal-to-noise ratio of the target image, where the peak signal-to-noise ratio is calculated as follows:
[0076]
[0077] Among them, MAXI Indicates the maximum possible value of the pixel in the original image.
[0078] Step S2041-2: when the first peak signal-to-noise ratio is less than the first peak signal-to-noise ratio threshold, adjust the encoding parameters until the first peak signal-to-noise ratio is not less than the first peak signal-to-noise ratio threshold.
[0079] When the first peak signal-to-noise ratio is less than the first peak signal-to-noise ratio threshold, it indicates that the image quality of the target image is poor, and the image quality of the target image can be improved by adjusting the bit rate, quantization parameters, etc. in the encoding parameters.
[0080] In some optional implementations, when the specified dimension includes bandwidth, the above step S204 includes:
[0081] Step S2042-1, comparing the first data bandwidth with the first data bandwidth threshold;
[0082] The first data bandwidth can be obtained by calculating the product of the width and height of the target image and the number of color depth bits. The first data bandwidth threshold can be determined according to the data transmission capability of the image remote control system and the image quality requirements for the encoded image.
[0083] Step S2042-2: When the first data bandwidth is greater than the first data bandwidth threshold, adjust the encoding parameters until the first data bandwidth is less than or equal to the first data bandwidth threshold.
[0084] When the first data bandwidth is greater than the first data bandwidth threshold, it means that the target image encoding occupies a large data bandwidth, which may affect the real-time performance of data transmission. The image quality of the target image can be reduced by adjusting the bit rate, quantization parameters, etc. in the encoding parameters to achieve the effect of reducing the first data bandwidth.
[0085] In some optional implementations, when the specified dimension includes a delay, the above step S204 includes:
[0086] Step S2043-1, comparing the first delay with the delay threshold.
[0087] The first delay can obtain the encoding speed of the target image corresponding to the target decoding data by obtaining the acquisition time of the original image and the time of obtaining the corresponding target decoding data.
[0088] The delay threshold can be determined according to the hardware performance of the image remote control system and application requirements, etc. When the image remote control system has high real-time requirements, the delay threshold is small.
[0089] Step S2043-2: When the first delay is greater than the delay threshold, adjust the encoding parameters until the first delay is less than or equal to the delay threshold.
[0090] When the first delay is greater than the delay threshold, it indicates that the delay of image encoding is large. The first delay can be reduced by appropriately reducing the quantization parameter or changing the encoding method to increase the speed of image encoding.
[0091] In some optional implementations, when the specified dimension includes peak signal-to-noise ratio and data bandwidth, the above step S204 includes:
[0092] Step S2044 - 1 , comparing the second peak signal-to-noise ratio with the second peak signal-to-noise ratio threshold.
[0093] The second peak signal-to-noise ratio acquisition method is shown in steps a1-a2, which will not be described here. The second peak signal-to-noise ratio threshold can be determined according to actual conditions. When the image remote control system has high requirements on the image quality of image encoding, the second peak signal-to-noise ratio threshold is relatively high.
[0094] Step S2044-2: When the second peak signal-to-noise ratio is less than the second peak signal-to-noise ratio threshold, adjust the encoding parameters until the second peak signal-to-noise ratio is greater than or equal to the second peak signal-to-noise ratio threshold.
[0095] Step S2044-3, when the second peak signal-to-noise ratio is greater than or equal to the second peak signal-to-noise ratio threshold, compare the second data bandwidth with the second data bandwidth threshold; when the second data bandwidth is greater than the second data bandwidth threshold, adjust the encoding parameters until the second data bandwidth is less than or equal to the second data bandwidth threshold.
[0096] When the second peak signal-to-noise ratio is greater than or equal to the second peak signal-to-noise ratio threshold, it indicates that the quality requirement of the image coding has been met, and the second data bandwidth can be reduced by adjusting the coding parameters while meeting the image quality requirement of the image remote control system to avoid waste of resources. In a specific implementation, the image quality of the target image can be reduced by adjusting the bit rate, quantization parameters, etc. in the coding parameters to achieve the purpose of reducing the second data bandwidth.
[0097] The image coding optimization method provided in this embodiment, the coding parameters include at least one of the coding mode, the bit rate control mode and the bit rate control factor, which can simulate the system's encoding of the original image in different application scenarios, and test the image coding based on the encoding and decoding results, so as to obtain accurate test data and improve the accuracy of image coding optimization.
[0098] In this embodiment, an image coding optimization method is provided, which is applied to an image remote control system, and the image remote control system includes a collector, an encoder and a decoder. The collector is used to collect original images; the encoder is used to encode the original images to obtain target encoded data; and the decoder is used to decode the target encoded data. Figure 3 is a flow chart of an image coding optimization method according to an embodiment of the present invention. Figure 3 As shown, first input the test parameters. Among them, the test parameters include encoding mode, encoding bandwidth control mode and test range. Among them, the encoding mode may include encoding algorithm and parameters corresponding to the encoding algorithm. The encoding algorithm may correspond to the encoder in the image remote control system, and different encoding algorithms correspond to different encoders. The encoding bandwidth control mode includes bit rate control mode and bit rate control factor. The test range is the test range of image encoding optimization, including image quality, encoding delay and bandwidth occupancy, among which the image quality can be directly represented by PSNR.
[0099] Adjust the encoding parameters, where the encoding parameters are configuration parameters of the encoder.
[0100] Use the collector of the image remote control system to collect a frame of original image, then use the encoder corresponding to the encoding method to encode the frame of original image to obtain encoded data; use the decoder corresponding to the encoding method to decode the encoded data to obtain the target image.
[0101] Then the target image and the original image are calculated to obtain and statistically output PSNR, delay and bandwidth. The encoding parameters are adjusted based on PSNR, delay and bandwidth, and the process of acquisition, encoding, decoding, calculation and adjustment is repeated until the test is completed.
[0102] The image coding optimization method provided in this embodiment calls the module of the image remote control system to test the image coding, which can improve the reusability of the image remote control system and the accuracy and anti-interference of the method. And by inputting the test parameters, the image coding of the image remote control system is tested, which can be separated from the configurability of the image remote control system, avoid the data reading error caused by pre-recording the video as the input source, and quickly test and verify the image coding. The rationality of the coding parameters is verified according to the calculation results, so as to tune the corresponding encoder to achieve the tuning of the image remote control system.
[0103] In this embodiment, an image coding optimization device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0104] This embodiment provides an image coding optimization device, such as Figure 4 As shown, including:
[0105] The acquisition module 401 is used to acquire encoding parameters.
[0106] The encoding module 402 is used to collect an original image and encode the original image based on encoding parameters to generate target encoded data.
[0107] The decoding module 403 is used to decode the target encoded data to obtain target decoded data.
[0108] The adjustment module 404 is used to calculate the characteristic values of the target image corresponding to the target decoded data in one or more specified dimensions, and adjust the encoding parameters based on the characteristic values in one or more specified dimensions.
[0109] In some optional implementations, the encoding parameters include at least one of an encoding mode, a rate control mode, and a rate control factor.
[0110] In an optional embodiment, the specified dimension includes at least one of peak signal-to-noise ratio, data bandwidth, and delay.
[0111] In some optional implementations, when the specified dimension includes a peak signal-to-noise ratio, the adjustment module 404 includes:
[0112] The first peak signal-to-noise ratio comparing unit is used to compare the first peak signal-to-noise ratio with a first peak signal-to-noise ratio threshold.
[0113] The first adjustment unit is configured to adjust the encoding parameter when the first peak signal-to-noise ratio is less than a first peak signal-to-noise ratio threshold, until the first peak signal-to-noise ratio is not less than the first peak signal-to-noise ratio threshold.
[0114] In some optional implementations, the adjustment module 404 includes a first peak signal-to-noise ratio calculation unit, which is used to calculate the first peak signal-to-noise ratio. The first peak signal-to-noise ratio calculation unit includes:
[0115] The mean square error acquisition subunit is used to obtain the mean square error of the corresponding pixel values of the target image and the original image.
[0116] The peak signal-to-noise ratio calculation subunit is used to calculate a first peak signal-to-noise ratio of the target image based on a mean square error.
[0117] In some optional implementations, when the specified dimension includes bandwidth, the adjustment module 404 includes:
[0118] The first data bandwidth comparison unit is used to compare the first data bandwidth with a first data bandwidth threshold.
[0119] The second adjustment unit is used to adjust the encoding parameter until the first data bandwidth is less than or equal to the first data bandwidth threshold when the first data bandwidth is greater than the first data bandwidth threshold.
[0120] In some optional implementations, when the specified dimension includes delay, the adjustment module 404 includes:
[0121] The first delay comparison unit is used to compare the first delay with the delay threshold.
[0122] The third adjustment unit is used to adjust the encoding parameter when the first delay is greater than the delay threshold, until the first delay is less than or equal to the delay threshold.
[0123] In some optional implementations, when the specified dimension includes peak signal-to-noise ratio and data bandwidth, the encoding parameter is adjusted, and the adjustment module 404 includes:
[0124] A second peak signal-to-noise ratio comparison unit, used for comparing a second peak signal-to-noise ratio and a second peak signal-to-noise ratio threshold;
[0125] The fourth adjustment unit is used to adjust the encoding parameter until the second peak signal-to-noise ratio is greater than or equal to the second peak signal-to-noise ratio threshold when the second peak signal-to-noise ratio is less than the second peak signal-to-noise ratio threshold.
[0126] and a fifth adjustment unit, configured to compare the second data bandwidth with the second data bandwidth threshold when the second peak signal-to-noise ratio is greater than or equal to the second peak signal-to-noise ratio threshold; and to adjust the encoding parameters until the second data bandwidth is less than or equal to the second data bandwidth threshold when the second data bandwidth is greater than the second data bandwidth threshold.
[0127] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0128] The image coding optimization device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0129] The embodiment of the present invention also provides a computer device having the above Figure 4 The image coding optimization device shown.
[0130] See also Figure 5 , Figure 5 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 5As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 5 A processor 10 is taken as an example.
[0131] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0132] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.
[0133] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0134] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0135] The computer device also includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means. Figure 5 The example of connecting through bus is taken in the following.
[0136] The input device 30 can receive input digital or character information, and generate key signal input related to the user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator bar, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display and a plasma display. In some optional embodiments, the display device can be a touch screen.
[0137] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0138] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.
[0139] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. An image coding optimization method, characterized in that: The method is applied to an image remote control system, and the method comprises: Get encoding parameters; Acquiring an original image, and encoding the original image based on the encoding parameters to generate target encoded data; Decoding the target encoded data to obtain target decoded data; Calculate characteristic values of a target image corresponding to the target decoded data in one or more specified dimensions, and adjust the encoding parameters based on the characteristic values in the one or more specified dimensions.
2. The method according to claim 1, characterized in that The encoding parameters include at least one of an encoding mode, a rate control mode and a rate control factor.
3. The method according to claim 1, characterized in that The specified dimension includes at least one of peak signal-to-noise ratio, data bandwidth, and latency.
4. The method according to claim 3, characterized in that In a case where the specified dimension includes a peak signal-to-noise ratio, the adjusting the encoding parameter includes: comparing a first peak signal-to-noise ratio with a first peak signal-to-noise ratio threshold; When the first peak signal-to-noise ratio is less than the first peak signal-to-noise ratio threshold, the encoding parameter is adjusted until the first peak signal-to-noise ratio is not less than the first peak signal-to-noise ratio threshold.
5. The method according to claim 4, characterized in that The obtaining of the first peak signal-to-noise ratio comprises: Obtaining the mean square error of the pixel values corresponding to the target image and the original image; Based on the mean square error, a first peak signal-to-noise ratio of the target image is calculated.
6. The method according to claim 3, characterized in that In a case where the specified dimension includes bandwidth, the adjusting the encoding parameter includes: comparing the first data bandwidth with a first data bandwidth threshold; When the first data bandwidth is greater than the first data bandwidth threshold, the encoding parameter is adjusted until the first data bandwidth is less than or equal to the first data bandwidth threshold.
7. The method according to claim 3, characterized in that In a case where the specified dimension includes a delay, the adjusting the encoding parameter includes: Comparing the first delay with the delay threshold; When the first delay is greater than the delay threshold, the encoding parameter is adjusted until the first delay is less than or equal to the delay threshold.
8. The method according to claim 3, characterized in that In a case where the specified dimension includes a peak signal-to-noise ratio and a data bandwidth, the adjusting the encoding parameter includes: comparing a second peak signal-to-noise ratio with a second peak signal-to-noise ratio threshold; When the second peak signal-to-noise ratio is less than the second peak signal-to-noise ratio threshold, adjusting the encoding parameter until the second peak signal-to-noise ratio is greater than or equal to the second peak signal-to-noise ratio threshold; When the second peak signal-to-noise ratio is greater than or equal to the second peak signal-to-noise ratio threshold, compare the second data bandwidth with the second data bandwidth threshold; when the second data bandwidth is greater than the second data bandwidth threshold, adjust the encoding parameter until the second data bandwidth is less than or equal to the second data bandwidth threshold.
9. An image coding optimization device, characterized in that: The device comprises: An acquisition module is used to obtain encoding parameters; An encoding module, used for acquiring an original image, and encoding the original image based on the encoding parameters to generate target encoded data; A decoding module, used for decoding the target encoded data to obtain target decoded data; The adjustment module is used to calculate the characteristic values of the target image corresponding to the target decoding data in one or more specified dimensions, and adjust the encoding parameters based on the characteristic values in the one or more specified dimensions.
10. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the image coding optimization method according to any one of claims 1 to 8 by executing the computer instructions.
Citation Information
Cited By
Video coding control method and related equipment
CN121217919A