201229465 ' 六、發明說明: 【發明所屬之技術領域】 [0001] 本發明涉及一種具環境亮度偵測的電子裝置及其方法, 特別涉及一種根據偵測的環境亮度調節背光亮度的電子 裝置及其方法。 [先前技術] [0002] 為了實現自動調節背光燈的亮度,習知技術提供的一個 方案為:利用一個光敏器件來感測當前環境亮度,並根 據當前環境亮度來自動調節背光燈的亮度。但是該方案 n V 存在的問題為額外增加一個光敏器件增加了成本,以及 在電子裝置(如手機)外殼上增設導光孔增加了電子裝 置外殼的設計複雜度。 【發明内容】 [0003] 有鑒於此,本發明提供一種具環境亮度偵測的電子裝置 及其方法。 [0004] 所述具環境亮度偵測的電子裝置,所述電子裝置包括攝 Q 像頭以及處理器,所述攝像頭包括光電感測器,所述光 電感測器包括若干光敏元件,所述處理器每隔預定時間 段開啟所述若干光敏元件中的預定個光敏元件,以控制 所述攝像頭進行拍照,以及獲取所述攝像頭拍攝的照片 上的每個圖元點的R、G、B值,並根據獲取的每個圖元點 的R、G、B值確定環境亮度值。 [0005] 所述環境亮度偵測方法,所述方法應用於電子裝置,所 述電子裝置包括攝像頭,所述攝像頭包括光電感測器, 所述光電感測器包括若干光敏元件,所述電子裝置執行 100100292 表單編號 A0101 第 3 頁/共 10 頁 1002000492-0 201229465 如下步驟:每隔預定時間段開啟所述若干光敏元件中的 預定個光敏元件,以控制所述攝像頭進行拍照;以及獲 取所述攝像頭拍攝的照片上的每個圖元點的R、G、B值, 並根據獲取的每個圖元點的R、G、B值確定環境亮度值。 [0006] 在本實施方式中,電子裝置通過每隔預定時間段開啟預 定個光敏元件來控制攝像頭進行拍照,並根據拍攝的照 片確定環境亮度值。如此,不需要增加額外的光敏器件 來感測環境亮度,降低了電子裝置的成本。 【實施方式】 [0007] 請參考圖1,電子裝置100包括攝像頭10及處理器20。電 子裝置100可為手機、掌上型電腦等。在本實施方式中, 攝像頭10包括光電感測器12,光電感測器12包括若干光 敏元件122,一個光敏元件122對應一個圖元點。在本實 施方式中,光敏元件122為光敏二極體。201229465 '6. Description of the Invention: [Technical Field] The present invention relates to an electronic device with ambient brightness detection and a method thereof, and more particularly to an electronic device for adjusting backlight brightness according to detected ambient brightness and method. [Prior Art] [0002] In order to realize the automatic adjustment of the brightness of the backlight, the prior art provides a solution for sensing the current ambient brightness using a photosensitive device and automatically adjusting the brightness of the backlight according to the current ambient brightness. However, the problem with the scheme n V is that the additional cost of adding a photosensor increases, and the addition of a light guiding aperture on the housing of an electronic device (such as a mobile phone) increases the design complexity of the electronic device housing. SUMMARY OF THE INVENTION [0003] In view of the above, the present invention provides an electronic device with ambient brightness detection and a method thereof. [0004] The electronic device with ambient brightness detection, the electronic device includes a Q-receiving head and a processor, the camera includes a photo-sensing device, the photo-electrical sensor includes a plurality of photosensitive elements, and the processing Turning on a predetermined one of the plurality of photosensitive elements every predetermined period of time to control the camera to take a picture, and obtain R, G, and B values of each primitive point on the photo taken by the camera, The ambient brightness value is determined according to the obtained R, G, and B values of each primitive point. [0005] The ambient brightness detecting method is applied to an electronic device, the electronic device includes a camera, the camera includes a photo-sensing device, and the photo-sensing device includes a plurality of photosensitive elements, and the electronic device Execution 100100292 Form No. A0101 Page 3 of 10 1002000492-0 201229465 The following steps: turning on a predetermined one of the plurality of photosensitive elements every predetermined time period to control the camera to take a picture; and acquiring the camera The R, G, and B values of each primitive point on the taken photo, and the ambient brightness value is determined according to the obtained R, G, and B values of each primitive point. In the present embodiment, the electronic device controls the camera to take a picture by turning on a predetermined photosensitive element every predetermined time period, and determines an ambient brightness value based on the taken picture. Thus, there is no need to add additional photosensors to sense ambient brightness, reducing the cost of the electronic device. Embodiments [0007] Referring to FIG. 1 , an electronic device 100 includes a camera 10 and a processor 20 . The electronic device 100 can be a mobile phone, a palmtop computer or the like. In the present embodiment, the camera 10 includes a photo-sensing device 12 that includes a plurality of photo-sensitive elements 122, one of which corresponds to a pixel point. In the present embodiment, the photosensitive member 122 is a photosensitive diode.
[0008] 在本實施方式中,處理器20每隔預定時間段開啟若干光 敏元件122中的預定個光敏元件122,以控制攝像頭10進 行拍照。其中,該預定個光敏元件122的數量可以為所有 光敏元件122也可以為部分光敏元件122。處理器20還運 用習知的圖像處理方法獲取攝像頭10拍攝的照片上的每 個圖元點的R、G、B值,並根據獲取的每個圖元點的R、G 、B值確定環境亮度值。在本實施方式中,電子裝置100 通過每隔預定時間段開啟預定個光敏元件122來控制攝像 頭10進行拍照,並根據拍攝的照片確定環境亮度值,如 此,不需要增加額外的光敏器件來感測環境亮度,降低 了電子裝置100的成本。特別是採用部分光敏元件122時 100100292 表單編號A0101 第4頁/共10頁 1002000492-0 201229465 [0009] [0010] ❹ [0011] [0012] Ο [0013] [0014] 100100292 ,還降低了處理器20的負擔。 電子裝置100還包括背光單元30。處理器20根據確定的環 境亮度值調節背光單元30的亮度。在本實施方式中,處 理器20比較確定的環境亮度值與預設的環境亮度值,並 根據比較結果調節背光單元30的亮度。例如,在確定的 環境亮度值大於預設的環境亮度值時,處理器20判定當 前的環境亮度較亮,處理器20降低背光單元30的亮度。 圖2係本發明一種實施方式中環境亮度偵測的方法流程圖 〇 步驟S201中,處理器20每隔預定時間段開啟若干光敏元 件122中的預定個光敏元件122,以控制攝像頭10進行拍 照。其中,該預定個光敏元件122的數量可以為所有光敏 元件122也可以為部分光敏元件122。 步驟S202中,處理器20獲取攝像頭10拍攝的照片上的每 個圖元點的R、G、Β值,並根據獲取的每個圖元點的R、G 、Β值確定環境亮度值。 步驟S203中,處理器20根據確定的環境亮度值調節背光 單元30的亮度。在本實施方式中,處理器20比較確定的 環境亮度值與預設的環境亮度值,並根據比較結果調節 背光單元30的亮度。 【圖式簡單說明】 圖1係本發明一種實施方式中具環境亮度偵測的電子裝置 的功能模組圖。 圖2係本發明一種實施方式中環境亮度偵測的方法流程圖 表單編號Α0101 第5頁/共10頁 1002000492-0 [0015] 201229465 【主要元件符號說明】 [0016] 電子裝置:100 [0017] 攝像頭:10 [0018] 處理器:2 0 [0019] 光電感測器:1 2 [0020] 光敏元件:122 [0021] 背光單元:30 100100292 表單編號A0101 第6頁/共10頁 1002000492-0In the present embodiment, the processor 20 turns on a predetermined one of the plurality of photosensitive elements 122 every predetermined period of time to control the camera 10 to take a picture. The number of the predetermined photosensitive elements 122 may be all of the photosensitive elements 122 or part of the photosensitive elements 122. The processor 20 also obtains the R, G, and B values of each primitive point on the photo taken by the camera 10 by using a conventional image processing method, and determines the R, G, and B values of each of the acquired primitive points. Ambient brightness value. In the present embodiment, the electronic device 100 controls the camera 10 to take a photo by turning on a predetermined photosensor 122 every predetermined time period, and determines the ambient brightness value according to the photograph taken, so that no additional photosensor is needed to sense. The ambient brightness reduces the cost of the electronic device 100. In particular, when a part of the light-sensitive elements 122 is used, 100100292, form number A0101, page 4, page 10, 1002000492-0, 201229465 [0009] [0012] [0012] [0012] 100100292, the processor is also lowered 20 burden. The electronic device 100 also includes a backlight unit 30. The processor 20 adjusts the brightness of the backlight unit 30 in accordance with the determined ambient brightness value. In the present embodiment, the processor 20 compares the determined ambient brightness value with a preset ambient brightness value, and adjusts the brightness of the backlight unit 30 according to the comparison result. For example, when the determined ambient brightness value is greater than the preset ambient brightness value, the processor 20 determines that the current ambient brightness is brighter, and the processor 20 decreases the brightness of the backlight unit 30. 2 is a flow chart of a method for detecting ambient brightness in an embodiment of the present invention. 〇 In step S201, the processor 20 turns on a predetermined number of photosensitive elements 122 of the plurality of photosensitive elements 122 every predetermined period of time to control the camera 10 to take a picture. The predetermined number of photosensitive elements 122 may be all photosensitive elements 122 or partial photosensitive elements 122. In step S202, the processor 20 acquires the R, G, and Β values of each primitive point on the photo taken by the camera 10, and determines the ambient brightness value according to the acquired R, G, and Β values of each primitive point. In step S203, the processor 20 adjusts the brightness of the backlight unit 30 according to the determined ambient brightness value. In the present embodiment, the processor 20 compares the determined ambient brightness value with a preset ambient brightness value, and adjusts the brightness of the backlight unit 30 according to the comparison result. BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a functional block diagram of an electronic device with ambient brightness detection according to an embodiment of the present invention. 2 is a flow chart of a method for detecting ambient brightness in an embodiment of the present invention. Form No. 101 0101 Page 5 / Total 10 pages 1002000492-0 [0015] 201229465 [Description of main component symbols] [0016] Electronic device: 100 [0017] Camera: 10 [0018] Processor: 2 0 [0019] Photoelectric sensor: 1 2 [0020] Photosensitive element: 122 [0021] Backlight unit: 30 100100292 Form number A0101 Page 6 / Total 10 pages 1002000492-0