Image processing method and device, electronic equipment, and image display system

By identifying compression-allowed areas in images and generating new image data, it solves the problems of high bit rate and high processing cost in image data transmission, and achieves more efficient image transmission and processing.

CN114067008BActive Publication Date: 2024-09-10BOE TECHNOLOGY GROUP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010760138.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-31
Publication Date
2024-09-10
Estimated Expiration
2040-07-31

AI Technical Summary

Technical Problem

The existing technology has a high bit rate in image data transmission, which can easily lead to image loss, is difficult to transmit when the network quality is low, and has high image processing costs.

Method used

By identifying the compression-allowed area in the image, the regional expression information and regional pixel values ​​of the area are obtained, new image data is generated, the amount of transmitted data is reduced, and decompression is performed at the receiving end.

Benefits of technology

The bit rate of image data transmission is reduced, image loss is avoided, the transmission capability under low network quality is improved, and storage and processing resources are saved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114067008B
    Figure CN114067008B
Patent Text Reader

Abstract

The embodiments of the present disclosure provide an image processing method and device, an electronic device, and an image display system, which relate to the field of display technology and can reduce the bit rate of an image. The image processing method includes: obtaining first image data of a first image, the first image data including pixel values ​​of multiple pixels in the first image; obtaining regional expression information of the first allowed compression area when there is a first allowed compression area in the first image, the first allowed compression area including an area where multiple first pixels are located, and the difference in pixel values ​​of any two first pixels among the multiple first pixels is within a preset range; determining the regional pixel value of the first allowed compression area according to the pixel value of at least one first pixel in the first allowed compression area; generating second image data of the first image, the second image data including regional expression information and regional pixel values ​​of the first allowed compression area.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of display technology, and in particular to an image processing method and device, electronic equipment, and an image display system. Background Art

[0002] With the development of technology, electronic devices such as cameras, mobile phones or computers are becoming more and more intelligent, with more diversified functions, and the mutual transmission resources between different electronic devices are becoming more and more extensive. Summary of the invention

[0003] Embodiments of the present disclosure provide an image processing method and device, an electronic device, and an image display system, which can reduce the bit rate of an image.

[0004] To achieve the above objectives, the embodiments of the present disclosure adopt the following technical solutions:

[0005] On the one hand, an image processing method is provided. The image processing method includes: acquiring first image data of a first image; the first image data includes pixel values ​​of multiple pixels in the first image; in the case where there is a first allowed compression area in the first image, acquiring regional expression information of the first allowed compression area; the first allowed compression area includes an area where multiple first pixels are continuously distributed in the first image, and the difference between the pixel values ​​of any two first pixels in the multiple first pixels is within a preset range; determining the regional pixel value of the first allowed compression area according to the pixel value of at least one first pixel in the first allowed compression area; generating second image data of the first image; the second image data of the first image includes the regional expression information of the first allowed compression area and the regional pixel value of the first allowed compression area.

[0006] In some embodiments, when there is a first allowed compression area in the first image, obtaining the area expression information of the first allowed compression area includes: determining an initial area where at least one object in the first image is located; a figure formed by the edge of the at least one object has a first preset shape; and when there is a first allowed compression area in the initial area, obtaining the area expression information of the first allowed compression area in the initial area.

[0007] In some embodiments, the image processing method also includes: obtaining a reference pixel value; the reference pixel value is the pixel value with the largest proportion in the pixel values ​​of each pixel in the initial area; determining the first allowable compression area in the initial area; the first allowable compression area in the initial area includes a plurality of first pixels whose difference between the pixel value in the initial area and the reference pixel value is within a preset range and is continuously distributed.

[0008] In some embodiments, the first compression-allowed area has at least one closed edge, and a figure formed by each edge is in a second preset shape.

[0009] In some embodiments, before generating the second image data of the first image, the image processing method further includes: when there is a second allowed compression area in the first image, taking a sub-area surrounded by at least one edge having a second preset shape in the second allowed compression area as a first allowed compression area, and the second allowed compression area includes an area where multiple first pixels continuously distributed in the first image are located.

[0010] The region expression information of the first compression-allowed region includes a second preset shape and position information corresponding to each edge of the first compression-allowed region, and the position information is configured to represent the position of the edge based on the second preset shape of the edge.

[0011] In some embodiments, the at least one closed edge comprises an outer edge of the second compression-allowed region. The sub-region enclosed by the at least one edge having a second preset shape in the second compression-allowed region as the first compression-allowed region comprises: determining at least one inscribed figure having a second preset shape within the outer edge of the second compression-allowed region, and taking the edge of the at least one inscribed figure having the second preset shape with the largest area as the outer edge of the first compression-allowed region.

[0012] In some embodiments, the at least one closed edge also includes an inner edge of the second compression-allowed area. The sub-area enclosed by the at least one edge having the second preset shape in the second compression-allowed area as the first compression-allowed area includes: determining at least one circumscribed figure having the second preset shape outside the inner edge of the second compression-allowed area, and taking the edge with the smallest area among the at least one circumscribed figure having the second preset shape as the inner edge of the first compression-allowed area.

[0013] In some embodiments, determining the regional pixel value of the first allowed compression area based on the pixel value of at least one first pixel in the first allowed compression area includes: calculating the average pixel value of multiple first pixels in the first allowed compression area to obtain the regional pixel value of the first allowed compression area.

[0014] In some embodiments, the second image data of the first image further includes a pixel value of a second pixel in the first image, where the second pixel is a pixel in the first image that is outside the first allowed compression area.

[0015] On the other hand, an image processing method is provided. The image processing method further includes: acquiring an image sequence set, the image sequence set including N consecutive images in sequence; N is an integer greater than 1; data of a first image among the N images is first image data; the first image data includes pixel values ​​of a plurality of pixels in the first image;

[0016] The second image data of the first to N-th images are obtained in sequence; the second image data of the first image includes the regional expression information and regional pixel value of the first allowed compression area of ​​the first image; when the difference between the pixel value of each pixel in the first allowed compression area of ​​the first image and the pixel value of each corresponding pixel in the first allowed compression area of ​​the M-th image is within a preset range, the second image data of the M-th image includes the regional expression information and regional pixel value of the first allowed compression area of ​​the M-th image, and the pixel value of the second pixel in the M-th image, and the regional expression information and regional pixel value of the first allowed compression area of ​​the M-th image are respectively the regional expression information and regional pixel value of the first allowed compression area of ​​the first image; wherein, 2≤M≤N, M is an integer.

[0017] In some embodiments, each image comprises a foreground portion and a background portion; the background portion of the first image has at least one first allowed compression region;

[0018] When there is no overlapping area between the foreground portion of the Mth image and the at least one first allowed compression area, the area expression information and area pixel value of the first allowed compression area of ​​the Mth image included in the second image data of the Mth image are respectively the area expression information and area pixel value of the first allowed compression area of ​​the first image.

[0019] In some embodiments, the image processing method further includes sending the second image data to an electronic device.

[0020] In another aspect, an image processing method is provided. The image processing method comprises: acquiring second image data of an image; wherein a first compression-allowed region exists in the image, the first compression-allowed region comprises a region where a plurality of first pixels are continuously distributed in the image, and a difference between pixel values ​​of any two first pixels in the plurality of first pixels is within a preset range; the second image data of the image comprises region expression information of the first compression-allowed region and region pixel values ​​of the first compression-allowed region;

[0021] The second image data of the image is converted into the third image data of the image; the pixel value of each pixel in the third image data located within the first allowable compression area is the pixel value of the area.

[0022] In some embodiments, the image processing method further includes displaying according to the third image data.

[0023] On the other hand, an image processing device is provided. The image processing device includes an acquisition unit and a processing unit, and the processing unit is coupled to the acquisition unit. The acquisition unit is configured to acquire first image data of a first image; the first image data includes pixel values ​​of multiple pixels in the first image. The processing unit is configured to acquire regional expression information of a first allowed compression area when there is a first allowed compression area in the first image; and, based on the pixel value of at least one first pixel in the first allowed compression area, determine the regional pixel value of the first allowed compression area and generate second image data of the first image. The first allowed compression area includes an area where multiple first pixels are continuously distributed in the first image, and the difference in pixel values ​​of any two first pixels among the multiple first pixels is within a preset range; the second image data of the first image includes the regional expression information of the first allowed compression area and the regional pixel value of the first allowed compression area.

[0024] In some embodiments, the image processing device further comprises a sending unit, the sending unit is coupled to the processing unit, and the sending unit is configured to send the second image data to an electronic device.

[0025] On the other hand, an image processing device is provided. The image processing device includes an acquisition unit and a processing unit, and the processing unit is coupled to the acquisition unit. The acquisition unit is configured to acquire second image data of an image. There is a first compression-allowed area in the image, and the first compression-allowed area includes an area where a plurality of first pixels are continuously distributed in the image, and the difference between the pixel values ​​of any two first pixels in the plurality of first pixels is within a preset range; the second image data of the image includes the area expression information of the first compression-allowed area and the area pixel value of the first compression-allowed area.

[0026] The processing unit is configured to convert the second image data of the image into third image data of the image, wherein the pixel values ​​of each pixel in the third image data located within the first compression-allowed region are all the region pixel values.

[0027] In another aspect, an electronic device is provided. The electronic device includes a memory and a processor. The processor is coupled to the memory. One or more computer program instructions are stored in the memory. The processor is configured to execute the one or more computer program instructions so that the electronic device implements the image processing method described in the above embodiment.

[0028] In another aspect, an image display system is provided. The image display system includes: a first electronic device and a second electronic device. The second electronic device is coupled to the first electronic device. The first electronic device is configured to implement the image processing method described in some of the above embodiments. The second electronic device is configured to implement the image processing method described in other embodiments.

[0029] In another aspect, a computer-readable storage medium is provided. The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed on a computer, the computer implements the image processing method as described in the above embodiment.

[0030] In another aspect, a computer program product is provided, wherein the computer program product comprises computer program instructions, and when the computer program instructions are executed on a computer, the computer program instructions enable the computer to execute the image processing method as described in the above embodiment.

