TW201506812A - Method and device for switching display direction, electronic device and machine-readable storage medium - Google Patents

Method and device for switching display direction, electronic device and machine-readable storage medium Download PDF

Info

Publication number
TW201506812A
TW201506812A TW103119273A TW103119273A TW201506812A TW 201506812 A TW201506812 A TW 201506812A TW 103119273 A TW103119273 A TW 103119273A TW 103119273 A TW103119273 A TW 103119273A TW 201506812 A TW201506812 A TW 201506812A
Authority
TW
Taiwan
Prior art keywords
line
image
switched
face
screen
Prior art date
Application number
TW103119273A
Other languages
Chinese (zh)
Inventor
hai-zhen Liao
Original Assignee
Tencent Tech Shenzhen 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 Tencent Tech Shenzhen Co Ltd filed Critical Tencent Tech Shenzhen Co Ltd
Publication of TW201506812A publication Critical patent/TW201506812A/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/16Constructional details or arrangements
    • G06F1/1613Constructional details or arrangements for portable computers
    • G06F1/1633Constructional details or arrangements of portable computers not specific to the type of enclosures covered by groups G06F1/1615 - G06F1/1626
    • G06F1/1684Constructional details or arrangements related to integrated I/O peripherals not covered by groups G06F1/1635 - G06F1/1675
    • G06F1/1686Constructional details or arrangements related to integrated I/O peripherals not covered by groups G06F1/1635 - G06F1/1675 the I/O peripheral being an integrated camera
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/011Arrangements for interaction with the human body, e.g. for user immersion in virtual reality
    • G06F3/012Head tracking input arrangements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/011Arrangements for interaction with the human body, e.g. for user immersion in virtual reality
    • G06F3/013Eye tracking input arrangements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2200/00Indexing scheme relating to G06F1/04 - G06F1/32
    • G06F2200/16Indexing scheme relating to G06F1/16 - G06F1/18
    • G06F2200/161Indexing scheme relating to constructional details of the monitor
    • G06F2200/1614Image rotation following screen orientation, e.g. switching from landscape to portrait mode
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2200/00Indexing scheme relating to G06F1/04 - G06F1/32
    • G06F2200/16Indexing scheme relating to G06F1/16 - G06F1/18
    • G06F2200/163Indexing scheme relating to constructional details of the computer
    • G06F2200/1637Sensing arrangement for detection of housing movement or orientation, e.g. for controlling scrolling or cursor movement on the display of an handheld computer

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • User Interface Of Digital Computer (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

A method and a device for switching a display direction, an electronic device and a machine-readable storage medium are disclosed. The method for switching the display direction includes: determining a direction of display content on a screen of the electronic device to be switched after the electronic device is rotated; capturing a facial image for determining a facial position with a preset camera; detecting whether the direction to be switched matches the facial position; and switching a current display direction of the display content on the screen according to the direction to be switched if the detected result represents that the direction to be switched matches the facial position. The present invention can adaptively adjust the current display direction of the display content on the screen according to the facial position.

Description

顯示方向切換方法及裝置、電子設備及機器可讀取儲存介質 Display direction switching method and device, electronic device and machine readable storage medium

本發明關於網際網路終端領域,特別是關於一種顯示方向切換方法、裝置及電子設備。 The present invention relates to the field of Internet terminals, and more particularly to a display direction switching method, apparatus, and electronic device.

目前,橫豎螢幕切換技術已經被廣泛應用於例如智慧手機、平板電腦、電子書閱讀器或者電子筆記本之類的電子設備中。橫豎螢幕切換技術是指電子設備發生旋轉時,電子設備的螢幕上顯示內容的當前顯示方向對應地發生切換,以適應使用者視線方向的技術,其實質是一種顯示方向自我調整切換技術。 At present, horizontal and vertical screen switching technology has been widely used in electronic devices such as smart phones, tablets, e-book readers or electronic notebooks. The horizontal and vertical screen switching technology refers to a technology in which the current display direction of the display content on the screen of the electronic device is switched correspondingly to adapt to the line of sight direction of the user when the electronic device rotates, and the essence is a display direction self-adjusting switching technology.

常見的顯示方向切換方法包括:電子設備透過內建的重力加速度感測器偵測重力加速度方向;電子設備檢測螢幕上顯示內容的當前顯示方向是否與偵測到的重力加速度方向一致;若檢測結果為當前顯示方向與重力加速度方向不一致,則切換螢幕上顯示內容的當前顯示方向,使得該顯示方向與重力加速度方向保持一致。此外,電子設備一般都提供有開啟或者關閉顯示方向切換功能的選項,亦即在該切換功能開啟時,螢幕上顯示內容的當前顯示方向會跟隨重力加速度方向進行切換,在該切換功能 關閉時,螢幕上顯示內容的當前顯示方向會保持不變,而不跟隨重力加速度方向進行切換。 The common display direction switching method includes: the electronic device detects the direction of the gravity acceleration through the built-in gravity acceleration sensor; and the electronic device detects whether the current display direction of the displayed content on the screen is consistent with the detected direction of the gravitational acceleration; if the detection result If the current display direction is inconsistent with the direction of gravity acceleration, the current display direction of the displayed content on the screen is switched such that the display direction is consistent with the direction of gravity acceleration. In addition, the electronic device generally provides an option to enable or disable the display direction switching function, that is, when the switching function is turned on, the current display direction of the displayed content on the screen is switched following the gravity acceleration direction, in the switching function. When turned off, the current display orientation of the content displayed on the screen remains the same, instead of following the direction of gravity acceleration.

然而習知技術存在以下問題:當使用者躺在床上使用手機或平板電腦時,螢幕上顯示內容的顯示方向在自動跟隨重力加速度方向切換後,會和使用者實際的視線方向不一致。此時,使用者需要將電子設備旋轉回來後,關閉該切換功能才能夠正常觀看。因此需要對螢幕上顯示內容的當前顯示方向在自動跟隨重力加速度方向切換後可能會和使用者實際的視線方向不一致的問題提出解決方法。 However, the prior art has the following problem: when the user is lying in bed using a mobile phone or a tablet computer, the display direction of the displayed content on the screen is inconsistent with the actual line of sight direction of the user after automatically following the direction of gravity acceleration. At this time, after the user needs to rotate the electronic device back, the switching function is turned off to be able to view normally. Therefore, it is necessary to propose a solution to the problem that the current display direction of the displayed content on the screen may be inconsistent with the actual line of sight direction of the user after automatically following the direction of the gravitational acceleration.

為了解決螢幕上顯示內容的當前顯示方向在自動跟隨重力加速度方向切換後,可能會和使用者實際的視線方向不一致的問題,本發明實施例提供一種顯示方向切換方法、裝置及電子設備。所述技術方案如下:本發明之顯示方向切換方法用於一電子設備,所述電子設備包括一前置攝像頭,所述顯示方向切換方法包括:在所述電子設備旋轉後,確定所述電子設備之一螢幕上顯示內容的待切換方向;透過所述前置攝像頭擷取一人臉圖像以確定一人臉位置;檢測所述待切換方向與所述人臉位置是否匹配以使所述螢幕上顯示內容相對於使用者為正向影像;以及若檢測結果為所述待切換方向與所述人臉位置匹配,則根據所述待切換方向將所述螢幕上顯示內容的當前顯示方向進行切換。 In order to solve the problem that the current display direction of the display content on the screen is inconsistent with the actual line of sight direction of the user after the direction of the gravity acceleration is automatically switched, the embodiment of the present invention provides a display direction switching method, device, and electronic device. The technical solution is as follows: the display direction switching method of the present invention is used for an electronic device, the electronic device includes a front camera, and the display direction switching method includes: after the electronic device is rotated, determining the electronic device Displaying a direction of the content to be switched on one of the screens; capturing a face image through the front camera to determine a face position; detecting whether the to-be-switched direction matches the face position to enable the display on the screen The content is a forward image with respect to the user; and if the detection result is that the to-be-switched direction matches the face position, the current display direction of the content displayed on the screen is switched according to the to-be-switched direction.

本發明之顯示方向切換裝置用於一電子設備,所述電子設備包括一前置攝像頭,所述顯示方向切換裝置包括:一方向確定模組,用於 在所述電子設備旋轉後,確定所述電子設備之一螢幕上顯示內容的待切換方向;一人臉確定模組,用於透過所述前置攝像頭擷取之一人臉圖像確定一人臉位置;一方向檢測模組,用於檢測所述方向確定模組確定的所述待切換方向與所述人臉確定模組確定的所述人臉位置是否匹配以使所述螢幕上顯示內容相對於使用者為正向影像;以及一方向切換模組,用於若所述方向檢測模組的檢測結果為所述待切換方向與所述人臉位置匹配,則根據所述待切換方向將所述螢幕上顯示內容的當前顯示方向進行切換。 The display direction switching device of the present invention is used for an electronic device, the electronic device includes a front camera, and the display direction switching device includes: a direction determining module, configured to: After the electronic device is rotated, determining a direction to be switched of the content displayed on one of the electronic devices; a face determining module configured to determine a face position by capturing a face image through the front camera; a direction detecting module, configured to detect whether the direction to be switched determined by the direction determining module matches the face position determined by the face determining module, so that the displayed content on the screen is relative to the use And a direction switching module, configured to: if the detection result of the direction detecting module is that the to-be-switched direction matches the face position, the screen is to be switched according to the to-be-switched direction The current display direction of the displayed content is switched.

本發明之電子設備包括如上所述的顯示方向切換裝置。 The electronic device of the present invention includes the display direction switching device as described above.

本發明實施例提供的技術方案帶來的有益效果是:透過前置攝像頭擷取的人臉圖像確定人臉位置,檢測待切換方向與人臉位置是否匹配,根據檢測結果切換螢幕上顯示內容的顯示方向,藉此解決當電子設備發生旋轉時,螢幕上顯示內容的顯示方向在自動跟隨重力加速度方向切換後,會和使用者實際的視線方向不一致,使用者需要將電子設備旋轉回來後,關閉該切換功能才能夠正常觀看的問題,達到只有在待切換方向與人臉位置匹配時,才切換螢幕上顯示內容的顯示方向的效果。 The technical solution provided by the embodiment of the present invention has the beneficial effects that the face image captured by the front camera determines the face position, detects whether the to-be-switched direction matches the face position, and switches the display content according to the detection result. The display direction is used to solve the problem that when the electronic device rotates, the display direction of the display content on the screen is automatically inconsistent with the direction of gravity acceleration, and the actual line of sight direction of the user is inconsistent. After the user needs to rotate the electronic device back, The problem that the switching function can be normally viewed is turned off, and the effect of switching the display direction of the displayed content on the screen is only achieved when the direction to be switched matches the position of the face.

400‧‧‧方向確定模組 400‧‧‧ Direction Determination Module

402‧‧‧信號偵測單元 402‧‧‧Signal Detection Unit

404‧‧‧信號檢測單元 404‧‧‧Signal detection unit

406‧‧‧方向確定單元 406‧‧‧ Direction Determination Unit

420‧‧‧人臉確定模組 420‧‧‧Face determination module

422‧‧‧圖像擷取單元 422‧‧‧Image capture unit

422a‧‧‧光線獲取子單元 422a‧‧‧Light Acquisition Subunit

422b‧‧‧曝光分析子單元 422b‧‧‧Exposure Analysis Subunit

422c‧‧‧圖像擷取子單元 422c‧‧‧Image capture subunit

424‧‧‧圖像檢測單元 424‧‧‧Image detection unit

426‧‧‧直線確定單元 426‧‧‧Line Determination Unit

440‧‧‧方向檢測模組 440‧‧‧ Direction Detection Module

460‧‧‧方向切換模組 460‧‧‧ Direction Switching Module

480‧‧‧方向判斷模組 480‧‧‧ Directional Judgment Module

490‧‧‧方向保持模組 490‧‧‧ Directional Holder Module

a、d、e、f‧‧‧方向 a, d, e, f‧‧‧ directions

b、c‧‧‧直線 b, c‧‧‧ straight line

x‧‧‧直角 X‧‧‧right angle

S100-S106、S200-S206、S300-S312‧‧‧步驟 S100-S106, S200-S206, S300-S312‧‧‧ steps

第1圖為本發明一實施例提供的顯示方向切換方法的流程圖。 FIG. 1 is a flowchart of a display direction switching method according to an embodiment of the present invention.

第2A圖為本發明另一實施例提供的顯示方向切換方法的流程圖。 FIG. 2A is a flowchart of a display direction switching method according to another embodiment of the present invention.

第2B圖為本發明另一實施例提供的待切換方向和雙眼所在直線的實施示意圖。 FIG. 2B is a schematic diagram of an implementation of a line to be switched and a line where two eyes are located according to another embodiment of the present invention.

第2C圖為本發明另一實施例提供的待切換方向與雙眼所在直線匹配 的實施示意圖。 FIG. 2C is a diagram showing a direction to be switched and a line matching the eyes according to another embodiment of the present invention. Schematic diagram of the implementation.

第2D圖為本發明另一實施例提供的待切換方向與雙眼所在直線匹配的實施示意圖。 FIG. 2D is a schematic diagram of an implementation of matching a direction of a to-be-switched line with a line of both eyes according to another embodiment of the present invention.

第3A圖為本發明另一實施例提供的顯示方向切換方法的流程圖。 FIG. 3A is a flowchart of a display direction switching method according to another embodiment of the present invention.

第3B圖為本發明另一實施例提供的待切換方向與視線方向的實施示意圖。 FIG. 3B is a schematic diagram of an implementation of a direction to be switched and a direction of a line of sight according to another embodiment of the present invention.

第3C圖為本發明另一實施例提供的待切換方向與視線方向一致的實施示意圖。 FIG. 3C is a schematic diagram of an implementation of a direction to be switched that is consistent with a line of sight direction according to another embodiment of the present invention.

第3D圖為本發明另一實施例提供的當前顯示方向與視線方向一致的實施示意圖。 FIG. 3D is a schematic diagram of an implementation of the current display direction and the line of sight direction according to another embodiment of the present invention.

第3E圖為本發明另一實施例提供的當前顯示方向與視線方向不一致的實施示意圖。 FIG. 3E is a schematic diagram of an implementation in which the current display direction and the line of sight direction are inconsistent according to another embodiment of the present invention.

第4圖為本發明一實施例提供的顯示方向切換裝置的方塊圖。 FIG. 4 is a block diagram of a display direction switching device according to an embodiment of the present invention.

第5圖為本發明另一實施例提供的顯示方向切換裝置的方塊圖。 FIG. 5 is a block diagram of a display direction switching device according to another embodiment of the present invention.

第6圖為本發明另一實施例提供的顯示方向切換裝置的方塊圖。 FIG. 6 is a block diagram of a display direction switching device according to another embodiment of the present invention.

為了使本發明的目的、技術方案及優點更加清楚明白,以下結合附圖及實施例,對本發明進行進一步詳細說明。應當理解,此處所描述的具體實施例僅僅用以解釋本發明,並不用於限定本發明。 The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

本文中所述的「電子設備」,通常是包括一前置攝像頭的電子設備。具體而言,電子設備可以為智慧手機、平板電腦、電子書閱讀器、MP3(Moving Picture Experts Group Audio Layer III,動態影像專家壓縮標準 音頻層面3)播放機、MP4(Moving Picture Experts Group Audio Layer IV,動態影像專家壓縮標準音頻層面4)播放機、膝上型可攜式電腦和桌上型電腦等等。要說明的是,本文中的「前置攝像頭」可以為內建於電子設備的前置攝像頭,也可以為與電子設備相連而用於擷取電子設備之螢幕前方圖像的外置攝像頭。 The "electronic device" described herein is typically an electronic device that includes a front camera. Specifically, the electronic device can be a smart phone, a tablet, an e-book reader, and an MP3 (Moving Picture Experts Group Audio Layer III) compression standard. Audio level 3) Player, MP4 (Moving Picture Experts Group Audio Layer IV) player, laptop portable computer and desktop computer, etc. It should be noted that the "front camera" in this article may be a front camera built in an electronic device, or an external camera connected to an electronic device for capturing an image of the front of the screen of the electronic device.

