WO2014146561A1 - 缩略图生成方法及系统 - Google Patents

缩略图生成方法及系统 Download PDF

Info

Publication number
WO2014146561A1
WO2014146561A1 PCT/CN2014/073546 CN2014073546W WO2014146561A1 WO 2014146561 A1 WO2014146561 A1 WO 2014146561A1 CN 2014073546 W CN2014073546 W CN 2014073546W WO 2014146561 A1 WO2014146561 A1 WO 2014146561A1
Authority
WO
WIPO (PCT)
Prior art keywords
weight value
thumbnail
intermediate result
row
column
Prior art date
Application number
PCT/CN2014/073546
Other languages
English (en)
French (fr)
Inventor
王川南
Original Assignee
腾讯科技(深圳)有限公司
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 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Publication of WO2014146561A1 publication Critical patent/WO2014146561A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/04817Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance using icons
    • G06T3/04
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N2201/00Indexing scheme relating to scanning, transmission or reproduction of documents or the like, and to details thereof
    • H04N2201/32Circuits or arrangements for control or supervision between transmitter and receiver or between image input and image output device, e.g. between a still-image camera and its memory or between a still-image camera and a printer device
    • H04N2201/3201Display, printing, storage or transmission of additional information, e.g. ID code, date and time or title
    • H04N2201/3225Display, printing, storage or transmission of additional information, e.g. ID code, date and time or title of data relating to an image, a page or a document
    • H04N2201/325Modified version of the image, e.g. part of the image, image reduced in size or resolution, thumbnail or screennail
    • H04N2201/3251Modified version of the image, e.g. part of the image, image reduced in size or resolution, thumbnail or screennail where the modified version of the image is relating to a person or face