[0031] In another aspect, a computer program is provided. When the computer program is executed on a computer, the computer program enables the computer to execute the image processing method as described in the above embodiment.

[0032] The embodiments of the present disclosure provide an image processing method and device, an electronic device, and an image display system. Compared with the second image data obtained by encoding all the pixel values ​​of each pixel in the first allowed compression area, the second image data generated by the present disclosure has a relatively small data volume. In the process of image data transmission, the bit rate of transmitting the second image data can be reduced to avoid errors in the process of transmitting image data, resulting in image loss. At the same time, the conditions for image transmission are also reduced, so that data transmission can be performed even when the transmission network quality is low. In addition, the storage resources required by the electronic device to store the second image data and the encoding resources required in the process of encoding the first image data to obtain the second image data can be reduced, saving the cost of image processing by the electronic device. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the technical solutions in the present disclosure, the following briefly introduces the drawings required to be used in some embodiments of the present disclosure. Obviously, the drawings described below are only drawings of some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can also be obtained based on these drawings. In addition, the drawings described below can be regarded as schematic diagrams, and are not limitations on the actual size of the product involved in the embodiments of the present disclosure, the actual process of the method, the actual timing of the signal, etc.

[0034] Figure 1is a structural diagram of an image display system according to some embodiments;

[0035] Figure 2 is a structural diagram of an electronic device according to some embodiments;

[0036] Figure 3 is another structural diagram of an image display system according to some embodiments;

[0037] Figure 4 is a schematic diagram of pixels of a first image according to some embodiments;

[0038] Figure 5 is a flow chart of an image processing method according to some embodiments;

[0039] Figure 6 is another pixel schematic diagram of a first image according to some embodiments;

[0040] Figure 7 is another flow chart of an image processing method according to some embodiments;

[0041] Figure 8 is a schematic diagram of a region of a first image according to some embodiments;

[0042] Fig. 9 is another schematic diagram of pixels of a first image according to some embodiments;

[0043] Fig.10 is another regional schematic diagram of a first image according to some embodiments;

[0044] Fig.11 is another flow chart of an image processing method according to some embodiments;

[0045] Fig.12 is another regional schematic diagram of a first image according to some embodiments;

[0046] Fig.13 is another regional schematic diagram of a first image according to some embodiments;

[0047] Fig.14 is another flow chart of an image processing method according to some embodiments;

[0048] Fig.15 is a comparison diagram of the first image and the Mth image according to some embodiments;

[0049] Fig.16 is another comparison diagram of the first image and the Mth image according to some embodiments;

[0050] Fig.17is another flow chart of an image processing method according to some embodiments;

[0051] Fig.18 is a structural diagram of an image processing device according to some embodiments;

[0052] Fig.19 is another structural diagram of an image processing device according to some embodiments. DETAILED DESCRIPTION

[0053] The following will be combined with the accompanying drawings to clearly and completely describe the technical solutions in some embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments provided by the present disclosure, all other embodiments obtained by ordinary technicians in this field belong to the scope of protection of the present disclosure.

[0054] Unless the context requires otherwise, throughout the specification and claims, the term "comprise" and other forms thereof, such as the third person singular form "comprises" and the present participle form "comprising", are to be interpreted as open, inclusive, that is, "including, but not limited to". In the description of the specification, the terms "one embodiment", "some embodiments", "exemplary embodiments", "example", "specific example" or "some examples" and the like are intended to indicate that specific features, structures, materials or characteristics associated with the embodiment or example are included in at least one embodiment or example of the present disclosure. The schematic representation of the above terms does not necessarily refer to the same embodiment or example. In addition, the specific features, structures, materials or characteristics may be included in any one or more embodiments or examples in any appropriate manner.

[0055] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present disclosure, unless otherwise specified, "plurality" means two or more.

[0056] When describing some embodiments, the expressions "coupled" and "connected" and their derivatives may be used. For example, when describing some embodiments, the term "connected" may be used to indicate that two or more components are in direct physical or electrical contact with each other. For another example, when describing some embodiments, the term "coupled" may be used to indicate that two or more components are in direct physical or electrical contact. However, the term "coupled" or "communicatively coupled" may also refer to two or more components that are not in direct contact with each other, but still cooperate or interact with each other. The embodiments disclosed herein are not necessarily limited to the contents of this document.

[0057] The use of "adapted to" or "configured to" herein is meant to be open and inclusive language that does not exclude devices adapted or configured to perform additional tasks or steps.

[0058] Additionally, the use of “based on” is meant to be open and inclusive, as a process, step, calculation, or other action “based on” one or more stated conditions or values ​​may, in practice, be based on additional conditions or values ​​beyond those stated.

[0059] As used herein, "substantially," "about," or "approximately" includes the stated value and an average value that is within an acceptable range of deviation from the particular value as determined by one of ordinary skill in the art taking into account the measurements in question and the errors associated with the measurement of the particular quantity (i.e., the limitations of the measurement system).

[0060] The embodiment of the present disclosure provides an image display system 200, such as Figure 1 As shown, the image display system 200 includes a first electronic device 100A and a second electronic device 100B, which are coupled to each other.

[0061] Exemplarily, the first electronic device 100A can establish a connection with the second electronic device 100B through a wireless communication method (e.g., Wi-Fi, Bluetooth, etc.). For example, the second electronic device 100B is connected to a wireless router or a wireless access point (Access Point, AP) through a wireless communication method or a wired communication method, and the first electronic device 100A establishes a connection with the wireless router or the wireless access point through a wireless communication method, and then communicates with the second electronic device 100B. Of course, the embodiments of the present disclosure are not limited to this communication connection method. For example, the second electronic device 100B and the first electronic device 100A can also establish a connection through a wired communication method.

[0062] The first electronic device 100A and the second electronic device 100B can be applied to a variety of scenarios. For example, the first electronic device 100A can be a desktop computer, a portable computer, a network server, a personal digital assistant (PDA), a mobile phone, a tablet computer, a wireless terminal device, an embedded device, etc. The second electronic device 100B can be a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, an augmented reality (AR) / virtual reality (VR) device, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant, etc. The embodiments of the present disclosure do not impose any restrictions on the specific types of the first electronic device 100A and the second electronic device 100B.

[0063] An embodiment of the present disclosure provides an electronic device 100, such as Figure 2 As shown, the electronic device 100 includes a memory 101 and a processor 102. The memory 101 and the processor 102 are coupled.

[0064] The memory 101 stores one or more computer program instructions executable on the processor 102 .

[0065] When the processor 102 executes the computer program, the electronic device 100 implements the image processing method in the following embodiments.

[0066] Exemplarily, the processor 102 may be a processor or a general term for multiple processing elements. For example, the processor 102 may be a general-purpose central processing unit (CPU), a microprocessor, an application specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the disclosed solution, such as one or more microprocessors, or one or more field programmable gate arrays.

[0067] The memory 101 may be a memory or a collective name for a plurality of storage elements, and is used to store executable program codes, etc. For example, the memory may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.

[0068] The memory 101 is used to store computer program instructions (such as application code) for executing the solution of the present disclosure, and the execution is controlled by the processor 102. The processor 102 is used to execute the computer program instructions stored in the memory 101 to control the electronic device 100 to implement the image processing method provided by the following embodiments of the present disclosure.

[0069] In some embodiments, the first electronic device 100A and the second electronic device 100B in the above-mentioned image display system 200 can both adopt the above-mentioned electronic device 100, that is, the image display system 200 includes two electronic devices 100, and the two electronic devices 100 communicate with each other, one of the electronic devices 100 serves as the first electronic device 100A, and the other electronic device 100 serves as the second electronic device 100B.

[0070] In which, during the process of data transmission between two electronic devices 100, for example, the first electronic device 100A obtains the first image data of the first image, and processes the first image data (for example, compresses) to generate second image data, and sends the second image data to the second electronic device 100B, and the second electronic device 100B accordingly receives the second image data, processes the second image data (for example, decompresses) to obtain third image data, and the second electronic device 100B can display according to the third image data.

[0071] For example, when the electronic device 100 (i.e., the second electronic device 100B) is a display device, the display device may be a display, or a product including a display, such as a television, a computer (all-in-one or desktop), a tablet computer, a mobile phone, an electronic screen, etc. Figure 3 As shown, the electronic device 100 includes an interface circuit 103, a scaling controller (Scaler), and a display panel 104. The interface circuit 103 is coupled to the processor (i.e., the processor 102 in the electronic device 100), and the Scaler is coupled to the interface circuit 103 and the display panel 104. For example, the interface circuit 103 may adopt a VGA (Video Graphics Array, video graphics array) interface, etc., and the display panel 104 may adopt a liquid crystal display panel, etc. Among them, the interface circuit 103 is used to receive the third image data; the Scaler is used to scale (i.e., compress or stretch) the third image data so that the resolution of the scaled image data is equal to the resolution of the display panel; the display panel 104 is used to display according to the scaled image data.

[0072] The first image data includes pixel values ​​of a plurality of pixels in the first image. When the plurality of pixels are arranged in an array, the pixel values ​​of the plurality of pixels in the first image data are also arranged in an array, for example, Figure 4 As shown, a plurality of pixels (P 1-1 , P 1-2 ...P n-m ) are arranged in an array of n rows and m columns, where n and m are both positive integers, and the pixel values ​​(P 1-1 , P 1-2 ...P n-m ) are also arranged in an array.

[0073] It should be noted that, for the convenience of description, the pixel and the pixel value of the pixel in the embodiment of the present disclosure are marked with the same symbol. For example, the first row and first column pixel P 1-1 The pixel value is P 1-1 , but their meanings are completely different.