請參考第1圖,其為本發明一實施例提供的顯示方向切換方法的流程圖。本實施例主要以該顯示方向切換方法應用於包含有一前置攝像頭的電子設備中來舉例說明。該顯示方向切換方法包括:步驟S100,在所述電子設備旋轉後,確定所述電子設備之一螢幕上顯示內容的待切換方向。 Please refer to FIG. 1 , which is a flowchart of a display direction switching method according to an embodiment of the present invention. This embodiment is mainly illustrated by using the display direction switching method in an electronic device including a front camera. The display direction switching method includes: in step S100, after the electronic device rotates, determining a to-be-switched direction of content displayed on one of the electronic devices.

步驟S102,透過所述前置攝像頭擷取之一人臉圖像確定一人臉位置。 Step S102, determining a face position by capturing a face image from the front camera.

步驟S104,檢測所述待切換方向與所述人臉位置是否匹配以使所述螢幕上顯示內容相對於使用者為正向影像。 Step S104: It is detected whether the to-be-switched direction matches the face position to make the display content on the screen be a forward image with respect to the user.

步驟S106,若檢測結果為所述待切換方向與所述人臉位置匹配,則根據所述待切換方向將所述螢幕上顯示內容的當前顯示方向進行切換。 Step S106: If the detection result is that the to-be-switched direction matches the face position, the current display direction of the content displayed on the screen is switched according to the to-be-switched direction.

綜上所述,本發明實施例提供的顯示方向切換方法透過所述前置攝像頭所擷取的人臉圖像確定人臉位置,檢測所述待切換方向與所述人臉位置是否匹配,根據檢測結果切換所述螢幕上顯示內容的顯示方向,藉此解決當所述電子設備發生旋轉時,所述螢幕上顯示內容的當前顯示方向在自動跟隨重力加速度方向切換後,會和使用者實際的視線方向不一致 而導致使用者需要將所述電子設備旋轉回來後,關閉該切換功能才能夠正常觀看的問題,達到只有在所述待切換方向與所述人臉位置匹配時,才切換所述螢幕上顯示內容的當前顯示方向的效果。 In summary, the display direction switching method provided by the embodiment of the present invention determines a face position through a face image captured by the front camera, and detects whether the to-be-switched direction matches the face position, according to The detection result switches the display direction of the displayed content on the screen, thereby solving the fact that when the electronic device rotates, the current display direction of the displayed content on the screen is automatically followed by the gravity acceleration direction, and the user actually Inconsistent line of sight When the user needs to rotate the electronic device back, the problem that the switching function can be normally viewed is turned off, so that the display content on the screen is switched only when the to-be-switched direction matches the face position. The effect of the current display orientation.

由於人臉位置可以採用以下至少一種特徵來表示:1、雙眼所在直線;以及2、視線方向,所述視線方向亦即人臉中與雙眼連線垂直且指向嘴巴的方向,所以下面分別用兩個不同的實施例來對本發明進行詳細闡述。 Since the face position can be represented by at least one of the following features: 1. a straight line where the eyes are located; and 2, a line of sight direction, that is, a direction perpendicular to the line connecting the eyes and pointing to the mouth in the face, so the following The invention is illustrated in detail by two different embodiments.

請參考第2A圖,其為本發明另一實施例提供的顯示方向切換方法的流程圖。本實施例主要以該顯示方向切換方法應用於包含有前置攝像頭的電子設備中,人臉位置採用雙眼所在直線為特徵來舉例說明。該顯示方向切換方法包括:步驟S200,在所述電子設備旋轉後,確定所述電子設備之一螢幕上顯示內容的待切換方向。 Please refer to FIG. 2A , which is a flowchart of a display direction switching method according to another embodiment of the present invention. In this embodiment, the display direction switching method is mainly applied to an electronic device including a front camera, and the position of the face is characterized by a straight line of both eyes. The display direction switching method includes: Step S200: After the electronic device rotates, determine a to-be-switched direction of the content displayed on one of the electronic devices.

更明確地說,在所述電子設備旋轉後,通常根據一重力加速度方向來確定所述螢幕上顯示內容的待切換方向。具體而言,本步驟包括但不限於如下三個子步驟: More specifically, after the electronic device is rotated, the direction to be switched of the displayed content on the screen is generally determined according to a direction of gravity acceleration. Specifically, this step includes but is not limited to the following three sub-steps:

1、所述電子設備每隔一預定時間間隔透過一內建感測器偵測所述電子設備的重力加速度方向。所述內建感測器可以是重力加速度感測器,所述預定時間間隔可以是重力加速度感測器的預設採樣時間間隔。 1. The electronic device detects a direction of gravitational acceleration of the electronic device through a built-in sensor at a predetermined time interval. The built-in sensor may be a gravity acceleration sensor, and the predetermined time interval may be a preset sampling time interval of the gravity acceleration sensor.

