TWI523003B - Method for displaying object and electronic device - Google Patents

Method for displaying object and electronic device Download PDF

Info

Publication number
TWI523003B
TWI523003B TW103103608A TW103103608A TWI523003B TW I523003 B TWI523003 B TW I523003B TW 103103608 A TW103103608 A TW 103103608A TW 103103608 A TW103103608 A TW 103103608A TW I523003 B TWI523003 B TW I523003B
Authority
TW
Taiwan
Prior art keywords
size
distance information
facial images
distance
lens
Prior art date
Application number
TW103103608A
Other languages
Chinese (zh)
Other versions
TW201530532A (en
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 TW103103608A priority Critical patent/TWI523003B/en
Publication of TW201530532A publication Critical patent/TW201530532A/en
Application granted granted Critical
Publication of TWI523003B publication Critical patent/TWI523003B/en

Links

Description

物件顯示方法與電子裝置 Object display method and electronic device

本發明是有關於一種電子裝置,且特別是有關於一種物件顯示方法與電子裝置。 The present invention relates to an electronic device, and more particularly to an object display method and an electronic device.

隨著科技的日新月異,電子裝置搭載螢幕已經是非常普及的應用。此外,螢幕的尺寸也有大有小,以符合各種使用者的需求。一般來說,電子裝置會在螢幕上顯示使用者介面(User Interface,UI),以透過此使用者介面來與使用者互動。例如,在使用者介面上顯示應用程式捷徑與應用程式的操作畫面等等,以供使用者非常直覺地操作各種應用程式。 With the rapid development of technology, electronic devices equipped with screens have become very popular applications. In addition, the size of the screen is also large and small to meet the needs of various users. Generally, the electronic device displays a user interface (UI) on the screen to interact with the user through the user interface. For example, the application shortcuts and application operation screens are displayed on the user interface, etc., so that the user can operate various applications intuitively.

然而,對於使用者介面上的應用程式捷徑或應用程式列表等物件的顯示,雖然部份的電子裝置支援讓使用者自行選擇以大圖示或小圖示等方式來顯示不同尺寸的物件,但是使用者若沒有手動切換,則物件的顯示尺寸就不會被調整。此外,對於近視或者遠視的使用者來說,也沒有較為合適的物件尺寸調整機制。 However, for the display of applications such as application shortcuts or application lists on the user interface, although some electronic devices support the user to select objects of different sizes by means of large icons or small icons, but If the user does not manually switch, the display size of the object will not be adjusted. In addition, for users of myopia or hyperopia, there is no suitable object size adjustment mechanism.

本發明提供一種物件顯示方法與電子裝置,可根據鏡頭前方的人臉尺寸,來適應性地調整物件的顯示尺寸。 The invention provides an object display method and an electronic device, which can adaptively adjust the display size of an object according to the size of the face in front of the lens.

本發明提供一種物件顯示方法,此方法適用於具有螢幕與鏡頭的電子裝置。此方法包括:透過螢幕顯示物件,其中物件具有第一尺寸;透過鏡頭擷取多個人臉影像,並且判斷人臉影像是否符合取樣條件,其中每一人臉影像包括人臉;當人臉影像符合取樣條件時,獲得對應於人臉的距離資訊,並且根據距離資訊計算物件的第二尺寸;以及根據第一尺寸與第二尺寸來計算物件的第三尺寸,並且以第三尺寸顯示物件。 The invention provides an object display method, which is suitable for an electronic device having a screen and a lens. The method includes: displaying an object through a screen, wherein the object has a first size; capturing a plurality of facial images through the lens, and determining whether the facial image meets the sampling condition, wherein each facial image includes a human face; and when the facial image conforms to the sampling In the condition, the distance information corresponding to the face is obtained, and the second size of the object is calculated according to the distance information; and the third size of the object is calculated according to the first size and the second size, and the object is displayed in the third size.

從另一角度來看,本發明也提供一種電子裝置。此電子裝置包括螢幕、鏡頭及處理器。處理器耦接至螢幕與鏡頭,並且用以執行下列操作:透過螢幕顯示物件,其中物件具有第一尺寸;透過鏡頭擷取多個人臉影像,並且判斷人臉影像是否符合取樣條件,其中每一人臉影像包括人臉;當人臉影像符合取樣條件時,獲得對應於人臉的距離資訊,並且根據距離資訊計算物件的第二尺寸;以及根據第一尺寸與第二尺寸來計算物件的第三尺寸,並且以第三尺寸顯示物件。 Viewed from another perspective, the present invention also provides an electronic device. The electronic device includes a screen, a lens, and a processor. The processor is coupled to the screen and the lens, and is configured to: display an object through the screen, wherein the object has a first size; capture a plurality of facial images through the lens, and determine whether the facial image meets the sampling condition, wherein each The face image includes a face; when the face image meets the sampling condition, the distance information corresponding to the face is obtained, and the second size of the object is calculated according to the distance information; and the third item is calculated according to the first size and the second size Size, and display the object in a third size.

基於上述,本發明的物件顯示方法與電子裝置,可透過鏡頭擷取多個人臉影像,並且判斷人臉影像是否符合取樣條件。當人臉影像符合取樣條件時,獲得對應於人臉影像中的人臉的距離資訊,從而適應性地調整物件在螢幕上的顯示尺寸。 Based on the above, the object display method and the electronic device of the present invention can capture a plurality of face images through the lens and determine whether the face image meets the sampling condition. When the face image meets the sampling condition, the distance information corresponding to the face in the face image is obtained, thereby adaptively adjusting the display size of the object on the screen.

為讓本發明的上述特徵和優點能更明顯易懂,下文特舉實施例,並配合所附圖式作詳細說明如下。 The above described features and advantages of the invention will be apparent from the following description.

10‧‧‧電子裝置 10‧‧‧Electronic devices

102‧‧‧螢幕 102‧‧‧ screen

104‧‧‧鏡頭 104‧‧‧ lens

106‧‧‧記憶體 106‧‧‧ memory

108‧‧‧處理器 108‧‧‧Processor

110_1~110_6‧‧‧物件 110_1~110_6‧‧‧ objects

201‧‧‧使用者 201‧‧‧Users

D、Dbest、Dmax、Dmin‧‧‧距離 D, D best , D max , D min ‧‧‧ distance

S602、S604、S606、S608、S610‧‧‧本發明之一範例實施例中物件顯示方法各步驟 S602, S604, S606, S608, S610‧‧‧ steps of the object display method in an exemplary embodiment of the present invention

圖1A與圖1B是根據本發明之一範例實施例所繪示的電子裝置的示意圖。 1A and 1B are schematic diagrams of an electronic device according to an exemplary embodiment of the invention.

圖2與圖3是根據本發明之一範例實施例所繪示的調整物件的顯示尺寸的示意圖。 FIG. 2 and FIG. 3 are schematic diagrams showing the display size of an adjustment object according to an exemplary embodiment of the invention.

圖4與圖5是根據本發明之另一範例實施例所繪示的調整物件的顯示尺寸的示意圖。 4 and FIG. 5 are schematic diagrams showing the display size of an adjustment object according to another exemplary embodiment of the present invention.

圖6是根據本發明之一範例實施例所繪示的物件顯示方法的流程圖。 FIG. 6 is a flow chart of a method for displaying an object according to an exemplary embodiment of the invention.

圖1A與圖1B是根據本發明之一範例實施例所繪示的電子裝置的示意圖。 1A and 1B are schematic diagrams of an electronic device according to an exemplary embodiment of the invention.

請參照圖1A與圖1B,在本範例實施例中,電子裝置10可以是智慧型手機(smart phone)、平板電腦(tablet PC)、電子書(e-book)或遊戲機(game console),且不限於此。在另一範例實施例中,電子裝置10也可以是筆記型電腦(notebook)、桌上型電腦或智慧電視(smart TV)等各種具有顯示與運算功能的電子裝置,且不 限於此。 Referring to FIG. 1A and FIG. 1B , in the exemplary embodiment, the electronic device 10 may be a smart phone, a tablet PC, an e-book, or a game console. It is not limited to this. In another exemplary embodiment, the electronic device 10 may also be an electronic device having a display and computing function, such as a notebook, a desktop computer, or a smart TV. Limited to this.

在本範例實施例中,電子裝置10包括螢幕102、鏡頭104、記憶體106及處理器108。 In the present exemplary embodiment, the electronic device 10 includes a screen 102, a lens 104, a memory 106, and a processor 108.

螢幕102可以是電泳顯示器(Electrophoretic display)、液晶顯示器(LCD monitor)、電漿顯示器(Plasma display)或有機發光二極體顯示器(Organic light-emitting diodes display),且不限於此。在本範例實施例中,螢幕102可以是電阻式(resistive)觸控螢幕、電容式(capacitive)觸控螢幕、光學式(optical)觸控螢幕、聲波式(acoustic wave)觸控螢幕或電磁式(electromagnetic)觸控螢幕等具有顯示與觸控偵測功能的觸控螢幕。使用者可以藉由觸控筆(stylus)或手指等輸入工具在螢幕102上執行點擊或滑動等接觸操作,以輸入文字或指令至電子裝置10。然而,在另一範例實施例中,螢幕102則是僅具有顯示功能,本發明不加以限制。 The screen 102 may be an electrophoretic display, a liquid crystal display, a plasma display, or an organic light-emitting diodes display, and is not limited thereto. In the exemplary embodiment, the screen 102 can be a resistive touch screen, a capacitive touch screen, an optical touch screen, an acoustic wave touch screen or an electromagnetic type. (electromagnetic) touch screens such as touch screens with display and touch detection functions. The user can perform a touch operation such as clicking or sliding on the screen 102 by using an input tool such as a stylus or a finger to input text or instructions to the electronic device 10. However, in another exemplary embodiment, the screen 102 has only a display function, and the present invention is not limited thereto.

鏡頭104是電子裝置10的攝影模組(未繪示)的一部分,而可用來擷取外部影像。在本範例實施例中,鏡頭104是指前鏡頭,並且與螢幕102一併配置在電子裝置10的正面。 The lens 104 is part of a camera module (not shown) of the electronic device 10 and can be used to capture an external image. In the present exemplary embodiment, the lens 104 refers to the front lens and is disposed on the front side of the electronic device 10 together with the screen 102.

記憶體106可以包括揮發性(volatile)記憶體、非揮發性(non-volatile)記憶體、硬碟(Hard Disk Drive,HDD)及/或外接式儲存媒體(例如,USB隨身碟)等等,且不限於此。 The memory 106 may include volatile memory, non-volatile memory, Hard Disk Drive (HDD), and/or external storage media (eg, USB flash drive), and the like. It is not limited to this.

處理器108耦接至螢幕102、鏡頭104及記憶體106,並且用以負責電子裝置10主要的資料處理工作。例如,處理器106可以包括中央處理器(CPU)、嵌入式控制器(embedded controller) 及微控制器(micro-controller)的至少其中之一,且不限於此。 The processor 108 is coupled to the screen 102, the lens 104, and the memory 106, and is responsible for the main data processing work of the electronic device 10. For example, the processor 106 can include a central processing unit (CPU), an embedded controller (embedded controller) And at least one of a micro-controller, and is not limited thereto.

此外,電子裝置10還可以包括無線通訊模組(未繪示)、輸入裝置(未繪示)、電源供應模組(未繪示)及音訊輸出模組(未繪示)等基本配備,本發明不加以限制。無線通訊模組可以包括無線通訊晶片,輸入裝置可以包括滑鼠(mouse)、鍵盤(keyboard)、觸控板(touch pad)及麥克風(microphone)等,並且電源供應模組可以包括電池,且不限於此。 In addition, the electronic device 10 may further include a basic component such as a wireless communication module (not shown), an input device (not shown), a power supply module (not shown), and an audio output module (not shown). The invention is not limited. The wireless communication module may include a wireless communication chip, and the input device may include a mouse, a keyboard, a touch pad, a microphone, etc., and the power supply module may include a battery, and Limited to this.

如圖1B所示,處理器108會透過螢幕102來顯示物件110_1~110_6,其中物件110_1~110_6各別具有一個尺寸(以下統稱為第一尺寸)。在本範例實施例中,是以矩形或方形作為物件的顯示基準,並且以矩形或方形的任一側邊長度作為物件的尺寸的量測基準。然而,在另一範例實施例中,物件可以有任意形狀,並且物件的尺寸可以根據物件的顯示形狀而適應性地調整為不同的量測基準。每一個物件110_1~110_6各別的第一尺寸可以相同也可以不同,且物件110_1~110_6的數量可以更多或更少,本發明不加以限制。在本範例實施例中,物件110_1~110_6可以是應用程式列表中的多個影用程式捷徑的圖示,或者是聯絡人清單中的多個聯絡人的圖示等,且不限於此。此外,在另一範例實施例中,物件110_1~110_6也可以是任意應用程式呈現的按鈕、選單等物件,且不限於此。 As shown in FIG. 1B, the processor 108 displays the objects 110_1 110 110_6 through the screen 102, wherein the objects 110_1 110 110_6 each have a size (hereinafter collectively referred to as the first size). In the present exemplary embodiment, a rectangle or a square is used as a display reference for an object, and any side length of a rectangle or a square is used as a measurement reference for the size of the object. However, in another exemplary embodiment, the article may have any shape, and the size of the article may be adaptively adjusted to different measurement datums depending on the display shape of the article. The first size of each of the objects 110_1~110_6 may be the same or different, and the number of the objects 110_1~110_6 may be more or less, which is not limited by the present invention. In the present exemplary embodiment, the objects 110_1~110_6 may be icons of a plurality of shortcuts in the application list, or icons of a plurality of contacts in the contact list, and the like, and are not limited thereto. In addition, in another exemplary embodiment, the objects 110_1~110_6 may also be buttons, menus, and the like presented by any application, and are not limited thereto.

在接收到一觸發條件之後,處理器108會透過鏡頭102來擷取多個人臉影像,其中每一個人臉影像會包括至少一個人 臉。例如,此觸發條件可以是應用程式列表或聯絡人清單被開啟,或者會呈現上述物件的任意應用程式被執行,且不限於此。例如,在接收到觸發條件之後,處理器108可以啟動電子裝置10的攝影模組,以在一單位時間內透過鏡頭102擷取多個候選影像,其中這些候選影像會包括這些人臉影像。例如,此單位時間可以是5秒至10秒,且不限於此。此外,處理器108可以將所擷取的候選影像儲存於記憶體106。 After receiving a trigger condition, the processor 108 captures multiple facial images through the lens 102, wherein each facial image includes at least one person. face. For example, the trigger condition may be that the application list or the contact list is turned on, or any application that presents the above object is executed, and is not limited thereto. For example, after receiving the trigger condition, the processor 108 can activate the camera module of the electronic device 10 to capture a plurality of candidate images through the lens 102 in a unit time, wherein the candidate images include the face images. For example, the unit time may be 5 seconds to 10 seconds, and is not limited thereto. In addition, the processor 108 can store the captured candidate images in the memory 106.

然後,處理器108會判斷這些人臉影像是否符合取樣條件。例如,處理器108可以判斷這些人臉影像在這些候選影像中所佔的比例是否符合預設比例條件。若這些人臉影像在這些候選影像中所佔的比例符合預設比例條件,則處理器108會判定這些人臉影像符合取樣條件。反之,若這些人臉影像在這些候選影像中所佔的比例不符合預設比例條件,則處理器108會判定這些人臉影像不符合取樣條件。舉例來說,假設預設比例條件是人臉影像在所有候選影像中佔超過80%,並且處理器108在10秒內透過鏡頭102擷取了300個候選影像,這300個候選影像中包括了270個包含人臉的人臉影像。由於人臉影像在所有候選影像中佔了90%(大於80%),因此處理器108可以判定這些人臉影像符合取樣條件。反之,若包含人臉的人臉影像在這300個候選影像中所佔的比例不到80%(例如,50%),則處理器108可以判定這些人臉影像不符合取樣條件。 The processor 108 then determines if the facial images meet the sampling conditions. For example, the processor 108 can determine whether the proportion of the face images in the candidate images meets the preset ratio conditions. If the proportion of these face images in the candidate images meets the preset ratio condition, the processor 108 determines that the face images meet the sampling conditions. On the other hand, if the proportion of these face images in the candidate images does not meet the preset ratio condition, the processor 108 determines that the face images do not meet the sampling conditions. For example, assume that the preset ratio condition is that the face image accounts for more than 80% of all candidate images, and the processor 108 captures 300 candidate images through the lens 102 within 10 seconds, and the 300 candidate images include 270 face images containing faces. Since the face image accounts for 90% (greater than 80%) of all candidate images, the processor 108 can determine that the face images meet the sampling conditions. On the other hand, if the face image including the face occupies less than 80% (for example, 50%) of the 300 candidate images, the processor 108 can determine that the face images do not meet the sampling conditions.

處理器108也可以判斷這些人臉影像中的任兩個人臉的 位置變化是否符合位置變化條件。此位置變化條件可以包括一個位置變化門檻值。例如,假設每一個人臉影像都包含同一個使用者的人臉,則處理器108可以比較每一個人臉影像中的人臉的位置。若使用者的人臉在一個人臉影像中的位置相對於使用者的人臉在另一個人臉影像中位置的差異大於位置變化門檻值,則處理器108可以判定這兩個人臉影像中的人臉的位置變化不符合位置變化條件。反之,若使用者的人臉在每一個人臉影像中的位置的差異不大於位置變化門檻值,表示使用者的人臉在每一個人臉影像中的位置都是差不多的,因此處理器108可以判定這些人臉影像中的任兩個人臉的位置變化都符合位置變化條件。 The processor 108 can also determine the faces of any two of these face images. Whether the position change meets the position change condition. This position change condition may include a position change threshold value. For example, assuming that each person's face image contains a face of the same user, the processor 108 can compare the position of the face in each person's face image. If the position of the user's face in one face image is different from the position of the user's face in another face image is greater than the position change threshold, the processor 108 may determine the person in the two face images. The position change of the face does not meet the position change condition. On the other hand, if the position of the user's face in each face image is not greater than the position change threshold, the position of the user's face in each face image is similar, so the processor 108 can determine The positional changes of any two of these face images conform to the position change condition.

此外,處理器108也可以判斷這些人臉影像中的任兩個人臉的尺寸變化是否符合尺寸變化條件。此尺寸變化條件可以包括一個尺寸變化門檻值。例如,假設每一個人臉影像都包含同一個使用者的人臉,則處理器108可以比較每一個人臉影像中的人臉的尺寸。若使用者的人臉在一個人臉影像中的尺寸相對於使用者的人臉在另一個人臉影像中尺寸的差異大於一個尺寸變化門檻值,則處理器108可以判定這兩個人臉影像中的人臉的尺寸變化不符合位置變化條件。反之,若使用者的人臉在每一個人臉影像中的尺寸的差異不大於尺寸變化門檻值,表示使用者的人臉在每一個人臉影像中的尺寸都是差不多的,因此處理器108可以判定這些人臉影像中的任兩個人臉的尺寸變化都符合位置變化條件。 In addition, the processor 108 can also determine whether the size change of any two of the face images conforms to the dimensional change condition. This dimensional change condition can include a dimensional change threshold. For example, assuming that each person's face image contains a face of the same user, the processor 108 can compare the size of the face in each person's face image. If the size of the user's face in one face image is greater than the size change threshold of the user's face in another face image, the processor 108 may determine the two face images. The size change of the face does not meet the position change condition. On the other hand, if the size difference of the user's face in each face image is not greater than the size change threshold, the size of the user's face in each face image is similar, so the processor 108 can determine The dimensional changes of any two of these face images conform to the position change condition.

也就是說,處理器108可以根據人臉影像在候選影像中 所佔的比例是否符合預設比例條件、不同的人臉影像中的任兩個人臉的位置變化是否符合位置變化條件、以及不同的人臉影像中的任兩個人臉的尺寸變化是否符合尺寸變化條件的至少其中之一,來判斷這些人臉影像是否符合取樣條件。這些判斷條件可以單獨使用也可以擇二或擇三合併使用,本發明不加以限制。例如,在一範例實施例中,只有當人臉影像在候選影像中所佔的比例符合預設比例條件、不同的人臉影像中的任兩個人臉的位置變化符合位置變化條件且不同的人臉影像中的任兩個人臉的尺寸變化符合尺寸變化條件時,處理器108才會判定人臉影像符合取樣條件。 That is, the processor 108 can be in the candidate image according to the face image. Whether the proportion is in accordance with the preset ratio condition, whether the position change of any two faces in different face images conforms to the position change condition, and whether the size changes of any two faces in different face images conform to At least one of the dimensional change conditions is used to determine whether the facial images meet the sampling conditions. These judgment conditions may be used singly or in combination of two or three, and the invention is not limited. For example, in an exemplary embodiment, only when the proportion of the face image in the candidate image meets the preset ratio condition, the position changes of any two faces in different face images conform to the position change condition and are different. When the size change of any two faces in the face image conforms to the dimensional change condition, the processor 108 determines that the face image meets the sampling condition.

當人臉影像不符合取樣條件時,處理器108例如是重新取得更多的候選影像,並且重複的執行上述判斷。在一範例實施例中,處理器108也可以設定當失敗超過一定次數後即停止擷取人臉影像等等,本發明不加以限制。 When the face image does not meet the sampling condition, the processor 108, for example, reacquires more candidate images, and repeatedly performs the above determination. In an exemplary embodiment, the processor 108 may also set to stop capturing the face image and the like after the failure exceeds a certain number of times, and the present invention is not limited thereto.

當人臉影像符合取樣條件時,處理器108會獲得對應於人臉的距離資訊,並且根據距離資訊計算物件的另一個尺寸(以下統稱為第二尺寸)。在此提及的人臉的距離資訊指示在電子裝置10的正面操作電子裝置10的使用者的人臉與電子裝置10之間的距離。例如,處理器108可以統計每一個人臉影像中的人臉的尺寸,並且獲得這些人臉的一平均尺寸。此外,此平均尺寸也可以是各個人臉影像中的人臉的尺寸的加權平均或經過特殊運算而獲得的平均尺寸,本發明不加以限制。然後,處理器108可以根據平均尺寸計算對應於這些人臉的距離資訊。在本範例實施例中,距離 資訊包括一距離值。例如,處理器108可以透過下列關係式(1.1)計算此距離值: When the face image meets the sampling condition, the processor 108 obtains the distance information corresponding to the face, and calculates another size of the object based on the distance information (hereinafter collectively referred to as the second size). The distance information of the face mentioned here indicates the distance between the face of the user who operates the electronic device 10 on the front side of the electronic device 10 and the electronic device 10. For example, processor 108 can count the size of the faces in each person's face image and obtain an average size of those faces. In addition, the average size may also be a weighted average of the sizes of the faces in the respective face images or an average size obtained by a special operation, which is not limited in the present invention. Processor 108 can then calculate distance information corresponding to the faces based on the average size. In the present exemplary embodiment, the distance information includes a distance value. For example, processor 108 can calculate this distance value by the following relation (1.1):

其中D是在電子裝置10的正面操作電子裝置10的使用者的人臉與電子裝置10之間的距離,C是一個常數,A是人臉尺寸。例如,A可以是將人臉影像中的人臉設定為一個矩形或方形來看時,人臉的一個側邊的長度。 Where D is the distance between the face of the user operating the electronic device 10 on the front side of the electronic device 10 and the electronic device 10, C is a constant, and A is the face size. For example, A may be the length of one side of the face when the face in the face image is set to a rectangle or a square.

然後,處理器108可以比對此距離資訊(或距離值)與預設距離,以獲得距離資訊與預設距離之間的差值,並且根據此差值來計算物件的第二尺寸。在本範例實施例中,是將預設距離設定為視力正常的使用者觀看螢幕102的最佳距離。當使用者的頭部與電子裝置10之間的距離小於預設距離時,表示使用者可能有近視等問題或者物件在螢幕102上的顯示尺寸太小,因此使用者才會將頭部移近電子裝置10。反之,當使用者的頭部與電子裝置10之間的距離大於預設距離時,表示使用者可能有遠視等問題或著物件在螢幕102上的顯示尺寸太大,因此使用者才會將頭部移遠電子裝置10。因此,在本範例實施例中,當此距離資訊指出使用者的頭部與電子裝置10之間的距離小於預設距離時,處理器108會將物件在螢幕102上的顯示尺寸加大,而當此距離資訊指出使用者的頭部與電子裝置10之間的距離大於預設距離時,處理器108會將物件在螢幕102上的顯示尺寸縮小。例如,處理器108可以根據下列關係式(1.2)來計算物件的第二尺寸: Ibest=Icurrent-(Imax-Imin)×((D-Dbest)/(Dmax-Dmin)) (1.2) The processor 108 can then compare the distance information (or distance value) with the preset distance to obtain a difference between the distance information and the preset distance, and calculate the second size of the object based on the difference. In the present exemplary embodiment, the preset distance is set as the optimal distance for the user with normal vision to view the screen 102. When the distance between the user's head and the electronic device 10 is less than the preset distance, it indicates that the user may have problems such as myopia or the display size of the object on the screen 102 is too small, so the user will move the head closer. Electronic device 10. On the contrary, when the distance between the user's head and the electronic device 10 is greater than the preset distance, it indicates that the user may have problems such as farsightedness or the display size of the object on the screen 102 is too large, so the user will turn the head. The remote electronic device 10 is moved. Therefore, in the exemplary embodiment, when the distance information indicates that the distance between the user's head and the electronic device 10 is less than the preset distance, the processor 108 increases the display size of the object on the screen 102, and When the distance information indicates that the distance between the user's head and the electronic device 10 is greater than a preset distance, the processor 108 reduces the display size of the object on the screen 102. For example, processor 108 may calculate the second size of the object according to the following relation (1.2): I best = I current - (I max - I min ) × ((DD best ) / (D max - D min )) ( 1.2)

其中Ibest是物件的第二尺寸,Icurrent是物件的第一尺寸,Imax是物件的最大顯示尺寸,Imin是物件的最小顯示尺寸,D是距離資訊,Dbest是預設距離,Dmax是最大距離,並且Dmin是最小距離。類似地,Ibest、Icurrent、Imax及Imin例如是物件在顯示時的一個側邊的長度,且不限於此。也就是說,Imax、Imin、Dbest、Dmax及Dmin都是預設的,而Icurrent則是物件目前被用來顯示的尺寸(如圖1B所示)。透過關係式(1.2)可以得知,當距離資訊指出使用者的頭部與電子裝置10之間的距離小於預設距離Dbest時,處理器108所計算出的第二尺寸會大於第一尺寸,以使顯示在螢幕102上的物件變大。反之,當距離資訊指出使用者的頭部與電子裝置10之間的距離大於預設距離Dbest時,處理器108所計算出的第二尺寸則會小於第一尺寸,以使顯示在螢幕102上的物件變小。物件變大或變小的幅度則視使用者與電子裝置10之間的距離(亦即,距離資訊)與預設距離之間的差值而定。 Where I best is the second size of the object, I current is the first size of the object, I max is the maximum display size of the object, I min is the minimum display size of the object, D is the distance information, D best is the preset distance, D Max is the maximum distance and D min is the minimum distance. Similarly, I best , I current , I max , and I min are, for example, the length of one side of the object when displayed, and are not limited thereto. That is, I max , I min , D best , D max , and D min are presets, and I current is the size at which the object is currently being displayed (as shown in FIG. 1B ). Through Equation (1.2) can be known, when the distance information indicates a distance between the head of the user and the electronic device 10 is less than the predetermined distance D best, the second processor 108 calculates the size will be greater than the first size In order to make the object displayed on the screen 102 large. On the other hand, when the distance information indicates that the distance between the user's head and the electronic device 10 is greater than the preset distance D best , the second size calculated by the processor 108 is smaller than the first size, so that the display is displayed on the screen 102. The objects on it become smaller. The magnitude of the object becoming larger or smaller depends on the difference between the distance between the user and the electronic device 10 (i.e., the distance information) and the preset distance.

在獲得物件的第二尺寸之後,處理器108會根據第一尺寸與第二尺寸來計算物件的另一尺寸(以下統稱為第三尺寸),並且以第三尺寸來顯示物件。也就是說,若處理器108直接以第二尺寸來顯示物件,則物件的顯示尺寸之變化幅度可能會太大,而影響使用者的操作感受。因此,為了避免物件的顯示尺寸變化的幅度太大,處理器108可以根據過去的經驗來調整物件的顯示尺寸。例如,處理器108可以透過下列關係式(1.3)來計算物件的第三尺 寸:Ibest’=Icurrent×(1-α)+Ibest×α (1.3) After obtaining the second size of the object, the processor 108 calculates another size of the object (hereinafter collectively referred to as the third size) according to the first size and the second size, and displays the object in the third size. That is to say, if the processor 108 directly displays the object in the second size, the display size of the object may vary too much, which may affect the user's operating experience. Therefore, in order to avoid that the magnitude of the display size change of the object is too large, the processor 108 can adjust the display size of the object based on past experience. For example, the processor 108 can calculate the third size of the object by the following relation (1.3): I best '=I current ×(1-α)+I best ×α (1.3)

其中Ibest’是物件的第三尺寸,Icurrent是物件的第一尺寸,Ibest是物件的第二尺寸,α是學習係數,並且0≦α<1。也就是說,透過將物件的第一尺寸與第二尺寸代入關係式(1.3)中,處理器108可以以趨近的方式來獲得物件的第三尺寸,並且以第三尺寸來顯示物件。 Where I best 'is the third size of the object, I current is the first size of the object, I best is the second size of the object, α is the learning coefficient, and 0 ≦ α < 1. That is, by substituting the first size and the second size of the object into relation (1.3), the processor 108 can obtain the third size of the object in a near approach and display the object in a third size.

圖2與圖3是根據本發明之一範例實施例所繪示的調整物件的顯示尺寸的示意圖。 FIG. 2 and FIG. 3 are schematic diagrams showing the display size of an adjustment object according to an exemplary embodiment of the invention.

請參照圖2,假設使用者與電子裝置10之間的距離(即,距離資訊)是D,並且預設距離是Dbest,則距離D與預設距離之間的差值是D-Dbest(負值)。透過將D-Dbest與圖1的範例實施例中物件的第一尺寸代入關係式(1.2)並且將第一尺寸與所獲得的第二尺寸代入關係式(1.3)之後,處理器108可以獲得物件的第三尺寸。 Referring to FIG. 2, assuming that the distance between the user and the electronic device 10 (ie, distance information) is D, and the preset distance is D best , the difference between the distance D and the preset distance is DD best (negative value). After the DD best is substituted into the relation (1.2) with the first size of the object in the exemplary embodiment of FIG. 1 and the first size and the obtained second size are substituted into the relation (1.3), the processor 108 can obtain the object. The third size.

請參照圖3,在此範例實施例中,使用者的頭部與電子裝置10之間的距離D小於預設距離Dbest,因此相對於圖1B的範例實施例,處理器108會使物件110_1~110_6在螢幕102上的顯示尺寸變大。 Referring to FIG 3, in this exemplary embodiment, the distance D between the head of the user and the electronic device 10 is less than the predetermined distance D Best, and therefore with respect to exemplary embodiment of FIG. 1B, processor 108 causes object 110_1 The display size of ~110_6 on the screen 102 becomes larger.

圖4與圖5是根據本發明之另一範例實施例所繪示的調整物件的顯示尺寸的示意圖。 4 and FIG. 5 are schematic diagrams showing the display size of an adjustment object according to another exemplary embodiment of the present invention.

請參照圖4,同樣假設使用者與電子裝置10之間的距離(即,距離資訊)是D,並且預設距離是Dbest,則距離D與預設距 離之間的差值是D-Dbest(正值)。透過關係式(1.2)與關係式(1.3),處理器108同樣可以獲得物件的第三尺寸。 Referring to FIG 4, similarly assumed that the distance between the user and the electronic apparatus 10 (i.e., distance information) is D, and D is the Best predetermined distance, then the difference between the distance and the predetermined distance D is the DD best ( Positive value). Through the relationship (1.2) and the relation (1.3), the processor 108 can also obtain the third size of the object.

請參照圖4,與圖3的範例實施例之差異在於,在此範例實施例中,使用者的頭部與電子裝置10之間的距離D大於預設距離Dbest,因此相對於圖1B與圖3的範例實施例,處理器108會使物件110_1~110_6在螢幕102上的顯示尺寸變小。此外,圖2與圖4中的Dbest、Dmax及Dmin可以直接代入關係式(1.2)中使用或者經調整後再代入關係式(1.2)中,本發明不加以限制。 Referring to FIG. 4, the difference from the exemplary embodiment of FIG. 3 is that, in this exemplary embodiment, the distance D between the user's head and the electronic device 10 is greater than the preset distance Db , and thus is relative to FIG. 1B. In the exemplary embodiment of FIG. 3, the processor 108 reduces the display size of the objects 110_1 110 110_6 on the screen 102. In addition, D best , D max and D min in FIG. 2 and FIG. 4 may be directly substituted into the relation (1.2) or adjusted and then substituted into the relation (1.2), and the invention is not limited.

圖6是根據本發明之一範例實施例所繪示的物件顯示方法的流程圖。 FIG. 6 is a flow chart of a method for displaying an object according to an exemplary embodiment of the invention.

請參照圖6,在步驟S602中,處理器108透過螢幕102來顯示物件,其中物件具有第一尺寸。在步驟S604中,處理器108透過鏡頭擷取多個人臉影像,其中每一人臉影像包括人臉。在步驟S606中,處理器108判斷人臉影像是否符合取樣條件。當處理器108判斷人臉影像不符合取樣條件時,處理器108例如是重複執行步驟S604,並且可不斷的重複執行或者在失敗次數超過一預設次數之後結束此操作等,本發明不加以限制。當處理器108判斷人臉影像符合取樣條件時,在步驟S608中,處理器108獲得對應於人臉的距離資訊,並且根據距離資訊計算物件的第二尺寸。在步驟S610中,處理器108根據第一尺寸與第二尺寸來計算物件的第三尺寸,並且以第三尺寸顯示物件。 Referring to FIG. 6, in step S602, the processor 108 displays the object through the screen 102, wherein the object has a first size. In step S604, the processor 108 captures a plurality of facial images through the lens, wherein each facial image includes a human face. In step S606, the processor 108 determines whether the face image meets the sampling condition. When the processor 108 determines that the face image does not meet the sampling condition, the processor 108 repeats the step S604, for example, and may repeatedly perform the operation or end the operation after the number of failures exceeds a preset number of times, etc., and the present invention is not limited. . When the processor 108 determines that the face image meets the sampling condition, in step S608, the processor 108 obtains the distance information corresponding to the face, and calculates the second size of the object based on the distance information. In step S610, the processor 108 calculates a third size of the object according to the first size and the second size, and displays the object in the third size.

然而,圖6中各步驟已詳細說明如上,在此便不在贅述。 值得注意的是,圖6中各步驟可以實作為多個程式碼或是電路,本發明並不在此限。此外,圖6的方法可以搭配以上實施例使用,也可以單獨使用,本發明並不在此限。 However, the steps in FIG. 6 have been described in detail above, and are not described herein. It should be noted that the steps in FIG. 6 can be implemented as multiple code codes or circuits, and the present invention is not limited thereto. In addition, the method of FIG. 6 may be used in combination with the above embodiments, or may be used alone, and the present invention is not limited thereto.

綜上所述,本發明的物件顯示方法與電子裝置,可透過鏡頭擷取多個人臉影像,並且判斷人臉影像是否符合取樣條件。當人臉影像符合取樣條件時,獲得對應於人臉影像中的人臉的距離資訊,從而適應性地調整物件在螢幕上的顯示尺寸。 In summary, the object display method and the electronic device of the present invention can capture a plurality of face images through the lens and determine whether the face image meets the sampling condition. When the face image meets the sampling condition, the distance information corresponding to the face in the face image is obtained, thereby adaptively adjusting the display size of the object on the screen.

雖然本發明已以實施例揭露如上,然其並非用以限定本發明,任何所屬技術領域中具有通常知識者,在不脫離本發明的精神和範圍內,當可作些許的更動與潤飾,故本發明的保護範圍當視後附的申請專利範圍所界定者為準。 Although the present invention has been disclosed in the above embodiments, it is not intended to limit the present invention, and any one of ordinary skill in the art can make some changes and refinements without departing from the spirit and scope of the present invention. The scope of the invention is defined by the scope of the appended claims.

S602、S604、S606、S608、S610‧‧‧物件顯示方法各步驟 S602, S604, S606, S608, S610‧‧‧ items display method steps

Claims (10)

一種物件顯示方法,適用於具有一螢幕與一鏡頭的一電子裝置,該方法包括:透過該螢幕顯示一物件,其中該物件具有一第一尺寸;透過該鏡頭擷取多個人臉影像,並且判斷該些人臉影像是否符合一取樣條件,其中每一該些人臉影像包括一人臉;當該些人臉影像符合該取樣條件時,獲得對應於該些人臉的一距離資訊,並且根據該距離資訊計算該物件的一第二尺寸;以及根據該第一尺寸與該第二尺寸來計算該物件的一第三尺寸,並且以該第三尺寸顯示該物件。 An object display method is applicable to an electronic device having a screen and a lens, the method comprising: displaying an object through the screen, wherein the object has a first size; capturing a plurality of facial images through the lens, and determining Whether the facial images meet a sampling condition, wherein each of the facial images includes a human face; and when the facial images meet the sampling condition, obtaining a distance information corresponding to the human faces, and according to the The distance information calculates a second size of the object; and calculates a third size of the object based on the first size and the second size, and displays the object in the third size. 如申請專利範圍第1項所述的物件顯示方法,其中透過該鏡頭擷取該些人臉影像,並且判斷該些人臉影像是否符合該取樣條件的步驟包括:透過該鏡頭在一單位時間內擷取多個候選影像,其中該些候選影像包括該些人臉影像;以及根據該些人臉影像在該些候選影像中所佔的一比例是否符合一預設比例條件、該些人臉影像中的任兩個人臉的一位置變化是否符合一位置變化條件、以及該些人臉影像中的任兩個人臉的一尺寸變化是否符合一尺寸變化條件的至少其中之一,來判斷該些人臉影像是否符合該取樣條件。 The object display method of claim 1, wherein the step of capturing the facial images through the lens and determining whether the facial images meet the sampling condition comprises: transmitting the lens through the lens in a unit time Extracting a plurality of candidate images, wherein the candidate images include the facial images; and determining whether a proportion of the candidate images occupies a predetermined ratio condition, the facial images according to the facial images Judging whether a position change of any two of the faces conforms to a position change condition and whether a size change of any two faces in the face images conforms to at least one of a size change condition Whether these facial images meet the sampling conditions. 如申請專利範圍第1項所述的物件顯示方法,其中獲得對 應於該些人臉的該距離資訊,並且根據該距離資訊計算該物件的該第二尺寸的步驟包括:獲得該些人臉的一平均尺寸,並且根據該平均尺寸計算對應於該些人臉的該距離資訊;比對該距離資訊與一預設距離,以獲得該距離資訊與該預設距離之間的一差值;以及根據該距離資訊與該預設距離之間的該差值計算該第二尺寸。 The method for displaying an object according to Item 1 of the patent application, wherein the pair is obtained The step of calculating the distance information of the faces and calculating the second size of the object according to the distance information comprises: obtaining an average size of the faces, and calculating corresponding faces according to the average size The distance information; comparing the distance information with a preset distance to obtain a difference between the distance information and the preset distance; and calculating the difference between the distance information and the preset distance The second size. 如申請專利範圍第3項所述的物件顯示方法,其中當該距離資訊小於該預設距離時,該第二尺寸大於該第一尺寸,並且當該距離資訊大於該預設距離時,該第二尺寸小於該第一尺寸。 The object display method of claim 3, wherein when the distance information is less than the preset distance, the second size is greater than the first size, and when the distance information is greater than the preset distance, the first The second size is smaller than the first size. 如申請專利範圍第1項所述的物件顯示方法,其中根據該第一尺寸與該第二尺寸來計算該物件的該第三尺寸的步驟包括:根據下列關係式來計算該物件的該第三尺寸:Ibest’=Icurrent×(1-α)+Ibest×α,其中Ibest’是該第三尺寸,Icurrent是該第一尺寸,Ibest是該第二尺寸,α是一學習係數,並且0≦α<1。 The object display method of claim 1, wherein the calculating the third size of the object according to the first size and the second size comprises: calculating the third of the object according to the following relationship Size: I best '=I current ×(1-α)+I best ×α, where I best ' is the third size, I current is the first size, I best is the second size, and α is a learning Coefficient, and 0 ≦ α < 1. 一種電子裝置,包括:一螢幕;一鏡頭;以及一處理器,耦接至該螢幕與該鏡頭,其中該處理器用以執行下列操作: 透過該螢幕顯示一物件,其中該物件具有一第一尺寸;透過該鏡頭擷取多個人臉影像,並且判斷該些人臉影像是否符合一取樣條件,其中每一該些人臉影像包括一人臉;當該些人臉影像符合該取樣條件時,獲得對應於該些人臉的一距離資訊,並且根據該距離資訊計算該物件的一第二尺寸;以及根據該第一尺寸與該第二尺寸來計算該物件的一第三尺寸,並且以該第三尺寸顯示該物件。 An electronic device includes: a screen; a lens; and a processor coupled to the screen and the lens, wherein the processor is configured to perform the following operations: Displaying an object through the screen, wherein the object has a first size; capturing a plurality of facial images through the lens, and determining whether the facial images meet a sampling condition, wherein each of the facial images includes a human face When the facial images meet the sampling condition, obtain a distance information corresponding to the faces, and calculate a second size of the object according to the distance information; and according to the first size and the second size A third size of the object is calculated and displayed in the third size. 如申請專利範圍第6項所述的電子裝置,其中透過該鏡頭擷取該些人臉影像,並且判斷該些人臉影像是否符合該取樣條件的操作包括:透過該鏡頭在一單位時間內擷取多個候選影像,其中該些候選影像包括該些人臉影像;以及根據該些人臉影像在該些候選影像中所佔的一比例是否符合一預設比例條件、該些人臉影像中的任兩個人臉的一位置變化是否符合一位置變化條件、以及該些人臉影像中的任兩個人臉的一尺寸變化是否符合一尺寸變化條件的至少其中之一,來判斷該些人臉影像是否符合該取樣條件。 The electronic device of claim 6, wherein the capturing of the facial images through the lens and determining whether the facial images meet the sampling condition comprises: transmitting the lens through the lens in a unit time. Taking a plurality of candidate images, wherein the candidate images include the facial images; and determining whether a proportion of the candidate images in the candidate images conforms to a preset ratio condition, and the facial images are Judging whether a position change of any two faces conforms to a position change condition and whether a size change of any two faces in the face images conforms to at least one of a dimensional change condition Whether the face image meets the sampling condition. 如申請專利範圍第6項所述的電子裝置,其中獲得對應於該些人臉的該距離資訊,並且根據該距離資訊計算該物件的該第二尺寸的操作包括:獲得該些人臉的一平均尺寸,並且根據該平均尺寸計算對應 於該些人臉的該距離資訊;比對該距離資訊與一預設距離,以獲得該距離資訊與該預設距離之間的一差值;以及根據該距離資訊與該預設距離之間的該差值計算該第二尺寸。 The electronic device of claim 6, wherein obtaining the distance information corresponding to the faces and calculating the second size of the object based on the distance information comprises: obtaining one of the faces Average size and calculate the corresponding size based on the average size The distance information of the faces; comparing the distance information with a predetermined distance to obtain a difference between the distance information and the preset distance; and according to the distance information and the preset distance The difference is calculated for the second size. 如申請專利範圍第8項所述的電子裝置,其中當該距離資訊小於該預設距離時,該第二尺寸大於該第一尺寸,並且當該距離資訊大於該預設距離時,該第二尺寸小於該第一尺寸。 The electronic device of claim 8, wherein when the distance information is less than the preset distance, the second size is greater than the first size, and when the distance information is greater than the preset distance, the second The size is smaller than the first size. 如申請專利範圍第6項所述的電子裝置,其中根據該第一尺寸與該第二尺寸來計算該物件的該第三尺寸的操作包括:根據下列關係式來計算該物件的該第三尺寸:Ibest’=Icurrent×(1-α)+Ibest×α,其中Ibest’是該第三尺寸,Icurrent是該第一尺寸,Ibest是該第二尺寸,α是一學習係數,並且0≦α<1。 The electronic device of claim 6, wherein the calculating the third size of the object according to the first size and the second size comprises: calculating the third size of the object according to the following relationship :I best '=I current ×(1-α)+I best ×α, where I best ' is the third size, I current is the first size, I best is the second size, and α is a learning coefficient And 0≦α<1.
TW103103608A 2014-01-29 2014-01-29 Method for displaying object and electronic device TWI523003B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW103103608A TWI523003B (en) 2014-01-29 2014-01-29 Method for displaying object and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW103103608A TWI523003B (en) 2014-01-29 2014-01-29 Method for displaying object and electronic device

Publications (2)

Publication Number Publication Date
TW201530532A TW201530532A (en) 2015-08-01
TWI523003B true TWI523003B (en) 2016-02-21

Family

ID=54342808

Family Applications (1)

Application Number Title Priority Date Filing Date
TW103103608A TWI523003B (en) 2014-01-29 2014-01-29 Method for displaying object and electronic device

Country Status (1)

Country Link
TW (1) TWI523003B (en)

Also Published As

Publication number Publication date
TW201530532A (en) 2015-08-01

Similar Documents

Publication Publication Date Title
KR101184460B1 (en) Device and method for controlling a mouse pointer
EP2857944B1 (en) Mobile communication terminal, screen adjusting method and storage medium
US20150116230A1 (en) Display Device and Icon Control Method Thereof
JP4275151B2 (en) Red-eye correction method and apparatus using user-adjustable threshold
US20130050133A1 (en) Method and apparatus for precluding operations associated with accidental touch inputs
US9727147B2 (en) Unlocking method and electronic device
TWI658396B (en) Interface control method and electronic device using the same
US20180150211A1 (en) Method for adjusting photographing focal length of mobile terminal by using touchpad, and mobile terminal
TWI475496B (en) Gesture control device and method for setting and cancelling gesture operating region in gesture control device
JP6177482B1 (en) Touch panel input device, touch gesture determination device, touch gesture determination method, and touch gesture determination program
WO2012151882A1 (en) Display screen management method and device
US20160029147A1 (en) Smart monitor system and hand-held electronic device
EP3018566A1 (en) Handheld device and method for adjusting position of input area thereon
CN106681640B (en) Screen display control method of mobile terminal and mobile terminal
TWM471654U (en) Portable electric apparatus
WO2018176711A1 (en) Method for adjusting scrolling speed of interface, related device, and computer program product
WO2011045786A2 (en) Wearable device for generating input for computerized systems
TWI523003B (en) Method for displaying object and electronic device
WO2018205745A1 (en) Input interface display system and method for portable device
US9395895B2 (en) Display method and apparatus, and electronic device
US10175825B2 (en) Information processing apparatus, information processing method, and program for determining contact on the basis of a change in color of an image
US20150205374A1 (en) Information processing method and electronic device
CN106104419A (en) Computing device
US20190235651A1 (en) Wearable device and operation method
US9720513B2 (en) Apparatus and method for receiving a key input