[0074] For high-quality images with large resolution and size, such as high-definition pictures, high-definition video images, or medical CT (Computed Tomography) images, the number of bytes occupied by the pixel value of each pixel is large (for example, when the pixel value is a grayscale value, a grayscale value occupies 16 bits (16 bits), that is, 2 bytes), and when the pixels in the image data are arranged in an array, the pixel values ​​of each pixel are also arranged in an array, so that the pixel value of each pixel occupies a large amount of storage resources. For ordinary images, the number of bytes occupied by the pixel values ​​of its pixels is small (for example, the grayscale value of a pixel occupies 28 Therefore, the storage resources required by electronic devices (such as computers) to store high-quality images are greater than the storage resources required to store ordinary images, resulting in an increase in the cost of storing images in electronic devices.

[0075] In the prior art, the first electronic device 100A performs image processing on the first image data. When the pixel values ​​of each pixel in the first image data are arranged in an array, the pixel values ​​of each pixel in the generated second image data are also arranged in an array. The amount of the second image data is large. When the first electronic device 100A transmits the second image data to the second electronic device 100B, the number of data bits transmitted per unit time is high, that is, the bit rate is high, which makes it easy for the image data to be lost during the data transmission process. In addition, the data processing processes of the first electronic device 100A and the second electronic device 100B are both relatively complicated, and the required processing resources are also relatively large, which increases the cost of the electronic devices performing image processing.

[0076] An embodiment of the present disclosure provides an image processing method, which can be applied to the above-mentioned electronic device 100, and can also be applied to the above-mentioned first electronic device 100A.

[0077] like Figure 5 As shown, the image processing method comprises the following steps:

[0078] S101, obtaining first image data of a first image, wherein the first image data includes pixel values ​​of a plurality of pixels in the first image.

[0079] It is understood that each pixel includes a plurality of sub-pixels (for example, the plurality of sub-pixels include a red sub-pixel, a green sub-pixel, and a blue sub-pixel), and the pixel value of the pixel may include the grayscale of each sub-pixel. Exemplarily, the data format of the pixel value may adopt an RGB data format (for example, R may represent the grayscale voltage of the red sub-pixel, G may represent the grayscale voltage of the green sub-pixel, and B may represent the grayscale voltage of the blue sub-pixel) or a YUV data format (for example, Y represents brightness, and U and V represent chromaticity).

[0080] S102: If there is a first compression-allowed region in the first image, obtain region expression information of the first compression-allowed region, wherein the first compression-allowed region includes a region where a plurality of first pixels are continuously distributed in the first image, each first pixel is one of the plurality of pixels, and a difference between pixel values ​​of any two of the plurality of first pixels is within a preset range.

[0081] For example, Figure 6 As shown, the first compression-allowed area A in the first image T is composed of the third row and third column pixels (P 3-3) is centered in an array of 3 rows and 3 columns, and the first plurality of first pixels (P 2-2 , P 2-3 , P 2-4 , P 3-2 , P 3-3 , P 3-4 , P 4-2 , P 4-3 and P 4-4 ) pixel value (P 2-2 , P 2-3 , P 2-4 , P 3-2 , P 3-3 , P 3-4 , P 4-2 , P 4-3 and P 4-4 ) are approximately equal.

[0082] Exemplarily, when the first image is a grayscale image, the pixel value of a pixel may be the grayscale value of the pixel, that is, the grayscales of the first pixels in the first allowed compression area are substantially the same.

[0083] It should be noted that the region expression information of the first allowed compression region refers to information used to determine the position and size of the first allowed compression region. Exemplarily, the region expression information of the first allowed compression region includes the shape of the first allowed compression region and the coordinates of the first pixel in the first allowed compression region. The size of the coordinates can be set according to actual conditions and is not limited here. For example, when each pixel is arranged in an array, the row and column where the pixel is located are used as the horizontal coordinate and vertical coordinate of the pixel, respectively. For example, the pixel P in the nth row and the mth column is n-m The coordinates are (n,m).

[0084] It can be understood that if the difference between the pixel value of a pixel in the first image and the pixel value of at least one neighboring pixel is within a preset range, it is considered that the pixel value of the pixel and the pixel value of at least one neighboring pixel are equal, and the area where the pixel and the at least one neighboring pixel are located is the first allowable compression area, and the multiple first pixels include the pixel and the at least one neighboring pixel. The value of the above preset range can be set according to actual conditions and is not limited here. For example, for any two first pixels among the multiple first pixels in the first allowable compression area, the pixel value of one of the two first pixels is P E1 , the pixel value of the other first pixel is P E2 , the difference between the pixel values ​​of the two first pixels is (P E1 -P E2 ) / P E1The preset range of the difference (taking the absolute value) is less than or equal to 1%. For example, the preset range may also be less than or equal to 0.5%.

[0085] It should be noted that there is at least one mutation pixel in the first allowable compression area, the pixel value of the at least one mutation pixel is significantly different from the pixel value of the first pixel in the first allowable compression area, at least one mutation pixel is discontinuous, or the area of ​​continuous distribution is small, and the influence of the pixel value of the at least one mutation pixel on the first allowable compression area can be ignored, that is, it is considered that the difference between the pixel value of the at least one mutation pixel and the pixel value of each first pixel is within a preset range.

[0086] Exemplarily, when there is a first compression-allowed region in the first image, the region expression information of the first compression-allowed region is obtained, such as Figure 7 As shown, including:

[0087] S1021: Determine an initial region where at least one object in the first image is located, wherein a figure formed by edges of the at least one object has a first preset shape.

[0088] It is understandable that the above-mentioned objects may be objects with certain contour lines, such as people, the sun, animals, plants, vehicles, houses, mountains, etc. Exemplarily, each object has at least one edge. The edge (such as the outer edge) of the object may be the contour line of the object, and the figure formed by the contour line has a first preset shape. The first preset shape may be a regular shape, for example, the first preset shape of the figure formed by the edge of the moon is approximately a circle; or, the first preset shape may be an irregular shape, for example, the edge of a person may include the edge of the head and the edge of the torso to form an irregular shape, etc. For example, Figure 8 The first image T shown has two objects, namely the sun and the house. There are three initial regions in the first image, namely the initial region B1 where the sun is located, the initial region B2 where two houses with a relatively close spacing are located, and the region B3 where a house with a relatively far distance from the two houses with a relatively close spacing is located. In addition, for the same type of objects with a relatively small spacing or no spacing (i.e., pixels are continuously distributed), the same type of objects can be divided into the same initial region or into different initial regions.

[0089] Exemplarily, the first image is compared with the model database, and when feature information of the object in the first image is approximately equal to feature information in the model database, at least one object in the first image is identified, and at this time, the initial area includes a closed area surrounded by the outer contour line of at least one object.

[0090] It should be noted that the electronic device 100 is pre-configured with the above-mentioned model database, for example, the first electronic device 100A is pre-configured with the model database. The model database contains feature information that can describe objects of multiple object types, and the feature information includes, for example, color, texture, shape, outline, and spatial relationship. The model database can describe multiple components that are expected to exist in a single object of multiple object types, and the information of the multiple components can be used as the feature information of the object. For example, if the object type is defined as "person", the multiple components that are expected to exist in a single object of the object type can be "arms", "legs", "heads" and "trunks"; if the object type is "mammal face", the multiple components that are expected to exist in a single object of the object type can be "ears", "eyes", "nose", "mouth" and "hair"; if the object type is "vehicle", the multiple components that are expected to exist in a single object of the object type can be "windshield", "rearview mirror", "headlights" and "license plates"; if the object type is "house", the multiple components that are expected to exist in a single object of the object type can be "roof", "door", "window" and "wall" and so on. The above-mentioned model database examples are merely exemplary and illustrative. The present disclosure can design various general models according to specific applications and is not limited here.

[0091] In addition, when the object in the first image is incomplete, for example, the position of the object in the first image is close to the edge of the first image, so that the object cannot be fully displayed, at this time, if the incomplete object is recognized, the initial area includes the closed area surrounded by the outer contour of the incomplete object and the edge of the first image. Figure 8 The initial area B2 in FIG. 1 is composed of the dotted line portion in the figure and the lower edge and the right edge of the first image.

[0092] Exemplarily, after determining an initial region where at least one object in the first image is located, the image processing method further includes:

[0093] S1022, obtaining a reference pixel value, wherein the reference pixel value is the pixel value with the largest proportion among the pixel values ​​of each pixel in the initial area.

[0094] For example, the initial area includes 5 pixels, and the pixel values ​​of the 5 pixels are P1, P2, P3, P3 and P3 respectively. In this way, the number of pixel value P1 among these 5 pixel values ​​is 1, accounting for (1 / 5), the number of pixel value P2 among these 5 pixel values ​​is 1, accounting for (1 / 5), and the number of pixel value P3 among these 5 pixel values ​​is 3, accounting for (3 / 5). At this time, the pixel value P3 has the largest proportion among these 5 pixel values, and the reference pixel value of the initial area is pixel value P3.

[0095] S1023: Determine a first compression-allowed region in the initial region, wherein the first compression-allowed region in the initial region includes a plurality of first pixels whose differences between pixel values ​​in the initial region and reference pixel values ​​are within a preset range and are continuously distributed.

[0096] It can be understood that, by comparing the pixel value of each pixel in the initial area with the reference pixel value, if the difference between the pixel value and the reference pixel value is within a preset range, it is considered that the pixel value of each pixel is equal to the reference pixel value, and the area where the continuously distributed pixels are located is the first allowed compression area. The preset range here is the same as the preset range mentioned above.

[0097] For example, refer to Figure 8 , compare the pixel value of each pixel in the initial area B1 with the reference pixel value in the initial area B1, and obtain the first allowed compression area A1 in the initial area B1, the difference between the pixel values ​​of multiple first pixels in the first allowed compression area A1 and the reference pixel value in the initial area B1 is within a preset range, and the pixels in the first allowed compression area A1 are continuously distributed; compare the pixel values ​​of multiple first pixels in the initial area B2 with the reference pixel value in the initial area B2, and obtain the first allowed compression area A2-1 and the first allowed compression area A2-2 in the initial area B2, the pixel values ​​of multiple first pixels in the first allowed compression area A2-1 and the first allowed compression area A2-2 are both the same as those in the initial area B2. The difference between the reference pixel values ​​of the multiple pixels in the first allowed compression area A2-1 and the reference pixel values ​​in the first allowed compression area A2-2 is within a preset range, and the multiple first pixels in the first allowed compression area A2-1 are continuously distributed, and the multiple first pixels in the first allowed compression area A2-2 are continuously distributed, but the multiple first pixels in the first allowed compression area A2-1 and the multiple first pixels in the first allowed compression area A2-2 are not continuously distributed; the pixel values ​​of the multiple first pixels in the initial area B3 are compared with the reference pixel values ​​in the initial area B3 to obtain the first allowed compression area A3 in the initial area B3, the difference between the pixel values ​​of the multiple first pixels in the first allowed compression area A3 and the reference pixel values ​​in the initial area B3 is within a preset range, and the multiple first pixels in the first allowed compression area A3 are continuously distributed.

[0098] S1024: When there is a first compression-allowed region in the initial region, obtain region expression information of the first compression-allowed region in the initial region.

[0099] For example, refer to Figure 8 , the region expression information Q of the first compression-allowed region A1 in the initial region B1 can be obtained A1 , obtain the region expression information Q of the first compression-allowed region A2-1 in the initial region B2 A2-1 and the area expression information Q of the first compression-allowed area A2-2A2-2 , obtain the region expression information Q of the first compression-allowed region A3 in the initial region B3 A3 .

[0100] S103: Determine a region pixel value of the first compression-allowed region according to a pixel value of at least one first pixel in the first compression-allowed region.

[0101] Exemplarily, a first compression-allowed region may have a region pixel value.

[0102] Exemplarily, determining the region pixel value of the first compression-allowed region according to the pixel value of at least one first pixel in the first compression-allowed region includes:

[0103] S1031. Calculate an average value of pixel values ​​of a plurality of first pixels in a first compression-allowed region to obtain a region pixel value of the first compression-allowed region.

[0104] It should be noted that the method for calculating the average value of the pixel values ​​of the plurality of pixels in the first compression-allowed region may be selected according to actual conditions, and is not limited here. For example, the pixel values ​​of some first pixels in the first compression-allowed region may be averaged to shorten the data processing time, or the pixel values ​​of all first pixels may be averaged to reduce the difference between the regional pixel value and the pixel values ​​of each first pixel.

[0105] Exemplarily, the regional pixel value of the first allowed compression area may also be the pixel value with the largest proportion in the pixel values ​​of each pixel in the first allowed compression area. For example, when the first image includes an initial area, the regional pixel value of the first allowed compression area in the initial area may be the reference pixel value of the initial area.

[0106] S104: Generate second image data of the first image, wherein the second image data of the first image includes region expression information of the first compression-allowed region and region pixel values ​​of the first compression-allowed region.

[0107] The second image data also includes a pixel value of a second pixel in the first image, and the second pixel is a pixel in the first image that is located outside the first allowed compression area.

[0108] It should be noted that the regional expression information of the first allowed compression area in the second image data, the regional pixel value of the first allowed compression area and the pixel value of the second pixel have a certain arrangement order, and the arrangement order can be set according to actual conditions. For example, the arrangement order is related to the encoding order of each pixel value in the first image data or the decoding order of each pixel value in the second image data, which is not specifically limited here. Among them, the encoding order of each pixel value in the first image data is the same as the decoding order of each pixel value in the second image data. Exemplarily, when multiple pixels are arranged in an array, the pixel values ​​of the multiple pixels are also arranged in an array. The encoding order of each pixel value in the first image data can be encoded row by row from the first row to the last row, and each row is encoded one by one from the first column to the last column, and the decoding order of each pixel value in the second image data can be decoded row by row from the first row to the last row, and each row is decoded one by one from the first column to the last column. At this time, the regional expression information of the first allowed compression area in the second image data, the regional pixel value of the first allowed compression area and the pixel value of the second pixel can be arranged row by row from the first row to the last row, and each row is arranged one by one from the first column to the last column.

[0109] For example, Fig. 9 As shown, each pixel (P 1-1 , P 1-2 ...P 5-4 , P 5-5 ) are arranged in an array of 5 rows and 5 columns. The first compression-allowed area A in the first image is composed of the 3rd row and 3rd column pixels (P 3-3 ) is the center of the array of 3 rows and 3 columns of pixels (P 2-2 , P 2-3 , P 2-4 , P 3-2 , P 3-3 , P 3-4 , P 4-2 , P 4-3 and P 4-4 ) is located in the area where the pixel value P of the first compression-allowed area A in the second image data is A And the pixel values ​​of the second pixel can be arranged row by row in the order from the first row to the last row, and each row can be arranged one by one in the order from the first column to the last column. A Only appears once (i.e., only encoded once), for example, the pixel value of the region P A The position may be located at the position of the pixel that first appears in the first compression-allowed area A in the coding order, and the subsequent coding to other pixels of the first compression-allowed area A is skipped and not coded. In this case, Fig. 9The first image T in the second image data can be P 1-1 , P 1-2 , P 1-3 , P 1-4 , P 1-5 , P 2-1 , P A , P 2-5 , P 3-1 , P 3-5 , P 4-1 , P 4-5 , P 5-1 , P 5-2 , P 5-3 , P 5-4 , P 5-5 Arranged in sequence, and the pixel P 2-2 The first time it appears, the pixel value of the area P A Place it at pixel P 2-2 At the position of 2-3 , P 2-4 , P 3-2 , P 3-3 , P 3-4 , P 4-2 , P 4-3 and P 4-4 ), all pixels are skipped and no pixel value is retained.