2、所述電子設備檢測重力加速度方向是否與所述螢幕上顯示內容的當前顯示方向是否一致。 2. The electronic device detects whether the direction of gravity acceleration is consistent with the current display direction of the displayed content on the screen.

3、若檢測結果為重力加速度方向與所述螢幕上顯示內容的 當前顯示方向不一致,則所述電子設備將重力加速度方向確定為所述螢幕上顯示內容的待切換方向。舉例來說,在所述電子設備從直向旋轉到橫向後,待切換方向如第2B圖中方向a所示。 3. If the detection result is the direction of gravity acceleration and the content displayed on the screen If the current display directions are inconsistent, the electronic device determines the direction of gravity acceleration as the direction to be switched of the content displayed on the screen. For example, after the electronic device is rotated from the straight direction to the lateral direction, the direction to be switched is as shown by the direction a in FIG. 2B.

步驟S202,透過所述前置攝像頭擷取之一人臉圖像以確定一人臉位置。 Step S202, capturing one of the face images through the front camera to determine a face position.

更明確地說,所述電子設備進一步透過所述前置攝像頭擷取之人臉圖像確定人臉位置,在本實施例中,人臉位置即為雙眼所在直線。具體而言,本步驟包括但不限於如下三個子步驟: More specifically, the electronic device further determines the face position through the face image captured by the front camera. In this embodiment, the face position is the line where the eyes are located. Specifically, this step includes but is not limited to the following three sub-steps:

1、所述電子設備透過所述前置攝像頭擷取至少一張圖像。所述電子設備可以透過所述前置攝像頭僅擷取一張圖像,也可以連續擷取多張圖像,還可以連續擷取多張圖像後合併為一張圖像。 1. The electronic device captures at least one image through the front camera. The electronic device can capture only one image through the front camera, or can continuously capture multiple images, and can continuously capture multiple images and combine them into one image.

另外,由於使用者躺在床上使用所述電子設備的場景多為夜晚,而夜晚的光線強度較差,影響擷取到的圖像的清晰度和亮度,在一實施例中,所述電子設備進一步包括一光線感測器,所述電子設備可以透過所述光線感測器獲取當前環境的光線強度,然後所述電子設備透過光線強度確定曝光時間,曝光時間與光線強度呈負相關關係,亦即光線強度越低,所需的曝光時間越長;光線強度越高,所需的曝光時間越短,然後所述前置攝像頭根據確定的曝光時間擷取至少一張圖像,藉此獲取到滿足分析需求的圖像。 In addition, since the scene in which the user is lying on the bed using the electronic device is mostly night, and the light intensity at night is poor, affecting the sharpness and brightness of the captured image, in an embodiment, the electronic device further Included as a light sensor, the electronic device can obtain the light intensity of the current environment through the light sensor, and then the electronic device determines the exposure time through the light intensity, and the exposure time is negatively correlated with the light intensity, that is, The lower the light intensity, the longer the exposure time required; the higher the light intensity, the shorter the exposure time required, and then the front camera captures at least one image based on the determined exposure time, thereby obtaining satisfaction Analyze the image of the demand.

2、所述電子設備檢測擷取到的至少一張圖像中是否存在人臉區域。 2. The electronic device detects whether a face area exists in at least one of the captured images.

3、若檢測結果為所述至少一張圖像中存在人臉區域,則所 述電子設備根據人臉區域上的雙眼區域來確定雙眼所在直線。 3. If the detection result is that there is a face area in the at least one image, then The electronic device determines the straight line of the eyes according to the binocular area on the face area.

人臉分析和人臉中雙眼特徵的分析為本發明所屬技術領域中具有通常知識者所熟知的內容,在此不再贅述。所述電子設備將確定的雙眼所在直線作為人臉位置。舉例來說,人臉位置如第2B圖中的直線b所示。 The analysis of the face and the analysis of the features of the eyes in the face of the present invention are well known to those of ordinary skill in the art, and will not be described herein. The electronic device uses the determined straight line of the eyes as the face position. For example, the face position is as shown by the straight line b in Fig. 2B.

當然,若檢測結果為所有圖像均不存在人臉區域,則停止後續步驟的執行;或者,等待預定時間之後,重新執行步驟S200。 Of course, if the detection result is that there is no face area in all the images, the execution of the subsequent steps is stopped; or, after waiting for the predetermined time, step S200 is re-executed.

步驟S204,檢測所述待切換方向與所述雙眼所在直線的夾角是否為垂直關係。 Step S204: It is detected whether the angle between the to-be-switched direction and the line where the two eyes are located is a vertical relationship.

更明確地說,所述電子設備檢測所述待切換方向與所述雙眼所在直線的夾角是否為垂直關係,垂直關係指所述待切換方向與所述雙眼所在直線的夾角是否屬於[90°-α,90°+α],α為一預定臨界值。 More specifically, the electronic device detects whether the angle between the direction to be switched and the line of the two eyes is a vertical relationship, and the vertical relationship refers to whether the angle between the direction to be switched and the line where the eyes are located belongs to [90 °-α, 90°+α], α is a predetermined critical value.

步驟S206,若檢測結果為所述待切換方向與所述雙眼所在直線的夾角為垂直關係,則根據所述待切換方向將所述螢幕上顯示內容的當前顯示方向進行切換。 Step S206: If the detection result is that the angle between the to-be-switched direction and the straight line of the two eyes is perpendicular, the current display direction of the content displayed on the screen is switched according to the to-be-switched direction.

更明確地說,若檢測結果為所述待切換方向與所述雙眼所在直線的夾角為垂直關係,亦即待切換方向與人臉位置匹配,則所述電子設備根據所述待切換方向將所述螢幕上顯示內容的當前顯示方向進行切換。舉例來說,在第2C圖中,表示待切換方向的方向a和表示人臉位置(即雙眼所在直線)的直線b所成的角度為直角x,則所述電子設備將所述螢幕上顯示內容的顯示方向切換至如方向a所示。 More specifically, if the detection result is that the angle between the to-be-switched direction and the line of the two eyes is perpendicular, that is, the to-be-switched direction matches the face position, the electronic device according to the to-be-switched direction The current display direction of the displayed content on the screen is switched. For example, in FIG. 2C, the angle between the direction a indicating the direction to be switched and the line b indicating the position of the face (ie, the line where the eyes are located) is a right angle x, and the electronic device will be on the screen. The display direction of the displayed content is switched as shown by the direction a.

當然,若檢測結果為所述待切換方向與所述雙眼所在直線的夾角不為垂直關係,則所述電子設備可以保持所述螢幕上顯示內容的當前 顯示方向不變。舉例來說,在第2D圖中,表示待切換方向的方向a和表示人臉位置(即雙眼所在直線)的直線c不垂直,而是接近平行,則所述電子設備保持所述螢幕上顯示內容的當前顯示方向不變。 Of course, if the detection result is that the angle between the to-be-switched direction and the straight line of the two eyes is not perpendicular, the electronic device may maintain the current content displayed on the screen. The display direction is unchanged. For example, in the 2D diagram, the direction a indicating the direction to be switched and the line c indicating the position of the face (ie, the line where the eyes are located) are not perpendicular, but are nearly parallel, and the electronic device remains on the screen. The current display orientation of the displayed content does not change.

綜上所述,本發明實施例提供的顯示方向切換方法透過所述前置攝像頭擷取的人臉圖像確定所述人臉位置,檢測所述待切換方向與所述人臉位置是否匹配,根據檢測結果切換所述螢幕上顯示內容的當前顯示方向,藉此解決當所述電子設備發生旋轉時,所述螢幕上顯示內容的當前顯示方向在自動跟隨重力加速度方向切換後,會和使用者實際的視線方向不一致而導致使用者需要將所述電子設備旋轉回來後,關閉該切換功能才能夠正常觀看的問題,達到只有在所述待切換方向與所述人臉位置匹配時,才切換所述螢幕上顯示內容的當前顯示方向的效果。 In summary, the display direction switching method provided by the embodiment of the present invention determines the face position through the face image captured by the front camera, and detects whether the to-be-switched direction matches the face position. Switching the current display direction of the displayed content on the screen according to the detection result, thereby solving the problem that when the electronic device rotates, the current display direction of the displayed content on the screen is automatically followed by the gravity acceleration direction, and the user If the actual line of sight direction is inconsistent and the user needs to rotate the electronic device back, the problem that the switching function can be normally viewed is closed, so that the switch is only performed when the to-be-switched direction matches the face position. The effect of displaying the current display orientation of the content on the screen.

此外,本實施例由於僅需要識別雙眼所在直線就可以完成主要的計算工作,因此計算量非常小,非常適合計算性能不高的移動終端使用。 In addition, in this embodiment, since only the line where the eyes are located needs to be recognized, the main calculation work can be completed, so the calculation amount is very small, which is very suitable for the mobile terminal with low calculation performance.

請參考第3A圖,其為另一實施例提供的顯示方向切換方法的流程圖。本實施例主要以該顯示方向切換方法應用於包含有前置攝像頭的電子設備中,人臉位置採用視線方向為特徵來舉例說明,視線方向是指人臉中與雙眼連線垂直且指向嘴巴的方向。該顯示方向切換方法包括: Please refer to FIG. 3A , which is a flowchart of a display direction switching method provided by another embodiment. In this embodiment, the display direction switching method is mainly applied to an electronic device including a front camera. The position of the face is characterized by a line of sight direction. The line of sight direction refers to a line perpendicular to the line connecting the eyes and pointing to the mouth. The direction. The display direction switching method includes:

步驟S300,在所述電子設備旋轉後,確定所述電子設備之一螢幕上顯示內容的待切換方向。 Step S300, after the electronic device rotates, determine a to-be-switched direction of the content displayed on one of the electronic devices.

更明確地說,在所述電子設備旋轉後,通常根據重力加速度方向來確定所述螢幕上顯示內容的待切換方向。具體而言,本步驟包括但 不限於如下三個子步驟: More specifically, after the electronic device is rotated, the direction to be switched of the display content on the screen is generally determined according to the direction of gravity acceleration. Specifically, this step includes but Not limited to the following three sub-steps:

1、所述電子設備每隔一預定時間間隔透過一內建感測器偵測所述電子設備的重力加速度方向。所述內建感測器可以是重力加速度感測器,所述預定時間間隔可以是重力加速度感測器的預設採樣時間間隔。 1. The electronic device detects a direction of gravitational acceleration of the electronic device through a built-in sensor at a predetermined time interval. The built-in sensor may be a gravity acceleration sensor, and the predetermined time interval may be a preset sampling time interval of the gravity acceleration sensor.

