CN107172425B - Thumbnail generation method and device and terminal equipment - Google Patents

Thumbnail generation method and device and terminal equipment Download PDF

Info

Publication number
CN107172425B
CN107172425B CN201610127851.1A CN201610127851A CN107172425B CN 107172425 B CN107172425 B CN 107172425B CN 201610127851 A CN201610127851 A CN 201610127851A CN 107172425 B CN107172425 B CN 107172425B
Authority
CN
China
Prior art keywords
image
decoding
sampling
thumbnail
size
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.)
Active
Application number
CN201610127851.1A
Other languages
Chinese (zh)
Other versions
CN107172425A (en
Inventor
李睿
袁磊
石松然
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201610127851.1A priority Critical patent/CN107172425B/en
Publication of CN107172425A publication Critical patent/CN107172425A/en
Application granted granted Critical
Publication of CN107172425B publication Critical patent/CN107172425B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/132Sampling, masking or truncation of coding units, e.g. adaptive resampling, frame skipping, frame interpolation or high-frequency transform coefficient masking
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/59Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial sub-sampling or interpolation, e.g. alteration of picture size or resolution

Abstract

The embodiment of the invention discloses thumbnail generation methods, devices and terminal equipment.

Description

Thumbnail generation method and device and terminal equipment
Technical Field
The embodiment of the invention relates to an image processing technology, in particular to a thumbnail generation method, a thumbnail generation device and terminal equipment.
Background
The thumbnail image service is used as basic services of the internet and has a large number of applications in websites, in which an image in an image format implemented in block compression is used as a current image industry standard, such as an image in JPEG format.
In a conventional thumbnail generation method, an entire image is decoded to obtain a decoded image, the decoded image is sampled according to a target thumbnail size to obtain a thumbnail image, and the thumbnail image is encoded to generate a target thumbnail. For the image with higher resolution, the decoded image obtained after complete decoding can occupy the memory space up to the GB level, thus causing the great consumption of the memory space, if the memory is insufficient, the temporary file cache of the hard disk can be adopted, and because the intermediate file is difficult to clean, the situation of full writing of the hard disk is easily caused, and simultaneously, the generation efficiency of the thumbnail is reduced.
Disclosure of Invention
The embodiment of the invention provides thumbnail generation methods, devices and terminal equipment, which avoid the problem of overlarge memory occupied by a decoded image and improve the thumbnail generation efficiency.
, an embodiment of the present invention provides methods for generating thumbnails, including:
determining the size of an image to be contracted and the size of a target thumbnail, wherein the image to be contracted is a block compressed image;
determining a decoding sampling parameter according to the size of the image to be subjected to the thumbnail and the size of the target thumbnail;
sampling and decoding the image to be contracted according to the decoding sampling parameter to generate a decoded image;
and generating a target thumbnail according to the size of the decoded image and the size of the target thumbnail.
In a second aspect, an embodiment of the present invention further provides kinds of thumbnail generation apparatuses, where the apparatus includes:
the size determining module is used for determining the size of an image to be contracted and the size of a target thumbnail, wherein the image to be contracted is a block compressed image;
the decoding sampling parameter determining module is used for determining a decoding sampling parameter according to the size of the image to be subjected to the thumbnail and the size of the target thumbnail;
the decoding image generating module is used for sampling and decoding the image to be contracted according to the decoding sampling parameter to generate a decoding image;
and the target thumbnail generation module is used for generating a target thumbnail according to the size of the decoded image and the size of the target thumbnail.
In a third aspect, an embodiment of the present invention further provides types of terminal devices, including the thumbnail generation apparatus provided in any embodiment of the present invention.
According to the technical scheme provided by the embodiment of the invention, the decoding sampling parameters are obtained according to the sizes of the image to be contracted and the target thumbnail, and the decoding sampling parameters are used in the sampling and decoding process, so that the size of the decoded image is reduced, the problem that the decoded image occupies too large memory after being completely decoded is solved, and the generation efficiency of the thumbnail is improved.
Drawings
FIG. 1 is a flowchart of thumbnail generation methods provided by embodiment of the present invention;
FIG. 2 is a flowchart illustrating a method for generating thumbnails according to a second embodiment of the present invention;
FIG. 3 is a process diagram of a thumbnail generation method in the prior art;
fig. 4 is a process diagram of thumbnail generation methods according to the second embodiment of the present invention;
fig. 5 is a schematic structural diagram of thumbnail generation apparatuses according to a third embodiment of the present invention;
fig. 6 is a schematic structural diagram of kinds of terminal devices according to a third embodiment of the present invention.
Detailed Description
The present invention will now be described in further detail with reference to the drawings and examples, it being understood that the specific embodiments herein described are merely illustrative of and not restrictive on the broad invention, and it should be further noted that for the purposes of description, only some, but not all, of the structures associated with the present invention are shown in the drawings.
Example
Fig. 1 is a flowchart of thumbnail generation methods provided by in an embodiment of the present invention, which may be applied to the case of generating thumbnails, the methods may be executed by a thumbnail generation apparatus, which may be implemented by hardware and/or software, and referring to fig. 1, the thumbnail generation method provided by the present embodiment specifically includes the following steps:
s110, determining the size of an image to be contracted and the size of a target thumbnail, wherein the image to be contracted is a block compressed image.
The block compressed image refers to an image obtained by compression coding of each image block with a fixed size in the image, the size of the image to be contracted can be obtained by reading from header file information of the image to be contracted, and the size of the target thumbnail can be obtained from a target thumbnail size parameter input by a user.
And S120, determining a decoding sampling parameter according to the size of the image to be reduced and the size of the target thumbnail.
The decoding sampling parameter is a sampling parameter value used in the decoding process of the image to be reduced. In order to reduce the memory occupation amount of the image to be reduced after sample decoding, the decoding sampling parameter is not less than 1. For example, if the size of the image to be thumbnail is larger than that of the target thumbnail, the decoding sampling parameter may be selected from preset block values; if the size of the image to be thumbnail is smaller than or equal to the size of the target thumbnail, the sampling parameter value may be determined to be 1, or no sampling may be performed.
And S130, sampling and decoding the image to be contracted according to the decoding sampling parameter to generate a decoded image.
Wherein, the sampling decoding is a process of adding sampling operation in the process of inverse operation of the thumbnail images according to the encoding rule. The decoded image is an image obtained by sampling and decoding the thumbnail image.
The sampling decoding process can be that entropy decoding is carried out on a plurality of color component units in the image to be contracted to obtain th decoded image, inverse quantization is carried out on the th decoded image to obtain a second decoded image, inverse discrete cosine transformation is carried out on the second decoded image to obtain a third decoded image, the third decoded image is sampled according to the decoding sampling parameters to generate a th sampling matrix, and if sampling decoding is carried out on all the color component units in the image to be contracted, a complete decoded image is generated according to a th sampling matrix obtained by sampling decoding all the color component units.
The th decoded image is an image obtained by entropy decoding color component units in an image to be reduced, the second decoded image is an image obtained by inverse quantization of a th decoded image, the third decoded image is an image obtained by inverse discrete cosine transform of the second decoded image, the th sampling matrix is an image obtained by calculation of the third decoded image through a sampling algorithm, the decoded image is an image obtained by integrating a th sampling matrix obtained by sampling and decoding all color component units in the image to be reduced, and the sampling algorithm can be any method for realizing sampling, for example, the method can be used for replacing a plurality of pixels with the mean value of the plurality of pixels to realize sampling.
The process of sample decoding may also be: performing entropy decoding on a plurality of color component units in the image to be subjected to the thumbnail to obtain a fourth decoded image; carrying out inverse quantization on the fourth decoded image to obtain a fifth decoded image; sampling the fifth decoded image according to the decoding sampling parameters to obtain a second sampling matrix; performing inverse discrete cosine transform on the second sampling matrix to generate a sixth decoding matrix; and if all the color component units in the image to be reduced are decoded and sampled, generating a complete decoded image according to a sixth decoding matrix obtained by decoding and sampling all the color component units.
The fourth decoded image is an image obtained by entropy decoding a color component unit in the image to be subjected to the thumbnail; the fifth decoded image is an image obtained by inverse quantization of the fourth decoded image; the second sampling matrix is an image obtained by calculating a sampling algorithm of the fifth decoded image; the sixth decoded image is an image obtained by inverse discrete cosine transforming the second sampling matrix. Sampling the fifth decoded image before inverse discrete cosine transform, so that the number of pixel points of the sixth decoded image which needs to be subjected to inverse discrete cosine transform is reduced, the efficiency of inverse discrete cosine transform of the image is improved, and the efficiency of thumbnail generation is improved.
And S140, generating a target thumbnail according to the size of the decoded image and the size of the target thumbnail.
In order to generate a target thumbnail image according to a decoded image, and generate a target thumbnail according to a size of the decoded image and a size of the target thumbnail, the generating may specifically include: if the size of the decoded image is equal to the size of the target thumbnail, encoding the decoded image to generate a target thumbnail; otherwise, obtaining a thumbnail parameter according to the size of the decoded image and the size of the target thumbnail, and sampling and encoding the decoded image according to the thumbnail parameter to generate the target thumbnail.
The sampling process when generating the target thumbnail is similar to the above-mentioned sampling process when generating the decoded image, and the sampling process can also be realized by a sampling algorithm, and the encoding refers to a process of generating a block compressed image according to the decoded image.
According to the method and the device, the decoding sampling parameters are obtained by utilizing the sizes of the image to be contracted and the target thumbnail, and the decoding sampling parameters are used in the sampling and decoding process, so that the size of the decoded image is reduced, the problem that the decoded image occupies too large memory after being completely decoded is solved, and the generation efficiency of the thumbnail is improved.
Example two
Fig. 2 is a flowchart of thumbnail generating methods according to a second embodiment of the present invention, and referring to fig. 2, the thumbnail generating method according to the present embodiment specifically includes the following steps:
and S210, determining the size of the image to be thumbnail and the size of the target thumbnail.
In the embodiment, the image to be thumbnail is an image in JPEG encoding format for example, fig. 3 is a schematic process diagram of thumbnail generation methods provided in the second embodiment of the present invention, referring to fig. 3, size 160 × 90 pixels of the target thumbnail is obtained, and size 3840 × 2160 pixels of the image to be thumbnail is obtained by reading the file header information of the image to be thumbnail.
And S220, dividing the size of the image to be contracted by a preset block value to obtain a current sampling parameter.
S230, if the current sampling parameter is larger than or equal to the size of the target thumbnail, taking the preset block value as a decoding sampling parameter; otherwise, performing value reduction processing on the preset block numerical value, and executing the operation of dividing the size of the image to be contracted by the preset block numerical value by using the preset block numerical value after the value reduction processing until a decoding adopted parameter is determined.
The initial value of the preset block value used in the th division operation may be the size of a color component unit in the image to be thumbnail, the color component unit is a data unit representing a color component in the image, for example, the image is in YUV format, and the color component unit may be a data unit representing a Y component in the image, if the data unit of the Y component is a matrix of 8 × 8, the preset block value used in the th division operation is 8.
In step , the preset block number used in each division operation may be a power of 2, and specifically, the preset block number may be 8, 4, or 2.
For example, when the preset block value adopted by the th division operation is 8, the width or height of the image to be thumbnail is divided by 8, if the obtained quotient is greater than or equal to the width or height of the target thumbnail, 8 is used as a decoding sampling parameter, if the obtained quotient is less than the width or height of the target thumbnail, 4 is used as the preset block value, the width or height of the image to be thumbnail is divided by the preset block value, if the obtained quotient is greater than or equal to the width or height of the target thumbnail, 4 is used as a decoding sampling parameter, if the obtained quotient is less than the width or height of the target thumbnail, 2 is used as the preset block value, the width or height of the image to be thumbnail is divided by the preset block value, if the obtained quotient is greater than or equal to the width or height of the target thumbnail, 2 is used as a decoding sampling parameter, and if the obtained quotient is less than the width or height of the target thumbnail, 1 is used as a decoding sampling parameter, or no sampling operation is performed.
Referring to fig. 3, dividing 3840 pixels of the size width of the image to be thumbnail by a preset block value of 8 to obtain a current sampling parameter of 480; and if the current sampling parameter 480 is larger than the width 160 pixels of the target thumbnail, taking the preset block value of 8 as a decoding sampling parameter.
S240, sampling and decoding the image to be contracted according to the decoding sampling parameter to generate a decoding image.
Preferably, a plurality of color component units in the image to be reduced are subjected to entropy decoding and inverse quantization, and then the obtained image is sampled by using a decoding sampling parameter to obtain a second sampling matrix; performing inverse discrete cosine transform on the second sampling matrix to generate a sixth decoding matrix; and generating a complete decoded image according to a sixth decoding matrix obtained by decoding and sampling all the color component units, wherein the size of the decoded image is 480 × 270 pixels. The efficiency of inverse discrete cosine transform of the image is improved by sampling the image obtained after inverse quantization and then performing inverse discrete cosine transform, thereby improving the efficiency of thumbnail generation.
And S250, generating a target thumbnail according to the size of the decoded image and the size of the target thumbnail.
To generate a target thumbnail image, the size of the decoded image and the size of the target thumbnail are first compared, wherein the size of the target thumbnail is 160 × 90 pixels. The decoded image is sampled again because the size of the decoded image is larger than the size of the target thumbnail, the sampling parameter is the ratio of the width in the size of the decoded image to the target thumbnail, and the ratio of the width in the size of the decoded image to the target thumbnail is calculated to be 3. And sampling the decoded image by using the sampling parameters, and finally coding the sampled decoded image to generate a target thumbnail in a JPEG coding format.
Fig. 4 is a process diagram of a thumbnail generation method in the prior art. Referring to fig. 4, the image to be reduced in JPEG encoded format with size of 3840 × 2160 pixels generates a decoded image with 3840 × 2160 pixels after decoding, wherein each color component unit is a matrix of 8 × 8, and the bit number of the memory occupied by each matrix of 8 × 8 is 64 × 8. Referring to fig. 3, each color component unit in the decoded image of this embodiment is a 1 × 1 matrix, and the number of bits of the memory occupied by each 1 × 1 matrix is 1 × 8. As can be seen from comparison, the memory occupied amount of the decoded image of this embodiment is much smaller than that of the decoded image in the prior art.
According to the method and the device, the decoding sampling parameters are obtained according to the sizes of the to-be-reduced image and the target thumbnail of which the encoding format is the JPEG format, and the decoding sampling parameters are used in the sampling decoding process, so that the memory occupation of the decoding image is reduced, and the generation efficiency of the thumbnail is improved.
EXAMPLE III
Referring to fig. 5, the thumbnail generating apparatus 01 provided in this embodiment specifically includes a size determining module 10, a decoded sample parameter determining module 20, a decoded image generating module 30, and a target thumbnail generating module 40.
The size determining module 10 may be configured to determine a size of an image to be thumbnail and a size of a target thumbnail, where the image to be thumbnail is a block compressed image; the decoding sampling parameter determining module 20 may be configured to determine a decoding sampling parameter according to the size of the image to be thumbnail and the size of the target thumbnail; the decoded image generating module 30 may be configured to perform sampling decoding on the image to be thumbnail according to the decoding sampling parameter, so as to generate a decoded image; the destination thumbnail generation module 40 may be configured to generate a destination thumbnail according to the size of the decoded image and the size of the destination thumbnail.
, the decoding sampling parameter determining module 20 may include a sampling parameter calculating unit, a sampling parameter determining unit, and a preset block data determining unit, wherein the sampling parameter calculating unit may be configured to divide the size of the image to be reduced by a preset block value to obtain a current sampling parameter, the sampling parameter determining unit may be configured to use the preset block value as the decoding sampling parameter if the current sampling parameter is greater than or equal to the size of the target thumbnail, the preset block data determining unit may be configured to perform a value reduction process on the preset block value when the current sampling parameter is smaller than the size of the target thumbnail, and when the current sampling parameter is smaller than the size of the target thumbnail, the sampling parameter calculating unit calculates a current sampling parameter by using the preset block value determined by the preset block data determining unit until the sampling parameter is determined by the sampling parameter determining unit.
Optionally, the decoded picture generation module 30 may include an th decoding unit, a second decoding unit, a third decoding unit, a th sampling unit, and a th decoded picture unit.
The th decoding unit may be configured to perform entropy decoding on a plurality of color component units in the image to be reduced to obtain a th decoded image, the second decoding unit may be configured to perform inverse quantization on the th decoded image to obtain a second decoded image, the third decoding unit may be configured to perform inverse discrete cosine transform on the second decoded image to obtain a third decoded image, the th sampling unit may be configured to sample the third decoded image according to the decoding sampling parameters to generate a th sampling matrix, and the th decoded image unit may be configured to generate a complete decoded image according to the th sampling matrix obtained by performing sampling decoding on all the color component units in the image to be reduced if all the color component units in the image to be reduced are subjected to sampling decoding.
Preferably, the decoded image generating module 30 may include: the image decoding device comprises a fourth decoding unit, a fifth decoding unit, a second sampling unit, a sixth decoding unit and a second decoded image unit.
The fourth decoding unit is used for performing entropy decoding on the multiple color component units in the image to be subjected to the thumbnail to obtain a fourth decoded image; a fifth decoding unit, configured to perform inverse quantization on the fourth decoded image to obtain a fifth decoded image; the second sampling unit is used for sampling the fifth decoded image according to the decoding sampling parameters to obtain a second sampling matrix; a sixth decoding unit, configured to perform inverse discrete cosine transform on the second sampling matrix to generate a sixth decoding matrix; and the second decoding image unit is used for generating a complete decoding image according to a sixth decoding matrix obtained by decoding and sampling all the color component units if all the color component units in the image to be reduced are decoded and sampled.
Further , the destination thumbnail generation module 40 may be configured to encode the decoded image to generate a destination thumbnail if the size of the decoded image is equal to the size of the destination thumbnail, otherwise, obtain a thumbnail parameter according to the size of the decoded image and the size of the destination thumbnail, and sample and encode the decoded image according to the thumbnail parameter to generate the destination thumbnail.
The thumbnail generation apparatus provided in this embodiment is similar to the thumbnail generation method provided in any embodiment of the present invention, and belongs to the same concept as , and can execute the thumbnail generation method provided in any embodiment of the present invention, and has functional modules and beneficial effects corresponding to the execution of the thumbnail generation method.
Fig. 6 is a schematic structural diagram of types of terminal devices provided in the third embodiment of the present invention, and as shown in fig. 6, this embodiment further provides types of terminal devices 100 including the thumbnail generation apparatus 01 provided in any of the above embodiments.
The product can execute the method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1, thumbnail generation method, characterized by comprising:
determining the size of an image to be contracted and the size of a target thumbnail, wherein the image to be contracted is a block compressed image;
determining a decoding sampling parameter according to the size of the image to be subjected to the thumbnail and the size of the target thumbnail;
sampling and decoding the image to be contracted according to the decoding sampling parameter to generate a decoded image;
generating a target thumbnail according to the size of the decoded image and the size of the target thumbnail;
determining a decoding sampling parameter according to the size of the image to be subjected to the thumbnail and the size of the target thumbnail, wherein the determining of the decoding sampling parameter comprises the following steps:
dividing the size of the image to be subjected to the thumbnail by a preset block value to obtain a current sampling parameter, wherein an initial value of the preset block value is the size of a color component unit in the image to be subjected to the thumbnail;
if the current sampling parameter is larger than or equal to the size of the target thumbnail, taking the preset block value as a decoding sampling parameter;
otherwise, performing value reduction processing on the preset block numerical value, and executing the operation of dividing the size of the image to be contracted by the preset block numerical value by using the preset block numerical value after the value reduction processing until a decoding adopted parameter is determined.
2. The method of claim 1, wherein each division operation uses a predetermined block value that is a power of 2.
3. The method of claim 1, wherein performing sample decoding on the image to be reduced according to the decoding sample parameter to generate a decoded image comprises:
entropy decoding a plurality of color component units in the image to be subjected to the thumbnail to obtain decoded image;
carrying out inverse quantization on the th decoded image to obtain a second decoded image;
performing inverse discrete cosine transform on the second decoded image to obtain a third decoded image;
sampling the third decoded image according to the decoding sampling parameters to generate an th sampling matrix;
and if all the color component units in the image to be reduced are subjected to sampling decoding, generating a complete decoded image according to an th sampling matrix obtained by sampling and decoding all the color component units.
4. The method of claim 1, wherein performing sample decoding on the image to be reduced according to the decoding sample parameter to generate a decoded image comprises:
performing entropy decoding on a plurality of color component units in the image to be subjected to the thumbnail to obtain a fourth decoded image;
carrying out inverse quantization on the fourth decoded image to obtain a fifth decoded image;
sampling the fifth decoded image according to the decoding sampling parameters to obtain a second sampling matrix;
performing inverse discrete cosine transform on the second sampling matrix to generate a sixth decoding matrix;
and if all the color component units in the image to be reduced are decoded and sampled, generating a complete decoded image according to a sixth decoding matrix obtained by decoding and sampling all the color component units.
5. The method of any of wherein generating a target thumbnail based on the size of the decoded image and the size of the target thumbnail comprises:
if the size of the decoded image is equal to the size of the target thumbnail, encoding the decoded image to generate a target thumbnail; otherwise, obtaining a thumbnail parameter according to the size of the decoded image and the size of the target thumbnail, and sampling and encoding the decoded image according to the thumbnail parameter to generate the target thumbnail.
A thumbnail generation apparatus of types, comprising:
the size determining module is used for determining the size of an image to be contracted and the size of a target thumbnail, wherein the image to be contracted is a block compressed image;
the decoding sampling parameter determining module is used for determining a decoding sampling parameter according to the size of the image to be subjected to the thumbnail and the size of the target thumbnail;
the decoding image generating module is used for sampling and decoding the image to be contracted according to the decoding sampling parameter to generate a decoding image;
the target thumbnail generation module is used for generating a target thumbnail according to the size of the decoded image and the size of the target thumbnail;
wherein the decoding sample parameter determination module comprises:
the sampling parameter calculation unit is used for dividing the size of the image to be contracted by a preset block value to obtain a current sampling parameter, wherein the initial value of the preset block value is the size of a color component unit in the image to be contracted;
a sampling parameter determining unit, configured to take the preset block value as a decoding sampling parameter if the current sampling parameter is greater than or equal to the size of the target thumbnail;
a preset block data determining unit for performing value reduction processing on the preset block data when the current sampling parameter is smaller than the size of the target thumbnail, and
and when the current sampling parameter is smaller than the size of the target thumbnail, the sampling parameter calculating unit calculates the current sampling parameter by using the preset block number determined by the preset block data determining unit until the sampling parameter determining unit determines the decoding sampling parameter.
7. The apparatus of claim 6, wherein the decoded image generation module comprises:
an decoding unit, configured to perform entropy decoding on the multiple color component units in the image to be thumbnail, resulting in a decoded image;
a second decoding unit, configured to perform inverse quantization on the th decoded image to obtain a second decoded image;
a third decoding unit, configured to perform inverse discrete cosine transform on the second decoded image to obtain a third decoded image;
an th sampling unit, configured to sample the third decoded image according to the decoded sampling parameter, and generate a th sampling matrix;
, a decoding image unit, configured to generate a complete decoded image according to the th sampling matrix obtained by sampling and decoding all the color component units if all the color component units in the image to be reduced are subjected to sampling and decoding.
8. The apparatus of claim 6, wherein the decoded image generation module comprises:
a fourth decoding unit, configured to perform entropy decoding on the multiple color component units in the image to be thumbnail to obtain a fourth decoded image;
a fifth decoding unit, configured to perform inverse quantization on the fourth decoded image to obtain a fifth decoded image;
the second sampling unit is used for sampling the fifth decoding image according to the decoding sampling parameters to obtain a second sampling matrix;
a sixth decoding unit, configured to perform inverse discrete cosine transform on the second sampling matrix to generate a sixth decoding matrix;
and the second decoding image unit is used for generating a complete decoding image according to a sixth decoding matrix obtained by decoding and sampling all the color component units if all the color component units in the image to be reduced are decoded and sampled.
9. The apparatus according to any one of claims 6-8 and , wherein the destination thumbnail generation module is configured to:
if the size of the decoded image is equal to the size of the target thumbnail, encoding the decoded image to generate a target thumbnail;
otherwise, obtaining a thumbnail parameter according to the size of the decoded image and the size of the target thumbnail, and sampling and encoding the decoded image according to the thumbnail parameter to generate the target thumbnail.
10, terminal device comprising the thumbnail image generation apparatus of any of claims 6-9, .
CN201610127851.1A 2016-03-07 2016-03-07 Thumbnail generation method and device and terminal equipment Active CN107172425B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610127851.1A CN107172425B (en) 2016-03-07 2016-03-07 Thumbnail generation method and device and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610127851.1A CN107172425B (en) 2016-03-07 2016-03-07 Thumbnail generation method and device and terminal equipment

Publications (2)

Publication Number Publication Date
CN107172425A CN107172425A (en) 2017-09-15
CN107172425B true CN107172425B (en) 2020-01-31

Family

ID=59849906

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610127851.1A Active CN107172425B (en) 2016-03-07 2016-03-07 Thumbnail generation method and device and terminal equipment

Country Status (1)

Country Link
CN (1) CN107172425B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116416128A (en) * 2021-12-31 2023-07-11 北京字跳网络技术有限公司 Downsampling method and device for image

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1622134A (en) * 2005-01-11 2005-06-01 北京中星微电子有限公司 Image conversion method capable of realizing zooming
CN101345887A (en) * 2007-07-13 2009-01-14 英业达股份有限公司 Improved RGB image zooming method
CN101511011A (en) * 2009-02-19 2009-08-19 浙江大学 Display method and device for image drop sampling quick decode
CN102118616A (en) * 2011-02-24 2011-07-06 深圳市同洲电子股份有限公司 Picture decoding method and picture decoder
CN103886624A (en) * 2012-12-24 2014-06-25 三星电子(中国)研发中心 JPEG image thumbnail extracting method
CN103903285A (en) * 2012-12-25 2014-07-02 三星电子(中国)研发中心 Thumbnail extraction method of PNG image and BMP image
CN105302415A (en) * 2015-10-19 2016-02-03 四川长虹电器股份有限公司 Image thumbnail generation method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8514942B2 (en) * 2008-12-31 2013-08-20 Entropic Communications, Inc. Low-resolution video coding content extraction

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1622134A (en) * 2005-01-11 2005-06-01 北京中星微电子有限公司 Image conversion method capable of realizing zooming
CN101345887A (en) * 2007-07-13 2009-01-14 英业达股份有限公司 Improved RGB image zooming method
CN101511011A (en) * 2009-02-19 2009-08-19 浙江大学 Display method and device for image drop sampling quick decode
CN102118616A (en) * 2011-02-24 2011-07-06 深圳市同洲电子股份有限公司 Picture decoding method and picture decoder
CN103886624A (en) * 2012-12-24 2014-06-25 三星电子(中国)研发中心 JPEG image thumbnail extracting method
CN103903285A (en) * 2012-12-25 2014-07-02 三星电子(中国)研发中心 Thumbnail extraction method of PNG image and BMP image
CN105302415A (en) * 2015-10-19 2016-02-03 四川长虹电器股份有限公司 Image thumbnail generation method

Also Published As

Publication number Publication date
CN107172425A (en) 2017-09-15

Similar Documents

Publication Publication Date Title
CN110024392B (en) Low complexity symbol prediction for video coding
RU2503138C2 (en) Embedded graphics coding for images with sparse histograms
TWI536811B (en) Method and system for image processing, decoding method, encoder and decoder
RU2612611C2 (en) Method and apparatus for performing interpolation based on transform and inverse transform
CN108028941B (en) Method and apparatus for encoding and decoding digital images by superpixel
US10499086B2 (en) Video data encoding and decoding methods and apparatuses
JP5399416B2 (en) Video coding system with reference frame compression
US8031951B2 (en) 2-dimensional signal encoding/decoding method and device
JP6276199B2 (en) Significance map coding complexity reduction
JP2014525183A (en) Method and apparatus for image compression storing encoding parameters in a 2D matrix
CN106170093B (en) Intra-frame prediction performance improving coding method
US8254700B1 (en) Optimized method and system for entropy coding
JP2014039257A (en) Decoder and decoding method
JP2009027698A (en) Improved compaction in representation of non-frame edge block of image frame
MX2012004747A (en) Embedded graphics coding: reordered bitstream for parallel decoding.
WO2020078228A1 (en) Method and apparatus for video encoding, method and apparatus for video decoding, computer device and storage medium
JP2008527809A (en) Process for image compression and decompression acceleration
CN101827268B (en) Object-based fractal video compression and decompression method
CN108574849B (en) DCT inverse transformation method, inverse transformation device, electronic apparatus, and storage medium
JP6065613B2 (en) Video encoding device
CN107172425B (en) Thumbnail generation method and device and terminal equipment
JP2011234363A (en) Image processing system and method
JP2013506379A (en) Combined scalar embedded graphics coding for color images
WO2018014301A1 (en) Video coding method and device
JP2015019364A (en) Image compression apparatus and method

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
GR01 Patent grant
GR01 Patent grant