[0110] In addition, the information Q is expressed in the guaranteed area A And the area pixel value P A When there is a correlation between them, set the regional expression information Q according to the situation A The location of, for example, regional expression information Q A Can be located in the area pixel value P A At the position, for example, P 2-1 and P A Between (i.e. P 1-1 , P 1-2 , P 1-3 , P 1-4 , P 1-5 , P 2-1 , Q A , P A , P 2-5 , P 3-1 , P 3-5 , P 4-1 , P 4-5 , P 5-1 , P 5-2 , P 5-3 , P 5-4 , P 5-5 ) or P A and P 2-5 Between (i.e. P1-1 , P 1-2 , P 1-3 , P 1-4 , P 1-5 , P 2-1 , P A , Q A , P 2-5 , P 3-1 , P 3-5 , P 4-1 , P 4-5 , P 5-1 , P 5-2 , P 5-3 , P 5-4 , P 5-5 ) so that when reading the second image data, the region expression information Q A And the area pixel value P A can be related to each other; or, the regional expression information Q A Located at the front end of the pixel value sequence (i.e. P 1-1 before) or can be at the end of the pixel value sequence (i.e. P 5-5 After that, and in the area pixel value P A Insert a logo at the position of the region, which is used to indicate the regional expression information Q A , so that when reading the second image data, the region expression information Q A And the area pixel value P A Can be related to each other.

[0111] It should be noted that, when the pixel values ​​of each pixel in the first image data of the first image are arranged in an array, the regional pixel values ​​and the pixel values ​​of the second pixels in the second image data may not be arranged in an array.

[0112] In addition, when all pixels in the first image can be divided into the first allowed compression area, for example, the display screen of the first image is a solid color screen (such as a completely black or completely white screen), at this time, the pixels outside the first allowed compression area in the first image do not exist, that is, the second pixel is empty, and the corresponding pixel value of the second pixel in the first image is empty. Therefore, the second image data only includes the regional expression information and regional pixel values ​​of the first allowed compression area.

[0113] Exemplarily, when the pixels in the first image are arranged in an array, the difference in pixel values ​​of pixels in H rows and J columns in the first image is within a preset range (for example, all display black). If all pixels in the first allowed compression area are encoded, the data storage size Z=H×J×W / 8 of the first allowed compression area is obtained, where Z represents the byte size of the image corresponding to the first allowed compression area, H and J are both positive integers (for example, H=10, J=20), (H×J) represents the number of pixels in the first allowed compression area, H can be regarded as the height of the first allowed compression area (that is, the length of the first allowed compression area in the column direction), J can be regarded as the width of the first allowed compression area (that is, the length of the first allowed compression area in the row direction), and W represents the pixel depth (that is, the number of bits used to store pixels, which can be 8, 16 or 32, for example). The regional expression information and regional pixel values ​​of the first allowed compression area are encoded, and the size of the regional pixel value is one pixel depth. The data storage size of the first allowed compression area (for example, for the first allowed compression area composed of H rows and J columns of pixels, the shape in the regional expression information occupies 1 byte, the coordinates of two pixels occupy 2 bytes, and the regional pixel value RGB occupies 6 bytes in total) is relatively small, thereby reducing the storage size of the second image data.

[0114] In summary, the image processing method provided by the embodiment of the present disclosure obtains the regional expression information of the first allowed compression area when there is a first allowed compression area in the first image, determines the regional pixel value of the first allowed compression area according to the pixel value of at least one first pixel in the first allowed compression area, and generates the second image data including the regional expression information of the first allowed compression area and the regional pixel value of the first allowed compression area. In this case, the electronic device encodes the first image data, and represents the pixel value of each pixel in the first allowed compression area with the regional expression information and the regional pixel value. Since the data amount of the regional expression information and the regional pixel value is less than the data amount of the pixel value of each pixel in the first allowed compression area, compared with the second image data obtained by encoding all the pixel values ​​of each pixel in the first allowed compression area, the data amount of the second image data generated by the present disclosure is relatively small. In the process of image data transmission, the bit rate of transmitting the second image data can be reduced to avoid errors in the process of transmitting image data, resulting in image loss. At the same time, the conditions for image transmission are also reduced, so that data transmission can be performed even when the quality of the transmission network is low. In addition, the storage resources required by the electronic device to store the second image data and the encoding resources required in the process of encoding the first image data to obtain the second image data can be reduced, thereby saving the cost of image processing by the electronic device.

[0115] In some embodiments, the first compression-allowed region has at least one closed edge, and a figure formed by each edge is in a second preset shape.

[0116] It should be noted that the figure formed by an edge presents a second preset shape, and the type of the second preset shape is not limited. For example, the second preset shape can be a relatively simple shape including a sector, a circle, an ellipse, a triangle, a quadrilateral or a polygon, or a relatively complex shape including a wave line, a sine curve or a parabola. For example, Fig.10 In the first image T, the first compression-allowed region A has two closed edges (L A1 and L A2 ), a closed edge L A1 The figure is elliptical, and the other closed edge L A2 The shape formed is circular.

[0117] Among them, in the case where the first allowable compression area has multiple closed edges, the second preset shape of the figure formed by each edge may be the same or different. For example, the first allowable compression area has two closed edges, namely a first edge and a second edge located outside the first edge, and the second preset shape of the figure formed by the first edge and the second edge are both circular, that is, the first allowable compression area is in a circular ring shape; or, the second preset shape of the figure formed by the first edge is a quadrilateral, and the second preset shape of the figure formed by the second edge is a circle.

[0118] Before generating the second image data of the first image, as Fig.11 As shown, the image processing method also includes:

[0119] S105: If there is a second compression-allowed region in the first image, a subregion surrounded by at least one edge having a second preset shape in the second compression-allowed region is used as the first compression-allowed region, wherein the second compression-allowed region includes a region where a plurality of first pixels are continuously distributed in the first image.

[0120] Exemplarily, at least one edge having the second preset shape in the second compression-allowed region is identical to at least one edge in the first compression-allowed region, and the second compression-allowed region is identical to the first compression-allowed region.

[0121] The region expression information of the first compression-allowed region includes a second preset shape and position information corresponding to each edge of the first compression-allowed region, and the position information is configured to represent the position of the edge based on the second preset shape of the edge.

[0122] Exemplarily, at least one closed edge comprises an outer edge of the second compression-allowed region. A sub-region enclosed by at least one edge having a second preset shape in the second compression-allowed region is used as the first compression-allowed region, such as Fig.11 As shown, including:

[0123] S1051. Determine at least one inscribed figure having a second preset shape within the outer edge of the second allowable compression area, and use the edge of the inscribed figure having the second preset shape with the largest area as the outer edge of the first allowable compression area.

[0124] It can be understood that the area expression information of the first allowed compression area includes the second preset shape and position information of the outer edge of the first allowed compression area, that is, the second preset shape and position information of the largest area in at least one inscribed figure of the second allowed compression area.

[0125] For example, refer to Fig.12 In the first image T, at the outer edge L of the second compression-allowed area C C1 There is at least one inscribed figure with a second preset shape, the inscribed figure K1 with the second preset shape being a quadrilateral and the inscribed figure K2 with the second preset shape being a circle, and the area of ​​the circle is greater than the area of ​​the quadrilateral. Therefore, the edge of the inscribed figure K2 with the second preset shape being a circle serves as the outer edge L of the first allowable compression area A. A1 At this time, the area expression information of the first allowed compression area A includes the outer edge L A1 The second preset shape and position information of the inscribed figure K2 is a circle, wherein the second preset shape is a circle, and the position information is the position information of the inscribed figure K2 (for example, the coordinates of the center position of the circle and the radius of the circle, or the coordinates of the center position of the circle and the coordinates of any position on the arc). Furthermore, in the case where the second allowable compression area includes only one edge, the area enclosed by the edge of the inscribed figure K2 whose second preset shape is a circle is the first allowable compression area A. At this time, the area expression information of the first allowable compression area A is the outer edge L A1 The second preset shape and position information.

[0126] Exemplarily, at least one closed edge also includes an inner edge of the second compression-allowed area. The sub-area enclosed by at least one edge having a second preset shape in the second compression-allowed area is used as the first compression-allowed area, including:

[0127] S1052: Determine at least one circumscribed figure having a second preset shape outside the inner edge of the second allowable compression area, and use the edge of the at least one circumscribed figure having the second preset shape with the smallest area as the inner edge of the first allowable compression area.

[0128] It can be understood that the area expression information of the first allowed compression area also includes the second preset shape and position information of the inner edge of the first allowed compression area, that is, the second preset shape and position information of the smallest area in at least one circumscribed figure of the second allowed compression area.

[0129] For example, refer to Fig.13 In the first image T, at the inner edge L of the second compression-allowed area C C2 In addition, there is at least one circumscribed figure with a second preset shape, the circumscribed figure K3 with the second preset shape is a hexagon and the circumscribed figure K4 with the second preset shape is a circle, and the area of ​​the circle is smaller than the area of ​​the hexagon. Therefore, the edge of the circumscribed figure K4 with the second preset shape is used as the inner edge L of the first allowable compression area A. A2 At this time, the area expression information of the first allowed compression area A includes the inner edge L A2 The second preset shape and position information of the circumscribed figure K4 is a circle, and the position information is the position information of the circumscribed figure K4 (for example, the coordinates of the center position of the circle and the radius of the circle, or the coordinates of the center position of the circle and the coordinates of any position on the arc). A1 and inner edge L A2 In the case of A1 and inner edge L A2 The area between the first allowed compression area A includes both the outer edge L A1 The second preset shape and position information also includes an inner edge L A2 The second preset shape and position information.

[0130] Exemplarily, the position information in the region expression information of the first compression-allowed region includes coordinates of at least two pixels in the first compression-allowed region.

[0131] For example, to obtain the regional expression information of the first allowed compression area, the graphic equation database can be called according to the coordinates of multiple pixels on the outer edge of the second allowed compression area to obtain the equations of multiple inscribed graphics. The equations of the multiple inscribed graphics with the largest corresponding graphic area is the graphic equation of the outer edge of the first allowed compression area. The regional expression information of the first allowed compression area includes that the shape of the first allowed compression area is the graphic shape corresponding to the graphic equation, and the position information includes the coordinates of at least two pixels in the first allowed compression area, and the coordinates of at least two pixels satisfy the graphic equation. Similarly, according to the coordinates of multiple pixels on the inner edge of the second allowed compression area, the graphic equation database is called to obtain the equations of multiple circumscribed graphics. The equations of the multiple circumscribed graphics with the smallest corresponding graphic area is the graphic equation of the inner edge of the first allowed compression area. The regional expression information of the first allowed compression area includes that the shape of the first allowed compression area is the graphic shape corresponding to the graphic equation, and the position information includes the coordinates of at least two pixels in the first allowed compression area, and the coordinates of at least two pixels satisfy the graphic equation.

[0132] It should be noted that the electronic device 100 (such as the first electronic device 100A) is pre-configured with the above-mentioned graphic equation database, which includes mathematical expressions of various graphics. The type of graphics can be set according to actual conditions, and is not limited here. For example, the various graphics include circles, ellipses, and sectors. For graphics that do not have mathematical expressions, such as triangles or rectangles, multiple straight line equations are obtained, and the closed area formed by the multiple straight line equations is a triangle or rectangle.

[0133] For example, for the circle equation (xa) 2 +(yb) 2 =R 2 , the coordinates (x, y) of multiple pixels on the outer edge of the second allowable compression area can be substituted into the equation to obtain multiple inscribed circle equations and the corresponding coordinates (a, b) of the center and the radius R. According to the coordinates (a, b) and the radius R of the center corresponding to each inscribed circle equation, the inscribed circle equation corresponding to the circle with the largest area is obtained, and the edge of the circle represented by the inscribed circle equation can be used as the outer edge of the first allowable compression area; similarly, the coordinates (x, y) of multiple pixels on the inner edge of the second allowable compression area can be substituted into the equation to obtain multiple circumscribed circle equations and the corresponding coordinates (a, b) of the center and the radius R. According to the coordinates (a, b) and the radius R of the center corresponding to each circumscribed circle equation, the circumscribed circle equation corresponding to the circle with the largest area is obtained, and the edge of the circle represented by the circumscribed circle equation can be used as the inner edge of the first allowable compression area.

[0134] It should be noted that for a relatively simple image, such as a histogram, the shape of the first allowable compression area in the image is relatively regular, and the above-mentioned image processing method can be used for image processing. For a relatively complex image, for example, the shape of the first allowable compression area in the image is irregular (for example, the shape type cannot be obtained through the graphic equation database), the Taber self-referential formula can be used to obtain the shape of the first allowable compression area. The Taber self-referential formula is included in the graphic equation database; or, when the process of obtaining the shape of the first allowable compression area is relatively complex and the amount of calculation is large, the pixel value of each pixel in the first allowable compression area can be encoded (compressed), that is, the second image data includes the pixel value of each pixel in the first allowable compression area. In this way, the accuracy of the image of the first allowable compression area can be guaranteed and image distortion can be avoided.

[0135] Exemplarily, in the case where the second preset shape of an edge of the first compression-allowed area is the second preset shape of the first compression-allowed area, the area expression information of the first compression-allowed area can be expressed as [Shape(rectangle), X1, Y1, X2, Y2], where Shape(rectangle) indicates that the second preset shape of the first compression-allowed area is a rectangle, X1, Y1, X2 and Y2 indicate the position information of the first compression-allowed area, (X1, Y1) are the coordinates of a pixel on the edge of the first compression-allowed area, (X2, Y2) are the coordinates of another pixel on the edge of the first compression-allowed area, and these two pixels can be pixels at the two end points of the diagonal of the rectangle, respectively. In this case, if the area pixel value of the first compression-allowed area is in RGB data format, the area expression information and area pixel value of the first compression-allowed area can form an array, which is [Shape(rectangle), X1, Y1, X2, Y2, R, G, B].

[0136] It should be noted that, in the case where the first image data includes multiple first compression-allowed regions, the shapes and sizes of the multiple first compression-allowed regions may be the same or different. In the case where the shapes and sizes of the multiple first compression-allowed regions are different, for example, if the position information in the region expression information is more or more complex, the number of storage bits of the array composed of the region expression information and the region pixel value of each first compression-allowed region may be adjusted according to actual conditions. In this case, the lengths of the array composed of the region expression information and the region pixel value of each first compression-allowed region are not completely the same.

[0137] In addition, when the first allowable compression area is a non-closed figure (for example, the first allowable compression area is a straight line, a parabola or a sine curve, etc.), the pixel values ​​of multiple pixels in the first allowable compression area can also be substituted into the graphic equation database to obtain the shape of the non-closed figure, and the area expression information includes at least the coordinates of the pixels at the two endpoints of the non-closed figure (for example, the two extreme endpoints of a straight line).

[0138] In some embodiments, Figure 5 As shown, the image processing method further includes: S106, sending the second image data to the electronic device.

[0139] The embodiment of the present disclosure provides an image processing method, such as Fig.14 As shown, the image processing method includes:

[0140] S107, obtaining an image sequence set, the image sequence set including N consecutive images, where N is an integer greater than 1. The data of the first image among the N images is the first image data. The first image data includes pixel values ​​of a plurality of pixels in the first image.

[0141] It should be noted that a video may include at least one image sequence set, and a single image in the image sequence set may also be referred to as a single frame. The image sequence set may be referred to as a group of pictures. In this case, the first image data is obtained, that is, the data of the first image among the N images is obtained, and the second image data of the first image is generated according to the data of the first image among the N images.

[0142] S108, sequentially obtain the second image data of the first to Nth images, wherein the second image data of the first image includes the region expression information and the region pixel value of the first compression-allowed region of the first image.

[0143] It should be noted that the method for obtaining the second image data of the first image may refer to the above-mentioned method for generating the second image data of the first image. The first image is taken as the above-mentioned first image and will not be described in detail here.

[0144] When the difference between the pixel value of each pixel in the first compression-allowed region of the first image and the pixel value of each corresponding pixel in the first compression-allowed region of the M-th image is within a preset range, the second image data of the M-th image includes the region expression information and the region pixel value of the first compression-allowed region of the M-th image, and the pixel value of the second pixel in the M-th image, and the region expression information and the region pixel value of the first compression-allowed region of the M-th image are respectively the region expression information and the region pixel value of the first compression-allowed region of the first image. Wherein, 2≤M≤N, and M is an integer.

[0145] For example, when the pixels in N images are arranged in an array and the pixels in the first allowed compression area of ​​the first image are in an array of 3 rows and 3 columns, the pixel values ​​of the pixels in the 1st row and 1st column to the 3rd row and 3rd column in the first allowed compression area of ​​the first image are compared in sequence to see whether the difference between the pixel values ​​of the pixels in the 1st row and 1st column to the 3rd row and 3rd column in the first allowed compression area of ​​the Mth image is within a preset range (for example, the pixel values ​​of the pixels in the 1st row and 1st column in the first allowed compression area of ​​the first image and the pixel values ​​of the pixels in the 1st row and 1st column in the Mth image corresponding to the first allowed compression area are compared to see whether the difference is within a preset range). If so, the image data corresponding to the first allowed compression area in the second image data of the Mth image can be represented by the regional expression information and regional pixel value of the first allowed compression area of ​​the first image, that is, the regional expression information and regional pixel value of the first allowed compression area of ​​the Mth image are respectively the regional expression information and regional pixel value of the first allowed compression area of ​​the first image.

[0146] In this case, the regional expression information and regional pixel values ​​of the first allowable compression area of ​​the Mth image can be directly obtained based on the regional expression information and regional pixel values ​​of the first allowable compression area of ​​the first image, for example, the shape, position, grayscale, chroma and saturation and other information of the first allowable compression area of ​​the Mth image can be obtained. Therefore, there is no need to perform image processing on the first image data of images other than the first image in the N images in sequence, which can shorten the image processing time and improve the efficiency of image processing.

[0147] In some embodiments, each image comprises a foreground portion and a background portion. The background portion of the first image comprises at least one first allowed compression region.

[0148] It should be noted that the foreground part of an image is a relatively moving part in an image sequence set, and the background part is a relatively stationary part in an image sequence set. For example, the foreground part may include a person, an animal, or a car, and the background part may include the earth, a building, or the sky, etc. Among them, the background part in each image of an image sequence set can be considered to be roughly the same and the position will not move, while the position of the foreground part in each image will move.

[0149] When the foreground part of the Mth image has no overlapping area with at least one first allowed compression area, the area expression information and area pixel value of the first allowed compression area of ​​the Mth image included in the second image data of the Mth image are respectively the area expression information and area pixel value of the first allowed compression area of ​​the first image.

[0150] For example, Fig.15 As shown, when there is no overlapping area between the foreground part D(M) of the Mth image and at least one first allowed compression area A(1) in the background part S(1) of the first image, since the background part S(M) of the Mth image is substantially the same as the background part S(1) of the first image, there is no overlapping area between the foreground part D(M) of the Mth image and at least one first allowed compression area A(M) in the background part S(M) of the Mth image. At this time, the first allowed compression area A(M) in the Mth image is the same as the first allowed compression area A(1) of the first image. In this way, the region expression information and region pixel value of the first allowed compression area A(M) of the Mth image can be respectively the region expression information and region pixel value of the first allowed compression area A(1) of the first image. Furthermore, the pixel value of the second pixel in the Mth image in the second image data is the pixel value of the pixel in the foreground part D(M) of the Mth image and the pixel value of the pixel in the background part S(M) of the Mth image that is located outside the first allowed compression area.

[0151] In the case where the foreground portion D(M) of the M-th image overlaps with at least one first compression-allowed region A(1) in the background portion S(1) of the first image, that is, in the case where the foreground portion D(M) of the M-th image overlaps with at least one first compression-allowed region A(M) in the background portion S(M) of the M-th image, as Figure 6 As shown, the overlapping area between the foreground part D(M) of the Mth image and the first allowable compression area A(M) is F(M). After the foreground part D(M) of the Mth image moves relative to the foreground part D(1) of the first image, the moved-out area in the area where the foreground part D(1) of the first image is located and does not overlap with the foreground part D(M) of the Mth image is E(M). At this time, the second image data of the Mth image may include the regional expression information and regional pixel values ​​of the first allowable compression area A(1) of the first image, the pixel values ​​of each pixel in the foreground part D(M) of the Mth image, the pixel values ​​of the pixels in the moved-out area E(M), and the pixel values ​​of the pixels in the remaining area of ​​the Mth image.

[0152] In this case, in the process of displaying according to the second image data of the Mth image, for the overlapping area F(M) in the first compression-allowed area and the foreground part of the Mth image, the pixel values ​​of the pixels in the overlapping area F(M) are replaced from the regional pixel values ​​of the first compression-allowed area to the pixel values ​​of the pixels in the foreground part of the Mth image, so that the pixels in the overlapping area F(M) can be displayed according to the pixel values ​​of the pixels corresponding to the foreground part of the Mth image, ensuring that the image of the foreground part can be displayed correctly. In addition, each pixel in the removed area E(M) is displayed according to its own pixel value, and each pixel in the first compression-allowed area except the overlapping area is displayed according to the regional pixel value.

[0153] In some embodiments, Fig.14 As shown, the image processing method also includes:

[0154] S109: Send the second image data to the electronic device.

[0155] For example, the first electronic device 100A sends the second image data to the second electronic device 100B. When the second electronic device 100B is a product with a display (such as an all-in-one computer, a notebook computer, or a mobile phone), the second electronic device 100B displays according to the second image data.

[0156] The embodiment of the present disclosure provides an image processing method, which can be applied to the above-mentioned electronic device 100, and can also be applied to the above-mentioned second electronic device 100B. Exemplarily, the electronic device 100 and the second electronic device 100B can be display devices, which are products with displays.

[0157] like Fig.17 As shown, the image processing method comprises the following steps:

[0158] S201. Acquire second image data of an image.

[0159] There is a first compression-allowed region in the image, the first compression-allowed region includes a region where a plurality of first pixels are continuously distributed in the image, each first pixel is one of a plurality of pixels, and a difference between pixel values ​​of any two of the plurality of first pixels is within a preset range. The second image data of the image includes regional expression information of the first compression-allowed region and regional pixel values ​​of the first compression-allowed region.

[0160] Exemplarily, the second image data of the image also includes a pixel value of a second pixel in the image, where the second pixel is a pixel in the image that is located outside the first allowed compression area.

[0161] S202: Convert the second image data of the image into the third image data of the image, wherein the pixel values ​​of each pixel in the third image data located within the first compression-allowed region are all regional pixel values.

[0162] It can be understood that the pixel value of each pixel in the third image data outside the first compression-allowed region is the pixel value of the corresponding second pixel in the second image data. Fig. 9 , each pixel in the image (P 1-1 , P 1-2 ...P 5-4 , P 5-5 ) is arranged in an array of 5 rows and 5 columns. The first compression-allowed area A in the image is the 3rd row and 3rd column pixel (P 3-3 ) is the center of the array of 3 rows and 3 columns of pixels (P 2-2 , P 2-3 , P 2-4 , P 3-2 , P 3-3 , P 3-4 , P 4-2 , P 4-3 and P 4-4 ) is located in the area where the first compression-allowed area A in the second image data is expressed as area expression information Q A And the area pixel value P A And the pixel values ​​of each second pixel are arranged in the order of row-by-row scanning, that is, P 1-1 , P 1-2 , P 1-3 , P 1-4 , P 1-5 , P 2-1 , Q A, P A , P 2-5 , P 3-1 , P 3-5 , P 4-1 , P 4-5 , P 5-1 , P 5-2 , P 5-3 , P 5-4 , P 5-5 At this time, the second image data is converted, and the obtained third image data can be P 1-1 , P 1-2 , P 1-3 , P 1-4 , P 1-5 , P 2-1 , P A , P A , P A , P 2-5 , P 3-1 , P A , P A , P A , P 3-5 , P 4-1 , P A , P A , P A , P 4-5 , P 5-1 , P 5-2 , P 5-3 , P 5-4 , P 5-5 .

[0163] It should be noted that the process of obtaining the second image data according to the first image data can be regarded as compressing the first image data, and the process of obtaining the third image data according to the second image data can be regarded as decompressing the second image data.

[0164] Exemplarily, when the region expression information of the first allowed compression region in the second image data includes the second preset shape and position information corresponding to each edge of the first allowed compression region, the position and size of the first allowed compression region can be obtained according to the second preset shape and position information. According to the second preset shape, in combination with the graphic equation database, the equation corresponding to the second preset shape is obtained, and when the position information includes the coordinates of at least two pixels in the first allowed compression region, the position and size of the edge (e.g., outer edge or inner edge) having the second preset shape in the first allowed compression region is obtained. For example, the area expression information and area pixel values ​​of the first allowed compression area mentioned above can constitute an array of [Shape(rectangle),X1,Y1,X2,Y2,R,G,B]. According to the second preset shape of the first allowed compression area being a rectangle, combined with the graphic equation database, the equation of the rectangle is obtained, and according to the pixel coordinates (X1,Y1) and (X2,Y2) at the two end points of the diagonal of the rectangle, the position and size of the edge of the rectangle are obtained, that is, the position of each pixel in the first allowed compression area is obtained. For example, when a plurality of pixels are arranged in an array, the pixel coordinates (X1,Y1) and (X2,Y2) at the two end points of the diagonal of the rectangle are (2,2) and (4,4), respectively (that is, the pixels at the two end points of the diagonal of the rectangle are the 2nd row and 2nd column pixels and the 4th row and 4th column pixels, respectively). At this time, the pixels in the first allowed compression area are the 2nd to 4th columns of the pixels in the 2nd to 4th rows. In this case, the pixel values ​​of each pixel in the first compression-allowed region are RGB, where R represents the grayscale voltage of the red sub-pixel, G represents the grayscale voltage of the green sub-pixel, and B represents the grayscale voltage of the blue sub-pixel.

[0165] It should be noted that the electronic device 100 (such as the second electronic device 100B) is pre-configured with the above-mentioned graphic equation database, which includes mathematical expressions of various graphics, and the types of graphics can be set according to actual conditions, which are not limited here. For example, the various graphics include circles, ellipses, and sectors. Among them, the graphic equation databases of the first electronic device 100A and the second electronic device 100B are the same.

[0166] In some embodiments, Fig.17 As shown, the image processing method also includes:

[0167] S203: Display according to the third image data.

[0168] It can be understood that the pixels within the first allowed compression area are all displayed according to the regional pixel value. For example, according to the voltage R of the red sub-pixel, the grayscale voltage G of the green sub-pixel and the grayscale voltage B of the blue sub-pixel in each pixel within the first allowed compression area, the grayscale corresponding to the red sub-pixel, the green sub-pixel and the blue sub-pixel in each pixel within the first allowed compression area is obtained and displayed; each pixel outside the first allowed compression area is displayed according to its own pixel value, that is, the grayscale corresponding to the pixel value of each pixel is displayed.

[0169] Since the difference between the pixel values ​​of any two first pixels in the first allowed compression area is within a preset range, the difference between the regional pixel value and the pixel value of each pixel in the first image data is small. During the display process, when the pixel value of each pixel in the first allowed compression area is the pixel value of the display area, the distortion of the displayed image is relatively weak.

[0170] The embodiment of the present disclosure provides an image processing device 300A, such as Fig.18 As shown, the image processing device 300A includes an acquisition unit 301A and a processing unit 302A. The processing unit 302A is coupled to the acquisition unit 301.

[0171] The acquisition unit 301A is configured to acquire first image data of a first image, where the first image data includes pixel values ​​of a plurality of pixels in the first image.

[0172] The processing unit 302A is configured to obtain regional expression information of the first allowed compression area when there is a first allowed compression area in the first image; and, based on the pixel value of at least one first pixel in the first allowed compression area, determine the regional pixel value of the first allowed compression area and generate second image data of the first image.

[0173] The first allowed compression area includes an area where a plurality of first pixels are continuously distributed in the first image, and the difference between the pixel values ​​of any two of the plurality of first pixels is within a preset range. The second image data of the first image includes the regional expression information of the first allowed compression area and the regional pixel value of the first allowed compression area. Exemplarily, the second image data of the first image also includes the pixel value of a second pixel in the first image, and the second pixel is a pixel in the first image that is located outside the first allowed compression area.

[0174] In some embodiments, the acquisition unit 301A is further configured to acquire an image sequence set. The image sequence set includes N consecutive images; N is an integer greater than 1; the data of the first image in the N images is the first image data; the first image data includes pixel values ​​of multiple pixels in the first image.

[0175] The processing unit 302A is also configured to sequentially obtain the second image data of the first to N-th images. The second image data of the first image includes the regional expression information and regional pixel value of the first allowed compression area of ​​the first image. When the difference between the pixel value of each pixel in the first allowed compression area of ​​the first image and the pixel value of any two first pixels in the corresponding pixels in the first allowed compression area of ​​the M-th image is within a preset range, the second image data of the M-th image includes the regional expression information and regional pixel value of the first allowed compression area of ​​the M-th image, and the pixel value of the second pixel in the M-th image, and the regional expression information and regional pixel value of the first allowed compression area of ​​the M-th image are respectively the regional expression information and regional pixel value of the first allowed compression area of ​​the first image. 2≤M≤N, M is an integer.

[0176] In some embodiments, Fig.18 As shown, the image processing apparatus 300A further includes a sending unit 303A. The sending unit 303A is coupled to the processing unit 302A. The sending unit 303A is configured to send the second image data to the electronic device 100 (eg, the second electronic device 100B described above).

[0177] It should be noted that the above-mentioned image processing device has the same beneficial effects as some of the above-mentioned image processing methods, which will not be described in detail here.

[0178] The embodiment of the present disclosure provides an image processing device 300B, such as Fig.19 As shown, the image processing device 300B includes an acquisition unit 301B and a processing unit 302B. The processing unit 302B is coupled to the acquisition unit 301B.

[0179] The acquisition unit 301B is configured to acquire second image data of an image. There is a first compression-allowed area in the image, and the first compression-allowed area includes an area where a plurality of first pixels are continuously distributed in the image, and the difference between the pixel values ​​of any two of the plurality of first pixels is within a preset range. The second image data of the image includes the regional expression information of the first compression-allowed area and the regional pixel value of the first compression-allowed area. Exemplarily, the second image data of the image also includes the pixel value of a second pixel in the image, and the second pixel is a pixel in the image that is located outside the first compression-allowed area.

[0180] The processing unit 302B is configured to convert the second image data of the image into the third image data of the image, wherein the pixel values ​​of each pixel in the third image data located within the first compression-allowed region are all regional pixel values.

[0181] It should be noted that the above-mentioned image processing device has the same beneficial effects as some of the above-mentioned image processing methods, which will not be described in detail here.

[0182] Fig.18 and Fig.19 The device embodiments described are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. The functional units in the various embodiments of the present application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into one module. Fig.18 and Fig.19 The above-mentioned units can be implemented in the form of hardware or software functional units. For example, when implemented in software, the above-mentioned acquisition unit 301 and processing unit 302 can be implemented by software functional modules generated by at least one processor after reading the program code stored in the memory. Fig.18 and Fig.19 The above-mentioned units can also be implemented by different hardware in the computer (display device), for example, the processing unit 302 is implemented by a part of the processing resources in at least one processor (for example, one core or two cores in a multi-core processor), and the acquisition unit 301 is implemented by the remaining processing resources in at least one processor (for example, other cores in a multi-core processor). For example, it is implemented in the form of hardware. For example, the above-mentioned image processing device 300 can be a programmable device, such as a hardware programmable device, such as FPGA (Field Programmable Gate Array). The above-mentioned functional units can also be implemented in a combination of software and hardware. For example, the acquisition unit 301 and the processing unit 302 are software functional modules generated by the CPU after reading the program code stored in the memory.

[0183] Fig.18 and Fig.19 For more details on how the acquisition unit 301 and the processing unit 302 implement the above functions, please refer to the descriptions in the previous method embodiments, which will not be repeated here.

[0184] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.

[0185] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using a software program, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instruction is loaded and executed on a computer, the process or function in accordance with the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instruction can be stored in a computer-readable storage medium. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or a data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a magnetic disk, a tape), an optical medium (e.g., a digital video disc (digital video disc, DVD)), or a semiconductor medium (e.g., a solid-state drive (solid state drives, SSD)), etc.

