TWI385593B - Display device and method for adjusting pictures - Google Patents

Display device and method for adjusting pictures Download PDF

Info

Publication number
TWI385593B
TWI385593B TW97142193A TW97142193A TWI385593B TW I385593 B TWI385593 B TW I385593B TW 97142193 A TW97142193 A TW 97142193A TW 97142193 A TW97142193 A TW 97142193A TW I385593 B TWI385593 B TW I385593B
Authority
TW
Taiwan
Prior art keywords
picture
face
display screen
center
display
Prior art date
Application number
TW97142193A
Other languages
Chinese (zh)
Other versions
TW201017577A (en
Inventor
Chuan Hong Wang
Hong Yang Yeh
Xiao-Guang Li
Ming Feng Tsai
Original Assignee
Hon Hai Prec Ind Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hon Hai Prec Ind Co Ltd filed Critical Hon Hai Prec Ind Co Ltd
Priority to TW97142193A priority Critical patent/TWI385593B/en
Publication of TW201017577A publication Critical patent/TW201017577A/en
Application granted granted Critical
Publication of TWI385593B publication Critical patent/TWI385593B/en

Links

Description

對圖片進行調整的顯示裝置及方法Display device and method for adjusting picture

本發明涉及一種對圖片進行調整的顯示裝置及方法。The present invention relates to a display device and method for adjusting a picture.

一般情況下,由於圖片的顯示比例與顯示幕的比例不同,因此在顯示時,不能按圖片的顯示比例整體顯示圖片,即顯示時需要對圖片進行相應的調整,使得調整之後的圖片可以按顯示幕的比例在顯示幕上整體進行顯示。In general, since the display ratio of the picture is different from the ratio of the display screen, the picture cannot be displayed as a whole according to the display ratio of the picture during display, that is, the picture needs to be adjusted correspondingly, so that the adjusted picture can be displayed according to the display. The proportion of the curtain is displayed on the display screen as a whole.

現有技術中,針對圖片的調整一般有兩種方式,一種為對圖片進行壓縮,將圖片的顯示比例調整為與顯示幕的比例一致,實現整體顯示圖片,然而這種方式會使圖片失真,影響圖片的顯示效果,另一種方式為對圖片進行剪切,即當圖片的長寬比大於顯示幕的長寬比時,將圖片的寬縮放至與顯示幕的寬相等,然後剪切掉圖片的長超出部分;當圖片的長寬比小於顯示幕的長寬比時,將圖片的長縮放至顯示幕的長相等,然後剪切掉圖片寬超出的部分,這種方式雖然可以保證圖像不失真,但是,在所顯示的圖片有人物時,有可能將人物部分剪切掉。In the prior art, there are generally two ways to adjust the picture. One is to compress the picture, and the display ratio of the picture is adjusted to be consistent with the ratio of the display screen to realize the overall display picture. However, this method will make the picture distorted and affect the picture. Another way to display the image is to cut the image. When the aspect ratio of the image is larger than the aspect ratio of the display, the width of the image is scaled to be equal to the width of the display, and then the image is cut. When the aspect ratio of the picture is smaller than the aspect ratio of the display screen, the length of the picture is scaled to be equal to the length of the display screen, and then the portion beyond the width of the picture is cut off, which ensures that the image is not Distortion, however, when there is a character in the displayed picture, it is possible to cut off the character part.

有鑒於此,故需要提供一種對圖片進行調整的顯示裝置及方法,在圖片顯示比例與顯示幕比例不一致時,對於人物圖片,根據所識別的人物圖片中人臉的位置對圖片進行剪切。In view of the above, it is desirable to provide a display device and method for adjusting a picture. When the picture display ratio does not match the display screen ratio, the picture is cut according to the position of the face in the recognized person picture for the person picture.

為了實現上述的目的,本發明提出的一種對圖片進行調整的顯示裝置,該顯示裝置包括一顯示單元,一讀取模組,該讀 取模組用於讀取待顯示的圖片,一比對模組,用於獲取一圖片的顯示比例以及顯示單元的顯示幕比例,比對該顯示比例與顯示幕比例是否一致;一圖片調整模組,當圖片的顯示比例與顯示幕比例不一致時,對圖片進行調整,包括:一圖片識別子模組,用於識別待顯示的圖片是否為人物圖片;一人臉識別子模組,用於識別人物圖片中人臉的位置、人臉的個數;一中心確定子模組,用於依據識別到的人臉位置及人臉個數確定人物圖片中人臉的中心位置;一圖片剪切子模組,在人物圖片的長寬比大於顯示幕的長寬比時,放大/縮小人物圖片至人物圖片的寬度等於顯示幕的寬度,在人臉中心位置到近距離寬邊的距離大於顯示幕長度的一半時,以人臉中心位置為中心,在距離人臉中心位置的左邊及右邊各顯示幕長度的一半處做人物圖片的寬邊的平行線,沿著平行線剪切掉超出顯示幕部分的人物圖片,該近距離寬邊為人臉中心位置到人物圖片左寬邊及右寬邊距離較近的一邊;在人臉中心位置近距離寬邊的距離小於顯示幕長度的一半時,以到近距離寬邊的距離為顯示幕長度處做寬邊的平行線,沿著平行線剪切掉超出顯示幕部分的人物圖片;在人物圖片的長寬比小於顯示幕的長寬比時,放大/縮小人物圖片至人物圖片的長度等於顯示幕的長度,在人臉中心位置到近距離長邊的距離大於顯示幕寬度的一半時,以人臉中心位置為中心,在距離人臉中心位置的上邊及下邊各顯示幕寬度的一半處做人物圖片的長邊的平行線,沿著平行線剪切掉超出顯示幕的部分人物圖片,該近距離長邊為人臉中心位置到人物圖片上方 長邊及下方長邊距離較近的一邊;在人臉中心位置到近距離長邊的距離小於顯示幕寬度的一半時,以到近距離長邊的距離為顯示幕寬度處做長邊平行線,沿著平行線剪切掉超出顯示幕的部分人物圖片;一圖片顯示模組,用於整體顯示剪切後的人物圖片於顯示單元。In order to achieve the above object, the present invention provides a display device for adjusting a picture, the display device comprising a display unit, a reading module, and the reading The module is used to read the image to be displayed, and a comparison module is used to obtain the display ratio of a picture and the ratio of the display screen of the display unit, which is consistent with the ratio of the display ratio to the display screen; The group adjusts the picture when the display ratio of the picture is inconsistent with the display screen ratio, and includes: a picture recognition sub-module for identifying whether the picture to be displayed is a character picture; and a face recognition sub-module for identifying the picture of the person The position of the face and the number of faces; a center determining sub-module for determining the center position of the face in the character picture according to the recognized face position and the number of faces; a picture cutting sub-module When the aspect ratio of the character picture is larger than the aspect ratio of the display screen, the width of the enlarged/reduced person picture to the character picture is equal to the width of the display screen, and the distance from the center position of the face to the wide side of the close distance is greater than the length of the display screen. In the middle of the face, the center line of the face is centered, and the parallel line of the wide side of the character picture is made at the left and right sides of the display screen at the center of the face. The line cuts off the picture of the person beyond the display screen. The close-width wide side is the side closer to the left side of the face and the right wide side of the person's face; the distance from the center of the face to the wide side of the face When it is less than half of the length of the display screen, the distance to the wide side of the display is the parallel line of the wide side of the display screen length, and the picture of the person beyond the display screen is cut along the parallel line; the aspect ratio of the picture of the person When the aspect ratio of the screen is smaller than the aspect ratio of the display screen, the length of the zoomed/reduced character image to the character image is equal to the length of the display screen. When the distance from the center of the face to the long distance of the close distance is greater than half of the width of the display screen, the center position of the face is used. For the center, the parallel line of the long side of the character picture is made at half of the width of each of the upper and lower sides of the face at the center of the face, and a part of the character picture beyond the display screen is cut along the parallel line. For the center of the face to the top of the character picture The long side and the lower side of the long side are closer to each other; when the distance from the center of the face to the long side of the close distance is less than half of the width of the display screen, the distance to the long side of the close distance is the long side parallel line at the width of the display screen. , cutting off a part of the character picture beyond the display screen along the parallel line; a picture display module for displaying the cut picture of the person in the display unit as a whole.

本發明還提供一種對圖片進行調整的方法,其包括以下步驟:讀取待顯示的圖片;獲取圖片的顯示比例以及顯示單元的顯示幕比例,比對顯示比例與顯示幕比例是否一致;在圖片的長寬比與顯示幕的長寬比不一致時,對圖片進行調整;識別該圖片是否為人物圖片;在該圖片為人物圖片時,識別人物圖片中人臉的位置以及人臉的個數;依據人臉的位置以及人臉的個數確定人物圖片中人臉的中心位置;在人物圖片的長寬比大於顯示幕的長寬比時,包括:放大/縮小人物圖片至人物圖片的寬度等於顯示幕的寬度;比對人臉中心位置到近距離寬邊的距離是否大於顯示幕長度的一半時,該近距離寬邊為人臉中心位置到人物圖片左寬邊及右寬邊距離較近的一邊;在人臉中心位置到近距離寬邊的距離大於顯示幕長度的一半時,以人臉中心位置為中心,在距離人臉中心位置的左邊及右邊各顯示幕長度的一半處做人物圖片的寬邊的平行線,沿著平行線剪切掉超出顯示幕部分的人物圖片;在人臉中心位置近距離寬邊的距離小於顯示幕長度的一半時,以到近距離寬邊的距離為顯示幕長度處做寬邊的平行線,沿著平行線剪切掉超出顯示幕部分的人物圖片;整體顯示剪切後的圖片;在圖片的長寬比小於顯示幕的長 寬比時,包括:放大/縮小人物圖片至人物圖片的長度等於顯示幕的長度;比對人臉中心位置到近距離長邊的距離是否大於顯示幕寬度的一半,該近距離長邊為人臉中心位置到人物圖片上方長邊及下方長邊距離較近的一邊;在人臉中心位置到近距離長邊的距離大於顯示幕寬度的一半時,以人臉中心位置為中心,在距離人臉中心位置的上邊及下邊各顯示幕寬度的一半處做人物圖片的長邊的平行線,沿著平行線剪切掉超出顯示幕的部分人物圖片;在人臉中心位置到近距離長邊的距離小於顯示幕寬度的一半時,以到近距離長邊的距離為顯示幕寬度處做長邊平行線,沿著平行線剪切掉超出顯示幕的部分人物圖片;整體顯示剪切後的人物圖片。The present invention also provides a method for adjusting a picture, comprising the steps of: reading a picture to be displayed; obtaining a display ratio of the picture and a display screen ratio of the display unit, and comparing the display ratio with the display screen ratio; When the aspect ratio is inconsistent with the aspect ratio of the display screen, the picture is adjusted; whether the picture is a person picture; and when the picture is a person picture, the position of the face in the picture of the person and the number of faces are recognized; The center position of the face in the character picture is determined according to the position of the face and the number of faces; when the aspect ratio of the person picture is larger than the aspect ratio of the display screen, the method includes: enlarging/reducing the width of the person picture to the width of the person picture is equal to The width of the display screen; whether the distance from the center position of the face to the wide side of the close distance is greater than half of the length of the display screen, the close wide side is the distance from the center of the face to the left wide side and the right wide side of the character picture. One side; when the distance from the center of the face to the wide side of the close is greater than half the length of the display, centering on the center of the face, in the distance from the face The left side of the heart position and the half of the length of each display screen are parallel lines of the wide side of the character picture, and the picture of the person beyond the display screen portion is cut along the parallel line; the distance between the wide side of the face at the center of the face is smaller than When half of the length of the screen is displayed, the distance to the wide side of the display is the parallel line of the wide side of the display screen length, and the picture of the person beyond the display screen portion is cut along the parallel line; the cut picture is displayed as a whole; The aspect ratio of the picture is smaller than the length of the display screen The width ratio includes: enlarging/reducing the length of the person picture to the length of the character picture is equal to the length of the display screen; whether the distance from the center position of the face to the long side of the close distance is greater than half of the width of the display screen, the long distance of the short distance is a person The center of the face is located closer to the long side of the figure and the longer side of the lower side; when the distance from the center of the face to the long side of the close is greater than half of the width of the display, the center of the face is centered at the distance At the upper and lower sides of the face center position, the parallel line of the long side of the character picture is made at half of the width of the display screen, and the part of the character beyond the display screen is cut along the parallel line; at the center of the face to the long side of the close distance When the distance is less than half of the width of the display screen, the distance to the long side of the close distance is the long side parallel line at the width of the display screen, and the part of the character beyond the display screen is cut along the parallel line; the overall displayed character is cut. image.

相較于現有技術,本發明可在圖片的顯示比例與顯示幕的比例不一致時,對於人物圖片,根據識別到的人臉位置對人物圖片進行調整,儘量避免人物圖片中的人物不被剪切掉。Compared with the prior art, the present invention can adjust the character picture according to the recognized face position for the person picture when the display ratio of the picture is inconsistent with the ratio of the display screen, and try to prevent the character in the character picture from being cut. Drop it.

如圖1所示,為對圖片進行調整的顯示裝置硬體結構圖。該顯示裝置包括一介面100、一存儲單元200、一處理單元300、一顯示單元400。該介面100用於連接外部的存儲裝置(圖中未示),如數碼相機、U盤、移動硬碟,拍照手機等可存儲圖片的裝置。該介面100可為USB介面,1394介面等。該存儲單元200用於存儲顯示裝置中的圖片。該顯示單元400用於對顯示圖片。As shown in FIG. 1, it is a hardware structure diagram of a display device for adjusting a picture. The display device includes an interface 100, a storage unit 200, a processing unit 300, and a display unit 400. The interface 100 is used to connect an external storage device (not shown), such as a digital camera, a USB flash drive, a mobile hard disk, a camera phone, and the like, which can store pictures. The interface 100 can be a USB interface, a 1394 interface, or the like. The storage unit 200 is for storing pictures in the display device. The display unit 400 is for displaying a picture.

該處理單元300包括一讀取模組310、一比對模組320、一圖片調整模組330及一圖片顯示模組340。該讀取模組310用於從存儲單元100或者外部存儲裝置中讀取需要顯示的圖片。該比對模組320用於獲取待顯示圖片的顯示比例及顯示單元的顯示幕比例,並將圖片的顯示比例及顯示單元400的顯示幕比例進行比對,判斷該顯示裝置是否可以整體顯示該圖片,如果圖片的顯示比例與顯示單元400的顯示幕比例一致,則顯示該圖片,若不一致,則由圖片調整模組330對圖片調整後顯示。The processing unit 300 includes a reading module 310, a comparison module 320, a picture adjustment module 330, and a picture display module 340. The reading module 310 is configured to read a picture to be displayed from the storage unit 100 or an external storage device. The comparison module 320 is configured to obtain a display ratio of the to-be-displayed image and a display screen ratio of the display unit, and compare the display ratio of the image with the display screen ratio of the display unit 400, and determine whether the display device can display the overall The picture is displayed if the display ratio of the picture matches the display screen ratio of the display unit 400. If not, the picture adjustment module 330 adjusts the picture and displays it.

該圖片調整模組330包括一圖片識別子模組332、一人臉識別子模組333、一中心確定子模組334及一圖片剪切子模組335。該圖片識別子模組332用於識別待顯示的圖片是否含有人物,如果一圖片含有人物則為人物圖片。該人臉識別子模組333用於識別人物圖片中人臉的位置以及人臉的個數。本實施方式中,在檢測人臉的位置時,優先使用基於Adaboost演算法的人臉檢測技術,但其他人臉偵測方法也可以使用。該中心確定子模組334用於根據圖片中識別出的人臉位置以及人臉個數確定人臉的中心位置。在此,當人臉個數為一個時,則根據識別到的人臉的輪廓確定人臉的中心位置;當人臉的個數為多個時,則首先確定每個人臉的中心位置,將每個人臉的中心位置連接,當人臉的個數為兩個時,則取連接線的中心點作為人臉中心位置,當人臉的個數為三個或三個以上時,則求出各連接線所形成區域的中心點作為人臉中心位置。The picture adjustment module 330 includes a picture recognition sub-module 332, a face recognition sub-module 333, a center determination sub-module 334, and a picture-cut sub-module 335. The picture recognition sub-module 332 is configured to identify whether the picture to be displayed contains a character, and if a picture contains a character, it is a character picture. The face recognition sub-module 333 is configured to identify the position of the face in the person's picture and the number of faces. In the present embodiment, when detecting the position of a face, a face detection technique based on the Adaboost algorithm is preferentially used, but other face detection methods may be used. The center determining sub-module 334 is configured to determine the center position of the face according to the location of the face recognized in the picture and the number of faces. Here, when the number of faces is one, the center position of the face is determined according to the contour of the recognized face; when the number of faces is plural, the center position of each face is first determined, The center position of each face is connected. When the number of faces is two, the center point of the connection line is taken as the center position of the face. When the number of faces is three or more, the solution is obtained. The center point of the area formed by each connecting line serves as the center position of the face.

該圖片剪切子模組334用於根據所確定的人臉中心位置對圖片進行剪切處理,以使在剪切圖片時,人臉部分儘量不被剪切掉。The picture cutout sub-module 334 is configured to cut the picture according to the determined face center position, so that the face part is not cut off as much as possible when the picture is cut.

圖2a為顯示幕的示意圖,其長為a,寬為b。Figure 2a is a schematic view of a display screen having a length a and a width b.

圖2b及圖2c為圖片的長寬比大於顯示幕的長寬比時,對圖片進行剪切時的示意圖。首先該圖片剪切子模組335將圖片放大/縮小至圖片的寬於顯示幕的寬相等,由於圖片的長寬比大於顯示幕的長寬比,故圖片的長大於顯示幕的長,即需對橫向的圖片進行剪切。設人臉識別子模組333所識別的人臉的中心位置為點E,點E到左右兩邊其中距離較短一邊(下稱短距離邊)的距離為c,如果c>a/2,則如圖2b所示,該圖片剪切子模組334以E點為中心,在距離其左邊及右邊各a/2處做圖片的寬邊的平行線,如圖中虛線所示,則沿著虛線剪掉圖片超出顯示幕的部分;如果c<a/2,則如圖2c所示,該圖片剪切子模組334以到距離短邊的距離為a處做距離短邊的平行線,如圖中虛線所示,則沿著虛線剪掉圖片超出顯示幕的部分。2b and 2c are schematic views of the picture when the aspect ratio of the picture is larger than the aspect ratio of the display screen. First, the picture cutout sub-module 335 enlarges/reduces the picture to be wider than the width of the display screen. Since the aspect ratio of the picture is larger than the aspect ratio of the display screen, the length of the picture is longer than the length of the display screen, that is, You need to cut the horizontal picture. The center position of the face recognized by the face recognition sub-module 333 is point E, and the distance from the point E to the left and right sides of the left side (hereinafter referred to as a short distance side) is c, if c>a/2, then As shown in FIG. 2b, the picture cutout sub-module 334 is centered on the E point, and is a parallel line of the wide side of the picture at a/2 degrees from the left and right sides thereof, as indicated by the dotted line in the figure, along the dotted line. Cut off the part of the picture beyond the display screen; if c<a/2, as shown in Fig. 2c, the picture cutting sub-module 334 makes a parallel line from the short side to a distance from the short side, such as As indicated by the dotted line in the figure, the image is cut along the dotted line beyond the portion of the display.

圖2d及圖2e為圖片的長寬比小於顯示幕的長寬比時,對圖片進行剪切時的示意圖。首先該圖片剪切子模組334將圖片放大/縮小至圖片的長與顯示幕的長相等,由於圖片的長寬比小於顯示幕的長寬比,故圖片的寬大於顯示幕的寬,即需對縱向的圖片進行剪切。設人臉識別子模組333所識別到的人臉的中心位置為點E,點E到上下兩邊其中距離較短一邊(下稱短距離邊)的距離為d,如果d>b/2,則如圖2d所示,圖片剪切子 模組334以E點為中心,在距離其上邊及下邊各b/2處做圖片的長邊的平行線,如圖中虛線所示,則沿著虛線剪掉圖片超出顯示幕的部分;如果d<b/2,則如圖2e所示,圖片剪切子模組334以到短距離邊的距離為b處做長邊的平行線,如圖中虛線所示,則沿著虛線剪掉圖片超出顯示幕的部分。2d and 2e are schematic views of the picture when the aspect ratio of the picture is smaller than the aspect ratio of the display screen. First, the picture cutting sub-module 334 enlarges/reduces the picture to the length of the picture equal to the length of the display screen. Since the aspect ratio of the picture is smaller than the aspect ratio of the display screen, the width of the picture is larger than the width of the display screen, that is, The vertical picture needs to be cut. The center position of the face recognized by the face recognition sub-module 333 is point E, and the distance from the point E to the upper and lower sides of the upper side (hereinafter referred to as a short distance side) is d, if d>b/2, then As shown in Figure 2d, the picture is cut The module 334 is centered on the E point, and is a parallel line of the long side of the picture at the upper and lower b/2 points, as shown by the dotted line in the figure, and the part of the picture is cut along the dotted line beyond the display screen; d<b/2, as shown in FIG. 2e, the picture-cutting sub-module 334 cuts the parallel line of the long side with the distance to the short-distance side as b, as shown by the dotted line in the figure, and cuts along the dotted line. The picture is beyond the portion of the display.

在另一實施方式中,該圖片調整模組330還包括一形式識別子模組331,該形式識別子模組331用於根據圖片的長和寬(平行于水準方向為長,垂直于水準方向的為寬)確定其顯示形式,在此定義兩種顯示形式:當該圖片的長度大於圖片寬度時,稱該圖片為橫式圖片,當該圖片的長度小於圖片寬度時,稱其為直式圖片。在此當圖片為直式圖片時,將中心確定子模組334識別到的人臉的中心位置下移一預定距離後,再對圖片進行剪切處理。In another embodiment, the picture adjustment module 330 further includes a form recognition sub-module 331 for using the length and width of the picture (long parallel to the horizontal direction, perpendicular to the horizontal direction) Width) determines its display form. Two display forms are defined here: when the length of the picture is larger than the width of the picture, the picture is called a horizontal picture, and when the length of the picture is smaller than the width of the picture, it is called a straight picture. Here, when the picture is a straight picture, the center position of the face recognized by the center determining sub-module 334 is moved downward by a predetermined distance, and then the picture is cut.

剪切後的圖片可通過圖片顯示模組340顯示。The cut picture can be displayed by the picture display module 340.

如圖3所示,為對圖片進行調整的方法流程圖。首先讀取模組310從存儲單元100或者外部存儲裝置中讀取一需要顯示的圖片(步驟S10)。As shown in FIG. 3, it is a flowchart of a method for adjusting a picture. First, the reading module 310 reads a picture to be displayed from the storage unit 100 or an external storage device (step S10).

比對模組320獲取一圖片的顯示比例以及顯示單元的顯示幕比例(步驟S20)。The comparison module 320 acquires the display ratio of a picture and the display screen ratio of the display unit (step S20).

比對模組320比對獲取到的圖片的顯示比例與顯示單元的顯示幕比例是否一致(步驟S30)。The comparison module 320 compares the display ratio of the acquired image with the display screen ratio of the display unit (step S30).

若比對的結果一致,則圖片顯示模組340通過顯示單元400整體顯示該圖片(步驟S40)。If the results of the comparison match, the picture display module 340 displays the picture as a whole through the display unit 400 (step S40).

若比對的結果不一致,則圖片調整模組330對圖片進行調整後顯示,調整過程包括以下步驟:圖片識別子模組332識別待顯示的圖片是否為人物圖片(步驟S50)。If the results of the comparison are inconsistent, the picture adjustment module 330 displays the picture after adjustment, and the adjustment process includes the following steps: the picture recognition sub-module 332 identifies whether the picture to be displayed is a person picture (step S50).

