WO2014040420A1 - 一种根据终端设备照片内容自动摆正照片的方法 - Google Patents

一种根据终端设备照片内容自动摆正照片的方法 Download PDF

Info

Publication number
WO2014040420A1
WO2014040420A1 PCT/CN2013/074979 CN2013074979W WO2014040420A1 WO 2014040420 A1 WO2014040420 A1 WO 2014040420A1 CN 2013074979 W CN2013074979 W CN 2013074979W WO 2014040420 A1 WO2014040420 A1 WO 2014040420A1
Authority
WO
WIPO (PCT)
Prior art keywords
photo
weight
photos
content
information
Prior art date
Application number
PCT/CN2013/074979
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 广东欧珀移动通信有限公司
Priority to US14/354,598 priority Critical patent/US9721327B2/en
Publication of WO2014040420A1 publication Critical patent/WO2014040420A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/24Aligning, centring, orientation detection or correction of the image
    • G06V10/242Aligning, centring, orientation detection or correction of the image by image rotation, e.g. by 90 degrees
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/60Rotation of whole images or parts thereof

Definitions

  • the present invention relates to a terminal device, and more particularly to a method for automatically aligning a photo according to the photo content of the terminal device.
  • the method of aligning photos is basically left-handed and right-handed by hand; or on a mobile device supporting a gravity sensor, the sensor can be used to align.
  • the number of photos is large, the manual alignment is annoying; and by the way the gravity sensor is squared, if the direction of a photo itself is wrong, then the relative direction of the photo is wrong regardless of how the phone is rotated. People feel that the operation is cumbersome.
  • the object of the present invention is to overcome the deficiencies of the prior art, and to provide a method for automatically aligning a photo according to the photo content of the terminal device, and determining, by the content of the photo itself, which direction the photo should be squared, without requiring the user to manually rotate the photo. It is also possible to avoid the problem that the gravity sensor cannot correct errors.
  • the technical solution adopted by the present invention is a method for automatically correcting a photo according to the photo content of the terminal device, comprising the following steps:
  • the system analyzes the photo content and extracts key information of the photo
  • the key information includes a face, a text, a photo texture feature, and a color
  • the key information calculation weight is divided into a face information calculation weight, a text information calculation weight, a photo texture feature information calculation weight, and a color information. Calculate the weight.
  • the calculated face information weight is divided into a single face information calculation weight and a plurality of The face information is calculated.
  • the single-person face weight information is calculated as:
  • Step 1. According to the face recognition technology, the left eye, the right eye, and the mouth of the face are read, and a triangle relationship is established. The line connecting the center of gravity of the mouth and the triangle is oriented toward the vector direction, and the face orientation is recognized; Step 1. 2 With the face orientation direction as the vector direction, the angles a1, a2, a3, and a4 of the vectors in the four directions are obtained, thereby obtaining the cosine values of the face orientation in the four directions of the photographs cos al, cos a3, cos a2 Cos a4;
  • the cosine value is used as the portrait weight of a portrait in this photo.
  • the cosine value is less than 0 and is set to 0.
  • the multi-person face weight calculation weight is used to calculate a cosine value of a plurality of individual faces, and then an average value is obtained, and the weight is determined according to the average value, and the photo is adjusted according to the direction in which the weight is the largest.
  • the calculated weight information of the text information includes:
  • Step 2. 1. Identify the characters in the photo as vector characters according to the fingerprint recognition technology; Step 2. 2. Obtain four cosine values according to the angle between the vector direction and the four directions; Step 2. 3. Cosine value As the weight of the text in this photo of a certain character, when calculating the weight, the cosine value is less than 0 and is set to 0.
  • the average value of the weights of the plurality of text information in the four directions is read as the weight of the text in the photo of the plurality of characters.
  • the photo texture feature information calculation weight includes:
  • Step 3. The system pre-calculates the texture feature value information of the classic photo into the database; Step 3. 2. Extract the texture feature values in the four directions of the photo to be compared with the standard values of the database;
  • Step 3. Find the closest texture feature standard value in the four directions in the database
  • Step 3. calculate the texture feature values in a certain direction, and calculate the texture feature weights according to the proportion of the corresponding standard texture feature values.
  • the color information calculation weight includes:
  • Step 4. The system pre-calculates the color feature value information of the classic photo into the database; Step 4. 2. Extract the color feature values in the four directions of the photo, and compare them with the standard values of the database;
  • Step 4. Find the closest color feature standard value in the four directions in the database
  • Step 4. calculate the color feature values in a certain direction separately, and calculate the color feature weights according to the proportion of the corresponding standard color feature values.
  • the method for automatically correcting the photo according to the photo content of the terminal device further includes: the system pre-setting the weight coefficient of the weights of the face, the text, the photo texture feature, and the color feature, and calculating the weight face and text
  • the photo texture feature and the color feature are respectively multiplied by the coefficients specified by the system, and added to obtain the weight sum, and finally the weights of the four directions are compared to adjust the photo.
  • the beneficial effects of the present invention are: determining the direction in which the photo should be squared by the content of the photo itself, calculating the weight of the face, the text, the photo texture feature, and the color, and determining the photo according to the weight.
  • the orientation is correct, which eliminates the need for the user to manually rotate the photo, avoids the problem that the gravity sensor cannot be corrected, and does not need to rely on the sensor, and can be applied to both mobile devices and home computers.
  • Figure 1 is a flow chart of the method of the present invention
  • FIG. 2 is a schematic view of a specific embodiment of the present invention.
  • a method for automatically aligning photos according to the photo content of the terminal device includes the following steps:
  • the system analyzes the photo content and extracts key information of the photo
  • the key information includes a face, a text, a photo texture feature, and a color
  • the key information calculation weight is divided into a face information calculation weight, a text information calculation weight, a photo texture feature information calculation weight, and a color information. Calculate the weight.
  • the face information calculation weight is divided into a single face information calculation weight and a multi-person face information calculation weight.
  • the single-person face weight information is calculated as:
  • Step 1. According to the face recognition technology, the left eye, the right eye, and the mouth of the face are read, and a triangle relationship is established. The line connecting the center of gravity of the mouth and the triangle is oriented toward the vector direction, and the face orientation is recognized; Step 1. 2 With the face orientation direction as the vector direction, the angles a1, a2, a3, and a4 of the vectors in the four directions are obtained, thereby obtaining the cosine values of the face orientation in the four directions of the photographs cos al, cos a3, cos a2 Cos a4;
  • the cosine value is used as the portrait weight of a portrait in this photo.
  • the cosine value is less than 0 and is set to 0.
  • the multi-person face weight calculation weight is used to calculate a cosine value of a single face, and then an average value is obtained, and the weight is determined according to the average value, and the photo is adjusted according to the direction in which the weight is the largest.
  • the calculated weight information of the text information includes:
  • Step 2. Identify the text in the photo as a vector character according to the fingerprint recognition technology (using OCR technology);
  • Step 2. Obtain four cosine values according to the angle between the vector direction and the four directions.
  • Step 2. 3 Cosine value as the weight of the text in this photo. When calculating the weight, the cosine value Less than 0 is set to 0.
  • the average value of the weights of the plurality of text information in the four directions is read as the weight of the text in the photo of the plurality of characters.
  • the photo texture feature information calculation weight includes:
  • Step 3. The system pre-calculates the texture feature value information of the classic photo into the database; Step 3. 2. Extract the texture feature values in the four directions of the photo to be compared with the standard values of the database;
  • Step 3. Find the closest texture feature in the four directions in the database. Quasi value
  • Step 3. calculate the texture feature values in a certain direction, and calculate the texture feature weights according to the proportion of the corresponding standard texture feature values.
  • the color information calculation weight includes:
  • Step 4. The system pre-calculates the color feature value information of the classic photo into the database; Step 4. 2. Extract the color feature values in the four directions of the photo to be compared with the standard values of the database;
  • Step 4. Find the closest color feature standard value in the four directions in the database
  • Step 4. calculate the color feature values in a certain direction separately, and calculate the color feature weights according to the proportion of the corresponding standard color feature values.
  • the method for automatically correcting the photo according to the photo content of the terminal device further includes: the system pre-setting the weight coefficient of the weights of the face, the text, the photo texture feature, and the color feature, and calculating the weight face and text
  • the photo texture feature and the color feature are respectively multiplied by the coefficients specified by the system, and added to obtain the weight sum, and finally the weights of the four directions are compared to adjust the photo.
  • the present invention aligns the photo by the content of the photo itself.
  • portrait human face
  • text text
  • photo texture features color information.
  • calculate the four aspects of information as weights calculate the weights of the four aspects in the four directions (up, down, left and right), and compare them to the direction that is most suitable for the square (the right direction is the right) The one with the largest value).
  • other key information features can be customized to distinguish.
  • the human face and the mouth are recognized according to the face recognition technology.
  • the triangle in the figure represents three features of the face (left eye, right eye, mouth).
  • the angle between the face orientation and the four directions is al, a2, a3, a4, and it is obvious that cos al > cos a3 > cos a2 > cos a4. Therefore, the weight in the upward direction is the largest.
  • the weight calculation method of the text is similar to the avatar.
  • the text recognition algorithm (which can be implemented by the classical algorithm or the text recognition algorithm) can determine the contained text. Similarly to the method of judging the portrait, the orientation vector of the text is also determined, and the vector direction is obtained. And the angle between the four directions, get four cosine values, and get the weight. If there are multiple words, take the average of them.
  • the method of calculating the weight of the texture feature and the color information the two parts of the feature are not obvious, and each can only give a maximum value of 0.5.
  • Some classic photos photographs with obvious texture features and color information
  • the closest value is obtained, and then Proportion, multiplied by 0.5.
  • you can set the face, text, texture features and color ratio to 7 : 2 : 0. 5 : 0. 5, the weight of the photo face * 7 + text * 2 texture features * 0. 5 + color * 0. 5.
  • calculate several weights in four directions up, down, left, and right
  • the weights in the direction and (Wl, W2, W3, W4) with the weight and the largest direction as the direction of the square.
  • the portrait feature is detected.
  • the cosine value of the vector direction of the portrait direction and the vector angle of the four directions the cosine values in the four directions (up, down, left, and right) are obtained, 1, -1, 0, 0, and thus the portrait feature right.
  • the value is 1, 0, 0, 0.
  • the weights of the text features in all four directions are zero.
  • the extracted texture features and color features are scaled to the classical values, and then multiplied by 0.5, and the corresponding values are also obtained.
  • the weight obtained and the largest is W1, so the photo direction is up.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)
  • Processing Or Creating Images (AREA)