[0186] Some embodiments of the present disclosure provide a computer-readable storage medium (e.g., a non-transitory computer-readable storage medium), which stores computer program instructions. When the computer program instructions are executed on a computer, the computer executes one or more steps of the image processing method described in the above embodiments.

[0187] Exemplarily, the above-mentioned computer-readable storage media may include, but are not limited to: magnetic storage devices (e.g., hard disks, floppy disks or magnetic tapes, etc.), optical disks (e.g., CDs (Compact Disks), DVDs (Digital Versatile Disks), etc.), smart cards and flash memory devices (e.g., EPROMs (Erasable Programmable Read-Only Memory), cards, sticks or key drives, etc.). The various computer-readable storage media described in the present disclosure may represent one or more devices and / or other machine-readable storage media for storing information. The term "machine-readable storage medium" may include, but is not limited to, wireless channels and various other media capable of storing, containing and / or carrying instructions and / or data.

[0188] Some embodiments of the present disclosure further provide a computer program product, which includes computer program instructions, and when the computer program instructions are executed on a computer, the computer program instructions cause the computer to execute one or more steps in the image processing method described in the above embodiments.

[0189] Some embodiments of the present disclosure further provide a computer program. When the computer program is executed on a computer, the computer program enables the computer to execute one or more steps of the image processing method described in the above embodiments.