Definitions

  • the subject matter disclosed herein relates to the field of Internet technologies, and in particular, to a thumbnail generation method and system. Background technique
  • thumbnail of the picture is displayed in many cases in order to shorten the loading time when the picture is displayed and to improve the browsing experience of the user.
  • a conventional thumbnail generation method is: first scaling the image to a certain size, and then trimming the scaled image to generate a thumbnail.
  • the method of cropping the scaled image is usually to use the centering clipping or the centering fixed clipping. No matter which method is used, it is impossible to ensure that the thumbnails retain the interest of the human eye in the image. region. Summary of the invention
  • a thumbnail generating method which can ensure that an area of interest in a picture in a picture is preserved in a thumbnail to enhance the effect of the thumbnail.
  • the thumbnail generation method includes the following steps:
  • a thumbnail generation system including: an acquisition module, acquiring an original image and a target thumbnail size;
  • a scaling module calculating a product of a preset coefficient and the target thumbnail size, to obtain a thumbnail size corresponding to the original image, where the preset coefficient is greater than 1; according to the thumbnail size corresponding to the original image
  • the original image is abbreviated to obtain an intermediate result picture
  • Determining a module determining a weight value distribution map of the pixel points from the intermediate result picture
  • the trimming module trims the intermediate result picture according to the weight value distribution map of the pixel point and the target thumbnail size to obtain a thumbnail image including an area of interest to the human eye.
  • the preset size and the obtained target thumbnail size are used to obtain the thumbnail size corresponding to the original image, and the original image is performed according to the thumbnail size corresponding to the original image.
  • the weight value distribution map of the pixel point is determined from the intermediate result picture, and the intermediate result picture is tailored according to the weight value distribution map and the target thumbnail size of the pixel point, Get a thumbnail containing the area of interest to the human eye.
  • the embodiment of the present invention can ensure that the area of interest in the picture is retained in the thumbnail, so that the main body of the original picture can be highlighted in the thumbnail, so that the effect of the thumbnail can be improved.
  • FIG. 1 is a flowchart of a thumbnail generating method according to an embodiment of the present invention
  • FIG. 2 is a structural diagram of a thumbnail generating system according to an embodiment of the present invention
  • FIG. 3 is a diagram according to an embodiment of the present invention.
  • Another structural diagram of a thumbnail generation system Fig. 4 is a structural diagram of an area selection unit included in the thumbnail generation system shown in Fig. 3.
  • the embodiment of the invention provides a method and a system for generating a thumbnail image, which can ensure that the region of interest in the image is retained in the thumbnail image to enhance the effect of the thumbnail image. The details are explained below.
  • FIG. 1 is a flow chart of a thumbnail generating method according to an embodiment of the present invention.
  • the thumbnail generation method shown in FIG. 1 can be applied to electronic devices such as computers, smart phones, and digital cameras. As shown in FIG. 1, the thumbnail generation method starts from step 101.
  • step 101 the original image and the target thumbnail size are obtained.
  • the target thumbnail size refers to the generated thumbnail size.
  • the electronic device can receive the original image of the external input and the target thumbnail size.
  • the electronic device can actively obtain the original image and the target thumbnail size from the outside, which is not limited in the embodiment of the present invention.
  • step 102 the product of the preset coefficient and the target thumbnail size is calculated to obtain a thumbnail size corresponding to the original picture, wherein the preset coefficient is greater than 1.
  • the subsequent original image may be abbreviated to a target
  • the thumbnail size is slightly larger, which ensures that the subsequent cropped thumbnails contain enough image content and highlight the main body of the original image.
  • the main body of the original picture may refer to a person, a main scene, and the like in the original picture.
  • step 103 the original picture is subjected to abbreviated processing according to the thumbnail size corresponding to the original picture to obtain an intermediate result picture.
  • a weight value distribution map of the pixel points is determined from the intermediate result picture.
  • the electronic device may implement the following steps to determine a weight value distribution map of the pixel from the intermediate result picture, that is,
  • the embodiment of the present invention will describe in detail how the electronic device calculates the weight value of each pixel of the intermediate result picture according to the histogram contrast degree.
  • the weighting value of the weight value of the pixel of the area where the face is located may be set according to actual needs, and a maximum value may be added in general.
  • the electronic device can weight the weight value of the pixel points in the empirical placement area corresponding to the subject matter in the intermediate result picture.
  • the intermediate result picture is cropped according to the weight value distribution map and the target thumbnail size of the pixel to obtain a thumbnail containing the area of interest to the human eye.
  • the electronic device may implement the foregoing step 105 by performing the following steps, that is,
  • the upper left coordinate is the intersection pixel of the weight value row corresponding to the maximum row average weight value and the weight column of the maximum column average weight value, so the upper left coordinate must be located in the region of interest of the human eye.
  • the area of interest to the human eye is continuous. Therefore, taking the coordinates of the upper left corner as the starting point and cropping the intermediate result picture according to the target thumbnail size, it is necessary to obtain a thumbnail containing the area of interest to the human eye.
  • the coordinates of the upper left corner as the trimming process can be efficiently calculated by the above steps 11) to 13). Although this method is different from the optimal solution as the upper left coordinate of the clipping process, the experimental results show that the difference is extremely small and can be ignored.
  • the thumbnail generation method illustrated in FIG. 1 may further include the step of outputting a thumbnail.
  • an electronic device can output a thumbnail through a display screen.
  • the electronic device first obtains the thumbnail size corresponding to the original image by using the preset coefficient and the acquired target thumbnail size, and shrinks the original image according to the thumbnail size corresponding to the original image.
  • the weight value distribution map of the pixel point is determined from the intermediate result picture, and the intermediate result picture is tailored according to the weight value distribution map and the target thumbnail size of the pixel point, Get a thumbnail containing the area of interest to the human eye. It can be seen that the thumbnail generation method shown in FIG. 1 can ensure that the area of interest in the picture is retained in the thumbnail, so that the main body of the original picture can be highlighted in the thumbnail, thereby improving the effect of the thumbnail. Please refer to FIG. 2.
  • FIG. 2 Please refer to FIG. 2.
  • thumbnail generation system is a structural diagram of a thumbnail generation system according to another embodiment of the present invention.
  • the thumbnail generation system shown in FIG. 2 can be applied to electronic devices such as computers, smart phones, and digital cameras.
  • the thumbnail generation system includes: an acquisition module 201, which acquires an original image and a target thumbnail size.
  • the scaling module 202 calculates a product of the preset coefficient and the target thumbnail size to obtain a thumbnail size corresponding to the original image, wherein the preset coefficient is greater than 1.
  • the original image is abbreviated according to the thumbnail size corresponding to the original image to obtain an intermediate result picture.
  • the determining module 203 determines a weight value distribution map of the pixel points from the intermediate result picture.
  • the trimming module 204 clips the intermediate result picture according to the weight value distribution map of the pixel point and the target thumbnail size to obtain a thumbnail image including an area of interest to the human eye.
  • FIG. 3 is a structural diagram of another thumbnail generation system according to an embodiment of the present invention. Among them, the thumbnail generation system shown in Fig. 3 is optimized by the thumbnail generation system shown in Fig. 2.
  • the determination module 203 includes:
  • the histogram contrast unit 2031 calculates the weight value of each pixel of the intermediate result picture based on the histogram contrast.
  • the weight value of one pixel is defined by the contrast of it and other pixels in the intermediate result picture.
  • the weight value of the intermediate result picture/middle pixel 4 is defined as: Where D ( I k i ) is the color distance metric of the pixel point and pixel point 4 in the L*a*b* space.
  • D ( I k i ) is the color distance metric of the pixel point and pixel point 4 in the L*a*b* space.
  • N is the intermediate result picture / the number of pixels.
  • the face detecting unit 2032 performs face detection on the intermediate result picture, and performs face detection on the face
  • the weight value of the pixel points in the area is weighted.
  • the experience weighting unit 2033 performs weighting processing on the weight values of the pixel points in the empirical placement area corresponding to the subject matter in the intermediate result picture to obtain a weight value distribution map.
  • the trimming module 204 includes:
  • the area selecting unit 2041 calculates a row average weight value of each row weight value in the weight value distribution map of the pixel point, and determines a weight value row corresponding to the maximum row average weight value; and calculates a weight value distribution map of the pixel point The column average weight value of each column weight value, and determines the weight column corresponding to the maximum column average weight value. The intersection pixel of the weight value column corresponding to the maximum row average weight value and the maximum column average weight value is determined as the upper left coordinate of the trimming process.
  • the cropping unit 2042 cuts the intermediate result picture according to the target thumbnail size from the coordinates of the upper left corner to obtain a thumbnail containing an area of interest to the human eye.
  • the thumbnail generation system shown in FIG. 3 may further include: an output module 205 that outputs a thumbnail.
  • the area selection unit 2041 included in the thumbnail generation system shown in FIG. 3 may include:
  • the row calculation subunit 20411 calculates a row average weight value of each row weight value in the weight value distribution map (HC-Map) of the pixel point, and determines a weight value row corresponding to the maximum row average weight value.
  • the column calculation sub-unit 20412 calculates a column average weight value of each column weight value in the weight value distribution map (HC-Map) of the pixel point, and determines a weight value column corresponding to the maximum column average weight value.
  • the determining subunit 20413 determines the intersection pixel of the weight value row corresponding to the maximum row average weight value and the weight column of the maximum column average weight value as the upper left coordinate of the trimming process.
  • the thumbnail generating method according to FIG. 1 may be a thumbnail generating method performed by each module in the thumbnail generating device shown in FIG. 2.
  • step 101 shown in FIG. 1 can be performed by the acquisition module 201 shown in FIG. 2.
  • the steps 102, 103 shown in Figure 1 can be performed by the scaling module 202 shown in Figure 2.
  • figure 1 The illustrated step 104 can be performed by the determination module 203 shown in FIG.
  • the step 105 shown in FIG. 1 can be performed by the trimming module 105 shown in FIG. 2.
  • the determination module 203 is composed of a histogram contrast unit 2031, a face detection unit 2032, and an experience weighting unit 2033.
  • the trimming module 105 is composed of a region selecting unit 2041 and a trimming unit 2042.
  • the region selection unit 2041 may be composed of a row calculation subunit 20411, a column calculation subunit 20412, and a determination subunit 20413.
  • a general-purpose computing device such as a computer including a processing unit and a storage element including a central processing unit (CPU), a random access memory (RAM), a read only memory (ROM), and the like.
  • a computer program (including program code) for performing the thumbnail generation method as shown in FIG. 1 to construct an image synthesizing device as shown in FIGS. 2 and 3, and to implement thumbnail generation according to an embodiment of the present invention method.
  • the computer program can be recorded, for example, on a computer readable recording medium, and loaded in the above computing device by a computer readable recording medium and operated therein.
  • the method and system for generating a thumbnail can ensure that an area of interest in a picture is preserved in a thumbnail, so that the main body of the original picture can be highlighted in the thumbnail, thereby improving The effect of the thumbnail.
  • the program may be stored in a computer readable storage medium, and the storage medium may include: Flash disk, read-only memory (ROM), random access memory (RAM), disk or optical disk.