Abstract

本发明公开了一种根据终端设备照片内容自动摆正照片的方法,包括以下步骤:a.系统对照片内容进行分析,提取照片的关键信息;b.将关键信息计算为权值,并分别计算四个方向关键信息权值和;c.将四个方向关键信息权值和进行比较,得出权值最大的一个方向;d.根据权值最大的方向摆正照片位置。本发明通过照片本身的内容来判断照片应该在哪个方向摆正,既不需要用户手动旋转照片,也可以避免重力传感器无法纠错的问题,并且不需要依赖传感器,在移动设备和家用计算机上都可以应用。

Description

一种根据终端设备照片内容自动摆正照片的方法 技术领域
本发明涉及一种终端设备, 特别是涉及一种根据终端设备照片内容自 动摆正照片的方法。
背景技术
在电脑或移动设备上浏览照片时, 经常会遇到一些照片方向不对 (朝 下或者朝左朝右), 需要摆正后浏览。 目前摆正照片的方法基本都是靠手 动左旋, 右旋; 或者在支持重力传感器的移动设备上, 可以利用传感器来 摆正。 但是在照片数量较多时, 手动摆正让人感到厌烦; 而通过重力传感 器摆正的方式,如果一张照片本身方向就是不对的,那不论怎样旋转手机, 照片的相对方向都是错的, 让人感到操作比较繁琐。
发明内容
本发明的目的在于克服现有技术的不足, 提供一种根据终端设备照片 内容自动摆正照片的方法, 通过照片本身的内容来判断照片应该在哪个方 向摆正, 既不需要用户手动旋转照片, 也可以避免重力传感器无法纠错的 问题。
为了达到上述目的, 本发明采用的技术方案是, 一种根据终端设备照 片内容自动摆正照片的方法, 包括以下步骤:
a.系统对照片内容进行分析, 提取照片的关键信息;
b.将关键信息计算为权值, 并分别计算四个方向关键信息权值和; c 将四个方向关键信息权值和进行比较, 得出权值最大的一个方向; d . 根据权值最大的方向摆正照片位置。
进一步的, 所述的关键信息包括人脸、 文字、 照片紋理特征及颜色, 则关键信息计算权值分为人脸信息计算权值、 文字信息计算权值、 照片紋 理特征信息计算权值及颜色信息计算权值。
进一步的, 所述的人脸信息计算权值分为单人人脸信息计算权值和多 人人脸信息计算权值。
进一步的, 所述的单人人脸权值信息计算为:
步骤 1. 1、 根据人脸识别技术读取人脸的左眼、 右眼、 嘴, 建立三角 形关系, 以嘴和三角形重心的连线为人脸朝向矢量方向, 识别人脸朝向; 步骤 1. 2、 以人脸朝向方向为矢量方向, 获得与四个方向的矢量夹角 al、 a2、 a3、 a4, 从而得出人脸朝向在照片中四个方向的余弦值 cos al、 cos a3、 cos a2、 cos a4;
步骤 1. 3、 余弦值作为某个人像在此照片中的人像权值, 在计算权值 时, 余弦值小于 0则设定为 0。
进一步的, 所述的多人人脸权值计算权值为计算多个单个人脸的余弦 值, 然后取平均值, 根据平均值判断权值, 根据权值最大的方向调整照片。
进一步的, 所述的文字信息计算权值包括:
步骤 2. 1、 根据指图文识别技术, 将照片中的文字识别为矢量字符; 步骤 2. 2、 根据矢量方向与四个方向的夹角得到四个余弦值; 步骤 2. 3、 余弦值作为某个文字的在此照片中的文字权值, 在计算权 值时, 余弦值小于 0设定为 0。
进一步的, 当文字为多个时, 读取多个文字信息在四个方向上的文字 权值的平均值, 作为多个文字的在此照片中的文字权值。
进一步的, 所述的照片紋理特征信息计算权值包括:
步骤 3. 1、 系统预先计算经典照片的紋理特征值信息放入数据库内; 步骤 3. 2、 提取需要调整照片四个方向上的紋理特征值, 与数据库的 标准数值进行比较;
步骤 3. 3、 分别在数据库中找出四个方向上找出最接近的紋理特征标 准值;
步骤 3. 4、 然后分别计算出某个方向的紋理特征值, 并根据对应的标 准紋理特征值的比例计算紋理特征权值。
进一步的, 所述的颜色信息计算权值包括:
步骤 4. 1、 系统预先计算经典照片的颜色特征值信息放入数据库内; 步骤 4. 2、 提取需要调整照片四个方向上的颜色特征值, 与数据库的 标准数值进行比较;
步骤 4. 3、 分别在数据库中找出四个方向上找出最接近的颜色特征标 准值;
步骤 4. 4、 然后分别计算出某个方向的颜色特征值, 并根据对应的标 准颜色特征值的比例计算颜色特征权值。
进一步的, 所述的根据终端设备照片内容自动摆正照片的方法进一步 包括: 系统预先设置人脸、 文字、 照片紋理特征及颜色特征这些权值的权 重系数, 将计算的权值人脸、 文字、 照片紋理特征及颜色特征分别乘以系 统指定的系数, 并相加得到权值和, 最后比较四个方向的权值和来调整照 片。
与现有技术相比, 本发明的有益效果是: 通过照片本身的内容来判断 照片应该在哪个方向摆正, 计算人脸、文字、照片紋理特征及颜色的权值, 根据权值来判断照片摆正方向, 既不需要用户手动旋转照片, 也可以避免 重力传感器无法纠错的问题, 并且不需要依赖传感器, 在移动设备和家用 计算机上都可以应用。
附图说明
图 1为本发明的方法流程图;
图 2为本发明的具体实施例示意图。
具体实施方式
下面结合实施例参照附图进行详细说明, 以便对本发明的技术特征及 优点进行更深入的诠释。
本发明的方法流程图如图 1所示, 一种根据终端设备照片内容自动摆 正照片的方法, 包括以下步骤:
a.系统对照片内容进行分析, 提取照片的关键信息;
b.将关键信息计算为权值, 并分别计算四个方向关键信息权值和; c 将四个方向关键信息权值和进行比较, 得出权值最大的一个方向; d. 根据权值最大的方向摆正照片位置。 进一步的, 所述的关键信息包括人脸、 文字、 照片紋理特征及颜色, 则关键信息计算权值分为人脸信息计算权值、 文字信息计算权值、 照片紋 理特征信息计算权值及颜色信息计算权值。
进一步的, 所述的人脸信息计算权值分为单人人脸信息计算权值和多 人人脸信息计算权值。
进一步的, 所述的单人人脸权值信息计算为:
步骤 1. 1、 根据人脸识别技术读取人脸的左眼、 右眼、 嘴, 建立三角 形关系, 以嘴和三角形重心的连线为人脸朝向矢量方向, 识别人脸朝向; 步骤 1. 2、 以人脸朝向方向为矢量方向, 获得与四个方向的矢量夹角 al、 a2、 a3、 a4, 从而得出人脸朝向在照片中四个方向的余弦值 cos al、 cos a3、 cos a2、 cos a4;
步骤 1. 3、 余弦值作为某个人像在此照片中的人像权值, 在计算权值 时, 余弦值小于 0则设定为 0。
进一步的, 所述的多人人脸权值计算权值为计算单个人脸的余弦值, 然后取平均值, 根据平均值判断权值, 根据权值最大的方向调整照片。
进一步的, 所述的文字信息计算权值包括:
步骤 2. 1、 根据指图文识别技术(利用 OCR技术), 将照片中的文字识 别为矢量字符;
步骤 2. 2、 根据矢量方向与四个方向的夹角得到四个余弦值; 步骤 2. 3、 余弦值作为某个文字的在此照片中的文字权值, 在计算权 值时, 余弦值小于 0设定为 0。
进一步的, 当文字为多个时, 读取多个文字信息在四个方向上的文字 权值的平均值, 作为多个文字的在此照片中的文字权值。
进一步的, 所述的照片紋理特征信息计算权值包括:
步骤 3. 1、 系统预先计算经典照片的紋理特征值信息放入数据库内; 步骤 3. 2、 提取需要调整照片四个方向上的紋理特征值, 与数据库的 标准数值进行比较;
步骤 3. 3、 分别在数据库中找出四个方向上找出最接近的紋理特征标 准值;
步骤 3. 4、 然后分别计算出某个方向的紋理特征值, 并根据对应的标 准紋理特征值的比例计算紋理特征权值。
进一步的, 所述的颜色信息计算权值包括:
步骤 4. 1、 系统预先计算经典照片的颜色特征值信息放入数据库内; 步骤 4. 2、 提取需要调整照片四个方向上的颜色特征值, 与数据库的 标准数值进行比较;
步骤 4. 3、 分别在数据库中找出四个方向上找出最接近的颜色特征标 准值;
步骤 4. 4、 然后分别计算出某个方向的颜色特征值, 并根据对应的标 准颜色特征值的比例计算颜色特征权值。
进一步的, 所述的根据终端设备照片内容自动摆正照片的方法进一步 包括: 系统预先设置人脸、 文字、 照片紋理特征及颜色特征这些权值的权 重系数, 将计算的权值人脸、 文字、 照片紋理特征及颜色特征分别乘以系 统指定的系数, 并相加得到权值和, 最后比较四个方向的权值和来调整照 片。
本发明通过照片本身的内容来摆正照片。 通过对照片内容进行分析, 提取照片中的几个关键信息: 人像 (人脸), 文字, 照片紋理特征, 颜色 信息。 然后将四个方面的信息计算为权值, 分别计算出在四个方向 (上下 左右) 上的这四个方面信息权值和, 比较后得出最适合摆正的方向 (摆正 方向是权值最大的一个方向)。 另外, 对一些通过上述关键信息难分辨的 照片, 还可自定义其他关键信息特征来分辨。
计算人像的权值, 如果一张照片中被识别到很明显的人像特征 (可以 使用人脸检测技术, 发现人脸部最明显的三个特征: 左眼、 右眼、 嘴, 建 立三角形关系, 以嘴和三角形重心的连线为人脸朝向矢量方向), 识别人 脸朝向。 以人脸朝向方向为矢量方向, 获得与四个方向 (上下左右) 的矢 量夹角 a, 从而得出人脸朝向在照片中四个方向的余弦值, 这个余弦值可 以作为某个人像在此照片中的人像权值 (计算权值时, 余弦值小于 0按 0 算)。 如果此照片中有多个人像, 可以算出每个人像的余弦值, 最后取其 平均值来作为人像权值。
如图 2所示为本发明计算人脸特征权值的较佳实施例, 根据人脸识别 技术识别人双眼和嘴, 图中三角形代表人脸的三个特征(左眼,右眼,嘴), 人脸朝向和四个方向的夹角分别为 al, a2, a3, a4, 很明显 cos al > cos a3 > cos a2 > cos a4。 所以向上方向权值最大。
假如有 n个人像,则它们在某个方向上的权值为
Figure imgf000008_0001
文字的权值计算方式与头像类似, 通过文字识别算法 (可用经典算法 或者自己实现文字识别算法), 判断出含有的文字, 与判断人像的方法一 样, 同样判断出文字的朝向矢量, 得到矢量方向和四个方向的夹角, 得到 四个余弦值, 得出权值。 如果有多个文字, 取它们的平均值。
计算紋理特征和颜色信息的权值方法, 这两部分特征对判断不明显, 可以每个只给最大值为 0. 5的权值。 事先可以计算出一些经典照片 (紋理 特征和颜色信息明显的照片)放入库中。通过提取一张照片的紋理特征(利 用一些经典的紋理特征提取技术, 如基于灰度共生矩阵提取紋理特征方 法) 和颜色信息, 分别与经典库中的数值对比, 得到最接近的数值, 然后 得到比例, 乘以 0. 5。
例如, 可设置人脸、 文字、 紋理特征和颜色比例为 7 : 2 : 0. 5 : 0. 5,照片 的权值 =人脸 *7+文字 *2+紋理特征 *0. 5+颜色 *0. 5。
对一些照片通过上述几个信息特征难以分辨的, 比如一些抽象画, 这 样可以自定义一些其他特征。 比如提取照片的轮廓特征, 然后计算这个轮 廓的重心, 以重心最低的方向为摆正方向。 这样结果可能会最符合人的审 美习惯。
另外, 上述提出计算人像、 文字、 紋理特征、 颜色信息特征的算法仅 供参考, 在实际中可以进行优化或者使用更好的算法。
又例如, 计算四个方向 (上下左右) 上的几个权值 , 分别得到几个 方向上的权值和 (Wl, W2 , W3 , W4 ) , 以权值和最大的方向为摆正方向。 首先检测出人像特征, 通过计算人像方向的矢量和四个方向的矢量夹角的 余弦值, 得到四个方向 (上下左右) 上的余弦值为 1、 -1、 0、 0, 于是人 像特征权值为 1, 0, 0, 0。 由于文字特征没有被识别出来, 所以四个方向 上的文字特征的权值都是 0。 提取出的紋理特征和颜色特征与经典数值做 比例, 然后乘以 0. 5后, 也得到相应数值。 最后, 获得的权值和最大的为 W1 , 所以照片方向朝上。
以上内容是结合具体的优选方式对本发明所作的进一步详细说明, 不 应认定本发明的具体实施只局限于以上说明。 对于本技术领域的技术人员 而言, 在不脱离本发明构思的前提下, 还可以作出若干简单推演或替换, 均应视为由本发明所提交的权利要求确定的保护范围之内。