[0190] The beneficial effects of the above-mentioned computer-readable storage medium, computer program product and computer program are the same as the beneficial effects of the image processing methods described in some of the above-mentioned embodiments, and will not be repeated here.

[0191] The above is only a specific embodiment of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any changes or substitutions that can be thought of by any person skilled in the art within the technical scope disclosed in the present disclosure should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.

Claims

1. An image processing method, characterized in that: include: Acquire first image data of a first image; The first image data includes pixel values ​​of a plurality of pixels in the first image; In the case where there is a first compression-allowed region in the first image, obtaining region expression information of the first compression-allowed region; the first compression-allowed region includes a region where a plurality of first pixels are continuously distributed in the first image, and a difference between pixel values ​​of any two of the plurality of first pixels is within a preset range; the first compression-allowed region has at least one closed edge, and a figure formed by each edge presents a second preset shape; Determining a region pixel value of the first compression-allowed region according to a pixel value of at least one first pixel in the first compression-allowed region; Generate second image data of the first image; the second image data of the first image includes the region expression information of the first compression-allowed region and the region pixel value of the first compression-allowed region; Before generating the second image data of the first image, the image processing method further includes: In the case where there is a second compression-allowed region in the first image, a subregion surrounded by at least one edge having a second preset shape in the second compression-allowed region is used as the first compression-allowed region, and the second compression-allowed region includes a region where a plurality of first pixels continuously distributed in the first image are located; The region expression information of the first compression-allowed region includes a second preset shape and position information corresponding to each edge of the first compression-allowed region, and the position information is configured to represent the position of the edge based on the second preset shape of the edge.