若該圖片不是人物圖片,則對其進行一般的處理方式(步驟S60)。If the picture is not a person picture, it is generally processed (step S60).

若該圖片為人物圖片,人臉識別子模組333識別人物圖片中人臉的位置以及人臉的個數(步驟S70)。If the picture is a person picture, the face recognition sub-module 333 identifies the position of the face in the person picture and the number of faces (step S70).

中心確定子模組334依據識別到的人臉位置以及人臉個數確定人物圖片中人臉的中心位置(步驟S80)。The center determination sub-module 334 determines the center position of the face in the person picture based on the recognized face position and the number of faces (step S80).

圖片剪切子模組335根據識別的人臉中心位置對人物圖片進行剪切,具體剪切過程可參考圖3a-3d的描述(步驟S90)。The picture cutout sub-module 335 cuts the person picture according to the recognized face center position, and the specific cutting process can refer to the description of FIGS. 3a-3d (step S90).

圖片顯示模組340整體顯示剪切後的人物圖片於顯示單元上(步驟S100)。The picture display module 340 displays the cut picture of the person on the display unit as a whole (step S100).

在本發明的另一實施方法中,還包括以下步驟:當形式識別子模組331識別圖片為直式圖片時,該中心確定模組334將確定的人臉中心位置下移一預定距離,然後圖片剪切子模組335以下移後的位置作為人臉中心位置對該直式圖片進行剪切處理。In another implementation manner of the present invention, the method further includes the following steps: when the form recognition sub-module 331 identifies that the picture is a straight picture, the center determining module 334 moves the determined face center position by a predetermined distance, and then the picture The position of the cutting sub-module 335 after the movement is cut as the center position of the face to cut the straight picture.

接口‧‧‧100Interface ‧‧100

存儲單元‧‧‧200Storage unit ‧‧200

處理單元‧‧‧300Processing unit ‧ ‧ 300

讀取模組‧‧‧310Reading module ‧‧ ‧310

比對模組‧‧‧320Comparison module ‧ ‧ 320

圖片調整模組‧‧‧330Picture Adjustment Module ‧‧330

形式識別子模組‧‧‧331Form recognition sub-module ‧‧331

圖片識別子模組‧‧‧332Picture recognition sub-module ‧‧ 332

人臉識別子模組‧‧‧333Face recognition sub-module ‧‧ 333

中心確定子模組‧‧‧334Center to determine the sub-module ‧ ‧ 334

圖片剪切子模組‧‧‧335Picture cutting submodule ‧ ‧ 335

圖片顯示模組‧‧‧340Picture display module ‧ ‧ 340

顯示單元‧‧‧400Display unit ‧‧400

讀取待顯示的圖片‧‧‧S10Read the picture to be displayed ‧‧‧S10

獲取圖片的顯示比例以及顯示單元的屏幕比例‧‧‧S20Get the aspect ratio of the image and the screen ratio of the display unit ‧‧‧S20

比對顯示比例與屏幕比例是否一致‧‧‧S30Compare the display ratio to the screen ratio. ‧‧‧S30