2、所述電子設備檢測重力加速度方向是否與所述螢幕上顯示內容的當前顯示方向是否一致。 2. The electronic device detects whether the direction of gravity acceleration is consistent with the current display direction of the displayed content on the screen.

3、若檢測結果為重力加速度方向與所述螢幕上顯示內容的當前顯示方向不一致,則所述電子設備將重力加速度方向確定為螢幕上顯示內容的待切換方向。舉例來說,在所述電子設備從直向旋轉到橫向後,待切換方向如第3B圖中方向a所示。 3. If the detection result is that the direction of the gravitational acceleration is inconsistent with the current display direction of the content displayed on the screen, the electronic device determines the direction of the gravitational acceleration as the direction to be switched of the content displayed on the screen. For example, after the electronic device is rotated from the straight direction to the lateral direction, the direction to be switched is as shown by the direction a in FIG. 3B.

步驟S302,透過所述前置攝像頭擷取之一人臉圖像以確定一人臉位置。 Step S302, capturing a face image through the front camera to determine a face position.

更明確地說,所述電子設備進一步透過所述前置攝像頭擷取之人臉圖像確定人臉位置,在本實施例中,人臉位置即為視線方向所在位置。具體而言,本步驟包括但不限於如下三個子步驟: More specifically, the electronic device further determines the face position through the face image captured by the front camera. In the embodiment, the face position is the position of the line of sight direction. Specifically, this step includes but is not limited to the following three sub-steps:

1、電子設備透過所述前置攝像頭擷取至少一張圖像。所述電子設備可以透過所述前置攝像頭僅擷取一張圖像,也可以連續擷取多張圖像,還可以連續擷取多張圖像後合併為一張圖像。 1. The electronic device captures at least one image through the front camera. The electronic device can capture only one image through the front camera, or can continuously capture multiple images, and can continuously capture multiple images and combine them into one image.

另外,由於使用者躺在床上使用所述電子設備的場景多為夜晚,而夜晚的光線強度較差,影響擷取到的圖像的清晰度和亮度。在一實施例中,所述電子設備進一步包括一光線感測器,所述電子設備可以透過所述光線感測器獲取當前環境的光線強度,然後所述電子設備透過光線強 度確定曝光時間,曝光時間與光線強度呈負相關關係,亦即光線強度越低,所需的曝光時間越長;光線強度越高,所需的曝光時間越短,然後所述前置攝像頭根據確定的曝光時間擷取至少一張圖像,藉此獲取到滿足分析需求的圖像。 In addition, since the scene in which the user is lying on the bed using the electronic device is mostly night, the light intensity at night is poor, which affects the sharpness and brightness of the captured image. In an embodiment, the electronic device further includes a light sensor, wherein the electronic device can obtain the light intensity of the current environment through the light sensor, and then the electronic device transmits the light The exposure time is determined, and the exposure time is negatively correlated with the light intensity, that is, the lower the light intensity, the longer the exposure time required; the higher the light intensity, the shorter the exposure time required, and then the front camera is based on The determined exposure time captures at least one image, thereby obtaining an image that satisfies the analysis needs.

2、所述電子設備檢測擷取到的至少一張圖像中是否存在人臉區域。 2. The electronic device detects whether a face area exists in at least one of the captured images.

3、若檢測結果為至少一張圖像中存在人臉區域,則所述電子設備根據人臉區域上的特徵區域來確定使用者的視線方向,特徵區域包括眼睛區域、眉毛區域、鼻子區域、嘴巴區域和耳朵區域中的至少一種,如上所述,使用者的視線方向是指人臉中與雙眼連線垂直且指向嘴巴的方向。 3. If the detection result is that there is a face region in at least one image, the electronic device determines a line of sight direction of the user according to the feature region on the face region, and the feature region includes an eye region, an eyebrow region, a nose region, At least one of the mouth area and the ear area, as described above, the user's line of sight direction refers to a direction in the face that is perpendicular to the line of the eyes and points to the mouth.

人臉分析和人臉區域上的特徵區域分析為本發明所屬技術領域中具有通常知識者所熟知的內容,在此不再贅述。所述電子設備將確定的視線方向作為人臉位置。舉例來說,視線方向如第3B圖中的方向d所示。 The face analysis and the feature region analysis on the face region are well known to those of ordinary skill in the art, and will not be described herein. The electronic device uses the determined line of sight direction as a face position. For example, the line of sight direction is as indicated by the direction d in FIG. 3B.

當然,若檢測結果為所有圖像均不存在人臉區域,則停止後續步驟的執行;或者,等待預定時間之後,重新執行步驟S300。 Of course, if the detection result is that there is no face area in all the images, the execution of the subsequent steps is stopped; or, after waiting for the predetermined time, step S300 is re-executed.

步驟S304,檢測所述待切換方向與所述視線方向是否一致,若是,執行步驟S306,若否,執行步驟S308。所述電子設備檢測待所述切換方向與所述視線方向是否一致是指待切換方向與視線方向的夾角是否屬於[0°-β,0°+β],β是預定臨界值。 Step S304, detecting whether the to-be-switched direction is consistent with the line-of-sight direction. If yes, step S306 is performed, and if no, step S308 is performed. Whether the electronic device detects whether the switching direction is consistent with the line of sight direction refers to whether an angle between the direction to be switched and the direction of the line of sight belongs to [0°-β, 0°+β], and β is a predetermined threshold.

步驟S306,若檢測結果為所述待切換方向與所述視線方向一致,則根據所述待切換方向將所述螢幕上顯示內容的顯示方向進行切換。 Step S306, if the detection result is that the to-be-switched direction is consistent with the line-of-sight direction, the display direction of the content displayed on the screen is switched according to the to-be-switched direction.

更明確地說,若檢測結果為所述待切換方向與所述視線方向一致,亦即所述待切換方向與所述人臉位置匹配,則所述電子設備根據所述待切換方向將所述螢幕上顯示內容的顯示方向進行切換。舉例來說,在第3C圖中,表示待切換方向的方向a和表示視線方向的方向d一致,則所述電子設備將所述螢幕上顯示內容的顯示方向切換至如方向a所示。 More specifically, if the detection result is that the to-be-switched direction is consistent with the line-of-sight direction, that is, the to-be-switched direction matches the face position, the electronic device according to the to-be-switched direction The display direction of the displayed content on the screen is switched. For example, in FIG. 3C, the direction a indicating the direction to be switched coincides with the direction d indicating the direction of the line of sight, the electronic device switches the display direction of the content displayed on the screen to as indicated by the direction a.

步驟S308,若檢測結果為所述待切換方向與所述視線方向不一致,則判斷所述螢幕上顯示內容的當前顯示方向與所述視線方向是否一致,若是,執行步驟S310,若否,執行步驟S312。 In step S308, if the detection result is that the to-be-switched direction does not match the line-of-sight direction, it is determined whether the current display direction of the content displayed on the screen is consistent with the line of sight direction. If yes, step S310 is performed, and if no, steps are performed. S312.

步驟S310,若判斷結果為所述當前顯示方向與所述視線方向一致,則保持所述螢幕上顯示內容的當前顯示方向不變。舉例來說,在第3D圖中,表示當前顯示方向的方向f和表示所述視線方向的方向d一致,則所述電子設備保持螢幕上顯示內容的當前顯示方向不變,亦即如方向f所示。 Step S310, if the result of the determination is that the current display direction is consistent with the line of sight direction, the current display direction of the displayed content on the screen is kept unchanged. For example, in the 3D figure, the direction f indicating the current display direction and the direction d indicating the direction of the line of sight are the same, the electronic device keeps the current display direction of the displayed content on the screen unchanged, that is, as the direction f Shown.

步驟S312,若判斷結果為當前顯示方向與所述視線方向不一致,將所述螢幕上顯示內容的當前顯示方向切換為與所述視線方向一致。舉例來說,在第3E圖中,表示當前顯示方向的方向e和表示視線方向的方向d不一致,則所述電子設備將所述螢幕上顯示內容的當前顯示方向切換為方向e。 Step S312, if the result of the determination is that the current display direction does not coincide with the line of sight direction, the current display direction of the display content on the screen is switched to be consistent with the line of sight direction. For example, in FIG. 3E, the direction e indicating the current display direction and the direction d indicating the direction of the line of sight do not coincide, and the electronic device switches the current display direction of the content displayed on the screen to the direction e.

綜上所述,本發明實施例提供的顯示方向切換方法透過所述前置攝像頭擷取的人臉圖像確定所述人臉位置,檢測所述待切換方向與所述人臉位置是否匹配,根據檢測結果切換所述螢幕上顯示內容的當前顯示方向,藉此解決當所述電子設備發生旋轉時,所述螢幕上顯示內容的當前 顯示方向在自動跟隨重力加速度方向切換後,會和使用者實際的視線方向不一致而導致使用者需要將所述電子設備旋轉回來後,關閉該切換功能才能夠正常觀看的問題,達到只有在所述待切換方向與所述人臉位置匹配時,才切換所述螢幕上顯示內容的當前顯示方向的效果。 In summary, the display direction switching method provided by the embodiment of the present invention determines the face position through the face image captured by the front camera, and detects whether the to-be-switched direction matches the face position. Switching the current display direction of the displayed content on the screen according to the detection result, thereby solving the current display content on the screen when the electronic device rotates After the automatic direction of the gravitational acceleration direction is switched, the display direction may be inconsistent with the actual line of sight direction of the user, and the user needs to turn the electronic device back after rotating the electronic device to turn off the switching function to be able to view normally. When the switching direction matches the face position, the effect of the current display direction of the content displayed on the screen is switched.

此外,本實施例由於透過確認眼睛區域、眉毛區域、鼻子區域、嘴巴區域和耳朵區域中的至少一種,進一步精確人臉位置的方向,提高顯示方向切換的精確度。 In addition, in the present embodiment, since the direction of the face position is further accurately corrected by confirming at least one of the eye region, the eyebrow region, the nose region, the mouth region, and the ear region, the accuracy of the display direction switching is improved.

以下為本發明的裝置實施例,對於其中未詳盡描述的細節,可以參考上述對應的方法實施例。 The following is an embodiment of the device of the present invention. For details that are not described in detail, reference may be made to the corresponding method embodiments described above.