Claims

权 利 要 求 书
1、 一种根据终端设备照片内容自动摆正照片的方法, 包括以下步骤: a.系统对照片内容进行分析, 提取照片的关键信息;
b.将关键信息计算为权值, 并分别计算四个方向关键信息权值和; c 将四个方向关键信息权值和进行比较, 得出权值最大的一个方向; d . 根据权值最大的方向摆正照片位置。
2、 根据权利要求 1 所述的根据终端设备照片内容自动摆正照片的方 法, 其特征在于: 所述的关键信息包括人脸、 文字、 照片紋理特征及颜色, 则关键信息计算权值分为人脸信息计算权值、 文字信息计算权值、 照片紋 理特征信息计算权值及颜色信息计算权值。
3、 根据权利要求 2 所述的根据终端设备照片内容自动摆正照片的方 法, 其特征在于: 所述的人脸信息计算权值分为单人人脸信息计算权值和 多人人脸信息计算权值。
4、 根据权利要求 3 所述的根据终端设备照片内容自动摆正照片的方 法, 其特征在于, 所述的单人人脸权值信息计算为:
步骤 1. 1、 根据人脸识别技术读取人脸的左眼、 右眼、 嘴, 建立三角 形关系, 以嘴和三角形重心的连线为人脸朝向矢量方向, 识别人脸朝向; 步骤 1. 2、 以人脸朝向方向为矢量方向, 获得与四个方向的矢量夹角 al、 a2、 a3、 a4, 从而得出人脸朝向在照片中四个方向的余弦值 cos al、 cos a3、 cos a2、 cos a4;
步骤 1. 3、 余弦值作为某个人像在此照片中的人像权值, 在计算权值 时, 余弦值小于 0则设定为 0。
5、 根据权利要求 4 所述的根据终端设备照片内容自动摆正照片的方 法, 其特征在于, 所述的多人人脸权值计算权值为计算多个单个人脸的余 弦值, 然后取平均值, 根据平均值判断权值, 根据权值最大的方向调整照 片。
6、 根据权利要求 2 所述的根据终端设备照片内容自动摆正照片的方 步骤 2. 3、 余弦值作为某个文字的在此照片中的文字权值, 在计算权 值时, 余弦值小于 0设定为 0。
7、 根据权利要求 6 所述的根据终端设备照片内容自动摆正照片的方 法, 其特征在于: 当文字为多个时, 读取多个文字信息在四个方向上的文 字权值的平均值, 作为多个文字的在此照片中的文字权值。
8、 根据权利要求 2 所述的根据终端设备照片内容自动摆正照片的方 法, 其特征在于, 所述的照片紋理特征信息计算权值包括:
步骤 3. 1、 系统预先计算经典照片的紋理特征值信息放入数据库内; 步骤 3. 2、 提取需要调整照片四个方向上的紋理特征值, 与数据库的 标准数值进行比较;
步骤 3. 3、 分别在数据库中找出四个方向上找出最接近的紋理特征标 准值;
步骤 3. 4、 然后分别计算出某个方向的紋理特征值, 并根据对应的标 准紋理特征值的比例计算紋理特征权值。
9、 根据权利要求 2 所述的根据终端设备照片内容自动摆正照片的方 法, 其特征在于, 所述的颜色信息计算权值包括:
步骤 4. 1、 系统预先计算经典照片的颜色特征值信息放入数据库内; 步骤 4. 2、 提取需要调整照片四个方向上的颜色特征值, 与数据库的 标准数值进行比较;
步骤 4. 3、 分别在数据库中找出四个方向上找出最接近的颜色特征标 准值;
步骤 4. 4、 然后分别计算出某个方向的颜色特征值, 并根据对应的标 准颜色特征值的比例计算颜色特征权值。
10、 根据权利要求 2所述的根据终端设备照片内容自动摆正照片的方 法, 其特征在于, 所述的根据终端设备照片内容自动摆正照片的方法进一 步包括: 系统预先设置人脸、 文字、 照片紋理特征及颜色特征这些权值的 权重系数, 将计算的权值人脸、 文字、 照片紋理特征及颜色特征分别乘以 系统指定的系数, 并相加得到权值和, 最后比较四个方向的权值和来调整 照片。
PCT/CN2013/074979 2012-09-12 2013-04-28 一种根据终端设备照片内容自动摆正照片的方法 WO2014040420A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US14/354,598 US9721327B2 (en) 2012-09-12 2013-04-28 Method for automatically adjusting a picture according to contents of the picture at terminal equipment

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2012103350949A CN102915431A (zh) 2012-09-12 2012-09-12 一种根据终端设备照片内容自动摆正照片的方法
CN201210335094.9 2012-09-12