直接顯示‧‧‧S40Direct display ‧‧‧S40

識別該圖片是否為人物圖片‧‧‧S50Identify if the picture is a character picture ‧‧‧S50

一般處理方式‧‧‧S60General treatment ‧‧‧S60

識別人物圖片中人臉的位置以及人臉的個數‧‧‧S70Identify the position of the face in the person's picture and the number of faces ‧‧‧S70

依據人臉位置以及人臉個數確定人臉的中心位置‧‧‧S80Determine the center position of the face based on the position of the face and the number of faces ‧‧S80

調整人物圖片,進行剪切處理‧‧‧S90Adjust the picture of the person and cut it. ‧‧S90

整體顯示剪切後的人物圖片‧‧‧S100The overall picture of the person after the cut is displayed.‧‧S100

圖1為對圖片進行調整的顯示裝置硬體結構圖。FIG. 1 is a diagram showing a hardware structure of a display device for adjusting a picture.

圖2a-2e為一實施例中對人物圖片進行剪切的過程示意圖。2a-2e are schematic diagrams showing the process of cutting a person's picture in an embodiment.

圖3對人物圖片進行調整的方法的流程圖。Figure 3 is a flow chart of a method of adjusting a person picture.

讀取待顯示的圖片‧‧‧S10Read the picture to be displayed ‧‧‧S10