請參考第4圖,其為本發明一實施例提供的顯示方向切換裝置的方塊圖。該顯示方向切換裝置可以透過軟體、硬體或者兩者的結合實現成為電子設備的全部或者部分。該顯示方向切換裝置可以包括:一方向確定模組400、一人臉確定模組420、一方向檢測模組440以及一方向切換模組460。 Please refer to FIG. 4, which is a block diagram of a display direction switching device according to an embodiment of the present invention. The display direction switching device can be implemented as all or part of the electronic device through a combination of software, hardware, or both. The display direction switching device may include: a direction determining module 400, a face determining module 420, a direction detecting module 440, and a direction switching module 460.

所述方向確定模組400用於在所述電子設備旋轉後,確定所述電子設備之一螢幕上顯示內容的待切換方向。 The direction determining module 400 is configured to determine, after the electronic device is rotated, a to-be-switched direction of content displayed on one of the electronic devices.

所述人臉確定模組420用於透過一前置攝像頭擷取一人臉圖像以確定一人臉位置。 The face determination module 420 is configured to capture a face image through a front camera to determine a face position.

所述方向檢測模組440用於檢測所述方向確定模組420所確定之所述待切換方向與所述人臉確定模組440所確定之所述人臉位置是否匹配以使所述螢幕上顯示內容相對於使用者為正向影像。 The direction detecting module 440 is configured to detect whether the to-be-switched direction determined by the direction determining module 420 matches the face position determined by the face determining module 440 to enable the screen to be on the screen. The display content is a positive image with respect to the user.

所述方向切換模組460用於若所述方向檢測模組440的檢測 結果為所述待切換方向與所述人臉位置匹配,則根據所述待切換方向將所述螢幕上顯示內容的當前顯示方向進行切換。 The direction switching module 460 is configured to detect the direction detecting module 440. As a result, if the to-be-switched direction matches the face position, the current display direction of the content displayed on the screen is switched according to the to-be-switched direction.

綜上所述,本發明實施例提供的顯示方向切換裝置透過所述前置攝像頭擷取的人臉圖像確定所述人臉位置,檢測所述待切換方向與所述人臉位置是否匹配,根據檢測結果切換所述螢幕上顯示內容的顯示方向,解決當所述電子設備發生旋轉時,所述螢幕上顯示內容的當前顯示方向在自動跟隨重力加速度方向切換後,會和使用者實際的視線方向不一致,使用者需要將所述電子設備旋轉回來後,關閉該切換功能才能夠正常觀看的問題,達到只有在所述待切換方向與所述人臉位置匹配時,才切換所述螢幕上顯示內容的當前顯示方向的效果。 In summary, the display direction switching device provided by the embodiment of the present invention determines the face position through the face image captured by the front camera, and detects whether the to-be-switched direction matches the face position. Switching the display direction of the displayed content on the screen according to the detection result, and resolving that when the electronic device rotates, the current display direction of the displayed content on the screen is automatically followed by the gravity acceleration direction, and the user's actual line of sight is The direction is inconsistent, and the user needs to turn the electronic device back to turn off the switching function to be able to view normally, so that the screen display is switched only when the to-be-switched direction matches the face position. The effect of the current display orientation of the content.

由於所述人臉位置可以採用以下至少一種特徵來表示:1、雙眼所在直線;以及2、視線方向,所述視線方向亦即人臉中與雙眼連線垂直且指向嘴巴的方向,下面分別用兩個不同的實施例來對上述兩種特徵進行詳細闡述。 Since the face position can be represented by at least one of the following features: 1. a straight line where the eyes are located; and 2, a line of sight direction, that is, a direction perpendicular to the line connecting the eyes and pointing to the mouth in the face, below The above two features are elaborated in two different embodiments.

請參考第5圖,其為本發明另一實施例提供的顯示方向切換裝置的方塊圖。本實施例主要以該顯示方向切換裝置應用於包含有前置攝像頭的電子設備中,人臉位置採用雙眼所在直線為特徵來舉例說明。該顯示方向切換裝置包括一方向確定模組400、一人臉確定模組420、一方向檢測模組440以及一方向切換模組460。 Please refer to FIG. 5, which is a block diagram of a display direction switching device according to another embodiment of the present invention. In this embodiment, the display direction switching device is mainly applied to an electronic device including a front camera, and the position of the face is characterized by a straight line of both eyes. The display direction switching device includes a direction determining module 400, a face determining module 420, a direction detecting module 440, and a direction switching module 460.

所述方向確定模組400用於在所述電子設備旋轉後,確定所述電子設備之一螢幕上顯示內容的待切換方向。 The direction determining module 400 is configured to determine, after the electronic device is rotated, a to-be-switched direction of content displayed on one of the electronic devices.

更明確地說,在所述電子設備旋轉後,通常根據重力加速度 方向來確定所述螢幕上顯示內容的待切換方向。具體而言,所述方向確定模組400包括一信號偵測單元402、一信號檢測單元404以及一方向確定單元406。 More specifically, after the electronic device is rotated, usually according to the acceleration of gravity The direction is to determine the direction of the display to be switched on the screen. Specifically, the direction determining module 400 includes a signal detecting unit 402, a signal detecting unit 404, and a direction determining unit 406.

所述信號偵測單元402用於每隔一預定時間間隔透過一內建感測器偵測所述電子設備的重力加速度方向。 The signal detecting unit 402 is configured to detect a direction of gravity acceleration of the electronic device through a built-in sensor at every predetermined time interval.

所述信號檢測單元404用於檢測所述信號偵測單元402所偵測到的重力加速度方向是否與所述螢幕上顯示內容的當前顯示方向是否一致。 The signal detecting unit 404 is configured to detect whether the direction of the gravitational acceleration detected by the signal detecting unit 402 is consistent with the current display direction of the content displayed on the screen.

所述方向確定單元406用於若所述信號檢測單元404的檢測結果為重力加速度方向與所述螢幕上顯示內容的當前顯示方向不一致,將重力加速度方向確定為所述螢幕上顯示內容的待切換方向。 The direction determining unit 406 is configured to determine, when the detection result of the signal detecting unit 404 is that the direction of the gravity acceleration is inconsistent with the current display direction of the content displayed on the screen, determine the direction of the gravity acceleration as the content to be switched on the screen. direction.

所述人臉確定模組420用於透過所述前置攝像頭擷取一人臉圖像以確定一人臉位置。更明確地說,所述電子設備透過所述前置攝像頭擷取的人臉圖像確定所述人臉位置,在本實施例中,所述人臉位置即為雙眼所在直線。具體而言,所述人臉確定模組420包括一圖像擷取單元422、一圖像檢測單元424以及一直線確定單元426。 The face determination module 420 is configured to capture a face image through the front camera to determine a face position. More specifically, the electronic device determines the face position through the face image captured by the front camera. In the embodiment, the face position is a straight line where the eyes are located. Specifically, the face determination module 420 includes an image capture unit 422, an image detection unit 424, and a line determination unit 426.

所述圖像擷取單元422用於透過所述前置攝像頭擷取至少一張圖像。所述圖像擷取單元422可以僅擷取一張圖像,也可以連續擷取多張圖像,還可以連續擷取多張圖像後合併為一張圖像。 The image capturing unit 422 is configured to capture at least one image through the front camera. The image capturing unit 422 may capture only one image, or may continuously capture multiple images, or may continuously capture multiple images and merge them into one image.

另外,由於使用者躺在床上使用所述電子設備的場景多為夜晚,而夜晚的光線強度較差,影響偵測到的圖像的清晰度和亮度。於一實施例中,所述圖像擷取單元422包括一光線獲取子單元422a、一曝光分析子 單元422b以及一圖像擷取子單元422c。所述電子設備可以透過所述光線獲取子單元422a獲取當前環境的光線強度,然後所述曝光分析子單元422b可以根據所述光線獲取子單元441a獲取的當前環境的光線強度確定曝光時間,曝光時間與光線強度呈負相關關係,亦即光線強度越低,曝光時間越長;光線強度越高,曝光時間越短,然後所述圖像擷取子單元422c根據所述曝光分析子單元422b確定的曝光時間擷取至少一張圖像,藉此擷取到滿足分析需求的圖像。 In addition, since the scene in which the user is lying on the bed using the electronic device is mostly night, the light intensity at night is poor, which affects the sharpness and brightness of the detected image. In an embodiment, the image capturing unit 422 includes a light acquiring subunit 422a and an exposure analyzer. Unit 422b and an image capture sub-unit 422c. The electronic device may obtain the light intensity of the current environment through the light acquiring sub-unit 422a, and then the exposure analyzing sub-unit 422b may determine the exposure time according to the light intensity of the current environment acquired by the light acquiring sub-unit 441a, and the exposure time. A negative correlation with the light intensity, that is, the lower the light intensity, the longer the exposure time; the higher the light intensity, the shorter the exposure time, and then the image capturing sub-unit 422c determines according to the exposure analysis sub-unit 422b. The exposure time captures at least one image, thereby capturing an image that satisfies the analysis needs.

所述圖像檢測單元424用於檢測所述圖像擷取單元422擷取到的至少一張圖像中是否存在人臉區域。 The image detecting unit 424 is configured to detect whether a face region exists in at least one image captured by the image capturing unit 422.

所述直線確定單元426用於若所述圖像檢測單元424的檢測結果為至少一張圖像中存在人臉區域,則根據人臉區域上的雙眼區域來確定雙眼所在直線。 The line determining unit 426 is configured to determine a line where the eyes are located according to the binocular area on the face area if the detection result of the image detecting unit 424 is that there is a face area in at least one image.

當然,若所述圖像檢測單元424的檢測結果為所有圖像均不存在人臉區域,則停止後續步驟的執行;或者,等待所述曝光分析子單元422b確定的曝光時間之後,所述圖像擷取子單元422c重新擷取至少一張圖像。 Of course, if the detection result of the image detecting unit 424 is that there is no face area in all the images, the execution of the subsequent steps is stopped; or, after waiting for the exposure time determined by the exposure analysis sub-unit 422b, the figure The capture sub-unit 422c retrieves at least one image.

所述方向檢測模組440用於檢測所述方向確定模組400確定的待切換方向與所述直線確定單元426確定的雙眼所在直線的夾角是否為垂直關係。 The direction detecting module 440 is configured to detect whether the angle between the direction to be switched determined by the direction determining module 400 and the line of the eyes determined by the line determining unit 426 is a vertical relationship.