2. The image processing method according to claim 1, characterized in that: The step of obtaining, when there is a first compression-allowed region in the first image, region expression information of the first compression-allowed region includes: Determine an initial region where at least one object in the first image is located; a figure formed by edges of the at least one object has a first preset shape; In the case that the first compression-allowed region exists in the initial region, region expression information of the first compression-allowed region in the initial region is acquired.

3. The image processing method according to claim 2, characterized in that: Also includes: Get reference pixel value; The reference pixel value is the pixel value with the largest proportion among the pixel values ​​of each pixel in the initial area; determining a first permissible compression region in the initial region; The first compression-allowed region in the initial region includes a plurality of first pixels whose differences between pixel values ​​in the initial region and the reference pixel values ​​are within a preset range and are continuously distributed.

4. The image processing method according to claim 1, characterized in that: The at least one closed edge comprises an outer edge of the second compression-permitting region; The method of using a sub-region surrounded by at least one edge having a second preset shape in the second compression-allowed region as the first compression-allowed region comprises: At least one inscribed figure with a second preset shape is determined within the outer edge of the second allowable compression area, and the edge of the inscribed figure with the largest area among the at least one inscribed figure with the second preset shape is used as the outer edge of the first allowable compression area.

5. The image processing method according to claim 1, characterized in that: The at least one closed edge also includes an inner edge of the second compression-allowed area; the sub-area enclosed by the at least one edge having a second preset shape in the second compression-allowed area as the first compression-allowed area includes: At least one circumscribed figure with a second preset shape is determined outside the inner edge of the second allowable compression area, and the edge of the circumscribed figure with the smallest area among the at least one circumscribed figure with the second preset shape is used as the inner edge of the first allowable compression area.