獲取圖片的顯示比例以及顯示單元的屏幕比例‧‧‧S20Get the aspect ratio of the image and the screen ratio of the display unit ‧‧‧S20

比對顯示比例與屏幕比例是否一致‧‧‧S30Compare the display ratio to the screen ratio. ‧‧‧S30

直接顯示‧‧‧S40Direct display ‧‧‧S40

識別該圖片是否為人物圖片‧‧‧S50Identify if the picture is a character picture ‧‧‧S50

一般處理方式‧‧‧S60General treatment ‧‧‧S60

識別人物圖片中人臉的位置以及人臉的個數‧‧‧S70Identify the position of the face in the person's picture and the number of faces ‧‧‧S70

依據人臉位置以及人臉個數確定人臉的中心位置‧‧‧S80Determine the center position of the face based on the position of the face and the number of faces ‧‧S80

調整人物圖片,進行剪切處理‧‧‧S90Adjust the picture of the person and cut it. ‧‧S90

整體顯示剪切後的人物圖片‧‧‧S100The overall picture of the person after the cut is displayed.‧‧S100

Claims (6)

一種對圖片進行調整的顯示裝置,該顯示裝置包括一顯示單元,一讀取模組,該讀取模組用於讀取待顯示的圖片,其改良在於,該顯示裝置還包括:一比對模組,用於獲取一圖片的顯示比例以及顯示單元的顯示幕比例,比對該顯示比例與顯示幕比例是否一致;一圖片調整模組,當圖片的顯示比例與顯示幕比例不一致時,對圖片進行調整,包括:一圖片識別子模組,用於識別待顯示的圖片是是否含有人物,如果一圖片含有人物則為人物圖片;一人臉識別子模組,用於識別人物圖片中人臉的位置、人臉的個數;一中心確定子模組,用於依據識別到的人臉位置及人臉個數確定人物圖片中人臉的中心位置;一圖片剪切子模組,在人物圖片的長寬比大於顯示幕的長寬比時,放大/縮小人物圖片至人物圖片的寬度等於顯示幕的寬度,在人臉中心位置到近距離寬邊的距離大於顯示幕長度的一半時,以人臉中心位置為中心,在距離人臉中心位置的左邊及右邊各顯示幕長度的一半處做人物圖片的寬邊的平行線,沿著平行線剪切掉超出顯示幕部分的人物圖片,該近距離寬邊為人臉中心位置到人物圖片左寬邊及右寬邊距離較近的一邊;在人臉中心位置近距離寬邊的距離小於顯示幕長度的一半時,以到近距離寬邊的距離為顯示幕長度處做寬邊的 平行線,沿著平行線剪切掉超出顯示幕部分的人物圖片;在人物圖片的長寬比小於顯示幕的長寬比時,放大/縮小人物圖片至人物圖片的長度等於顯示幕的長度,在人臉中心位置到近距離長邊的距離大於顯示幕寬度的一半時,以人臉中心位置為中心,在距離人臉中心位置的上邊及下邊各顯示幕寬度的一半處做人物圖片的長邊的平行線,沿著平行線剪切掉超出顯示幕的部分人物圖片,該近距離長邊為人臉中心位置到人物圖片上方長邊及下方長邊距離較近的一邊;在人臉中心位置到近距離長邊的距離小於顯示幕寬度的一半時,以到近距離長邊的距離為顯示幕寬度處做長邊平行線,沿著平行線剪切掉超出顯示幕的部分人物圖片;一圖片顯示模組,用於整體顯示剪切後的人物圖片於顯示單元。A display device for adjusting a picture, the display device comprising a display unit, a reading module, the reading module for reading a picture to be displayed, wherein the display device further comprises: a comparison The module is configured to obtain a display ratio of a picture and a display screen ratio of the display unit, which is consistent with the display ratio and the display screen ratio; and a picture adjustment module, when the display ratio of the picture is inconsistent with the display screen ratio, The image is adjusted, including: a picture recognition sub-module, which is used to identify whether the picture to be displayed contains a character, and if a picture contains a character, it is a character picture; a face recognition sub-module is used to identify the position of the face in the picture of the person The number of faces; a center determining sub-module for determining the center position of the face in the character picture according to the recognized face position and the number of faces; a picture cutting sub-module, in the picture of the character When the aspect ratio is larger than the aspect ratio of the display screen, the width of the zoomed/reduced character image to the character image is equal to the width of the display screen, and the center position of the face to the wide side of the close distance When the distance is greater than half of the length of the display screen, center the position of the face, and make the parallel lines of the wide sides of the figure of the characters on the left and right sides of the display screen at the distance from the center of the face, and cut along the parallel lines. Cut off the picture of the person beyond the display screen. The short side of the face is the side closer to the left side of the face and the right side of the picture. The distance between the center of the face and the wide side is smaller than the display screen. At half the length, the width to the wide side of the display is wide at the length of the display screen. Parallel lines, cut off the picture of the person beyond the display screen along the parallel line; when the aspect ratio of the character picture is smaller than the aspect ratio of the display screen, the length of the enlarged/reduced person picture to the character picture is equal to the length of the display screen, When the distance from the center of the face to the long side of the close distance is greater than half of the width of the display screen, the length of the character image is made at the center of the face and at half the width of each of the upper and lower sides of the face. Parallel lines on the sides, cut off part of the picture of the person beyond the display screen along the parallel line, the long side of the close distance is the side of the face from the center of the person's face to the long side of the figure and the distance from the long side of the figure; in the center of the face When the distance from the position to the long side of the close distance is less than half of the width of the display screen, the distance to the long side of the close distance is a long parallel line at the width of the display screen, and a part of the character picture beyond the display screen is cut along the parallel line; A picture display module is configured to display the cut picture of the person in the display unit as a whole. 如申請專利範圍第1項所述的對圖片進行調整的顯示裝置,其中:該圖片調整模組還包含一形式識別子模組,該形式識別子模組根據圖片的長寬比確定圖片的顯示形式,當該圖片為直式圖片時,將人臉中心位置下移一預設的距離後,再由該圖片剪切子模組對該人物圖片進行剪切處理。The display device for adjusting a picture according to the first aspect of the invention, wherein the picture adjustment module further comprises a form identification sub-module, wherein the form identification sub-module determines the display form of the picture according to the aspect ratio of the picture, When the picture is a straight picture, the center position of the face is moved downward by a preset distance, and then the picture is cut by the picture cutting sub-module. 如申請專利範圍第1項所述的對圖片進行調整的顯示裝置,其中:該中心確定子模組在人臉的個數為一個時,則根據識別到的人臉輪廓確定人臉的中心位置,在人臉的個數為多個時,則首先確定每個人臉的中心位置,將每個人臉的中心位置連接,當人臉的個數為兩個時,則取連接線的中心點 作為人臉中心位置,當人臉的個數為三個或三個以上時,則求出各連接線所形成區域的中心點作為人臉中心位置。The display device for adjusting a picture according to claim 1, wherein: the center determining sub-module determines the center position of the face according to the recognized face contour when the number of faces is one; When the number of faces is plural, the center position of each face is first determined, and the center position of each face is connected. When the number of faces is two, the center point of the connection line is taken. As the center position of the face, when the number of faces is three or more, the center point of the area formed by each connection line is obtained as the face center position. 一種對圖片進行調整的方法,該方法包括如下步驟:讀取待顯示的圖片;獲取圖片的顯示比例以及顯示單元的顯示幕比例,比對圖片的顯示比例與顯示幕比例是否一致;在圖片的顯示比例與顯示幕的比例不一致時,對圖片進行調整,調整過程包括如下步驟:識別該圖片是否含有人物,如果一圖片含有人物則為人物圖片;識別人物圖片中人臉的位置以及人臉的個數;依據人臉的位置以及人臉的個數確定人物圖片中人臉的中心位置;在人物圖片的長寬比大於顯示幕的長寬比時,放大/縮小人物圖片至人物圖片的寬度等於顯示幕的寬度;比對人臉中心位置到近距離寬邊的距離是否大於顯示幕長度的一半時,該近距離寬邊為人臉中心位置到人物圖片左寬邊及右寬邊距離較近的一邊;在人臉中心位置到近距離寬邊的距離大於顯示幕長度的一半時,以人臉中心位置為中心,在距離人臉中心位置的左邊及右邊各顯示幕長度的一半處做人物圖片的寬邊的平行線,沿著平行線剪切掉超出顯示幕部分的人物圖片;在人臉中心位置近距離寬邊的距離小於顯示幕長度的一半 時,以到近距離寬邊的距離為顯示幕長度處做寬邊的平行線,沿著平行線剪切掉超出顯示幕部分的人物圖片;在人物圖片的長寬比小於顯示幕的長寬比時,包括:放大/縮小人物圖片至人物圖片的長度等於顯示幕的長度;比對人臉中心位置到近距離長邊的距離是否大於顯示幕寬度的一半,該近距離長邊為人臉中心位置到人物圖片上方長邊及下方長邊距離較近的一邊;在人臉中心位置到近距離長邊的距離大於顯示幕寬度的一半時,以人臉中心位置為中心,在距離人臉中心位置的上邊及下邊各顯示幕寬度的一半處做人物圖片的長邊的平行線,沿著平行線剪切掉超出顯示幕的部分人物圖片;在人臉中心位置到近距離長邊的距離小於顯示幕寬度的一半時,以到近距離長邊的距離為顯示幕寬度處做長邊平行線,沿著平行線剪切掉超出顯示幕的部分人物圖片;整體顯示剪切後的人物圖片。A method for adjusting a picture, the method comprising the steps of: reading a picture to be displayed; obtaining a display ratio of the picture and a display screen ratio of the display unit, comparing the display ratio of the comparison picture with the ratio of the display screen; When the display ratio is inconsistent with the ratio of the display screen, the picture is adjusted. The adjustment process includes the following steps: identifying whether the picture contains a character, and if the picture contains a character, the picture of the person; identifying the position of the face in the picture of the person and the face of the person The number of the face is determined according to the position of the face and the number of faces; when the aspect ratio of the character image is larger than the aspect ratio of the display screen, the width of the person image to the width of the character image is enlarged/reduced It is equal to the width of the display screen; when the distance from the center position of the face to the wide side of the close distance is greater than half of the length of the display screen, the close wide side is the distance from the center of the face to the left wide side and the right wide side of the character picture. Near side; when the distance from the center of the face to the wide side of the close is greater than half the length of the display, the center of the face Set as the center, make the parallel line of the wide side of the character picture at half the length of the display screen on the left and right sides of the face center position, cut off the picture of the person beyond the display part along the parallel line; at the center of the face The distance from the wide side of the position is less than half the length of the display screen When the distance to the wide side of the close distance is the parallel line of the wide side of the display screen length, the picture of the person beyond the display screen portion is cut along the parallel line; the aspect ratio of the character picture is smaller than the length and width of the display screen. The ratio includes: enlarging/reducing the character picture to the length of the character picture is equal to the length of the display screen; comparing the distance from the center position of the face to the long side of the close distance is greater than half of the width of the display screen, the long distance of the close side is the face The center position is closer to the long side of the character picture and the longer side of the lower side; when the distance from the center of the face to the long side of the close distance is greater than half of the width of the display screen, the center of the face is centered at the distance from the face. At the upper and lower sides of the center position, the parallel line of the long side of the character picture is made at half the width of the display screen, and the part of the character beyond the display screen is cut along the parallel line; the distance from the center of the face to the long side of the close distance When the width is less than half of the width of the display screen, the distance to the long side of the display is the long side parallel line at the width of the display screen, and the part of the character beyond the display screen is cut along the parallel line; The body displays the picture of the person after the cut. 如申請專利範圍第4項所述的一種對圖片進行調整方法,其中,還包括步驟:根據圖片的長寬比確定圖片的顯示形式,當該圖片為直式人物圖片時,將人臉中心位置下移一預設的距離後,再對人物圖片進行剪切處理。A method for adjusting a picture according to claim 4, further comprising the steps of: determining a display form of the picture according to an aspect ratio of the picture, and when the picture is a straight figure picture, the face center position is used. After moving down a preset distance, the person's picture is cut. 如申請專利範圍第4項所述的一種對圖片進行調整方法,其中,在確定人物圖片中人臉的中心位置的步驟中,在人臉的個數為一個時,則根據識別到的人臉輪廓確定人臉的中心位置,在人臉的個數為多個時,則首先確定每個人臉的中心 位置,將每個人臉的中心位置連接,當人臉的個數為兩個時,則取連接線的中心點作為人臉中心位置,當人臉的個數為三個或三個以上時,則求出各連接線所形成區域的中心點作為人臉中心位置。A method for adjusting a picture according to claim 4, wherein, in the step of determining a center position of a face in a person picture, when the number of faces is one, according to the recognized face The contour determines the center position of the face. When the number of faces is plural, the center of each face is first determined. Position, the center position of each face is connected. When the number of faces is two, the center point of the connection line is taken as the center position of the face, and when the number of faces is three or more, Then, the center point of the area formed by each connecting line is obtained as the center position of the face.
TW97142193A 2008-10-31 2008-10-31 Display device and method for adjusting pictures TWI385593B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW97142193A TWI385593B (en) 2008-10-31 2008-10-31 Display device and method for adjusting pictures

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW97142193A TWI385593B (en) 2008-10-31 2008-10-31 Display device and method for adjusting pictures

