CN105704290A - Mobile terminal screen control method, device and mobile terminal - Google Patents
Mobile terminal screen control method, device and mobile terminal Download PDFInfo
- Publication number
- CN105704290A CN105704290A CN201410686910.XA CN201410686910A CN105704290A CN 105704290 A CN105704290 A CN 105704290A CN 201410686910 A CN201410686910 A CN 201410686910A CN 105704290 A CN105704290 A CN 105704290A
- Authority
- CN
- China
- Prior art keywords
- mobile terminal
- image
- screen
- rotation
- contour data
- Prior art date
- Legal status (The legal status 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 status listed.)
- Pending
Links
Landscapes
- Image Analysis (AREA)
Abstract
本发明公开了一种移动终端中屏幕的控制方法、装置和移动终端,其中,所述方法包括以下步骤:分别获取移动终端在第一时间拍摄的第一图像和在第二时间拍摄的第二图像;根据第一图像和第二图像判别移动终端的旋转方向;以及根据移动终端的旋转方向控制移动终端的屏幕进行旋转。本发明实施例的方法,通过不断使用摄像头拍摄图像,并根据两个时间拍摄的两个图像判别移动终端的旋转方向,以根据移动终端的旋转方向控制移动终端的屏幕旋转,该方法不需要使用重力传感器就能实现屏幕的旋转,大大减少了硬件成本。
The invention discloses a screen control method and device in a mobile terminal, and the mobile terminal, wherein the method includes the following steps: respectively acquiring a first image taken by the mobile terminal at a first time and a second image taken at a second time images; judging the rotation direction of the mobile terminal according to the first image and the second image; and controlling the rotation of the screen of the mobile terminal according to the rotation direction of the mobile terminal. The method of the embodiment of the present invention continuously uses the camera to capture images, and judges the rotation direction of the mobile terminal according to the two images captured at two times, so as to control the screen rotation of the mobile terminal according to the rotation direction of the mobile terminal. This method does not need to use The gravity sensor can realize the rotation of the screen, which greatly reduces the hardware cost.
Description
技术领域technical field
本发明涉及移动终端技术领域,尤其涉及一种移动终端中屏幕的控制方法、装置和移动终端。The present invention relates to the technical field of mobile terminals, in particular to a method and device for controlling a screen in a mobile terminal and a mobile terminal.
背景技术Background technique
目前,移动终端的屏幕旋转功能是由G-sensor(Gravitysensor,重力传感器)来实现的。其中,G-sensor可以感知加速力的变化。通过在x,y,z三轴方向检测加速度值,并不断将这些值发送给软件server层。Server层根据这些值可以判断出手机的摆放位置,来决定是否旋转屏幕。例如,重力加速度的值约为10,y=10时,是手机正常摆放;在x=10时,手机屏幕旋转了90度;而在z=10时,手机是水平摆放的。相关技术中的移动终端实现屏幕自动旋转必须增加G-sensor硬件,从而增加了硬件成本。Currently, the screen rotation function of the mobile terminal is implemented by a G-sensor (Gravity sensor, gravity sensor). Among them, G-sensor can perceive the change of acceleration force. By detecting acceleration values in the directions of x, y, and z axes, and continuously sending these values to the software server layer. The server layer can judge the placement position of the mobile phone based on these values to decide whether to rotate the screen. For example, the value of the acceleration of gravity is about 10. When y=10, the mobile phone is placed normally; when x=10, the screen of the mobile phone is rotated by 90 degrees; and when z=10, the mobile phone is placed horizontally. In the mobile terminal in the related art, G-sensor hardware must be added to realize automatic screen rotation, thereby increasing the hardware cost.
发明内容Contents of the invention
本发明旨在至少在一定程度上解决相关技术中的技术问题之一。为此,本发明的一个目的在于提出一种移动终端中屏幕的控制方法,该方法不需要使用重力传感器就能实现屏幕的旋转,从而大大减少了硬件成本。The present invention aims to solve one of the technical problems in the related art at least to a certain extent. Therefore, an object of the present invention is to provide a method for controlling the screen in a mobile terminal, which can realize the rotation of the screen without using a gravity sensor, thereby greatly reducing hardware costs.
本发明的第二个目的在于提出一种移动终端中屏幕的控制装置。The second object of the present invention is to provide a device for controlling a screen in a mobile terminal.
本发明的第三个目的在于提出一种移动终端。The third object of the present invention is to provide a mobile terminal.
为了实现上述目的,本发明第一方面实施例的移动终端中屏幕的控制方法,包括以下步骤:分别获取移动终端在第一时间拍摄的第一图像和在第二时间拍摄的第二图像;根据所述第一图像和第二图像判别所述移动终端的旋转方向;以及根据所述移动终端的旋转方向控制所述移动终端的屏幕进行旋转。In order to achieve the above object, the method for controlling the screen in the mobile terminal according to the embodiment of the first aspect of the present invention includes the following steps: respectively acquiring the first image taken by the mobile terminal at the first time and the second image taken at the second time; Discriminating the rotation direction of the mobile terminal from the first image and the second image; and controlling the rotation of the screen of the mobile terminal according to the rotation direction of the mobile terminal.
根据本发明实施例的移动终端中屏幕的控制方法,通过不断使用摄像头拍摄图像,并根据两个时间拍摄的两个图像判别移动终端的旋转方向,以根据移动终端的旋转方向控制移动终端的屏幕旋转,该方法不需要使用重力传感器就能实现屏幕的旋转,大大减少了硬件成本。According to the method for controlling the screen in the mobile terminal according to the embodiment of the present invention, by continuously using the camera to capture images, and judging the rotation direction of the mobile terminal according to the two images taken at two times, to control the screen of the mobile terminal according to the rotation direction of the mobile terminal Rotation, this method can realize the rotation of the screen without using the gravity sensor, which greatly reduces the hardware cost.
为了实现上述目的,本发明第二方面实施例的移动终端中屏幕的控制装置,包括:获取模块,用于分别获取移动终端在第一时间拍摄的第一图像和在第二时间拍摄的第二图像;方向判断模块,用于根据所述第一图像和第二图像判别所述移动终端的旋转方向;以及旋转控制模块,用于根据所述移动终端的旋转方向控制所述移动终端的屏幕进行旋转。In order to achieve the above object, the device for controlling the screen in the mobile terminal according to the embodiment of the second aspect of the present invention includes: an acquisition module for acquiring the first image captured by the mobile terminal at the first time and the second image captured at the second time respectively image; a direction judging module, used to judge the rotation direction of the mobile terminal according to the first image and the second image; and a rotation control module, used to control the screen of the mobile terminal to rotate according to the rotation direction of the mobile terminal rotate.
根据本发明实施例的移动终端中屏幕的控制装置,获取模块获取移动终端在两个时间拍摄的两个图像,方向判断模块根据两个图像判别移动终端的旋转方向,以使旋转控制模块根据移动终端的旋转方向控制移动终端的屏幕旋转,该装置不需要使用重力传感器就能实现屏幕的旋转,大大减少了硬件成本。According to the control device of the screen in the mobile terminal in the embodiment of the present invention, the acquisition module acquires two images taken by the mobile terminal at two times, and the direction judgment module judges the rotation direction of the mobile terminal according to the two images, so that the rotation control module according to the movement The rotation direction of the terminal controls the rotation of the screen of the mobile terminal, and the device can realize the rotation of the screen without using a gravity sensor, thereby greatly reducing hardware costs.
为了实现上述目的,本发明第三方面实施例的移动终端,包括:本发明第二方面实施例的移动终端中屏幕的控制装置。In order to achieve the above object, the mobile terminal according to the embodiment of the third aspect of the present invention includes: the device for controlling the screen in the mobile terminal according to the embodiment of the second aspect of the present invention.
根据本发明实施例的移动终端,由于具有了移动终端中屏幕的控制装置,不需要使用重力传感器就能实现屏幕的自动旋转功能,从而大大节约了硬件成本。According to the mobile terminal of the embodiment of the present invention, since it has a screen control device in the mobile terminal, the automatic rotation function of the screen can be realized without using a gravity sensor, thereby greatly saving hardware cost.
附图说明Description of drawings
图1是根据本发明一个实施例的移动终端中屏幕的控制方法的流程图;FIG. 1 is a flowchart of a method for controlling a screen in a mobile terminal according to an embodiment of the present invention;
图2是根据本发明一个实施例的根据第一图像和第二图像判别移动终端的旋转方向的流程图;Fig. 2 is a flow chart of judging the rotation direction of the mobile terminal according to the first image and the second image according to one embodiment of the present invention;
图3是根据本发明一个实施例的第一轮廓数据的示意图;Fig. 3 is a schematic diagram of first contour data according to an embodiment of the present invention;
图4是根据本发明一个实施例的第二轮廓数据的示意图;Fig. 4 is a schematic diagram of second contour data according to an embodiment of the present invention;
图5A是根据本发明一个实施例的L6在第一图像中的位置示意图;Fig. 5A is a schematic diagram of the position of L6 in the first image according to an embodiment of the present invention;
图5B是根据本发明一个实施例的L6在第二图像中的位置示意图;Fig. 5B is a schematic diagram of the position of L6 in the second image according to an embodiment of the present invention;
图5C是根据本发明一个实施例的L6在第一图像和第二图像中的位置在同一坐标系下的示意图;Fig. 5C is a schematic diagram of the position of L6 in the first image and the second image in the same coordinate system according to an embodiment of the present invention;
图6是根据本发明一个实施例的移动终端中屏幕的控制装置的结构示意图。Fig. 6 is a schematic structural diagram of an apparatus for controlling a screen in a mobile terminal according to an embodiment of the present invention.
具体实施方式detailed description
下面详细描述本发明的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,旨在用于解释本发明,而不能理解为对本发明的限制。Embodiments of the present invention are described in detail below, examples of which are shown in the drawings, wherein the same or similar reference numerals designate the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the figures are exemplary and are intended to explain the present invention and should not be construed as limiting the present invention.
下面参考附图描述本发明实施例的移动终端中屏幕的控制方法、装置和移动终端。The method and device for controlling the screen in the mobile terminal and the mobile terminal according to the embodiments of the present invention will be described below with reference to the accompanying drawings.
图1是根据本发明一个实施例的移动终端中屏幕的控制方法的流程图。如图1所示,本发明实施例的移动终端中屏幕的控制方法,包括以下步骤:Fig. 1 is a flowchart of a method for controlling a screen in a mobile terminal according to an embodiment of the present invention. As shown in Figure 1, the control method of the screen in the mobile terminal of the embodiment of the present invention, comprises the following steps:
S1,分别获取移动终端在第一时间拍摄的第一图像和在第二时间拍摄的第二图像。S1. Respectively acquire a first image taken by the mobile terminal at a first time and a second image taken at a second time.
在本发明的一个实施例中,在移动终端的屏幕点亮之后或持续点亮中获取第一图像和第二图像,并在屏幕灭或关闭之后,删除第一图像和第二图像。In an embodiment of the present invention, the first image and the second image are acquired after the screen of the mobile terminal is turned on or continues to be turned on, and the first image and the second image are deleted after the screen is off or turned off.
具体地,在用户开启屏幕自动旋转功能,屏幕点亮时开启定时器准备拍照,以获取第一时间拍摄的第一图像和在第二时间拍摄的第二图像。其中,移动终端在拍照时前后两张图像(即第一图像和第二图像)的拍摄间隙可以是几秒钟,且可以自动触发。Specifically, when the user turns on the automatic screen rotation function and the screen is on, a timer is started to prepare for taking pictures, so as to obtain the first image taken at the first time and the second image taken at the second time. Wherein, when the mobile terminal takes pictures, the interval between taking pictures of two images (ie, the first image and the second image) can be several seconds, and can be automatically triggered.
S2,根据第一图像和第二图像判别移动终端的旋转方向。S2. Determine the rotation direction of the mobile terminal according to the first image and the second image.
在本发明的一个实施例中,如图2所示,S2具体包括:In one embodiment of the present invention, as shown in Figure 2, S2 specifically includes:
S21,提取第一图像中的第一轮廓数据,并提取第二图像中的第二轮廓数据。S21. Extract first contour data in the first image, and extract second contour data in the second image.
具体地,获取到第一图像和第二图像后,需要对图像提取轮廓数据,所提取的轮廓数据是用来判断图像是否旋转的有效数据。例如,可以通过图像处理软件提取第一图像中的第一轮廓数据,如图3中所示的L1,L2,L3,L4,L5,L6,以及提取第二图像中的第二轮廓数据,如图4中所示的L1,L2,L3,L4,L5,L6。Specifically, after the first image and the second image are acquired, contour data needs to be extracted from the images, and the extracted contour data is effective data for judging whether the image is rotated. For example, the first contour data in the first image can be extracted by image processing software, such as L1, L2, L3, L4, L5, L6 as shown in Figure 3, and the second contour data in the second image can be extracted, such as L1, L2, L3, L4, L5, L6 shown in Figure 4.
S22,根据第一轮廓数据和第二轮廓数据判别移动终端的旋转方向。S22. Determine the rotation direction of the mobile terminal according to the first contour data and the second contour data.
在本发明的一个实施例中,根据第一轮廓数据和第二轮廓数据判别移动终端的旋转方向,具体为:根据第一轮廓数据的方向和第二轮廓数据的方向判别移动终端的旋转方向。In an embodiment of the present invention, judging the rotation direction of the mobile terminal according to the first contour data and the second contour data is specifically: judging the rotation direction of the mobile terminal according to the direction of the first contour data and the direction of the second contour data.
具体地,将第一轮廓数据和第二轮廓数据进行对比,选出相关的数据项,例如选出长度相同的数据项,例如L6,然后分别获取L6在第一图像和第二图像中的位置,进而根据L6位置的变化判别出移动终端的旋转方向。Specifically, compare the first contour data with the second contour data, select relevant data items, for example, select data items with the same length, such as L6, and then obtain the positions of L6 in the first image and the second image respectively , and further determine the rotation direction of the mobile terminal according to the change of the L6 position.
S3,根据移动终端的旋转方向控制移动终端的屏幕进行旋转。S3, controlling the screen of the mobile terminal to rotate according to the rotation direction of the mobile terminal.
具体地,判别出移动终端的旋转方向之后,便可以根据移动终端的旋转方向控制移动终端的屏幕进行相对应的旋转。Specifically, after the rotation direction of the mobile terminal is determined, the screen of the mobile terminal can be controlled to perform a corresponding rotation according to the rotation direction of the mobile terminal.
本发明实施例的移动终端中屏幕的控制方法,通过不断使用摄像头拍摄图像,并根据两个时间拍摄的两个图像判别移动终端的旋转方向,以根据移动终端的旋转方向控制移动终端的屏幕旋转,该方法不需要使用重力传感器就能实现屏幕的旋转,大大减少了硬件成本。The method for controlling the screen in the mobile terminal according to the embodiment of the present invention continuously uses the camera to capture images, and judges the rotation direction of the mobile terminal according to the two images captured at two times, so as to control the rotation of the screen of the mobile terminal according to the rotation direction of the mobile terminal , this method can realize the rotation of the screen without using the gravity sensor, which greatly reduces the hardware cost.
在本发明的一个实施例中,在根据第一轮廓数据和第二轮廓数据判别移动终端的旋转方向之后还包括:根据第一轮廓数据和第二轮廓数据获取移动终端的旋转角度,以根据旋转角度控制移动终端的屏幕进行旋转。In one embodiment of the present invention, after judging the rotation direction of the mobile terminal according to the first contour data and the second contour data, it further includes: obtaining the rotation angle of the mobile terminal according to the first contour data and the second contour data, so as to obtain the rotation angle of the mobile terminal according to the rotation The angle controls the rotation of the screen of the mobile terminal.
优选地,根据旋转角度控制移动终端的屏幕进行旋转,具体包括:判断所述旋转角度是否大于预设角度;如果是,则根据所述旋转角度控制所述移动终端的屏幕进行旋转。Preferably, controlling the rotation of the screen of the mobile terminal according to the rotation angle specifically includes: judging whether the rotation angle is greater than a preset angle; if yes, controlling the rotation of the screen of the mobile terminal according to the rotation angle.
具体地,例如,如图5A、图5B、图5C所示,其中,图5A所示为L6在第一图像中的位置示意图,图5B所示为L6在第二图像中的位置示意图,图5C所示为L6在第一图像和第二图像中的位置在同一坐标系下的示意图,图中的P1代表第一图像,P2代表第二图像。在根据L6位置的变化判别出移动终端的旋转方向之后,通过L6在第一图像中的坐标位置和在第二图像中的坐标位置可以计算出L6的旋转角度,从而获知了移动终端的旋转角度,并当移动终端的旋转角度大于预设角度(例如,45度)时,控制移动终端的屏幕进行相对应的旋转。Specifically, for example, as shown in Fig. 5A, Fig. 5B, and Fig. 5C, wherein Fig. 5A shows a schematic diagram of the position of L6 in the first image, and Fig. 5B shows a schematic diagram of the position of L6 in the second image, Fig. 5C is a schematic diagram of the position of L6 in the first image and the second image in the same coordinate system, P1 in the figure represents the first image, and P2 represents the second image. After the rotation direction of the mobile terminal is determined according to the change of the position of L6, the rotation angle of L6 can be calculated through the coordinate position of L6 in the first image and the coordinate position in the second image, thereby knowing the rotation angle of the mobile terminal , and when the rotation angle of the mobile terminal is greater than a preset angle (for example, 45 degrees), the screen of the mobile terminal is controlled to perform a corresponding rotation.
在本发明的一个实施例中,在分别获取移动终端在第一时间拍摄的第一图像和在第二时间拍摄的第二图像之后,还包括:对第一图像和第二图像进行筛选。In an embodiment of the present invention, after respectively acquiring the first image taken by the mobile terminal at the first time and the second image taken at the second time, further includes: screening the first image and the second image.
在本发明的一个实施例中,对第一图像和第二图像进行筛选,具体包括:提取第一图像中的第一轮廓数据,并提取第二图像中的第二轮廓数据,并判断第一轮廓数据与第二轮廓数据是否相关;如果不相关,则删除第一图像和第二图像。In one embodiment of the present invention, the screening of the first image and the second image specifically includes: extracting the first contour data in the first image, extracting the second contour data in the second image, and judging the first Whether the contour data is related to the second contour data; if not, delete the first image and the second image.
具体地,获取第一图像和第二图像之后,如果获取的第一图像和/或第二图像不合格,例如,对第一图像和/或第二图像进行轮廓提取时无法提取到有效数据(即第一轮廓数据与第二轮廓数据不相关),则丢弃该图像,并重新拍照以获取新的图像,以保证判别移动终端的旋转方向的准确度。Specifically, after the first image and the second image are acquired, if the acquired first image and/or the second image are unqualified, for example, valid data cannot be extracted when performing contour extraction on the first image and/or the second image ( That is, the first profile data is not related to the second profile data), then the image is discarded, and a new image is taken to obtain a new image, so as to ensure the accuracy of determining the rotation direction of the mobile terminal.
在本发明的实施例中,可以在移动终端的存储器中开辟出专门的照片存储区域,用户开启屏幕自动旋转功能后,定时器开启,将定时拍照,并保存最新照片并删除老照片。这样可以保证保留最新的位置信息,并不占用过多的系统空间。其中,前后两张照片的拍照间隙可以是几秒钟,可由系统自动触发。另外,当屏幕灭或用户关闭屏幕自动旋转功能时,则结束定时器,并删除所拍摄的照片数据。In the embodiment of the present invention, a special photo storage area can be opened up in the memory of the mobile terminal. After the user turns on the automatic screen rotation function, the timer is turned on to take pictures at regular intervals, save the latest photos and delete old photos. This ensures that the latest location information is kept and does not take up too much system space. Among them, the interval between taking pictures of the two pictures before and after can be a few seconds, which can be automatically triggered by the system. In addition, when the screen is off or the user turns off the automatic screen rotation function, the timer ends and the captured photo data is deleted.
在本发明的实施例中,所拍摄照片(即第一图像和第二图像)的分辨率可以是较低的分辨率,能够识别即可。In the embodiment of the present invention, the resolution of the photographs taken (that is, the first image and the second image) may be a relatively low resolution, as long as they can be identified.
为了实现上述实施例,本发明还提出一种移动终端中屏幕的控制装置。In order to realize the above embodiments, the present invention further proposes a device for controlling a screen in a mobile terminal.
图6是根据本发明一个实施例的移动终端中屏幕的控制装置的结构示意图。如图6所示,本发明实施例的移动终端中屏幕的控制装置,包括:获取模块100、方向判断模块200和旋转控制模块300。Fig. 6 is a schematic structural diagram of an apparatus for controlling a screen in a mobile terminal according to an embodiment of the present invention. As shown in FIG. 6 , the device for controlling a screen in a mobile terminal according to an embodiment of the present invention includes: an acquisition module 100 , a direction judgment module 200 and a rotation control module 300 .
其中,获取模块100用于分别获取移动终端在第一时间拍摄的第一图像和在第二时间拍摄的第二图像。Wherein, the acquisition module 100 is configured to respectively acquire the first image taken by the mobile terminal at the first time and the second image taken at the second time.
在本发明的一个实施例中,获取模块100具体用于:在移动终端的屏幕点亮之后或持续点亮中获取第一图像和第二图像,并在屏幕灭或关闭之后,删除第一图像和第二图像。In one embodiment of the present invention, the obtaining module 100 is specifically configured to: obtain the first image and the second image after the screen of the mobile terminal is turned on or during continuous lighting, and delete the first image after the screen is off or off and the second image.
具体地,在用户开启屏幕自动旋转功能,屏幕点亮时或持续点亮中开启定时器准备拍照,以获取第一时间拍摄的第一图像和在第二时间拍摄的第二图像。其中,移动终端在拍照时前后两张图像(即第一图像和第二图像)的拍摄间隙可以是几秒钟,且可以自动触发。Specifically, when the user turns on the screen auto-rotation function, a timer is started to prepare for taking pictures when the screen is on or continues to be on, so as to obtain the first image taken at the first time and the second image taken at the second time. Wherein, when the mobile terminal takes pictures, the interval between taking pictures of two images (ie, the first image and the second image) can be several seconds, and can be automatically triggered.
方向判断模块200用于根据第一图像和第二图像判别移动终端的旋转方向。The direction judging module 200 is used for judging the rotation direction of the mobile terminal according to the first image and the second image.
在本发明的一个实施例中,方向判断模块200具体用于:提取第一图像中的第一轮廓数据,并提取第二图像中的第二轮廓数据;以及根据第一轮廓数据和第二轮廓数据判别移动终端的旋转方向。In one embodiment of the present invention, the direction judging module 200 is specifically configured to: extract the first contour data in the first image, and extract the second contour data in the second image; The data determines the rotation direction of the mobile terminal.
在本发明的一个实施例中,方向判断模块200根据第一轮廓数据和第二轮廓数据判别移动终端的旋转方向,具体为:根据第一轮廓数据的方向和第二轮廓数据的方向判别移动终端的旋转方向。In an embodiment of the present invention, the direction judging module 200 judges the rotation direction of the mobile terminal according to the first contour data and the second contour data, specifically: judges the rotation direction of the mobile terminal according to the direction of the first contour data and the direction of the second contour data direction of rotation.
具体地,获取到第一图像和第二图像后,需要对图像提取轮廓数据,所提取的轮廓数据是用来判断图像是否旋转的有效数据。例如,可以通过图像处理软件提取第一图像中的第一轮廓数据,如图3中所示的L1,L2,L3,L4,L5,L6,以及提取第二图像中的第二轮廓数据,如图4中所示的L1,L2,L3,L4,L5,L6。Specifically, after the first image and the second image are acquired, contour data needs to be extracted from the images, and the extracted contour data is effective data for judging whether the image is rotated. For example, the first contour data in the first image can be extracted by image processing software, such as L1, L2, L3, L4, L5, L6 as shown in Figure 3, and the second contour data in the second image can be extracted, such as L1, L2, L3, L4, L5, L6 shown in Figure 4.
进一步地,例如,将第一轮廓数据和第二轮廓数据进行对比,选出相关的数据项,例如选出长度相同的数据项,例如L6,然后分别获取L6在第一图像和第二图像中的位置,进而根据L6位置的变化判别出移动终端的旋转方向。Further, for example, compare the first contour data with the second contour data, select relevant data items, for example, select data items with the same length, such as L6, and then obtain L6 in the first image and the second image respectively position, and then determine the rotation direction of the mobile terminal according to the change of the L6 position.
旋转控制模块300用于根据移动终端的旋转方向控制移动终端的屏幕进行旋转。The rotation control module 300 is used for controlling the rotation of the screen of the mobile terminal according to the rotation direction of the mobile terminal.
具体地,方向判断模块200判别出移动终端的旋转方向之后,旋转控制模块300便可以根据移动终端的旋转方向控制移动终端的屏幕进行相对应的旋转。Specifically, after the direction determination module 200 determines the rotation direction of the mobile terminal, the rotation control module 300 can control the screen of the mobile terminal to rotate correspondingly according to the rotation direction of the mobile terminal.
本发明实施例的移动终端中屏幕的控制装置,获取模块获取移动终端在两个时间拍摄的两个图像,方向判断模块根据两个图像判别移动终端的旋转方向,以使旋转控制模块根据移动终端的旋转方向控制移动终端的屏幕旋转,该装置不需要使用重力传感器就能实现屏幕的旋转,大大减少了硬件成本。In the control device of the screen in the mobile terminal in the embodiment of the present invention, the acquisition module acquires two images taken by the mobile terminal at two times, and the direction judgment module judges the rotation direction of the mobile terminal according to the two images, so that the rotation control module according to the mobile terminal The rotation direction of the mobile terminal controls the rotation of the screen of the mobile terminal, and the device can realize the rotation of the screen without using a gravity sensor, which greatly reduces the hardware cost.
在本发明的一个实施例中,方向判断模块200还用于:根据第一轮廓数据和第二轮廓数据获取移动终端的旋转角度,以使旋转控制模块300根据旋转角度控制移动终端的屏幕进行旋转。In one embodiment of the present invention, the direction judging module 200 is also used to: obtain the rotation angle of the mobile terminal according to the first contour data and the second contour data, so that the rotation control module 300 controls the screen of the mobile terminal to rotate according to the rotation angle .
优选地,方向判断模块200判断旋转角度是否大于预设角度,如果是,则根据旋转角度控制移动终端的屏幕进行旋转。Preferably, the direction judging module 200 judges whether the rotation angle is greater than a preset angle, and if so, controls the screen of the mobile terminal to rotate according to the rotation angle.
具体地,例如,如图5A、图5B、图5C所示,方向判断模块200在根据L6位置的变化判别出移动终端的旋转方向之后,通过L6在第一图像中的坐标位置和在第二图像中的坐标位置可以计算出L6的旋转角度,从而获知了移动终端的旋转角度,旋转控制模块300在当移动终端的旋转角度大于预设角度(例如,45度)时,控制移动终端的屏幕进行相对应的旋转。Specifically, for example, as shown in FIG. 5A, FIG. 5B, and FIG. 5C, after the direction determination module 200 determines the rotation direction of the mobile terminal according to the change of the position of L6, the coordinate position of L6 in the first image and the coordinate position of L6 in the second image The coordinate position in the image can calculate the rotation angle of L6, thereby knowing the rotation angle of the mobile terminal, and the rotation control module 300 controls the screen of the mobile terminal when the rotation angle of the mobile terminal is greater than a preset angle (for example, 45 degrees). Make the corresponding rotation.
在本发明的一个实施例中,方向判断模块200还用于:对第一图像和第二图像进行筛选。In an embodiment of the present invention, the direction judging module 200 is further configured to: filter the first image and the second image.
在本发明的一个实施例中,方向判断模块200对第一图像和第二图像进行筛选,具体为:提取第一图像中的第一轮廓数据,并提取第二图像中的第二轮廓数据,并判断第一轮廓数据与第二轮廓数据是否相关,如果不相关,则删除述第一图像和第二图像。In an embodiment of the present invention, the direction judging module 200 screens the first image and the second image, specifically: extracting the first contour data in the first image, and extracting the second contour data in the second image, And judge whether the first contour data is related to the second contour data, if not, delete the first image and the second image.
具体地,获取模块100获取第一图像和第二图像后,如果第一图像和/或第二图像不合格,例如,方向判断模块200对第一图像和/或第二图像进行轮廓提取时无法提取到有效数据(即第一轮廓数据与第二轮廓数据不相关),则丢弃该图像,那么获取模块100重新拍照以获取新的图像,以保证判别移动终端的旋转方向的准确度。Specifically, after the acquisition module 100 acquires the first image and the second image, if the first image and/or the second image are unqualified, for example, the direction judging module 200 cannot perform contour extraction on the first image and/or the second image. If valid data is extracted (that is, the first contour data is irrelevant to the second contour data), the image is discarded, and the acquisition module 100 re-photographs to obtain a new image to ensure the accuracy of determining the rotation direction of the mobile terminal.
为了实现上述实施例,本发明还提出一种移动终端。该移动终端包括本发明实施例的移动终端中屏幕的控制装置。In order to realize the above embodiments, the present invention also proposes a mobile terminal. The mobile terminal includes the device for controlling the screen in the mobile terminal according to the embodiment of the present invention.
本发明实施例的移动终端,由于具有了移动终端中屏幕的控制装置,不需要使用重力传感器就能实现屏幕的自动旋转功能,从而大大节约了硬件成本。The mobile terminal in the embodiment of the present invention has a screen control device in the mobile terminal, and can realize the automatic rotation function of the screen without using a gravity sensor, thereby greatly saving hardware costs.
在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本发明的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不必须针对的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任一个或多个实施例或示例中以合适的方式结合。此外,在不相互矛盾的情况下,本领域的技术人员可以将本说明书中描述的不同实施例或示例以及不同实施例或示例的特征进行结合和组合。In the description of this specification, descriptions referring to the terms "one embodiment", "some embodiments", "example", "specific examples", or "some examples" mean that specific features described in connection with the embodiment or example , structure, material or feature is included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the described specific features, structures, materials or characteristics may be combined in any suitable manner in any one or more embodiments or examples. In addition, those skilled in the art can combine and combine different embodiments or examples and features of different embodiments or examples described in this specification without conflicting with each other.
此外,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个该特征。在本发明的描述中,“多个”的含义是至少两个,例如两个,三个等,除非另有明确具体的限定。In addition, the terms "first" and "second" are used for descriptive purposes only, and cannot be interpreted as indicating or implying relative importance or implicitly specifying the quantity of indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include at least one of these features. In the description of the present invention, "plurality" means at least two, such as two, three, etc., unless otherwise specifically defined.
流程图中或在此以其他方式描述的任何过程或方法描述可以被理解为,表示包括一个或更多个用于实现特定逻辑功能或过程的步骤的可执行指令的代码的模块、片段或部分,并且本发明的优选实施方式的范围包括另外的实现,其中可以不按所示出或讨论的顺序,包括根据所涉及的功能按基本同时的方式或按相反的顺序,来执行功能,这应被本发明的实施例所属技术领域的技术人员所理解。Any process or method descriptions in flowcharts or otherwise described herein may be understood to represent modules, segments or portions of code comprising one or more executable instructions for implementing specific logical functions or steps of the process , and the scope of preferred embodiments of the invention includes alternative implementations in which functions may be performed out of the order shown or discussed, including substantially concurrently or in reverse order depending on the functions involved, which shall It is understood by those skilled in the art to which the embodiments of the present invention pertain.
在流程图中表示或在此以其他方式描述的逻辑和/或步骤,例如,可以被认为是用于实现逻辑功能的可执行指令的定序列表,可以具体实现在任何计算机可读介质中,以供指令执行系统、装置或设备(如基于计算机的系统、包括处理器的系统或其他可以从指令执行系统、装置或设备取指令并执行指令的系统)使用,或结合这些指令执行系统、装置或设备而使用。就本说明书而言,"计算机可读介质"可以是任何可以包含、存储、通信、传播或传输程序以供指令执行系统、装置或设备或结合这些指令执行系统、装置或设备而使用的装置。计算机可读介质的更具体的示例(非穷尽性列表)包括以下:具有一个或多个布线的电连接部(电子装置),便携式计算机盘盒(磁装置),随机存取存储器(RAM),只读存储器(ROM),可擦除可编辑只读存储器(EPROM或闪速存储器),光纤装置,以及便携式光盘只读存储器(CDROM)。另外,计算机可读介质甚至可以是可在其上打印所述程序的纸或其他合适的介质,因为可以例如通过对纸或其他介质进行光学扫描,接着进行编辑、解译或必要时以其他合适方式进行处理来以电子方式获得所述程序,然后将其存储在计算机存储器中。The logic and/or steps represented in the flowcharts or otherwise described herein, for example, can be considered as a sequenced listing of executable instructions for implementing logical functions, can be embodied in any computer-readable medium, For use with instruction execution systems, devices, or devices (such as computer-based systems, systems including processors, or other systems that can fetch instructions from instruction execution systems, devices, or devices and execute instructions), or in conjunction with these instruction execution systems, devices or equipment used. For the purposes of this specification, a "computer-readable medium" may be any device that can contain, store, communicate, propagate or transmit a program for use in or in conjunction with an instruction execution system, device or device. More specific examples (non-exhaustive list) of computer-readable media include the following: electrical connection with one or more wires (electronic device), portable computer disk case (magnetic device), random access memory (RAM), Read Only Memory (ROM), Erasable and Editable Read Only Memory (EPROM or Flash Memory), Fiber Optic Devices, and Portable Compact Disc Read Only Memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program can be printed, since the program can be read, for example, by optically scanning the paper or other medium, followed by editing, interpretation or other suitable processing if necessary. The program is processed electronically and stored in computer memory.
应当理解,本发明的各部分可以用硬件、软件、固件或它们的组合来实现。在上述实施方式中,多个步骤或方法可以用存储在存储器中且由合适的指令执行系统执行的软件或固件来实现。例如,如果用硬件来实现,和在另一实施方式中一样,可用本领域公知的下列技术中的任一项或他们的组合来实现:具有用于对数据信号实现逻辑功能的逻辑门电路的离散逻辑电路,具有合适的组合逻辑门电路的专用集成电路,可编程门阵列(PGA),现场可编程门阵列(FPGA)等。It should be understood that various parts of the present invention can be realized by hardware, software, firmware or their combination. In the embodiments described above, various steps or methods may be implemented by software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented by any one or combination of the following techniques known in the art: Discrete logic circuits, ASICs with suitable combinational logic gates, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.
本技术领域的普通技术人员可以理解实现上述实施例方法携带的全部或部分步骤是可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,该程序在执行时,包括方法实施例的步骤之一或其组合。Those of ordinary skill in the art can understand that all or part of the steps carried by the methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium. During execution, one or a combination of the steps of the method embodiments is included.
此外,在本发明各个实施例中的各功能单元可以集成在一个处理模块中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing module, each unit may exist separately physically, or two or more units may be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software function modules. If the integrated modules are realized in the form of software function modules and sold or used as independent products, they can also be stored in a computer-readable storage medium.
上述提到的存储介质可以是只读存储器,磁盘或光盘等。尽管上面已经示出和描述了本发明的实施例,可以理解的是,上述实施例是示例性的,不能理解为对本发明的限制,本领域的普通技术人员在本发明的范围内可以对上述实施例进行变化、修改、替换和变型。The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, and the like. Although the embodiments of the present invention have been shown and described above, it can be understood that the above embodiments are exemplary and should not be construed as limiting the present invention, those skilled in the art can make the above-mentioned The embodiments are subject to changes, modifications, substitutions and variations.
Claims (17)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410686910.XA CN105704290A (en) | 2014-11-25 | 2014-11-25 | Mobile terminal screen control method, device and mobile terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410686910.XA CN105704290A (en) | 2014-11-25 | 2014-11-25 | Mobile terminal screen control method, device and mobile terminal |
Publications (1)
Publication Number | Publication Date |
---|---|
CN105704290A true CN105704290A (en) | 2016-06-22 |
Family
ID=56941921
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410686910.XA Pending CN105704290A (en) | 2014-11-25 | 2014-11-25 | Mobile terminal screen control method, device and mobile terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105704290A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007129317A (en) * | 2005-11-01 | 2007-05-24 | Sharp Corp | Portable information terminal |
US20100184474A1 (en) * | 1999-12-01 | 2010-07-22 | Silverbrook Research Pty Ltd | Method of filling in form using handheld display device |
CN103179278A (en) * | 2013-03-21 | 2013-06-26 | 广东欧珀移动通信有限公司 | Method and device for controlling screen rotation |
CN103455256A (en) * | 2013-08-21 | 2013-12-18 | 小米科技有限责任公司 | Method and terminal for rotating display picture of screen |
CN103516866A (en) * | 2012-06-19 | 2014-01-15 | 中兴通讯股份有限公司 | Method and device for determining movement information of terminal |
-
2014
- 2014-11-25 CN CN201410686910.XA patent/CN105704290A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100184474A1 (en) * | 1999-12-01 | 2010-07-22 | Silverbrook Research Pty Ltd | Method of filling in form using handheld display device |
JP2007129317A (en) * | 2005-11-01 | 2007-05-24 | Sharp Corp | Portable information terminal |
CN103516866A (en) * | 2012-06-19 | 2014-01-15 | 中兴通讯股份有限公司 | Method and device for determining movement information of terminal |
CN103179278A (en) * | 2013-03-21 | 2013-06-26 | 广东欧珀移动通信有限公司 | Method and device for controlling screen rotation |
CN103455256A (en) * | 2013-08-21 | 2013-12-18 | 小米科技有限责任公司 | Method and terminal for rotating display picture of screen |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110650241B (en) | Method and mobile terminal for presenting panoramic photos in mobile terminal | |
CN103558996B (en) | Photo processing method and system | |
CN104574397B (en) | The method and mobile terminal of a kind of image procossing | |
US9626076B2 (en) | Display apparatus for displaying images and method thereof | |
CN108279832A (en) | Image-pickup method and electronic device | |
CN105592267B (en) | Photographing control method, photographing control device and photographing system | |
CN103729120A (en) | Method for generating thumbnail image and electronic device thereof | |
US20170244938A1 (en) | Camera system with an automatic photo taking | |
CN104539843A (en) | Terminal shooting method | |
WO2017177845A1 (en) | Control method, control device, electronic device, and computer readable storage medium | |
CN104853095A (en) | Photographing method and user terminal | |
WO2016179883A1 (en) | Method and apparatus for rotating display picture of terminal screen | |
CN105809710A (en) | System and method of detecting moving objects | |
CN108989660A (en) | Control method of sliding assembly, control assembly, electronic device and storage medium | |
US20140333818A1 (en) | Apparatus and method for composing moving object in one image | |
CN104898957A (en) | Method and device for controlling screen rotation, and user terminal | |
JP2009162563A5 (en) | ||
CN103501410A (en) | Reminding method and device of shooting as well as generation method and device of detection mode | |
JP2022027804A (en) | Information processing equipment, information processing system, information processing method and program | |
CN104427244B (en) | Picture pick-up device and image capture method | |
CN109660712A (en) | Select the mthods, systems and devices of the frame of video sequence | |
JP2007221727A5 (en) | ||
CN108777784A (en) | Depth acquisition method and apparatus, electronic apparatus, computer device, and storage medium | |
CN105704290A (en) | Mobile terminal screen control method, device and mobile terminal | |
US20150042821A1 (en) | Handheld device and method for controlling orientation of display of handheld device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20160622 |
|
RJ01 | Rejection of invention patent application after publication |