Abstract

本发明实施例公开了一种缩略图生成方法及系统,该方法包括:获取原始图片以及目标缩略图尺寸;计算预设系数与所述目标缩略图尺寸的乘积,以获得所述原始图片对应的缩略尺寸;所述预设系数大于1;按照所述原始图片对应的缩略尺寸对所述原始图片进行缩略处理,以获得中间结果图片;从所述中间结果图片中确定出像素点的权重值分布图;根据所述像素点的权重值分布图和所述目标缩略图尺寸,对所述中间结果图片进行剪裁处理,以获得包含人眼感兴趣的区域的缩略图。本发明实施例可以保证缩略图中保留了图片中人眼感兴趣的区域,以提升缩略图的效果。

Description

缩略图生成方法及系统
本专利申请要求 2013 年 3 月 21 日提交的中国专利申请号为 201310092220. 7 , 发明名称为 "一种缩略图生成方法及系统" 的优先 权, 该申请的全文以引用的方式并入本申请中。 技术领域
这里公开的主题内容涉及互联网技术领域,具体涉及一种缩略图 生成方法及系统。 背景技术
图片在智能手机以及数码相机等电子设备中显示时,为了缩短图 片显示时的加载时间以及提高用户的浏览体验,多数情况下会显示图 片的缩略图。 其中, 一种传统的缩略图生成方法是: 先将图片缩放到 一定大小, 然后再对缩放后的图片进行剪裁, 以生成缩略图。 其中, 对缩放后的图片进行剪裁的做法通常是使用居中剪裁或者居中固定 偏上的剪裁, 无论哪种做法都是采用了一刀切的方法, 无法保证缩略 图中保留了图片中人眼感兴趣的区域。 发明内容
有鉴于此, 根据本发明的一个方面, 提供一种缩略图生成方法, 该方法能够保证缩略图中保留了图片中人眼感兴趣的区域,以提升缩 略图的效果。
该缩略图生成方法包括以下步骤:
获取原始图片以及目标缩略图尺寸;
计算预设系数与所述目标缩略图尺寸的乘积,以获得所述原始图 片对应的缩略尺寸, 所述预设系数大于 1 ;
按照所述原始图片对应的缩略尺寸对所述原始图片进行缩略处 理, 以获得中间结果图片;
从所述中间结果图片中确定出像素点的权重值分布图; 根据所述像素点的权重值分布图和所述目标缩略图尺寸,对所述 中间结果图片进行剪裁处理, 以获得包含人眼感兴趣的区域的缩略 图。
根据本发明的另一方面, 还提供一种缩略图生成系统, 包括: 获取模块, 获取原始图片以及目标缩略图尺寸;
缩放模块, 计算预设系数与所述目标缩略图尺寸的乘积, 以获得 所述原始图片对应的缩略尺寸, 所述预设系数大于 1 ; 按照所述原始 图片对应的缩略尺寸对所述原始图片进行缩略处理 , 以获得中间结果 图片;
确定模块, 从所述中间结果图片中确定出像素点的权重值分布 图;
剪裁模块,根据所述像素点的权重值分布图和所述目标缩略图尺 寸, 对所述中间结果图片进行剪裁处理, 以获得包含人眼感兴趣的区 域的缩略图。
由上面的技术方案可知, 在本发明的上述方面中, 先利用预设系 数与获取的目标缩略图尺寸来获得原始图片对应的缩略尺寸,并按照 原始图片对应的缩略尺寸对原始图片进行缩略处理以获得中间结果 图片后, 再从中间结果图片中确定出像素点的权重值分布图, 以及根 据该像素点的权重值分布图和目标缩略图尺寸,对中间结果图片进行 剪裁处理, 以获得包含人眼感兴趣的区域的缩略图。 本发明实施例可 以保证缩略图中保留了图片中人眼感兴趣的区域,使得缩略图中可以 突出原始图片的主体, 从而可以提升缩略图的效果。 附图说明
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例 中所需要使用的附图作简单地介绍, 显而易见地, 下面描述中的附图 仅仅是本发明的一些实施例, 对于本领域普通技术人员来讲, 在不付 出创造性劳动的前提下, 还可以根据这些附图获得其他的附图。 图 1是根据本发明的实施例的一种缩略图生成方法的流程图; 图 2是根据本发明的实施例的一种缩略图生成系统的结构图; 图 3是根据本发明的实施例的另一种缩略图生成系统的结构图; 图 4是根据图 3所示的缩略图生成系统包括的区域选择单元的结 构图。 具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方 案进行清楚、 完整地描述, 显然, 所描述的实施例仅仅是本发明一部 分实施例, 而不是全部的实施例。 基于本发明中的实施例, 本领域普 通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例, 都属于本发明保护的范围。
本发明实施例提供了一种缩略图生成方法及系统,能够保证缩略 图中保留了图片中人眼感兴趣的区域, 以提升缩略图的效果。 以下分 别进行详细说明。
请参阅图 1 ,图 1是根据本发明的实施例的缩略图生成方法的流程 图。 其中, 图 1所示的缩略图生成方法可以应用于电脑、 智能手机以 及数码相机等电子设备中。 如图 1所示, 该缩略图生成方法从步骤 101 开始。
在步骤 101 , 获取原始图片以及目标缩略图尺寸。
其中, 目标缩略图尺寸是指生成的缩略图尺寸。
一个实施例中,电子设备可以接收外部输入的原始图片以及目标 缩略图尺寸, 或者, 电子设备可以主动从外部获取原始图片以及目标 缩略图尺寸, 本发明实施例不作限定。
在步骤 102, 计算预设系数与目标缩略图尺寸的乘积, 以获得原 始图片对应的缩略尺寸, 其中, 预设系数大于 1。
本发明实施例中, 计算大于 1的预设系数与目标缩略图尺寸的乘 积作为原始图片对应的缩略尺寸,可以使后续原始图片缩略至比目标 缩略图尺寸稍大的尺寸,从而可以保证后续剪裁得到的缩略图中既包 含了足够的图片内容, 也可以突出原始图片的主体。 其中, 原始图片 的主体可以指原始图片中人物、 主要景物等。
在步骤 103 , 按照原始图片对应的缩略尺寸对原始图片进行缩略 处理, 以获得中间结果图片。
在步骤 104 , 从中间结果图片确定出像素点的权重值分布图。 本发明实施例中,电子设备可以通过以下步骤来实现从中间结果 图片中确定出像素点的权重值分布图, 即:
1 )、 根据直方图对比度计算中间结果图片的每个像素点的权重 值。
其中,本发明实施例后续将详细介绍电子设备如何根据直方图对 比度来计算中间结果图片的每个像素点的权重值。
2 )、对中间结果图片进行人脸检测, 并对人脸所在区域的像素点 的权重值进行加权处理。
其中,电子设备对中间结果图片进行人脸检测的具体实现过程是 本领域普通技术人员所公知的常识, 本发明实施例此处不作详细论 述。
其中,电子设备对人脸所在区域的像素点的权重值的加权大小可 以根据实际需要设置, 一般情况下可以赋极大值。
3 )、对中间结果图片中的主体事物对应的经验放置区域内的像素 点的权重值进行加权处理, 以获得权重值分布图 ( HC-Map )。
其中, 根据大量的图片统计发现, 70%的图片在拍摄或者处理过 程中更倾向于将主体事物居中偏上的放置,因此居中偏上这个区域作 为经验放置区域, 也属于人眼感兴趣的区域。 因此, 电子设备可以对 中间结果图片中的主体事物对应的经验放置区域内的像素点的权重 值进行加权处理。
在步骤 105 , 根据该像素点的权重值分布图和目标缩略图尺寸, 对中间结果图片进行剪裁处理,以获得包含人眼感兴趣的区域的缩略 图。 本发明实施例中,电子设备可以通过执行以下步骤来实现上述步 骤 105 , 即:
11 )、计算 HC-Map中每一行权重值的行平均权重值, 并确定出最 大行平均权重值对应的权重值行。
12 )、计算 HC-Map中每一列权重值的列平均权重值, 并确定出最 大列平均权重值对应的权重值列。
13 )、 确定最大行平均权重值对应的权重值行与最大列平均权重 值对应的权重值列的交汇像素点, 作为剪裁处理的左上角坐标。
14 )、 以左上角坐标为起点, 按照目标缩略图尺寸对中间结果图 片进行剪裁处理, 以获得包含人眼感兴趣的区域的缩略图。
本发明实施例中,左上角坐标是最大行平均权重值对应的权重值 行与最大列平均权重值对应的权重值列的交汇像素点,因此左上角坐 标必定位于人眼感兴趣的区域中, 而人眼感兴趣的区域又是连续性 的, 因此, 以左上角坐标为起点, 按照目标缩略图尺寸对中间结果图 片进行剪裁处理必定可以获得包含人眼感兴趣的区域的缩略图。
其中, 通过上述步骤 11 )〜步骤 13 )可以高效地计算出作为剪裁 处理的左上角坐标。虽然这种求解作为剪裁处理的左上角坐标的方法 与最优解会存在差异, 但实验结果表明这种差异极小, 可以忽略。
在一个实施例中, 图 1所示的缩略图生成方法还可以包括输出缩 略图的步骤。 举例来说, 电子设备可以通过显示屏输出缩略图。
在图 1所示的缩略图生成方法中, 电子设备先利用预设系数与获 取的目标缩略图尺寸来获得原始图片对应的缩略尺寸,并按照原始图 片对应的缩略尺寸对原始图片进行缩略处理以获得中间结果图片后, 再从中间结果图片中确定出像素点的权重值分布图,以及根据该像素 点的权重值分布图和目标缩略图尺寸, 对中间结果图片进行剪裁处 理, 以获得包含人眼感兴趣的区域的缩略图。 可见, 图 1所示的缩略 图生成方法可以保证缩略图中保留了图片中人眼感兴趣的区域,使得 缩略图中可以突出原始图片的主体, 从而可以提升缩略图的效果。 请参阅图 2 ,图 2是根据本发明的另一实施例的缩略图生成系统的 结构图。 其中, 图 2所示的缩略图生成系统可以应用于电脑、 智能手 机以及数码相机等电子设备中。 如图 2所示, 该缩略图生成系统包括: 获取模块 201 , 获取原始图片以及目标缩略图尺寸。
缩放模块 202, 计算预设系数与所述目标缩略图尺寸的乘积, 以 获得原始图片对应的缩略尺寸, 其中, 预设系数大于 1。 按照原始图 片对应的缩略尺寸对原始图片进行缩略处理, 以获得中间结果图片。
确定模块 203 ,从中间结果图片中确定出像素点的权重值分布图。 剪裁模块 204, 根据该像素点的权重值分布图和该目标缩略图尺 寸, 对中间结果图片进行剪裁处理, 以获得包含人眼感兴趣的区域的 缩略图。
请一并参阅图 3 ,图 3是本发明实施例提供的另一种缩略图生成系 统的结构图。 其中, 图 3所示的缩略图生成系统是由图 2所示的缩略图 生成系统进行优化得到的。 在图 3所示的缩略图生成系统中, 确定模 块 203包括:
直方图对比度单元 2031 ,根据直方图对比度计算中间结果图片的 每个像素点的权重值。
其中,一个像素点的权重值用它和中间结果图片中其他像素点的 对比度来定义。 本发明实施例中, 中间结果图片 /中像素 4的权重值定 义为:
Figure imgf000007_0001
其中, D ( Ik i ) 为像素点 和像素点 4在 L*a*b*空间的颜色距 离度量。 上式可以按照像素顺序展开为以下形式:
5( ) - .0(4, /,) ·!· .0( ,12) - ' ' + .0( . ½) 其中, N为中间结果图片 /的像素点数。
人脸检测单元 2032, 对中间结果图片进行人脸检测, 并对人脸所 在区域的像素点的权重值进行加权处理。
经验加权单元 2033 ,对中间结果图片中的主体事物对应的经验放 置区域内的像素点的权重值进行加权处理, 以获得权重值分布图。
在图 3所示的缩略图生成系统中, 剪裁模块 204包括:
区域选择单元 2041 ,计算该像素点的权重值分布图中每一行权重 值的行平均权重值, 并确定出最大行平均权重值对应的权重值行; 以 及计算该像素点的权重值分布图中每一列权重值的列平均权重值,并 确定出最大列平均权重值对应的权重值列。确定最大行平均权重值对 应的权重值行与最大列平均权重值对应的权重值列的交汇像素点,作 为剪裁处理的左上角坐标。
剪裁单元 2042, 以左上角坐标为起点, 按照目标缩略图尺寸对中 间结果图片进行剪裁处理, 以获得包含人眼感兴趣的区域的缩略图。
一个实施例中, 图 3所示的缩略图生成系统还可以包括: 输出模块 205 , 输出缩略图。
一个实施例中, 如图 4所示, 图 3所示的缩略图生成系统包括的区 域选择单元 2041可以包括:
行计算子单元 20411 , 计算该像素点的权重值分布图 ( HC-Map ) 中每一行权重值的行平均权重值,并确定出最大行平均权重值对应的 权重值行。
列计算子单元 20412, 计算该像素点的权重值分布图 (HC-Map ) 中每一列权重值的列平均权重值,并确定出最大列平均权重值对应的 权重值列。
确定子单元 20413 , 确定最大行平均权重值对应的权重值行与最 大列平均权重值对应的权重值列的交汇像素点,作为剪裁处理的左上 角坐标。
根据本发明的一个实施例, 根据图 1所示的缩略图生成方法可以 是由图 2所示的缩略图生成装置中的各个模块来执行的缩略图生成方 法。 例如, 图 1所示的步骤 101可以由图 2所示的获取模块 201来执行。 图 1所示的步骤 102、 103可以由图 2所示的缩放模块 202来执行。 图 1 所示的步骤 104可以由图 2所示的确定模块 203来执行。图 1所示的步骤 105可以由图 2所示的剪裁模块 105来执行。
根据本发明的另一个实施例, 图 3所示的缩略图生成系统中的某 些(个)模块可以拆分为功能上更小的多个单元来构成。 例如但不限 于, 确定模块 203由直方图对比度单元 2031 , 人脸检测单元 2032以及 经验加权单元 2033构成。 剪裁模块 105由区域选择单元 2041和剪裁单 元 2042构成。
根据本发明的另一个实施例, 图 3所示的缩略图生成系统中的某 些(个)单元可以拆分为功能上更小的多个单元来构成。 例如但不限 于, 区域选择单元 2041可以由行计算子单元 20411 , 列计算子单元 20412以及确定子单元 20413构成。
根据本发明的另一个实施例, 可以通过在包括中央处理单元 ( CPU ), 随机存取存储器(RAM )、 只读存储器(ROM )等处理元 件和存储元件的例如计算机的通用计算设备上运行能够执行如图 1中 所示的缩略图生成方法的计算机程序 (包括程序代码 ), 来构造如图 2 及图 3中所示的图像合成装置, 以及来实现根据本发明的实施例的缩 略图生成方法。所述计算机程序可以记载于例如计算机可读记录介质 上, 并通过计算机可读记录介质装载于上述计算设备中, 并在其中运 行。
综上所述, 应用根据本发明实施例提供的缩略图生成方法和系 统, 可以保证缩略图中保留了图片中人眼感兴趣的区域, 使得缩略图 中可以突出原始图片的主体, 从而可以提升缩略图的效果。
本领域普通技术人员可以理解上述实施例的各种方法中的全部 或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存 储于一计算机可读存储介质中, 存储介质可以包括: 闪存盘、 只读存 储器 (Read-Only Memory , ROM ), 随机存取器 ( Random Access Memory, RAM ), 磁盘或光盘等。
以上对本发明实施例所提供的缩略图生成方法及系统进行了详 细介绍, 本发明的范围由后附的权利要求来定义。 本文中应用了具体 个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是 用于帮助理解本发明的方法及其核心思想; 同时, 对于本领域的一般 技术人员,依据本发明的思想, 在具体实施方式及应用范围上均会有 改变之处, 综上所述, 本说明书内容不应理解为对本发明的限制。