Publications (2)

Publication Number Publication Date
TW201017577A TW201017577A (en) 2010-05-01
TWI385593B true TWI385593B (en) 2013-02-11

Family

ID=44830910

Family Applications (1)

Application Number Title Priority Date Filing Date
TW97142193A TWI385593B (en) 2008-10-31 2008-10-31 Display device and method for adjusting pictures

Country Status (1)

Country Link
TW (1) TWI385593B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060204054A1 (en) * 2003-06-26 2006-09-14 Eran Steinberg Digital image processing composition using face detection information
TW200632787A (en) * 2005-03-14 2006-09-16 Benq Corp Methods and apparatuses for video encoding
US20060285034A1 (en) * 2005-06-15 2006-12-21 Canon Kabushiki Kaisha Image Display Method and Image Display Apparatus
US20060284810A1 (en) * 2005-06-15 2006-12-21 Canon Kabushiki Kaisha Image Display Method and Image Display Apparatus
TW200813881A (en) * 2006-09-08 2008-03-16 Altek Corp Image capture device for changing the scale of captured object and the method thereof

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060204054A1 (en) * 2003-06-26 2006-09-14 Eran Steinberg Digital image processing composition using face detection information
TW200632787A (en) * 2005-03-14 2006-09-16 Benq Corp Methods and apparatuses for video encoding
US20060285034A1 (en) * 2005-06-15 2006-12-21 Canon Kabushiki Kaisha Image Display Method and Image Display Apparatus
US20060284810A1 (en) * 2005-06-15 2006-12-21 Canon Kabushiki Kaisha Image Display Method and Image Display Apparatus
TW200813881A (en) * 2006-09-08 2008-03-16 Altek Corp Image capture device for changing the scale of captured object and the method thereof

