CN117170761A - Image display method, device, terminal equipment and storage medium - Google Patents
Image display method, device, terminal equipment and storage medium Download PDFInfo
- Publication number
- CN117170761A CN117170761A CN202211241755.1A CN202211241755A CN117170761A CN 117170761 A CN117170761 A CN 117170761A CN 202211241755 A CN202211241755 A CN 202211241755A CN 117170761 A CN117170761 A CN 117170761A
- Authority
- CN
- China
- Prior art keywords
- image
- resolution
- preset
- sampling rate
- blurred
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 71
- 238000007906 compression Methods 0.000 claims abstract description 75
- 238000012545 processing Methods 0.000 claims abstract description 72
- 230000006835 compression Effects 0.000 claims abstract description 68
- 238000005070 sampling Methods 0.000 claims description 196
- 238000001514 detection method Methods 0.000 claims description 20
- 230000000007 visual effect Effects 0.000 abstract description 12
- 230000006870 function Effects 0.000 description 11
- 238000003672 processing method Methods 0.000 description 11
- 238000004891 communication Methods 0.000 description 5
- 230000009466 transformation Effects 0.000 description 5
- 108010001267 Protein Subunits Proteins 0.000 description 3
- 230000002146 bilateral effect Effects 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000001133 acceleration Effects 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 2
- 238000006243 chemical reaction Methods 0.000 description 2
- 230000005484 gravity Effects 0.000 description 2
- 238000003709 image segmentation Methods 0.000 description 2
- 239000004973 liquid crystal related substance Substances 0.000 description 2
- 230000007774 longterm Effects 0.000 description 2
- 238000010295 mobile communication Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000008521 reorganization Effects 0.000 description 2
- 230000005236 sound signal Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000000354 decomposition reaction Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 238000007599 discharging Methods 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000002035 prolonged effect Effects 0.000 description 1
- 230000006798 recombination Effects 0.000 description 1
- 238000005215 recombination Methods 0.000 description 1
- 238000010897 surface acoustic wave method Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Human Computer Interaction (AREA)
- Image Processing (AREA)
Abstract
The invention discloses an image display method, an image display device, terminal equipment and a storage medium, wherein a first image to be displayed is loaded; compressing the first image to obtain a low-resolution image corresponding to the first image, blurring the low-resolution image to obtain a blurred image corresponding to the first image, and covering the blurred image according to the first image if the first image is loaded completely so as to display the first image; according to the technical scheme, in the first image loading process, the blurred image obtained after compression processing and blurring processing is displayed first, and the blurred image with the resolution lower than that of the first image is displayed first, so that the waiting time of image display in the image loading process is shortened, when the first image loading is completed, the blurred image is replaced according to the first image, so that the first image with higher resolution is displayed, and the visual effect of image display is guaranteed.
Description
Technical Field
The present invention relates to the field of image data processing technologies, and in particular, to an image display method, an image display device, a terminal device, and a storage medium.
Background
Because the performance of the terminal equipment is lower, when the resolution ratio of the image to be displayed is larger, the image loading is slower, longer image loading time is required, the image display effect of the terminal equipment is affected, the image display effect is poor, and the visual experience is poor.
Disclosure of Invention
The embodiment of the invention provides an image display method, an image display device, terminal equipment and a storage medium, which shorten the waiting time of image display and shorten the blank display time of the terminal equipment in image loading.
In one aspect, an embodiment of the present invention provides an image display method, including:
loading a first image to be displayed;
compressing the first image to obtain a low-resolution image corresponding to the first image;
performing blurring processing on the low-resolution image to obtain a blurred image corresponding to the first image, and displaying the blurred image;
and if the first image loading is completed, replacing the blurred image according to the first image so as to display the first image.
In another aspect, an embodiment of the present invention provides an image display apparatus, including:
the acquisition module is used for loading a first image to be displayed;
The first processing module is used for compressing the first image to obtain a low-resolution image corresponding to the first image;
the second processing module is used for carrying out blurring processing on the low-resolution image to obtain a blurred image corresponding to the first image, and displaying the blurred image;
and the display module is used for replacing the blurred image according to the first image if the first image is loaded, so as to display the first image.
In another aspect, an embodiment of the present invention provides a terminal device, including a memory and a processor; the memory stores an application program, and the processor is configured to run the application program in the memory to perform the operations in the image display method.
In another aspect, embodiments of the present invention provide a storage medium storing a plurality of instructions adapted to be loaded by a processor to perform steps in the image display method.
The embodiment of the invention loads the first image to be displayed; compressing the first image to obtain a low-resolution image corresponding to the first image, blurring the low-resolution image to obtain a blurred image corresponding to the first image, and covering the blurred image according to the first image if the first image is loaded completely so as to display the first image; in the first image loading process, the blurred image obtained after compression processing and blurring processing is displayed, so that the waiting time of image display in the image loading process is shortened, and the blank display time of terminal equipment in the image loading process is shortened; and when the first image is loaded, the blurred image is replaced according to the first image so as to display the first image with higher resolution, and the visual effect of image display is ensured.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the description of the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic flow chart of an embodiment of an image display method according to an embodiment of the present invention;
FIG. 2 is a flowchart of an embodiment of an image compression processing method in an image display method according to an embodiment of the present invention;
fig. 3 is a flowchart of another embodiment of an image compression processing method in the image display method according to the embodiment of the present invention;
fig. 4 is a flowchart of another embodiment of an image compression processing method in an image display method according to an embodiment of the present invention;
fig. 5 is a schematic structural view of an image display device according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a terminal device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to fall within the scope of the invention.
As described in the background art, with the development of the image processing technology, the resolution of the image is better and the information contained in the image is more and more abundant, so that the memory occupied by the image is larger and larger, when the image is displayed on the terminal device, the image to be displayed needs longer image loading time due to higher resolution of the image to be displayed, so that the image to be displayed needs longer waiting time, and when the processing capacity of the CPU of the terminal device is poor, the loading time of the image is prolonged, the loading process is blocked, and the watching of a user is influenced; and may also cause storage overload during image loading, resulting in system operation failure of the terminal device.
Based on the above, in order to solve the problem that the waiting time is too long in the process of loading the images by the terminal equipment, the embodiment of the invention provides an image display method, in the process of loading the first image, the blurred image obtained after compression processing and blurring processing is displayed first, and the blurred image with the resolution lower than that of the first image is displayed first, so that the waiting time of image display in the process of loading the images is shortened, the blank display time of the terminal equipment in the process of loading the images is shortened, and when the loading of the first image is completed, the blurred image is replaced according to the first image, so that the first image with higher resolution is displayed, and the visual effect of image display is ensured.
As shown in fig. 1, fig. 1 is a schematic flow chart of an embodiment of an image display method provided by an embodiment of the present invention, where the image display method is applied to a terminal device, and the terminal device may be a mobile phone, a tablet computer, a display screen, or other devices with an image display function. The image display method comprises the steps of capturing 101-104:
101, loading a first image to be displayed.
In some embodiments of the present invention, the first image may be an image stored in a local memory of the terminal device, and the first image may also be an image sent by a server or a network.
In some embodiments of the present invention, the terminal device receives the image data, stores the image data in the local memory, and when receiving the image viewing instruction, determines a first image to be displayed according to the image viewing instruction, accesses the local memory to load the first image. In some embodiments of the invention, the terminal device may receive image data sent from a server, computer device, or other terminal device.
In some embodiments of the present invention, when receiving an image viewing instruction, a terminal device accesses a background server to acquire and load a first image to be displayed corresponding to the image viewing instruction.
102, performing compression processing on the first image to obtain a low-resolution image corresponding to the first image.
In some embodiments of the present invention, the compression process includes, but is not limited to, downsampling, image encoding, image filtering, and the like. The image coding may be predictive coding, statistical coding, such as run-length coding, huffman coding and arithmetic coding, and transform coding, such as discrete wavelet transform. The image filter may be a low resolution image filter.
In some embodiments of the present invention, in order to further reduce the waiting time of image display, the first image may be divided into a plurality of image blocks by a sliding window with a preset size, and each image block is compressed to obtain a low resolution image block, and image reorganization is performed according to the plurality of low resolution image blocks to obtain a low resolution image corresponding to the first image. In some embodiments of the present invention, considering that a low resolution image obtained by image reconstruction according to a plurality of low resolution image blocks may have a checkerboard effect, an initial low resolution image obtained by image reconstruction according to a plurality of low resolution image blocks may be smoothed to improve visual effect. In some embodiments of the present invention, the initial low resolution image obtained by image reconstruction from a plurality of low resolution image blocks may be smoothed by a bilateral filter or an average filter.
And 103, performing blurring processing on the low-resolution image to obtain a blurred image corresponding to the first image, and displaying the blurred image.
In some embodiments of the present invention, the low resolution image may be subjected to a blurring process by using a preset blurring model, so as to obtain a blurred image corresponding to the first image. The fuzzy model comprises, but is not limited to, a Gaussian fuzzy model, a median fuzzy model, a mean fuzzy model, a bilateral fuzzy model and a Kawase fuzzy model.
In some embodiments of the present invention, after displaying the blurred image, it may be detected whether the first image is loaded completely, if so, step 104 is performed, and if not, the blurred image is continuously displayed.
In some embodiments of the present invention, in order to further reduce the waiting time of image display, channel decomposition may be performed on a first image according to a color space of the first image, so as to obtain a single-channel image of the first image, the single-channel image of the first image is compressed to obtain a single-channel low-resolution image corresponding to the first image, and the single-channel low-resolution image is blurred to obtain a single-channel blurred image, channel copying is performed based on the single-channel blurred image, so as to obtain an R-channel blurred image, a G-channel blurred image, and a B-channel blurred image, channel recombination is performed based on the R-channel blurred image, the G-channel blurred image, and the B-channel blurred image, so as to obtain a blurred image corresponding to the first image, and the blurred image is displayed. For example, a first image in the RGB color space is decomposed into an R-channel image, a G-channel image, and a B-channel image, and any one of the R-channel image, the G-channel image, and the B-channel image is set as a single-channel image.
In some embodiments of the present invention, in order to further reduce the waiting time of image display, the first image may be subjected to gray level conversion to obtain a gray level image of the first image, the gray level image of the first image is subjected to compression processing to obtain a gray level low resolution image corresponding to the first image, the gray level low resolution image is subjected to blurring processing to obtain a gray level blurred image, the gray level blurred image is subjected to gray level inverse transformation to obtain a blurred image in a color space, and the blurred image is displayed.
In some embodiments of the present invention, in order to further reduce the waiting time of image display, after obtaining the gray-scale blurred image, the performance parameters of the terminal device may be obtained; if the performance parameter is smaller than the preset performance parameter threshold, carrying out gray level inverse transformation on the gray level blurred image to obtain a blurred image in the color space, and displaying the blurred image; and if the performance parameter is greater than or equal to the preset performance parameter index, displaying the gray fuzzy image. In some embodiments of the present invention, the performance parameters include, but are not limited to, a memory occupancy rate and a CPU usage rate, it may be understood that when the memory occupancy rate of the terminal device is less than a preset memory occupancy rate threshold, and the CPU usage rate of the terminal device is less than the preset CPU usage rate threshold, performing gray scale inverse transformation on the gray scale blurred image to obtain a blurred image in the color space, and displaying the blurred image; and displaying the gray-scale blurred image when the memory occupancy rate of the terminal equipment is greater than or equal to a preset memory occupancy rate threshold value and/or the CPU utilization rate of the terminal equipment is greater than or equal to a preset CPU utilization rate threshold value.
104, if the first image loading is completed, replacing the blurred image according to the first image to display the first image.
In some embodiments of the present invention, in order to reduce memory consumption of the terminal device, when loading of the first image is completed, the blurred image is replaced according to the first image, so as to display the first image, and the image data of the blurred image is deleted, so that the memory of the terminal device is released.
In the embodiment of the invention, in the process of loading the first image, the blurred image obtained after compression processing and blurring processing is displayed first, and the blurred image with the resolution lower than that of the first image is displayed first, so that the waiting time of image display is shortened, and when the first image is loaded, the blurred image is replaced according to the first image, so that the first image with higher resolution is displayed, and the visual effect of image display is ensured.
In some embodiments of the present invention, the first image to be displayed may be an original image requested to be viewed by the image viewing instruction, or may be an image obtained by performing image compression on the original image requested to be viewed by the image viewing instruction.
In some embodiments of the present invention, considering that the image resolution of the original image requested to be viewed by the image viewing instruction is higher, when the performance of the terminal device is lower, loading the original image requested to be viewed by the image viewing instruction may cause an operation failure of the terminal device, so that the embodiment of the present invention can determine the first image to be displayed according to the image resolution of the original image requested to be viewed by the image viewing instruction and the performance parameter of the terminal device. Specifically, according to the performance parameters of the terminal equipment, inquiring preset resolution data to obtain a target resolution range associated with the performance parameters of the terminal equipment; if the image resolution of the original image is within the target resolution range, indicating that the resolution of the original image is smaller than or equal to the maximum resolution in the target resolution range, setting the original image as a first image to be displayed, and loading the first image; if the resolution of the original image is not in the target resolution range, the original image is compressed, the compressed original image is set as a first image to be displayed, and the first image is loaded. The resolution data comprises a plurality of groups of performance parameters and resolution ranges corresponding to the performance parameters.
In some embodiments of the present invention, in order to shorten the waiting time of image display during the process of loading the first image, the compression parameters of the first image may be determined based on the image parameters of the first image, and the first image is compressed according to the compression parameters, so as to obtain a low resolution image corresponding to the first image. The image parameters can be one or more of image size, image resolution, image information quantity and image occupied memory, and the compression parameters can be compression rate of image coding compression or sampling rate of downsampling. Taking a compression processing method as an example of downsampling, a corresponding sampling rate may be determined according to an image parameter of a first image, and downsampling may be performed on the first image according to the sampling rate to perform compression processing on the first image to obtain a low resolution image corresponding to the first image, specifically, as shown in fig. 2, fig. 2 is a schematic flow diagram of an embodiment of an image compression processing method in the image display method provided by the embodiment of the present invention, where the image compression processing method includes steps 201 to 202:
and 201, determining a first sampling rate of the first image according to the first image parameter of the first image and preset first sampling data.
The preset first sampling data comprise a plurality of image parameters and preset sampling rates corresponding to the image parameters.
In some embodiments of the present invention, in order to ensure that the terminal device can operate normally in the loading process of the first image, it may be determined whether to continue to load the first image according to the memory occupied by the first image and the remaining memory of the terminal device, including: acquiring the memory occupied by the first image and the residual memory of the terminal equipment, and if the memory occupied by the first image is smaller than the residual memory of the terminal equipment, determining a first sampling rate of the first image according to a first image parameter of the first image and preset first sampling data; if the memory occupied by the first image is larger than or equal to the residual memory of the terminal equipment, stopping loading the first image, deleting the image data loaded with the first image, acquiring a preset compression rate, compressing the first image according to the preset compression rate to obtain a compressed first image, and loading the compressed first image.
In some embodiments of the present invention, considering that different terminal devices have different performances, in order to adapt to the terminal devices with different performances, the flexibility of the image display method is improved, in determining a first sampling rate for obtaining a first image according to a first image parameter of the first image and preset first sampling data, the preset first sampling data matched with the performance parameter may be determined according to the performance parameter of the terminal device, and the preset sampling rate associated with the first image parameter of the first image may be obtained by querying the preset first sampling data matched with the performance parameter, and the preset sampling rate associated with the first image parameter of the first image is set as the first sampling rate of the first image.
And 202, performing compression processing on the first image according to the first sampling rate to obtain a low-resolution image corresponding to the first image.
In some embodiments of the present invention, downsampling may be performed on a first image at a first sampling rate to perform compression processing on the first image, so as to obtain a downsampled first image, obtain an image size of the first image, and perform size transformation on the downsampled first image according to the image size of the first image, so as to obtain a low resolution image corresponding to the first image. Wherein the dimensional transformation may be dimensional stretching.
In some embodiments of the present invention, in order to shorten the waiting time of image display, the method in step 102 may be used to perform image segmentation on the first image, and compress each image block in parallel according to the first sampling rate to obtain low resolution image blocks, and perform image reconstruction according to each low resolution image block to obtain a low resolution image corresponding to the first image.
In some embodiments of the present invention, in the process of compressing each image block according to the first samples in parallel to obtain a low resolution image block, for each image block, a sampling weight corresponding to the image block may be determined, a final sampling rate of the image block is obtained by calculating according to the first sampling rate and the sampling weight of the image block, and a downsampling process is performed on the image block according to the final sampling rate of the image block to obtain the low resolution image block. In some embodiments of the present invention, the pre-stored sampling weight data may be queried according to the spatial position of the image block in the first image, to obtain the sampling weight of the image block pair at the spatial position. For example, when the first image is divided into 3*3 image blocks, the pre-stored sampling weight data can be queried according to the spatial position of the image blocks in the first image The sampling weight corresponding to each image block is determined, for example, for the first image block at the upper left position, the sampling weight of the image block is 1, for the second image block at the middle position, the sampling weight of the image block is 0.5, it should be noted that, the number of image blocks and the specific numerical value setting of the sampling weight data are only exemplary, and the number of image blocks and the sampling weight data can be set according to the actual application scene.
In some embodiments of the present invention, considering that the global image of the first image is compressed during the compression process, the data size in the compression process may be larger, so as to increase the waiting time of image display. Specifically, the local compression processing method includes steps a1 to a2:
step a1, an image area to be sampled in a first image is acquired.
In some embodiments of the present invention, the image area to be sampled may be determined according to preset sampling weight data, specifically, the first image may be subjected to image segmentation through a preset grid to obtain a plurality of image blocks, and the image area to be sampled in the plurality of image blocks is determined according to the preset sampling weight data. For example, a first image may be partitioned into 4*4 image blocks using a grid of 4*4, according to preset sampling weight data And determining the image area to be sampled as an image block at a second column position of the second row, an image block at a third column position of the second row, an image block at a second column position of the third row and an image block at a third column position of the third row.
In some embodiments of the present invention, an image area to be sampled may be determined according to a performance parameter of a terminal device, and specifically, the method for determining an image area to be sampled includes:
(1) And comparing the performance parameter of the terminal equipment with a preset performance parameter threshold.
(2) If the performance parameter of the terminal equipment is matched with the preset performance parameter threshold, performing image detection on the first image, and determining an image area to be sampled in the first image according to a detection result. Wherein the detection result characterizes the richness of the image information in the first image.
(3) If the performance parameter of the terminal equipment is not matched with the preset performance parameter, setting an image area in a preset window in the first image as an image area to be sampled.
In some embodiments of the present invention, comparing a performance parameter of the terminal device with a preset performance parameter threshold; if the performance parameter of the terminal equipment is larger than or equal to the preset performance parameter threshold, determining that the performance parameter of the terminal equipment is matched with the preset performance parameter threshold; if the performance parameter of the terminal equipment is smaller than the preset performance parameter threshold, determining that the performance parameter of the terminal equipment is not matched with the preset performance parameter threshold.
In some embodiments of the present invention, a first image may be divided into a plurality of image blocks by a preset grid, an information entropy of each image block is calculated according to a pixel value in each image block, an information entropy of each image block is obtained, a detection result of each image block is obtained, a target image block in which the information entropy is greater than or equal to a preset information entropy threshold in the first image is determined according to the detection result of each image block, and an image area formed by the target image blocks is set as an image area to be sampled.
In some embodiments of the present invention, image detection may be performed on the first image by using a preset information amount detection model, so as to obtain an image area with the largest information amount in the first image, and the image area with the largest information amount in the first image is set as an image area to be sampled in the first image. The information amount detection model may be a detection model based on machine learning or a probability model.
In some embodiments of the present invention, the image area in the first image within the preset window may be an image area established with the center position of the first image as a center and the size of the preset window as a target size. In some embodiments, the center position of the first image may itself be the geometric center of the first image.
And a step a2 of compressing the image area to be sampled in the first image according to the first sampling rate to obtain a low-resolution image corresponding to the first image.
In some embodiments of the present invention, an image area to be sampled in a first image may be downsampled according to a first sampling rate, so as to perform compression processing on the image area to be sampled in the first image, to obtain a low resolution image corresponding to the first image.
In some embodiments of the present invention, considering that the screen resolution and the screen pixel density of the display screen of different terminal devices are different, if the screen resolution and the screen pixel density of the display screen are not considered in the image compression process, the visual effect of the finally displayed blurred image may be poor, so in order to improve the visual effect of the finally displayed blurred image, the first sampling rate of the first image may be determined according to the screen resolution and the screen pixel density of the display screen in the compression process, specifically, as shown in fig. 3, fig. 3 is a flowchart of another embodiment of the image compression process method in the image display method provided in the embodiment of the present invention, where the image compression process method includes steps 301 to 305:
And 301, acquiring screen resolution, screen pixel density and size information of a display screen of the terminal equipment.
302, determining a resolution ratio of the terminal equipment according to the screen resolution and the screen pixel density.
In some embodiments of the present invention, the resolution ratio of the terminal device may be determined according to the ratio of the screen resolution to the screen pixel density. For example, the screen resolution of the terminal device is 1920×1080 and the screen pixel density is 400 pixels/inch, then the screen resolution is divided by the screen pixel density to obtain a resolution ratio, i.e. 4.8:2.7, and then the ratio is converted into an integer ratio of two to two, i.e. 16:9, which is the resolution ratio of the terminal obtained by calculating the screen resolution and the screen pixel density.
303, determining a display area of the display screen according to the resolution ratio and the size information.
In some embodiments of the present invention, the display area of the display screen for displaying the picture may be determined according to the resolution ratio and the size information, for example, when the related picture is displayed by the terminal device, the display area of the picture is determined to be the whole display screen, that is, when the picture is displayed, the picture occupies the whole area of the display screen.
304, determining a first sampling rate according to the display area and the corresponding relation between the preset display area and the sampling rate.
In some embodiments of the present invention, the first sampling rate may be determined according to a correspondence between the display area and a preset display area and a sampling rate. That is, the terminal device may store some corresponding relations between the display area and the sampling rate in advance, where the corresponding relations may be, for example, corresponding relations obtained according to an empirical value, or may also be corresponding relations obtained by calculating through a specific algorithm, and the embodiment of the present invention is not limited to a specific setting manner of the corresponding relations.
And 305, performing image compression processing on the first image according to the first sampling rate to obtain a low-resolution image corresponding to the first image.
In some embodiments of the present invention, the image compression processing may be performed on the first image according to the compression method in 102 according to the first sampling rate, so as to obtain a low resolution image corresponding to the first image.
In some embodiments of the present invention, the image compression processing may be further performed on the first image according to the compression method described in the above step 202 according to the first sampling rate, so as to obtain a low resolution image corresponding to the first image.
In some embodiments of the present invention, the image compression processing may be further performed on the first image according to steps a1 to a2 according to the first sampling rate, so as to obtain a low resolution image corresponding to the first image.
In some embodiments of the present invention, the first image may be further divided into a plurality of image sub-units according to the pixel arrangement of the first image, and each image sub-unit is downsampled according to the first sampling rate to obtain the low resolution image, where the image sub-unit may be an image block, for example, a circular image block, a square image block, or the like, and the image sub-unit may be an image unit formed by a plurality of pixels, for example, an image unit formed by row pixels and an image unit formed by column pixels. Specifically, the image compression method based on the downsampling of the image subunit comprises the steps b 1-b 2:
step b1, dividing the first image into a plurality of image subunits according to the arrangement of pixels of the first image.
In some embodiments of the present invention, the first image may be divided into a plurality of image sub-units according to an arrangement of pixels of the first image, moving on the first image according to a preset sliding window according to a preset step size.
In some embodiments of the present invention, the number of pixels in the low-resolution image is correspondingly reduced when the first image is compressed, for example, the resolution of the first image may be 1024×1024, and after the first image is compressed, the resolution of the low-resolution image may be 512×512. The first image may thus be divided into image units consisting of a plurality of pixels according to the arrangement of R, G, B pixels in the first image. For example, when the arrangement of the pixels of the first image is an RGBG-RGBG arrangement and the even-numbered rows are BGRG-BGRG arrangements, the first image may be divided into a first image sub-unit composed of a plurality of row pixels and a second image sub-unit composed of a plurality of column pixels according to the arrangement of the image pixels of the first image. Wherein the first image subunit includes a plurality of row pixel sets therein, and the second image subunit includes a plurality of column pixel sets therein.
Wherein the first image subunit includes a first odd image subunit and a first even image subunit. The first odd image subunit comprises a plurality of line pixel sets with odd lines in the first image, and the first even image subunit comprises a plurality of line pixel sets with even lines in the first image. For example, when the first image includes 1125×2436 pixels, there are 1125G sub-pixels, 563R sub-pixels, 562B sub-pixels in the first odd-numbered image sub-unit, and 1125G sub-pixels, 563B sub-pixels, 562R sub-pixels in the first even-numbered image sub-unit.
Accordingly, the second image subunit includes a second odd image subunit and a second even image subunit, where the second odd image subunit includes a plurality of column pixel sets with odd numbers of rows in the first image, and the second even image subunit includes a plurality of column pixel sets with even numbers of rows in the first image. For example, when the first image includes 1125×2436 pixels, the second odd-numbered image sub-unit has 1125G sub-pixels, 563R sub-pixels, 562B sub-pixels, and the second even-numbered image sub-unit has 1125G sub-pixels, 563B sub-pixels, 562R sub-pixels.
And b2, selecting a target image subunit from a plurality of image subunits of the first image according to the first sampling rate, and removing the target image subunit from the first image to obtain a low-resolution image corresponding to the first image.
In some embodiments of the present invention, when the image subunit is an image block, the image subunit of the first image may be sampled according to the first sampling rate to obtain a sampled image subunit, and image reorganization is performed according to the sampled image subunit to obtain a low resolution image corresponding to the first image.
In some embodiments of the present invention, when the image sub-unit is an image unit composed of a plurality of pixels, a target first image sub-unit may be selected from a plurality of first image sub-units according to a first sampling rate, a target second image sub-unit may be selected from a plurality of second image sub-units according to the first sampling rate, information of the selected target first image sub-unit may be fused to an adjacent first image sub-unit of the target first image sub-unit, information of the selected target second image sub-unit may be fused to an adjacent second image sub-unit of the target second image sub-unit, and the target first image sub-unit and the target second image sub-unit may be extracted from the first image to obtain a low resolution image corresponding to the first image. In some embodiments of the present invention, in selecting a target first image subunit from a plurality of first image subunits according to a first sampling rate, selecting a target second image subunit from a plurality of second image subunits according to a first sampling rate, determining a first target number of target first image subunits selected for each sampling according to the first sampling rate and a preset interval line number, determining a second target number of target second image subunits selected for each sampling according to the first sampling rate and a preset interval line number, selecting a first target number of target first image subunits from a plurality of first image subunits for each interval preset interval line number, and selecting a second target number of target second image subunits from a plurality of second image subunits for each interval preset interval line number. The ratio of the difference between the preset interval line number and the first target number to the preset interval line number is a first sampling rate, the ratio of the difference between the preset interval line number and the second target number to the preset interval line number is a second sampling rate, the preset interval line number is larger than the first target number, and the preset interval line number is larger than the second target number.
In some embodiments of the present invention, after obtaining a low resolution image, determining a blur parameter according to an image parameter of the low resolution image, adjusting an initial blur model according to the blur parameter to obtain a target blur model, and performing blur processing on the low resolution image according to the target blur model to obtain a blur image corresponding to the first image. Wherein the blur parameter may blur a radius. Specifically, the blurring processing method includes steps c1 to c3:
and c1, determining and obtaining a first fuzzy parameter according to a second image parameter of the low-resolution image and preset first fuzzy data. The preset first fuzzy data comprise a plurality of image parameters and preset fuzzy parameters corresponding to each image parameter.
In some embodiments of the present invention, similar to the manner of obtaining the first sampling rate, the preset first blur data may be queried according to the second image parameter of the low resolution image, to determine the first blur parameter.
In some embodiments of the present invention, pre-stored fuzzy parameter data may be queried according to a performance parameter of a terminal device to obtain preset first fuzzy data associated with the performance parameter, and the preset first fuzzy data may be queried according to a second image parameter of a low resolution image to obtain the first fuzzy parameter. The fuzzy parameter data comprises a plurality of performance parameters and first fuzzy data corresponding to each performance parameter.
And c2, adjusting a preset initial fuzzy model according to the first fuzzy parameters to obtain a target fuzzy model.
In some embodiments of the invention, the initial blur model may be an initial gaussian blur model, an initial mean blur model, an initial median blur model, or an initial bilateral blur model. Taking the initial fuzzy model as an initial Gaussian fuzzy model as an example, the fuzzy radius of the preset initial fuzzy model can be adjusted according to the first fuzzy parameter to obtain the target fuzzy model.
And c3, carrying out fuzzy processing on the low-resolution image according to the target fuzzy model to obtain a fuzzy image corresponding to the first image.
In some embodiments of the present invention, after the low resolution image is blurred according to the target blur model, a blurred image corresponding to the first image is obtained, and then the blurred image is displayed.
In some embodiments of the invention, after displaying the blurred image, detecting whether the loading of the first image is complete; if the first image loading is completed, replacing the blurred image according to the first image so as to display the first image; if the first image is not loaded, continuing to display the blurred image.
In some embodiments of the present invention, if the first image is not loaded, acquiring a loading time length of the first image, and if the loading time length is greater than or equal to a preset time length, stopping loading the first image, and continuing to display the blurred image; if the loading time is less than the preset time, continuing to wait for loading the first image and continuing to display the blurred image.
In some embodiments of the present invention, in order to improve the visual effect and the image definition of the displayed image, if the first image is not loaded, the first image may be compressed again to obtain a new low resolution image, the new low resolution image is blurred to obtain a new blurred image, and the blurred image is replaced according to the new blurred image to display the new blurred image. Specifically, the method for determining the new blurred image includes steps d1 to d3:
and d1, determining to obtain a second sampling rate according to the first sampling rate and a preset proportionality coefficient. Wherein the second sampling rate is greater than the first sampling rate.
In some embodiments of the present invention, the product of the first sampling rate and the preset scaling factor may be set to the second sampling rate; the sum of the first sampling rate and the preset proportional coefficient can also be set to be a second sampling rate; the difference between the first sampling rate and the preset scaling factor may also be set to a second sampling rate; the first sampling rate and the preset proportional coefficient can also be subjected to exponential operation, and the result of the exponential operation is set to be the second sampling rate, for example, (first sampling rate)/(second sampling rate) (preset scaling factor) Set to the second sampling rate.
And d2, compressing the first image according to the second sampling rate to obtain a new low-resolution image corresponding to the first image.
In some embodiments of the present invention, the compression processing may be performed on the first image according to the compression processing method shown in fig. 2 according to the second sampling rate to obtain a new low resolution image corresponding to the first image, or the compression processing may be performed on the first image according to the compression processing method shown in fig. 3 according to the second sampling rate to obtain a new low resolution image corresponding to the first image.
And d3, performing blurring processing on the new resolution image to obtain a new blurred image corresponding to the first image, and replacing the blurred image according to the new blurred image so as to display the new blurred image.
In some embodiments of the present invention, the new resolution image may be blurred according to the blurring method shown in steps c1 to c3, to obtain a new blurred image corresponding to the first image, and the blurred image may be replaced according to the new blurred image, so as to display the new blurred image.
In some embodiments of the invention, after displaying the new blurred image, determining whether the first image is loaded; if the first image is not loaded, acquiring the loading time length of the first image; if the loading time length of the first image is greater than the preset time length threshold, stopping loading the first image, and continuing to display the new blurred image; if the loading time length of the first image is less than or equal to a preset time length threshold value, acquiring the compression times of the first image; if the compression times of the first image is greater than or equal to a preset compression times threshold value, continuing to display the new blurred image, and waiting for loading of the first image; if the compression frequency of the first image is smaller than the preset compression frequency threshold value, executing the steps d1 to d3 again.
In some embodiments of the invention, after displaying the new blurred image, determining whether the first image is loaded; if the first image is not loaded, acquiring the loading time length of the first image; if the loading time length of the first image is greater than the preset time length threshold, stopping loading the first image, and continuing to display the new blurred image; if the loading time length of the first image is less than or equal to the preset time length, the compression times of the first image are obtained; if the compression times of the first image is larger than or equal to a preset compression times threshold value, determining a third sampling rate according to the second sampling rate and a preset proportional coefficient, and comparing the third sampling rate with the preset sampling rate; if the third sampling rate is greater than or equal to the preset sampling rate, continuing to display the new blurred image, and waiting for loading of the first image; if the third sampling rate is smaller than the preset sampling rate, the steps d 1-d 3 are executed again.
In some embodiments of the present invention, a sampling sequence and a blurring sequence of a first image may be determined in image compression processing, and during each image compression processing, a target sampling rate is selected from the sampling sequence of the first image, image compression is performed on the first image based on the target sampling rate to obtain a low resolution image corresponding to the target sampling rate, and a target blurring parameter is selected from the blurring sequence, and blurring processing is performed on the low resolution image corresponding to the target sampling rate according to the blurring parameter to obtain a blurring image corresponding to the target sampling rate, and a blurring image corresponding to the target sampling rate is displayed, and specifically, as shown in fig. 4, fig. 4 is a flowchart of another embodiment of image compression processing in the image display method provided by the embodiment of the present invention, the image compression processing method includes steps 401 to 405:
A sampling sequence corresponding to the first image and a blurring sequence are determined 401.
Wherein the sampling sequence comprises at least one sampling rate; the blurring sequence comprises at least one blurring parameter, and each sampling rate corresponds to one blurring parameter.
In some embodiments of the present invention, a sampling sequence corresponding to a first image may be selected from preset second sampling data according to a first image parameter of the first image, and a blur sequence corresponding to the first image may be selected from preset second blur data according to the first image parameter of the first image. The second sampling data comprises a plurality of image parameters and preset sampling sequences corresponding to the image parameters, and the second fuzzy data comprises a plurality of image parameters and preset fuzzy sequences corresponding to the image parameters.
In some embodiments of the present invention, a first sampling rate corresponding to a first image may be selected from preset first sampling data according to a first image parameter of the first image, a compression number is determined according to the preset sampling rate and the first sampling rate, a preset scaling factor is determined according to the compression number, the preset sampling rate and the first sampling rate, a number column is established according to the first sampling rate and the compression number, and the established number column is set as a sampling sequence corresponding to the first image. The preset proportionality coefficient can be obtained by determining according to the ratio between the preset sampling rate and the first sampling rate and the compression times. For example, (first sampling rate/preset sampling rate)/(number of compression) is set to a preset scaling factor. When the compression frequency is 4, obtaining a sampling sequence { first sampling rate, scaling factor, first sampling rate 2 First sampling rate 3 }. For example, when the first sampling rate is 1/16, the preset sampling rate is 1, and the compression number is 4, a sampling sequence {1/16,1/8,1/4,1/2} corresponding to the first image is obtained according to the first sampling rate and the compression number.
In some embodiments of the present invention, the preset third fuzzy data may be queried according to the sampling sequence to obtain the fuzzy sequence. Wherein the third blurred data includes a plurality of sets of sample sequences and a blurred sequence corresponding to each set of sample sequences.
A target sampling rate in the sampling sequence is determined 402.
In some embodiments of the present invention, a value corresponding to an element with a sequence number of +1 of the historical compression number in the sampling sequence may be set as a target sampling rate according to the historical compression number of the first image, for example, for the sampling sequence {1/16,1/8,1/4,1/2}, when the historical compression number of the first image is 0, the corresponding target sampling rate is 1/16, and when the historical compression number of the first image is 1, the corresponding target sampling rate is 1/8.
In some embodiments of the present invention, a next adjacent element of the element having the same value as the previous historical target sampling rate may be selected from the sampling sequence according to the previous historical target sampling rate of the first image, and the value of the previous historical target sampling rate may be set as the target sampling rate. For example, taking the sample sequence {1/16,1/8,1/4,1/2} as an example, when the previous historical target sample rate for the first image is 1/16, then the target sample rate is 1/8.
In some embodiments of the present invention, a target element having a value equal to the previous historical target sampling rate of the element may be determined from the sampling sequence according to the previous historical target sampling rate of the first image, and a value of a subsequent element spaced from the target element by a preset amount in the sampling sequence may be set as the target sampling rate. For example, taking the sample sequence {1/16,1/8,1/4,1/2}, the preset number is 2, when the previous historical target sample rate for the first image is 1/16, then the target sample rate is 1/4.
In some embodiments of the invention, in determining a target sampling rate in a sampling sequence, it may be detected whether the loading of the first image is complete; if loading is completed, replacing the blurred image according to the first image so as to display the first image; if the loading is not completed, determining a target sampling rate in the sampling sequence.
And 403, performing compression processing on the first image according to the target sampling rate to obtain a low-resolution image corresponding to the first image.
404, selecting a target fuzzy parameter corresponding to the target sampling rate from the fuzzy sequence according to the target sampling rate.
And 405, performing blurring processing on the low-resolution image corresponding to the first image according to the target blurring parameter to obtain a blurred image corresponding to the first image, and displaying the blurred image corresponding to the first image.
In some embodiments of the present invention, after displaying the blurred image corresponding to the first image, it is determined whether the first image is loaded, if not, steps 402 to 405 are executed again, and after steps 402 to 405 are executed again, it is determined whether the first image is loaded, if not, steps 402 to 405 are executed continuously.
In some embodiments of the present invention, after displaying a blurred image corresponding to a first image, determining whether the first image is loaded, if not, acquiring a loading time length of the first image, if the loading time length is greater than or equal to a preset time length, stopping loading the first image, and continuing to display the blurred image corresponding to the first image; if the loading time period is less than the preset time period, the steps 402 to 405 are executed again.
In some embodiments of the present invention, after displaying a blurred image corresponding to a first image, determining whether the first image is loaded, if not, acquiring a compression processing time length and a blurring processing time length, obtaining a total processing time length of a target sampling rate, determining a preset number according to a mapping relation between the total processing time length and a preset time length and a data interval time, determining a new target element with a value identical to the target sampling rate from a sampling sequence, and setting a value of a new subsequent element with a preset number spaced from the new target element in the sampling sequence as a next target sampling rate.
In some embodiments of the present invention, if the first image loading is completed, the blurred image is replaced according to the first image to display the first image.
In the image display method provided by the embodiment of the invention, in the first image loading process, the blurred image obtained after compression processing and blurring processing is displayed first, and the blurred image with the resolution lower than that of the first image is displayed first, so that the waiting time of image display is shortened, and when the first image loading is completed, the blurred image is replaced according to the first image, so that the first image with higher resolution is displayed, and the visual effect of image display is ensured.
In order to better implement the image display method provided by the embodiment of the present invention, on the basis of the embodiment of the image display method, an image display device is provided, as shown in fig. 5, fig. 5 is a schematic structural diagram of the image display device provided by the embodiment of the present invention, where the image display device includes:
the acquisition module is used for loading a first image to be displayed;
the first processing module is used for compressing the first image to obtain a low-resolution image corresponding to the first image;
the second processing module is used for carrying out fuzzy processing on the low-resolution image to obtain a fuzzy image corresponding to the first image and displaying the fuzzy image;
And the display module is used for replacing the blurred image according to the first image to display the first image if the first image is loaded.
In some embodiments of the invention, the first processing module is configured to:
determining a first sampling rate of the first image according to a first image parameter of the first image and preset first sampling data; the preset first sampling data comprise a plurality of image parameters and preset sampling rates corresponding to the image parameters;
and compressing the first image according to the first sampling rate to obtain a low-resolution image corresponding to the first image.
In some embodiments of the invention, the first processing module is configured to:
acquiring the memory occupied by the first image and the residual memory of the terminal equipment;
if the memory occupied by the first image is smaller than the residual memory of the terminal equipment, determining to obtain a first sampling rate of the first image according to a first image parameter of the first image and preset first sampling data.
In some embodiments of the invention, the second processing module is configured to:
determining and obtaining a first fuzzy parameter according to a second image parameter of the low-resolution image and preset first fuzzy data; the preset first fuzzy data comprise a plurality of image parameters and preset fuzzy parameters corresponding to each image parameter;
Adjusting a preset initial fuzzy model according to the first fuzzy parameters to obtain a target fuzzy model;
and carrying out fuzzy processing on the low-resolution image according to the target fuzzy model to obtain a fuzzy image corresponding to the first image.
In some embodiments of the present invention, an image display apparatus includes:
determining a sampling sequence and a blurring sequence corresponding to the first image;
the sampling sequence comprises at least one sampling rate; the fuzzy sequence comprises at least one fuzzy parameter, and each sampling rate corresponds to one fuzzy parameter;
determining a target sampling rate in the sampling sequence;
compressing the first image according to the target sampling rate to obtain a low-resolution image corresponding to the first image;
selecting a target fuzzy parameter corresponding to the target sampling rate from the fuzzy sequence according to the target sampling rate;
and carrying out blurring processing on the low-resolution image corresponding to the first image according to the target blurring parameter to obtain a blurred image corresponding to the first image, and displaying the blurred image corresponding to the first image.
In some embodiments of the invention, the first processing module is configured to:
acquiring screen resolution, screen pixel density and size information of a display screen of the terminal equipment;
Determining and obtaining the resolution ratio of the terminal equipment according to the screen resolution and the screen pixel density;
determining a display area of the display screen according to the resolution ratio and the size information;
determining a first sampling rate according to the display area and the corresponding relation between the preset display area and the sampling rate;
and carrying out image compression processing on the first image according to the first sampling rate to obtain a low-resolution image corresponding to the first image.
In some embodiments of the invention, the first processing module is configured to:
acquiring an image area to be sampled in a first image;
and compressing the image area to be sampled in the first image according to the first sampling rate to obtain a low-resolution image corresponding to the first image.
In some embodiments of the invention, the first processing module is configured to:
comparing the performance parameter of the terminal equipment with a preset performance parameter threshold;
if the performance parameter of the terminal equipment is matched with a preset performance parameter threshold, performing image detection on the first image, and determining an image area to be sampled in the first image according to a detection result; the detection result represents the richness of the image information in the first image;
if the performance parameter of the terminal equipment is not matched with the preset performance parameter, setting an image area in a preset window in the first image as an image area to be sampled.
In some embodiments of the invention, a display module is configured to:
if the loading of the first image is completed within the preset time length, covering the blurred image according to the first image so as to display the first image;
if the first image is not loaded in the preset time period, stopping loading the first image, and continuing to display the blurred image.
In the image display device provided by the embodiment of the invention, in the first image loading process, the blurred image obtained after compression processing and blurring processing is displayed first, and the blurred image with the resolution lower than that of the first image is displayed first, so that the waiting time of image display is shortened, and when the first image loading is completed, the blurred image is replaced according to the first image, so that the first image with higher resolution is displayed, and the visual effect of image display is ensured.
Accordingly, an embodiment of the present invention further provides a terminal device, as shown in fig. 6, where the terminal device may include a Radio Frequency (RF) circuit 601, a memory 602 including one or more computer readable storage media, an input unit 603, a display unit 604, a sensor 605, an audio circuit 606, a wireless fidelity (WiFi, wireless Fidelity) module 607, a processor 608 including one or more processing cores, and a power supply 609. It will be appreciated by those skilled in the art that the terminal device structure shown in fig. 6 is not limiting of the terminal device and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components. Wherein:
The RF circuit 601 may be used for receiving and transmitting signals during a message or a call, and in particular, after receiving downlink information of a base station, the downlink information is processed by one or more processors 608; in addition, data relating to uplink is transmitted to the base station. Typically, RF circuitry 601 includes, but is not limited to, an antenna, at least one amplifier, a tuner, one or more oscillators, a subscriber identity module (SIM, subscriber Identity Module) card, a transceiver, a coupler, a low noise amplifier (LNA, low Noise Amplifier), a duplexer, and the like. In addition, the RF circuitry 601 may also communicate with networks and other devices through wireless communications. The wireless communication may use any communication standard or protocol including, but not limited to, global system for mobile communications (GSM, global System of Mobile communication), general packet radio service (GPRS, general Packet Radio Service), code division multiple access (CDMA, code Division Multiple Access), wideband code division multiple access (WCDMA, wideband Code Division Multiple Access), long term evolution (LTE, long Term Evolution), email, short message service (SMS, short Messaging Service), and the like.
The memory 602 may be used to store software programs and modules that are stored in the memory 602 for execution by the processor 608 to perform various functional applications and data processing. The memory 602 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like; the storage data area may store data (such as audio data, phonebook, etc.) created according to the use of the terminal device, and the like. In addition, the memory 602 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 602 may also include a memory controller to provide access to the memory 602 by the processor 608 and the input unit 603.
The input unit 603 may be used to receive input numeric or character information and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. In particular, in one particular embodiment, the input unit 603 may include a touch-sensitive surface, as well as other input devices. The touch-sensitive surface, also referred to as a touch display screen or a touch pad, may collect touch operations thereon or thereabout by a user (e.g., operations thereon or thereabout by a user using any suitable object or accessory such as a finger, stylus, etc.), and actuate the corresponding connection means according to a predetermined program. Alternatively, the touch-sensitive surface may comprise two parts, a touch detection device and a touch controller. The touch detection device detects the touch azimuth of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device and converts it into touch point coordinates, which are then sent to the processor 608, and can receive commands from the processor 608 and execute them. In addition, touch sensitive surfaces may be implemented in a variety of types, such as resistive, capacitive, infrared, and surface acoustic waves. The input unit 603 may comprise other input devices in addition to a touch sensitive surface. In particular, other input devices may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, mouse, joystick, etc.
The display unit 604 may be used to display information input by a user or information provided to the user and various graphical user interfaces of the terminal device, which may be composed of graphics, text, icons, video and any combination thereof. The display unit 604 may include a display panel, which may be optionally configured in the form of a liquid crystal display (LCD, liquid Crystal Display), an Organic Light-Emitting Diode (OLED), or the like. Further, the touch-sensitive surface may overlay a display panel, and upon detection of a touch operation thereon or thereabout, the touch-sensitive surface is passed to the processor 608 to determine the type of touch event, and the processor 608 then provides a corresponding visual output on the display panel based on the type of touch event. Although in fig. 6 the touch sensitive surface and the display panel are implemented as two separate components for input and output functions, in some embodiments the touch sensitive surface may be integrated with the display panel to implement the input and output functions.
The terminal device may also include at least one sensor 605, such as a light sensor, a motion sensor, and other sensors. In particular, the light sensor may comprise an ambient light sensor, which may adjust the brightness of the display panel according to the brightness of ambient light, and a proximity sensor, which may turn off the display panel and/or the backlight when the terminal device is moved to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the acceleration in all directions (generally three axes), and can detect the gravity and the direction when the mobile phone is stationary, and can be used for applications of recognizing the gesture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometer and knocking), and the like; other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc. that may also be configured for the terminal device are not described in detail herein.
Audio circuitry 606, speakers, and a microphone may provide an audio interface between the user and the terminal device. The audio circuit 606 may transmit the received electrical signal after audio data conversion to a speaker, where the electrical signal is converted to a sound signal for output; on the other hand, the microphone converts the collected sound signals into electrical signals, which are received by the audio circuit 606 and converted into audio data, which are processed by the audio data output processor 608 for transmission via the RF circuit 601 to, for example, another terminal device, or which are output to the memory 602 for further processing. The audio circuit 606 may also include an ear bud jack to provide communication of the peripheral ear bud with the terminal device.
The WiFi belongs to a short-distance wireless transmission technology, and the terminal device can help the user to send and receive e-mail, browse web pages, access streaming media and the like through the WiFi module 607, so that wireless broadband internet access is provided for the user. Although fig. 6 shows a WiFi module 607, it is understood that it does not belong to the essential constitution of the terminal device, and can be omitted entirely as required within the scope of not changing the essence of the invention.
The processor 608 is a control center of the terminal device, and connects various parts of the entire mobile phone using various interfaces and lines, and performs various functions of the terminal device and processes data by running or executing software programs and/or modules stored in the memory 602, and calling data stored in the memory 602, thereby performing overall monitoring of the mobile phone. Optionally, the processor 608 may include one or more processing cores; preferably, the processor 608 may integrate an application processor that primarily handles operating systems, user interfaces, applications, etc., with a modem processor that primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 608.
The terminal device further includes a power source 609 (e.g., a battery) for powering the various components, which may be logically connected to the processor 608 via a power management system so as to provide for managing charging, discharging, and power consumption by the power management system. The power supply 609 may also include one or more of any components, such as a direct current or alternating current power supply, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
Although not shown, the terminal device may further include a camera, a bluetooth module, etc., which will not be described herein. Specifically, in this embodiment, the processor 608 in the terminal device loads executable files corresponding to the processes of one or more application programs into the memory 602 according to the following instructions, and the processor 608 executes the application programs stored in the memory 602, so as to implement various functions:
loading a first image to be displayed;
compressing the first image to obtain a low-resolution image corresponding to the first image;
performing blurring processing on the low-resolution image to obtain a blurred image corresponding to the first image, and displaying the blurred image;
And if the first image loading is completed, replacing the blurred image according to the first image so as to display the first image.
Those of ordinary skill in the art will appreciate that all or a portion of the steps of the various methods of the above embodiments may be performed by instructions, or by instructions controlling associated hardware, which may be stored in a computer-readable storage medium and loaded and executed by a processor.
To this end, an embodiment of the present invention provides a storage medium having stored therein a plurality of instructions capable of being loaded by a processor to perform the steps of any one of the image display methods provided by the embodiments of the present invention. For example, the instructions may perform the steps of:
loading a first image to be displayed;
compressing the first image to obtain a low-resolution image corresponding to the first image;
performing blurring processing on the low-resolution image to obtain a blurred image corresponding to the first image, and displaying the blurred image;
and if the first image loading is completed, replacing the blurred image according to the first image so as to display the first image.
The specific implementation of each operation above may be referred to the previous embodiments, and will not be described herein.
Wherein the storage medium may include: read Only Memory (ROM), random access Memory (RAM, random Access Memory), magnetic or optical disk, and the like.
The instructions stored in the storage medium can execute the steps in any image display method provided by the embodiment of the present invention, so that the beneficial effects that any image display method provided by the embodiment of the present invention can be achieved, and detailed descriptions of the previous embodiments are omitted herein.
The foregoing describes in detail an image display method, apparatus, terminal device and storage medium provided in the embodiments of the present invention, and specific examples are applied to illustrate the principles and embodiments of the present invention, where the foregoing examples are only used to help understand the method and core idea of the present invention; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in light of the ideas of the present invention, the present description should not be construed as limiting the present invention.
Claims (12)
1. An image display method, the method comprising:
loading a first image to be displayed;
Compressing the first image to obtain a low-resolution image corresponding to the first image;
performing blurring processing on the low-resolution image to obtain a blurred image corresponding to the first image, and displaying the blurred image;
and if the first image loading is completed, replacing the blurred image according to the first image so as to display the first image.
2. The method for displaying an image according to claim 1, wherein the compressing the first image to obtain a low resolution image corresponding to the first image includes:
determining a first sampling rate of the first image according to a first image parameter of the first image and preset first sampling data; the preset first sampling data comprise a plurality of image parameters and preset sampling rates corresponding to the image parameters;
and compressing the first image according to the first sampling rate to obtain a low-resolution image corresponding to the first image.
3. The image displaying method according to claim 2, wherein determining a first sampling rate of the first image according to the first image parameter of the first image and preset first sampling data includes:
Acquiring the memory occupied by the first image and the residual memory of the terminal equipment;
if the memory occupied by the first image is smaller than the residual memory of the terminal equipment, determining to obtain a first sampling rate of the first image according to a first image parameter of the first image and preset first sampling data.
4. The image displaying method according to claim 1, wherein the blurring the low-resolution image to obtain a blurred image corresponding to the first image includes:
determining and obtaining a first fuzzy parameter according to a second image parameter of the low-resolution image and preset first fuzzy data; the preset first fuzzy data comprise a plurality of image parameters and preset fuzzy parameters corresponding to each image parameter;
adjusting a preset initial fuzzy model according to the first fuzzy parameters to obtain a target fuzzy model;
and carrying out fuzzy processing on the low-resolution image according to the target fuzzy model to obtain a fuzzy image corresponding to the first image.
5. The image display method according to claim 1, wherein the compressing the first image to obtain a low resolution image corresponding to the first image, and the blurring the low resolution image to obtain a blurred image corresponding to the first image, and displaying the blurred image comprises:
Determining a sampling sequence and a blurring sequence corresponding to the first image;
the sampling sequence comprises at least one sampling rate; the fuzzy sequence comprises at least one fuzzy parameter, and each sampling rate corresponds to one fuzzy parameter;
determining a target sampling rate in the sampling sequence;
compressing the first image according to the target sampling rate to obtain a low-resolution image corresponding to the first image;
selecting a target fuzzy parameter corresponding to the target sampling rate from the fuzzy sequence according to the target sampling rate;
and carrying out blurring processing on the low-resolution image corresponding to the first image according to the target blurring parameter to obtain a blurred image corresponding to the first image, and displaying the blurred image corresponding to the first image.
6. The method for displaying an image according to claim 1, wherein the compressing the first image to obtain a low resolution image corresponding to the first image includes:
acquiring screen resolution, screen pixel density and size information of a display screen of a terminal device;
determining and obtaining the resolution ratio of the terminal equipment according to the screen resolution and the screen pixel density;
Determining a display area of the display screen according to the resolution ratio and the size information;
determining a first sampling rate according to the display area and the corresponding relation between the preset display area and the sampling rate;
and carrying out image compression processing on the first image according to the first sampling rate to obtain a low-resolution image corresponding to the first image.
7. The method of claim 6, wherein performing image compression processing on the first image according to the first sampling rate to obtain a low resolution image corresponding to the first image comprises:
acquiring an image area to be sampled in the first image;
and compressing the image area to be sampled in the first image according to the first sampling rate to obtain a low-resolution image corresponding to the first image.
8. The image presentation method of claim 7, wherein the acquiring the image region to be sampled in the first image comprises:
comparing the performance parameter of the terminal equipment with a preset performance parameter threshold;
if the performance parameter of the terminal equipment is matched with a preset performance parameter threshold, performing image detection on the first image, and determining an image area to be sampled in the first image according to a detection result; the detection result represents the richness of the image information in the first image;
And if the performance parameters of the terminal equipment are not matched with the preset performance parameters, setting an image area in a preset window in the first image as an image area to be sampled.
9. The image presentation method according to any one of claims 1 to 8, wherein if the first image loading is completed, the blurred image is overlaid according to the first image to display the first image, the method comprising:
if the first image is loaded in the preset time, covering the blurred image according to the first image so as to display the first image;
and if the first image is not loaded in the preset time, stopping loading the first image, and continuing to display the blurred image.
10. An image display device, the device comprising:
the acquisition module is used for loading a first image to be displayed;
the first processing module is used for compressing the first image to obtain a low-resolution image corresponding to the first image;
the second processing module is used for carrying out blurring processing on the low-resolution image to obtain a blurred image corresponding to the first image, and displaying the blurred image;
And the display module is used for replacing the blurred image according to the first image if the first image is loaded, so as to display the first image.
11. A terminal device comprising a memory and a processor; the memory stores an application program, and the processor is configured to execute the application program in the memory to perform the operations in the image presentation method according to any one of claims 1 to 9.
12. A storage medium storing a plurality of instructions adapted to be loaded by a processor to perform the steps of the image presentation method of any one of claims 1 to 9.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211241755.1A CN117170761A (en) | 2022-10-11 | 2022-10-11 | Image display method, device, terminal equipment and storage medium |
PCT/CN2023/112054 WO2024078110A1 (en) | 2022-10-11 | 2023-08-09 | Image display method and apparatus, and terminal device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211241755.1A CN117170761A (en) | 2022-10-11 | 2022-10-11 | Image display method, device, terminal equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117170761A true CN117170761A (en) | 2023-12-05 |
Family
ID=88928685
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211241755.1A Pending CN117170761A (en) | 2022-10-11 | 2022-10-11 | Image display method, device, terminal equipment and storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN117170761A (en) |
WO (1) | WO2024078110A1 (en) |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101577440B1 (en) * | 2008-12-29 | 2015-12-15 | 삼성전자주식회사 | Apparatus and method for processing a digital image |
CN106681745A (en) * | 2015-11-09 | 2017-05-17 | 五八同城信息技术有限公司 | Picture loading method and terminal |
CN110647702B (en) * | 2019-09-12 | 2022-06-17 | 北京无限光场科技有限公司 | Picture preloading method and device, electronic equipment and readable medium |
-
2022
- 2022-10-11 CN CN202211241755.1A patent/CN117170761A/en active Pending
-
2023
- 2023-08-09 WO PCT/CN2023/112054 patent/WO2024078110A1/en unknown
Also Published As
Publication number | Publication date |
---|---|
WO2024078110A1 (en) | 2024-04-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10986332B2 (en) | Prediction mode selection method, video encoding device, and storage medium | |
US9697622B2 (en) | Interface adjustment method, apparatus, and terminal | |
JP2004086550A (en) | Display image updating system | |
CN105447819B (en) | Image processing method and device | |
CN110443171B (en) | Video file classification method and device, storage medium and terminal | |
CN111223438B (en) | Compression method and device of pixel compensation table | |
CN103488450A (en) | Method, device and terminal equipment for projecting picture | |
CN105992001B (en) | A kind of pair of picture carries out the method and device of quantification treatment | |
CN111949239B (en) | Screen sharing method and device, storage medium and terminal | |
CN108564539B (en) | Method and device for displaying image | |
CN106937371A (en) | A kind of background GTG that switches carries out method, device and the mobile terminal of power saving | |
CN115103210A (en) | Information processing method, device, terminal and storage medium | |
CN117170761A (en) | Image display method, device, terminal equipment and storage medium | |
CN114063962B (en) | Image display method, device, terminal and storage medium | |
CN111263216A (en) | Video transmission method, device, storage medium and terminal | |
CN114442346B (en) | Method and device for calculating ghost of display panel, storage medium and terminal equipment | |
CN108269223B (en) | Webpage graph drawing method and terminal | |
CN113469923B (en) | Image processing method and device, electronic equipment and storage medium | |
CN106982389B (en) | Video type identification method and device | |
CN105187831B (en) | A kind of method and apparatus that image is compressed | |
CN114155142A (en) | Image processing method, image processing device, computer-readable storage medium and computer equipment | |
CN109003313B (en) | Method, device and system for transmitting webpage picture | |
CN104932871A (en) | A method and device for displaying multimedia information | |
CN114418893A (en) | Image processing method, image processing apparatus, electronic device, storage medium, and program product | |
CN112819938B (en) | Information processing method, device and computer readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |