CN104598921A - Video preview selecting method and device - Google Patents

Video preview selecting method and device Download PDF

Info

Publication number
CN104598921A
CN104598921A CN 201410852257 CN201410852257A CN104598921A CN 104598921 A CN104598921 A CN 104598921A CN 201410852257 CN201410852257 CN 201410852257 CN 201410852257 A CN201410852257 A CN 201410852257A CN 104598921 A CN104598921 A CN 104598921A
Authority
CN
Grant status
Application
Patent type
Prior art keywords
value
number
theme
color
face
Prior art date
Application number
CN 201410852257
Other languages
Chinese (zh)
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

Links

Abstract

The invention discloses a video preview selecting method and device. The method comprises receiving a video and performing a set number of random screenshots on the video; performing face number detection and gray level computation on every screenshot, and according to the face number and the gray level computing result of every screenshot, assigning scores for every screenshot; according to the scores of the screenshots, selecting one of the screenshots as the preview of the video. The video preview selecting method achieves modeling design from the aspects of the face number, the clear degree, the color richness and the color fluctuation of the screenshots to digitize various influence factors, combines the influence factors through weighting, and finally evaluates the screen shots by quantizing the influence factors, thereby providing a high-practicality screenshot evaluating mechanism and being capable of automatically screening the screenshots to accurately and stably screen out reasonable video previews.

Description

视频预览图的选取方法及选取装置 The method of selecting the video preview and selection means

技术领域 FIELD

[0001 ] 本申请涉及数字图像处理技术领域,具体涉及一种视频预览图的选取方法及选取装置。 [0001] The present application relates to the field of digital image processing technology, particularly relates to a method for selecting a video preview and selection means.

背景技术 Background technique

[0002] 随着多媒体技术及互联网技术的快速发展,越来越多的多媒体信息在网络上传播。 [0002] With the rapid development of multimedia technology and Internet technology, more and more multimedia information dissemination on the network. 由于视频相比于文本、图像及声音等其他媒介能够承载更丰富、更生动的信息,受到了广泛接受和喜爱。 As the video compared to other media text, images and sound, capable of carrying a richer, more vivid information, it has been widely accepted and loved. 目前视频网站上含有大量的视频供用户观看,而用户在浏览网页时,通常希望短时间内能够在海量的视频库中找到自己感兴趣的视频进行观看。 Currently it contains a lot of videos for users to watch video on the site, and users browse the Web, usually hope to find short video they are interested in a massive video library for viewing. 因此为每个视频加上预览图成为了一种提高浏览效率的方法。 Therefore become a way to improve browsing efficiency for each video plus preview.

[0003] 目前为视频添加预览图的方法主要有以下几种,第一种就是随机在视频中截取一帧画面,作为该视频的预览图。 [0003] Add the current video previews are the following methods, the first one is taken randomly in the video picture, as a preview of the video. 这是目前各大视频网站普遍采用的方案。 This is the major video sites commonly used programs. 这种方法简单实用,但却存在一些问题。 This method is simple and practical, but there are some problems. 比如,由于是随机截取,得到的预览图可能会出现全黑、全白、模糊等情况,并不能很好地展示视频的内容,最终使得用户通过预览图了解视频内容的目的无法实现。 For example, since the random taken, obtained preview may appear all black, all white, blur, etc., is not a good display video content, such that the final user to understand the video preview content object can not be achieved. 另一种是人工筛选的方法,通常随机在视频中截取多帧画面,之后由编辑人员人工筛选出主观上最好的图片作为该视频的预览图。 Another approach is manual screening, taken generally random plurality of video frames, followed by the editorial staff doing screened best subjective picture as the video preview. 这种方法虽然可以得到较为理想预览图, 但是由于筛选过程需要人工干预,面对海量的视频,这种筛选的人工成本和时间成本都是非常高的。 Although this method can be ideal preview, but because of the screening process requires human intervention, faced with vast amounts of video, such screening labor costs and time costs are very high.

[0004] 如何通过电脑自动执行,准确、稳定地筛选出合理的视频预览图,并达到接近于人工筛选的效果,就成为了亟待解决的技术问题。 [0004] How the computer automatically, accurately and stably screened reasonable video preview, and achieve close to manual screening, it has become a technical problem to be solved.

发明内容 SUMMARY

[0005] 本申请的目的在于提供一种视频预览图的选取方法及选取装置,通过电脑自动执行,准确、稳定地筛选出合理的视频预览图。 [0005] The present application aims to provide a method for selecting a video preview and selection means, through the computer automatically, accurately, stably selected video preview reasonable FIG.

[0006] 为了解决上述技术问题,本申请揭示了一种视频预览图的选取方法,包括:接收视频并对视频进行预定数量的随机截图;分别对每幅截图进行人脸个数的检测和灰度计算, 根据所述每副截图的人脸个数和灰度计算结果,为每副截图赋予分值;根据每幅截图的分值选取一张截图作为所述视频的预览图。 [0006] In order to solve the above problems, the present application discloses a method of selecting a video preview, comprising: receiving a video and a predetermined number of video random theme; each piece separately detecting the number of shots of the face and ash calculating, in accordance with the number of the sub-theme of each face and gradation results, scores given for each sub-theme; select a theme of the video preview as scores according to each piece of theme.

[0007] 进一步地,所述灰度计算,包括:检测每幅截图的清晰程度,计算每幅截图中的色彩丰富程度和色彩波动程度;所述灰度计算结果,包括:每幅截图的清晰程度、色彩丰富程度和色彩波动程度。 [0007] Further, the calculated gradation, comprising: detecting each piece of clarity screenshot calculated color richness and color fluctuation degree of each piece of theme; the gradation results, comprising: a screenshot of each piece of clear the degree of richness of color and volatility of the colors.

[0008] 进一步地,为每幅截图赋予分值,包括:所述每幅截图的分值,与人脸个数的分值、 清晰程度的分值、色彩丰富程度的分值正相关,与所述色彩波动程度的分值负相关;其中, 所述人脸的个数越少且所述人脸在所述截图中所处位置越靠近中部,所述截图的人脸个数的分值越高;所述截图中的边缘的宽度越小,所述截图的清晰程度的分值越高;所述截图的最低灰度值和最高灰度值的差值越大,所述截图的色彩丰富程度的分值越高;所述截图的灰度图像的相对标准偏差的越大,所述截图的色彩波动程度的分值越高。 [0008] Further, given the score of each piece of theme, comprising: a screenshot of each web scores, and the number of face score, score clarity, richness of color score positively correlated with degree of fluctuation of the color negative correlation value; wherein, the fewer the number of the face and the face closer to the central location in the theme, the theme of the number of scores face the higher; the smaller the width of the edge of the screenshot, the higher the value of the clarity of the theme; the greater the difference screenshot lowest gray value and the highest value of the gradation, the color screenshot the higher the score richness; screenshot of the relative standard deviation of the gray scale image, the higher the degree of fluctuation of the color value of the screenshot.

[0009] 进一步地,对于任一截图,识别所述任一截图的类型,对于识别出的截图类型,针对人脸个数的分值、清晰程度的分值、色彩丰富程度的分值、色彩波动程度的分值,选取相应的权重配置方案,并根据人脸个数的分值、清晰程度的分值、色彩丰富程度的分值、色彩波动程度的分值,结合权重配置方案中为每种分值配置的权重,为所述任一截图赋予分值。 [0009] Further, for any of a theme, the identification of any type of a theme, the theme for the identified type, for the number of face value, the score clarity, richness of color score, color degree of fluctuation of the value, select the appropriate weighting configuration scheme, according to the number of face value, the clarity of the score, score richness of color, degree of fluctuation of the color value, in conjunction with the weight configured for each embodiment seed weight score right configuration for any of the scores given theme. [0010] 进一步地,对每幅截图进行人脸个数的检测,包括:对于每幅截图,通过预设的人脸特征算子进行特征检测,识别出图像中的人脸,其中,所述人脸特征算子用于检测人脸中各关键特征点间的位置比例关系;根据识别出的人脸为所述截图赋予人脸个数的分值,其中,所述人脸的个数越少且所述人脸在所述截图中所处位置越靠近中部,所述截图的人脸个数的分值越高。 [0010] Furthermore, each piece of theme for detecting the number of human face, comprising: for each piece of theme, through a preset facial feature for feature detection operator, recognizes an image of a human face, wherein said operator facial feature positions for each of the proportional relationship between the feature points of the face detection; number score given to the theme of the face according to the recognized face, wherein the number of the face little higher and closer to the middle of the face, the number of shots of people's face value in the shot location.

[0011] 进一步地,检测每幅截图的清晰程度,包括:对于每幅截图,通过预设的边缘检测算子,对截图进行边缘检测运算,对检测出的边缘的宽度进行识别;根据识别出的边缘的宽度为截图赋予清晰程度的分值,其中,所述截图中边缘的宽度越小,所述截图的清晰程度的分值越高。 [0011] Further, the detection of each piece of theme clarity, comprising: for each piece of theme, the screenshot is edge detection operation by a predetermined edge detection operators, the width of the detected edge is identified; identified in accordance with the width of the edge to impart clarity screenshot score, wherein the smaller the width of the edge of the shot, the higher the clarity of the theme score.

[0012] 进一步地,计算每幅截图中的色彩丰富程度,包括:对于每幅截图,将其由彩色图像转换为灰度图像,获得所述灰度图像中每个像素点的灰度值,统计得出其灰度直方图数据,根据其灰度直方图数据查找所述灰度图像中具有最低灰度值和最高灰度值的像素点; 根据所述最低灰度值和最高灰度值为所述截图赋予色彩丰富程度的分值,其中,所述最低灰度值和最高灰度值的差值越大,所述截图的色彩丰富程度的分值越高。 [0012] Further, richness of color is calculated in each piece of theme, comprising: a theme for each piece, which converts the color image into a grayscale image, the grayscale image is obtained for each pixel of the gray value, which statistics obtained histogram data to find the gray scale image data according to the histogram of the gray pixels having the highest and the lowest gray value of the gray value; the minimum and maximum grayscale values ​​according to the gradation value the theme to impart color richness value, wherein the larger the difference between the minimum and maximum gradation value of the gradation values, the higher the richness of the colors screenshot score.

[0013] 进一步地,计算每幅截图中的色彩波动程度,包括:根据所述最低灰度值和最高灰度值由所述灰度直方图数据中截取位于两者之间的每个灰度值的像素点个数;根据由所述灰度直方图数据中截取出的像素点总个数以及由所述灰度直方图数据中截取出的灰度值的总个数,计算像素点分布的平均值,根据由所述灰度直方图数据中截取出的每个灰度值的像素点个数与所述平均值计算所述灰度图像的相对标准偏差;根据所述灰度图像的相对标准偏差为所述截图赋予色彩波动程度的分值,其中,所述截图的灰度图像的相对标准偏差的越大,所述截图的色彩波动程度的分值越高。 [0013] Further, calculate the degree of fluctuation of each color in a screenshot web, comprising: intercepting each gray positioned therebetween by said histogram data based on the highest value and the lowest gray gradation values the number of pixel point values; according intercepted by said histogram data the total number of pixels and the total number intercepted by the histogram data in the gray values, calculating a pixel point distribution average value, according to the number of pixels for each gradation value taken by said histogram data with the average relative standard deviation of the gray image; based on the grayscale image the relative standard deviation of the color-imparting theme volatility value, wherein the relative standard deviation of the gray scale image theme is, the higher the degree of fluctuation of the color value of the screenshot.

[0014] 进一步地,根据其灰度直方图数据查找所述灰度图像中具有最低灰度值和最高灰度值的像素点,包括:从所述灰度直方图数据的第一个灰度值开始,依次对所述灰度值对应的像素点个数进行查询,记录像素点个数大于〇的第一个灰度值作为最低灰度值;从所述灰度直方图数据的最后一个灰度值开始,依次对所述灰度值对应的像素点个数进行查询, 记录像素点个数大于0的第一个灰度值作为最高灰度值;其中,所述灰度直方图数据按灰度值由小到大的顺序排列。 [0014] Further, according to find the gray scale image having a gray histogram data of pixels having the highest and the lowest gray value of gradation values, comprising: a first histogram from the gray scale data value starts sequentially to query the number of the gradation values ​​of pixels corresponding to record a first gradation value as a minimum gray value greater than the square of the number of pixels; last data from the histogram start gradation values, the number of pixels sequentially gradation value corresponding to the query, recording the first value as a gradation value of the maximum number of gray pixels is larger than zero; wherein said histogram data arranged in order of ascending grayscale value.

[0015] 为了解决上述技术问题,本身请还揭示了一种视频预览图的选取装置,包括:截图模块,用于接收视频并对视频进行预定数量的随机截图;赋值模块,分别用于对每幅截图进行人脸个数的检测和灰度计算,根据所述每副截图的人脸个数和灰度计算结果,为每副截图赋予分值;选取模块,用于根据每幅截图的分值选取一张截图作为所述视频的预览图。 [0015] In order to solve the above problems, please se also discloses selecting a video preview device, comprising: a theme module for receiving a video and a predetermined number of video random theme; assignment module, respectively, for each Screenshot web detection and face gradation number calculation, in accordance with the number of the calculation results of each sub-theme and gray face, each sub-score is given theme; selection module, for dividing each web according screenshot selecting a value of the video as a theme preview.

[0016] 进一步地,所述赋值模块所进行的灰度计算,包括:检测每幅截图的清晰程度,计算每幅截图中的色彩丰富程度和色彩波动程度;获得的所述灰度计算结果,包括:每幅截图的清晰程度、色彩丰富程度和色彩波动程度。 [0016] Furthermore, the gradation assignment calculation performed by module, comprising: detecting each piece of theme clarity, color and richness of color calculating the degree of fluctuation of each piece of theme; the gradation calculation result obtained, including: the clarity of each piece of shots, color and richness of color volatility.

[0017] 进一步地,所述赋值模块,为所述每幅截图赋予的分值,与人脸个数的分值、清晰程度的分值、色彩丰富程度的分值正相关,与所述色彩波动程度的分值负相关;其中,所述人脸的个数越少且所述人脸在所述截图中所处位置越靠近中部,所述截图的人脸个数的分值越高;所述截图中的边缘的宽度越小,所述截图的清晰程度的分值越高;所述截图的最低灰度值和最高灰度值的差值越大,所述截图的色彩丰富程度的分值越高;所述截图的灰度图像的相对标准偏差的越大,所述截图的色彩波动程度的分值越高。 [0017] Furthermore, the assignment module, each of said web to impart screenshot scores, and the number of face score, score clarity, richness of color score positively correlated with the color degree of fluctuation of the negative correlation value; wherein, the fewer the number of the face and the face closer to the central location in the screenshot, the higher the value of the number of shots of the face; the width of the edge of the screenshot, the higher the value of the clarity of the theme; the greater the value of the difference between the lowest gradation and the highest gradation value screenshot of the richness of color screenshot higher scores; the greater the relative standard deviation of the gray scale image of the theme, the higher the degree of fluctuation of the color value of the screenshot.

[0018] 进一步地,所述赋值模块,对于任一截图,识别所述任一截图的类型,对于识别出的截图类型,针对人脸个数的分值、清晰程度的分值、色彩丰富程度的分值、色彩波动程度的分值,选取相应的权重配置方案,并根据人脸个数的分值、清晰程度的分值、色彩丰富程度的分值、色彩波动程度的分值,结合权重配置方案中为每种分值配置的权重,为所述任一截图赋予分值。 [0018] Furthermore, the assignment module, for any theme, any type of a screenshot of the identification of the type for the identified theme, for the number of face value, the score clarity, color richness score, the degree of fluctuation of the color value, select the appropriate weighting configuration scheme, according to the number of face value, the clarity of the score, score richness of color, degree of fluctuation of the color value, in conjunction with the weight right allocation scheme configured for each weight value, given a score of any of the theme.

[0019] 进一步地,所述赋值模块,对于每幅截图,通过预设的人脸特征算子进行特征检测,识别出图像中的人脸,其中,所述人脸特征算子用于检测人脸中各关键特征点间的位置比例关系;根据识别出的人脸为截图赋予人脸个数的分值,其中,所述人脸的个数越少且所述人脸在所述截图中所处位置越靠近中部,所述截图的人脸个数的分值越高。 [0019] Furthermore, the assignment module, for each piece of theme, the predetermined feature is detected by the face feature operator recognizes that human faces in an image, wherein the facial feature for detecting a human operator position proportional relationship between the respective feature points of the face; the face according to the recognized number of scores given for the theme face, wherein the smaller the number of the face and the face in the screenshot location closer to the center, the higher the value of the number of shots of people's face.

[0020] 进一步地,所述赋值模块,对于每幅截图,用于通过预设的边缘检测算子,对截图进行边缘检测运算,对检测出的边缘的宽度进行识别;根据识别出的边缘的宽度为截图赋予清晰程度的分值,其中,所述截图中的边缘的宽度越小,所述截图的清晰程度的分值越尚。 [0020] Furthermore, the assignment module, for each piece of theme, for detecting operator through a preset edge, edge detection operation of the shots, the width of the detected edge is identified; identified according to the edge of the Screenshot width impart clarity score, wherein the smaller the width of the edge in the screenshot, the screenshot of still more clarity score.

[0021] 进一步地,所述赋值模块,对于每幅截图,用于将其由彩色图像转换为灰度图像, 获得所述灰度图像中每个像素点的灰度值;根据灰度值的取值范围统计出灰度值数列,根据所述灰度图像中所有像素点及其灰度值统计所述灰度值数列中每个灰度值的像素点个数,根据所述灰度值数列及相应的像素点个数查找所述灰度图像中具有最低灰度值和最高灰度值的像素点;根据所述最低灰度值和最高灰度值为所述截图赋予色彩丰富程度的分值,其中,所述最低灰度值和最高灰度值的差值越大,所述截图的色彩丰富程度的分值越尚。 [0021] Furthermore, the assignment module, for each piece of theme, for converting the color image to a grayscale image, each pixel gray value to obtain the gray scale image; the gray scale value of statistical gray value range series, all of the pixels according to their gray value of the gray scale image pixel gray value of the number of statistical points for each number of columns of gradation values, according to the gradation values the number of columns and the corresponding number of pixels of the grayscale image to find a pixel having the highest point and the lowest gray value of the gray value; theme is given to the richness of color gradation in accordance with the minimum and maximum values ​​of the gradation value, wherein the larger the difference between the minimum and maximum gradation value of the gradation values, the richness of color still more screenshot score.

[0022] 进一步地,所述赋值模块,用于根据所述最低灰度值和最高灰度值由所述灰度值数列中截取位于两者之间的部分灰度值数列以及所述部分灰度值数列中相应每个灰度值的像素点个数;根据所述部分灰度值数列中相应的像素点的总个数以及所述部分灰度值数列中灰度值的总个数,计算在所述部分灰度值数列上的像素点分布的平均值,根据所述部分灰度值数列中每个灰度值的像素点个数与所述平均值计算所述灰度图像的相对标准偏差;根据所述灰度图像的相对标准偏差为所述截图赋予色彩波动程度的分值,其中,所述截图的灰度图像的相对标准偏差的越大,所述截图的色彩波动程度的分值越高。 [0022] Furthermore, the assignment module for intercepting part gradation value series positioned therebetween and said portion of the gray tone value according to the number of columns in the highest and lowest gray value gray value a corresponding number of values ​​for each number of columns of the pixel gray value; the total number of pixels corresponding to the portion of the gray value number and column number of the gradation values ​​in the column portion of the total number of gray values, calculating an average value points distributed over the portion of the pixel gray scale value of the number of columns, the gray scale image is calculated based on the relative number of pixels for each gradation value of the gradation value of the portion with the average number of columns standard deviation; the relative standard deviation of the gray-scale image of the theme to impart color value volatility, wherein the relative standard gray scale image of the screenshot larger deviation, the degree of fluctuation of the color theme The higher the score.

[0023] 进一步地,所述赋值模块,用于从所述灰度值数列的第一个灰度值开始,依次对所述灰度值对应的像素点个数进行查询,记录像素点个数大于〇的第一个灰度值作为最低灰度值;从所述灰度值数列的最后一个灰度值开始,依次对所述灰度值对应的像素点个数进行查询,记录像素点个数大于0的第一个灰度值作为最高灰度值;其中,所述灰度直方图数据按灰度值由小到大的顺序排列。 [0023] Furthermore, the assignment module is configured to start from a gray scale value of said gray value series, sequentially number of pixels corresponding to the gradation value query, recording the number of pixels a square larger than the first gradation value as a minimum gradation value; gradation value from the last of the series of gradation values ​​sequentially corresponding to the number of gradation values ​​of the pixels query point, a recorded pixels the first number of a grayscale value greater than 0 as the highest gradation value; wherein the histogram data by gradation values ​​arranged in ascending order.

[0024] 与现有技术相比,本申请可以获得包括以下技术效果: [0024] Compared with the prior art, the present application includes the following technical effects can be obtained:

[0025] 本申请从截图的人脸个数、清晰程度、色彩丰富程度和色彩波动程度的角度进行建模设计,将多种影响因素数据化,并对于影响因素通过加权进行组合,最终将上述影响因素通过量化的方式对截图进行评价,从而提供了一种实用性很强的截图评价机制,并通过这种机制对截图进行自动筛选,准确、稳定地筛选出合理的视频预览图。 [0025] This application is designed to model the human face number, clarity, color and richness of color fluctuation degree angle shots, the data of various factors, and factors for the weighted combination, the above-described final factors quantified by way of screenshots evaluation, thus providing a very practical evaluation mechanism screenshots, screenshots and automatically screened through this mechanism, accurate and stable screening a reasonable video preview.

附图说明 BRIEF DESCRIPTION

[0026] 此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。 [0026] The drawings described herein are provided for further understanding of the present disclosure, constitute part of this application, exemplary embodiments of the present disclosure used to explain the embodiment of the present application, without unduly limiting the present disclosure. 在附图中: In the drawings:

[0027] 图1是本申请实施例一的方法流程图。 [0027] FIG. 1 is a flowchart of one application of the present method embodiment.

[0028] 图2是本申请实施例二的方法流程图。 [0028] FIG. 2 is a flow chart of the application method according to the second embodiment.

[0029] 图3是本申请实施例二的方法流程图。 [0029] FIG. 3 is a flowchart of a method of the present application according to the second embodiment.

[0030] 图4是本申请实施例四的方法流程图。 [0030] FIG. 4 is a flowchart of a method fourth embodiment of the present application.

[0031] 图5是本申请实施例五的方法流程图。 [0031] FIG. 5 is a flowchart of a method of the present application according to a fifth embodiment.

[0032] 图6是本申请实施例六的装置结构图。 [0032] FIG. 6 is a structural view of the present application apparatus according to a sixth embodiment.

具体实施方式 detailed description

[0033] 以下将配合附图及实施例来详细说明本申请的实施方式,藉此对本申请如何应用技术手段来解决技术问题并达成技术功效的实现过程能充分理解并据以实施。 [0033] The following will cooperate with drawings and embodiments are described in detail embodiments of the present application, whereby the application of how to apply this technology to solve technical problems and reach technical effects of the implementation process to fully understand and implement accordingly.

[0034] 如在说明书及权利要求当中使用了某些词汇来指称特定组件。 [0034] Certain terms as used in the specification and claims to refer to particular components. 本领域技术人员应可理解,硬件制造商可能会用不同名词来称呼同一个组件。 Those skilled in the art will appreciate, manufacturers may use different terms to refer to a component. 本说明书及权利要求并不以名称的差异来作为区分组件的方式,而是以组件在功能上的差异来作为区分的准则。 The present specification and claims is not to differ in name as a way to distinguish between the components, but rather the difference in function to the components as a criterion to distinguish. 如在通篇说明书及权利要求当中所提及的"包含"为一开放式用语,故应解释成"包含但不限定于"。 As mentioned throughout the specification and claims, "comprising" is an open-ended fashion, and thus should be interpreted to mean "including, but not limited to." "大致"是指在可接收的误差范围内,本领域技术人员能够在一定误差范围内解决所述技术问题,基本达到所述技术效果。 "Substantially" means within an error range is acceptable, those skilled in the art to solve the technical problem within a certain error range, to achieve the basic technical effect. 此外,"耦接"或"电性连接"一词在此包含任何直接及间接的电性耦接手段。 Furthermore, "coupled" or "electrically connected" are intended to mean either an indirect or direct electrical coupling means. 因此,若文中描述一第一装置耦接于一第二装置,则代表所述第一装置可直接电性耦接于所述第二装置,或通过其它装置或耦接手段间接地电性耦接至所述第二装置。 Accordingly, described herein if a device is coupled to a second device, said first means represents may be directly electrically coupled to the second means, or by other means or indirectly electrically coupling means coupled connected to the second device. 说明书后续描述为实施本申请的较佳实施方式,然所述描述乃以说明本申请的一般原则为目的,并非用以限定本申请的范围。 Follow the instructions described embodiment is a preferred embodiment of the present disclosure, then the disclosure of the present description are based on the general principles described for the purpose, not for limiting the scope of the application. 本申请的保护范围当视所附权利要求所界定者为准。 When the scope of the present application the following claims and their equivalents.

[0035] 还需要说明的是,术语"包括"、"包含"或者其任何其它变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者系统不仅包括那些要素,而且还包括没有明确列出的其它要素,或者是还包括为这种过程、方法、商品或者系统所固有的要素。 [0035] It is further noted that the terms "comprises", "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, goods or not include only those elements of the system, but also other elements not explicitly listed, or further includes elements of the process, method, article, or inherent in the system. 在没有更多限制的情况下,由语句"包括一个……"限定的要素,并不排除在包括所述要素的过程、方法、商品或者系统中还存在另外的相同要素。 Without more constraints, by the wording "include a ......" defined does not exclude the existence of additional identical elements in the element comprising a process, method, product or system. 本申请实施例中所述"转码"亦可以称为"编码"。 Application in the present embodiment "transcoding" embodiment can also be referred to as "encoding."

[0036] 实施例一 [0036] Example a

[0037] 本申请实施例所揭示的一种视频预览图的选取方法,如图1所示,其包括以下步骤: A method for selecting a video preview of the disclosed embodiment [0037] embodiment of the present application, Figure 1, comprising the steps of:

[0038] 步骤S100,接收视频并对视频进行预定数量的截图; [0038] step S100, the video receiving video and a predetermined number of shots;

[0039] 截图可以采用随机截取方式,也可以按照固定帧位置进行截取,本申请对此并不限定。 [0039] The screenshot may be taken random manner, may be taken in accordance with a fixed frame position, this is not limited to this application.

[0040] 为了便于最终能够找到足够好的视频预览图,需要保证一定的样本数量,同时又不能让样本数量过大,导致计算成功过高,实际操作中,预定数量选定为16张截图,当然本申请对此并不限定。 [0040] In order to facilitate good enough to find the final video preview, the need to ensure a certain number of samples, while not allow excessive number of samples, resulting in high calculation successful, the actual operation, a predetermined number is selected to 16 shots, Of course the present application is not limited to this.

[0041] 步骤S102,分别对每幅截图进行人脸个数的检测和灰度计算,根据所述每副截图的人脸个数和灰度计算结果,为每副截图赋予分值。 [0041] step S102, each piece of theme respectively detect the number of gradation and face calculation, based on the calculation results of each sub-theme of the face and the number of gray-scale, scores given for each sub-shots.

[0042] 所述灰度计算,包括:检测每幅截图的清晰程度,计算每幅截图中的色彩丰富程度和色彩波动程度;所述灰度计算结果,包括:每幅截图的清晰程度、色彩丰富程度和色彩波动程度。 [0042] The calculated gradation, comprising: detecting each piece of clarity screenshot calculated color richness and color fluctuation degree of each piece of theme; the gradation results, comprising: a screenshot of each piece of clarity, color fluctuations in the degree of richness and color.

[0043] 对于每幅截图,会根据画面进行计算分析,按照不同的分析策略得到人脸个数的分值、清晰程度的分值、色彩丰富程度的分值以及色彩波动程度的分值;然后根据这些分值做运算,最终得到每幅截图的分值。 [0043] For each web shots, the screen may be calculated according to the analysis, the number of face value obtained according to different analytical strategies, score clarity, richness of color and degree of fluctuation of the value of the color value; and Based on these scores do arithmetic, finally get a screenshot of the score of each piece.

[0044] 一般来说,所述每幅截图的分值score,与人脸个数的分值sf、清晰程度的分值sm 和色彩丰富程度的分值Sj正相关,与色彩波动程度SC负相关,通过如下公式1. 1得到: [0044] In general, the value of each piece of theme Score, and the number of face value sf, sm value and richness of color clarity score Sj a positive correlation with the degree of fluctuation of the color negative SC Related, 1.1 obtained by the following equation:

[0045] score = sf+2 X s j-1+sm-sc 公式I. I [0045] score = sf + 2 X s j-1 + sm-sc Formula I. I

[0046] 对于计算人脸个数的分值的实现流程参见实施例二。 [0046] For the implementation process of calculating the number of scores face See Example II. 对于计算清晰程度的分值的实现流程参见实施例三。 For clarity of the implementation process of computing scores See Example III. 对于计算色彩丰富程度的分值的实现流程参见实施例四。 For the calculation of the implementation flow richness of color scores See Example IV. 对于计算色彩波动程度的分值的实现流程参见实施例五。 Process for achieving the degree of fluctuation calculated color score See Example V.

[0047] 对于任一截图,识别所述任一截图的类型,对于识别出的截图类型,针对人脸个数的分值、清晰程度的分值、色彩丰富程度的分值、色彩波动程度的分值,选取相应的权重配置方案,并根据人脸个数的分值、清晰程度的分值、色彩丰富程度的分值、色彩波动程度的分值,结合权重配置方案中为每种分值配置的权重,为所述任一截图赋予分值,提高选取预览图的准确性、客观性。 [0047] For any theme, any type of identification of a theme, the theme for the identified type, for the number of face value, the score clarity, richness of color score, color fluctuation degree score, select the appropriate weighting configuration scheme, according to the number of face value, the clarity of the score, score richness of color, degree of fluctuation of the color value, in conjunction with the weight value for each configuration scheme weight weight configuration for imparting the score of any one theme, selected preview improve accuracy, objectivity.

[0048] 例如,对于非动漫视频的截图来说,有的截图可能是场景环境类的,有的截图可能是人物形象类,对于与不同的类别来说,截图的侧重点不同,但是都可以有效的预览图使用;但是对于人物形象类截图来说,色彩丰富程度可能不会很高,但是人脸个数的分值可能会较高,对于场景环境类截图来说,色彩丰富程度可能会很高,但是人脸个数的分值可能会较低,那如果不分类别,对于所有分数使用同样的权重,这样并不能真实反应出截图的质量。 [0048] For example, for non-animation video shots, the shots might be some kind of scene setting, characters and some screenshots might be like for the different categories, different shots of focus, but can preview effective use; but for characters like shots, the richness of color may not be very high, but the number of face value may be higher for environmental scene shots, the richness of color may high, but the number of face value may be lower, and that if no categories for all fractions using the same weights, this does not reflect the real quality shots. 因此可以针对于不同的截图类型,设置相应的权重方案,使得评分更加客观。 So we can target different types of shots, set the appropriate weighting scheme, making the score more objective. 例如对于人物形象类截图,图片内容主要就是人脸近景,所以人脸图像的好坏直接影响了截图的质量,因此人脸个数的分值、清晰程度的分值显然应该得到更大的权重,而色彩丰富程度的分值、色彩波动程度的分值的权重应该相应降低。 For example, characters like screenshots, picture content mainly face close-range, so the quality of face images directly affect the quality of the shots, so the number of face value, the clarity of the score is clearly deserve more weight while the right color richness of the score, the degree of fluctuation of the value of re-color should be reduced accordingly. 又例如对于场景环境类截图,图片内容主要就是环境远景,远景整体内容和颜色搭配更能凸显图片的质量,因此人脸个数的分值、清晰程度的分值显然并不是很重要,色彩丰富程度的分值、色彩波动程度的分值的权重应该相应提高。 Another example is the scene for Environmental capture, image content mainly environmental vision, the vision of the overall contents and colors to better highlight the quality of the picture, and therefore the number of face value, the clarity of the score is obviously not very important, rich colors degree score, score right degree of color heavy fluctuations should correspondingly increase. 上述示例仅为说明性解释,并不限定本申请的权重配置方案。 Explained above examples are merely illustrative and do not limit the present disclosure weight configuration.

