201139996 六、發明說明: 【發明所屬之技術領域】 本發明涉及一種如申請專利範圍第1項前序部分所述 的方法和一種如申請專利範圍第8項前序部分所述的設備。 【先前技術】 帶加速度感測器的攜帶型數位設備已普遍爲人所知。 舉例而言’手機、攜帶型視頻設備和攝像機上都裝有加速 度感測器。這些加速度感測器對手機或類似攜帶型設備相 對於地球引力場的朝向進行檢測。此後,設備螢幕上的圖 像顯示模式就從縱向模式轉換成橫向模式。例如,公開案 US 2006/0204232 A1和US 7丨38979就公開過帶朝向檢測功 能的設備。 現有方法的缺點在於,設備傾斜會減少可測的加速度 分ΐ,從而無法準確判定出該以縱向模式還是橫向模式來 顯示圖像。當一台具有一個主延伸平面和兩個主延伸方向 或兩個相互垂直的主延伸軸的設備發生傾斜時,這種‘‘傾 斜指的是該設備圍繞平行於地球表面或垂直於重力向量 的那個^延伸轴發生旋轉(翻轉)。-種可以解決這個問^ 的方案是,一旦傾角超過預設的極限值,就將圖像自 示功能閉鎖。 Θ 通過下述方法可以確定這個極限值,但這種方法耗 相對較多。第一步是測定加速度感測器的測量誤差或琪卜 誤差刀佈。爲此需要對__定數量的加速度感測器進行檢 201139996 驗。這種檢驗耗時相對較多。第二步是算出某—傾角, 旦大於這個傾角,加速度感測器的測 確區分該用縱向模式還是橫向模式的 加速度感測器在計算該傾角時所産生 s誤差就大到無法準 程度。第三步是計算 的測量誤差。 掣造加迷度感 7〜里砍圭分佈,因 此必須將傾角的極限值設定得相對較小 J 每樣才能保證大 量設備可以無錯工作且不會選錯顯示模式。但其後果是, 只要出現很小的傾角,設備就無法切換顯示模式。爲了解 決這個問冑’可以在製成加速度感測器後對其偏差進行測 :和補償’從而增大傾角的極限值。但是,這類測量和補 償方法成本报高’對於帶這種加速度感測器的設備的製造 商而言,實施這類測量和補償方法不能帶來經濟效益。此 外,將加速度感測器安裝到移動設備中時,加速度感測器 的偏差可能會發生變化。 【發明内容】 與現有技術相比,本發明如各項並列申請專利範圍所 述的方法和设備具有以下優點。最終用戶使用該設備時, 是將加速度感測器安裝到設備中後才對該加速度感測器因 製造和安裝過程而產生的測量誤差(偏差)進行補償。這 樣就能以最佳方式測定偏差’用這個最佳偏差來校正測得 的加速度值並使校正後的加速度值達到最佳精度。從長遠 看’以最佳方式測定偏差能大幅提高設備的工作能力。此 外’將加速度感測器裝入設備前不必測定偏差,從而省去 201139996 了相應成本。裝機前不必實施繁複的測試系列,這意味著 可以:省大量時間。此外’由於安裝過程會導致產生一定 =測里誤差’目此’裝機後的偏差測定比裝機前的偏差測 疋精確得多。&外,通過應用本發明的方法還可以使用那 些因測量誤差大而比較便宜的加速度感測器目爲本發明 的方法也可對這樣的測量誤差進行補償。 本發明的有利實施方案和改進方案由從屬申請專利範 圍及配有附圖的說明部分得出。 根據種優選改進方案,計算一個垂直於地球引力場 的作用力π向的第一平面與所述設備的螢幕平面之間的角 度。此外,優選將該角度與-閾值進行比較,如果該角度 】、於這個閾值,就產生閉鎖信號。根據另一優選方案,只 要産生了所述閉鎖信號,圖像自動定向功能就會被閉鎖。 將圖像自動定向功能閉鎖的優點是,彳以防止(例如)縱 向模式被不恰當地轉換成橫向模式。 根據另一優選改進方案’測定所述偏差後減小所述閾 值這減小措轭的優點在於,最初可以設置相對較高的 閾值測疋偏差後再對該閾值進行優化。如果在測定偏差 後減小閾值,即使在發生劇烈傾斜的情況下也能實現最佳 的圖像自動定向。 根據另一優選改進方案,用三軸加速度感測器測量所 述加速度值。通過使用三軸加速度感測器就可利用現有的 感測器系統來實現本發明的方法。 本發明此外還涉及一種具有圖像自動定向功能的設 201139996 備。與現有技術相比,本發明的這種設備的優點是可以應 用本發明的方法❶最終用戶使用所述設備時,是在將加速 度感測器安裝到設備中後才對該加速度感測器因製造和安 裝過程而産生的偏差進行補償。這樣就能以最佳方式測定 偏差’用這個最佳偏差來校正測得的加速度值並使校正後 的加速度值達到最佳精度。從長遠看,以最佳方式測定偏 差能大幅提南設備的工作能力。 根據一種優選改進方案,所述三軸加速度感測器和所 述計算及存儲單元可製成微電子機械系統(MEMS)。將其 製成MEMS的優點在於,三軸加速度感測器和計算及存儲 單元所佔用的空間達到最小程度。此外’所述三軸加速度 感測器和所述計算及存儲單元優選可用單獨一個襯底來製 造。這樣就能有利地將所述三軸加速度感測器和所述計算 及存儲單元的空間需求最小化。 【實施方式】 同一參考符號在不同附圖中代表相同的部件,因而只 對相同的部件命名一次或提到一次。 圖1是本發明正以縱向模式顯示圖像l〇1的設備l〇〇 的不意圖。根據設備1 〇〇相對於地球引力場的朝向來判定 用縱向模式還是橫向模式將圖像丨〇丨顯示在設備〖〇〇的螢 幕102上。矩形螢幕102在螢幕平面3〇()内延伸且具有兩 條長邊103和兩條短邊1 〇4。短邊1 〇3平行于第一靈敏軸X, 長邊104平行于第二靈敏軸γ,該第二靈敏軸垂直于第一靈 6 201139996 敏軸x。第三靈敏軸z既垂直于第—靈敏轴χ又垂直于第 二靈敏軸Υ。靈敏軸Χ、Υ,〇Ζ對應於一個三軸加速度感測 器的靈敏軸。第-靈敏軸X和第二靈敏轴γ均在勞幕平面 300内延伸。第三靈敏軸Ζ垂直於螢幕平面则。設備⑽ 的下部是鍵盤1〇5。此時用來顯示圖像1〇1的是縱向模式, 因爲加速度感測器的第一靈敏軸χ平行於地球引力場的作 用力方向跡加速度感測器在平行于第—靈敏軸χ的方向 上測得的加速度值不等於零,而在平行于第二靈敏轴丫和 第三靈敏軸Ζ的方向上測得的加速度值均等於零。 圖2疋本發明正以橫向模式顯示圖像⑻的設備1〇〇 的示意圖。此時應用的是橫向模式,因爲加速度感測器的 第二靈敏軸Υ平行於地球引力場的作用力方向⑽。加速度 感❹在平行于第二靈敏軸γ的方向上測得的加速度值不 等於零,而在平行於第一及 的加速度值均等於零。—靈敏軸Χ、ζ的方向上測得 二3:本發明設備100的示意圖。該圖示出了縱向模 式與秩向模式間的顯示模式 的切換取決於地球引力場的作用力方縱:,橫向模Μ 器的第-軸X之間的朝二二Λ與加速度感測 向106與加速度感測器的第_軸場的作用力方 與,之間,就選擇縱向模式作爲顯朝:角介於45。 場的作用力方肖1〇6與加 測器第’果地球引力 向角介於〇。盥α J益的第一轴X之間的朝 圖4爲本^ 就選擇橫向模式作爲顯示模式。 本發明設備100的側視圖。榮幕平自300與垂 201139996 直於地球引力場的作用六古a 力方向106的第一平面302之間存 在一個角度301。如果备疮, 角度301小於90。,用於在平行於第 一和第二靈敏軸χ、γ的 刃万向上測量重力加速度的可測信號 就會減少。可測信號的減少幅度爲sin (角度3〇1)。當角度 \ J疋程度時’無法再準確判定出該以縱向模式還是 向模式來顯7F圖像’因爲沒有可測信號可以用來在平行 於第一和第二靈敏軸Χ、γ的方向上測量重力加速度。因 -角度301小於預設的閾值,也就是當設備⑽嚴 重傾斜時,圖像自動定向功能就會被閉鎖。在圖像自動定 向功能被閉鎖的情況下’只要上述角度小於所述間值,就 無法在縱向模式和橫向模式之間進行切換。只有當上述角 度大於所述閾值時,才能將圖像自動定向功能解鎖。 圖5疋本發明方法的方塊圖。方塊5〇〇是在空間中的 多個點上測量多個加速度值。這一測量一直持續到能夠計 算偏差爲止。方塊501是根據測得的加速度值計算偏差。 方塊502是用計算得到的偏差來校正測得的加速度值以 便將經過校正的加速度值用於後續計算。方塊5〇3是利用 校正加速度值來測定垂直於地球引力場的作用力方向1〇6 的第一平面302與設備100的螢幕平面3〇〇之間的角度 301。方塊504是將角度301與上述閾值進行比較並確定該 角度301是否小於這個閾值。如果角度3〇1小於所述閾值, 就將圖像自動定向功能閉鎖(方塊505卜否則,在角度3〇 i 不小於所述閾值的情況下’就不閉鎖圖像自動定向功能, 而是執行圖像自動定向功能(方塊506 )。 8 201139996 圖6是一種用於測定 J义測仵加速度值的偏差的演算法的 示意性方塊圖。由最終用曰 用戶在初-人運行過程中實施這部分 測量工作。具體如下:最終用戶攜帶該移動設請進行 運動’由加速度感測器在多健間點上對重力加速度進行 測量。每當設備1 00處於 ;靜止狀L時’就會對加速度分量 進行測量。方塊600是確宏 ,ΛΛ占 疋雉疋攻備100處於靜止狀態還是運 動狀態。如果設備100處私撼> 4 k於靜止狀態,就測量加速度值。 測量結束後,最終用戶攜帶机偌 厂堝V 6又備100進行運動。方塊6〇1 疋確疋設備100處於靜止此能、普b .l dl 取止狀態還疋運動狀態。如果設備100 處於靜止狀態’就進一步測量加速度值。如此進行多次測 里’直至在不同空間點上測得的加速度值足以實現偏差測 定爲止。方塊602是將測得的加速度值記錄在坐標系統6〇4 中以便測定偏差。最後,方塊6〇3是計算這個偏差。 圖7是測定偏差的示意圖。將在χ向、γ向和z向上 測侍的加速度值記錄在一個坐標系中。所記錄的測量點形 成一個位於中心的大致呈球形的結構。這個球形結構的中 〜不同於坐標系原點。這種不一致就是需要加以測定的偏 差。如果用這個偏差來校正每個測得加速度值,這個球形 結構就會朝坐標系原點位移,由此得到校正加速度值,這 些校正加速度值在圖8 _都記錄在同一坐標系内。該結構 的中心與坐標系原點完全重合。測定偏差的工作到此結束。 【圖式簡單說明】 下面借助附圖和隨後的說明部分對本發明的實施例進 9 仃詳細說明,其中: 圖1爲本發明設備 圖像; 201139996 的示意圖,其中, 圖2爲本發明設備的第二示意圖,其 圖像; 圓3爲本發明設備的第三示意圖; 圖4爲本發明設備的第四示意圖; 圖5爲本發明方法的方塊圖; 以縱向模式顯示 中,以橫向模式 示意性方塊圖; ;以及 圖6爲一種用於測定偏差的演算法的 圆7爲記錄了測得加速度值的坐標系 圖8爲記錄了校正加速度值的坐標系 【主要元件符號說明】 (100) 顯示設備 (101) 圖像 (102) 螢幕 (103) 長邊 (104) 短邊 (105) 鍵盤 (106) 作用力方向 (300) 螢幕平面 (301) 角度 (302) 平面 (500) 方塊 10 201139996 (501) 方塊 (502) 方塊 (503) 方塊 (504) 方塊 (505) 方塊 (506) 方塊 (600) 方塊 (601) 方塊 (602) 方塊 (603) 方塊 (604) 坐標系統 X 第一靈敏轴 Y 第二靈敏軸 ζ 第三靈敏軸 11BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method as described in the preamble of claim 1 and an apparatus as described in the preamble of claim 8 of the patent application. [Prior Art] Portable digital devices with acceleration sensors are generally known. For example, accelerometers are installed on mobile phones, portable video devices, and video cameras. These accelerometers detect the orientation of a mobile phone or similar portable device relative to the Earth's gravitational field. Thereafter, the image display mode on the device screen is switched from portrait mode to landscape mode. A device with a heading detection function is disclosed, for example, in the publications US 2006/0204232 A1 and US Pat. A disadvantage of the prior art method is that the tilt of the device reduces the measurable acceleration tiller, so that it is not possible to accurately determine whether the image is displayed in portrait mode or landscape mode. When a device having a main extension plane and two main extension directions or two mutually perpendicular main extension axes is tilted, this ''tilt' refers to the device surrounding the surface parallel to the earth or perpendicular to the gravity vector. The ^ extension axis rotates (flips). The solution to this problem is to block the image display function once the tilt angle exceeds the preset limit.这个 This limit can be determined by the following method, but this method consumes a relatively large amount. The first step is to measure the measurement error of the acceleration sensor or the error cloth. For this purpose, it is necessary to check the __ fixed number of acceleration sensors for 201139996. This type of inspection takes a relatively long time. The second step is to calculate a certain inclination angle, which is greater than the inclination angle. The acceleration sensor determines whether the s error caused by the longitudinal or transverse mode acceleration sensor is too large to be accurate. The third step is the calculated measurement error.掣 加 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 The consequence is that the device cannot switch display mode as long as there is a small tilt angle. In order to understand this question, the deviation can be measured and compensated after the acceleration sensor is made to increase the limit of the inclination. However, such measurement and compensation methods cost a high yield. For manufacturers of equipment with such acceleration sensors, the implementation of such measurement and compensation methods does not provide economic benefits. In addition, when the acceleration sensor is installed in a mobile device, the deviation of the acceleration sensor may change. SUMMARY OF THE INVENTION The method and apparatus of the present invention, as described in the accompanying claims, have the following advantages over the prior art. When the end user uses the device, the acceleration sensor is installed in the device to compensate for the measurement error (deviation) caused by the manufacturing and installation process of the acceleration sensor. This makes it possible to measure the deviation in the best way. This optimum deviation is used to correct the measured acceleration value and to achieve the best accuracy of the corrected acceleration value. In the long run, measuring deviations in the best way can greatly improve the working capacity of the equipment. In addition, it is not necessary to measure the deviation before the acceleration sensor is installed in the device, thus eliminating the corresponding cost of 201139996. It is not necessary to implement a complicated test series before installation, which means: You can save a lot of time. In addition, the installation process will result in a certain = measurable error. The deviation measurement after installation is much more accurate than the pre-installation deviation measurement. In addition, by using the method of the present invention, it is also possible to use those acceleration sensors which are relatively inexpensive due to large measurement errors, and the method of the present invention can also compensate for such measurement errors. Advantageous embodiments and developments of the invention result from the scope of the dependent patent application and the description with the drawings. According to a preferred refinement, the angle between the first plane perpendicular to the force π of the Earth's gravitational field and the screen plane of the device is calculated. Furthermore, it is preferred to compare the angle with a -threshold, if the angle is at this threshold, a blocking signal is generated. According to another preferred embodiment, the image auto-orientation function is blocked as long as the latching signal is generated. The advantage of latching the image auto-orientation function is that it prevents, for example, the portrait mode from being improperly converted to landscape mode. According to another preferred refinement, the reduction of the threshold after determining the deviation has the advantage that the threshold value can be initially optimized after setting a relatively high threshold deviation. If the threshold is reduced after the deviation is measured, optimal image auto-orientation can be achieved even in the case of severe tilt. According to another preferred refinement, the acceleration value is measured with a triaxial acceleration sensor. The method of the present invention can be implemented using existing sensor systems by using a triaxial acceleration sensor. The invention further relates to a device with an image auto-orientation function. Compared with the prior art, the advantage of the device of the present invention is that the method of the present invention can be applied. When the end user uses the device, the acceleration sensor is only after the acceleration sensor is installed in the device. Compensation for manufacturing and installation processes is compensated. This makes it possible to measure the deviation in the best way. This optimum deviation is used to correct the measured acceleration value and to achieve the best accuracy of the corrected acceleration value. In the long run, measuring the deviation in the best way can greatly increase the working capacity of the equipment. According to a preferred refinement, the triaxial acceleration sensor and the computing and memory unit can be fabricated as a microelectromechanical system (MEMS). The advantage of making it into a MEMS is that the space occupied by the triaxial acceleration sensor and the computing and storage unit is minimized. Further, the triaxial acceleration sensor and the calculation and storage unit are preferably fabricated from a single substrate. This advantageously minimizes the space requirements of the triaxial acceleration sensor and the computing and memory unit. [Embodiment] The same reference symbols represent the same components in different drawings, and thus only the same components are named once or once. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a schematic illustration of a device 10 of the present invention for displaying an image l〇1 in a portrait mode. It is determined whether the image 丨〇丨 is displayed on the screen 102 of the device 纵向 in the portrait mode or the landscape mode according to the orientation of the device 1 〇〇 relative to the gravitational field of the earth. The rectangular screen 102 extends in the plane of the screen 3() and has two long sides 103 and two short sides 1 〇4. The short side 1 〇 3 is parallel to the first sensitive axis X, and the long side 104 is parallel to the second sensitive axis γ, which is perpendicular to the first axis 6 201139996 sensitive axis x. The third sensitive axis z is perpendicular to the first sensitive axis and perpendicular to the second sensitive axis. The sensitive axes, Υ, 〇Ζ correspond to the sensitive axes of a three-axis accelerometer. Both the first-sensitive axis X and the second sensitive axis γ extend within the screen plane 300. The third sensitive axis is perpendicular to the plane of the screen. The lower part of the device (10) is the keyboard 1〇5. At this time, the image 1〇1 is used to display the longitudinal mode, because the first sensitive axis of the acceleration sensor is parallel to the force of the earth's gravitational field. The direction of the acceleration sensor is parallel to the first sensitive axis. The acceleration value measured above is not equal to zero, and the acceleration value measured in the direction parallel to the second sensitive axis 第三 and the third sensitive axis 等于 is equal to zero. Figure 2 is a schematic illustration of an apparatus 1 疋 in which the present invention is displaying an image (8) in landscape mode. The transverse mode is applied at this time because the second sensitive axis of the acceleration sensor is parallel to the direction of the force of the Earth's gravitational field (10). The acceleration sense has an acceleration value measured in a direction parallel to the second sensitivity axis γ not equal to zero, and an acceleration value parallel to the first sum is equal to zero. - Measured in the direction of the sensitive axes ζ, ζ 2: Schematic diagram of the apparatus 100 of the invention. The figure shows that the switching of the display mode between the longitudinal mode and the rank mode depends on the force of the earth's gravitational field: the direction of the second axis and the acceleration sensing direction between the first axis X of the transverse mode Between 106 and the force of the _axis field of the acceleration sensor, the longitudinal mode is selected as the apparent direction: the angle is between 45. The force of the field is 〇1〇6 and the detector's first earth's gravitational angle is between 〇. Between the first axis X of 盥αJ benefits, Fig. 4 is the same as the horizontal mode as the display mode. A side view of the apparatus 100 of the present invention. There is an angle 301 between the first plane 302 of the force direction 106 of the Liugu a force field. If the sore is prepared, the angle 301 is less than 90. The measurable signal for measuring the gravitational acceleration in the direction parallel to the first and second sensitive axes γ, γ is reduced. The measurable signal is reduced by sin (angle 3〇1). When the angle is \ J疋, it is impossible to accurately determine whether the image is displayed in portrait mode or mode. Because there is no measurable signal, it can be used in the direction parallel to the first and second sensitive axes γ, γ. Measure the acceleration of gravity. Since the angle 301 is less than the preset threshold, that is, when the device (10) is severely tilted, the image auto-orientation function is blocked. In the case where the image auto-orientation function is blocked, as long as the above angle is smaller than the inter-value, it is impossible to switch between the portrait mode and the landscape mode. The image auto-orientation function can only be unlocked when the above angle is greater than the threshold. Figure 5 is a block diagram of the method of the present invention. Block 5〇〇 measures multiple acceleration values at multiple points in space. This measurement continues until the deviation can be calculated. Block 501 is to calculate the deviation based on the measured acceleration values. Block 502 is to use the calculated deviation to correct the measured acceleration value to use the corrected acceleration value for subsequent calculations. Block 5〇3 uses the corrected acceleration value to determine the angle 301 between the first plane 302 perpendicular to the direction of force of the Earth's gravitational field 1〇6 and the screen plane 3〇〇 of the device 100. Block 504 compares angle 301 to the threshold and determines if angle 301 is less than this threshold. If the angle 3〇1 is smaller than the threshold, the image auto-orientation function is blocked (block 505, otherwise, if the angle 3〇i is not less than the threshold value, the image auto-orientation function is not blocked, but is performed Image auto-orientation function (block 506). 8 201139996 Figure 6 is a schematic block diagram of an algorithm for determining the deviation of the acceleration value of the J sense. This is implemented by the end user during the initial-human operation. Part of the measurement work. The details are as follows: the end user carries the mobile device to perform the motion'. The acceleration sensor measures the gravity acceleration at the multi-health point. Whenever the device is in the 100; The component is measured. The block 600 is a true macro, and the target 100 is in a stationary state or a motion state. If the device 100 is in a stationary state, the acceleration value is measured. After the measurement is finished, the end user is measured. The portable machine 埚V 6 is also equipped with 100 for movement. Block 6〇1 疋 疋 疋 疋 疋 疋 疋 疋 疋 疋 疋 疋 疋 疋 疋 疋 疋 疋 疋 疋 。 。 。 。 。 。 。 。 。 。 The quiescent state 'further measures the acceleration value. This is done multiple times' until the acceleration values measured at different spatial points are sufficient to achieve the deviation determination. Block 602 records the measured acceleration values in the coordinate system 6〇4. In order to determine the deviation. Finally, block 6〇3 is to calculate this deviation. Figure 7 is a schematic diagram of the measurement deviation. The acceleration values measured in the yaw, γ and z directions are recorded in a coordinate system. Forming a substantially spherical structure at the center. The middle of this spherical structure is different from the origin of the coordinate system. This inconsistency is the deviation that needs to be measured. If this deviation is used to correct each measured acceleration value, this spherical structure It will be displaced toward the origin of the coordinate system, and thus the corrected acceleration values will be obtained. These corrected acceleration values are recorded in the same coordinate system in Figure 8. The center of the structure completely coincides with the origin of the coordinate system. The work of measuring the deviation is here. [Simplified Description of the Drawings] The embodiments of the present invention will be described in detail below with reference to the accompanying drawings and the following description. 1 is a schematic diagram of a device image of the present invention; 201139996, wherein FIG. 2 is a second schematic diagram of the device of the present invention, an image thereof; a circle 3 is a third schematic diagram of the device of the present invention; Figure 4 is a block diagram of the method of the present invention; in a longitudinal mode display, a schematic block diagram in a landscape mode; and Figure 6 is a circle 7 for calculating a deviation algorithm for recording the measured acceleration The coordinate system of the value is shown in Figure 8. The coordinate system in which the corrected acceleration value is recorded. [Main component symbol description] (100) Display device (101) Image (102) Screen (103) Long edge (104) Short edge (105) Keyboard ( 106) Force direction (300) Screen plane (301) Angle (302) Plane (500) Block 10 201139996 (501) Square (502) Square (503) Square (504) Square (505) Square (506) Square (600 ) Square (601) Square (602) Square (603) Square (604) Coordinate system X First sensitive axis Y Second sensitive axis ζ Third sensitive axis 11