更明確地說,所述方向檢測模組440檢測待切換方向與雙眼所在直線的夾角是否為垂直關係是指所述方向確定模組400確定的待切換方向與所述直線確定單元426確定的雙眼所在直線的夾角是否屬於[90°-α, 90°+α],α是預定臨界值。 More specifically, the direction detecting module 440 detects whether the angle between the direction to be switched and the line of the two eyes is a vertical relationship, and the direction to be switched determined by the direction determining module 400 is determined by the line determining unit 426. Whether the angle of the line where the eyes are located belongs to [90°-α, 90°+α], α is a predetermined threshold.

所述方向切換模組460用於若所述方向檢測模組440的檢測結果為待切換方向與雙眼所在直線的夾角為垂直關係,則根據待切換方向將所述螢幕上顯示內容的當前顯示方向進行切換。 The direction switching module 460 is configured to: if the detection result of the direction detecting module 440 is that the angle between the to-be-switched direction and the line of the two eyes is perpendicular, the current display of the content displayed on the screen according to the direction to be switched Switch directions.

當然,若所述方向檢測模組440的檢測結果為待切換方向與雙眼所在直線的夾角不為垂直關係,則所述方向切換模組460可以保持所述螢幕上的顯示內容的當前顯示方向不變。 Of course, if the detection result of the direction detecting module 440 is that the angle between the direction to be switched and the line of the two eyes is not perpendicular, the direction switching module 460 can maintain the current display direction of the display content on the screen. constant.

請參考第6圖,其為本發明另一實施例提供的顯示方向切換裝置的方塊圖。本實施例主要以該顯示方向切換裝置應用於包含有前置攝像頭的電子設備中,人臉位置採用視線方向為特徵來舉例說明,視線方向是指人臉中與雙眼連線垂直且指向嘴巴的方向。該顯示方向切換裝置包括一方向確定模組400、一人臉確定模組420、一方向檢測模組440以及一方向切換模組460。 Please refer to FIG. 6 , which is a block diagram of a display direction switching device according to another embodiment of the present invention. In this embodiment, the display direction switching device is mainly applied to an electronic device including a front camera, and the face position is characterized by a line of sight direction, and the line of sight direction refers to a line perpendicular to the line connecting the eyes and pointing to the mouth. The direction. The display direction switching device includes a direction determining module 400, a face determining module 420, a direction detecting module 440, and a direction switching module 460.

所述方向確定模組400用於在所述電子設備旋轉後,確定所述電子設備之一螢幕上顯示內容的待切換方向。 The direction determining module 400 is configured to determine, after the electronic device is rotated, a to-be-switched direction of content displayed on one of the electronic devices.

在所述電子設備旋轉後,通常根據重力加速度方向來確定所述螢幕上顯示內容的待切換方向。具體而言,所述方向確定模組400包括一信號偵測單元402、一信號檢測單元404以及一方向確定單元406。 After the electronic device is rotated, the direction to be switched of the displayed content on the screen is generally determined according to the direction of gravity acceleration. Specifically, the direction determining module 400 includes a signal detecting unit 402, a signal detecting unit 404, and a direction determining unit 406.

所述信號偵測單元402用於每隔一預定時間間隔透過一內建感測器偵測電子設備的重力加速度方向。 The signal detecting unit 402 is configured to detect the direction of gravity acceleration of the electronic device through a built-in sensor at every predetermined time interval.

所述信號檢測單元404用於檢測所述信號偵測單元402所偵測到的重力加速度方向是否與所述螢幕上顯示內容的當前顯示方向是否一 致。 The signal detecting unit 404 is configured to detect whether the direction of the gravitational acceleration detected by the signal detecting unit 402 is the same as the current display direction of the content displayed on the screen. To.

所述方向確定單元406用於若所述信號檢測單元404的檢測結果為重力加速度方向與所述螢幕上顯示內容的當前顯示方向不一致,則將重力加速度方向確定為所述螢幕上顯示內容的待切換方向。 The direction determining unit 406 is configured to determine the direction of the gravitational acceleration as the content displayed on the screen if the detection result of the signal detecting unit 404 is that the direction of the gravitational acceleration is inconsistent with the current display direction of the content displayed on the screen. Switch direction.

所述人臉確定模組440用於透過所述前置攝像頭擷取一人臉圖像以確定一人臉位置。更明確地說,所述電子設備透過所述前置攝像頭擷取的人臉圖像確定所述人臉位置,在本實施例中,人臉位置即為視線方向。具體而言,所述人臉確定模組420包括一圖像擷取單元422、一圖像檢測單元424以及一視線確定單元428。 The face determination module 440 is configured to capture a face image through the front camera to determine a face position. More specifically, the electronic device determines the face position through the face image captured by the front camera. In the embodiment, the face position is the line of sight direction. Specifically, the face determining module 420 includes an image capturing unit 422, an image detecting unit 424, and a line of sight determining unit 428.

所述圖像擷取單元422用於透過所述前置攝像頭擷取至少一張圖像。所述圖像擷取單元441可以僅擷取一張圖像,也可以連續擷取多張圖像,還可以連續擷取多張圖像後合併為一張圖像。 The image capturing unit 422 is configured to capture at least one image through the front camera. The image capturing unit 441 may capture only one image, or may continuously capture multiple images, or may continuously capture multiple images and merge them into one image.

另外,由於使用者躺在床上使用所述電子設備的場景多為夜晚,而夜晚的光線強度較差,影響偵測到的圖像的清晰度和亮度。於一實施例中,所述圖像擷取單元422包括一光線獲取子單元422a、一曝光分析子單元422b以及一圖像擷取子單元422c。所述電子設備可以透過所述光線獲取子單元422a獲取當前環境的光線強度,然後所述曝光分析子單元422b可以根據所述光線獲取子單元422a獲取的當前環境的光線強度確定曝光時間,曝光時間與光線強度呈負相關關係,亦即光線強度越低,曝光時間越長;光線強度越高,曝光時間越短;然後所述圖像擷取子單元422c根據所述曝光分析子單元422b確定的曝光時間擷取至少一張圖像,藉此獲取到滿足分析需求的圖像。 In addition, since the scene in which the user is lying on the bed using the electronic device is mostly night, the light intensity at night is poor, which affects the sharpness and brightness of the detected image. In an embodiment, the image capturing unit 422 includes a light acquiring subunit 422a, an exposure analyzing subunit 422b, and an image capturing subunit 422c. The electronic device may obtain the light intensity of the current environment through the light acquiring sub-unit 422a, and then the exposure analyzing sub-unit 422b may determine the exposure time according to the light intensity of the current environment acquired by the light acquiring sub-unit 422a, and the exposure time. Negative correlation with light intensity, that is, the lower the light intensity, the longer the exposure time; the higher the light intensity, the shorter the exposure time; then the image capturing sub-unit 422c determines according to the exposure analysis sub-unit 422b The exposure time captures at least one image, thereby obtaining an image that satisfies the analysis needs.

所述圖像檢測單元424用於檢測所述圖像擷取單元422擷取到的至少一張圖像中是否存在人臉區域。 The image detecting unit 424 is configured to detect whether a face region exists in at least one image captured by the image capturing unit 422.

所述視線確定單元428用於若所述圖像檢測單元424的檢測結果為至少一張圖像中存在人臉區域,則根據所述人臉區域上的特徵區域來確定使用者的視線方向,所述特徵區域包括眼睛區域、眉毛區域、鼻子區域、嘴巴區域和耳朵區域中的至少一種,所述使用者的視線方向是指人臉中與雙眼連線垂直且指向嘴巴的方向。 The line of sight determining unit 428 is configured to determine a line of sight direction of the user according to the feature area on the face area if the detection result of the image detecting unit 424 is that there is a face area in the at least one image. The feature area includes at least one of an eye area, an eyebrow area, a nose area, a mouth area, and an ear area, and the user's line of sight direction refers to a direction in the face that is perpendicular to the line of the eyes and points to the mouth.

當然,若所述圖像檢測單元424的檢測結果為所有圖像均不存在人臉區域,則停止後續步驟的執行;或者,等待所述曝光分析子單元422b確定的曝光時間之後,所述圖像擷取子單元422c重新擷取至少一張圖像。 Of course, if the detection result of the image detecting unit 424 is that there is no face area in all the images, the execution of the subsequent steps is stopped; or, after waiting for the exposure time determined by the exposure analysis sub-unit 422b, the figure The capture sub-unit 422c retrieves at least one image.

所述方向檢測模組440用於檢測所述方向確定模組400確定的待切換方向與所述視線確定單元428確定的視線方向是否一致。 The direction detecting module 440 is configured to detect whether the direction to be switched determined by the direction determining module 400 is consistent with the direction of the line of sight determined by the line of sight determining unit 428.

更明確地說,所述方向檢測模組440待切換方向與視線方向是否一致是指待切換方向與視線方向的夾角是否屬於[0°-β,0°+β],β是預定臨界值。 More specifically, whether the direction of the switching direction of the direction detecting module 440 is consistent with the direction of the line of sight refers to whether the angle between the direction to be switched and the direction of the line of sight belongs to [0°-β, 0°+β], and β is a predetermined threshold.

所述方向切換模組460用於若所述方向檢測模組440的檢測結果為待切換方向與視線方向一致,則根據待切換方向將所述螢幕上顯示內容的當前顯示方向進行切換。 The direction switching module 460 is configured to switch the current display direction of the content displayed on the screen according to the direction to be switched if the detection result of the direction detecting module 440 is that the direction to be switched is consistent with the direction of the line of sight.

當然,若所述方向檢測模組440的檢測結果為待切換方向與視線方向不一致,該顯示方向切換裝置可進一步包括一方向判斷模組480以及一方向保持模組490。 Of course, if the detection result of the direction detecting module 440 is that the direction to be switched is inconsistent with the direction of the line of sight, the display direction switching device may further include a direction determining module 480 and a direction maintaining module 490.

所述方向判斷模組480用於若所述方向檢測模組440的檢測結果為待切換方向與視線方向不一致,則判斷所述螢幕上顯示內容的當前顯示方向與所述視線確定單元428確定的視線方向是否一致。 The direction determining module 480 is configured to determine, if the detection result of the direction detecting module 440 is that the direction to be switched is inconsistent with the direction of the line of sight, determine the current display direction of the content displayed on the screen and the line of sight determining unit 428 Whether the line of sight is the same.

所述方向保持模組490用於若所述方向判斷模組480判斷結果為當前顯示方向與視線方向一致,則保持所述螢幕上顯示內容的當前顯示方向不變。 The direction maintaining module 490 is configured to keep the current display direction of the displayed content on the screen unchanged if the direction determining module 480 determines that the current display direction is consistent with the line of sight direction.