[0049] 步骤S104,根据每幅截图的分值选取一张截图作为所述视频的预览图。 [0049] step S104, in accordance with each piece of theme selected value as a theme of the video preview.

[0050] 在本申请中,因为人脸个数的分值、清晰程度的分值、色彩丰富程度的分值的评分机制都是图像越符合要求,这些分值越高。 [0050] In the present application, because the number of face value, clarity score, scoring mechanism richness of color image scores are more in line with the requirements, the higher the score. 而色彩波动程度的分值是图像越符合要求,这个分值越低。 The degree of fluctuation of the color image is more satisfactory score, the lower the score. 因此,与人脸个数的分值、清晰程度的分值、色彩丰富程度的分值正相关且与色彩波动程度的分值负相关的每幅截图的分值越高,表明截图越符合要求,因此,将分值最高的截图作为所述视频的预览图。 Thus, the number of face value, clarity score, richness of color and the higher the score positively correlated with each piece screenshot negative correlation with the degree of fluctuation of color score score indicates more satisfactory shots Therefore, the highest score as the theme preview video.

[0051] 当然,如果人脸个数的分值、清晰程度的分值、色彩丰富程度的分值的评分机制都是图像越符合要求,这些分值越低。 [0051] Of course, if the number of face value, clarity score, richness of color scores of the images are scoring mechanism to meet the requirements, the lower the score. 色彩波动程度的分值是图像越符合要求,这个分值越高。 Fluctuations in the degree of color images is more satisfactory score, the higher the score. 那就将分值最低的截图作为所述视频的预览图。 That will be the lowest score as a screenshot preview of the video.

[0052] 实施例二 [0052] Second Embodiment

[0053] 本申请实施例所揭示的是图1的步骤S102中对于计算人脸个数的分值的实现流程,如图2所示,其包括以下步骤: The disclosed embodiments [0053] The present application is a step S102 in FIG. 1 for achieving the number of scores calculated flow face, shown in Figure 2, which comprises the steps of:

[0054] 步骤S1020,对于每幅截图,通过预设的人脸特征算子进行特征检测,识别出图像中的人脸,其中,所述人脸特征算子用于检测人脸中各关键特征点间的位置比例关系; [0054] step S1020, the web for each theme, through a preset facial feature detection operator characteristics, recognized faces in the image, wherein the facial features for each of the key features of the operator detected human face proportional relationship between the position of the point;

[0055] 通过预设的人脸特征算子,对截图进行特征检测,初步识别出截图中符合人脸特征的部分和背景部分;通过预设的人脸特征算子,对初步识别出的截图中符合人脸特征的部分再进行特征检测,识别出其中符合人脸特征的部分,不断迭代,直到精确识别出符合人脸特征的部分。 [0055] operator through a preset facial features, theme feature for detecting, identifying the initial portion and the background portion in line with the face feature screenshot; preset by operator facial features, identified preliminary screenshot in compliance with face feature detecting portion further feature, wherein the identified portion meet face feature continuously iterates until accurate identification of the face feature portions meet.

[0056] 步骤S1022,根据识别出的人脸为截图赋予人脸个数的分值,其中,所述人脸的个数越少且所述人脸在所述截图中所处位置越靠近中部,所述截图的人脸个数的分值越高。 [0056] Step S1022, according to the recognized face value given number of shots to the face, wherein the smaller the number of the face and the face closer to the central location in the screenshot , the higher the score the number of shots of the face.

[0057] 对于非动漫类视频的截图,所述截图中最好出现人脸,当然,人脸的人脸不是越多越好,因为过多的人脸会造成视觉上的杂乱不清,人脸越少且位于屏幕中间说明截图的重点突出,且构图简单清晰,这样的截图适合作为预览图。 [0057] For non-Screenshot anime video of the best shots appear in the face, of course, face face is not possible, because too many people will cause the face is not clear visual clutter, people the fewer the face and in the middle of the onscreen instructions to capture the focused, clear and simple composition, such as screenshots for preview.

[0058] 人脸特征检测使用的是Viola, PA和Jones, M. J在2004年提出的基于Haar-Iike特征,Adaboost分类器和Cascade级联分类器的人脸检测算法。 [0058] The facial feature detection using Haar-Iike based features, Adaboost classifier cascade classifier and Cascade face detection algorithm Viola, PA, and Jones, M. J proposed in 2004. 当完成人脸检测后,根据以下规则对图像进行量化得到该模块的评分。 After completion of the face detection, the image is quantized according to the following rules obtained scores of the module. 设人脸的上下左右范围为ft、fb、 fl、fr ;最终得分为sf。 Face disposed up and down in the range of ft, fb, fl, fr; final score sf.

[0059] 若图像中没有人脸,则sf = 0 ; [0059] If no face image, the sf = 0;

[0060] 若图像中有1个人脸,并且人脸的区域符合公式2. 1,则sf得分如公式2. 2所示。 [0060] If there is a facial image and the face region in line with Equation 2.1, the score sf as shown in Equation 2.2.

Figure CN104598921AD00101

[0063] 公式2. 2 [0063] Equation 2.2

[0064] 若图像中有2个人脸,则判断每个人脸区域是否符合公式2. 1,若符合,则将当前的得分记为sfi (i = 〇, 1),如公式2. 3所示,否则sfi = 0。 [0064] If there are two facial images, it is determined whether the face region of each formula 2.1, if met, will be referred to as the current score sfi (i = square, 1), as shown in Equation 2.3 otherwise sfi = 0. 并且最终得分sf如公式2. 4 所示。 Sf and the final score shown in Equation 2.4.

Figure CN104598921AD00102

[0067] 若图像中有2个以上人脸,则判断每个人脸区域是否符合公式2. 1,若符合,则将当前的得分记为sfi (i = 0, 1,…η. η为正整数),如公式2. 3所示,否则sfi = 0。 [0067] If there are two or more face images, it is determined whether the face region of each formula 2.1, if met, will be referred to as the current score sfi (i = 0, 1, ... η. Η is a positive ), as shown in equation 2.3 integer otherwise sfi = 0. 并且最终得分sf如公式2. 5所示。 Sf and the final score shown in Equation 2.5.

[0068] sf = 0. 4+max (sf j) 公式2· 5 [0068] sf = 0. 4 + max (sf j) Equation 2 · 5

[0069] 需要说明,上述公式只是为了较佳地描述本实施例,其并不对本申请的保护范围作出限定,其他方式也可以实现本申请。 [0069] Incidentally, the above formula only to describe the preferred embodiment of the present embodiment, it is not limited to the scope of the present disclosure, may be implemented in other ways of the present application.

[0070] 实施例三 [0070] Example three

[0071] 本申请实施例所揭示的是图1的步骤S102中对于计算清晰程度的分值的实现流程,如图3所示,其包括以下步骤: The disclosed embodiments [0071] The present application is a step S102 in FIG. 1 for clarity of the computing process implemented scores, shown in Figure 3, comprising the steps of:

[0072] 步骤S1120,对于每幅截图,通过预设的边缘检测算子,对截图进行边缘检测运算, 对检测出的边缘的宽度进行识别; [0072] Step S1120, for each piece of theme, by detecting a predetermined edge operator, edge detection operation of the shots, the width of the detected edge is identified;

[0073] 对于每幅截图,进行边缘检测运算后,将所述截图转换成灰度梯度图像,识别所述人脸的灰度梯度图像中梯度灰度值高于一阈值的连通部分,所述连通部分为边缘。 [0073] For each piece of theme, after edge detection operator, converting the screenshot image to grayscale gradient, gray-level gradient image of the face recognition gray value gradient greater than a threshold value communicating portion, said an edge portion of the communication.

[0074] 边缘检测算子为一阶差分算子,采用sobel (索贝尔)算子实现。 [0074] The edge detector as a first order difference operator, using Sobel (Sobel) operator implemented. sobel算子包括横向sobel算子及纵向sobel算子,都是3x3的矩阵。 sobel operator comprises longitudinal and lateral sobel operator sobel operator, are 3x3 matrices. 将横向sobel算子及纵向sobel算子分别与截图作平面卷积,即可分别得出横向及纵向的亮度差分近似值,从而得到灰度梯度图像。 The lateral and vertical sobel operators, respectively sobel operator for theme convolution plane, respectively to obtain horizontal and vertical luminance difference approximations to obtain a gray-level gradient image. 当然,也可以使用其他算子进行边缘检测,例如canny算子,本申请并不限制于此。 Of course, other operators may be used for edge detection, e.g. canny operator, the present application is not limited thereto.

[0075] 步骤S1122,根据识别出的边缘的宽度为截图赋予清晰程度的分值,其中,所述截图中的边缘的宽度越小,所述截图的清晰程度的分值越高。 [0075] Step S1122, according to the width of the edge of the identified theme is to impart clarity score, wherein the smaller the width of the edge of the screenshot, the higher the clarity of the theme score.

[0076] 边缘的宽度如果很宽,说明当前截图有些模糊,这样的图像显然质量较差。 [0076] If a wide width of the edge, some vague description of the current theme, such obviously poor quality images. 可以设置多个宽度的阈值,每个阈值对应一个分值,分值取自〇〜1之间的浮点数。 A plurality of thresholds may be set width, each threshold corresponding to a score, score from floating between 〇~1. 阈值越小,分值越高。 Threshold value, the higher the score. 根据识别出的宽度去和阈值比对,根据所处的阈值区间查找相应分值,这个分值就是所述截图的清晰程度的分值。 And a threshold comparison to find the appropriate threshold value according to which the section according to the identified width, this value is the value of the clarity of the theme.

[0077] 当然,还有一种方式,是将边缘的宽度除以一个常量,从而将边缘的宽度转换为0〜1之间的浮点数作为清晰程度的分值,这个常量可以取截图的宽度与截图的长度中较大的值。 [0077] Of course, there is a way, the width of the edge is divided by a constant, so that the width of the edge width converted floating point number between 0~1 score as clarity, this constant may take the screenshot larger value of the length of the screenshot.

[0078] 实施例四 [0078] Fourth Embodiment

[0079] 本申请实施例所揭示的是图1的步骤S102中对于计算色彩丰富程度的分值的实现流程,如图4所示,其包括以下步骤: The disclosed embodiments [0079] The present application is a step S102 in FIG. 1 for the calculation of the richness of color scores implementation process, shown in Figure 4, which comprises the steps of:

[0080] 步骤S1220,对于每幅截图,将其由彩色图像转换为灰度图像,获得所述灰度图像中每个像素点的灰度值; [0080] Step S1220, for each piece of theme, which the color image is converted to grayscale, the grayscale image is obtained for each pixel of the gray value;