Publications (1)

Publication Number Publication Date
WO2014040420A1 true WO2014040420A1 (zh) 2014-03-20

Family

ID=47613792

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/074979 WO2014040420A1 (zh) 2012-09-12 2013-04-28 一种根据终端设备照片内容自动摆正照片的方法

Country Status (3)

Country Link
US (1) US9721327B2 (zh)
CN (1) CN102915431A (zh)
WO (1) WO2014040420A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103237117A (zh) * 2013-03-25 2013-08-07 广东欧珀移动通信有限公司 Mtk平台的手机实现图片后台旋转的方法及装置

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102915431A (zh) * 2012-09-12 2013-02-06 广东欧珀移动通信有限公司 一种根据终端设备照片内容自动摆正照片的方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006126899A (ja) * 2004-10-26 2006-05-18 Matsushita Electric Ind Co Ltd 生体判別装置、生体判別方法、およびそれを用いた認証システム
CN101163189A (zh) * 2006-10-13 2008-04-16 上海银晨智能识别科技有限公司 人脸图像校正方法
CN101266390A (zh) * 2006-08-24 2008-09-17 宁波大学 基于Contourlet变换的数码成像自动对焦方法
CN102542255A (zh) * 2011-12-06 2012-07-04 Tcl集团股份有限公司 一种人脸图像校正的方法、装置及系统
CN102915431A (zh) * 2012-09-12 2013-02-06 广东欧珀移动通信有限公司 一种根据终端设备照片内容自动摆正照片的方法

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5077811A (en) * 1990-10-10 1991-12-31 Fuji Xerox Co., Ltd. Character and picture image data processing system
TW569148B (en) * 2002-04-09 2004-01-01 Ind Tech Res Inst Method for locating facial features in an image
US7508961B2 (en) * 2003-03-12 2009-03-24 Eastman Kodak Company Method and system for face detection in digital images
US7565030B2 (en) * 2003-06-26 2009-07-21 Fotonation Vision Limited Detecting orientation of digital images using face detection information
CN101833648B (zh) * 2009-03-13 2012-05-02 汉王科技股份有限公司 文本图像的校正方法
CN101639933B (zh) * 2009-07-16 2013-03-27 上海合合信息科技发展有限公司 图像旋转校正方法及系统、电子设备
JP2011119997A (ja) * 2009-12-03 2011-06-16 Sony Computer Entertainment Inc 画像処理装置および画像処理方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006126899A (ja) * 2004-10-26 2006-05-18 Matsushita Electric Ind Co Ltd 生体判別装置、生体判別方法、およびそれを用いた認証システム
CN101266390A (zh) * 2006-08-24 2008-09-17 宁波大学 基于Contourlet变换的数码成像自动对焦方法
CN101163189A (zh) * 2006-10-13 2008-04-16 上海银晨智能识别科技有限公司 人脸图像校正方法
CN102542255A (zh) * 2011-12-06 2012-07-04 Tcl集团股份有限公司 一种人脸图像校正的方法、装置及系统
CN102915431A (zh) * 2012-09-12 2013-02-06 广东欧珀移动通信有限公司 一种根据终端设备照片内容自动摆正照片的方法

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103237117A (zh) * 2013-03-25 2013-08-07 广东欧珀移动通信有限公司 Mtk平台的手机实现图片后台旋转的方法及装置