所述方向切換模組460用於若所述方向判斷模組480判斷結果為當前顯示方向與視線方向不一致,將所述螢幕上顯示內容的當前顯示方向切換為與所述視線確定單元428確定的視線方向一致。 The direction switching module 460 is configured to switch the current display direction of the display content on the screen to be determined by the line of sight determining unit 428 if the direction determining module 480 determines that the current display direction is inconsistent with the line of sight direction. The line of sight is the same.

本發明所屬技術領域中具有通常知識者還可以理解,實現上述實施例方法中的全部或部分步驟是可以透過程式來指令相關的硬體來完成,所述程式包括指令集合並存儲於一機器可讀取儲存介質中,當該指令集合被執行時,使得該機器可執行上述顯示方向切換方法。所述存儲介質包括唯讀記憶體(Read Only Memory;ROM)/隨機存取記憶體(Random Access Memory;RAM)、磁片及光碟等。 It is also understood by those skilled in the art that all or part of the steps of the above embodiments may be implemented by a program to instruct related hardware, the program including a set of instructions and stored in a machine. Reading the storage medium, when the set of instructions is executed, causing the machine to perform the above display direction switching method. The storage medium includes a read only memory (ROM), a random access memory (RAM), a magnetic disk, a compact disk, and the like.

雖然本發明已用較佳實施例揭露如上,然其並非用以限定本發明,本發明所屬技術領域中具有通常知識者在不脫離本發明之精神和範圍內,當可作各種之更動與潤飾,因此本發明之保護範圍當視後附之申請專利範圍所界定者為準。 While the invention has been described above by way of a preferred embodiment, the invention is not intended to be limited thereto, and the invention may be modified and modified without departing from the spirit and scope of the invention. Therefore, the scope of the invention is defined by the scope of the appended claims.

S100-S106‧‧‧步驟 S100-S106‧‧‧Steps

Claims (14)