Also Published As

Publication number Publication date
TW201017577A (en) 2010-05-01

Similar Documents

Publication Publication Date Title
KR100556856B1 (en) Screen control method and apparatus in mobile telecommunication terminal equipment
CN101685620B (en) Display device capable of adjusting image and image adjusting method
KR101760109B1 (en) Method and device for region extraction
US8463029B2 (en) Face and head detection
TW200935358A (en) Electronic devices that pan/zoom displayed sub-area within video frames in response to movement therein
WO2019128101A1 (en) Projection region-adaptive dynamic projection method, apparatus, and electronic device
WO2017032035A1 (en) Method and device for adjusting, and terminal
CN108965839B (en) Method and device for automatically adjusting projection picture
JP2006228199A (en) Face extraction device and semiconductor integrated circuit
US9854174B2 (en) Shot image processing method and apparatus
US10313596B2 (en) Method and apparatus for correcting tilt of subject ocuured in photographing, mobile terminal, and storage medium
US20170046813A1 (en) An apparatus and associated methods for image capture
JP2021103503A (en) Target detection method, circuit, visually impaired person auxiliary device, electronic apparatus, and medium
CN103501411A (en) Image shooting method and system
CN105654531B (en) Method and device for drawing image contour
JP3866600B2 (en) Image processing apparatus and image processing method
US20060221083A1 (en) Method for displaying an image assigned to a communication user at a communication terminal
JP2007233517A (en) Face detector, detection method and program
JP5504990B2 (en) Imaging apparatus, image processing apparatus, and program
US20130050530A1 (en) Image capturing device and image processing method thereof
JP2006318151A (en) Digital image display device and digital image display method
TWI385593B (en) Display device and method for adjusting pictures
TWI622018B (en) Method, device and system for editing video
US20150009314A1 (en) Electronic device and eye region detection method in electronic device
JP2016224930A (en) Method and device for bounding object in video

Legal Events

Date Code Title Description
MM4A Annulment or lapse of patent due to non-payment of fees