Also Published As

Publication number Publication date
US9721327B2 (en) 2017-08-01
CN102915431A (zh) 2013-02-06
US20140300639A1 (en) 2014-10-09

Similar Documents

Publication Publication Date Title
US7565030B2 (en) Detecting orientation of digital images using face detection information
TWI662433B (zh) Living body detection method and device, and identity authentication method and device
WO2020103417A1 (zh) 一种bmi评测方法、装置及计算机可读存储介质
Arca et al. A face recognition system based on automatically determined facial fiducial points
US7522773B2 (en) Using time in recognizing persons in images
CN109359575A (zh) 人脸检测方法、业务处理方法、装置、终端及介质
CN103488980A (zh) 一种基于摄像头的坐姿判断方法和装置
WO2015067084A1 (zh) 人眼定位方法和装置
JP2007249586A (ja) 認証装置、認証方法、認証プログラムおよびコンピュータ読み取り可能な記録媒体
CN105740781B (zh) 一种三维人脸活体检测的方法和装置
Jung et al. Robust upright adjustment of 360 spherical panoramas
CN105893981B (zh) 一种人脸姿态矫正方法
CN110378871B (zh) 基于姿势特征的游戏人物原画拷贝检测方法
TW200929008A (en) Multi-direction human face detection method
CN107316333A (zh) 一种自动生成日漫肖像的方法
CN107729883A (zh) 一种静脉图像感兴趣区域提取方法
CN105608448A (zh) 一种基于脸部关键点的lbp特征提取方法和装置
WO2021254478A1 (zh) 文本识别方法、装置、存储介质以及电子设备
WO2014040420A1 (zh) 一种根据终端设备照片内容自动摆正照片的方法
KR20190080388A (ko) Cnn을 이용한 영상 수평 보정 방법 및 레지듀얼 네트워크 구조
US20180096490A1 (en) Method for determining anthropometric measurements of person
CN113609963B (zh) 一种实时多人体角度的抽烟行为检测方法
CN107392203A (zh) 规则图片信息识别方法及系统
CN106980818B (zh) 一种用于人脸图像的个性化预处理方法、系统及其终端
CN106557783B (zh) 一种漫画主要角色的自动提取系统及方法

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 14354598

Country of ref document: US

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

Ref document number: 13837727

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 13837727

Country of ref document: EP

Kind code of ref document: A1