一種顯示方向切換方法,用於一電子設備,所述電子設備包括一前置攝像頭,所述顯示方向切換方法包括:在所述電子設備旋轉後,確定所述電子設備之一螢幕上顯示內容的待切換方向;透過所述前置攝像頭擷取一人臉圖像以確定一人臉位置;檢測所述待切換方向與所述人臉位置是否匹配以使所述螢幕上顯示內容相對於使用者為正向影像;以及若檢測結果為所述待切換方向與所述人臉位置匹配,則根據所述待切換方向將所述螢幕上顯示內容的當前顯示方向進行切換。 A display direction switching method is provided for an electronic device, the electronic device includes a front camera, and the display direction switching method includes: after the electronic device is rotated, determining that the display content of one of the electronic devices is displayed on the screen a direction to be switched; capturing a face image through the front camera to determine a face position; detecting whether the to-be-switched direction matches the face position to make the display content on the screen positive with respect to the user And to the image; and if the detection result is that the to-be-switched direction matches the face position, the current display direction of the content displayed on the screen is switched according to the to-be-switched direction. 根據申請專利範圍第1項所述之顯示方向切換方法,其中所述人臉位置以一雙眼所在直線為特徵,透過所述前置攝像頭擷取所述人臉圖像以確定所述人臉位置的步驟包括:透過所述前置攝像頭擷取至少一張圖像;檢測擷取到的所述至少一張圖像中是否存在一人臉區域;以及若檢測結果為所述至少一張圖像中存在所述人臉區域,則根據所述人臉區域上之一雙眼區域來確定所述雙眼所在直線;檢測所述待切換方向與所述人臉位置是否匹配的步驟包括:檢測所述待切換方向與所述雙眼所在直線的夾角是否為垂直關係。 The display direction switching method according to claim 1, wherein the face position is characterized by a line of a pair of eyes, and the face image is captured by the front camera to determine the face. The step of locating includes: capturing at least one image through the front camera; detecting whether a face region exists in the captured at least one image; and if the detection result is the at least one image The presence of the face region is determined according to a binocular region on the face region, and the step of detecting whether the to-be-switched direction matches the face position includes: detecting the location It is stated whether the angle between the switching direction and the straight line of the eyes is a vertical relationship. 根據申請專利範圍第1項所述之顯示方向切換方法,其中所述人臉位置以一視線方向為特徵,所述視線方向是指人臉中與雙眼連線垂直且指向嘴巴的方向,透過所述前置攝像頭擷取所述人臉圖像以確定所述人臉位置 的步驟包括:透過所述前置攝像頭擷取所述至少一張圖像;檢測擷取到的所述至少一張圖像中是否存在一人臉區域;以及若檢測結果為所述至少一張圖像中存在所述人臉區域,則根據所述人臉區域上之一特徵區域來確定所述視線方向,所述特徵區域包括眼睛區域、眉毛區域、鼻子區域、嘴巴區域和耳朵區域中的至少一種;所述檢測所述待切換方向與所述人臉位置是否匹配的步驟包括:檢測所述待切換方向與所述視線方向是否一致。 The display direction switching method according to claim 1, wherein the face position is characterized by a line of sight direction, which is a direction perpendicular to the line connecting the eyes and pointing to the mouth of the face, The front camera captures the face image to determine the face position The step of: capturing the at least one image through the front camera; detecting whether a face region exists in the captured at least one image; and if the detection result is the at least one image Determining the face region according to the feature region of the face region, wherein the feature region includes at least at least an eye region, an eyebrow region, a nose region, a mouth region, and an ear region. The step of detecting whether the to-be-switched direction matches the face position includes: detecting whether the to-be-switched direction is consistent with the line-of-sight direction. 根據申請專利範圍第1至3項任一項所述之顯示方向切換方法,其中在所述電子設備旋轉後,確定所述電子設備之所述螢幕上顯示內容的待切換方向的步驟包括:每隔一預定時間間隔透過一內建感測器偵測所述電子設備之一重力加速度方向;檢測所述重力加速度方向與所述螢幕上顯示內容的當前顯示方向是否一致;以及若檢測結果為所述重力加速度方向與所述螢幕上顯示內容的當前顯示方向不一致,則將所述重力加速度方向確定為所述螢幕上顯示內容的待切換方向。 The display direction switching method according to any one of claims 1 to 3, wherein, after the electronic device is rotated, the step of determining a direction to be switched displayed on the screen of the electronic device includes: Detecting a direction of gravitational acceleration of one of the electronic devices through a built-in sensor at a predetermined time interval; detecting whether the direction of gravitational acceleration is consistent with a current display direction of the displayed content on the screen; and if the detection result is The direction of the gravitational acceleration is inconsistent with the current display direction of the content displayed on the screen, and the direction of the gravitational acceleration is determined as the direction to be switched of the content displayed on the screen. 根據申請專利範圍第2或3項所述之顯示方向切換方法,所述電子設備進一步包括一光線感測器,其中透過所述前置攝像頭擷取所述至少一張圖像的步驟包括:透過所述光線感測器獲取當前環境之一光線強度; 透過所述光線強度確定一曝光時間;以及所述前置攝像頭根據確定的所述曝光時間擷取所述至少一張圖像。 According to the display direction switching method of claim 2 or 3, the electronic device further includes a light sensor, wherein the step of capturing the at least one image through the front camera comprises: transmitting The light sensor acquires one of the light intensity of the current environment; Determining an exposure time by the intensity of the light; and the front camera capturing the at least one image according to the determined exposure time. 根據申請專利範圍第3項所述之顯示方向切換方法,其中檢測所述待切換方向與所述視線方向是否一致的步驟之後包括:若檢測結果為所述待切換方向與所述視線方向不一致,則判斷所述螢幕上顯示內容的當前顯示方向是否與所述視線方向一致;若判斷結果為所述當前顯示方向與所述視線方向一致,則保持所述螢幕上顯示內容的當前顯示方向不變;以及若判斷結果為所述當前顯示方向與所述視線方向不一致,將所述螢幕上顯示內容的當前顯示方向切換為與所述視線方向一致。 According to the display direction switching method of claim 3, the step of detecting whether the to-be-switched direction is consistent with the line-of-sight direction includes: if the detection result is that the to-be-switched direction is inconsistent with the line-of-sight direction, And determining whether the current display direction of the displayed content on the screen is consistent with the line of sight direction; if the determination result is that the current display direction is consistent with the line of sight direction, maintaining the current display direction of the displayed content on the screen unchanged And if the result of the determination is that the current display direction does not coincide with the line of sight direction, the current display direction of the display content on the screen is switched to be consistent with the line of sight direction. 一種顯示方向切換裝置,用於一電子設備,所述電子設備包括一前置攝像頭,所述顯示方向切換裝置包括:一方向確定模組,用於在所述電子設備旋轉後,確定所述電子設備之一螢幕上顯示內容的待切換方向;一人臉確定模組,用於透過所述前置攝像頭擷取之一人臉圖像以確定一人臉位置;一方向檢測模組,用於檢測所述方向確定模組確定的所述待切換方向與所述人臉確定模組確定的所述人臉位置是否匹配以使所述螢幕上顯示內容相對於使用者為正向影像;以及一方向切換模組,用於若所述方向檢測模組的檢測結果為所述待切換方向與所述人臉位置匹配,則根據所述待切換方向將所述螢幕上顯示內容的當前顯示方向進行切換。 A display direction switching device is used for an electronic device, the electronic device includes a front camera, and the display direction switching device includes: a direction determining module, configured to determine the electronic device after the electronic device rotates One of the devices displays a direction of the content to be switched on the screen; a face determining module is configured to capture a face image through the front camera to determine a face position; and a direction detecting module for detecting the Whether the direction to be switched determined by the direction determining module matches the face position determined by the face determination module to make the display content on the screen be a forward image with respect to the user; and a direction switching mode And a group, if the detection result of the direction detecting module is that the to-be-switched direction matches the face position, the current display direction of the content displayed on the screen is switched according to the to-be-switched direction. 根據申請專利範圍第7項所述之顯示方向切換裝置,其中所述人臉位置以一雙眼所在直線為特徵,所述人臉確定模組包括:一圖像擷取單元,用於透過所述前置攝像頭擷取至少一張圖像;一圖像檢測單元,用於檢測所述圖像擷取單元擷取到的所述至少一張圖像中是否存在一人臉區域;一直線確定單元,用於若所述圖像檢測單元的檢測結果為所述至少一張圖像中存在所述人臉區域,則根據所述人臉區域上之一雙眼區域來確定所述雙眼所在直線;以及一方向檢測模組,用於檢測所述待切換方向與所述直線確定單元檢測出的所述雙眼所在直線的夾角是否為垂直關係。 The display direction switching device according to the seventh aspect of the invention, wherein the face position is characterized by a line of a pair of eyes, the face determination module comprising: an image capture unit for transmitting The front camera captures at least one image; an image detecting unit is configured to detect whether a face area exists in the at least one image captured by the image capturing unit; a line determining unit, And if the detection result of the image detecting unit is that the face area exists in the at least one image, determining a line where the two eyes are located according to one of the binocular areas on the face area; And a direction detecting module, configured to detect whether an angle between the to-be-switched direction and a line of the two eyes detected by the line determining unit is a vertical relationship. 根據申請專利範圍第7項所述之顯示方向切換裝置,其中所述人臉位置以視線方向為特徵,所述視線方向是指人臉中與雙眼連線垂直且指向嘴巴的方向,所述人臉確定模組包括:一圖像擷取單元,用於透過所述前置攝像頭擷取至少一張圖像;一圖像檢測單元,用於檢測所述圖像擷取單元擷取到的所述至少一張圖像中是否存在一人臉區域;一視線確定單元,用於若檢測結果為所述至少一張圖像中存在所述人臉區域,則根據所述人臉區域上之一特徵區域來確定所述視線方向,所述特徵區域包括眼睛區域、眉毛區域、鼻子區域、嘴巴區域和耳朵區域中的至少一種;以及一方向檢測模組,用於檢測所述待切換方向與所述視線確定單元確定的所述視線方向是否一致。 The display direction switching device according to claim 7, wherein the face position is characterized by a line of sight direction, wherein the line of sight direction refers to a direction in the face that is perpendicular to the line of the eyes and points to the mouth. The face determining module includes: an image capturing unit configured to capture at least one image through the front camera; and an image detecting unit configured to detect the image capturing unit Whether there is a face area in the at least one image; a line of sight determining unit, configured to: if the detection result is that the face area exists in the at least one image, according to one of the face areas Determining the line of sight direction, the feature area including at least one of an eye area, an eyebrow area, a nose area, a mouth area, and an ear area; and a direction detecting module configured to detect the direction and location to be switched Whether the direction of the line of sight determined by the line of sight determining unit is consistent. 根據申請專利範圍第7至9項任一項所述之顯示方向切換裝置,其中所述方向確定模組包括:一信號偵測單元,用於每隔一預定時間間隔透過一內建感測器偵測所述電子設備之一重力加速度方向;一信號檢測單元,用於檢測所述信號偵測單元偵測到的所述重力加速度方向與所述螢幕上顯示內容的當前顯示方向是否一致;以及一方向確定單元,用於若所述信號檢測單元的檢測結果為所述重力加速度方向與所述螢幕上顯示內容的當前顯示方向不一致,則將所述重力加速度方向確定為所述螢幕上顯示內容的待切換方向。 The display direction switching device according to any one of claims 7 to 9, wherein the direction determining module comprises: a signal detecting unit for transmitting a built-in sensor every predetermined time interval. Detecting a direction of gravitational acceleration of the electronic device; a signal detecting unit, configured to detect whether the direction of the gravitational acceleration detected by the signal detecting unit is consistent with a current display direction of the content displayed on the screen; a direction determining unit, configured to determine the gravity acceleration direction as the display content on the screen if the detection result of the signal detecting unit is that the gravity acceleration direction is inconsistent with the current display direction of the display content on the screen The direction to be switched. 根據申請專利範圍第8或9項所述之顯示方向切換裝置,所述電子設備進一步包括一光線感測器,其中所述圖像擷取單元包括:一光線獲取子單元,用於獲取當前環境的光線強度;一曝光分析子單元,用於透過所述光線獲取子單元獲取到的所述光線強度確定一曝光時間;以及一圖像擷取子單元,用於透過所述前置攝像頭根據所述曝光分析子單元確定的所述曝光時間擷取所述至少一張圖像。 According to the display direction switching device of claim 8 or 9, the electronic device further includes a light sensor, wherein the image capturing unit comprises: a light acquiring subunit for acquiring the current environment Light intensity; an exposure analysis subunit for determining an exposure time by the light intensity obtained by the light acquisition subunit; and an image capture subunit for transmitting the front camera according to the The exposure time determined by the exposure analysis subunit captures the at least one image. 根據申請專利範圍第9項所述之顯示方向切換裝置,進一步包括:一方向判斷模組,用於若所述方向檢測模組的檢測結果為所述待切換方向與所述視線方向不一致,則判斷所述螢幕上顯示內容的當前顯示方向與所述視線方向是否一致;以及一方向保持模組,用於若所述方向判斷模組的判斷結果為所述當前顯示方向與所述視線方向一致,則保持所述螢幕上顯示內容的當前顯示方向 不變,若所述方向判斷模組的判斷結果為所述當前顯示方向與所述視線方向不一致,所述方向切換模組將所述螢幕上顯示內容的當前顯示方向切換為與所述視線方向一致。 The display direction switching device according to claim 9, further comprising: a direction determining module, configured to: if the detection result of the direction detecting module is that the to-be-switched direction is inconsistent with the line of sight direction, Determining whether the current display direction of the display content on the screen is consistent with the line of sight direction; and a direction maintaining module, configured to: if the direction determining module determines that the current display direction is consistent with the line of sight direction To maintain the current display orientation of the content displayed on the screen If the determination result of the direction determining module is that the current display direction is inconsistent with the line of sight direction, the direction switching module switches the current display direction of the display content on the screen to the line of sight direction. Consistent. 一種電子設備,包括如申請專利範圍第7至12項任一項所述之顯示方向切換裝置。 An electronic device comprising the display direction switching device according to any one of claims 7 to 12. 一種機器可讀取儲存介質,其上存儲有指令集合,當該指令集合被執行時,使得該機器可執行申請專利範圍第1至6項中任一項所述之顯示方向切換方法。 A machine readable storage medium having stored thereon a set of instructions that, when executed, causes the machine to perform the display direction switching method of any one of claims 1 to 6.
TW103119273A 2013-08-01 2014-06-03 Method and device for switching display direction, electronic device and machine-readable storage medium TW201506812A (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310332357.5A CN104346030A (en) 2013-08-01 2013-08-01 Display direction switching method, device and electronic equipment

Publications (1)

Publication Number Publication Date
TW201506812A true TW201506812A (en) 2015-02-16

Family

ID=52431004

Family Applications (1)

Application Number Title Priority Date Filing Date
TW103119273A TW201506812A (en) 2013-08-01 2014-06-03 Method and device for switching display direction, electronic device and machine-readable storage medium

Country Status (4)

Country Link
CN (1) CN104346030A (en)
HK (1) HK1202174A1 (en)
TW (1) TW201506812A (en)
WO (1) WO2015014280A1 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107450716A (en) * 2016-05-31 2017-12-08 北京京东尚科信息技术有限公司 Control method for screen display and control device
CN106648106A (en) * 2016-12-29 2017-05-10 努比亚技术有限公司 Display method and apparatus
CN111092989A (en) * 2019-10-29 2020-05-01 浙江杭佳科技发展有限公司 Mobile phone attitude real-time estimation method based on human face features
CN111669462B (en) * 2020-05-30 2022-09-02 华为技术有限公司 Method and related device for displaying image
CN111860454B (en) * 2020-08-04 2024-02-09 北京深醒科技有限公司 Model switching algorithm based on face recognition
CN112711390B (en) * 2020-12-31 2022-07-26 联想(北京)有限公司 Continuous multi-frame image display output control method and electronic equipment

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080181502A1 (en) * 2007-01-31 2008-07-31 Hsin-Ming Yang Pattern recognition for during orientation of a display device
JP5397081B2 (en) * 2009-08-12 2014-01-22 富士通モバイルコミュニケーションズ株式会社 Mobile device
CN102339595A (en) * 2010-07-28 2012-02-01 鸿富锦精密工业(深圳)有限公司 Display device and method thereof for adjusting display direction
CN103135743A (en) * 2011-11-22 2013-06-05 联想(北京)有限公司 Adjustment method for display image of electronic equipment and electronic equipment
CN103092344A (en) * 2013-01-11 2013-05-08 深圳市金立通信设备有限公司 Method of controlling terminal screen to rotate and terminal
CN103176693B (en) * 2013-02-18 2016-02-10 联宝(合肥)电子科技有限公司 A kind of method of auto-changing terminal screen picture direction and device
CN103179278B (en) * 2013-03-21 2015-05-13 广东欧珀移动通信有限公司 Method and device for controlling screen to rotate

Also Published As

Publication number Publication date
CN104346030A (en) 2015-02-11
HK1202174A1 (en) 2015-09-18
WO2015014280A1 (en) 2015-02-05

Similar Documents

Publication Publication Date Title
WO2021008456A1 (en) Image processing method and apparatus, electronic device, and storage medium
TW201506812A (en) Method and device for switching display direction, electronic device and machine-readable storage medium
KR102039427B1 (en) Smart glass
US9621812B2 (en) Image capturing control apparatus and method
KR20160108388A (en) Eye gaze detection with multiple light sources and sensors
US20160041614A1 (en) System and method of inducing user eye blink
US20180357500A1 (en) Facial recognition method and apparatus and imposter recognition method and apparatus
US9589325B2 (en) Method for determining display mode of screen, and terminal device
EP2950044B1 (en) Method and terminal for measuring angle
TWI543019B (en) Automatic device display orientation detection
CN109005457B (en) Black screen detection method and device, computer equipment and storage medium
US20110157009A1 (en) Display device and control method thereof
TWI581176B (en) Image adjusting system and method
CN110992327A (en) Lens contamination state detection method and device, terminal and storage medium
JP2017528093A (en) Spatial parameter identification method, apparatus, program, recording medium, and terminal device using image
CN109360222B (en) Image segmentation method, device and storage medium
US20150296317A1 (en) Electronic device and recording method thereof
US20140375698A1 (en) Method for adjusting display unit and electronic device
CN111752817A (en) Method, device and equipment for determining page loading duration and storage medium
TW201441916A (en) Method and system for whirling view on screen
CN104252828A (en) Vision-protective display method, vision-protective display device and terminal equipment
US10733706B2 (en) Mobile device, and image processing method for mobile device
US20130050530A1 (en) Image capturing device and image processing method thereof
TWI603225B (en) Viewing angle adjusting method and apparatus of liquid crystal display
WO2020244592A1 (en) Object pick and place detection system, method and apparatus