Image compression processing method and device, equipment and storage medium
By dividing image areas and setting different sampling rates and compression rates, the image is sampled and compressed, and the problem of poor image compression rate and quality in the prior art is solved, and efficient image compression and storage is achieved.
Patent Information
- Application Number
- CN202311246202.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-25
- Publication Date
- 2025-03-25
AI Technical Summary
The existing technology has shortcomings in taking into account both image compression rate and image quality. Improving SRAM storage space will increase chip area, power consumption and cost, and reducing image resolution will affect product effect. The fixed compression rate solution cannot achieve the product target compression rate.
By acquiring the initial image and gaze point information, the images are divided into a first image area and a second image area, and different sampling rates and compression rates are set according to the gaze point information, each area is sampled and compressed to obtain a target compressed image.
While ensuring image quality, the size of the compressed image is reduced, storage resources are saved, and the efficiency and effect of image compression processing are improved.
Smart Images

Figure CN119697373A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer vision, and more specifically, to a method, apparatus, device and storage medium for image compression processing. Background Art
[0002] With the development of computer technology and display technology, electronic devices based on augmented reality (AR), virtual reality (VR), mixed reality (MR), and extended reality (XR) have higher and higher requirements for display clarity, and the amount of information of images output by electronic devices is also increasing. The images of electronic devices are processed by image processors (ISP), and then the processed image data is transmitted to the data processing unit (DPU) through static random access memory (SRAM). Due to the influence of the transmission frame rate and image format of the images output by electronic devices, a larger cache space is required to store intermediate image data, so a larger SRAM is required for storage.
[0003] At present, the commonly used solutions mainly include the following three: (1) increasing the storage space of SRAM; (2) reducing the resolution of the image; (3) compressing the image. However, increasing the storage space of SRAM will lead to an increase in chip area, power consumption, bandwidth, cost, etc., which will seriously affect the competitiveness of the chip; reducing the resolution of the image will also cause the final electronic product to fail to meet expectations and lose competitiveness; the fixed compression rate solution mainly used for image compression has a compression limit that is far from meeting the product target compression rate requirements.
[0004] Therefore, how to strike a balance between image compression rate and image quality is an urgent problem to be solved. Summary of the invention
[0005] Some embodiments of the present application provide methods, devices, equipment and storage media for image compression processing that can at least partially solve the above-mentioned problems existing in the prior art.
[0006] According to a first aspect of the present application, a method for image compression processing is provided, which may include: acquiring an initial image and gaze point information, and determining a first image area and a second image area of the initial image based on the gaze point information; determining a first sampling rate of the first image area and a second sampling rate of the second image area, wherein the first sampling rate is greater than the second sampling rate; sampling the first image area and the second image area based on the first sampling rate and the second sampling rate, respectively, to obtain a sampled image; determining a first compression rate and a second compression rate of the sampled image, and compressing the sampled image based on the first compression rate and the second compression rate to obtain a target compressed image.
[0007] In one embodiment of the present application, the gaze point information includes gaze point coordinates, and determining the first image area and the second image area of the initial image based on the gaze point information may include: dividing the initial image in the horizontal direction and the vertical direction based on the gaze point coordinates to obtain N*M image units; acquiring eye movement information, and determining a gaze area based on the eye movement information, wherein the gaze area includes X*Y image units, 1≤X≤N, 1≤Y≤M; determining the gaze area as the first image area, and determining other areas of the initial image as the second image area.
[0008] In one embodiment of the present application, sampling the first image area and the second image area based on the first sampling rate and the second sampling rate respectively to obtain a sampled image may include: acquiring the horizontal coordinate and the vertical coordinate of the initial image, and determining the sampling initial position and the step distance based on the horizontal coordinate and the vertical coordinate of the initial image and the gaze point information; setting a data window and a sampling point, and determining the movement parameters of the data window based on the sampling point; sampling the first image area and the second image area based on the movement parameters, the sampling initial position and the step distance to obtain the sampled image.
[0009] In one embodiment of the present application, setting a data window and a sampling point, and determining a movement parameter of the data window based on the sampling point may include: determining a relative position of the data window and a first sampling point and / or a second sampling point; and determining the movement parameter based on the relative position.
[0010] In one embodiment of the present application, within the second image area, the sampling rates of the image units located in the same horizontal direction may be the same, and the sampling rates of the image units located in the same vertical direction may be the same.
[0011] In one embodiment of the present application, determining a first sampling rate of the first image area and a second sampling rate of the second image area may include: setting the first sampling rate of the first image area, wherein the first sampling rate is within a gaze compression range; determining an image distance between the image unit in the second image area and the first image area; determining a plurality of second sub-sampling rates based on the second sampling rate, wherein different second sub-sampling rates have different sampling parameters; and configuring the second sub-sampling rate corresponding to the image unit in the second image area based on the image distance, wherein a larger image distance corresponds to a smaller second sub-sampling rate.
[0012] In one embodiment of the present application, the method may further include: storing and / or decompressing the target compressed image based on the first compression ratio and the second compression ratio to obtain an output image.
[0013] According to a second aspect of the present application, there is provided an apparatus for image compression processing, which may include: an image preprocessing module, configured to acquire an initial image and gaze point information, and determine a first image area and a second image area of the initial image based on the gaze point information; a sampling rate acquisition module, configured to determine a first sampling rate of the first image area and a second sampling rate of the second image area, wherein the first sampling rate is greater than the second sampling rate; an image sampling module, configured to perform sampling processing on the first image area and the second image area based on the first sampling rate and the second sampling rate, respectively, to obtain a sampled image; and an image compression module, configured to determine a first compression rate and a second compression rate of the sampled image, and perform compression processing on the sampled image based on the first compression rate and the second compression rate, to obtain a target compressed image.
[0014] In one embodiment of the present application, the image preprocessing module is used to divide the initial image in the horizontal and vertical directions based on the gaze point coordinates to obtain N*M image units; obtain eye movement information, and determine a gaze area based on the eye movement information, wherein the gaze area includes X*Y image units, 1≤X≤N, 1≤Y≤M; determine the gaze area as the first image area, and determine other areas of the initial image as the second image area.
[0015] In one embodiment of the present application, the image sampling module is used to obtain the horizontal and vertical coordinates of the initial image, and determine the sampling initial position and step distance based on the horizontal and vertical coordinates of the initial image and the gaze point information; set a data window and a sampling point, and determine the movement parameters of the data window based on the sampling point; sample the first image area and the second image area based on the movement parameters, the sampling initial position and the step distance to obtain the sampled image.
[0016] In one embodiment of the present application, the image sampling module is further used to: determine the relative position of the data window and the first sampling point and / or the second sampling point; and determine the movement parameter based on the relative position.
[0017] In one embodiment of the present application, within the second image area, the sampling rates of the image units located in the same horizontal direction may be the same, and the sampling rates of the image units located in the same vertical direction may be the same.
[0018] In one embodiment of the present application, the sampling rate acquisition module is used to set the first sampling rate of the first image area, wherein the first sampling rate is within the gaze compression range; determine the image distance between the image unit in the second image area and the first image area; determine multiple second sub-sampling rates based on the second sampling rate, wherein different second sub-sampling rates have different sampling parameters; configure the second sub-sampling rate corresponding to the image unit in the second image area based on the image distance, wherein the larger the image distance, the smaller the corresponding second sub-sampling rate.
[0019] In one embodiment of the present application, the device may further include an image decompression module, configured to store and / or decompress the target compressed image based on the first compression ratio and the second compression ratio to obtain an output image.
[0020] The third aspect of the present application provides a device based on image compression processing, which may include: an eye movement acquisition unit, used to obtain an initial image and gaze point information based on an eye movement device, and determine a first image area and a second image area of the initial image based on the gaze point information; a micro control unit, used to obtain corresponding coordinate points based on the first image area and the second image area, and compress the first image area and the second image area based on the coordinate points to obtain a target compressed image.
[0021] In one embodiment of the present application, the device also includes a storage unit for storing the target compressed image; a decompression unit for acquiring the target compressed image from the storage unit, and storing and / or decompressing the target compressed image to obtain an output image.
[0022] The fourth aspect of the present application provides an electronic device, which may include: a processor, suitable for executing a computer program; and a computer-readable storage medium, in which the computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, it implements any of the above-mentioned image compression processing methods.
[0023] A fifth aspect of the present application provides a computer-readable storage medium, which is used to store a computer program, and the computer program enables a computer to execute any of the above-mentioned image compression processing methods.
[0024] According to an exemplary embodiment of the present application, by dividing the initial image into a first image area and a second image area, and setting the sampling rate of the first image area to be greater than the sampling rate of the second image area, and the compression rate of the first image area to be less than the compression rate of the second image area, the size of the compressed image can be reduced while ensuring the image quality, thereby effectively saving storage resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings, in which:
[0026] Figure 1 is a flowchart of a method 1000 for image compression processing according to an embodiment of the present application;
[0027] Figure 2 A flowchart of determining a first image region and a second image region of an initial image according to an exemplary embodiment of the present application;
[0028] Figure 3 is a schematic diagram of a first region and a second region according to an exemplary embodiment of the present application;
[0029] Figure 4 A flowchart of determining a first sampling rate and a second sampling rate according to an exemplary embodiment of the present application;
[0030] Figure 5 A schematic diagram of configuring a second subsampling rate for a second image region according to an exemplary embodiment of the present application;
[0031] Figure 6 is a flow chart of performing sampling processing on a first image area and a second image area according to an exemplary embodiment of the present application;
[0032] Figure 7 is a block diagram of an apparatus 2000 for image compression processing according to an exemplary embodiment of the present application;
[0033] Figure 8 is a block diagram of an image compression processing device according to an exemplary embodiment of the present application;
[0034] Fig. 9 It is a structural diagram of an electronic device 3000 suitable for implementing the embodiments of the present disclosure according to the embodiments of the present disclosure. DETAILED DESCRIPTION
[0035] In order to better understand the present application, a more detailed description will be made of various aspects of the present application with reference to the accompanying drawings. It should be understood that these detailed descriptions are only descriptions of exemplary embodiments of the present application, and are not intended to limit the scope of the present application in any way. Throughout the specification, the same reference numerals refer to the same elements. The expression "and / or" includes any and all combinations of one or more of the associated listed items.
[0036] In the accompanying drawings, the size, dimensions and shapes of the elements have been slightly adjusted for ease of illustration. The drawings are for illustration only and are not strictly drawn to scale. As used herein, the terms "substantially", "approximately" and similar terms are used as terms of approximation, not as terms of degree, and are intended to illustrate the inherent deviations in measurements or calculations that will be recognized by those of ordinary skill in the art. In addition, in this application, the order in which the steps are described does not necessarily represent the order in which these processes occur in actual operation, unless otherwise specified or can be derived from the context.
[0037] It should also be understood that expressions such as "include", "including", "have", "contain" and / or "comprising" are open rather than closed expressions in this specification, which indicate the presence of the stated features, elements and / or components, but do not exclude the presence of one or more other features, elements, components and / or combinations thereof. In addition, when expressions such as "at least one of..." appear after a list of listed features, they modify the entire list of features rather than just the individual elements in the list. In addition, when describing embodiments of the present application, "may" is used to mean "one or more embodiments of the present application". And, the term "exemplary" is intended to refer to an example or illustration.
[0038] Unless otherwise specified, all words (including engineering terms and scientific and technological terms) used in this article have the same meaning as those commonly understood by ordinary technicians in the field to which this application belongs. It should also be understood that, unless clearly stated in this application, words defined in common dictionaries should be interpreted as having the same meaning as their meaning in the context of the relevant technology, and should not be interpreted in an idealized or overly formal sense.
[0039] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0040] Figure 1 FIG. 1 is a flowchart of a method 1000 for image compression processing according to an embodiment of the present application. Figure 1 As shown, the method 1000 for image compression processing may include:
[0041] Step S100: acquiring an initial image and gaze point information, and determining a first image region and a second image region of the initial image based on the gaze point information;
[0042] Step S200: determining a first sampling rate of a first image region and a second sampling rate of a second image region, wherein the first sampling rate is greater than the second sampling rate;
[0043] Step S300: sampling the first image area and the second image area based on the first sampling rate and the second sampling rate respectively to obtain a sampled image;
[0044] Step S400: determining a first compression ratio and a second compression ratio of a sampled image, and compressing the sampled image based on the first compression ratio and the second compression ratio to obtain a target compressed image.
[0045] The specific contents of each step of the above-mentioned image compression processing method 1000 will be described in detail below.
[0046] Step S100
[0047] In an exemplary embodiment of the present application, an initial image and gaze point information are first acquired, and a first image region and a second image region of the initial image are determined based on the gaze point information. Exemplarily, an eye movement device may be used to acquire the initial image and gaze point information, wherein the gaze point information may be the position where the eye is looking at in the initial image, for example, the gaze point information may include gaze point coordinates, and the gaze point information may change accordingly as the user's eye gaze direction changes. Then, the initial image is divided into a first image region and a second image region based on the gaze point information. Figure 2 FIG. 4 is a flow chart of determining the first image region and the second image region of the initial image according to an exemplary embodiment of the present application. Figure 2 As shown, determining the first image region and the second image region of the initial image may include the following steps:
[0048] Step S110: dividing the initial image in the horizontal direction and the vertical direction based on the gaze point coordinates to obtain N*M image units;
[0049] Step S120: acquiring eye movement information, and determining a gaze area based on the eye movement information, wherein the gaze area includes X*Y image units, 1≤X≤N, 1≤Y≤M;
[0050] Step S130: determining the gaze area as the first image area, and determining other areas of the initial image as the second image area.
[0051] Figure 3Schematic diagram of the first region and the second region according to an exemplary embodiment of the present application. Figure 3 As shown, the initial image may include a gaze point 10, a first image area 11, and a second image area 12. First, the coordinates of the gaze point are divided in the horizontal and vertical directions to obtain N*M image units (not shown in the figure), wherein the size of each image unit may be the same, and the image unit of the present application may also be a pixel. Then, the eye movement information is obtained, and the gaze area is determined based on the eye movement information. The gaze area may include X*Y image units, wherein M, N, X, and Y are all positive integers, and 1≤X≤N, 1≤Y≤M. The gaze area is determined as the first image area 11, and the non-gaze area is determined as the second image area 12.
[0052] Step S200
[0053] In an exemplary embodiment of the present application, after determining the first image area and the second image area, a first sampling rate of the first image area and a second sampling rate of the second image area may also be determined, wherein the first sampling rate is greater than the second sampling rate. Figure 4 FIG. 4 is a flow chart of determining a first sampling rate and a second sampling rate according to an exemplary embodiment of the present application. Figure 4 As shown, determining the first sampling rate and the second sampling rate may include the following steps:
[0054] Step S210: setting a first sampling rate for a first image region, wherein the first sampling rate is within a gaze compression range;
[0055] Step S220: determining the image distance between the image unit in the second image area and the first image area;
[0056] Step S230: determining a plurality of second sub-sampling rates based on the second sampling rate, wherein different second sub-sampling rates have different sampling parameters; and
[0057] Step S240: configuring a second sub-sampling rate corresponding to the image units in the second image area based on the image distance, wherein the larger the image distance, the smaller the corresponding second sub-sampling rate.
[0058] Exemplarily, a first sampling rate of the first image area is first set, wherein the first sampling rate is within the gaze compression range. Since the eye is more sensitive to the image quality of the first image area, the size of the first sampling rate can be controlled by setting the gaze compression range to further ensure the imaging quality of the first image area. Then, multiple second sub-sampling rates can be set within the second image area, wherein the sampling parameters of the multiple second sub-sampling rates are different. In the second image area, the sampling rates of the image units located in the same horizontal direction are the same, and the sampling rates of the image units located in the same vertical direction are the same. Figure 5 A schematic diagram of configuring a second sub-sampling rate for a second image region according to an exemplary embodiment of the present application. Figure 5 As shown, taking the first image area being located at the center of the initial image area, and configuring the second sub-sampling rate based on the horizontal direction in the second image area as an example, the second image area is divided according to the image distance between the image unit in the second image area and the first image area, for example, into a second sub-image area 121 and a second sub-image area 122, wherein the second sub-image area 121 and the second sub-image area 122 may both contain a plurality of image units, and then configuring the second sub-sampling rate for the second sub-image area 121 and the second sub-image area 122, wherein the second sub-sampling rate corresponding to the second sub-image area 121 is greater than the second sub-sampling rate corresponding to the second sub-image area 122.
[0059] Step S300
[0060] In an exemplary embodiment of the present application, after obtaining the first sampling rate and the second sampling rate, the first image area and the second image area may be sampled based on the first sampling rate and the second sampling rate, respectively, to obtain a sampled image. Figure 6 FIG. 4 is a flow chart of sampling the first image area and the second image area according to an exemplary embodiment of the present application. Figure 6 As shown, the sampling process of the first image area and the second image area may include the following steps:
[0061] Step S310: acquiring the horizontal coordinate and the vertical coordinate of the initial image, and determining the sampling initial position and the stepping distance based on the horizontal coordinate and the vertical coordinate of the initial image and the gaze point information;
[0062] Step S320: setting a data window and a sampling point, and determining a movement parameter of the data window based on the sampling point;
[0063] Step S330: sampling the first image area and the second image area based on the movement parameter, the sampling initial position and the stepping distance to obtain a sampled image.
[0064] Exemplarily, the sampling initial position and step distance are determined by the horizontal coordinate and the vertical coordinate of the initial image and the position of the gaze point, and different sampling rates correspond to different step distances, wherein the larger the sampling rate of the image area, the smaller the corresponding step distance. For example, the corresponding sampling initial position and step distance can be set based on the first sampling rate and the second sampling rate set in the first image area and the second image area. A data window and a sampling point are set in the first image area and the second image area, and the movement parameters of the data window are determined by the set sampling points, wherein the movement parameters of the data window include the movement speed and the movement distance of the data window. By setting the sampling points and setting the movement parameters of the data window based on the sampling points, different sampling frequencies can be compatible in the same data window, thereby improving the flexibility and efficiency of sampling. Then, the first image area and the second image area are sampled based on the movement parameters, the sampling initial position and the step distance to obtain a sampled image. In the process of sampling the first image area and the second image area, the relative position of the data window and the first sampling point and / or the second sampling point can also be determined and the movement parameters can be determined based on the relative position. In the process of sampling the first image area and the second image area, the relative position of the data window and the first sampling point and / or the second sampling point can also be determined and the movement parameters can be determined based on the relative position. In the process, the first sampling point can be the current sampling point, and the second sampling point can be the next sampling point. For example, the relative positions of the current sampling point, the next sampling point, and the data window may include: (1) the current sampling point is not within the data window; (2) the current sampling point is within the data window, and the next sampling point is not within the data window; (3) the current sampling point and the next sampling point are both within the data window, but the distance between the current sampling point and the data window is greater than the distance threshold; (4) the next sampling point is located at the starting sampling position of the next row. If the current sampling point, the next sampling point, and the data window meet any of the above relative position conditions, the data window needs to move in units of step distance, and then obtain the data window at the next moment, and again determine the relative positions of the current sampling point, the next sampling point, and the data window at the next moment. If the current sampling point, the next sampling point, and the data window do not meet the above relative position conditions, the data window does not move. The present application optimizes the sampling process by optimizing the relative positions of the sampling points and the data windows, which can avoid back pressure on the front-stage data flow to a certain extent and improve the performance of the sampling operation.
[0065] Step S400
[0066] In an exemplary embodiment of the present application, after obtaining the sampled image, the first compression rate and the second compression rate of the sampled image may be determined, and the sampled image may be compressed based on the first compression rate and the second compression rate to obtain a target compressed image. Exemplarily, after sampling the initial image to obtain the sampled image, different compression rates or different compression methods may be set based on the first image area and the second image area of the sampled image. For example, the first image area is compressed using a lossless compression method, and the second image area is compressed using a lossy compression method. For example, the first image area is set with a first compression rate, and the second image area is set with a second compression rate, and the first compression rate is less than the second compression rate. The present application may also set multiple second sub-compression rates within the second image area. The second compression rate includes multiple second sub-compression rates, and the second sub-compression rate may be set based on the second sub-sampling rate. For example, the smaller the second sub-sampling rate, the larger the second sub-compression rate. After setting the first compression rate and the second compression rate, the sampled image may be compressed based on the first compression rate and the second compression rate to obtain a target compressed image.
[0067] According to an exemplary embodiment of the present application, by dividing the initial image into a first image area and a second image area, and setting the sampling rate of the first image area to be greater than the sampling rate of the second image area, and the compression rate of the first image area to be less than the compression rate of the second image area, the size of the compressed image can be reduced while ensuring the image quality, thereby effectively saving storage resources.
[0068] In an exemplary embodiment of the present application, after obtaining the target compressed image, the target compressed image may be transmitted and stored, and the target compressed image may be decompressed. Exemplarily, the target compressed image may be stored and / or decompressed based on the first compression rate and the second compression rate to obtain an output image, wherein the output image may be a sampled image. The present application may also further restore the sampled image based on the first sampling rate and the second sampling rate to obtain an initial image.
[0069] On the other hand, the present application also provides a device for image compression processing. Figure 7 FIG. 2 is a block diagram of an apparatus 2000 for image compression processing according to an exemplary embodiment of the present application. Figure 7 As shown, the apparatus 2000 for image compression processing may include an image preprocessing module 2100 , a sampling rate acquisition module 2200 , an image sampling module 2300 and an image compression module 2400 .
[0070] In an exemplary embodiment of the present application, the image preprocessing module 2100 may be used to obtain an initial image and gaze point information, and determine a first image region and a second image region of the initial image based on the gaze point information.
[0071] Exemplarily, the image preprocessing module 2100 can be used to divide the initial image in the horizontal and vertical directions based on the gaze point coordinates to obtain N*M image units; obtain eye movement information, and determine the gaze area based on the eye movement information, wherein the gaze area includes X*Y image units, 1≤X≤N, 1≤Y≤M; determine the gaze area as the first image area, and determine other areas of the initial image as the second image area.
[0072] In an exemplary embodiment of the present application, the sampling rate acquisition module 2200 may be used to determine a first sampling rate of a first image region and a second sampling rate of a second image region, wherein the first sampling rate is greater than the second sampling rate.
[0073] Exemplarily, the sampling rate acquisition module 2200 can be used to set a first sampling rate for the first image area, wherein the first sampling rate is within the gaze compression range; determine the image distance between the image unit in the second image area and the first image area; determine multiple second sub-sampling rates based on the second sampling rate, wherein different second sub-sampling rates have different sampling parameters; and configure the second sub-sampling rate corresponding to the image unit in the second image area based on the image distance, wherein the larger the image distance, the smaller the corresponding second sub-sampling rate. In the second image area, the sampling rates of the image units in the same horizontal direction are the same, and the sampling rates of the image units in the same vertical direction are the same.
[0074] In an exemplary embodiment of the present application, the image sampling module 2300 may be used to perform sampling processing on the first image area and the second image area based on the first sampling rate and the second sampling rate, respectively, to obtain a sampled image.
[0075] Exemplarily, the image sampling module 2300 can be used to obtain the horizontal and vertical coordinates of the initial image, and determine the sampling initial position and step distance based on the horizontal and vertical coordinates of the initial image and the gaze point information; set the data window and sampling points, and determine the movement parameters of the data window based on the sampling points; sample the first image area and the second image area based on the movement parameters, the sampling initial position and the step distance to obtain a sampled image.
[0076] In an exemplary embodiment of the present application, the image compression module 2400 may be used to determine a first compression ratio and a second compression ratio of a sampled image, and compress the sampled image based on the first compression ratio and the second compression ratio to obtain a target compressed image.
[0077] In an exemplary embodiment of the present application, the device also includes: a storage unit that can be used to store a target compressed image; a decompression unit that can be used to obtain the target compressed image in the storage unit, and store and / or decompress the target compressed image to obtain an output image.
[0078] The functions and effects of each module of the image compression processing device 2000 of the present application have been specifically described in each step of the image compression processing method 1000, and will not be elaborated here.
[0079] According to an exemplary embodiment of the present application, by dividing the initial image into a first image area and a second image area, and setting the sampling rate of the first image area to be greater than the sampling rate of the second image area, and the compression rate of the first image area to be less than the compression rate of the second image area, the size of the compressed image can be reduced while ensuring the image quality, thereby effectively saving storage resources.
[0080] On the other hand, the present application also provides an image compression processing device. Figure 8 FIG. 1 is a block diagram of an image compression processing device according to an exemplary embodiment of the present application. Figure 8 As shown, the image compression processing device may include an eye movement acquisition unit 20, a micro control unit 30, a storage unit 40 and a decompression unit 50. The eye movement acquisition unit 20 may be used to acquire an initial image and gaze point information based on an eye movement device, and determine a first image area and a second image area of the initial image based on the gaze point information; the micro control unit 20 may be used to acquire corresponding coordinate points based on the first image area and the second image area, and compress the first image area and the second image area based on the coordinate points to obtain a target compressed image; the storage unit 30 may be used to store the target compressed image; the decompression unit 40 may be used to acquire the target compressed image of the storage unit, and store and / or decompress the target compressed image to obtain an output image.
[0081] The functions and effects of each unit of the image compression processing device of the present application have been specifically described in each step of the image compression processing method 1000, and will not be elaborated here.
[0082] The present application also provides an electronic device and a computer-readable storage medium. Fig. 9 It is a structural diagram of an electronic device 3000 suitable for implementing the embodiments of the present disclosure according to the embodiments of the present disclosure.
[0083] Reference below Fig. 9 , which shows a schematic diagram of the structure of an electronic device 3000 suitable for implementing the embodiments of the present disclosure. The terminal device in the embodiments of the present disclosure may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle terminals (such as vehicle navigation terminals, etc.) and fixed terminals such as digital TVs, desktop computers, etc. Fig. 9The terminal device / server shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0084] like Fig. 9 As shown, the electronic device 3000 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 3100, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 3200 or a program loaded from a storage device 3800 to a random access memory (RAM) 3300. In the RAM 3300, various programs and data required for the operation of the electronic device 3000 are also stored. The processing device 3100, the ROM 3200, and the RAM 3300 are connected to each other via a bus 3400. An input / output (I / O) interface 3500 is also connected to the bus 3400.
[0085] Typically, the following devices may be connected to the I / O interface 3500: an input device 3600 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 3700 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 3800 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 3900. The communication device 3900 may allow the electronic device 3000 to communicate with other devices wirelessly or by wire to exchange data. Although Fig. 9 The electronic device 3000 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Fig. 9 Each block shown in the figure may represent one device, or may represent multiple devices as required.
[0086] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 3900, or installed from the storage device 3800, or installed from the ROM 3200. When the computer program is executed by the processing device 3100, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0087] It should be noted that the computer-readable medium described in the embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the embodiments of the present disclosure, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, device or device. In the embodiments of the present disclosure, the computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0088] The computer-readable medium may be included in the electronic device, or may exist independently without being installed in the electronic device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device can achieve: obtaining an initial image and gaze point information, and determining a first image area and a second image area of the initial image based on the gaze point information; determining a first sampling rate of the first image area and a second sampling rate of the second image area, wherein the first sampling rate is greater than the second sampling rate; sampling the first image area and the second image area based on the first sampling rate and the second sampling rate, respectively, to obtain a sampled image; determining a first compression rate and a second compression rate of the sampled image, and compressing the sampled image based on the first compression rate and the second compression rate to obtain a target compressed image.
[0089] Computer program code for performing the operations of embodiments of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on a user's computer, partially on a user's computer, as a separate software package, partially on a user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0090] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0091] The specific implementation modes as described above further describe the purpose, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation mode of the present invention and is not intended to limit the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for image compression processing, characterized in that: The method comprises: Acquire an initial image and gaze point information, and determine a first image area and a second image area of the initial image based on the gaze point information; Determining a first sampling rate of the first image area and a second sampling rate of the second image area, wherein the first sampling rate is greater than the second sampling rate; Performing sampling processing on the first image area and the second image area based on the first sampling rate and the second sampling rate respectively to obtain a sampled image; A first compression rate and a second compression rate of the sampled image are determined, and compression processing is performed on the sampled image based on the first compression rate and the second compression rate to obtain a target compressed image.
2. The method for image compression processing according to claim 1, characterized in that: The gaze point information includes gaze point coordinates, and determining the first image area and the second image area of the initial image based on the gaze point information includes: Dividing the initial image in the horizontal direction and the vertical direction based on the gaze point coordinates to obtain N*M image units; Acquire eye movement information, and determine a gaze area based on the eye movement information, wherein the gaze area includes X*Y image units, 1≤X≤N, 1≤Y≤M; The gaze area is determined as the first image area, and other areas of the initial image are determined as the second image area.
3. The method for image compression processing according to claim 2, characterized in that: The first image region and the second image region are sampled based on the first sampling rate and the second sampling rate to obtain a sampled image, including: Acquire the abscissa and ordinate of the initial image, and determine the sampling initial position and step distance based on the abscissa and ordinate of the initial image and the gaze point information; Setting a data window and a sampling point, and determining a movement parameter of the data window based on the sampling point; The first image area and the second image area are sampled based on the movement parameter, the sampling initial position and the stepping distance to obtain the sampled image.
4. The method for image compression processing according to claim 3, characterized in that: Setting a data window and a sampling point, and determining a movement parameter of the data window based on the sampling point, includes: Determining the relative position of the data window and the first sampling point and / or the second sampling point; The movement parameter is determined based on the relative position.
5. The method for image compression processing according to claim 2, characterized in that: In the second image area, the sampling rates of the image units located in the same horizontal direction are the same, and the sampling rates of the image units located in the same vertical direction are the same.
6. The method for image compression processing according to claim 3, characterized in that: Determining a first sampling rate of the first image area and a second sampling rate of the second image area includes: Setting the first sampling rate of the first image area, wherein the first sampling rate is within a gaze compression range; determining an image distance between the image unit in the second image area and the first image area; Determining a plurality of second sub-sampling rates based on the second sampling rate, wherein different second sub-sampling rates have different sampling parameters; The second sub-sampling rate corresponding to the image unit in the second image area is configured based on the image distance, wherein the larger the image distance is, the smaller the corresponding second sub-sampling rate is.
7. The method for image compression processing according to any one of claims 1 to 6, characterized in that: The method further comprises: The target compressed image is stored and / or decompressed based on the first compression ratio and the second compression ratio to obtain an output image.
8. An image compression processing device, characterized in that: The device comprises: An image preprocessing module, used to obtain an initial image and gaze point information, and determine a first image area and a second image area of the initial image based on the gaze point information; A sampling rate acquisition module, used to determine a first sampling rate of the first image area and a second sampling rate of the second image area, wherein the first sampling rate is greater than the second sampling rate; An image sampling module, configured to perform sampling processing on the first image area and the second image area based on the first sampling rate and the second sampling rate respectively to obtain a sampled image; The image compression module is used to determine a first compression rate and a second compression rate of the sampled image, and compress the sampled image based on the first compression rate and the second compression rate to obtain a target compressed image.
9. The image compression processing device according to claim 8, characterized in that: Also includes: A storage unit, used for storing the target compressed image; The decompression unit is used to obtain the target compressed image from the storage unit, and store and / or decompress the target compressed image to obtain an output image.
10. An electronic device, characterized in that: include: a processor adapted to execute a computer program; as well as A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by the processor, the method for image compression processing according to any one of claims 1 to 7 is implemented.
11. A computer-readable storage medium, characterized in that: Used to store a computer program, the computer program causing a computer to execute the image compression processing method according to any one of claims 1 to 7.