Claims

权 利 要 求 书
1、 一种缩略图生成方法, 包括以下步骤:
获取原始图片以及目标缩略图尺寸;
计算预设系数与所述目标缩略图尺寸的乘积,以获得所述原始图 片对应的缩略尺寸; 所述预设系数大于 1 ;
按照所述原始图片对应的缩略尺寸对所述原始图片进行缩略处 理, 以获得中间结果图片;
从所述中间结果图片中确定出像素点的权重值分布图; 根据所述像素点的权重值分布图和所述目标缩略图尺寸,对所述 中间结果图片进行剪裁处理, 以获得包含人眼感兴趣的区域的缩略 图。
2、根据权利要求 1所述的缩略图生成方法, 所述根据所述中间结 果图片获得像素点的权重值分布图包括:
根据直方图对比度计算所述中间结果图片的每个像素点的权重 值;
对所述中间结果图片进行人脸检测,并对人脸所在区域的像素点 的权重值进行加权处理,以及对所述中间结果图片中的主体事物对应 的经验放置区域内的像素点的权重值进行加权处理,以获得像素点的 权重值分布图。
3、根据权利要求 2所述的缩略图生成方法, 所述根据所述像素点 的权重值分布图和所述目标缩略图尺寸,对所述中间结果图片进行剪 裁处理, 以获得包含人眼感兴趣的区域的缩略图包括:
计算所述像素点的权重值分布图中每一行权重值的行平均权重 值, 并确定出最大行平均权重值对应的权重值行;
计算所述像素点的权重值分布图中每一列权重值的列平均权重 值, 并确定出最大列平均权重值对应的权重值列;
确定所述最大行平均权重值对应的权重值行与所述最大列平均 权重值对应的权重值列的交汇像素点, 作为剪裁处理的左上角坐标; 以所述左上角坐标为起点,按照所述目标缩略图尺寸对所述中间 结果图片进行剪裁处理, 以获得包含人眼感兴趣的区域的缩略图。
4、 根据权利要求 1〜3任一项所述的缩略图生成方法, 还包括: 输出所述缩略图。
5、 一种缩略图生成系统, 包括:
获取模块, 被配置为获取原始图片以及目标缩略图尺寸; 缩放模块, 被配置为计算预设系数与所述目标缩略图尺寸的乘 积, 以获得所述原始图片对应的缩略尺寸; 所述预设系数大于 1 ; 以 及, 按照所述原始图片对应的缩略尺寸对所述原始图片进行缩略处 理, 以获得中间结果图片;
确定模块,被配置为从所述中间结果图片中确定出像素点的权重 值分布图;
剪裁模块,被配置为根据所述像素点的权重值分布图和所述目标 缩略图尺寸, 对所述中间结果图片进行剪裁处理, 以获得包含人眼感 兴趣的区域的缩略图。
6、 根据权利要求 5所述的缩略图生成系统, 所述确定模块包括: 直方图对比度单元,被配置为根据直方图对比度计算所述中间结 果图片的每个像素点的权重值;
人脸检测单元, 被配置为对所述中间结果图片进行人脸检测, 并 对人脸所在区域的像素点的权重值进行加权处理;
经验加权单元,被配置为对所述中间结果图片中的主体事物对应 的经验放置区域内的像素点的权重值进行加权处理,以获得权重值分 布图。
7、 根据权利要求 6所述的缩略图生成系统, 所述剪裁模块包括: 区域选择单元,被配置为计算所述像素点的权重值分布图中每一 行权重值的行平均权重值,并确定出最大行平均权重值对应的权重值 行,以及计算所述像素点的权重值分布图中每一列权重值的列平均权 重值, 并确定出最大列平均权重值对应的权重值列, 确定所述最大行 平均权重值对应的权重值行与所述最大列平均权重值对应的权重值 列的交汇像素点, 作为剪裁处理的左上角坐标; 剪裁单元, 被配置为以所述左上角坐标为起点, 按照所述目标缩 略图尺寸对所述中间结果图片进行剪裁处理,以获得包含人眼感兴趣 的区域的缩略图。
8、根据权利要求 7所述的缩略图生成系统, 所述区域选择单元包 括:
行计算子单元,被配置为计算所述像素点的权重值分布图中每一 行权重值的行平均权重值,并确定出最大行平均权重值对应的权重值 行;
列计算子单元,被配置为计算所述像素点的权重值分布图中每一 列权重值的列平均权重值,并确定出最大列平均权重值对应的权重值 歹1 J ;
确定子单元 ,被配置为确定所述最大行平均权重值对应的权重值 行与所述最大列平均权重值对应的权重值列的交汇像素点,作为剪裁 处理的左上角坐标。
9、 根据权利要求 5〜8任一项所述的缩略图生成系统, 还包括: 输出模块, 被配置为输出所述缩略图。
PCT/CN2014/073546 2013-03-21 2014-03-17 缩略图生成方法及系统 WO2014146561A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310092220.7 2013-03-21
CN201310092220.7A CN104063844B (zh) 2013-03-21 2013-03-21 一种缩略图生成方法及系统