[0081] 灰度图像的转化可以依照如下方式:根据每个像素点的R、G、B分量计算每个像素点的灰度值,从而将彩色图像转换为灰度图像,其中,所述彩色图像中每个像素点存储有相应像素点的R、G、B分量。 [0081] The gray-scale image may be transformed according to the following manner: The calculation of each pixel R, G, B component of the gray value of each pixel, so that the color image into a grayscale image, wherein said color each image pixel stored in the corresponding pixel of the R, G, B components.

[0082] 每个像素点的灰度值gray可以依照每个像素点的R、G、B分量,通过如下公式4. 1 得到: [0082] The gray tone value of each pixel can be obtained by the following formula 4.1 in accordance with R, G, B component of each pixel:

[0083] Gray = R*0. 299+G*0. 587+Β*0· 114 公式4· I [0083] Gray = R * 0. 299 + G * 0. 587 + Β * 0 · 114 4 · I Formula

[0084] 需要说明,上述公式只是为了较佳地描述本实施例,其并不对本申请的保护范围作出限定,其他方式也可以实现本申请。 [0084] Incidentally, the above formula only to describe the preferred embodiment of the present embodiment, it is not limited to the scope of the present disclosure, may be implemented in other ways of the present application.

[0085] 步骤S1222,统计得出其灰度直方图数据,根据其灰度直方图数据查找所述灰度图像中具有最低灰度值和最高灰度值的像素点。 [0085] Step S1222, which statistics obtained histogram data to find the gray scale image data according to the histogram of the gray pixels having the maximum gradation value and the lowest gray value.

[0086] 具体来说,根据灰度值的取值范围统计出灰度值数列,根据所述灰度图像中所有像素点及其灰度值统计所述灰度值数列中每个灰度值的像素点个数,根据所述灰度值数列及相应的像素点个数查找所述灰度图像中具有最低灰度值和最高灰度值的像素点。 [0086] Specifically, according to the tone value range of the number of columns gray value statistics, the statistics for each grayscale value according to the gray value of the number of columns and the gray value of all pixels of the gray scale image point pixel number for one of said gray pixel image having the lowest value and the highest gradation according to the gradation value of the gradation value corresponding to the number of columns and number of pixels.

[0087] 查找所述灰度图像中具有最低灰度值和最高灰度值的像素点时,从所述灰度值数列的第一个灰度值开始,依次对所述灰度值对应的像素点个数进行查询,记录像素点个数大于〇的第一个灰度值作为最低灰度值;从所述灰度值数列的最后一个灰度值开始,依次对所述灰度值对应的像素点个数进行查询,记录像素点个数大于0的第一个灰度值作为最高灰度值。 When the [0087] lookup the gray image pixels having the highest and the lowest gray value gray value, starting from a first gray scale value of the gradation values ​​of the column, in sequence corresponding to the gradation value query number of pixels, a record of the number of pixels greater than the gray scale value of the square as a minimum gradation value; starting from a gradation value of the gradation number of the last column of values, the tone value corresponding to sequentially the number of pixels query, recording a number of pixels larger than the first gradation value 0 as the maximum gradation value.

[0088] 所述灰度值取值范围为0〜255,0代表最暗的灰度值,255代表最亮的灰度值,根据所述灰度值的取值范围形成一个按灰度值由小到大的顺序排列的灰度值数列〇〜255。 [0088] The gray value range of the darkest gray scale value representative of 0~255,0 and 255 the brightest gradation value, formed by a gray value according to the range of the gradation value the number of gradation values ​​arranged in ascending order of column 〇~255.

[0089] 以一个实例进行说明。 [0089] In an example will be described. 所述灰度图像中,检测是否具有灰度值为0的像素点,如果有,将灰度值为〇的像素点的个数记录hist [0],如果没有,灰度值为0的像素点的个数为0,将0记录在hist [0]中,用类似的方式统计所述灰度值数列中每个灰度值的像素点个数,对于所述灰度图像中不存在的灰度值,相应的像素点个数为〇,这样得到hist[0]〜 hist[255]〇 The gray scale image, detect whether the pixel gray scale value of 0, if the number of pixels of the gray value of square recording a hist [0], and if not, the pixel gray scale values ​​0 the number of points is 0, 0 is recorded in a hist [0], the statistical number of pixels for each gradation value of the gradation value of the number of columns in a similar manner to the absence of a grayscale image gradation values, corresponding to the number of square pixels, thus obtained hist [0] ~ hist [255] billion

[0090] 从数组第一个元素开始,遍历数组,若当前值hist [i] (0 < i < 255)大于0,则停止遍历,并利用当前值i就是最低灰度值,对最低灰度值进行标准化得到sb = i/255。 [0090] starting from the first element of the array, through the array, if the current value hist [i] (0 <i <255) is greater than 0, then stop the walk, and using the current value of i is the minimum gradation value, the minimum gradation values ​​were normalized to give sb = i / 255. 同理,从数组最后一个元素开始,遍历数组,若当前值hist [i] (0 < i < 255)大于0,则停止遍历,并利用当前值i就是最高灰度值,对最高灰度值进行标准化得到sw = i/255。 Similarly, from the last element in the array, through the array, if the current value hist [i] (0 <i <255) is greater than 0, then stop the walk, and i is the highest value from the current gradation value of the maximum tone value normalized to give sw = i / 255.

[0091] 步骤S1224,根据所述最低灰度值和最高灰度值为所述截图赋予色彩丰富程度的分值,其中,所述最低灰度值和最高灰度值的差值越大,所述截图的色彩丰富程度的分值越尚。 [0091] Step S1224, based on the lowest value and the highest gray tone value of the richness of color imparting theme score, wherein the larger the difference between the lowest value and the highest gray tone value of the richness of color above screenshot score more still.

[0092] 接上述实例。 [0092] Examples of the above contact. 色彩丰富程度的分值sj = sw-sb。 Richness of color score sj = sw-sb. 这样,最高灰度值和最低灰度值的差值越大,说明从最亮到最暗的灰度值越多,相应的色彩越丰富,截图的画面质量越好, 这样的截图显然更适合作为预览图。 Thus, the greater the difference between the highest and lowest values ​​of the gray gradation values, the more instructions from the lightest to the darkest gradation value, the more rich the respective colors, the better picture quality shots, this is clearly more suitable screenshot as a preview.

[0093] 实施例五 [0093] Embodiment V

[0094] 本申请实施例所揭示的是图1的步骤S102中对于计算色彩波动程度的分值的实现流程,如图5所示,其包括以下步骤: The disclosed embodiments [0094] The present application is a step S102 in FIG. 1 for the calculation of the degree of fluctuation of the color value of the implementation process, shown in Figure 5, which comprises the steps of:

[0095] 步骤S1320,对于每幅截图,将其由彩色图像转换为灰度图像,获得所述灰度图像中每个像素点的灰度值。 [0095] Step S1320, for each piece of theme, which the color image is converted to grayscale, the grayscale image obtained gray value of each pixel.

[0096] 灰度图像的转化可以依照如下方式:根据每个像素点的R、G、B分量计算每个像素点的灰度值,从而将彩色图像转换为灰度图像,其中,所述彩色图像中每个像素点存储有相应像素点的R、G、B分量。 [0096] conversion of a gray scale image may be according to the following manner: The calculation of each pixel R, G, B component of the gray value of each pixel, so that the color image into a grayscale image, wherein said color each image pixel stored in the corresponding pixel of the R, G, B components. 每个像素点的灰度值gray可以依照每个像素点的R、G、B分量, 通过上述公式4. 1得到。 Gray tone value of each pixel can be obtained in accordance with the above formula 4.1 R, G, B components of each pixel. 需要说明,上述公式只是为了较佳地描述本实施例,其并不对本申请的保护范围作出限定,其他方式也可以实现本申请。 Incidentally, the above formula only to describe the preferred embodiment of the present embodiment, it is not limited to the scope of the present disclosure, may be implemented in other ways of the present application.

[0097] 步骤S1322,统计得出其灰度直方图数据,根据其灰度直方图数据查找所述灰度图像中具有最低灰度值和最高灰度值的像素点。 [0097] Step S1322, which statistics obtained histogram data to find the gray scale image data according to the histogram of the gray pixels having the maximum gradation value and the lowest gray value.

[0098] 具体来说,根据灰度值的取值范围统计出灰度值数列,根据所述灰度图像中所有像素点及其灰度值统计所述灰度值数列中每个灰度值的像素点个数(这个就是灰度直方图数据),根据所述灰度值数列及相应的像素点个数查找所述灰度图像中具有最低灰度值和最高灰度值的像素点。 [0098] Specifically, according to the tone value range of the number of columns gray value statistics, the statistics for each grayscale value according to the gray value of the number of columns and the gray value of all pixels of the gray scale image the number of pixels (this is the histogram data) points, to find the gray image pixels having the highest value and the lowest gray gradation value of the gradation value according to the number of columns and the corresponding number of pixels.

[0099] 查找所述灰度图像中具有最低灰度值和最高灰度值的像素点时,从所述灰度值数列的第一个灰度值开始,依次对所述灰度值对应的像素点个数进行查询,记录像素点个数大于〇的第一个灰度值作为最低灰度值;从所述灰度值数列的最后一个灰度值开始,依次对所述灰度值对应的像素点个数进行查询,记录像素点个数大于0的第一个灰度值作为最高灰度值。 When the [0099] lookup the gray image pixels having the highest and the lowest gray value gray value, starting from a first gray scale value of the gradation values ​​of the column, in sequence corresponding to the gradation value query number of pixels, a record of the number of pixels greater than the gray scale value of the square as a minimum gradation value; starting from a gradation value of the gradation number of the last column of values, the tone value corresponding to sequentially the number of pixels query, recording a number of pixels larger than the first gradation value 0 as the maximum gradation value.

[0100] 所述灰度值取值范围为〇〜255,0代表最暗的灰度值,255代表最亮的灰度值,根据所述灰度值的取值范围形成一个按灰度值由小到大的顺序排列的灰度值数列〇〜255。 [0100] The gradation value representative of the range of 〇~255,0 darkest gray value 255 represents the brightest gradation value, formed by a gray value according to the range of the gradation value the number of gradation values ​​arranged in ascending order of column 〇~255.

[0101] 以一个实例进行说明。 [0101] In an example will be described. 所述灰度图像中,检测是否具有灰度值为0的像素点,如果有,将灰度值为〇的像素点的个数记录hist [0],如果没有,灰度值为0的像素点的个数为0,将0记录在hist [0]中,用类似的方式统计所述灰度值数列中每个灰度值的像素点个数,对于所述灰度图像中不存在的灰度值,相应的像素点个数为〇,这样得到hist[0]〜 hist[255]〇 The gray scale image, detect whether the pixel gray scale value of 0, if the number of pixels of the gray value of square recording a hist [0], and if not, the pixel gray scale values ​​0 the number of points is 0, 0 is recorded in a hist [0], the statistical number of pixels for each gradation value of the gradation value of the number of columns in a similar manner to the absence of a grayscale image gradation values, corresponding to the number of square pixels, thus obtained hist [0] ~ hist [255] billion

