Remote desktop image picture complexity identification method and device and image processing method
By identifying the complexity of remote desktop images and choosing appropriate compression algorithms, the problem of cloud desktop lag caused by excessive data transmission of remote desktop images is solved, achieving more efficient data transmission and smoother user experience.
Patent Information
- Application Number
- CN202411910040.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-04-25
AI Technical Summary
In the case of poor network environment, the remote desktop protocol has caused a surge in image data transmission, resulting in obvious lag in the cloud desktop client experience.
A remote desktop image picture complexity recognition method is provided. By acquiring images in real time, calculating the contrast and similarity of each row, obtaining pixel scores, and counting attribute information to calculate image complexity, and then intelligently selecting an appropriate compression algorithm.
Dynamically evaluate the complexity of image content, improve the accuracy of image complexity recognition, reduce data transmission, alleviate the burden of network traffic and bandwidth, and improve the user experience of cloud desktops.
Smart Images

Figure CN119888699A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of image processing technology, and in particular, relates to a remote desktop image complexity recognition method, device and image processing method. Background Art
[0002] The remote desktop protocol uses a lot of bandwidth for image data transmission, and a lossless compression algorithm is used to ensure clarity. This will cause a surge in the amount of data transmitted in a poor network environment, which will cause obvious lag in the user's experience of operating the cloud desktop client. Summary of the invention
[0003] The main purpose of the present invention is to provide a remote desktop image complexity recognition method, device and image processing method, which can dynamically evaluate the complexity of image content and improve the accuracy of image complexity recognition, so as to intelligently select a suitable compression algorithm, thereby effectively reducing the amount of data transmission.
[0004] In a first aspect, a method for identifying the complexity of a remote desktop image is provided, the method comprising: acquiring an image of a remote desktop in real time; combing the image row by row, calculating the contrast and similarity between each pixel in each row of the image and adjacent pixels based on the red component, green component, and blue component color data in the RGB data of the image, and obtaining a pixel score for each row based on the contrast and similarity; counting attribute information of each row in the image based on the pixel score, and calculating the complexity of the image based on the attribute information, the attribute information comprising: the number of identical pixel pairs, the number of contrasting pixel pairs, and the frequency of occurrence of each color, the number of identical pixel pairs comprising the number of current pixel pairs that are exactly the same as all adjacent pixel pairs and the number that is the same as some of the adjacent pixel pairs, and the contrasting pixel pairs are pixel pairs where there is a color difference between the current pixel and adjacent pixel points.
[0005] In one possible implementation, the contrast and similarity of each row in the image are calculated based on the RGB data in the image, including: calculating the contrast and similarity of each pixel in each row of the image with adjacent pixels based on the red component, green component, and blue component color data in the RGB data in the image.
[0006] In another possible implementation, the pixel score of each row is obtained according to the comparison degree and the similarity, including: obtaining the pixel score of each pixel in each row based on a preset relationship according to the comparison degree and the similarity, wherein the preset relationship is a correspondence between a preset pixel score and each comparison degree and similarity.
[0007] In another possible implementation, attribute information of each row in the image is counted based on pixel scores, including: for each row in the image, traversing each pixel in each row, comparing the pixel scores of the current pixel with those of adjacent pixels, and counting the attribute information of each row in the image based on the comparison results.
[0008] In another possible implementation, the complexity of the image is calculated based on the attribute information, including: calculating the correlation ratio of the image based on the number of identical pixel pairs in each row of the image, the number of contrasting pixel pairs, and the frequency of occurrence of each color; and determining the complexity of the image based on the correlation ratio.
[0009] In another possible implementation, the complexity of the image is determined based on the correlation ratio, including: based on the size of the image area, the complexity of the image is determined according to the correlation ratio and a preset relationship between the correlation ratio and complexity, and the complexity is one of at least two different preset complexity levels.
[0010] In a second aspect, a remote desktop image complexity recognition device is provided, the device comprising: an image acquisition unit, used to acquire the image of the remote desktop in real time; an image processing unit, used to comb the image line by line, calculate the contrast and similarity of each line in the image according to the RGB data in the image, and obtain the pixel score of each line according to the comparison and similarity; a complexity recognition unit, used to count the attribute information of each line in the image according to the pixel score, and calculate the complexity of the image according to the attribute information.
[0011] In another possible implementation, selecting a compression method corresponding to the complexity to compress the image also includes: acquiring network environment conditions; and selecting a compression method to compress the image based on the complexity and the network environment conditions.
[0012] In a third aspect, a method for processing an image of a remote desktop image is provided, comprising: acquiring an image of a remote desktop in real time; combing the image row by row, calculating the contrast and similarity between each pixel in each row of the image and adjacent pixels based on the red component, green component, and blue component color data in the RGB data of the image, and obtaining a pixel score for each row based on the contrast and similarity; counting attribute information of each row in the image based on the pixel score, and calculating the complexity of the image based on the attribute information, wherein the attribute information comprises: the number of identical pixel pairs, the number of contrasting pixel pairs, and the frequency of occurrence of each color, wherein the number of identical pixel pairs comprises the number of current pixel pairs that are exactly the same as all adjacent pixel pairs and the number that is the same as some of the adjacent pixel pairs, and the contrasting pixel pairs are pixel pairs in which the current pixel points have color differences with adjacent pixel points; selecting a compression method corresponding to the complexity to compress the image, and transmitting it to a client for display.
[0013] In a fourth aspect, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, a remote desktop image complexity recognition method as provided in the first aspect is implemented, or an image processing method for a remote desktop image as provided in the third aspect is implemented.
[0014] In a fifth aspect, a non-transitory computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, a remote desktop image complexity recognition method as provided in the first aspect is implemented, or an image processing method of a remote desktop image as provided in the third aspect is implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in describing the embodiments of the present application are briefly introduced below.
[0016] Figure 1 A flowchart of a remote desktop image complexity recognition method provided by one embodiment of the present invention;
[0017] Figure 2 A flowchart of an image processing method for a remote desktop image screen provided by an embodiment of the present invention;
[0018] Figure 3 A structural diagram of a remote desktop image complexity recognition device provided by one embodiment of the present invention;
[0019] Figure 4 A schematic diagram of the physical structure of an electronic device provided by the present invention.
[0020] Specific implementation method
[0021] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar modules or modules with the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be interpreted as limiting the present invention.
[0022] Those skilled in the art will appreciate that, unless expressly stated otherwise, the singular forms "a", "an", "" and "the" used herein may also include the plural forms. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of features, integers, steps, operations, modules and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, modules, components and / or groups thereof. It should be understood that when we refer to a module as being "connected" or "coupled" to another module, it may be directly connected or coupled to the other modules, or there may be intermediate modules. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any module and all combinations of one or more associated listed items.
[0023] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation method of the present application will be further described in detail below in conjunction with the accompanying drawings.
[0024] The technical solution of the present application and how to solve the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0025] like Figure 1 The flowchart of a data zero-copy rendering optimization method based on hard decoding provided by an embodiment of the present invention is shown, which is applied to a server, and the method includes:
[0026] Step S11, acquiring the image of the remote desktop in real time.
[0027] The image of the remote desktop obtained in real time may be an image area used for displaying the remote desktop, or may be a complete image, and specific restrictions are made here.
[0028] Step S12, combing the image row by row, calculating the contrast and similarity between each pixel in each row of the image and the adjacent pixels according to the red component, green component, and blue component color data in the RGB data of the image, and obtaining the pixel score of each row according to the contrast and similarity.
[0029] Step S13, counting the attribute information of each row in the image according to the pixel score, and calculating the complexity of the image according to the attribute information, the attribute information includes: the number of identical pixel pairs, the number of contrasting pixel pairs and the frequency of occurrence of each color, the number of identical pixel pairs includes the number of the current pixel point that is exactly the same as all adjacent pixel points and the number that is the same as some of the adjacent pixel points, and the contrasting pixel pairs are pixel pairs where there is a color difference between the current pixel point and the adjacent pixel points.
[0030] The embodiment of the present invention accurately identifies the complexity of the image so as to intelligently select a suitable compression algorithm. For images with higher complexity, different compression rate algorithms are used according to the different image complexities, and the compression ratio is finely adjusted to ensure that the image maintains a high clarity while effectively reducing the amount of data transmission, thereby alleviating the burden of network traffic and bandwidth, thereby improving the user experience of the cloud desktop and making it run more smoothly.
[0031] In step S12, the contrast and similarity between each pixel in each row of the image and the adjacent pixel are calculated based on the red component, green component, and blue component color data in the RGB data of the image. Then, the pixel score of each pixel in each row is obtained based on the preset relationship according to the contrast and similarity, wherein the preset relationship is the correspondence between the preset pixel score and each contrast and similarity. In an embodiment of the present invention, the pixel score of each pixel can be directly calculated based on the preset relationship according to the contrast and similarity. It is also possible to preset a correspondence table between the pixel score and each contrast and similarity, and obtain the pixel score with the contrast and similarity by searching the correspondence table.
[0032] In step S13, for each row in the image, each pixel in each row is traversed, the pixel scores of the current pixel and the adjacent pixel are compared, and the attribute information of each row in the image is counted according to the comparison result. In an embodiment of the present invention, the statistics of the number of identical pixel pairs can be respectively counted for the case where the current pixel is exactly the same as all adjacent pixels and the case where some of the adjacent pixels of the current pixel are identical. The statistics of the number of contrasting pixel pairs can be respectively counted for the case where the contrast between adjacent pixel values is high, that is, the pixel pairs with large color differences, and the case where the contrast between adjacent pixel values is low, that is, the pixel pairs with small color differences. The statistics of the frequency of occurrence of each color specifically refers to the statistics of the number of times each color appears in the image. After completing the statistics of the attribute information of each row in the image, a data table in the form of an array can be formed, and each row obtains an array including the above-mentioned attribute information.
[0033] After completing the statistics of the attribute information of each row in the image, the correlation ratio of the image is calculated based on the number of identical pixel pairs, the number of contrasting pixel pairs and the frequency of occurrence of each color in each row of the image; the complexity of the image is determined based on the correlation ratio of the image. Based on the size of the image area, the complexity of the image is determined according to the correlation ratio and the preset relationship between the correlation ratio and the complexity, and the complexity is one of at least two different levels of complexity preset. In an embodiment of the present invention, the correlation ratio can be compared with a certain threshold value. If the correlation ratio is not less than the threshold value, the image is determined to be complex; if the correlation ratio is less than the threshold value, the image is determined to be simple. There can also be multiple thresholds, and the correlation ratio is compared with the multiple thresholds to determine the threshold range of the correlation ratio, and then determine the complexity of the image. For example, if n thresholds are set, there are n+1 corresponding image complexities, and n is a positive integer.
[0034] The embodiment of the present invention acquires an image of a remote desktop in real time; combs the image line by line, calculates the contrast and similarity of each line in the image according to the RGB data in the image, and obtains a pixel score for each line according to the comparison and similarity; counts the attribute information of each line in the image according to the pixel score, and calculates the complexity of the image according to the attribute information. This can dynamically evaluate the complexity of the image content and improve the accuracy of image complexity recognition so as to intelligently select a suitable compression algorithm, thereby effectively reducing the amount of data transmission and solving the technical problem of lag in the use of a cloud desktop caused by excessive bandwidth pressure due to excessive image data and poor network conditions.
[0035] The embodiment of the present invention also provides a remote desktop image processing method, which is applied to a server, such as Figure 2 As shown, including:
[0036] Step S21: Acquire the image of the remote desktop in real time.
[0037] Step S22: comb the image row by row, calculate the contrast and similarity between each pixel in each row of the image and the adjacent pixels according to the red component, green component and blue component color data in the RGB data of the image, and obtain the pixel score of each row according to the contrast and similarity.
[0038] Step S23: Count the attribute information of each row in the image according to the pixel scores, and calculate the complexity of the image according to the attribute information, wherein the attribute information includes: the number of identical pixel pairs, the number of contrasting pixel pairs, and the frequency of occurrence of each color, wherein the number of identical pixel pairs includes the number of the current pixel point that is exactly the same as all adjacent pixel points and the number that is the same as some of the adjacent pixel points, and the contrasting pixel pairs are pixel pairs where there is a color difference between the current pixel point and the adjacent pixel points.
[0039] The specific implementation of steps S21 to S23 refers to the specific content of the remote desktop image complexity recognition method in the previous embodiment, which will not be repeated here.
[0040] Step S24: Select a compression method corresponding to the complexity to compress the image, and transmit it to the client for display.
[0041] Different image complexity requires different compression methods to compress the image, and the compressed image is transmitted to the client for display. By accurately identifying the complexity of the image, the compression method corresponding to the complexity can be selected to compress the image, which can achieve a good balance between clear image display and reduced data transmission volume, ensuring that the image maintains a high level of clarity while effectively reducing the amount of data transmission, thereby alleviating the burden of network traffic and bandwidth, and thus improving the user experience of the cloud desktop and making it run more smoothly.
[0042] The embodiment of the present invention can also obtain network environment conditions, and comprehensively select a compression method to compress the image according to the complexity and the obtained network environment conditions, so as to better achieve the image while maintaining a high definition and effectively reducing the amount of data transmission.
[0043] The embodiment of the present invention obtains an image of a remote desktop in real time; combs the image line by line, calculates the contrast and similarity between each pixel in each line of the image and adjacent pixels according to the red component, green component, and blue component color data in the RGB data of the image, and obtains a pixel score for each line according to the contrast and similarity; counts attribute information of each line in the image according to the pixel score, and calculates the complexity of the image according to the attribute information. The attribute information includes: the number of identical pixel pairs, the number of contrasting pixel pairs, and the frequency of occurrence of each color. The number of identical pixel pairs includes the number of the current pixel that is exactly the same as all adjacent pixels and the number of the current pixel that is exactly the same as some of the adjacent pixels. The number of pixels is the same, and the comparison pixel pairs are the pixel pairs where there is a color difference between the current pixel and the adjacent pixel; the compression method corresponding to the complexity is selected to compress the image and transmit it to the client for display. This can solve the technical problem of excessive bandwidth pressure caused by excessive image data under poor network conditions, resulting in the lag of cloud desktop use. Different compression rate algorithms are used according to the complexity of different images, and the compression ratio is finely adjusted to ensure that the image maintains a high clarity while effectively reducing the amount of data transmission, thereby alleviating the burden on network traffic and bandwidth, and thus improving the user experience of the cloud desktop and making it run more smoothly.
[0044] like Figure 3 FIG. 1 is a structural diagram of a remote desktop image complexity recognition device provided by an embodiment of the present invention, the device comprising:
[0045] An image acquisition unit 301 is used to acquire an image of a remote desktop in real time;
[0046] The image processing unit 302 is used to comb the image line by line, calculate the contrast and similarity between each pixel in each line of the image and the adjacent pixel according to the red component, green component and blue component color data in the RGB data of the image, and obtain the pixel score of each line according to the contrast and similarity;
[0047] The complexity identification unit 303 is used to count the attribute information of each row in the image according to the pixel score, and calculate the complexity of the image according to the attribute information, wherein the attribute information includes: the number of identical pixel pairs, the number of contrasting pixel pairs and the frequency of occurrence of each color, wherein the number of identical pixel pairs includes the number of the current pixel point that is exactly the same as all adjacent pixel points and the number that is the same as some of the adjacent pixel points, and the contrasting pixel pairs are the pixel pairs where there is a color difference between the current pixel point and the adjacent pixel points.
[0048] The device of the above embodiment is applied to the corresponding method in the above embodiment, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.
[0049] Figure 4 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 4 As shown, the electronic device may include: a processor (processor) 401, a communication interface (Communications Interface) 402, a memory (memory) 403 and a communication bus 404, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus. The processor may call the logic instructions in the memory to execute a remote desktop image complexity recognition method, the method comprising: acquiring the image of the remote desktop in real time; combing the image line by line, calculating the contrast and similarity between each pixel point and the adjacent pixel point in each line of the image according to the red component, green component and blue component color data in the RGB data of the image, and obtaining the pixel score of each line according to the contrast and similarity; counting the attribute information of each line in the image according to the pixel score, and calculating the complexity of the image according to the attribute information, the attribute information comprising: the number of identical pixel pairs, the number of contrasting pixel pairs and the frequency of occurrence of each color, the number of identical pixel pairs including the number of the current pixel point and all adjacent pixel points are exactly the same and the number of the current pixel point and the number of the adjacent pixel points are the same, and the contrasting pixel pair is the pixel pair with the current pixel point and the adjacent pixel point having a color difference.
[0050] The processor can call the logic instructions in the memory to execute an image processing method for a remote desktop image screen, the method comprising: acquiring the image of the remote desktop in real time; combing the image line by line, calculating the contrast and similarity between each pixel in each line of the image and the adjacent pixel according to the red component, green component and blue component color data in the RGB data of the image, and obtaining the pixel score of each line according to the contrast and similarity; counting the attribute information of each line in the image according to the pixel score, and calculating the complexity of the image according to the attribute information, the attribute information comprising: the number of identical pixel pairs, the number of contrasting pixel pairs and the frequency of occurrence of each color, the number of identical pixel pairs comprising the number of the current pixel point that is exactly the same as all adjacent pixel points and the number that is the same as some of the adjacent pixel points, the contrasting pixel pairs being the pixel pairs in which the current pixel point has a color difference with the adjacent pixel points; selecting a compression method corresponding to the complexity to compress the image, and transmitting it to the client for display.
[0051] In addition, the logic instructions in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0052] On the other hand, an embodiment of the present invention further provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute a remote desktop image screen complexity recognition method provided by the above-mentioned method embodiments, the method including: acquiring an image of the remote desktop in real time; combing the image line by line, calculating the contrast and similarity between each pixel in each row of the image and adjacent pixels based on the red component, green component, and blue component color data in the RGB data of the image, and obtaining a pixel score for each row based on the contrast and similarity; counting attribute information of each row in the image based on the pixel score, and calculating the complexity of the image based on the attribute information, the attribute information including: the number of identical pixel pairs, the number of contrast pixel pairs, and the frequency of occurrence of each color, the number of identical pixel pairs including the number of current pixel pairs that are exactly the same as all adjacent pixel pairs and the number that is the same as some of the adjacent pixel pairs, and the contrast pixel pairs are pixel pairs in which there is a color difference between the current pixel and the adjacent pixel points.
[0053] Alternatively, the computer can execute an image processing method for a remote desktop image provided by the above-mentioned method embodiments, the method comprising: acquiring an image of the remote desktop in real time; combing the image row by row, calculating the contrast and similarity between each pixel in each row of the image and adjacent pixels according to the red component, green component, and blue component color data in the RGB data of the image, and obtaining a pixel score for each row according to the contrast and similarity; counting attribute information of each row in the image according to the pixel score, and calculating the complexity of the image according to the attribute information, the attribute information comprising: the number of identical pixel pairs, the number of contrasting pixel pairs, and the frequency of occurrence of each color, the number of identical pixel pairs comprising the number of the current pixel that is exactly the same as all adjacent pixels and the number that is the same as some of the adjacent pixels, the contrasting pixel pairs being pixel pairs in which the current pixel has a color difference with adjacent pixels; selecting a compression method corresponding to the complexity to compress the image, and transmitting it to the client for display.
[0054] On the other hand, an embodiment of the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, a remote desktop image screen complexity recognition method provided by the above embodiments is implemented, the method comprising: acquiring an image of the remote desktop in real time; combing the image row by row, calculating the contrast and similarity between each pixel in each row of the image and adjacent pixels based on the red component, green component, and blue component color data in the RGB data of the image, and obtaining a pixel score for each row based on the contrast and similarity; counting attribute information of each row in the image based on the pixel score, and calculating the complexity of the image based on the attribute information, the attribute information comprising: the number of identical pixel pairs, the number of contrast pixel pairs, and the frequency of occurrence of each color, the number of identical pixel pairs comprising the number of current pixel pairs that are exactly the same as all adjacent pixel pairs and the number that is the same as some of the adjacent pixel pairs, and the contrast pixel pairs are pixel pairs where there is a color difference between the current pixel and adjacent pixels.
[0055] Or when the computer program is executed by the processor, an image processing method for a remote desktop image screen provided by the above embodiments is implemented, the method comprising: acquiring an image of the remote desktop in real time; combing the image row by row, calculating the contrast and similarity between each pixel in each row of the image and adjacent pixels according to the red component, green component, and blue component color data in the RGB data of the image, and obtaining a pixel score for each row according to the contrast and similarity; counting attribute information of each row in the image according to the pixel score, and calculating the complexity of the image according to the attribute information, the attribute information comprising: the number of identical pixel pairs, the number of contrasting pixel pairs, and the frequency of occurrence of each color, the number of identical pixel pairs comprising the number of the current pixel that is exactly the same as all adjacent pixels and the number that is the same as some of the adjacent pixels, the contrasting pixel pairs being pixel pairs in which the current pixel has a color difference with adjacent pixels; selecting a compression method corresponding to the complexity to compress the image, and transmitting it to the client for display.
[0056] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0057] The above is only a partial implementation of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A remote desktop image complexity recognition method, characterized in that: The method comprises: Get images of remote desktop in real time; Combing the image row by row, calculating the contrast and similarity between each pixel in each row of the image and adjacent pixels according to the red component, green component, and blue component color data in the RGB data of the image, and obtaining a pixel score for each row according to the contrast and the similarity; According to the pixel scores, attribute information of each row in the image is counted, and the complexity of the image is calculated based on the attribute information, wherein the attribute information includes: the number of identical pixel pairs, the number of contrasting pixel pairs, and the frequency of occurrence of each color, the number of identical pixel pairs includes the number of the current pixel point that is exactly the same as all adjacent pixel points and the number that is the same as some of the adjacent pixel points, and the contrasting pixel pairs are pixel pairs where there is a color difference between the current pixel point and the adjacent pixel points.
2. The method according to claim 1, characterized in that The obtaining of the pixel score of each row according to the comparison degree and the similarity comprises: The pixel score of each pixel point in each row is obtained based on the preset relationship according to the comparison degree and the similarity, wherein the preset relationship is a corresponding relationship between the preset pixel score and each comparison degree and similarity.
3. The method according to claim 1, characterized in that The calculating attribute information of each row in the image according to the pixel score includes: For each row in the image, traverse each pixel in each row, compare the pixel scores of the current pixel with those of adjacent pixels, and count the attribute information of each row in the image according to the comparison result.
4. The method according to claim 1, characterized in that The calculating the complexity of the image according to the attribute information includes: Calculate the correlation ratio of the image based on the number of identical pixel pairs, the number of contrasting pixel pairs and the frequency of occurrence of each color in each row of the image; The complexity of the image is determined based on the correlation ratio.
5. The method according to claim 4, characterized in that The determining the complexity of the image based on the correlation ratio comprises: Based on the size of the image region, the complexity of the image is determined according to the correlation ratio and a preset relationship between the correlation ratio and the complexity, and the complexity is one of at least two preset different complexity levels.
6. A remote desktop image complexity recognition device, characterized in that: The device comprises: An image acquisition unit, used for acquiring images of a remote desktop in real time; An image processing unit, used to comb the image line by line, calculate the contrast and similarity of each line in the image according to the RGB data in the image, and obtain a pixel score of each line according to the contrast and the similarity; A complexity identification unit is used to count the attribute information of each row in the image according to the pixel score, and calculate the complexity of the image according to the attribute information, wherein the attribute information includes: the number of identical pixel pairs, the number of contrasting pixel pairs and the frequency of occurrence of each color, the number of identical pixel pairs includes the number of current pixel points that are exactly the same as all adjacent pixel points and the number that is the same as some of the adjacent pixel points, and the contrasting pixel pairs are pixel pairs where there is a color difference between the current pixel point and the adjacent pixel points.
7. A method for processing a remote desktop image, characterized in that: The image processing method comprises: Get images of remote desktop in real time; Combing the image row by row, calculating the contrast associated with brightness and the similarity associated with pixel value of each row in the image according to RGB data in the image, and obtaining a pixel score of each row according to the contrast and the similarity; Counting attribute information of each row in the image according to the pixel score, and calculating the complexity of the image according to the attribute information, wherein the attribute information includes: the number of identical pixel pairs, the number of contrasting pixel pairs, and the frequency of occurrence of each color, wherein the number of identical pixel pairs includes the number of the current pixel point that is completely identical with all adjacent pixel points and the number of the current pixel point that is identical with some of the adjacent pixel points, and the contrasting pixel pairs are pixel pairs where the current pixel point has a color difference with the adjacent pixel points; A compression method corresponding to the complexity is selected to compress the image, and the image is transmitted to a client for display.
8. The method according to claim 7, characterized in that The selecting a compression method corresponding to the complexity to compress the image further includes: Obtain network environment conditions; A compression method is comprehensively selected according to the complexity and the network environment conditions to compress the image.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, it implements a remote desktop image complexity recognition method as described in any one of claims 1-5, or an image processing method for a remote desktop image as described in any one of claims 7-8.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements a data zero-copy rendering optimization method based on hard decoding as described in any one of claims 1-5, or an image processing method for a remote desktop image screen as described in any one of claims 7-8.
Citation Information
Cited By
Remote desktop control method and device, storage medium and computer equipment
CN121309563A