Publications (1)

Publication Number Publication Date
WO2014146561A1 true WO2014146561A1 (zh) 2014-09-25

Family

ID=51551537

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/073546 WO2014146561A1 (zh) 2013-03-21 2014-03-17 缩略图生成方法及系统

Country Status (2)

Country Link
CN (1) CN104063844B (zh)
WO (1) WO2014146561A1 (zh)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11842429B2 (en) 2021-11-12 2023-12-12 Rockwell Collins, Inc. System and method for machine code subroutine creation and execution with indeterminate addresses
US11854110B2 (en) 2021-11-12 2023-12-26 Rockwell Collins, Inc. System and method for determining geographic information of airport terminal chart and converting graphical image file to hardware directives for display unit
US11887222B2 (en) 2021-11-12 2024-01-30 Rockwell Collins, Inc. Conversion of filled areas to run length encoded vectors
US11915389B2 (en) 2021-11-12 2024-02-27 Rockwell Collins, Inc. System and method for recreating image with repeating patterns of graphical image file to reduce storage space
US11954770B2 (en) 2021-11-12 2024-04-09 Rockwell Collins, Inc. System and method for recreating graphical image using character recognition to reduce storage space

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105956999B (zh) * 2016-04-28 2020-08-28 努比亚技术有限公司 缩略图生成装置和方法
CN106251283A (zh) * 2016-07-28 2016-12-21 乐视控股(北京)有限公司 一种缩略图生成方法及设备
CN109947972A (zh) * 2017-10-11 2019-06-28 腾讯科技(深圳)有限公司 缩略图生成方法及装置、电子设备、存储介质
CN107967716B (zh) * 2017-11-01 2021-08-06 深圳依偎控股有限公司 一种基于立体图片的缩略图显示控制方法及系统
CN108363535B (zh) * 2018-02-09 2020-10-27 网易(杭州)网络有限公司 图片的显示方法、装置、存储介质、处理器及终端
CN109063085B (zh) * 2018-07-26 2021-07-13 创新先进技术有限公司 缩略图生成方法和装置
CN109389659B (zh) * 2018-09-11 2023-08-25 广州视源电子科技股份有限公司 Ppt中数学公式的渲染方法、装置、存储介质及终端设备
CN111199517A (zh) * 2019-12-17 2020-05-26 航天信息股份有限公司 一种大占用空间图像旋转方法及系统

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101266650A (zh) * 2008-03-31 2008-09-17 北京中星微电子有限公司 一种基于人脸检测的图像保存方法
CN102810042A (zh) * 2011-06-02 2012-12-05 宏达国际电子股份有限公司 影像缩图的版面产生方法及系统

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4640515B2 (ja) * 2009-03-25 2011-03-02 日本ビクター株式会社 サムネイル生成装置、サムネイル生成方法、及びサムネイル生成プログラム
JP5419654B2 (ja) * 2009-12-01 2014-02-19 株式会社ソニー・コンピュータエンタテインメント 情報処理装置および情報処理システム
CN101853286B (zh) * 2010-05-20 2016-08-10 上海全土豆网络科技有限公司 视频缩略图智能选取方法

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101266650A (zh) * 2008-03-31 2008-09-17 北京中星微电子有限公司 一种基于人脸检测的图像保存方法
CN102810042A (zh) * 2011-06-02 2012-12-05 宏达国际电子股份有限公司 影像缩图的版面产生方法及系统

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11842429B2 (en) 2021-11-12 2023-12-12 Rockwell Collins, Inc. System and method for machine code subroutine creation and execution with indeterminate addresses
US11854110B2 (en) 2021-11-12 2023-12-26 Rockwell Collins, Inc. System and method for determining geographic information of airport terminal chart and converting graphical image file to hardware directives for display unit
US11887222B2 (en) 2021-11-12 2024-01-30 Rockwell Collins, Inc. Conversion of filled areas to run length encoded vectors
US11915389B2 (en) 2021-11-12 2024-02-27 Rockwell Collins, Inc. System and method for recreating image with repeating patterns of graphical image file to reduce storage space
US11954770B2 (en) 2021-11-12 2024-04-09 Rockwell Collins, Inc. System and method for recreating graphical image using character recognition to reduce storage space