[0102] 从数组第一个元素开始,遍历数组,若当前值hist [i] (0 < i < 255)大于0,则停止遍历,并利用当前值i就是最低灰度值。 [0102] starting from the first element of the array, through the array, if the current value hist [i] (0 <i <255) is greater than 0, then stop the walk, and i is the minimum value from the current gradation value. 同理,从数组最后一个元素开始,遍历数组,若当前值hist [i] (0 < i < 255)大于0,则停止遍历,并利用当前值i就是最高灰度值。 Similarly, from the last element in the array, through the array, if the current value hist [i] (0 <i <255) is greater than 0, then stop the walk, and i is the highest value from the current gradation value.

[0103] 步骤S1324,根据所述最低灰度值和最高灰度值由所述灰度直方图数据中截取位于两者之间的每个灰度值的像素点个数。 [0103] Step S1324, based on the lowest value and the highest grayscale gradation values ​​taken for each number of pixels located between the two gray value histogram from the data.

[0104] 具体来说,根据所述最低灰度值和最高灰度值由所述灰度值数列中截取位于两者之间的部分灰度值数列以及所述部分灰度值数列中相应每个灰度值的像素点个数。 [0104] In particular, according to the gradation value and the minimum value of the maximum gradation number of gradation values ​​taken part located therebetween and the number of columns of the portion of each of the respective gradation values ​​in the column by the number of columns of gradation values the number of gray levels of pixels.

[0105] 接上述实例。 [0105] connected to the above examples. 根据最低灰度值和最高灰度值,在hist[0]〜hist[255]中统计两者之间的数据,这个数据就是两者之间的部分灰度值数列中相应每个灰度值的像素点个数, 显然,在最低灰度值和最高灰度值之间的灰度值不一定都能在灰度图像中找到,这些找不到的灰度值的像素点个数是〇。 The minimum and maximum values ​​of the gradation tone value data therebetween hist [0] ~hist [255] in the statistics, the corresponding data is grayscale value for each gradation value between the two part series of numbers the number of pixels point, obviously, is not necessarily can be found in the gray scale image in gray scale value between the minimum and maximum gray value gray value, gray values ​​of the number of pixels can not find these are billion .

[0106] 步骤S1326,根据由所述灰度直方图数据中截取出的像素点总个数以及由所述灰度直方图数据中截取出的灰度值的总个数,计算像素点分布的平均值,根据由所述灰度直方图数据中截取出的每个灰度值的像素点个数与所述平均值计算所述灰度图像的相对标准偏差。 [0106] Step S1326, according to the interception by said histogram data of pixels in the total number and the total number intercepted by the histogram data in the gray values, calculating a pixel distribution point average, according to the number of pixels for each gradation value taken by said histogram data relative standard deviation of the gray scale image with the average calculation.

[0107] 具体来说,根据所述部分灰度值数列中相应的像素点的总个数以及所述部分灰度值数列中灰度值的总个数,计算在所述部分灰度值数列上的像素点分布的平均值,根据所述部分灰度值数列中每个灰度值的像素点个数与所述平均值计算所述灰度图像的相对标准偏差。 [0107] Specifically, the total number of the total number of pixels corresponding to the number of gray value portion and the portion of the column number of columns gray value gray values, calculating the number of gradation values ​​in the portion of column the average distribution of the pixel point on, according to the number of pixels for each gradation value of the gradation value of the number of the column part relative standard deviation of the gray scale image with the average calculation.

[0108] 接上述实例。 [0108] connected to the above examples. 对上面找到的部分灰度值数列中相应每个灰度值的像素点个数求和,从而得到像素点的总个数,用像素点总个数除以所述部分灰度值数列中灰度值的总个数,就得到了所述部分灰度值数列上的像素点分布的平均值ave。 The number of columns of partial gradation values ​​found above a corresponding number of pixels summed for each gray value, whereby the total number of pixels, divided by the total number of pixels with gray gradation values ​​in the portion of column the total number of values ​​to obtain the average value ave of the pixel portion on the gray value series distribution.

[0109] 灰度图像的标准偏差Sd用来衡量所述部分灰度值数列上每个灰度值的像素点个数偏离平均值ave的程度,标准偏差sd越小,所述部分灰度值数列上每个灰度值的像素点个数偏离平均值ave就越少,反之亦然。 Standard deviation [0109] Sd gray image gradation value is a measure of the portion of the average ave degree of number of pixels for each gradation value deviates from the number of columns, the smaller the standard deviation sd, the portion of the gray value number of pixels for each gradation value of the number of columns on the average deviate less ave, and vice versa.

[0110] 而相对标准偏差的大小可通过标准偏差与平均值的倍率关系来衡量。 [0110] The relative standard deviation of the size can be measured by the relationship between the magnification of the standard deviation from the average.

[0111] 因此,可以利用公式5. 1计算出图像的相对标准偏差分SC : [0111] Thus, you can use equation 5.1 to calculate the relative standard deviation of the image points SC:

[0112] sc = sd/ave 公式5. 1 [0112] sc = sd / ave Formula 5.1

[0113] 需要说明,上述公式只是为了较佳地描述本实施例,其并不对本申请的保护范围作出限定,其他方式也可以实现本申请。 [0113] Incidentally, the above formula only to describe the preferred embodiment of the present embodiment, it is not limited to the scope of the present disclosure, may be implemented in other ways of the present application.

[0114] 步骤S1328,根据所述灰度图像的相对标准偏差为所述截图赋予色彩波动程度的分值,其中,所述截图的灰度图像的相对标准偏差的越大,所述截图的色彩波动程度的分值越尚。 [0114] Step S1328, in accordance with the relative standard deviation of the gray image of the degree of fluctuation imparting theme color value, wherein the relative standard deviation of the gray scale image screenshot larger, the color theme fluctuations in the level of score yet.

[0115] 色彩分布分值就是相对标准偏差的大小。 [0115] the color distribution score is the relative standard deviation of the size. 所述截图的灰度图像的相对标准偏差的越大,说明灰度图像的颜色区间内(即对应所述部分灰度值数列)每个灰度值的像素点个数偏离平均值ave就越小,说明图像的色彩波动程度不剧烈,这种图像色彩柔和易于观看, 非常适于作为预览图,因此色彩波动程度的分值越高。 The greater the relative standard deviation of the gray scale image theme, indicating the grayscale image color range (i.e., the portion corresponding to the number of columns of gradation values) of the pixel gray scale value for each point number from the average ave more small, volatility described color image is not severe, such an image easy to see soft colors, very suitable as preview, so the higher the degree of fluctuation of the color value.

[0116] 卖施例六 [0116] Example six Sell

[0117] 本申请实施例还揭示的一种视频预览图的选取装置,如c图6所示,包括:截图模块600、赋值模块602和选取模块604。 [0117] The present application selection apparatus for a video preview of the further embodiment of the disclosed embodiment, as shown in FIG. 6 c, comprising: a screenshot module 600, evaluation module 602 and selection module 604.

[0118] 截图模块600,用于接收视频并对视频进行预定数量的随机截图; [0118] Theme module 600 for receiving a video and a predetermined number of random video shots;

[0119] 赋值模块602,分别用于对每幅截图进行人脸个数的检测和灰度计算,根据所述每副截图的人脸个数和灰度计算结果,为每副截图赋予分值;所述赋值模块所进行的灰度计算,包括:检测每幅截图的清晰程度,计算每幅截图中的色彩丰富程度和色彩波动程度;获得的所述灰度计算结果,包括:每幅截图的清晰程度、色彩丰富程度和色彩波动程度; [0119] assignment module 602, respectively, for each piece of gradation and the number of shots is detected face is calculated according to the number of each sub-theme human face and gradation results, scores given for each sub-theme ; gradation assignment module for the calculation, comprising: detecting each piece of clarity screenshot calculated volatility richness and color of each piece of theme color; gray scale obtained by the calculation, comprising: each piece of theme the clarity, richness of color and color fluctuation degree;

[0120] 选取模块604,用于根据每幅截图的分值选取一张截图作为所述视频的预览图。 [0120] selection module 604 for selecting according to a score of each piece of theme as the theme of the video preview. 在本申请中,因为人脸个数的分值、清晰程度的分值、色彩丰富程度的分值的评分机制都是图像越符合要求,这些分值越高。 In the present application, because the number of face value, clarity score, scoring mechanism richness of color image scores are more in line with the requirements, the higher the score. 而色彩波动程度的分值是图像越符合要求,这个分值越低。 The degree of fluctuation of the color image is more satisfactory score, the lower the score. 因此,与人脸个数的分值、清晰程度的分值、色彩丰富程度的分值正相关且与色彩波动程度的分值负相关的每幅截图的分值越高,表明截图越符合要求,因此,将分值最高的截图作为所述视频的预览图。 Thus, the number of face value, clarity score, richness of color and the higher the score positively correlated with each piece screenshot negative correlation with the degree of fluctuation of color score score indicates more satisfactory shots Therefore, the highest score as the theme preview video. 当然,如果人脸个数的分值、清晰程度的分值、色彩丰富程度的分值的评分机制都是图像越符合要求,这些分值越低。 Of course, if the number of face value, clarity score, richness of color scores of the images are scoring mechanism to meet the requirements, the lower the score. 色彩波动程度的分值是图像越符合要求,这个分值越高。 Fluctuations in the degree of color images is more satisfactory score, the higher the score. 那就将分值最低的截图作为所述视频的预览图。 That will be the lowest score as a screenshot preview of the video.

[0121] 对每幅截图进行人脸个数的检测时,所述赋值模块602,对于每幅截图,通过预设的人脸特征算子进行特征检测,识别出图像中的人脸,其中,所述人脸特征算子用于检测人脸中各关键特征点间的位置比例关系;根据识别出的人脸为截图赋予人脸个数的分值,其中,所述人脸的个数越少且所述人脸在所述截图中所处位置越靠近中部,所述截图的人脸个数的分值越高。 [0121] When the number of each piece of theme detecting a human face, the assignment module 602, for each piece of theme, the predetermined feature is detected by the face feature operator recognizes that human faces in an image, wherein, the facial feature positions for the operator proportional relationship between the respective feature points of the face detection; score given number of shots according to the face recognized face, wherein the number of the face little higher and closer to the middle of the face, the number of shots of people's face value in the shot location.

[0122] 识别每幅截图的清晰程度时,对于每幅截图,所述赋值模块602通过预设的边缘检测算子,对截图进行边缘检测运算,对检测出的边缘的宽度进行识别;根据识别出的边缘的宽度为截图赋予清晰程度的分值,其中,所述截图中的边缘的宽度越小,所述截图的清晰程度的分值越高。 When [0122] the clarity of the identification of each piece of theme, for each piece of theme, the assignment module 602, edge detection operation of the theme through a preset edge detection operators, the width of the detected edge is identified; according to the identification the width of the edge of the theme to impart clarity to the score, wherein the smaller the width of the edge of the screenshot, the higher the clarity of the theme score. 对于每幅截图,所述赋值模块602对截图进行边缘检测运算后,将所述截图转换成灰度梯度图像,识别所述人脸的灰度梯度图像中梯度灰度值高于一阈值的连通部分,所述连通部分为人脸的边缘。 For each piece of theme, the theme of the assignment module 602 pairs of edge detection operator, converting the screenshot image to grayscale gradient, gray-level gradient image of the face recognition gray value gradient greater than a threshold value communicates portion, the edge portion of the human face communication.