6. The image processing method according to claim 1, characterized in that: The step of determining the region pixel value of the first compression-allowed region according to the pixel value of at least one first pixel in the first compression-allowed region comprises: An average value of pixel values ​​of a plurality of first pixels in the first compression-allowed area is calculated to obtain an area pixel value of the first compression-allowed area.

7. The image processing method according to any one of claims 1 to 6, characterized in that: The second image data of the first image further includes a pixel value of a second pixel in the first image, where the second pixel is a pixel in the first image that is outside the first compression-allowed region.

8. An image processing method, characterized in that: include: Acquire an image sequence set, wherein the image sequence set includes N consecutive images; N is an integer greater than 1; data of a first image among the N images is first image data; the first image data includes pixel values ​​of a plurality of pixels in the first image; Sequentially obtain second image data of the first to Nth images; the second image data of the first image includes region expression information and region pixel values ​​of a first allowable compression region of the first image; The first compression-allowed area has at least one closed edge, and the figure formed by each edge is in a second preset shape; In the case where there is a second compression-allowed region in the first image, a subregion surrounded by at least one edge having a second preset shape in the second compression-allowed region is used as the first compression-allowed region, and the second compression-allowed region includes a region where a plurality of first pixels continuously distributed in the first image are located; The region expression information of the first compression-allowed region includes a second preset shape and position information corresponding to each edge of the first compression-allowed region, wherein the position information is configured to represent the position of the edge based on the second preset shape of the edge; In the case where the difference between the pixel value of each pixel in the first compression-allowed area of ​​the first image and the pixel value of each corresponding pixel in the first compression-allowed area of ​​the M-th image is within a preset range, the second image data of the M-th image includes the region expression information and the region pixel value of the first compression-allowed area of ​​the M-th image, and the pixel value of the second pixel in the M-th image, and the region expression information and the region pixel value of the first compression-allowed area of ​​the M-th image are respectively the region expression information and the region pixel value of the first compression-allowed area of ​​the first image; Wherein, 2≤M≤N, and M is an integer.

9. The image processing method according to claim 8, characterized in that: Each image comprises a foreground portion and a background portion; the background portion of the first image has at least one first allowed compression area; When there is no overlapping area between the foreground portion of the Mth image and the at least one first allowed compression area, the area expression information and area pixel value of the first allowed compression area of ​​the Mth image included in the second image data of the Mth image are respectively the area expression information and area pixel value of the first allowed compression area of ​​the first image.

10. The image processing method according to claim 8, characterized in that: Also includes: The second image data is sent to an electronic device.

11. An image processing method, characterized in that: include: Acquire second image data of a first image; wherein a first compression-allowed area exists in the first image, the first compression-allowed area includes an area where a plurality of first pixels are continuously distributed in the first image, and a difference between pixel values ​​of any two of the plurality of first pixels is within a preset range; the second image data of the first image includes regional expression information of the first compression-allowed area and regional pixel values ​​of the first compression-allowed area; the first compression-allowed area has at least one closed edge, and a figure formed by each edge presents a second preset shape; In the case where there is a second compression-allowed region in the first image, a subregion surrounded by at least one edge having a second preset shape in the second compression-allowed region is used as the first compression-allowed region, and the second compression-allowed region includes a region where a plurality of first pixels continuously distributed in the first image are located; The region expression information of the first compression-allowed region includes a second preset shape and position information corresponding to each edge of the first compression-allowed region, wherein the position information is configured to represent the position of the edge based on the second preset shape of the edge; The second image data of the first image is converted into the third image data of the first image; the pixel value of each pixel in the third image data located within the first allowable compression area is the area pixel value.

12. The image processing method according to claim 11, characterized in that: Also includes: Display is performed according to the third image data.

13. An image processing device, characterized in that: include: an acquisition unit, configured to acquire first image data of a first image; The first image data includes pixel values ​​of a plurality of pixels in the first image; A processing unit coupled to the acquisition unit; the processing unit is configured to, when there is a first compression-allowed area in the first image, acquire the area expression information of the first compression-allowed area; and, according to the pixel value of at least one first pixel in the first compression-allowed area, determining the regional pixel value of the first compression-allowed area, and generating the second image data of the first image; the first compression-allowed area has at least one closed edge, and the figure formed by each edge presents a second preset shape; wherein the first compression-allowed area includes the area where a plurality of first pixels are continuously distributed in the first image, and the difference between the pixel values ​​of any two first pixels of the plurality of first pixels is within a preset range; the second image data of the first image includes the regional expression information of the first compression-allowed area and the regional pixel value of the first compression-allowed area; The processing unit is further configured to: when there is a second compression-allowed area in the first image, use a sub-area surrounded by at least one edge having a second preset shape in the second compression-allowed area as the first compression-allowed area, wherein the second compression-allowed area includes an area where a plurality of first pixels continuously distributed in the first image are located; The region expression information of the first compression-allowed region includes a second preset shape and position information corresponding to each edge of the first compression-allowed region, and the position information is configured to represent the position of the edge based on the second preset shape of the edge.

14. The image processing device according to claim 13, characterized in that: Also includes: A sending unit is coupled to the processing unit; the sending unit is configured to send the second image data to an electronic device.

15. An image processing device, characterized in that: include: The acquisition unit is configured to acquire second image data of a first image; wherein a first compression-allowed area exists in the first image, the first compression-allowed area includes an area where a plurality of first pixels are continuously distributed in the first image, and a difference between pixel values ​​of any two of the plurality of first pixels is within a preset range; the second image data of the first image includes area expression information of the first compression-allowed area and area pixel values ​​of the first compression-allowed area; the first compression-allowed area has at least one closed edge, and a figure formed by each edge presents a second preset shape; a processing unit configured to, when there is a second compression-allowed area in the first image, use a sub-area surrounded by at least one edge having a second preset shape in the second compression-allowed area as the first compression-allowed area, wherein the second compression-allowed area includes an area where a plurality of first pixels continuously distributed in the first image are located; The region expression information of the first compression-allowed region includes a second preset shape and position information corresponding to each edge of the first compression-allowed region, wherein the position information is configured to represent the position of the edge based on the second preset shape of the edge; A processing unit is coupled to the acquisition unit; the processing unit is also configured to convert the second image data of the first image into the third image data of the first image; wherein the pixel values ​​of each pixel in the third image data located within the first allowable compression area are all the area pixel values.

16. An electronic device, characterized in that: include: Memory; The memory stores one or more computer program instructions; processor; The processor is coupled to the memory; The processor is configured to execute the one or more computer program instructions so that the electronic device implements the image processing method as described in any one of claims 1 to 7; and / or, the image processing method as described in any one of claims 8 to 10; and / or, the image processing method as described in claim 11 or 12.

17. An image display system, characterized in that: include: A first electronic device, configured to implement the image processing method according to any one of claims 1 to 7; And / or, the image processing method according to any one of claims 8 to 10; A second electronic device is coupled to the first electronic device; the second electronic device is configured to implement the image processing method as claimed in claim 11 or 12.

18. A computer-readable storage medium, characterized in that: It stores computer program instructions, wherein when the computer is running, the computer implements the image processing method as described in any one of claims 1 to 7; or, implements the image processing method as described in any one of claims 8 to 10; or, implements the image processing method as described in claim 11 or 12.