Also Published As

Publication number Publication date
CN104063844A (zh) 2014-09-24
CN104063844B (zh) 2019-01-15

Similar Documents

Publication Publication Date Title
WO2014146561A1 (zh) 缩略图生成方法及系统
US10284789B2 (en) Dynamic generation of image of a scene based on removal of undesired object present in the scene
JP6154075B2 (ja) オブジェクト検出及び分割の方法,装置,コンピュータプログラム製品
KR102018887B1 (ko) 신체 부위 검출을 이용한 이미지 프리뷰
WO2019237745A1 (zh) 人脸图像处理方法、装置、电子设备及计算机可读存储介质
JP6040655B2 (ja) 画像処理装置、画像処理方法、制御プログラムおよび記録媒体
CN107944420B (zh) 人脸图像的光照处理方法和装置
US9607394B2 (en) Information processing method and electronic device
US20160321833A1 (en) Method and apparatus for generating moving photograph based on moving effect
US10750147B2 (en) Method and apparatus for generating HDRI
WO2020087729A1 (zh) 一种图像处理方法及装置、电子设备、存储介质
WO2020186385A1 (zh) 图像处理方法、电子设备及计算机可读存储介质
TW201724029A (zh) 以全異比例縮放爲基礎之影像處理裝置、影像處理之方法、以及包括其之電子系統
US20150235630A1 (en) Transparency Determination for Overlaying Images on an Electronic Display
EP3029677A1 (en) A method and apparatus for generating automatic animation
US9171357B2 (en) Method, apparatus and computer-readable recording medium for refocusing photographed image
WO2021139764A1 (zh) 图像处理方法、装置、电子装置及存储介质
CN109791703B (zh) 基于二维媒体内容生成三维用户体验
US20160353021A1 (en) Control apparatus, display control method and non-transitory computer readable medium
US11138743B2 (en) Method and apparatus for a synchronous motion of a human body model
TWI549478B (zh) 產生三維影像的方法及其電子裝置
WO2017024954A1 (zh) 图像显示方法及装置
JP2017021430A (ja) パノラマビデオデータの処理装置、処理方法及びプログラム
CN114785957A (zh) 拍摄方法及其装置
WO2019075644A1 (zh) 人像照片的搜索方法和终端

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14770016

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205N DATED 27/11/2015)

122 Ep: pct application non-entry in european phase

Ref document number: 14770016

Country of ref document: EP

Kind code of ref document: A1