CN107146197A - A kind of reduced graph generating method and device - Google Patents
A kind of reduced graph generating method and device Download PDFInfo
- Publication number
- CN107146197A CN107146197A CN201710206909.6A CN201710206909A CN107146197A CN 107146197 A CN107146197 A CN 107146197A CN 201710206909 A CN201710206909 A CN 201710206909A CN 107146197 A CN107146197 A CN 107146197A
- Authority
- CN
- China
- Prior art keywords
- target
- source image
- pixel point
- value
- thumbnail
- 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 53
- 238000004422 calculation algorithm Methods 0.000 claims description 23
- 238000001514 detection method Methods 0.000 claims description 23
- 238000004364 calculation method Methods 0.000 claims description 16
- 230000009466 transformation Effects 0.000 claims description 15
- 230000003068 static effect Effects 0.000 claims description 7
- 230000008569 process Effects 0.000 description 4
- 230000009471 action Effects 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 230000000007 visual effect Effects 0.000 description 3
- 238000013461 design Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 238000011426 transformation method Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/04—Context-preserving transformations, e.g. by using an importance map
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Processing Or Creating Images (AREA)
Abstract
The embodiment of the invention discloses a kind of reduced graph generating method and device, method includes:Obtain the source images of thumbnail to be generated;The target saliency value of each pixel in the source images is calculated, wherein, the target saliency value is used to characterize the significance level of pixel in the picture;According to the target saliency value of each pixel, the target salient region of the source images is obtained;According to the target salient region, the thumbnail of the source images is generated.Using the thumbnail of schemes generation provided in an embodiment of the present invention, the important content in prominent source images is realized.
Description
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to a thumbnail generation method and apparatus.
Background
In recent years, with the rapid development of multimedia technologies such as images and videos, 360-degree panoramic images have become popular, and are beginning to be applied to various large multimedia playing platforms, for example: in VR (virtual reality) head-mounted devices, it is one of its main functions to implement browsing of a 360-degree panoramic image.
When managing image resources stored in a multimedia device, it is necessary to present each image resource in the form of a thumbnail. By means of the thumbnail, the user can quickly know the basic content of the resource, and meanwhile, the user can conveniently and quickly find the needed resource. For example: in order to speed up browsing and finding of the 360-degree panoramic image, the 360-degree panoramic image may be converted into a thumbnail image of a small size.
At present, the method for generating the thumbnail mainly comprises the following steps: the method has the advantages that the source image is directly reduced to the size of the thumbnail in proportion to obtain the thumbnail of the source image, the thumbnail generated by the method cannot highlight important contents in the source image, and a user cannot conveniently and quickly know the basic contents of the source image. Therefore, there is a need for a method of generating thumbnails such that thumbnails generated using this method can highlight important content in the source image.
Disclosure of Invention
The embodiment of the invention discloses a thumbnail generation method and device, which can highlight important contents in a source image by a generated thumbnail. The technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a thumbnail generation method, where the method includes:
obtaining a source image of a thumbnail to be generated;
calculating a target significant value of each pixel point in the source image, wherein the target significant value is used for representing the importance degree of the pixel point in the image;
obtaining a target significance region of the source image according to the target significance value of each pixel point;
and generating a thumbnail of the source image according to the target saliency area.
Optionally, the step of calculating the target significant value of each pixel point in the source image includes:
detecting a face region in the source image by using a preset face detection algorithm, and calculating a significant value of each pixel point in the face region as a first significant value;
calculating a significance value of each pixel point in the source image by using a preset significance detection algorithm to serve as a second significance value;
for each pixel point in the face region, performing weighted calculation on a first significant value and a second significant value of the pixel point, and taking a calculation result as a target significant value of the pixel point;
and for each pixel point outside the face area in the source image, determining the second significant value of the pixel point as the target significant value of the pixel point.
Optionally, the obtaining a target saliency region of the source image according to the target saliency value of each pixel point includes:
determining a saliency region of the source image according to the target saliency value of each pixel point;
for each saliency region, calculating the mean value of the target saliency values of the pixel points in the saliency region to obtain the average saliency value of the saliency region;
and obtaining a target significance region of the source image according to the obtained average significance value.
Optionally, the obtaining a target saliency region of the source image according to the obtained average saliency value includes:
taking the salient region with the highest average salient value as a target salient region of the source image;
or, regarding a saliency region with the average saliency value larger than a preset threshold as a target saliency region of the source image.
Optionally, for a case that the generated thumbnail includes at least two thumbnails, the method further includes:
sequentially displaying all thumbnails in a dynamic display mode according to the thumbnail generation time; or,
and displaying each thumbnail in a static display mode according to the generation time of the thumbnail.
Optionally, the generating a thumbnail of the source image according to the target saliency region includes:
and projecting the target salient region to a preset coordinate plane to generate a thumbnail of the source image.
Optionally, the projecting the target salient region to a preset coordinate plane to generate a thumbnail of the source image includes:
carrying out distortion transformation on the target salient region to obtain an initial image; projecting the initial image to a preset coordinate plane to generate a thumbnail of the source image; or
Carrying out distortion transformation on the source image to obtain a first image; projecting a pixel point corresponding to a first coordinate position in the first image to a preset coordinate plane, and generating a thumbnail of the source image, wherein the first coordinate position is as follows: and the coordinate position of each pixel point in the target salient region.
In a second aspect, an embodiment of the present invention provides a thumbnail generation apparatus, where the apparatus includes:
the first obtaining module is used for obtaining a source image of a thumbnail to be generated;
the calculation module is used for calculating a target significant value of each pixel point in the source image, wherein the target significant value is used for representing the importance degree of the pixel point in the image;
the second obtaining module is used for obtaining a target significance region of the source image according to the target significance value of each pixel point;
and the generating module is used for generating the thumbnail of the source image according to the target saliency area.
Optionally, the calculation module is specifically configured to:
detecting a face region in the source image by using a preset face detection algorithm, and calculating a significant value of each pixel point in the face region as a first significant value;
calculating a significance value of each pixel point in the source image by using a preset significance detection algorithm to serve as a second significance value;
for each pixel point in the face region, performing weighted calculation on a first significant value and a second significant value of the pixel point, and taking a calculation result as a target significant value of the pixel point;
and for each pixel point outside the face area in the source image, determining the second significant value of the pixel point as the target significant value of the pixel point.
Optionally, the second obtaining module includes:
the determining submodule is used for determining a saliency area of the source image according to the target saliency value of each pixel point;
the first obtaining submodule is used for calculating the mean value of the target significant values of the pixel points in each significant area to obtain the average significant value of the significant area;
and the second obtaining submodule is used for obtaining the target saliency area of the source image according to the obtained average saliency value.
Optionally, the second obtaining submodule is specifically configured to:
taking the salient region with the highest average salient value as a target salient region of the source image;
or, regarding a saliency region with the average saliency value larger than a preset threshold as a target saliency region of the source image.
Optionally, for a case that the generated thumbnail includes at least two thumbnails, the apparatus further includes:
the first display module is used for sequentially displaying all thumbnails in a dynamic display mode according to the thumbnail generation time; or,
and the second display module is used for displaying each thumbnail in a static display mode according to the generation time of the thumbnail.
Optionally, the generating module includes:
and the generating submodule is used for projecting the target salient region to a preset coordinate plane to generate a thumbnail of the source image.
Optionally, the generating sub-module is specifically configured to:
carrying out distortion transformation on the target salient region to obtain an initial image; projecting the initial image to a preset coordinate plane to generate a thumbnail of the source image; or
Carrying out distortion transformation on the source image to obtain a first image; projecting a pixel point corresponding to a first coordinate position in the first image to a preset coordinate plane, and generating a thumbnail of the source image, wherein the first coordinate position is as follows: and the coordinate position of each pixel point in the target salient region.
As can be seen from the above, according to the thumbnail generation method and apparatus provided by the embodiment of the present invention, first, a source image of a thumbnail to be generated is obtained; then, calculating a target significant value of each pixel point in the source image, wherein the target significant value is used for representing the importance degree of the pixel point in the image; further, according to the target significant value of each pixel point, a target significant area of the source image is obtained; and finally, generating a thumbnail of the source image according to the target saliency area.
Therefore, by applying the technical scheme provided by the embodiment of the invention, the thumbnail of the source image can be generated according to the target salient region, and the target salient region is obtained according to the target salient value of each pixel point in the source image, and the target salient value is used for representing the importance degree of the pixel point in the image, so that the target salient region contains the important content of the source image, and the important content in the source image is highlighted according to the thumbnail generated by the target salient region.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a thumbnail generation method according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a thumbnail generation apparatus according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention discloses a thumbnail generation method and a thumbnail generation device, which are respectively explained in detail below.
Referring to fig. 1, fig. 1 is a schematic flowchart of a thumbnail generation method provided in an embodiment of the present invention, including the following steps:
and S101, obtaining a source image of the thumbnail to be generated.
It should be noted that the source image may be a 360-degree panoramic image, and the 360-degree panoramic image is also referred to as a three-dimensional panoramic image or a panoramic ring view. The 360-degree panoramic image is a real-scene 360-degree all-around image giving a three-dimensional feeling, the thumbnail of the 360-degree panoramic image is different from the thumbnail of the common planar image, when the thumbnail of the 360-degree panoramic image is generated, an optimal view angle needs to be found, namely when a user browses the image in a 360-degree rotating mode, the user can attract attention of the user or can represent the view angle of the image, and when the user browses the image from the view angle, the user can obtain main content of the 360-degree panoramic image. Thus, a thumbnail may also be referred to as a view map.
The embodiment of the present invention is described by taking a thumbnail of a 360-degree panoramic image as an example, which is only a specific example of the present invention and does not limit the present invention. The embodiment of the invention can be used for generating the thumbnail of the 360-degree panoramic image, and can also be used for generating the thumbnail of the common planar image, the thumbnail of the fisheye image and the like.
And S102, calculating the target significant value of each pixel point in the source image.
The target significant value is used for representing the importance degree of the pixel point in the image. In practical application, the contrast value of the color of the pixel point and the background color can be selected as the significant value of the pixel point, and if the difference between the color of the pixel point and the background color is larger, the contrast value is larger, and the significant value of the pixel point is larger.
Specifically, the step of calculating the target significant value of each pixel point in the source image may include the following steps:
the method comprises the steps of firstly, detecting a face area in a source image by using a preset face detection algorithm, and calculating a significant value of each pixel point located in the face area to serve as a first significant value.
The face detection algorithm can be used for detecting a face region in the whole source image, and under a general condition, the face can attract the attention of a user browsing pictures in the image, so that the face can be considered as important content in the image, and the significance value of each pixel point in the face region can be set to be higher. For example, the saliency value of each pixel point located in the face region may be set to 255.
In practical application, the face detection algorithm can be set according to the requirements of designers, and the embodiment of the invention does not limit the specific face detection algorithm. The face detection algorithm is the prior art, and the embodiment of the invention is not described herein again. For example, a designer may preset a face detection algorithm based on geometric features, so that when the method provided by the embodiment of the present invention is executed, a face region in a source image may be detected by using the face detection algorithm based on geometric features, and a significant value of each pixel point located in the face region may be calculated.
In a specific embodiment, the method for calculating the saliency value of each pixel point located in the face region may be: the significance value of the pixel point located at the geometric center of the face region is set to be 255, and the significance values of other pixel points located in the face region and spread by the center point are obtained by utilizing a Gaussian model based on the source image, wherein the significance values of the other pixel points are reduced along with the increase of the distance from the center point, and the specific relationship between the significance values and the distance can be set according to the requirements of users. The process of establishing a gaussian model for an image background is the prior art, and the present invention is not described herein again.
It can be understood that when a plurality of scattered face regions exist in a source image, a plurality of central points can be obtained, significant values of other pixel points located in the face regions can be calculated once according to each central point, and the sum of the significant values corresponding to the central points is used as the final significant value of other pixel points located in the face regions.
For example: the center point comprises A, B, C, and the significant value of the pixel point a is calculated as a according to the center point A1Calculating the significant value of the pixel point a as a according to B2Calculating the significant value of the pixel point a as a according to C3If the significant value of the pixel point a is: a is1+a2+a3。
And secondly, calculating the significance value of each pixel point in the source image by using a preset significance detection algorithm to serve as a second significance value.
The saliency detection algorithm is used for calculating a saliency value of each pixel point in a source image, belongs to the prior art, and is not repeated herein. The designer can design the significance detection algorithm according to the requirement, and the embodiment of the invention does not limit the specific significance detection algorithm. For example, a designer may preset a saliency detection algorithm based on global color contrast, so that when being executed, the method provided by the embodiment of the present invention may calculate the saliency value of each pixel point in the source image according to the saliency detection algorithm based on global color contrast.
It should be noted that, in the embodiment of the present invention, the execution order of the first step and the second step is not limited, and the first step may be executed first, and then the second step may be executed; the second step may be performed first, and then the first step; the first step may also be performed in parallel with the second step.
And thirdly, for each pixel point in the face region, performing weighted calculation on the first significant value and the second significant value of the pixel point, and taking the calculation result as a target significant value of the pixel point.
In practical application, a designer may design the respective weighting factors of the first significant value and the second significant value according to own experience, and the embodiment of the present invention does not limit the specific values of the weighting factors.
For example, the first significant value and the second significant value of the pixel point a located in the face region are respectively: 50. 40, if the weight factor of the first significant value is 0.6 and the weight factor of the second significant value is 0.4, performing weighted calculation on the first significant value and the second significant value of the pixel point a to obtain a target significant value of the pixel point a: 50 x 0.6+40 x 0.4-46.
And fourthly, determining a second significant value of each pixel point outside the face area in the source image as a target significant value of the pixel point.
It can be understood that the target significant value of each pixel point outside the face region in the source image only includes the second significant value, for example, if the second significant value of the pixel point B outside the face region in the source image is 66, the target significant value of the pixel point B is 66.
It should be noted that, in the embodiment of the present invention, the execution order of the third step and the fourth step is not limited, and the third step may be executed first, and then the fourth step may be executed; the fourth step may be executed first, and then the third step may be executed; the third step may also be performed simultaneously with the fourth step.
S103, obtaining a target significance region of the source image according to the target significance value of each pixel point.
The saliency area refers to an area which can attract people in an image, and is an area which can represent the content of the image most. The salient region concerned by people in the image usually only exists in a certain local region in the image, the rest parts are non-salient regions, obvious boundaries exist between the salient region and the non-salient regions, and the salient region and the non-salient regions can be distinguished by using the target salient value of each pixel point.
It should be noted that, according to the target significant value of each pixel point, the target significant region of the source image is obtained, which may be: determining a saliency region of the source image according to the target saliency value of each pixel point; for each saliency region, calculating the mean value of the target saliency values of the pixel points in the saliency region to obtain the average saliency value of the saliency region; and obtaining a target significance region of the source image according to the obtained average significance value.
In practical application, the step of determining the saliency region of the source image according to the target saliency value of each pixel point may be: selecting one or more central pixel points from a source image, forming a saliency region by using a maximum connected domain method and pixel points which belong to a saliency range with the central pixel points, and defining pixel points of which the difference between a target saliency and the target saliency of the central pixel points is within a preset difference as follows: pixels that belong to a significant range of values with the center pixel. The specific maximum connected domain method is the prior art, and the embodiment of the present invention is not described herein again.
For example, if the preset difference is 3, the target significance of the center pixel a is 30, the target significance of the pixel B is 35, and the target significance of the pixel C is 32, then the difference between the target significance of the pixel B and the target significance of the center pixel a is 5, the difference between the target significance of the pixel C and the target significance of the center pixel a is 2, the difference between the target significance of the pixel B and the target significance of the center pixel a exceeds the preset difference, and the pixel B and the center pixel a do not belong to a significance range; the difference between the target significant value of the pixel C and the target significant value of the central pixel A is within a preset difference value, and the pixel C and the central pixel A belong to a significant value range.
Specifically, the obtaining of the target saliency area of the source image according to the obtained average saliency value may be: taking the salient region with the highest average salient value as a target salient region of the source image; or, regarding a saliency region with the average saliency value larger than a preset threshold as a target saliency region of the source image.
For example, A, B, C regions are total, the average saliency value of the saliency region a is 55, the average saliency value of the saliency region B is 40, and the average saliency value of the saliency region a is 30, then the saliency region a with the highest average saliency value can be used as the target saliency region of the source image; or, the preset threshold is 35, and the saliency areas a and B with the average saliency value larger than the preset threshold are used as the target saliency areas of the source image.
And S104, generating a thumbnail of the source image according to the target saliency area.
Specifically, the generating of the thumbnail of the source image according to the target saliency region may be: and projecting the target saliency area to a preset coordinate plane to generate a thumbnail of the source image.
It can be understood that the coordinates include spherical coordinates, cylindrical coordinates, cartesian coordinates, and the like, where the coordinates of the image that can be perceived by human eyes are spherical coordinates or cylindrical coordinates, and when the source image is a fisheye image captured by a fisheye lens, because the fisheye image has severe distortion and poor visual effect, the fisheye image may be projected to the cylindrical coordinates or the spherical coordinates by a cylindrical projection method or a spherical projection method to eliminate the distortion effect of the fisheye image.
The specific cylindrical projection method and spherical projection method are prior art, and the embodiments of the present invention are not described herein again. The designer can select the projection method according to the own requirements, which is not limited in the embodiment of the invention. For example, the designer may choose to project the target salient region to spherical coordinates using spherical projection.
Specifically, when the embodiment Of the present invention is applied to a VR (Virtual Reality) device, the target saliency region may be projected to a preset coordinate plane according to a FOV (Field Of View) Of an HMD (Head mounted Display) Of the VR device and lens parameters, so as to generate a thumbnail Of the source image.
In practical application, a corresponding relation table of the width and the height of the FOV and the thumbnail can be established in advance, and the width and the height of the thumbnail corresponding to each FOV are obtained according to the corresponding relation table, so that the size of the generated thumbnail can be adapted to the size of the FOV of the HMD, and the visual experience of a user is further improved.
Because the camera of VR equipment is the fisheye lens. Thus, the image captured by the VR device is also a fisheye image. The lens parameters are mainly distortion coefficients of the fisheye images, and the fisheye images can be more accurately converted into cylindrical images or spherical images by projecting with reference to the distortion coefficients, so that the definition of the thumbnails is further improved. In practical application, the distortion coefficient may be calculated by using a zhang scaling method, and a specific method for calculating the distortion coefficient by using the zhang scaling method belongs to the prior art, and is not described herein again.
Furthermore, in order to improve the visual experience of the user, the fisheye image can be subjected to distortion transformation to eliminate the distortion influence of the fisheye image, so that the fisheye image is changed into an image which is convenient for human eyes to perceive.
For example, in a specific embodiment, the projecting the target salient region to a preset coordinate plane to generate a thumbnail of the source image may be: carrying out distortion transformation on the target salient region to obtain an initial image; and projecting the initial image to a preset coordinate plane to generate a thumbnail of the source image.
In another specific embodiment, the projecting the target salient region to a preset coordinate plane to generate a thumbnail of the source image may further be: carrying out distortion transformation on the source image to obtain a first image; projecting a pixel point corresponding to a first coordinate position in the first image to a preset coordinate plane, and generating a thumbnail of the source image, wherein the first coordinate position is as follows: and the coordinate position of each pixel point in the target salient region.
When distortion transformation is carried out, a distortion coefficient needs to be calculated firstly, and then transformation opposite to the generation of distortion is realized by utilizing the distortion coefficient, so that distortion influence is eliminated. The specific distortion transformation method belongs to the prior art, and the embodiment of the invention is not described herein again.
Therefore, by applying the technical scheme provided by the embodiment of the invention, the thumbnail of the source image can be generated according to the target salient region, and the target salient region is obtained according to the target salient value of each pixel point in the source image, and the target salient value is used for representing the importance degree of the pixel point in the image, so that the target salient region contains the important content of the source image, and the important content in the source image is highlighted according to the thumbnail generated by the target salient region.
Further, in order to enhance the display effect of the thumbnail and better satisfy the user experience, for the case that the generated thumbnail includes at least two thumbnails, the method may further include:
sequentially displaying all thumbnails in a dynamic display mode according to the thumbnail generation time; or,
and displaying each thumbnail in a static display mode according to the generation time of the thumbnail.
The dynamic display mode may be a motion picture mode such as GIF (Graphics Interchange Format), and the like, and the thumbnails are sequentially displayed; or, the time interval may be fixed, and a single thumbnail is displayed in a cycle in sequence.
The static display mode may be a mode in which one, a plurality of, or all of the generated thumbnails are directly displayed, and in the case where one or a plurality of thumbnails are directly displayed, another thumbnail may be switched and displayed in accordance with a thumbnail switching instruction of a user.
Corresponding to the above method embodiment, the embodiment of the present invention further provides a thumbnail generation apparatus.
Referring to fig. 2, fig. 2 is a schematic structural diagram of a thumbnail generation apparatus according to an embodiment of the present invention, including:
a first obtaining module 201, configured to obtain a source image of a thumbnail to be generated;
a calculating module 202, configured to calculate a target significant value of each pixel point in the source image, where the target significant value is used to represent an importance degree of the pixel point in the image;
a second obtaining module 203, configured to obtain a target saliency region of the source image according to the target saliency value of each pixel point;
a generating module 204, configured to generate a thumbnail of the source image according to the target saliency area.
The calculating module 202 is specifically configured to:
detecting a face region in the source image by using a preset face detection algorithm, and calculating a significant value of each pixel point in the face region as a first significant value;
calculating a significance value of each pixel point in the source image by using a preset significance detection algorithm to serve as a second significance value;
for each pixel point in the face region, performing weighted calculation on a first significant value and a second significant value of the pixel point, and taking a calculation result as a target significant value of the pixel point;
and for each pixel point outside the face area in the source image, determining the second significant value of the pixel point as the target significant value of the pixel point.
The second obtaining module 203 includes:
the determining submodule is used for determining a saliency area of the source image according to the target saliency value of each pixel point;
the first obtaining submodule is used for calculating the mean value of the target significant values of the pixel points in each significant area to obtain the average significant value of the significant area;
and the second obtaining submodule is used for obtaining the target saliency area of the source image according to the obtained average saliency value.
The second obtaining submodule is specifically configured to:
taking the salient region with the highest average salient value as a target salient region of the source image;
or, regarding a saliency region with the average saliency value larger than a preset threshold as a target saliency region of the source image.
The generating module 204 includes:
and the generating submodule is used for projecting the target salient region to a preset coordinate plane to generate a thumbnail of the source image.
The generation submodule is specifically configured to:
carrying out distortion transformation on the target salient region to obtain an initial image; projecting the initial image to a preset coordinate plane to generate a thumbnail of the source image; or
Carrying out distortion transformation on the source image to obtain a first image; projecting a pixel point corresponding to a first coordinate position in the first image to a preset coordinate plane, and generating a thumbnail of the source image, wherein the first coordinate position is as follows: and the coordinate position of each pixel point in the target salient region.
Therefore, by applying the technical scheme provided by the embodiment of the invention, the thumbnail of the source image can be generated according to the target salient region, and the target salient region is obtained according to the target salient value of each pixel point in the source image, and the target salient value is used for representing the importance degree of the pixel point in the image, so that the target salient region contains the important content of the source image, and the important content in the source image is highlighted according to the thumbnail generated by the target salient region.
Further, in order to enhance the display effect of the thumbnail and better satisfy the user experience, for the case that the generated thumbnail includes at least two thumbnails, the apparatus further includes:
the first display module is used for sequentially displaying all thumbnails in a dynamic display mode according to the thumbnail generation time; or,
and the second display module is used for displaying each thumbnail in a static display mode according to the generation time of the thumbnail.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
Those skilled in the art will appreciate that all or part of the steps in the above method embodiments may be implemented by a program to instruct relevant hardware to perform the steps, and the program may be stored in a computer-readable storage medium, which is referred to herein as a storage medium, such as: ROM/RAM, magnetic disk, optical disk, etc.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.
Claims (14)
1. A thumbnail generation method, characterized in that the method comprises:
obtaining a source image of a thumbnail to be generated;
calculating a target significant value of each pixel point in the source image, wherein the target significant value is used for representing the importance degree of the pixel point in the image;
obtaining a target significance region of the source image according to the target significance value of each pixel point;
and generating a thumbnail of the source image according to the target saliency area.
2. The method of claim 1, wherein the step of calculating the target saliency value for each pixel point in the source image comprises:
detecting a face region in the source image by using a preset face detection algorithm, and calculating a significant value of each pixel point in the face region as a first significant value;
calculating a significance value of each pixel point in the source image by using a preset significance detection algorithm to serve as a second significance value;
for each pixel point in the face region, performing weighted calculation on a first significant value and a second significant value of the pixel point, and taking a calculation result as a target significant value of the pixel point;
and for each pixel point outside the face area in the source image, determining the second significant value of the pixel point as the target significant value of the pixel point.
3. The method according to claim 1, wherein the obtaining the target saliency region of the source image according to the target saliency value of each pixel point comprises:
determining a saliency region of the source image according to the target saliency value of each pixel point;
for each saliency region, calculating the mean value of the target saliency values of the pixel points in the saliency region to obtain the average saliency value of the saliency region;
and obtaining a target significance region of the source image according to the obtained average significance value.
4. The method according to claim 3, wherein said obtaining a target saliency region of said source image from said obtained average saliency values comprises:
taking the salient region with the highest average salient value as a target salient region of the source image;
or, regarding a saliency region with the average saliency value larger than a preset threshold as a target saliency region of the source image.
5. The method of claim 1, wherein for a case that the generated thumbnail includes at least two, the method further comprises:
sequentially displaying all thumbnails in a dynamic display mode according to the thumbnail generation time; or,
and displaying each thumbnail in a static display mode according to the generation time of the thumbnail.
6. The method according to claim 1, wherein said generating a thumbnail of said source image based on said target saliency region comprises:
and projecting the target salient region to a preset coordinate plane to generate a thumbnail of the source image.
7. The method according to claim 6, wherein the projecting the target salient region to a preset coordinate plane, generating a thumbnail of the source image, comprises:
carrying out distortion transformation on the target salient region to obtain an initial image; projecting the initial image to a preset coordinate plane to generate a thumbnail of the source image; or
Carrying out distortion transformation on the source image to obtain a first image; projecting a pixel point corresponding to a first coordinate position in the first image to a preset coordinate plane, and generating a thumbnail of the source image, wherein the first coordinate position is as follows: and the coordinate position of each pixel point in the target salient region.
8. An apparatus for generating thumbnail images, the apparatus comprising:
the first obtaining module is used for obtaining a source image of a thumbnail to be generated;
the calculation module is used for calculating a target significant value of each pixel point in the source image, wherein the target significant value is used for representing the importance degree of the pixel point in the image;
the second obtaining module is used for obtaining a target significance region of the source image according to the target significance value of each pixel point;
and the generating module is used for generating the thumbnail of the source image according to the target saliency area.
9. The apparatus of claim 8, wherein the computing module is specifically configured to:
detecting a face region in the source image by using a preset face detection algorithm, and calculating a significant value of each pixel point in the face region as a first significant value;
calculating a significance value of each pixel point in the source image by using a preset significance detection algorithm to serve as a second significance value;
for each pixel point in the face region, performing weighted calculation on a first significant value and a second significant value of the pixel point, and taking a calculation result as a target significant value of the pixel point;
and for each pixel point outside the face area in the source image, determining the second significant value of the pixel point as the target significant value of the pixel point.
10. The apparatus of claim 8, wherein the second obtaining module comprises:
the determining submodule is used for determining a saliency area of the source image according to the target saliency value of each pixel point;
the first obtaining submodule is used for calculating the mean value of the target significant values of the pixel points in each significant area to obtain the average significant value of the significant area;
and the second obtaining submodule is used for obtaining the target saliency area of the source image according to the obtained average saliency value.
11. The apparatus according to claim 10, wherein the second obtaining submodule is specifically configured to:
taking the salient region with the highest average salient value as a target salient region of the source image;
or, regarding a saliency region with the average saliency value larger than a preset threshold as a target saliency region of the source image.
12. The apparatus of claim 8, wherein for a case that the generated thumbnail images include at least two, the apparatus further comprises:
the first display module is used for sequentially displaying all thumbnails in a dynamic display mode according to the thumbnail generation time; or,
and the second display module is used for displaying each thumbnail in a static display mode according to the generation time of the thumbnail.
13. The apparatus of claim 8, wherein the generating module comprises:
and the generating submodule is used for projecting the target salient region to a preset coordinate plane to generate a thumbnail of the source image.
14. The apparatus according to claim 13, wherein the generating submodule is specifically configured to:
carrying out distortion transformation on the target salient region to obtain an initial image; projecting the initial image to a preset coordinate plane to generate a thumbnail of the source image; or
Carrying out distortion transformation on the source image to obtain a first image; projecting a pixel point corresponding to a first coordinate position in the first image to a preset coordinate plane, and generating a thumbnail of the source image, wherein the first coordinate position is as follows: and the coordinate position of each pixel point in the target salient region.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710206909.6A CN107146197A (en) | 2017-03-31 | 2017-03-31 | A kind of reduced graph generating method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710206909.6A CN107146197A (en) | 2017-03-31 | 2017-03-31 | A kind of reduced graph generating method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107146197A true CN107146197A (en) | 2017-09-08 |
Family
ID=59783924
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710206909.6A Pending CN107146197A (en) | 2017-03-31 | 2017-03-31 | A kind of reduced graph generating method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107146197A (en) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108958609A (en) * | 2018-07-24 | 2018-12-07 | 百度在线网络技术(北京)有限公司 | Generation method, device, storage medium and the terminal device of three-dimensional panorama surface plot |
CN110045892A (en) * | 2019-04-19 | 2019-07-23 | 维沃移动通信有限公司 | Display method and terminal device |
CN110097539A (en) * | 2019-04-19 | 2019-08-06 | 贝壳技术有限公司 | A kind of method and device intercepting picture in virtual three-dimensional model |
CN110349082A (en) * | 2019-06-28 | 2019-10-18 | 腾讯科技(深圳)有限公司 | Method of cutting out and device, the storage medium and electronic device of image-region |
CN110377204A (en) * | 2019-06-30 | 2019-10-25 | 华为技术有限公司 | A kind of method and electronic equipment generating user's head portrait |
CN110910470A (en) * | 2019-11-11 | 2020-03-24 | 广联达科技股份有限公司 | Method and device for generating high-quality thumbnail |
CN112634128A (en) * | 2020-12-22 | 2021-04-09 | 天津大学 | Stereo image redirection method based on deep learning |
CN115033154A (en) * | 2021-02-23 | 2022-09-09 | 北京小米移动软件有限公司 | Thumbnail generation method, thumbnail generation device and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20090076022A (en) * | 2008-01-07 | 2009-07-13 | 엘지전자 주식회사 | Thumbnail generation device and multi-codec decoder device including the same |
CN101620673A (en) * | 2009-06-18 | 2010-01-06 | 北京航空航天大学 | Robust face detecting and tracking method |
CN104537616A (en) * | 2014-12-20 | 2015-04-22 | 中国科学院西安光学精密机械研究所 | Correction Method of Fisheye Image Distortion |
CN106251283A (en) * | 2016-07-28 | 2016-12-21 | 乐视控股(北京)有限公司 | A kind of reduced graph generating method and equipment |
CN106485653A (en) * | 2016-10-19 | 2017-03-08 | 上海传英信息技术有限公司 | User terminal and the generation method of panoramic pictures dynamic thumbnail |
-
2017
- 2017-03-31 CN CN201710206909.6A patent/CN107146197A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20090076022A (en) * | 2008-01-07 | 2009-07-13 | 엘지전자 주식회사 | Thumbnail generation device and multi-codec decoder device including the same |
CN101620673A (en) * | 2009-06-18 | 2010-01-06 | 北京航空航天大学 | Robust face detecting and tracking method |
CN104537616A (en) * | 2014-12-20 | 2015-04-22 | 中国科学院西安光学精密机械研究所 | Correction Method of Fisheye Image Distortion |
CN106251283A (en) * | 2016-07-28 | 2016-12-21 | 乐视控股(北京)有限公司 | A kind of reduced graph generating method and equipment |
CN106485653A (en) * | 2016-10-19 | 2017-03-08 | 上海传英信息技术有限公司 | User terminal and the generation method of panoramic pictures dynamic thumbnail |
Non-Patent Citations (1)
Title |
---|
程德俊: "汽车全景环视系统的研究", 《中国优秀硕士学位论文全文数据库》 * |
Cited By (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108958609A (en) * | 2018-07-24 | 2018-12-07 | 百度在线网络技术(北京)有限公司 | Generation method, device, storage medium and the terminal device of three-dimensional panorama surface plot |
CN110045892A (en) * | 2019-04-19 | 2019-07-23 | 维沃移动通信有限公司 | Display method and terminal device |
CN110097539A (en) * | 2019-04-19 | 2019-08-06 | 贝壳技术有限公司 | A kind of method and device intercepting picture in virtual three-dimensional model |
CN110045892B (en) * | 2019-04-19 | 2021-04-02 | 维沃移动通信有限公司 | Display method and terminal equipment |
CN110349082A (en) * | 2019-06-28 | 2019-10-18 | 腾讯科技(深圳)有限公司 | Method of cutting out and device, the storage medium and electronic device of image-region |
CN110349082B (en) * | 2019-06-28 | 2023-08-29 | 腾讯科技(深圳)有限公司 | Image area clipping method and device, storage medium and electronic device |
WO2021000841A1 (en) * | 2019-06-30 | 2021-01-07 | 华为技术有限公司 | Method for generating user profile photo, and electronic device |
CN110377204B (en) * | 2019-06-30 | 2021-07-09 | 华为技术有限公司 | Method and electronic device for generating user avatar |
CN110377204A (en) * | 2019-06-30 | 2019-10-25 | 华为技术有限公司 | A kind of method and electronic equipment generating user's head portrait |
US11914850B2 (en) | 2019-06-30 | 2024-02-27 | Huawei Technologies Co., Ltd. | User profile picture generation method and electronic device |
CN110910470A (en) * | 2019-11-11 | 2020-03-24 | 广联达科技股份有限公司 | Method and device for generating high-quality thumbnail |
CN110910470B (en) * | 2019-11-11 | 2023-07-07 | 广联达科技股份有限公司 | Method and device for generating high-quality thumbnail |
CN112634128A (en) * | 2020-12-22 | 2021-04-09 | 天津大学 | Stereo image redirection method based on deep learning |
CN112634128B (en) * | 2020-12-22 | 2022-06-14 | 天津大学 | Stereo image redirection method based on deep learning |
CN115033154A (en) * | 2021-02-23 | 2022-09-09 | 北京小米移动软件有限公司 | Thumbnail generation method, thumbnail generation device and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107146197A (en) | A kind of reduced graph generating method and device | |
US12148100B2 (en) | Information processing apparatus, information processing method, and storage medium for generating a virtual viewpoint image | |
JP4916548B2 (en) | Establish and use dominant lines of images | |
CN102741879B (en) | Method and system for generating depth map from monocular image | |
KR102120046B1 (en) | How to display objects | |
CN109906600B (en) | Simulated depth of field | |
WO2019237745A1 (en) | Facial image processing method and apparatus, electronic device and computer readable storage medium | |
US20110273466A1 (en) | View-dependent rendering system with intuitive mixed reality | |
US20140198101A1 (en) | 3d-animation effect generation method and system | |
JP6610535B2 (en) | Image processing apparatus and image processing method | |
US20210407125A1 (en) | Object recognition neural network for amodal center prediction | |
CN103914876A (en) | Method and apparatus for displaying video on 3D map | |
WO2019205945A1 (en) | Method and computer apparatus for determining insertion position of advertisement, and storage medium | |
CN112581389A (en) | Virtual viewpoint depth map processing method, equipment, device and storage medium | |
CN108111911A (en) | Video data real-time processing method and device based on the segmentation of adaptive tracing frame | |
CN112070854B (en) | Image generation method, device, equipment and storage medium | |
US20140098246A1 (en) | Method, Apparatus and Computer-Readable Recording Medium for Refocusing Photographed Image | |
JP6558365B2 (en) | Image processing apparatus, image processing method, and program | |
CN113805824A (en) | Electronic device and method for displaying image on display equipment | |
JP5210416B2 (en) | Stereoscopic image generating apparatus, stereoscopic image generating method, program, and recording medium | |
Fassold | Adapting computer vision algorithms for omnidirectional video | |
US9563940B2 (en) | Smart image enhancements | |
US11120606B1 (en) | Systems and methods for image texture uniformization for multiview object capture | |
Lu et al. | Visually preserving stereoscopic image retargeting using depth carving | |
JP6854629B2 (en) | Image processing device, image processing 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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170908 |
|
RJ01 | Rejection of invention patent application after publication |