[0123] 计算每幅截图中的色彩丰富程度时,对于每幅截图,所述赋值模块602将其由彩色图像转换为灰度图像,获得所述灰度图像中每个像素点的灰度值,统计得出其灰度直方图数据,根据其灰度直方图数据查找所述灰度图像中具有最低灰度值和最高灰度值的像素点;根据所述最低灰度值和最高灰度值为所述截图赋予色彩丰富程度的分值,其中,所述最低灰度值和最高灰度值的差值越大,所述截图的色彩丰富程度的分值越高。 Gradation values ​​[0123] When calculating the color richness of each web screenshot, for each piece of theme, the assigning module 602 to convert the color image to a grayscale image, each pixel of the obtained image gradation , which statistics obtained histogram data of pixels having the highest and lowest gradation value of the gradation value lookup grayscale image data according to its gray histogram; according to the lowest value and the highest grayscale gradation the theme color is imparted richness value, wherein the larger the difference between the minimum and maximum gradation value of the gradation values, the higher the richness of the colors screenshot score.

[0124] 计算每幅截图中的色彩波动程度时,所述赋值模块602根据所述最低灰度值和最高灰度值由所述灰度直方图数据中截取位于两者之间的每个灰度值的像素点个数;根据由所述灰度直方图数据中截取出的像素点总个数以及由所述灰度直方图数据中截取出的灰度值的总个数,计算像素点分布的平均值,根据由所述灰度直方图数据中截取出的每个灰度值的像素点个数与所述平均值计算所述灰度图像的相对标准偏差;根据所述灰度图像的相对标准偏差为所述截图赋予色彩波动程度的分值,其中,所述截图的灰度图像的相对标准偏差的越大,所述截图的色彩波动程度的分值越高。 [0124] When calculating the degree of fluctuation of each color web screenshot, the assignment module 602 taken each gray positioned therebetween by said histogram data based on the highest value and the lowest gray gradation values the number of pixel point values; according intercepted by said histogram data the total number of pixels and the total number intercepted by the histogram data in the gray values, calculating a pixel point mean of the distribution, according to the number of pixels for each gradation value taken by said histogram data relative standard deviation of the gray scale image with the calculated average value; according to the grayscale image the relative standard deviation of the degree of fluctuation imparting theme color value, wherein the relative standard deviation of the gray scale image theme is, the higher the degree of fluctuation of the color value of the screenshot. 根据所述灰度值数列及相应的像素点个数查找所述灰度图像中具有最低灰度值和最高灰度值的像素点时,所述赋值模块602 从所述灰度直方图数据的第一个灰度值开始,依次对所述灰度值对应的像素点个数进行查询,记录像素点个数大于0的第一个灰度值作为最低灰度值;从所述灰度直方图数据的最后一个灰度值开始,依次对所述灰度值对应的像素点个数进行查询,记录像素点个数大于〇的第一个灰度值作为最高灰度值。 According to the gradation value series and the corresponding number of pixels of the grayscale image to find a pixel having the highest point and the lowest gray value gray value, the assignment module 602 data from the histogram beginning a first gray value, the sequence number of pixels corresponding to the gradation value query, records a gray scale value greater than the number of pixels as the minimum gradation value 0; from the histogram gradation Finally, a gray value map data is started, sequentially queries to the number of pixels corresponding to gray scale values, recording the number of pixels greater than a billion first gradation value as the highest gradation value.

[0125] 所述赋值模块602为每幅截图的分值,与人脸个数的分值、清晰程度的分值、色彩丰富程度的分值正相关,与所述色彩波动程度的分值负相关。 [0125] The assignment module 602 for each theme web scores, with the number of face score, score clarity, richness of color score positively correlated with the degree of fluctuation of the negative color value related.

[0126] 本装置的技术方案和各模块的功能特征、连接方式,与前述实施例一至五中所描述的特征和技术方案相对应,不足之处请参见前述实施例一至五。 [0126] functional characteristics of the device and the aspect of each module, connection method, the technical solutions and features described in the first to fifth embodiments corresponding to the aforementioned inadequacies of the foregoing embodiments refer to embodiments one through five.

[0127] 上述说明示出并描述了本申请的实施例,但如前所述,应当理解本申请并非局限于本文所披露的形式,不应看作是对其他实施例的排除,而可用于各种其他组合、修改和环境,并能够在本文所述发明构想范围内,通过上述教导或相关领域的技术或知识进行改动。 [0127] The description illustrates and describes embodiments of the present application, as previously discussed, it should be understood that the present application is not limited to the form disclosed herein should not be considered as excluding other embodiments, but may be used various other combinations, modifications, and environments, and can be contemplated within the scope of the invention described herein, be altered by the above teachings or skill or knowledge of the relevant art. 而本领域人员所进行的改动和变化不脱离本申请的精神和范围,则都应在本申请所附权利要求的保护范围内。 The modifications and variations carried out by the skilled person without departing from the spirit and scope of the disclosure shall fall within the scope of the appended claims of the present application.

