CN104954676B - Method for controlling automatic rotation of camera and electronic equipment - Google Patents
Method for controlling automatic rotation of camera and electronic equipment Download PDFInfo
- Publication number
- CN104954676B CN104954676B CN201510324160.6A CN201510324160A CN104954676B CN 104954676 B CN104954676 B CN 104954676B CN 201510324160 A CN201510324160 A CN 201510324160A CN 104954676 B CN104954676 B CN 104954676B
- Authority
- CN
- China
- Prior art keywords
- camera
- rotation
- instruction
- electronic device
- user
- 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.)
- Active
Links
Landscapes
- Studio Devices (AREA)
- Accessories Of Cameras (AREA)
Abstract
Description
技术领域technical field
本发明实施例涉及移动终端领域,并且更为具体地,涉及一种控制摄像头自动旋转的方法及电子设备。Embodiments of the present invention relate to the field of mobile terminals, and more specifically, relate to a method for controlling automatic rotation of a camera and an electronic device.
背景技术Background technique
随着移动终端(例如,智能手机,PAD)的快速发展,移动终端已经广泛应用于生活和工作的各个领域,而移动终端的相机功能也已经成为移动终端的常用功能。With the rapid development of mobile terminals (eg, smart phones, PADs), mobile terminals have been widely used in various fields of life and work, and camera functions of mobile terminals have also become common functions of mobile terminals.
为了降低移动终端的生成成本,已经研发并生产出具有手动旋转摄像头的移动终端。但是,采用具有手动旋转摄像头的移动终端进行拍照时,用户只能够通过人工方式控制摄像头的旋转,使得控制摄像头旋转的效率较低,用户操作不方便,进而导致移动终端的实用性较差。In order to reduce the production cost of mobile terminals, mobile terminals having manually rotated cameras have been developed and produced. However, when a mobile terminal with a manually rotating camera is used to take pictures, the user can only manually control the rotation of the camera, which makes controlling the rotation of the camera less efficient and inconvenient for the user to operate, resulting in poor practicability of the mobile terminal.
发明内容Contents of the invention
本发明实施例提供一种控制摄像头自动旋转的方法及电子设备,以提高电子设备的实用性。Embodiments of the present invention provide a method for controlling automatic rotation of a camera and electronic equipment, so as to improve the practicability of the electronic equipment.
第一方面,提供一种控制摄像头自动旋转的方法,所述方法由电子设备执行,所述电子设备为移动终端,包括操作系统、存储器、处理器、显示屏、电池以及可旋转的摄像头,所述方法包括:获取用户的模式切换指令,所述模式切换指令用于使所述电子设备从普通模式切换至相机模式,其中,所述普通模式用于所述用户使用所述电子设备的移动通信功能和/或所述电子设备上安装的除相机应用之外的应用;在所述相机模式下,获取所述用户的旋转摄像头指令;根据所述旋转摄像头指令,控制所述摄像头旋转。In the first aspect, a method for controlling the automatic rotation of the camera is provided, the method is executed by an electronic device, and the electronic device is a mobile terminal, including an operating system, a memory, a processor, a display screen, a battery, and a rotatable camera. The method includes: acquiring a user's mode switching instruction, the mode switching instruction is used to switch the electronic device from a normal mode to a camera mode, wherein the normal mode is used for mobile communication by the user using the electronic device functions and/or applications other than the camera application installed on the electronic device; in the camera mode, obtain the rotation camera instruction of the user; and control the rotation of the camera according to the rotation camera instruction.
结合第一方面,在第一方面的一种实现方式中,所述电子设备包括用于控制所述摄像头旋转的多个物理按键,所述多个物理按键分别对应所述摄像头的不同旋转方向,所述获取所述用户的旋转摄像头指令,包括:确定所述用户按下的物理按键,所述用户按下的物理按键为所述多个物理按键中的其中一个;根据所述用户按下的物理按键,生成所述旋转摄像头指令;所述根据所述旋转摄像头指令,控制所述摄像头旋转,包括:根据所述旋转摄像头指令,控制所述摄像头朝所述用户按下的物理按键对应的旋转方向旋转。With reference to the first aspect, in an implementation manner of the first aspect, the electronic device includes a plurality of physical keys for controlling the rotation of the camera, and the plurality of physical keys respectively correspond to different rotation directions of the camera, The acquisition of the rotation camera instruction of the user includes: determining the physical key pressed by the user, and the physical key pressed by the user is one of the plurality of physical keys; A physical key to generate the rotating camera instruction; the controlling the rotation of the camera according to the rotating camera instruction includes: controlling the rotation of the camera toward the physical button pressed by the user according to the rotating camera instruction direction rotation.
结合第一方面或其上述实现方式的任一种,在第一方面的另一种实现方式中,所述根据所述用户按下的物理按键,生成所述旋转摄像头指令,包括:根据所述用户按下的物理按键被按下的时间长度,确定所述摄像头的目标旋转速度;根据被所述用户按下的物理按键和所述目标旋转速度,生成所述旋转摄像头指令;所述根据所述旋转摄像头指令,控制所述摄像头朝所述用户按下的物理按键对应的旋转方向旋转,包括:根据所述旋转摄像头指令,控制所述摄像头以所述目标旋转速度朝所述用户按下的物理按键对应的旋转方向旋转。In combination with the first aspect or any of the above-mentioned implementation manners, in another implementation manner of the first aspect, the generating the rotation camera instruction according to the physical key pressed by the user includes: according to the The length of time that the physical button pressed by the user is pressed determines the target rotation speed of the camera; according to the physical button pressed by the user and the target rotation speed, the rotation camera instruction is generated; The rotating camera instruction, controlling the camera to rotate toward the rotation direction corresponding to the physical button pressed by the user, includes: according to the rotating camera instruction, controlling the camera to rotate toward the button pressed by the user at the target rotation speed The rotation direction corresponding to the physical button rotates.
结合第一方面或其上述实现方式的任一种,在第一方面的另一种实现方式中,所述多个物理按键包括两个物理按键,所述两个物理按键分别控制所述摄像头朝相反的方向旋转。In combination with the first aspect or any of the above-mentioned implementation manners, in another implementation manner of the first aspect, the plurality of physical buttons include two physical buttons, and the two physical buttons respectively control the orientation of the camera toward Rotate in the opposite direction.
结合第一方面或其上述实现方式的任一种,在第一方面的另一种实现方式中,所述多个物理按键为所述电子设备上的音量键。With reference to the first aspect or any one of the foregoing implementation manners thereof, in another implementation manner of the first aspect, the plurality of physical keys are volume keys on the electronic device.
结合第一方面或其上述实现方式的任一种,在第一方面的另一种实现方式中,所述电子设备包括触摸屏,所述获取所述用户的旋转摄像头指令,包括:通过所述触摸屏获取所述用户的旋转摄像头指令。With reference to the first aspect or any of the above-mentioned implementation manners, in another implementation manner of the first aspect, the electronic device includes a touch screen, and the acquiring the user's rotation camera instruction includes: through the touch screen Obtain the user's instruction to rotate the camera.
结合第一方面或其上述实现方式的任一种,在第一方面的另一种实现方式中,所述通过所述触摸屏获取所述用户的旋转摄像头指令,包括:确定所述用户对所述触摸屏执行了第一滑动操作,其中,所述第一滑动操作为预设的多个滑动操作之一,其中,不同的滑动操作对应所述摄像头的不同旋转方向;根据所述第一滑动操作,生成所述旋转摄像头指令;所述根据所述旋转摄像头指令,控制所述摄像头旋转,包括:根据所述旋转摄像头指令,控制所述摄像头朝所述第一滑动操作对应的旋转方向旋转。With reference to the first aspect or any of the above-mentioned implementation manners, in another implementation manner of the first aspect, the acquiring the user's rotation camera instruction through the touch screen includes: determining the user's The touch screen performs a first sliding operation, wherein the first sliding operation is one of a plurality of preset sliding operations, wherein different sliding operations correspond to different rotation directions of the camera; according to the first sliding operation, Generating the rotation camera instruction; controlling the rotation of the camera according to the rotation camera instruction includes: controlling the rotation of the camera in a rotation direction corresponding to the first sliding operation according to the rotation camera instruction.
结合第一方面或其上述实现方式的任一种,在第一方面的另一种实现方式中,所述根据所述第一滑动操作,生成所述旋转摄像头指令,包括:根据所述用户执行所述第一滑动操作的速度,确定所述摄像头的目标旋转速度;根据所述第一滑动操作和所述目标旋转速度,生成所述旋转摄像指令;所述根据所述旋转摄像头指令,控制所述摄像头朝所述第一滑动操作对应的旋转方向旋转,包括:根据所述旋转摄像头指令,控制所述摄像头以所述目标旋转速度朝所述第一滑动操作对应的旋转方向旋转。With reference to the first aspect or any of the above-mentioned implementation manners, in another implementation manner of the first aspect, the generating the rotation camera instruction according to the first sliding operation includes: executing according to the user The speed of the first sliding operation determines the target rotation speed of the camera; according to the first sliding operation and the target rotation speed, the rotation camera instruction is generated; according to the rotation camera instruction, the control The rotating the camera toward the rotation direction corresponding to the first slide operation includes: controlling the camera to rotate toward the rotation direction corresponding to the first slide operation at the target rotation speed according to the camera rotation instruction.
结合第一方面或其上述实现方式的任一种,在第一方面的另一种实现方式中,所述多个滑动操作包括两个滑动操作,所述两个滑动操作分别控制所述摄像头朝相反的方向旋转。With reference to the first aspect or any of the above-mentioned implementation manners, in another implementation manner of the first aspect, the multiple sliding operations include two sliding operations, and the two sliding operations respectively control the orientation of the camera toward Rotate in the opposite direction.
第二方面,提供一种电子设备,所述电子设备为移动终端,包括操作系统、存储器、处理器、显示屏、电池以及可旋转的摄像头,所述电子设备还包括:处理单元,用于获取用户的模式切换指令,所述模式切换指令用于使所述电子设备从普通模式切换至相机模式,其中,所述普通模式用于所述用户使用所述电子设备的移动通信功能和/或所述电子设备上安装的除相机应用之外的应用;在所述相机模式下,获取所述用户的旋转摄像头指令;旋转单元,用于根据所述旋转摄像头指令,控制所述摄像头旋转。In a second aspect, an electronic device is provided, the electronic device is a mobile terminal, including an operating system, a memory, a processor, a display screen, a battery, and a rotatable camera, and the electronic device further includes: a processing unit configured to acquire A user's mode switching instruction, the mode switching instruction is used to switch the electronic device from a normal mode to a camera mode, wherein the normal mode is used for the user to use the mobile communication function of the electronic device and/or the An application other than the camera application installed on the electronic device; in the camera mode, acquiring the rotation camera instruction of the user; and a rotation unit, configured to control the rotation of the camera according to the rotation camera instruction.
结合第二方面,在第二方面的一种实现方式中,所述电子设备包括用于控制所述摄像头旋转的多个物理按键,所述多个物理按键分别对应所述摄像头的不同旋转方向,所述处理单元具体用于确定所述用户按下的物理按键,所述用户按下的物理按键为所述多个物理按键中的其中一个;根据所述用户按下的物理按键,生成所述旋转摄像头指令;所述旋转单元具体用于根据所述旋转摄像头指令,控制所述摄像头朝所述用户按下的物理按键对应的旋转方向旋转。With reference to the second aspect, in an implementation manner of the second aspect, the electronic device includes a plurality of physical keys for controlling the rotation of the camera, and the plurality of physical keys respectively correspond to different rotation directions of the camera, The processing unit is specifically configured to determine the physical key pressed by the user, where the physical key pressed by the user is one of the plurality of physical keys; according to the physical key pressed by the user, generate the An instruction to rotate the camera; the rotation unit is specifically configured to control the camera to rotate in a rotation direction corresponding to the physical button pressed by the user according to the instruction to rotate the camera.
结合第二方面或其上述实现方式的任一种,在第二方面的另一种实现方式中,所述处理单元具体用于根据所述用户按下的物理按键被按下的时间长度,确定所述摄像头的目标旋转速度;根据所述用户按下的物理按键和所述目标旋转速度,生成所述旋转摄像头指令;所述旋转单元具体用于根据所述旋转摄像头指令,控制所述摄像头以所述目标旋转速度朝所述用户按下的物理按键对应的旋转方向旋转。With reference to the second aspect or any of the above-mentioned implementation manners, in another implementation manner of the second aspect, the processing unit is specifically configured to determine according to the length of time the physical key pressed by the user is pressed The target rotation speed of the camera; according to the physical button pressed by the user and the target rotation speed, the rotation camera instruction is generated; the rotation unit is specifically used to control the camera according to the rotation camera instruction. The target rotation speed rotates toward the rotation direction corresponding to the physical key pressed by the user.
结合第二方面或其上述实现方式的任一种,在第二方面的另一种实现方式中,所述多个物理按键包括两个物理按键,所述两个物理按键分别控制所述摄像头朝相反的方向旋转。In combination with the second aspect or any of the above-mentioned implementation manners, in another implementation manner of the second aspect, the plurality of physical buttons include two physical buttons, and the two physical buttons respectively control the orientation of the camera toward Rotate in the opposite direction.
结合第二方面或其上述实现方式的任一种,在第二方面的另一种实现方式中,所述多个物理按键为所述电子设备上的音量键。With reference to the second aspect or any one of the foregoing implementation manners thereof, in another implementation manner of the second aspect, the plurality of physical keys are volume keys on the electronic device.
结合第二方面或其上述实现方式的任一种,在第二方面的另一种实现方式中,所述电子设备包括触摸屏,所述处理单元具体用于通过所述触摸屏获取所述用户的旋转摄像头指令。With reference to the second aspect or any of the above-mentioned implementation manners, in another implementation manner of the second aspect, the electronic device includes a touch screen, and the processing unit is specifically configured to acquire the rotation of the user through the touch screen Camera commands.
结合第二方面或其上述实现方式的任一种,在第二方面的另一种实现方式中,所述处理单元具体用于确定所述用户对所述触摸屏执行了第一滑动操作,其中,所述第一滑动操作为预设的多个滑动操作之一,其中,不同的滑动操作对应所述摄像头的不同旋转方向;根据所述第一滑动操作,生成所述旋转摄像头指令;所述旋转单元具体用于根据所述旋转摄像头指令,控制所述摄像头朝所述第一滑动操作对应的旋转方向旋转。With reference to the second aspect or any of the above-mentioned implementation manners thereof, in another implementation manner of the second aspect, the processing unit is specifically configured to determine that the user performs a first sliding operation on the touch screen, wherein, The first sliding operation is one of a plurality of preset sliding operations, wherein different sliding operations correspond to different rotation directions of the camera; according to the first sliding operation, an instruction to rotate the camera is generated; the rotating The unit is specifically configured to control the camera to rotate in a rotation direction corresponding to the first sliding operation according to the instruction to rotate the camera.
结合第二方面或其上述实现方式的任一种,在第二方面的另一种实现方式中,所述处理单元具体用于根据所述用户执行所述第一滑动操作的速度,确定所述摄像头的目标旋转速度;根据所述第一滑动操作和所述目标旋转速度,生成所述旋转摄像指令;所述旋转单元具体用于根据所述旋转摄像头指令,控制所述摄像头以所述目标旋转速度朝所述第一滑动操作对应的旋转方向旋转。With reference to the second aspect or any of the above-mentioned implementation manners thereof, in another implementation manner of the second aspect, the processing unit is specifically configured to determine the The target rotation speed of the camera; according to the first sliding operation and the target rotation speed, the rotation camera instruction is generated; the rotation unit is specifically used to control the camera to rotate at the target according to the rotation camera instruction The speed rotates toward the rotation direction corresponding to the first sliding operation.
结合第二方面或其上述实现方式的任一种,在第二方面的另一种实现方式中,所述多个滑动操作包括两个滑动操作,所述两个滑动操作分别控制所述摄像头朝相反的方向旋转。With reference to the second aspect or any of the above-mentioned implementation manners thereof, in another implementation manner of the second aspect, the multiple sliding operations include two sliding operations, and the two sliding operations respectively control the orientation of the camera toward Rotate in the opposite direction.
第三方面,提供一种控制摄像头自动旋转的方法,包括:在相机模式下,获取旋转摄像头指令;根据所述旋转摄像头指令控制摄像头的旋转。In a third aspect, a method for controlling automatic rotation of a camera is provided, including: in a camera mode, acquiring a camera rotation instruction; and controlling rotation of the camera according to the camera rotation instruction.
结合第三方面,在第三方面的一种实现方式中,根据所述旋转摄像头指令控制摄像头的旋转,包括:根据所述旋转摄像头指令控制摄像头的旋转角度和/或旋转方向。With reference to the third aspect, in an implementation manner of the third aspect, controlling the rotation of the camera according to the rotation camera instruction includes: controlling the rotation angle and/or rotation direction of the camera according to the rotation camera instruction.
结合第三方面或其上述实现方式的任一种,在第三方面的另一种实现方式中,所述根据所述旋转摄像头指令控制摄像头的旋转方向,包括:当所述旋转摄像头指令为第一旋转指令时,控制所述摄像头向第一方向旋转;当所述旋转摄像头指令为第二旋转指令时,控制所述摄像头向与所述第一方向相反的第二方向旋转。With reference to the third aspect or any of the above-mentioned implementation manners thereof, in another implementation manner of the third aspect, the controlling the rotation direction of the camera according to the rotation camera instruction includes: when the rotation camera instruction is the first When a rotation instruction is given, the camera is controlled to rotate in a first direction; when the instruction to rotate the camera is a second rotation instruction, the camera is controlled to rotate in a second direction opposite to the first direction.
结合第三方面或其上述实现方式的任一种,在第三方面的另一种实现方式中,所述根据所述旋转摄像头指令控制摄像头的旋转角度,包括:当所述旋转摄像头指令为第一旋转指令时,控制所述摄像头向第一方向的旋转角度;当所述旋转摄像头指令为第二旋转指令时,控制所述摄像头向与所述第一方向相反的第二方向的旋转角度。In combination with the third aspect or any of the above-mentioned implementation manners, in another implementation manner of the third aspect, the controlling the rotation angle of the camera according to the rotation camera instruction includes: when the rotation camera instruction is the first When a rotation instruction is given, the rotation angle of the camera in a first direction is controlled; when the instruction to rotate the camera is a second rotation instruction, the rotation angle of the camera in a second direction opposite to the first direction is controlled.
结合第三方面或其上述实现方式的任一种,在第三方面的另一种实现方式中,所述旋转摄像头指令为检测到按键按下时生成的指令;所述方法还包括:当检测到所述按键被松开时或所述摄像头的旋转角度为预设值时,控制所述摄像头停止旋转。In combination with the third aspect or any of the above-mentioned implementation manners, in another implementation manner of the third aspect, the rotating camera instruction is an instruction generated when a key is pressed; the method further includes: when detecting When the key is released or the rotation angle of the camera reaches a preset value, the camera is controlled to stop rotating.
结合第三方面或其上述实现方式的任一种,在第三方面的另一种实现方式中,所述按键为音量控制键。With reference to the third aspect or any one of the foregoing implementation manners thereof, in another implementation manner of the third aspect, the key is a volume control key.
第四方面,提供一种电子设备,包括电子设备主体和摄像头,其中,所述摄像头设置于所述电子设备主体上;在相机模式下,所述电子设备主体获取旋转摄像头指令,并根据所述旋转摄像头指令控制所述摄像头旋转。In a fourth aspect, an electronic device is provided, including an electronic device body and a camera, wherein the camera is arranged on the electronic device body; in the camera mode, the electronic device body obtains an instruction to rotate the camera, and according to the The rotate camera command controls the rotation of the camera.
结合第四方面,在第四方面的一种实现方式中,所述电子设备主体,包括:处理单元和旋转单元,且所述旋转单元还与所述摄像头连接,其中,所述处理单元,用于在相机模式下,获取所述旋转摄像头指令;所述旋转单元,用于根据所述旋转摄像头指令,控制所述摄像头的旋转角度和/或旋转方向。With reference to the fourth aspect, in an implementation manner of the fourth aspect, the main body of the electronic device includes: a processing unit and a rotation unit, and the rotation unit is also connected to the camera, wherein the processing unit uses In the camera mode, the instruction to rotate the camera is acquired; the rotation unit is configured to control the rotation angle and/or direction of rotation of the camera according to the instruction to rotate the camera.
结合第四方面或其上述实现方式的任一种,在第四方面的另一种实现方式中,当所述处理单元获取的所述旋转摄像头指令为第一旋转指令时,所述旋转单元,具体用于根据所述第一旋转指令,控制所述摄像头向第一方向旋转;当所述处理单元获取的所述旋转摄像头指令为第二旋转指令时,所述旋转单元,具体用于根据所述第二旋转指令,控制所述摄像头向与所述第一方向相反的第二方向旋转。With reference to the fourth aspect or any of the above-mentioned implementation manners, in another implementation manner of the fourth aspect, when the rotation camera instruction acquired by the processing unit is the first rotation instruction, the rotation unit, Specifically, it is used to control the rotation of the camera in a first direction according to the first rotation instruction; when the rotation instruction obtained by the processing unit is a second rotation instruction, the rotation unit is specifically used to The second rotation instruction is used to control the camera to rotate in a second direction opposite to the first direction.
结合第四方面或其上述实现方式的任一种,在第四方面的另一种实现方式中,当所述处理单元获取的所述旋转摄像头指令为第一旋转指令时,所述旋转单元,具体用于根据所述第一旋转指令,控制所述摄像头向第一方向的旋转角度;当所述处理单元获取的所述旋转摄像头指令为第二旋转指令时,所述旋转单元,具体用于根据所述第二旋转指令,控制所述摄像头向与所述第一方向相反的第二方向的旋转角度。With reference to the fourth aspect or any of the above-mentioned implementation manners, in another implementation manner of the fourth aspect, when the rotation camera instruction acquired by the processing unit is the first rotation instruction, the rotation unit, It is specifically used to control the rotation angle of the camera in the first direction according to the first rotation instruction; when the rotation camera instruction obtained by the processing unit is a second rotation instruction, the rotation unit is specifically used to According to the second rotation command, controlling the rotation angle of the camera in a second direction opposite to the first direction.
结合第四方面或其上述实现方式的任一种,在第四方面的另一种实现方式中,所述旋转摄像头指令为检测到按键按下时生成的指令;所述电子设备主体还用于:当检测到所述按键被松开时或所述摄像头的旋转角度为预设值时,控制所述摄像头停止旋转。In combination with the fourth aspect or any of the above-mentioned implementations, in another implementation of the fourth aspect, the rotating camera instruction is an instruction generated when a key is pressed; the electronic device body is also used to : When it is detected that the button is released or the rotation angle of the camera is a preset value, control the camera to stop rotating.
本发明实施例为电子设备设置了可旋转的摄像头,当在相机模式下获取到用户的旋转摄像头指令时,控制该摄像头自动地旋转,无需人工控制摄像头旋转,方便了用户的操作,提高了电子设备的实用性。In the embodiment of the present invention, a rotatable camera is provided for the electronic device. When the user's rotation camera instruction is obtained in the camera mode, the camera is controlled to automatically rotate without manual control of the camera rotation, which facilitates the user's operation and improves the electronic performance. Availability of equipment.
附图说明Description of drawings
为了更清楚地说明本发明实施例的技术方案,下面将对本发明实施例中所需要使用的附图作简单地介绍,显而易见地,下面所描述的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the accompanying drawings required in the embodiments of the present invention. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For Those of ordinary skill in the art can also obtain other drawings based on these drawings without making creative efforts.
图1是本发明实施例的控制摄像头自动旋转的方法的示意性流程图。Fig. 1 is a schematic flowchart of a method for controlling automatic rotation of a camera according to an embodiment of the present invention.
图2是设置有旋转摄像头的电子设备的示例图。Fig. 2 is an example diagram of an electronic device provided with a rotating camera.
图3是本发明实施例的电子设备的示意性框图。Fig. 3 is a schematic block diagram of an electronic device according to an embodiment of the present invention.
图4是本发明实施例的电子设备的示意性框图。Fig. 4 is a schematic block diagram of an electronic device according to an embodiment of the present invention.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明的一部分实施例,而不是全部实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都应属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts shall fall within the protection scope of the present invention.
图1是本发明实施例的控制摄像头自动旋转的方法的示意性流程图。图1的方法可以由电子设备执行,该电子设备为移动终端,该电子设备包括操作系统、存储器、处理器、显示屏、电池以及可旋转的摄像头。该电子设备还可包括无线网络通信模块,例如,GSM模块、CDMA模块、LTE模块、802.11模块等。Fig. 1 is a schematic flowchart of a method for controlling automatic rotation of a camera according to an embodiment of the present invention. The method in FIG. 1 can be executed by an electronic device, which is a mobile terminal, and the electronic device includes an operating system, a memory, a processor, a display screen, a battery, and a rotatable camera. The electronic device may also include a wireless network communication module, for example, a GSM module, a CDMA module, an LTE module, an 802.11 module, and the like.
应理解,该可旋转的摄像头可以安装在电子装置的任何部分。以图2为例,摄像头32可以安装在电子装置的主体31的上方。还应理解,可旋转的摄像头实现旋转的方式可以有多种,例如,可以在该电子设备上设置马达和旋转杆,该可旋转的摄像头与该旋转杆固连,该马达由电子设备中的处理器控制。具体工作时,处理器发出指令,控制马达工作,马达带动旋转杆旋转,进而带动摄像头自动地旋转。It should be understood that the rotatable camera can be installed on any part of the electronic device. Taking FIG. 2 as an example, the camera 32 may be installed above the main body 31 of the electronic device. It should also be understood that there are many ways to realize the rotation of the rotatable camera. For example, a motor and a rotating rod may be provided on the electronic device, the rotatable camera is fixedly connected with the rotating rod, and the motor is controlled by the electronic device. Processor control. During specific work, the processor sends instructions to control the motor to work, and the motor drives the rotating rod to rotate, and then drives the camera to automatically rotate.
图1的方法包括:The method of Figure 1 includes:
110、获取用户的模式切换指令,模式切换指令用于使电子设备从普通模式切换至相机模式,其中,普通模式用于用户使用电子设备的移动通信功能和/或电子设备上安装的除相机应用之外的应用。110. Obtain the user's mode switching instruction, the mode switching instruction is used to switch the electronic device from the normal mode to the camera mode, wherein the normal mode is used for the user to use the mobile communication function of the electronic device and/or the camera application installed on the electronic device other applications.
应理解,上述电子设备可以是手机或pad等移动终端,上述普通模式可以是手机或pad等移动终端上的除相机模式之外的其他任意工作模式。以手机为例,在该手机的普通模式下,用户可以使用手机的移动通信功能,比如利用蜂窝网进行通话、利用数据网进行网上聊天;用户也可以使用手机的APP功能,比如使用微信聊天、使用支付宝购物等。或者,以pad为例,在该pad的普通模式下,用户可以利用WLAN进行浏览网页,也可以使用微信、支付宝等应用软件。It should be understood that the above-mentioned electronic device may be a mobile terminal such as a mobile phone or a pad, and the above-mentioned normal mode may be any working mode on the mobile terminal such as a mobile phone or a pad except the camera mode. Taking a mobile phone as an example, in the normal mode of the mobile phone, the user can use the mobile communication function of the mobile phone, such as using the cellular network to make calls, and using the data network to chat online; the user can also use the APP function of the mobile phone, such as using WeChat to chat, Use Alipay to shop, etc. Or, taking the pad as an example, in the normal mode of the pad, the user can use WLAN to browse the web, or use application software such as WeChat and Alipay.
120、在相机模式下,获取用户的旋转摄像头指令,旋转摄像头指令用于控制摄像头旋转。120. In the camera mode, acquire a camera rotation command from the user, and the camera rotation command is used to control the rotation of the camera.
例如,电子设备上可以设置用于控制摄像头旋转的物理按键,步骤120可包括:通过检测物理按键被按下,获取用户的旋转摄像头指令。可选地,电子设备还可以检测触摸屏上的虚拟按键,或者用户对触摸屏的滑动操作获取用户的旋转摄像头指令。旋转摄像头指令具体可以指示摄像头的旋转方向、旋转速度、旋转角度或者旋转精度等,本发明实施例对此不作具体限定。For example, a physical button for controlling the rotation of the camera may be set on the electronic device, and step 120 may include: acquiring a user's camera rotation instruction by detecting that the physical button is pressed. Optionally, the electronic device may also detect a virtual key on the touch screen, or the user's sliding operation on the touch screen to obtain the user's instruction to rotate the camera. The rotation camera instruction may specifically indicate the rotation direction, rotation speed, rotation angle, or rotation accuracy of the camera, which is not specifically limited in this embodiment of the present invention.
130、根据旋转摄像头指令,控制摄像头旋转。130. Control the rotation of the camera according to the rotation camera instruction.
需要说明的是,步骤130的具体实现方式与步骤120中得到的旋转摄像头指令具体指示的内容有关。例如,旋转摄像头指令可以仅指示摄像头的旋转方向,电子设备可以控制摄像头以预设的旋转速度朝旋转摄像头指令指示的方向旋转;或者,旋转摄像头指令可以既指示摄像头的旋转方向,也指示摄像头的旋转速度,电子设备可以控制摄像头按照旋转摄像头指令指示的旋转速度,朝旋转摄像头指令指示的旋转方向旋转;或者,旋转摄像头指令可以仅用于触发摄像头的旋转,电子设备获取到旋转摄像头指令时,就控制摄像头以预设的旋转速度朝预设的旋转方向旋转。下文会结合具体的实施例进行详细的描述,此处不再赘述。It should be noted that, the specific implementation manner of step 130 is related to the content specifically indicated by the rotation camera instruction obtained in step 120 . For example, the rotation camera instruction may only indicate the rotation direction of the camera, and the electronic device may control the camera to rotate in the direction indicated by the rotation camera instruction at a preset rotation speed; or, the rotation camera instruction may indicate both the rotation direction of the camera and the rotation direction of the camera. Rotation speed, the electronic device can control the camera to rotate in the rotation direction indicated by the rotation camera instruction according to the rotation speed indicated by the rotation camera instruction; or, the rotation camera instruction can only be used to trigger the rotation of the camera, and when the electronic device obtains the rotation camera instruction, The camera is controlled to rotate toward the preset rotation direction at the preset rotation speed. A detailed description will be given below in conjunction with specific embodiments, and details will not be repeated here.
本发明实施例为电子设备设置了可旋转的摄像头,当在相机模式下获取到用户的旋转摄像头指令时,控制该摄像头自动地旋转,无需人工控制摄像头旋转,方便了用户的操作,提高了电子设备的实用性。In the embodiment of the present invention, a rotatable camera is provided for the electronic device. When the user's rotation camera instruction is obtained in the camera mode, the camera is controlled to automatically rotate without manual control of the camera rotation, which facilitates the user's operation and improves the electronic performance. Availability of equipment.
可选地,作为一个实施例,电子设备可包括用于控制摄像头旋转的多个物理按键,多个物理按键可分别对应摄像头的不同旋转方向,步骤120可包括:确定用户按下的物理按键,该用户按下的物理按键为该多个物理按键中的其中一个;根据用户按下的物理按键,生成旋转摄像头指令;步骤130可包括:根据旋转摄像头指令,控制摄像头朝用户按下的物理按键对应的旋转方向旋转。Optionally, as an embodiment, the electronic device may include multiple physical buttons for controlling the rotation of the camera, and the multiple physical buttons may respectively correspond to different rotation directions of the camera. Step 120 may include: determining the physical button pressed by the user, The physical button pressed by the user is one of the plurality of physical buttons; according to the physical button pressed by the user, an instruction to rotate the camera is generated; step 130 may include: according to the instruction to rotate the camera, control the camera to press the physical button toward the user The corresponding rotation direction is rotated.
应理解,上述物理按键可以是为了实现摄像头的旋转而专门设置的新的物理按键,也可以沿用电子设备上已有的物理按键,即为已有的物理按键赋予新的功能。例如,上述物理按键为电子设备的音量键,音量键中的音量+键控制摄像头正向旋转,音量键中的音量-键控制摄像头反向旋转。或者,物理按键还可以是电子设备上的其他按键,如屏幕开关键、返回键等,本发明实施例对此不作具体限定。It should be understood that the above-mentioned physical buttons may be new physical buttons specially set for realizing the rotation of the camera, or existing physical buttons on the electronic device may be used, that is, new functions are given to the existing physical buttons. For example, the above physical keys are volume keys of the electronic device, the volume + key in the volume keys controls the forward rotation of the camera, and the volume - key in the volume keys controls the reverse rotation of the camera. Alternatively, the physical key may also be other keys on the electronic device, such as a screen on/off key, a return key, etc., which are not specifically limited in this embodiment of the present invention.
可选地,作为一个实施例,上述根据用户按下的物理按键,生成旋转摄像头指令可包括:根据用户按下的物理按键被按下的时间长度,确定摄像头的目标旋转速度;根据用户按下的物理按键和目标旋转速度,生成旋转摄像头指令;上述根据旋转摄像头指令,控制摄像头朝用户按下的物理按键对应的旋转方向旋转可包括:根据旋转摄像头指令,控制摄像头以目标旋转速度朝用户按下的物理按键对应的旋转方向旋转。Optionally, as an embodiment, the above-mentioned generating an instruction to rotate the camera according to the physical button pressed by the user may include: determining the target rotation speed of the camera according to the length of time the physical button pressed by the user is pressed; According to the rotation camera instruction, controlling the camera to rotate toward the rotation direction corresponding to the physical button pressed by the user may include: according to the rotation camera instruction, controlling the camera to rotate toward the user at the target rotation speed The physical button below rotates in the corresponding rotation direction.
应理解,上述旋转摄像头指令可用于指示摄像头以目标旋转速度朝用户按下的物理按键对应的旋转方向旋转。It should be understood that the above instruction to rotate the camera may be used to instruct the camera to rotate at a target rotation speed toward a rotation direction corresponding to the physical key pressed by the user.
上述根据用户按下的物理按键和目标旋转速度,生成旋转摄像头指令的方式可以有多种,例如,可以预先设置用于控制摄像头旋转的指令集合,指令集合中的每条指令唯一地对应一个物理键和一种旋转速度,也就是说,当确定第一物理键被按下,并计算出目标旋转速度时,就可以从指令集合中找出对应于该第一物理按和该目标旋转速度的唯一指令,作为上述旋转摄像头指令。或者,也可以不采用预设设置指令集合的方式,直接在旋转摄像头指令中记录被按下的第一物理键和目标旋转速度等信息,然后由电子设备的处理器根据从该旋转摄像头指令中解析出摄像头的旋转方向和旋转速度。According to the physical button pressed by the user and the target rotation speed, there are many ways to generate rotation camera instructions. For example, a set of instructions for controlling the rotation of the camera can be set in advance. Each instruction in the instruction set uniquely corresponds to a physical key and a rotation speed, that is to say, when it is determined that the first physical key is pressed and the target rotation speed is calculated, the instruction set corresponding to the first physical key and the target rotation speed can be found The only command, as the rotate camera command above. Alternatively, instead of using the preset setting instruction set, directly record information such as the first physical key pressed and the target rotation speed in the rotating camera instruction, and then the processor of the electronic device can use the information from the rotating camera instruction Analyze the rotation direction and rotation speed of the camera.
上述根据用户按下的物理按键被按下的时间长度,确定摄像头的目标旋转速度的方式可以有多种,例如,通过设置压力传感器,确定第一按键被按下的时间长度,然后根据预设的按键时长与摄像头旋转速度的对应关系,选出与第一按键被按下的时间长度对应的目标旋转速度。There are many ways to determine the target rotation speed of the camera according to the length of time the physical button pressed by the user is pressed, for example, by setting a pressure sensor to determine the length of time the first button is pressed, and then according to the preset According to the corresponding relationship between the duration of pressing the key and the rotation speed of the camera, the target rotation speed corresponding to the length of time the first key is pressed is selected.
本发明实施例通过检测用户按下物理按键的时间长度确定摄像头的旋转速度,也就是说,用户通过按压物理按键,既可以指定摄像头的旋转方向,也可以指定摄像头的旋转速度,这样能够方便用户的操作,提高用户体验。The embodiment of the present invention determines the rotation speed of the camera by detecting the length of time the user presses the physical button, that is to say, the user can specify the rotation direction and the rotation speed of the camera by pressing the physical button, which is convenient for the user. operations to improve user experience.
以上述多个物理按键为电子设备上的2个音量键(音量+键和音量-键,2个音量键分别对应摄像头的相反的旋转方向)为例进行举例说明,确定用户按下2个音量键中的一个;根据用户按下的音量键被按下的时间长度,确定摄像头的目标旋转速度;根据用户按下的音量键和目标旋转速度,生成旋转摄像头指令;根据旋转摄像头指令,控制旋转摄像头以目标旋转速度朝用户按下的音量键对应的方向旋转。Take the above multiple physical buttons as two volume keys (volume + key and volume - key, the two volume keys respectively correspond to the opposite rotation direction of the camera) on the electronic device as an example to make sure that the user presses the two volume keys One of the keys; according to the length of time the volume key pressed by the user is pressed, the target rotation speed of the camera is determined; according to the volume key pressed by the user and the target rotation speed, a rotation camera command is generated; according to the rotation camera command, the rotation is controlled The camera rotates at the target rotation speed in the direction corresponding to the volume key pressed by the user.
需要说明的是,以上2个音量键可以采用一体化结构设计,也就是说,从外观上看该电子设备可以仅包括一个音量控制件,该2个音量键可作为该音量控制件内部的两个触点。It should be noted that the above two volume keys can adopt an integrated structure design, that is to say, the electronic device can only include one volume control part from the appearance, and the two volume keys can be used as two internal parts of the volume control part. contacts.
可选地,作为一个实施例,电子设备包括触摸屏,步骤120可包括:通过触摸屏获取用户的旋转摄像头指令。Optionally, as an embodiment, the electronic device includes a touch screen, and step 120 may include: acquiring a user's camera rotation instruction through the touch screen.
可选地,作为一个实施例,上述通过触摸屏获取用户的旋转摄像头指令可包括:确定用户对触摸屏执行了第一滑动操作,其中,第一滑动操作为预设的多个滑动操作之一,其中,不同的滑动操作对应摄像头的不同旋转方向;根据第一滑动操作,生成旋转摄像头指令;步骤130可包括:根据旋转摄像头指令,控制摄像头朝第一滑动操作对应的旋转方向旋转。Optionally, as an embodiment, acquiring the user's rotation camera instruction through the touch screen may include: determining that the user has performed a first sliding operation on the touch screen, where the first sliding operation is one of a plurality of preset sliding operations, wherein , different sliding operations correspond to different rotation directions of the camera; according to the first sliding operation, generate a rotation camera instruction; step 130 may include: according to the rotation camera instruction, controlling the camera to rotate in the rotation direction corresponding to the first sliding operation.
应理解,上述滑动操作可以是对触摸屏的上下滑动之一,也可以是对触摸屏的左右滑动之一。上述旋转摄像头指令可用于指示摄像头朝第一滑动操作对应的旋转方向旋转。It should be understood that the above sliding operation may be one of sliding up and down on the touch screen, or one of sliding left and right on the touch screen. The above instruction to rotate the camera may be used to instruct the camera to rotate in a rotation direction corresponding to the first sliding operation.
本发明实施例中,通过对触摸屏的简单的滑动,就可以控制摄像头朝多个方向的旋转,方便了用户的操作,提高了用户体验。In the embodiment of the present invention, the rotation of the camera in multiple directions can be controlled by simply sliding the touch screen, which facilitates the user's operation and improves the user experience.
可选地,作为一个实施例,上述根据第一滑动操作,生成旋转摄像头指令可包括:根据用户执行第一滑动操作的速度,确定摄像头的目标旋转速度;根据第一滑动操作和目标旋转速度,生成旋转摄像指令;上述根据旋转摄像头指令,控制摄像头朝第一滑动操作对应的旋转方向旋转可包括:根据旋转摄像头指令,控制摄像头以目标旋转速度朝第一滑动操作对应的旋转方向旋转。Optionally, as an embodiment, the above-mentioned generating an instruction to rotate the camera according to the first sliding operation may include: determining the target rotation speed of the camera according to the speed at which the user performs the first sliding operation; according to the first sliding operation and the target rotation speed, Generating a camera rotation instruction; controlling the camera to rotate in the rotation direction corresponding to the first slide operation according to the camera rotation instruction may include: controlling the camera to rotate in the rotation direction corresponding to the first slide operation at a target rotation speed according to the camera rotation instruction.
应理解,上述旋转摄像头指令可用于指示摄像头以目标旋转速度朝第一滑动操作对应的旋转方向旋转。It should be understood that the above command to rotate the camera may be used to instruct the camera to rotate at a target rotation speed toward a rotation direction corresponding to the first sliding operation.
上述根据用户执行第一滑动操作的速度,确定摄像头的目标旋转速度的方式可以有多种,例如,根据用户执行第一滑动操作的速度,以及预设的滑动速度与摄像头旋转速度的对应关系,确定第一滑动操作对应的所述目标旋转速度。There are many ways to determine the target rotation speed of the camera according to the speed at which the user performs the first sliding operation, for example, according to the speed at which the user performs the first sliding operation, and the preset corresponding relationship between the sliding speed and the camera rotation speed, The target rotation speed corresponding to the first sliding operation is determined.
本发明实施例中,通过一次滑动操作,既可以实现对摄像头旋转方向的控制,也可以实现对摄像头旋转速度的控制,进一步方便了用户的操作,提高了用户体验。In the embodiment of the present invention, through one sliding operation, not only the control of the rotation direction of the camera, but also the control of the rotation speed of the camera can be realized, which further facilitates the user's operation and improves the user experience.
上文中结合图1至图2,详细描述了根据本发明实施例的控制摄像头自动旋转的方法,下面将结合图3至图4,详细描述根据本发明实施例的电子设备。The method for controlling automatic rotation of a camera according to an embodiment of the present invention is described in detail above with reference to FIGS. 1 to 2 . The electronic device according to an embodiment of the present invention will be described in detail below in conjunction with FIGS. 3 to 4 .
图3是本发明实施例的电子设备的示意性框图。应理解,图3的电子设备300能够实现图1中由电子设备执行的各个步骤,为避免重复,此处不再详述。所述电子设备300为移动终端,包括操作系统、存储器、处理器、显示屏、电池以及可旋转的摄像头,所述电子设备300还包括:Fig. 3 is a schematic block diagram of an electronic device according to an embodiment of the present invention. It should be understood that the electronic device 300 in FIG. 3 can implement various steps performed by the electronic device in FIG. 1 , and details are not described here to avoid repetition. The electronic device 300 is a mobile terminal, including an operating system, a memory, a processor, a display screen, a battery, and a rotatable camera, and the electronic device 300 also includes:
处理单元310,用于获取用户的模式切换指令,所述模式切换指令用于使所述电子设备从普通模式切换至相机模式,其中,所述普通模式用于所述用户使用所述电子设备的移动通信功能和/或所述电子设备上安装的除相机应用之外的应用;在所述相机模式下,获取所述用户的旋转摄像头指令;The processing unit 310 is configured to acquire a user's mode switching instruction, the mode switching instruction is used to switch the electronic device from a normal mode to a camera mode, wherein the normal mode is used for the user to use the electronic device Mobile communication functions and/or applications installed on the electronic device other than the camera application; in the camera mode, obtain the user's rotation camera instruction;
旋转单元320,用于根据所述旋转摄像头指令,控制所述摄像头旋转。The rotation unit 320 is configured to control the rotation of the camera according to the rotation camera instruction.
本发明实施例为电子设备设置了可旋转的摄像头,当在相机模式下获取到用户的旋转摄像头指令时,控制该摄像头自动地旋转,无需人工控制摄像头旋转,方便了用户的操作,提高了电子设备的实用性。In the embodiment of the present invention, a rotatable camera is provided for the electronic device. When the user's rotation camera instruction is obtained in the camera mode, the camera is controlled to automatically rotate without manual control of the camera rotation, which facilitates the user's operation and improves the electronic performance. Availability of equipment.
可选地,作为一个实施例,所述电子设备300包括用于控制所述摄像头旋转的多个物理按键,所述多个物理按键分别对应所述摄像头的不同旋转方向,所述处理单元310具体用于确定所述用户按下的物理按键,所述用户按下的物理按键为该多个物理按键中的其中一个;根据所述用户按下的物理按键和所述旋转摄像头指令;所述旋转单元320具体用于根据所述旋转摄像头指令,控制所述摄像头朝所述用户按下的物理按键对应的旋转方向旋转。Optionally, as an embodiment, the electronic device 300 includes a plurality of physical buttons for controlling the rotation of the camera, and the plurality of physical buttons correspond to different rotation directions of the camera, and the processing unit 310 specifically It is used to determine the physical button pressed by the user, and the physical button pressed by the user is one of the multiple physical buttons; according to the physical button pressed by the user and the rotation camera instruction; the rotation The unit 320 is specifically configured to control the camera to rotate in the rotation direction corresponding to the physical key pressed by the user according to the instruction to rotate the camera.
可选地,作为一个实施例,所述处理单元310具体用于根据所述用户按下的物理按键被按下的时间长度,确定所述摄像头的目标旋转速度;根据所述用户按下的物理按键和所述目标旋转速度,生成所述旋转摄像头指令;所述旋转单元320具体用于根据所述旋转摄像头指令,控制所述摄像头以所述目标旋转速度朝所述用户按下的物理按键对应的旋转方向旋转。Optionally, as an embodiment, the processing unit 310 is specifically configured to determine the target rotation speed of the camera according to the length of time the physical key pressed by the user is pressed; key and the target rotation speed to generate the rotation camera instruction; the rotation unit 320 is specifically configured to control the camera to correspond to the physical button pressed by the user at the target rotation speed according to the rotation camera instruction The direction of rotation rotates.
可选地,作为一个实施例,所述多个物理按键包括两个物理按键,所述两个物理按键分别控制所述摄像头朝相反的方向旋转。Optionally, as an embodiment, the multiple physical buttons include two physical buttons, and the two physical buttons respectively control the rotation of the camera in opposite directions.
可选地,作为一个实施例,所述多个物理按键为所述电子设备300上的音量键。Optionally, as an embodiment, the multiple physical keys are volume keys on the electronic device 300 .
可选地,作为一个实施例,所述电子设备300包括触摸屏,所述处理单元310具体用于通过所述触摸屏获取所述用户的旋转摄像头指令。Optionally, as an embodiment, the electronic device 300 includes a touch screen, and the processing unit 310 is specifically configured to obtain the user's camera rotation instruction through the touch screen.
可选地,作为一个实施例,所述处理单元310具体用于确定所述用户对所述触摸屏执行了第一滑动操作,其中,所述第一滑动操作为预设的多个滑动操作之一,其中,不同的滑动操作对应所述摄像头的不同旋转方向;根据所述第一滑动操作,生成所述旋转摄像头指令;所述旋转单元320具体用于根据所述旋转摄像头指令,控制所述摄像头朝所述第一滑动操作对应的旋转方向旋转。Optionally, as an embodiment, the processing unit 310 is specifically configured to determine that the user performs a first sliding operation on the touch screen, where the first sliding operation is one of a plurality of preset sliding operations , wherein, different sliding operations correspond to different rotation directions of the camera; according to the first sliding operation, the rotation camera instruction is generated; the rotation unit 320 is specifically configured to control the camera according to the rotation camera instruction Rotate toward the rotation direction corresponding to the first sliding operation.
可选地,作为一个实施例,所述处理单元310具体用于根据所述用户执行所述第一滑动操作的速度,确定所述摄像头的目标旋转速度;根据所述第一滑动操作和所述目标旋转速度,生成所述旋转摄像指令;所述旋转单元320具体用于根据所述旋转摄像头指令,控制所述摄像头以所述目标旋转速度朝所述第一滑动操作对应的旋转方向旋转。Optionally, as an embodiment, the processing unit 310 is specifically configured to determine the target rotation speed of the camera according to the speed at which the user performs the first sliding operation; according to the first sliding operation and the The target rotation speed is used to generate the rotation camera instruction; the rotation unit 320 is specifically configured to control the camera to rotate at the target rotation speed in a rotation direction corresponding to the first sliding operation according to the rotation camera instruction.
可选地,作为一个实施例,所述多个滑动操作包括两个滑动操作,所述两个滑动操作分别控制所述摄像头朝相反的方向旋转。Optionally, as an embodiment, the multiple sliding operations include two sliding operations, and the two sliding operations respectively control the rotation of the camera in opposite directions.
图4是本发明实施例的电子设备的示意性框图。应理解,图4的电子设备400能够实现图1中由电子设备执行的各个步骤,为避免重复,此处不再详述。所述电子设备400为移动终端,包括操作系统、存储器410、处理器420、显示屏、电池以及可旋转的摄像头430,其中:Fig. 4 is a schematic block diagram of an electronic device according to an embodiment of the present invention. It should be understood that the electronic device 400 in FIG. 4 can implement various steps performed by the electronic device in FIG. 1 , and details are not described here to avoid repetition. The electronic device 400 is a mobile terminal, including an operating system, a memory 410, a processor 420, a display screen, a battery, and a rotatable camera 430, wherein:
所述存储器410用于存储程序;The memory 410 is used to store programs;
所述处理器420用于执行程序,当程序被执行时,所述处理器420具体用于获取用户的模式切换指令,所述模式切换指令用于使所述电子设备从普通模式切换至相机模式,其中,所述普通模式用于所述用户使用所述电子设备的移动通信功能和/或所述电子设备上安装的除相机应用之外的应用;在所述相机模式下,获取所述用户的旋转摄像头指令;根据所述旋转摄像头指令,控制所述摄像头430旋转。The processor 420 is used to execute a program. When the program is executed, the processor 420 is specifically used to obtain a user's mode switching instruction, and the mode switching instruction is used to switch the electronic device from the normal mode to the camera mode. , wherein, the normal mode is used for the user to use the mobile communication function of the electronic device and/or applications installed on the electronic device except the camera application; in the camera mode, obtain the user A rotation camera instruction; according to the rotation camera instruction, the camera 430 is controlled to rotate.
本发明实施例为电子设备设置了可旋转的摄像头,当在相机模式下获取到用户的旋转摄像头指令时,控制该摄像头自动地旋转,无需人工控制摄像头旋转,方便了用户的操作,提高了电子设备的实用性。In the embodiment of the present invention, a rotatable camera is provided for the electronic device. When the user's rotation camera instruction is obtained in the camera mode, the camera is controlled to automatically rotate without manual control of the camera rotation, which facilitates the user's operation and improves the electronic performance. Availability of equipment.
可选地,作为一个实施例,所述电子设备400包括用于控制所述摄像头430旋转的多个物理按键,所述多个物理按键分别对应所述摄像头430的不同旋转方向,所述处理器420具体用于确定所述用户按下的物理按键,所述用户按下的物理按键为所述多个按键中的其中一个;根据所述用户按下的物理按键,生成所述旋转摄像头指令;根据所述旋转摄像头指令,控制所述摄像头430朝所述用户按下的物理按键对应的旋转方向旋转。Optionally, as an embodiment, the electronic device 400 includes multiple physical buttons for controlling the rotation of the camera 430, the multiple physical buttons correspond to different rotation directions of the camera 430, and the processor 420 is specifically configured to determine the physical key pressed by the user, where the physical key pressed by the user is one of the multiple keys; generate the rotation camera instruction according to the physical key pressed by the user; According to the rotation camera instruction, the camera 430 is controlled to rotate in a rotation direction corresponding to the physical button pressed by the user.
可选地,作为一个实施例,所述处理器420具体用于根据所述用户按下的物理按键被按下的时间长度,确定所述摄像头430的目标旋转速度;根据所述用户按下的物理按键和所述目标旋转速度,生成所述旋转摄像头指令;根据所述旋转摄像头指令,控制所述摄像头430以所述目标旋转速度朝所述用户按下的物理按键对应的旋转方向旋转。Optionally, as an embodiment, the processor 420 is specifically configured to determine the target rotation speed of the camera 430 according to the length of time the physical key pressed by the user is pressed; The physical button and the target rotation speed generate the rotation camera instruction; according to the rotation camera instruction, the camera 430 is controlled to rotate at the target rotation speed toward the rotation direction corresponding to the physical button pressed by the user.
可选地,作为一个实施例,所述多个物理按键包括两个物理按键,所述两个物理按键分别控制所述摄像头430朝相反的方向旋转。Optionally, as an embodiment, the multiple physical buttons include two physical buttons, and the two physical buttons respectively control the camera 430 to rotate in opposite directions.
可选地,作为一个实施例,所述多个物理按键为所述电子设备400上的音量键。Optionally, as an embodiment, the multiple physical keys are volume keys on the electronic device 400 .
可选地,作为一个实施例,所述电子设备400包括触摸屏,所述处理器420具体用于通过所述触摸屏获取所述用户的旋转摄像头指令。Optionally, as an embodiment, the electronic device 400 includes a touch screen, and the processor 420 is specifically configured to acquire the user's camera rotation instruction through the touch screen.
可选地,作为一个实施例,所述处理器420具体用于确定所述用户对所述触摸屏执行了第一滑动操作,其中,所述第一滑动操作为预设的多个滑动操作之一,其中,不同的滑动操作对应所述摄像头430的不同旋转方向;根据所述第一滑动操作,生成所述旋转摄像头指令;根据所述旋转摄像头指令,控制所述摄像头430朝所述第一滑动操作对应的旋转方向旋转。Optionally, as an embodiment, the processor 420 is specifically configured to determine that the user performs a first sliding operation on the touch screen, where the first sliding operation is one of a plurality of preset sliding operations , wherein, different sliding operations correspond to different rotation directions of the camera 430; according to the first sliding operation, generate the rotating camera instruction; according to the rotating camera instruction, control the camera 430 to slide toward the first Operate the corresponding rotation direction to rotate.
可选地,作为一个实施例,所述处理器420具体用于根据所述用户执行所述第一滑动操作的速度,确定所述摄像头430的目标旋转速度;根据所述第一滑动操作和所述目标旋转速度,生成所述旋转摄像指令;根据所述旋转摄像头指令,控制所述摄像头430以所述目标旋转速度朝所述第一滑动操作对应的旋转方向旋转。Optionally, as an embodiment, the processor 420 is specifically configured to determine a target rotation speed of the camera 430 according to a speed at which the user performs the first sliding operation; The target rotation speed is used to generate the rotation camera instruction; according to the rotation camera instruction, the camera 430 is controlled to rotate at the target rotation speed in a rotation direction corresponding to the first sliding operation.
可选地,作为一个实施例,所述多个滑动操作包括两个滑动操作,所述两个滑动操作分别控制所述摄像头430朝相反的方向旋转。Optionally, as an embodiment, the multiple sliding operations include two sliding operations, and the two sliding operations respectively control the rotation of the camera 430 in opposite directions.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。Those skilled in the art can appreciate that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present invention.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the above-described system, device and unit can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods may be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。If the functions described above are realized in the form of software function units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the essence of the technical solution of the present invention or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program codes. .
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应所述以权利要求的保护范围为准。The above is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Anyone skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present invention. Should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510324160.6A CN104954676B (en) | 2014-06-16 | 2015-06-12 | Method for controlling automatic rotation of camera and electronic equipment |
Applications Claiming Priority (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2014102670563 | 2014-06-16 | ||
CN201410267056.3A CN104052928A (en) | 2014-06-16 | 2014-06-16 | Method and electronic device for controlling automatic rotation of camera |
CN201510324160.6A CN104954676B (en) | 2014-06-16 | 2015-06-12 | Method for controlling automatic rotation of camera and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104954676A CN104954676A (en) | 2015-09-30 |
CN104954676B true CN104954676B (en) | 2018-03-02 |
Family
ID=51505260
Family Applications (2)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410267056.3A Pending CN104052928A (en) | 2014-06-16 | 2014-06-16 | Method and electronic device for controlling automatic rotation of camera |
CN201510324160.6A Active CN104954676B (en) | 2014-06-16 | 2015-06-12 | Method for controlling automatic rotation of camera and electronic equipment |
Family Applications Before (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410267056.3A Pending CN104052928A (en) | 2014-06-16 | 2014-06-16 | Method and electronic device for controlling automatic rotation of camera |
Country Status (1)
Country | Link |
---|---|
CN (2) | CN104052928A (en) |
Families Citing this family (31)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104243826B (en) * | 2014-09-22 | 2017-08-18 | 广东欧珀移动通信有限公司 | Method and mobile terminal for controlling rotation of rotating camera |
CN104301609B (en) * | 2014-09-26 | 2018-09-11 | 广东欧珀移动通信有限公司 | A kind of camera method of controlling rotation and mobile terminal applied to mobile terminal |
CN104320574B (en) * | 2014-09-26 | 2017-06-09 | 广东欧珀移动通信有限公司 | A kind of method of gesture control camera rotation, device and infrared gesture sensor |
CN104349064B (en) * | 2014-10-28 | 2018-01-16 | 广东欧珀移动通信有限公司 | A kind of terminal and its camera control method, device, system |
CN104469145B (en) * | 2014-11-05 | 2018-01-16 | 广东欧珀移动通信有限公司 | A kind of method, device and mobile terminal for controlling mobile terminal camera rotation |
CN105700622A (en) * | 2014-11-27 | 2016-06-22 | 比亚迪股份有限公司 | Electronic apparatus with camera module |
CN104469157B (en) * | 2014-12-08 | 2017-11-07 | 广东欧珀移动通信有限公司 | The method and apparatus that a kind of many people of camera shoot |
CN104639830B (en) * | 2014-12-29 | 2019-07-09 | Oppo广东移动通信有限公司 | A kind of method and device resetting rotating camera |
CN105847655A (en) * | 2015-01-15 | 2016-08-10 | 中兴通讯股份有限公司 | Terminal equipment provided with image pick-up device |
CN104601896B (en) * | 2015-02-12 | 2017-10-20 | 广东欧珀移动通信有限公司 | Calibrate the method and device of the anglec of rotation of camera |
CN104702842B (en) * | 2015-02-12 | 2017-08-29 | 广东欧珀移动通信有限公司 | Method for controlling rotation of rotary camera assembly and mobile terminal |
WO2016134534A1 (en) * | 2015-02-28 | 2016-09-01 | 华为技术有限公司 | Method for automatically adjusting camera and electronic device |
CN104883496B (en) * | 2015-04-30 | 2018-01-23 | 广东欧珀移动通信有限公司 | A kind of baby's photographic method and mobile terminal |
CN108055459B (en) * | 2015-04-30 | 2020-05-05 | Oppo广东移动通信有限公司 | Shooting method based on rotary camera and related product |
CN104902172A (en) * | 2015-05-19 | 2015-09-09 | 广东欧珀移动通信有限公司 | A method for determining a shooting position and a shooting terminal |
CN104914995B (en) * | 2015-05-19 | 2017-10-17 | 广东欧珀移动通信有限公司 | A kind of photographic method and terminal |
CN104950918A (en) * | 2015-06-16 | 2015-09-30 | 广东欧珀移动通信有限公司 | Control method for rotary camera and mobile terminal |
CN104954691A (en) * | 2015-07-01 | 2015-09-30 | 广东欧珀移动通信有限公司 | Camera control method, device and system |
CN106940569B (en) * | 2016-01-05 | 2020-01-31 | 佛山市顺德区顺达电脑厂有限公司 | Automatic rotation device and method for physical keys of portable electronic device |
CN105704376B (en) * | 2016-02-19 | 2018-09-04 | 广东欧珀移动通信有限公司 | A kind of rotating camera control method, device and mobile terminal |
CN105763794B (en) * | 2016-02-25 | 2018-12-14 | 广东欧珀移动通信有限公司 | Camera spinning solution and camerahead rotating device |
CN107273014A (en) * | 2016-04-06 | 2017-10-20 | 阿尔卡特朗讯 | A kind of method and apparatus for being used to control camera to rotate |
CN106657760B (en) * | 2016-09-29 | 2020-03-17 | 北京小米移动软件有限公司 | Camera control method and device |
CN106557327B (en) * | 2016-11-29 | 2019-09-17 | Oppo广东移动通信有限公司 | Payment interface call method and mobile terminal |
CN108307103A (en) * | 2017-12-25 | 2018-07-20 | 努比亚技术有限公司 | Control method, terminal and the computer readable storage medium of input-output equipment |
CN108833699B (en) * | 2018-06-08 | 2021-04-13 | Oppo广东移动通信有限公司 | Electronic device and control method and device of sliding assembly of electronic device |
US11240357B2 (en) | 2019-05-15 | 2022-02-01 | Asustek Computer Inc. | Electronic device |
US10911593B2 (en) | 2019-05-15 | 2021-02-02 | Asustek Computer Inc. | Electronic device having a rotatable camera module |
US11546451B2 (en) | 2019-05-15 | 2023-01-03 | Asustek Computer Inc. | Electronic device |
US11375125B2 (en) | 2019-05-15 | 2022-06-28 | Asustek Computer Inc. | Electronic device |
US11477385B2 (en) | 2019-05-15 | 2022-10-18 | Asustek Computer Inc. | Electronic device with rotatable camera for protecting privacy |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101990032A (en) * | 2009-07-29 | 2011-03-23 | 深圳富泰宏精密工业有限公司 | Mobile electronic device with camera device and control method thereof |
CN103595836A (en) * | 2013-11-25 | 2014-02-19 | 广东欧珀移动通信有限公司 | Mobile terminal with rotary camera and camera rotation control device |
CN104349064A (en) * | 2014-10-28 | 2015-02-11 | 广东欧珀移动通信有限公司 | Terminal and camera control method, device, and system thereof |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7551225B2 (en) * | 2003-12-09 | 2009-06-23 | Sony Ericsson Mobile Communications Ab | Positioning accessory for camera-equipped wireless terminals |
CN100444617C (en) * | 2005-11-25 | 2008-12-17 | 中兴通讯股份有限公司 | Method for flexible control of rotary speed of cam through terminal device |
CN201665188U (en) * | 2010-01-25 | 2010-12-08 | 北京森博克智能科技有限公司 | Vehicle mounted digital multimedia apparatus having functions of voice interaction and behavior monitoring |
KR101674011B1 (en) * | 2010-06-07 | 2016-11-08 | 삼성전자주식회사 | Method and apparatus for operating camera function in portable terminal |
CN202679503U (en) * | 2012-06-06 | 2013-01-16 | 广东长虹电子有限公司 | A TV set with three-button design for basic operation |
CN104238669B (en) * | 2014-09-04 | 2018-01-16 | 广东欧珀移动通信有限公司 | A kind of method, device and mobile terminal for controlling mobile terminal camera rotation |
CN104539830A (en) * | 2014-12-16 | 2015-04-22 | 广东欧珀移动通信有限公司 | A full-angle rotating camera device |
-
2014
- 2014-06-16 CN CN201410267056.3A patent/CN104052928A/en active Pending
-
2015
- 2015-06-12 CN CN201510324160.6A patent/CN104954676B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101990032A (en) * | 2009-07-29 | 2011-03-23 | 深圳富泰宏精密工业有限公司 | Mobile electronic device with camera device and control method thereof |
CN103595836A (en) * | 2013-11-25 | 2014-02-19 | 广东欧珀移动通信有限公司 | Mobile terminal with rotary camera and camera rotation control device |
CN104349064A (en) * | 2014-10-28 | 2015-02-11 | 广东欧珀移动通信有限公司 | Terminal and camera control method, device, and system thereof |
Also Published As
Publication number | Publication date |
---|---|
CN104052928A (en) | 2014-09-17 |
CN104954676A (en) | 2015-09-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104954676B (en) | Method for controlling automatic rotation of camera and electronic equipment | |
US11513608B2 (en) | Apparatus, method and recording medium for controlling user interface using input image | |
CN107509028B (en) | A shooting method, mobile terminal and computer-readable storage medium | |
WO2019001152A1 (en) | Photographing method and mobile terminal | |
CN104320591B (en) | A kind of front and rear method, apparatus switched of control camera and a kind of intelligent terminal | |
CN105100627A (en) | A camera control method and terminal | |
EP3640732A1 (en) | Method and terminal for acquire panoramic image | |
CN104360816A (en) | Screen capture method and system | |
WO2014032611A1 (en) | Desktop management method and device | |
CN106791437B (en) | Panoramic image shooting method and mobile terminal | |
CN113792277A (en) | Method and device for displaying application and picture and electronic equipment | |
JP2016053940A (en) | Touch imaging method and touch terminal thereof | |
CN110456911A (en) | Electronic equipment control method and device, electronic equipment and readable storage medium | |
CN104954691A (en) | Camera control method, device and system | |
CN110308860A (en) | Screen capture method and related device | |
CN107613193A (en) | A camera control method and mobile terminal | |
CN106713659A (en) | panoramic shooting method and mobile terminal | |
CN107622478A (en) | An image processing method, mobile terminal and computer-readable storage medium | |
CN104898880A (en) | Control method and electronic equipment | |
CN106407436A (en) | Communication account number head portrait processing method and mobile terminal | |
TWI544353B (en) | System and method for controlling input of user interface | |
CN106412427A (en) | Shooting method and mobile terminal | |
CN104007928B (en) | Information processing method and electronic equipment | |
CN109074211B (en) | Method and related device for adjusting interface scrolling speed | |
CN112529770A (en) | Image processing method, image processing device, electronic equipment and readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP01 | Change in the name or title of a patent holder | ||
CP01 | Change in the name or title of a patent holder |
Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Patentee after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP., Ltd. Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Patentee before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP., Ltd. |