Claims (14)

  1. 1. 一种视频预览图的选取方法,其特征在于,包括: 接收视频并对视频进行预定数量的随机截图; 分别对每幅截图进行人脸个数的检测和灰度计算,根据所述每副截图的人脸个数和灰度计算结果,为每副截图赋予分值; 根据每幅截图的分值选取一张截图作为所述视频的预览图。 CLAIMS 1. A method of selecting a video preview, characterized in that, comprising: receiving a video and a predetermined number of video random theme; separately and each piece of theme detection face gradation number is calculated according to each of human face and the number of gray-scale screenshot of the sub calculation result given value for each sub-theme; select a theme of the video preview as scores according to each piece of theme.
  2. 2. 如权利要求1所述的选取方法,其特征在于, 所述灰度计算,包括:检测每幅截图的清晰程度,计算每幅截图中的色彩丰富程度和色彩波动程度; 所述灰度计算结果,包括;每幅截图的清晰程度、色彩丰富程度和色彩波动程度。 2. The selection method according to claim 1, wherein said calculating the gradation, comprising: detecting each piece of clarity screenshot calculated color richness and color fluctuation degree of each piece of theme; the gradation the results, including; the clarity of each piece of shots, color and richness of color volatility.
  3. 3. 如权利要求2所述的选取方法,其特征在于,为每幅截图赋予分值,进一步包括: 所述每幅截图的分值,与人脸个数的分值、清晰程度的分值、色彩丰富程度的分值正相关,与所述色彩波动程度的分值负相关; 其中,所述人脸的个数越少且所述人脸在所述截图中所处位置越靠近中部,所述截图的人脸个数的分值越高;所述截图中的边缘的宽度越小,所述截图的清晰程度的分值越高; 所述截图的最低灰度值和最高灰度值的差值越大,所述截图的色彩丰富程度的分值越高; 所述截图的灰度图像的相对标准偏差的越大,所述截图的色彩波动程度的分值越高。 3. The selection method according to claim 2, characterized in that the score is given to each piece of theme, further comprising: each of said web screenshot scores, with the number of face score, score clarity , richness of color score positively correlated negatively correlated with the degree of fluctuation of the color value; wherein, the fewer the number of the face and the face closer to the central location in the screenshot, the higher the value of the number of shots of the face; the smaller the width of the edge of the screenshot, the higher the clarity of the screenshot score; screenshot of the lowest gray value and the highest gray value the larger the difference, the higher the richness of the colors screenshot score; screenshot of the relative standard deviation of the gray scale image, the higher the degree of fluctuation of the color value of the screenshot.
  4. 4. 如权利要求3所述的选取方法,其特征在于, 对于任一截图,识别所述任一截图的类型,对于识别出的截图类型,针对人脸个数的分值、清晰程度的分值、色彩丰富程度的分值、色彩波动程度的分值,选取相应的权重配置方案,并根据人脸个数的分值、清晰程度的分值、色彩丰富程度的分值、色彩波动程度的分值, 结合权重配置方案中为每种分值配置的权重,为所述任一截图赋予分值。 4. Select method according to claim 3, characterized in that, for any theme, a screenshot of the identification of any type, for the identified type of theme, for the number of face value, the partial clarity value, richness of color score, the degree of fluctuation of the color value, select the appropriate weighting configuration scheme, according to the number of face value, the score clarity, richness of color score, color fluctuation degree scores combined weight configuration rights program configured for each weight value, given a score of any of the theme.
  5. 5. 如权利要求1所述的选取方法,其特征在于,对每幅截图进行人脸个数的检测,包括: 对于每幅截图,通过预设的人脸特征算子进行特征检测,识别出图像中的人脸,其中, 所述人脸特征算子用于检测人脸中各关键特征点间的位置比例关系; 根据识别出的人脸为所述截图赋予人脸个数的分值,其中,所述人脸的个数越少且所述人脸在所述截图中所处位置越靠近中部,所述截图的人脸个数的分值越高。 5. The selection of the method of claim 1, wherein, for each piece of theme detecting the number of human face, comprising: for each piece of theme, the predetermined feature is detected by operator facial features, identified face image, wherein the facial feature positions for the operator proportional relationship between the respective feature points of the face detection; according to the recognized face value of the number of shots given face, wherein, the fewer the number of the face and the face closer to the central location in the screenshot, the higher the value of the number of shots of the face.
  6. 6. 如权利要求2所述的选取方法,其特征在于,检测每幅截图的清晰程度,包括: 对于每幅截图,通过预设的边缘检测算子,对截图进行边缘检测运算,对检测出的边缘的宽度进行识别; 根据识别出的边缘的宽度为截图赋予清晰程度的分值,其中,所述截图中边缘的宽度越小,所述截图的清晰程度的分值越高。 6. A selection method according to claim 2, characterized in that the detection of each piece of theme clarity, comprising: for each piece of theme, the screenshot is edge detection operation by a predetermined edge detection operator, to detect the width of the edge identification; score impart clarity to the width edges of the theme identified, wherein the smaller the width of the edge of the shot, the higher the clarity of the theme score.
  7. 7. 如权利要求2所述的选取方法,其特征在于,计算每幅截图中的色彩丰富程度,包括: 对于每幅截图,将其由彩色图像转换为灰度图像,获得所述灰度图像中每个像素点的灰度值,统计得出其灰度直方图数据,根据其灰度直方图数据查找所述灰度图像中具有最低灰度值和最高灰度值的像素点; 根据所述最低灰度值和最高灰度值为所述截图赋予色彩丰富程度的分值,其中,所述最低灰度值和最高灰度值的差值越大,所述截图的色彩丰富程度的分值越高。 7. The selection method according to claim 2, characterized in that the richness of each color is calculated screenshot web, comprising: for each piece of theme, which the color image is converted to grayscale, the grayscale image is obtained each pixel of the gray scale value, which is obtained histogram statistics data, to find the gray scale image data according to the histogram of the gray pixels having the highest and the lowest gray value gray value; according to the said minimum gradation value and said maximum gradation value given theme color richness value, wherein the larger the difference between the minimum and maximum gradation value of the gradation values ​​of the richness of the theme color component The higher the value.
  8. 8. 如权利要求7所述的选取方法,其特征在于,计算每幅截图中的色彩波动程度,包括: 根据所述最低灰度值和最高灰度值由所述灰度直方图数据中截取位于两者之间的每个灰度值的像素点个数; 根据由所述灰度直方图数据中截取出的像素点总个数W及由所述灰度直方图数据中截取出的灰度值的总个数,计算像素点分布的平均值,根据由所述灰度直方图数据中截取出的每个灰度值的像素点个数与所述平均值计算所述灰度图像的相对标准偏差; 根据所述灰度图像的相对标准偏差为所述截图赋予色彩波动程度的分值,其中,所述截图的灰度图像的相对标准偏差的越大,所述截图的色彩波动程度的分值越高。 8. The method of selecting claimed in claim 7, wherein the color fluctuation calculating the degree of each piece of theme, comprising: intercepting, by the histogram data based on the highest value and the lowest gray gradation values number of pixels located in each gradation value between the two; W and the total number intercepted by the histogram data based on the pixel taken by the data of the histogram gray the total number of values, the average value of the pixel point distribution, the grayscale image according to the number taken by the pixel intensity histogram data for each said gray scale value of the average calculated relative standard deviation; the relative standard deviation of the gray image value for the theme color-imparting volatility, wherein the relative standard deviation of the gray scale image screenshot larger, the degree of fluctuation of the color theme the higher the score.
  9. 9. 如权利要求7所述的选取方法,其特征在于,根据其灰度直方图数据查找所述灰度图像中具有最低灰度值和最高灰度值的像素点,进一步包括: 从所述灰度直方图数据的第一个灰度值开始,依次对所述灰度值对应的像素点个数进行查询,记录像素点个数大于0的第一个灰度值作为最低灰度值; 从所述灰度直方图数据的最后一个灰度值开始,依次对所述灰度值对应的像素点个数进行查询,记录像素点个数大于0的第一个灰度值作为最高灰度值; 其中,所述灰度直方图数据按灰度值由小到大的顺序排列。 9. The selection method according to claim 7, characterized in that, to find the gray image pixels having the highest and the lowest gray value according to its gray value histogram data, further comprising: from the a first gray value histogram data is started, the number of pixel points in sequence corresponding to the gradation value query, records a gray scale value greater than the number of pixels as the minimum gradation value 0; from the last of the gray value histogram data sequentially to query the number of pixels corresponding to the gray value, a record of the number of pixels gray scale value greater than 0 as the highest gradation value; wherein, said histogram data by gradation values ​​arranged in ascending order.
  10. 10. -种视频预览图的选取装置,其特征在于,包括: 截图模块,用于接收视频并对视频进行预定数量的随机截图; 赋值模块,分别用于对每幅截图进行人脸个数的检测和灰度计算,根据所述每副截图的人脸个数和灰度计算结果,为每副截图赋予分值; 选取模块,用于根据每幅截图的分值选取一张截图作为所述视频的预览图。 10. - kind of the preview video selecting means, wherein, comprising: a theme module for receiving a video and a predetermined number of video random theme; assignment module, respectively, for each piece of theme for the number of face detecting and calculating the gradation, based on the number of each sub-theme human face and gradation calculation result value given for each sub-theme; selecting means for selecting a value in accordance with each piece of theme as the theme preview video.
  11. 11. 如权利要求10所述的选取装置,其特征在于, 所述赋值模块所进行的灰度计算,包括:检测每幅截图的清晰程度,计算每幅截图中的色彩丰富程度和色彩波动程度;获得的所述灰度计算结果,包括;每幅截图的清晰程度、色彩丰富程度和色彩波动程度。 11. The selection device according to claim 10, wherein said module for gradation assignment calculation, comprising: detecting each of the clarity of the web theme, color and richness of color calculating volatility of each web screenshot ; calculation result obtained by the gradation, comprising; each piece of theme clarity, color and color richness of volatility.
  12. 12. 如权利要求11所述的选取装置,其特征在于, 所述赋值模块,为所述每幅截图赋予的分值,与人脸个数的分值、清晰程度的分值、色彩丰富程度的分值正相关,与所述色彩波动程度的分值负相关;其中,所述人脸的个数越少且所述人脸在所述截图中所处位置越靠近中部,所述截图的人脸个数的分值越高;所述截图中的边缘的宽度越小,所述截图的清晰程度的分值越高;所述截图的最低灰度值和最高灰度值的差值越大,所述截图的色彩丰富程度的分值越高;所述截图的灰度图像的相对标准偏差的越大,所述截图的色彩波动程度的分值越高。 12. The selection means according to claim 11, wherein the assignment module is assigned to each piece of the theme score, the number of face score, score clarity, color richness score positively correlated negatively correlated with the degree of fluctuation of the color value; wherein, the fewer the number of the face and the face closer to the central location in the screenshot, the screenshot the higher the number of face value; the smaller the width of the edge of the screenshot, the higher the clarity of the screenshot score; the difference between the lowest gray screenshot value and the highest value of the gradation large, the higher the color richness screenshot score; screenshot of the relative standard deviation of the gray scale image, the higher the degree of fluctuation of the color value of the screenshot.
  13. 13. 如权利要求12所述的选取装置,其特征在于, 所述赋值模块,对于任一截图,识别所述任一截图的类型,对于识别出的截图类型,针对人脸个数的分值、清晰程度的分值、色彩丰富程度的分值、色彩波动程度的分值,选取相应的权重配置方案,并根据人脸个数的分值、清晰程度的分值、色彩丰富程度的分值、色彩波动程度的分值,结合权重配置方案中为每种分值配置的权重,为所述任一截图赋予分值。 13. The apparatus of claim 12 selected for the identified theme type, face value for the number of claims, wherein the assignment module, for any theme, any type of a screenshot of the identification of, , score clarity, richness of color score, the degree of fluctuation of the color value, select the appropriate weighting configuration scheme, according to the number of face value, the score clarity, richness of color scores weight, the degree of fluctuation of the color value, in conjunction with configuration schemes weight configured for each weight value for any one of the scores given theme.
  14. 14. 如权利要求10所述的选取装置,其特征在于, 所述赋值模块,对于每幅截图,通过预设的人脸特征算子进行特征检测,识别出图像中的人脸,其中,所述人脸特征算子用于检测人脸中各关键特征点间的位置比例关系;根据识别出的人脸为截图赋予人脸个数的分值,其中,所述人脸的个数越少且所述人脸在所述截图中所处位置越靠近中部,所述截图的人脸个数的分值越高。 14. The selection apparatus according to claim 10, wherein the assignment module, for each piece of theme, the predetermined feature is detected by operator facial features, identified in the face image, wherein the operator said facial feature positions for each of the proportional relationship between the feature points of the face detection; score given number of shots according to the face recognized face, wherein the smaller the number of the face and the face in the shot location closer to the center, the higher the value of the number of shots of people's face.
CN 201410852257 2014-12-31 2014-12-31 Video preview selecting method and device CN104598921A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201410852257 CN104598921A (en) 2014-12-31 2014-12-31 Video preview selecting method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201410852257 CN104598921A (en) 2014-12-31 2014-12-31 Video preview selecting method and device

Publications (1)

Publication Number Publication Date
CN104598921A true true CN104598921A (en) 2015-05-06

Family

ID=53124693

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201410852257 CN104598921A (en) 2014-12-31 2014-12-31 Video preview selecting method and device

Country Status (1)

Country Link
CN (1) CN104598921A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080046406A1 (en) * 2006-08-15 2008-02-21 Microsoft Corporation Audio and video thumbnails
CN101807198A (en) * 2010-01-08 2010-08-18 中国科学院软件研究所 Video abstraction generating method based on sketch
CN101853286A (en) * 2010-05-20 2010-10-06 上海全土豆网络科技有限公司 Intelligent selection method of video thumbnails
CN103020947A (en) * 2011-09-23 2013-04-03 阿里巴巴集团控股有限公司 Image quality analysis method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080046406A1 (en) * 2006-08-15 2008-02-21 Microsoft Corporation Audio and video thumbnails
CN101807198A (en) * 2010-01-08 2010-08-18 中国科学院软件研究所 Video abstraction generating method based on sketch
CN101853286A (en) * 2010-05-20 2010-10-06 上海全土豆网络科技有限公司 Intelligent selection method of video thumbnails
CN103020947A (en) * 2011-09-23 2013-04-03 阿里巴巴集团控股有限公司 Image quality analysis method and device

Similar Documents

Publication Publication Date Title
Xue et al. Gradient magnitude similarity deviation: A highly efficient perceptual image quality index
Lu et al. Rapid: Rating pictorial aesthetics using deep learning
Marchesotti et al. Assessing the aesthetic quality of photographs using generic image descriptors
US20060147107A1 (en) Method and system for learning-based quality assessment of images
US20120106783A1 (en) Object tracking method
US20150071547A1 (en) Automated Selection Of Keeper Images From A Burst Photo Captured Set
US20120027263A1 (en) Hand gesture detection
US20090063431A1 (en) Monitoring and analyzing creation and usage of visual content
Liu et al. Image retargeting quality assessment
Fang et al. No-reference quality assessment of contrast-distorted images based on natural scene statistics
Gygli et al. The interestingness of images
US20070098267A1 (en) Method and apparatus for distinguishing obscene video using visual feature
US20060008141A1 (en) Radiometric calibration from a single image
Moorthy et al. Towards computational models of the visual aesthetic appeal of consumer videos
Ma et al. Image retargeting quality assessment: A study of subjective scores and objective metrics
US20150235110A1 (en) Object recognition or detection based on verification tests
Yao et al. Oscar: On-site composition and aesthetics feedback through exemplars for photographers
Sun et al. Photo assessment based on computational visual attention model
US20120128239A1 (en) Image quality assessment to merchandise an item
CN101013444A (en) Method and apparatus for adaptively generating abstract of football video
US20090263014A1 (en) Content fingerprinting for video and/or image
US20080063267A1 (en) Method and apparatus for representing a group of images
CN102446272A (en) Method and device for segmenting and recognizing station caption as well as television comprising device
US20090310861A1 (en) Image processing
CN101834982A (en) Hierarchical screening method of violent videos based on multiplex mode

Legal Events

Date Code Title Description
C06 Publication
C10 Entry into substantive examination
WD01