CN112422827A - Information processing method, device and equipment and storage medium - Google Patents

Information processing method, device and equipment and storage medium Download PDF

Info

Publication number
CN112422827A
CN112422827A CN202011287133.3A CN202011287133A CN112422827A CN 112422827 A CN112422827 A CN 112422827A CN 202011287133 A CN202011287133 A CN 202011287133A CN 112422827 A CN112422827 A CN 112422827A
Authority
CN
China
Prior art keywords
image
acquisition unit
image acquisition
application program
driving
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.)
Granted
Application number
CN202011287133.3A
Other languages
Chinese (zh)
Other versions
CN112422827B (en
Inventor
程涛
史晓岩
刘旭国
任天舒
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN202011287133.3A priority Critical patent/CN112422827B/en
Publication of CN112422827A publication Critical patent/CN112422827A/en
Application granted granted Critical
Publication of CN112422827B publication Critical patent/CN112422827B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/695Control of camera direction for changing a field of view, e.g. pan, tilt or based on tracking of objects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/63Control of cameras or camera modules by using electronic viewfinders
    • H04N23/631Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters

Abstract

The embodiment of the application discloses an information method, an information device, information equipment and a storage medium, wherein when monitoring that an application program calls an image acquisition unit of electronic equipment, whether a reference view direction required by the application program is consistent with a view direction of the image acquisition unit is judged; determining a target driving mode in at least two driving modes according to the judgment result, wherein different driving modes are used for driving the image acquired by the image acquisition unit to rotate in different rotating modes; and driving the image collected by the image collecting unit to rotate in a target driving mode so as to enable the display direction of the image collected by the image collecting unit to be matched with the reference viewing direction. Based on the scheme of the application, the abnormal situation that the display direction of the object in the image is inconsistent with the direction of the object actually seen by the user when the image acquired by the image acquisition unit is called by the application program and displayed to the user can be avoided.

Description

Information processing method, device and equipment and storage medium
Technical Field
The present application relates to the field of information processing technologies, and in particular, to an information processing method, apparatus, and device, and a storage medium.
Background
Currently, in some devices, when an application calls an image acquired by an image acquisition unit to be displayed to a user, an abnormal situation that a display direction of an object in the image is inconsistent with a direction of the object actually seen by the user may occur, as shown in fig. 1, which is an exemplary diagram of an abnormal situation, in a tablet computer, when the application calls a camera to take a picture of the object shown in fig. 1-a, an actual scene seen by the user is a situation shown in fig. 1-a, but the image acquired by the application calling the camera is a situation shown in fig. 1-b, which is rotated by 90 degrees.
Therefore, how to avoid the above abnormal situation is an urgent technical problem to be solved.
Disclosure of Invention
The application aims to provide an information processing method, an information processing device, information processing equipment and a storage medium, and the information processing method, the information processing device and the information processing equipment comprise the following technical scheme:
an information processing method comprising:
when it is monitored that an application program calls an image acquisition unit of the electronic equipment, judging whether a reference view direction required by the application program is consistent with a view direction of the image acquisition unit or not;
determining a target driving mode in at least two driving modes according to the judgment result, wherein different driving modes are used for driving the image acquired by the image acquisition unit to rotate in different rotating modes;
and driving the image collected by the image collecting unit to rotate in the target driving mode so as to enable the display direction of the image collected by the image collecting unit to be matched with the reference viewing direction.
Optionally, the determining whether the reference view direction required by the application program is consistent with the view direction of the image capturing unit includes:
acquiring a first display direction of an interface to be output of the application program;
acquiring a second display direction of the image acquired by the image acquisition unit based on the view finding direction of the image acquisition unit;
and if the first display direction is the same as the second display direction, determining that the reference framing direction required by the application program is consistent with the framing direction of the image acquisition unit, otherwise, determining that the reference framing direction required by the application program is inconsistent with the framing direction of the image acquisition unit.
Optionally, the determining whether the reference view direction required by the application program is consistent with the view direction of the image capturing unit includes:
acquiring a first display direction of an interface to be output of the application program;
determining a reference viewing direction required by the application program based on the first display direction;
reading the view finding direction of the image acquisition unit through an interface provided by the electronic equipment;
and if the reference framing direction required by the application program is the same as the read framing direction of the image acquisition unit, determining that the reference framing direction required by the application program is consistent with the framing direction of the image acquisition unit, otherwise, determining that the reference framing direction required by the application program is inconsistent with the framing direction of the image acquisition unit.
Optionally, the determining the target driving manner in at least two driving manners according to the determination result includes:
if the judgment result is inconsistent, selecting a driving mode one by one according to a preset mode to drive the image collected by the image collecting unit to rotate;
and if the first display direction of the interface to be output of the application program is consistent with the second display direction of the image acquired by the image acquisition unit calculated based on the view direction of the image acquisition unit after the image acquired by the image acquisition unit is driven to rotate by the driving mode, determining the currently selected driving mode as a target driving mode, otherwise, selecting the next driving mode to drive the image acquired by the image acquisition unit to rotate.
Optionally, the determining the target driving manner in at least two driving manners according to the determination result includes:
if the judgment result is inconsistent, acquiring a first display direction of an interface to be output of the application program;
calculating a second display direction of the image acquired by the image acquisition unit based on the viewing direction of the image acquisition unit;
and determining a target driving mode according to the angle difference between the first display direction and the second display direction.
The above method, optionally, further includes:
acquiring a rotation instruction;
and rotating the image acquired by the image acquisition unit in response to the rotation instruction.
The above method, optionally, the rotating, in response to the rotation instruction, the image acquired by the image acquisition unit includes:
and responding to the rotation instruction, and rotating the image acquired by the image acquisition unit according to a preset rotation step length.
An information processing apparatus comprising:
the judging module is used for judging whether a reference view-finding direction required by the application program is consistent with the view-finding direction of the image acquisition unit when monitoring that the application program calls the image acquisition unit of the electronic equipment;
and the determining module is used for determining a target driving mode in at least two driving modes according to the judgment result of the judging module, and different driving modes are used for driving the image acquired by the image acquisition unit to rotate in different rotating modes.
And the driving module is used for driving the image collected by the image collecting unit to rotate in the target driving mode so as to enable the display direction of the image collected by the image collecting unit to be matched with the reference framing direction.
An information processing apparatus comprising:
a memory for storing a program;
a processor for calling and executing the program in the memory, the following operations being performed by executing the program:
when it is monitored that an application program calls an image acquisition unit of the electronic equipment, judging whether a reference view direction required by the application program is consistent with a view direction of the image acquisition unit or not;
determining a target driving mode in at least two driving modes according to the judgment result, wherein different driving modes are used for driving the image acquired by the image acquisition unit to rotate in different rotating modes;
and driving the image collected by the image collecting unit to rotate in the target driving mode so as to enable the display direction of the image collected by the image collecting unit to be matched with the reference viewing direction.
A readable storage medium on which a computer program is stored, which, when executed by a processor, implements the steps of the information processing method as described in any one of the above.
According to the scheme, when the information method, the information device, the information equipment and the storage medium provided by the application program call the image acquisition unit of the electronic equipment, whether the reference view direction required by the application program is consistent with the view direction of the image acquisition unit is judged; determining a target driving mode in at least two driving modes according to the judgment result, wherein different driving modes are used for driving the image acquired by the image acquisition unit to rotate in different rotating modes; and driving the image collected by the image collecting unit to rotate in a target driving mode so as to enable the display direction of the image collected by the image collecting unit to be matched with the reference viewing direction. Based on the scheme of the application, the abnormal situation that the display direction of the object in the image is inconsistent with the direction of the object actually seen by the user when the image acquired by the image acquisition unit is called by the application program and displayed to the user can be avoided.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on the drawings without creative efforts.
FIG. 1 is a diagram illustrating an example of an abnormal situation provided by an embodiment of the present application;
fig. 2a is an example of 4 possible viewing directions of an image capturing unit in an electronic device according to an embodiment of the present disclosure;
fig. 2b is an exemplary diagram of images acquired by an image acquisition unit in 4 possible viewing directions according to an embodiment of the present application;
FIG. 3 is a flowchart of an implementation of an information processing method according to an embodiment of the present disclosure;
fig. 4 is a flowchart of an implementation of determining whether a reference viewing direction required by an application is consistent with a viewing direction of an image capturing unit according to an embodiment of the present disclosure;
fig. 5 is a flowchart of an implementation of determining whether a reference viewing direction required by an application is consistent with a viewing direction of an image capturing unit according to an embodiment of the present disclosure;
fig. 6 is a flowchart of another implementation of determining a target driving manner among at least two driving manners according to a determination result according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of an information processing apparatus according to an embodiment of the present application;
fig. 8 is an exemplary diagram of a hardware configuration block diagram of an information processing apparatus according to an embodiment of the present application.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings described above, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in other sequences than described or illustrated herein.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without inventive step, are within the scope of the present disclosure.
The information processing method provided by the application can be applied to electronic equipment, the electronic equipment is provided with an image acquisition unit, and the image acquisition unit can be an internal image acquisition unit of the electronic equipment or an external image acquisition unit connected through an interface.
The inventor of the present application has found that the occurrence of an abnormal situation in which the display direction of an object in an image is not consistent with the direction of the object actually seen by a user when an application calls the image captured by the image capturing unit to display to the user is related to the viewing direction of the image capturing unit:
the viewing direction of the image acquisition unit in the electronic equipment depends on the installation direction of the image sensor in the image acquisition unit, and the viewing direction of the image acquisition unit is determined after the image sensor is installed in the electronic equipment. That is, the viewing direction of the image pickup unit is set at the time of shipment of the electronic apparatus. The image acquisition unit comprises an image sensor and other related devices, and the specific composition of the image acquisition unit is not the focus of the application and is not described in detail here.
Generally, the image capturing unit has 4 possible viewing directions in the electronic device, as shown in fig. 2a, which is an example of the 4 possible viewing directions of the image capturing unit in the electronic device (here, the electronic device in this application is not limited to a mobile phone, but may also be other electronic devices with an image capturing unit, such as a tablet computer, etc.), and as shown in fig. 2b, which is an example diagram of images captured by the image capturing unit in the 4 possible viewing directions. When the view direction of the image acquisition unit is view direction No. 1, the image sensor scans the shooting object from the top to the bottom and from the right to the left when acquiring the image (taking fig. 1-a as an example), and at this time, if the image acquired by the image sensor is not rotated, as shown in fig. 2b-1, the obtained image is rotated 90 degrees counterclockwise relative to the actual direction; when the view direction of the image acquisition unit is view direction No. 2, the image sensor scans the shooting object (taking fig. 1-a as an example) from right to left and from bottom to top in the order of image acquisition, and at this time, if the image acquired by the image sensor is not rotated, as shown in fig. 2b-2, the obtained image is rotated 180 degrees relative to the actual direction; when the view direction of the image acquisition unit is view direction No. 3, the image sensor scans the shooting object from bottom to top and from left to right when acquiring the image (taking fig. 1-a as an example), and at this time, if the image acquired by the image sensor is not rotated, as shown in fig. 2b-3, the obtained image is rotated 90 degrees clockwise relative to the actual direction; when the viewing direction of the image capturing unit is viewing direction No. 4, the image sensor scans the shooting object (taking fig. 1-a as an example) from left to right and from top to bottom when capturing images, and at this time, if the image captured by the image sensor is not rotated, as shown in fig. 2b-4, the display direction of the obtained image is the same as the actual direction of the shooting object.
However, when a developer of an application develops the application, the actual viewing direction of the image capturing unit is not considered, or when the developer develops the application, the viewing direction of the image capturing unit is set to a certain direction by default, and based on this, if the viewing direction of the image capturing unit is not set to the default viewing direction by the developer in the electronic device in which the application is installed after the application is developed, an abnormal situation occurs in which the display direction of an object in an image is not consistent with the direction of the object actually seen by the user when the application calls the image captured by the image capturing unit to display the image to the user.
Based on the research findings, the scheme of the application is provided. As shown in fig. 3, an implementation flowchart of an information processing method provided in an embodiment of the present application may include:
step S301: when the situation that the application program calls an image acquisition unit of the electronic equipment is monitored, whether a reference view direction required by the application program is consistent with a view direction of the image acquisition unit or not is judged.
The application program may be any application program installed in the electronic device and capable of calling the image capturing unit.
In the embodiment of the application, the reference view direction required by the application program and the actual view direction of the image acquisition unit of the electronic device can be directly acquired, and then whether the reference view direction required by the application program is the same as the actual view direction of the image acquisition unit or not is compared, if so, the reference view direction required by the application program is consistent with the view direction of the image acquisition unit, otherwise, the reference view direction required by the application program is inconsistent with the view direction of the image acquisition unit. Of course, the embodiment of the present application may also determine whether the reference view direction required by the application program is consistent with the view direction of the image capturing unit in other manners, and the specific implementation manner may refer to the following contents.
Step S302: and determining a target driving mode in at least two driving modes according to the judgment result, wherein different driving modes are used for driving the image acquired by the image acquisition unit to rotate in different rotating modes.
In the embodiment of the application, at least two optional driving modes are configured in the electronic device in advance, and the different driving modes are used for driving the image acquired by the image acquisition unit to rotate in different rotation modes. The different rotation modes may be different in rotation angle, that is, the rotation directions of the different rotation modes are the same, but the rotation angles are different. Alternatively, the difference in the rotation manner may be embodied as a difference in at least one of the rotation angle and the rotation direction.
The target driving method is a driving method corresponding to the determination result, and the determined target driving method is different depending on the determination result. When the judgment result is consistent, the determined target driving modes are different according to the degree of inconsistency between the reference view direction required by the application program and the view direction of the image acquisition unit.
Step S303: and driving the image acquired by the image acquisition unit to rotate in a target driving mode so that the display direction of the image acquired by the image acquisition unit is matched with the reference viewing direction required by the application program.
If the display direction of the image acquired by the image acquisition unit is matched with the reference view direction required by the application program, the direction of the shooting object seen by the user in the electronic equipment is consistent with the direction of the shooting object of the actual scene seen by the user.
After the image collected by the image collecting unit is driven to rotate in a target driving mode, the rotated image can be output, and the display direction of the rotated image is consistent with the direction of the actual scene seen by a user.
According to the information processing method provided by the embodiment of the application, when the situation that the application program calls the image acquisition unit of the electronic equipment is monitored, whether the reference view direction required by the application program is consistent with the view direction of the image acquisition unit is judged; determining a target driving mode in at least two driving modes according to the judgment result, wherein different driving modes are used for driving the image acquired by the image acquisition unit to rotate in different rotating modes; and driving the image collected by the image collecting unit to rotate in a target driving mode so as to enable the display direction of the image collected by the image collecting unit to be matched with the reference viewing direction. Based on the scheme of the application, the abnormal situation that the display direction of the object in the image is inconsistent with the direction of the object actually seen by the user when the image acquired by the image acquisition unit is called by the application program and displayed to the user can be avoided.
In addition, based on the scheme of the application, when the developer develops the application program, the view direction of the image acquisition unit of the electronic equipment does not need to be considered, and the complexity of developing the application program by the developer is simplified.
In an alternative embodiment, an implementation flowchart of the foregoing determining whether the reference view direction required by the application program is consistent with the view direction of the image capturing unit is shown in fig. 4, and may include:
step S401: a first display direction of an interface (for convenience of description, referred to as a first interface) to be output of an application program is obtained.
The interface to be output by the application program is the interface of the shot object to be output after the application program calls the image acquisition unit, and the direction of the interface is the first display direction. Since the application program may not calculate the display direction of the first interface by taking the actual viewing direction of the image capturing unit as a reference viewing direction when calculating the display direction of the first interface, it is possible that the calculated display direction (i.e., the first display direction) of the first interface is different from the direction actually seen by the user.
Step S402: and acquiring a second display direction of the image acquired by the image acquisition unit based on the view direction of the image acquisition unit.
The second display mode is a display direction of the image captured by the image capturing unit obtained with the viewing direction of the image capturing unit as a reference viewing direction, that is, it is calculated in which direction the image captured by the image capturing unit should be displayed with the viewing direction of the image capturing unit as the reference viewing direction.
When the actual viewing direction of the image capturing unit is determined as the reference viewing direction according to the viewing direction of the image capturing unit and the direction of the electronic device, what direction (denoted as the second display direction in this application) the image captured by the image capturing unit should be displayed (the specific implementation manner is a relatively mature technology in the field, and is not described here again).
The execution sequence of steps S401 and S402 is not specifically limited, and step S401 may be executed first and then step S402 is executed, or step S402 may be executed first and then step S401 is executed, or both steps may be executed simultaneously.
Step S403: and if the first display direction is the same as the second display direction, determining that the reference view direction required by the application program is consistent with the view direction of the image acquisition unit, otherwise, determining that the reference view direction required by the application program is inconsistent with the view direction of the image acquisition unit.
In an alternative embodiment, an implementation flowchart of the foregoing determining whether the reference view direction required by the application program is consistent with the view direction of the image capturing unit is shown in fig. 5, and may include:
step S501: the method includes the steps of obtaining a first display direction of an interface to be output of an application program.
The interface to be output by the application program is the interface of the shot object to be output after the application program calls the image acquisition unit, and the direction of the interface is the first display direction.
Step S502: a reference viewing direction required by the application program is determined based on the first display direction.
The display direction of the interface may be generally represented by a matrix, and the reference viewing direction required by the application program may be calculated based on the matrix corresponding to the first display direction, the matrix corresponding to the gravity sensor of the electronic device, and the matrix corresponding to the representation direction of the display unit of the electronic device.
Step S503: the viewing direction of the image acquisition unit is read through an interface provided by the electronic device.
Step S504: and if the reference view direction required by the application program is the same as the read view direction of the image acquisition unit, determining that the reference view direction required by the application program is consistent with the view direction of the image acquisition unit, and otherwise, determining that the reference view direction required by the application program is inconsistent with the view direction of the image acquisition unit.
Unlike the embodiment shown in fig. 4, in the embodiment shown in fig. 4, whether the reference viewing direction required by the application program is consistent with the viewing direction of the image capturing unit is determined by comparing the actual display direction of the display interface with the display direction in which the image should be displayed, whereas the embodiment shown in fig. 5 calculates the reference viewing direction required by the application program, and compares the reference viewing direction required by the application program with the actual viewing direction of the image capturing unit to determine whether the reference viewing direction required by the application program is consistent with the actual viewing direction of the image capturing unit.
In an optional embodiment, one implementation manner of determining the target driving manner in the at least two driving manners according to the determination result may be:
and if the judgment result is consistent, the reference view direction required by the application program is the actual view direction of the image acquisition unit, and the specified driving mode is determined as the target driving mode. The specified driving mode is a driving mode matched with the actual viewing direction of the image acquisition unit, and after the image acquired by the image acquisition unit is driven to rotate based on the driving mode, the display direction of the image is the same as the direction actually seen by a user.
In an optional embodiment, if the determination result is inconsistent, one implementation manner of determining the target driving manner in the at least two driving manners according to the determination result may be:
and selecting one driving mode one by one according to a preset mode to drive the image collected by the image collecting unit to rotate. The predetermined manner may include, but is not limited to, any of the following: one by one in a random manner or in a predetermined order.
And if the first display direction of the interface to be output of the application program is consistent with the second display direction of the image acquired by the image acquisition unit calculated based on the view direction of the image acquisition unit after the image acquired by the image acquisition unit is driven to rotate by the driving mode, determining the currently selected driving mode as a target driving mode, otherwise, selecting the next driving mode to drive the image acquired by the image acquisition unit to rotate.
For example, the first driving manner is used to drive the image collected by the image collecting unit to rotate 90 degrees clockwise, the second driving manner is used to drive the image collected by the image collecting unit to rotate 180 degrees clockwise, the third driving manner is used to drive the image collected by the image collecting unit to rotate 270 degrees clockwise, the fourth driving manner is used to drive the direction of the image collected by the image collecting unit to remain unchanged, and the rotation angle is 0.
If the determination result is not consistent, the direction of the interface to be output of the application program is rotated by 90 degrees clockwise with respect to the first display direction according to a driving method (for example, the first driving method is selected), and if the direction of the rotated image is consistent with the second display direction of the image acquired by the image acquisition unit calculated based on the viewing direction of the image acquisition unit, it is indicated that the first driving method is feasible, and the first driving method may be determined as the target driving method. If the direction of the rotated image is not consistent with the second display direction of the image acquired by the image acquisition unit calculated based on the viewing direction of the image acquisition unit, switching to the next driving mode (for example, the second driving mode is selected), rotating the direction of the interface to be output of the application program clockwise by 180 degrees relative to the first display direction according to the second driving mode, if the direction of the rotated image is consistent with the second display direction of the image acquired by the image acquisition unit calculated based on the viewing direction of the image acquisition unit, indicating that the second driving mode is feasible, determining the first driving mode as the target driving mode, otherwise, switching to the next driving mode (for example, the third driving mode is selected) … …, and so on until the direction of the rotated image is consistent with the second display direction of the image acquired by the image acquisition unit calculated based on the viewing direction of the image acquisition unit, and determining a driving mode used when the direction of the rotated image is consistent with a second display direction of the image acquired by the image acquisition unit calculated based on the view direction of the image acquisition unit as a target driving mode.
In an alternative embodiment, if the determination result is inconsistent, as shown in fig. 6, the another implementation flowchart for determining the target driving manner in the at least two driving manners according to the determination result may include:
step S601: the method includes the steps of obtaining a first display direction of an interface to be output of an application program.
Step S602: a second display direction of the image captured by the image capturing unit is calculated based on the viewing direction of the image capturing unit.
The calculation method of the first display direction and the second display method can refer to the foregoing embodiments, and details are not repeated here.
Step S603: and determining a target driving mode according to the angle difference between the first display direction and the second display direction.
Wherein the angular difference between the first display direction and the second display direction comprises: the display device comprises size information and direction information, wherein the size information is the size of an included angle between a first display direction and a second display direction, and the direction information represents the relative orientation relation between the first display direction and the second display direction. And selecting a driving method corresponding to the angle difference as a target driving method based on the angle difference.
The four driving methods are also taken as examples: the first driving mode is used for driving the image collected by the image collecting unit to rotate 90 degrees clockwise, the second driving mode is used for driving the image collected by the image collecting unit to rotate 180 degrees clockwise, the third driving mode is used for driving the image collected by the image collecting unit to rotate 270 degrees clockwise, the fourth driving mode is used for driving the direction of the image collected by the image collecting unit to keep unchanged, and the rotating angle is 0.
If the first display direction is a clockwise rotation of 90 degrees with respect to the positive direction of the electronic device (typically, the direction frequently used by the user, for example, the direction frequently used by the user when using a mobile phone is the vertical screen direction, as shown in fig. 2a, and the direction frequently used by the user when using a tablet computer is the horizontal screen direction, as shown in fig. 1-b), the second display direction is the same as the positive direction of the electronic device, the included angle between the first display direction and the second display direction is 90 degrees, and the first display direction rotates clockwise 90 degrees relative to the second display direction, the display direction of the interface to be output of the application program needs to be rotated by 270 degrees clockwise with respect to the first display direction, so that the display direction of the interface to be output of the application program is consistent with the second display direction, and therefore, the third driving method needs to be selected as the target driving method.
For another example, the first display direction is a clockwise rotation of 90 degrees relative to a positive direction of the electronic device (generally, a direction frequently used by a user, for example, when the user uses a mobile phone, a frequently used direction is a vertical screen direction, as shown in fig. 2a, when the user uses a tablet computer, a frequently used direction is a horizontal screen direction, as shown in fig. 1-b), and the second display direction is also a clockwise rotation of 90 degrees relative to the positive direction of the electronic device, an included angle between the first display direction and the second display direction is 0 degrees, that is, the first display direction is the same as the second display direction, and at this time, it is not necessary to rotate an interface to be output of the application program, and therefore, a fourth driving manner needs to be selected as the target driving manner.
In an alternative embodiment, in some abnormal situations, it is possible that the image output by the application is still in a different orientation than the scene actually seen by the user, and therefore the image may be manually rotated. Based on this, the information processing method provided in the embodiment of the present application may further include:
and acquiring a rotation instruction. The rotation instruction is triggered and generated by a user performing a preset operation, for example, the user clicks a preset button, or the user performs a preset gesture operation, and the like. Optionally, the image acquired by the image acquisition unit may be displayed to a user, the user determines whether to rotate the image, and if the user wishes to rotate the image, a preset operation may be performed to trigger the rotation instruction.
And in response to the rotation instruction, rotating the image acquired by the image acquisition unit. Alternatively, the image acquired by the image acquisition unit may be rotated according to a preset rotation step. For example, the rotation is performed by 90 degrees clockwise in response to one rotation command, or by 90 degrees counterclockwise in response to one rotation command.
In the embodiment of the application, an interactive function with a user is provided, so that the user can manually adjust the direction of the image.
Corresponding to the method embodiment, an embodiment of the present application further provides an information processing apparatus, and a schematic structural diagram of the information processing apparatus provided in the embodiment of the present application is shown in fig. 7, and the information processing apparatus may include:
the judging module 701 is configured to judge whether a reference view direction required by an application program is consistent with a view direction of an image acquisition unit when it is monitored that the application program calls the image acquisition unit of the electronic device;
a determining module 702, configured to determine a target driving manner among at least two driving manners according to a determination result of the determining module, where different driving manners are used to drive the image acquired by the image acquiring unit to rotate in different rotation manners.
The driving module 703 is configured to drive the image acquired by the image acquisition unit to rotate in the target driving manner, so that the display direction of the image acquired by the image acquisition unit is matched with the reference viewing direction.
When monitoring that an application program calls an image acquisition unit of an electronic device, the information processing device provided by the embodiment of the application program judges whether a reference view direction required by the application program is consistent with a view direction of the image acquisition unit; determining a target driving mode in at least two driving modes according to the judgment result, wherein different driving modes are used for driving the image acquired by the image acquisition unit to rotate in different rotating modes; and driving the image collected by the image collecting unit to rotate in a target driving mode so as to enable the display direction of the image collected by the image collecting unit to be matched with the reference viewing direction. Based on the scheme of the application, the abnormal situation that the display direction of the object in the image is inconsistent with the direction of the object actually seen by the user when the image acquired by the image acquisition unit is called by the application program and displayed to the user can be avoided.
In addition, based on the scheme of the application, when a developer develops the application program, the view direction of an image acquisition unit of the electronic equipment does not need to be considered, and the complexity of developing the application program by the developer is simplified.
In an alternative embodiment, the determining module 71 includes:
the first acquisition unit is used for acquiring a first display direction of an interface to be output of the application program;
a second acquisition unit configured to acquire a second display direction of the image acquired by the image acquisition unit based on a viewing direction of the image acquisition unit;
and the first determining unit is used for determining that the reference framing direction required by the application program is consistent with the framing direction of the image acquisition unit if the first display direction is the same as the second display direction, and otherwise, determining that the reference framing direction required by the application program is inconsistent with the framing direction of the image acquisition unit.
In an alternative embodiment, the determining module 71 includes:
the third acquisition unit is used for acquiring a first display direction of an interface to be output of the application program;
a second determination unit configured to determine a reference viewing direction required by the application program based on the first display direction;
the reading unit is used for reading the view finding direction of the image acquisition unit through an interface provided by the electronic equipment;
and a third determining unit, configured to determine that the reference view direction required by the application is consistent with the view direction of the image capturing unit if the reference view direction required by the application is the same as the read view direction of the image capturing unit, and otherwise, determine that the reference view direction required by the application is inconsistent with the view direction of the image capturing unit.
In an alternative embodiment, the determining module 702 is configured to:
if the judgment result is inconsistent, selecting a driving mode one by one according to a preset mode to drive the image collected by the image collecting unit to rotate;
and if the first display direction of the interface to be output of the application program is consistent with the second display direction of the image acquired by the image acquisition unit calculated based on the view direction of the image acquisition unit after the image acquired by the image acquisition unit is driven to rotate by the driving mode, determining the currently selected driving mode as a target driving mode, otherwise, selecting the next driving mode to drive the image acquired by the image acquisition unit to rotate.
In an alternative embodiment, the determining module 702 is configured to:
if the judgment result is inconsistent, acquiring a first display direction of an interface to be output of the application program;
calculating a second display direction of the image acquired by the image acquisition unit based on the viewing direction of the image acquisition unit;
and determining a target driving mode according to the angle difference between the first display direction and the second display direction.
In an optional embodiment, the method may further include:
the interaction module is used for acquiring a rotation instruction; and rotating the image acquired by the image acquisition unit in response to the rotation instruction.
In an optional embodiment, the interaction module, when obtaining the rotation instruction, is configured to:
displaying the image acquired by the image acquisition unit;
and receiving a rotation instruction triggered by a user.
In an optional embodiment, the interaction module, in response to the rotation instruction, when rotating the image acquired by the image acquisition unit, is configured to:
and responding to the rotation instruction, and rotating the image acquired by the image acquisition unit according to a preset rotation step length.
The embodiment of the present invention further provides an information processing apparatus, such as a terminal, where the terminal may be, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, and the like. In some embodiments, the terminal may be a node in a distributed system, wherein the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting a plurality of nodes through a network communication form. Nodes can form a Peer-To-Peer (P2P, Peer To Peer) network, and any type of computing device, such as a server, a terminal, and other electronic devices, can become a node in the blockchain system by joining the Peer-To-Peer network.
The information processing apparatus may be configured with the above-described information processing device. An exemplary diagram of a hardware structure block diagram of an information processing device provided in an embodiment of the present invention is shown in fig. 8, and may include:
a processor 1, a communication interface 2, a memory 3 and a communication bus 4;
wherein, the processor 1, the communication interface 2 and the memory 3 complete the communication with each other through the communication bus 4;
optionally, the communication interface 2 may be an interface of a communication module, such as an interface of a GSM module;
the processor 1 may be a central processing unit CPU or an application Specific Integrated circuit asic or one or more Integrated circuits configured to implement embodiments of the present invention.
The memory 3 may comprise a high-speed RAM memory and may also comprise a non-volatile memory, such as at least one disk memory.
The processor 1 is specifically configured to execute the computer program stored in the memory 3, so as to execute the following steps:
when it is monitored that an application program calls an image acquisition unit of the electronic equipment, judging whether a reference view direction required by the application program is consistent with a view direction of the image acquisition unit or not;
determining a target driving mode in at least two driving modes according to the judgment result, wherein different driving modes are used for driving the image acquired by the image acquisition unit to rotate in different rotating modes;
and driving the image collected by the image collecting unit to rotate in the target driving mode so as to enable the display direction of the image collected by the image collecting unit to be matched with the reference viewing direction.
Alternatively, the detailed functions and extended functions of the computer program may be as described above.
Embodiments of the present application further provide a readable storage medium, where the storage medium may store a computer program adapted to be executed by a processor, where the computer program is configured to:
when it is monitored that an application program calls an image acquisition unit of the electronic equipment, judging whether a reference view direction required by the application program is consistent with a view direction of the image acquisition unit or not;
determining a target driving mode in at least two driving modes according to the judgment result, wherein different driving modes are used for driving the image acquired by the image acquisition unit to rotate in different rotating modes;
and driving the image collected by the image collecting unit to rotate in the target driving mode so as to enable the display direction of the image collected by the image collecting unit to be matched with the reference viewing direction.
Alternatively, the detailed functions and extended functions of the computer program may be as described above.
Embodiments of the present application also provide a computer program product or a computer program, which includes a computer program, and the computer program is stored in a computer readable storage medium. The processor of the computer apparatus reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer apparatus executes the information processing method provided in the various alternative implementations of the information processing method described above.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
It should be understood that the technical problems can be solved by combining and combining the features of the embodiments from the claims.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. An information processing method comprising:
when it is monitored that an application program calls an image acquisition unit of the electronic equipment, judging whether a reference view direction required by the application program is consistent with a view direction of the image acquisition unit or not;
determining a target driving mode in at least two driving modes according to the judgment result, wherein different driving modes are used for driving the image acquired by the image acquisition unit to rotate in different rotating modes;
and driving the image collected by the image collecting unit to rotate in the target driving mode so as to enable the display direction of the image collected by the image collecting unit to be matched with the reference viewing direction.
2. The method of claim 1, wherein the determining whether a reference viewing direction required by the application coincides with a viewing direction of the image capture unit comprises:
acquiring a first display direction of an interface to be output of the application program;
acquiring a second display direction of the image acquired by the image acquisition unit based on the view finding direction of the image acquisition unit;
and if the first display direction is the same as the second display direction, determining that the reference framing direction required by the application program is consistent with the framing direction of the image acquisition unit, otherwise, determining that the reference framing direction required by the application program is inconsistent with the framing direction of the image acquisition unit.
3. The method of claim 2, wherein the determining whether a reference viewing direction required by the application coincides with a viewing direction of the image capture unit comprises:
acquiring a first display direction of an interface to be output of the application program;
determining a reference viewing direction required by the application program based on the first display direction;
reading the view finding direction of the image acquisition unit through an interface provided by the electronic equipment;
and if the reference framing direction required by the application program is the same as the read framing direction of the image acquisition unit, determining that the reference framing direction required by the application program is consistent with the framing direction of the image acquisition unit, otherwise, determining that the reference framing direction required by the application program is inconsistent with the framing direction of the image acquisition unit.
4. The method according to claim 1, wherein the determining the target driving manner among at least two driving manners according to the determination result comprises:
if the judgment result is inconsistent, selecting a driving mode one by one according to a preset mode to drive the image collected by the image collecting unit to rotate;
and if the first display direction of the interface to be output of the application program is consistent with the second display direction of the image acquired by the image acquisition unit calculated based on the view direction of the image acquisition unit after the image acquired by the image acquisition unit is driven to rotate by the driving mode, determining the currently selected driving mode as a target driving mode, otherwise, selecting the next driving mode to drive the image acquired by the image acquisition unit to rotate.
5. The method according to claim 1, wherein the determining the target driving manner among at least two driving manners according to the determination result comprises:
if the judgment result is inconsistent, acquiring a first display direction of an interface to be output of the application program;
calculating a second display direction of the image acquired by the image acquisition unit based on the viewing direction of the image acquisition unit;
and determining a target driving mode according to the angle difference between the first display direction and the second display direction.
6. The method of claim 1, further comprising:
acquiring a rotation instruction;
and rotating the image acquired by the image acquisition unit in response to the rotation instruction.
7. The method of claim 6, the rotating, in response to the rotation instruction, the image acquired by the image acquisition unit comprising:
and responding to the rotation instruction, and rotating the image acquired by the image acquisition unit according to a preset rotation step length.
8. An information processing apparatus comprising:
the judging module is used for judging whether a reference view-finding direction required by the application program is consistent with the view-finding direction of the image acquisition unit when monitoring that the application program calls the image acquisition unit of the electronic equipment;
the determining module is used for determining a target driving mode in at least two driving modes according to the judgment result of the judging module, and different driving modes are used for driving the image acquired by the image acquisition unit to rotate in different rotating modes;
and the driving module is used for driving the image collected by the image collecting unit to rotate in the target driving mode so as to enable the display direction of the image collected by the image collecting unit to be matched with the reference framing direction.
9. An information processing apparatus comprising:
a memory for storing a program;
a processor for calling and executing the program in the memory, the following operations being performed by executing the program:
when it is monitored that an application program calls an image acquisition unit of the electronic equipment, judging whether a reference view direction required by the application program is consistent with a view direction of the image acquisition unit or not;
determining a target driving mode in at least two driving modes according to the judgment result, wherein different driving modes are used for driving the image acquired by the image acquisition unit to rotate in different rotating modes;
and driving the image collected by the image collecting unit to rotate in the target driving mode so as to enable the display direction of the image collected by the image collecting unit to be matched with the reference viewing direction.
10. A readable storage medium on which a computer program is stored which, when being executed by a processor, carries out the steps of the information processing method according to any one of claims 1 to 7.
CN202011287133.3A 2020-11-17 2020-11-17 Information processing method, device and equipment and storage medium Active CN112422827B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011287133.3A CN112422827B (en) 2020-11-17 2020-11-17 Information processing method, device and equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011287133.3A CN112422827B (en) 2020-11-17 2020-11-17 Information processing method, device and equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112422827A true CN112422827A (en) 2021-02-26
CN112422827B CN112422827B (en) 2022-09-23

Family

ID=74830983

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011287133.3A Active CN112422827B (en) 2020-11-17 2020-11-17 Information processing method, device and equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112422827B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1866351A (en) * 2005-05-17 2006-11-22 乐金电子(中国)研究开发中心有限公司 Mobile communication terminal with displaying still image and method of displaying still image using same
JP2010213116A (en) * 2009-03-11 2010-09-24 Sharp Corp Antenna apparatus, receiving apparatus, receiving system, antenna installation direction determining method and program
JP2011109396A (en) * 2009-11-17 2011-06-02 Nippon Avionics Co Ltd Document camera
CN103237117A (en) * 2013-03-25 2013-08-07 广东欧珀移动通信有限公司 Method and device for implementing background image rotation in phones using MTK (MediaTek) platform
CN104252697A (en) * 2013-06-26 2014-12-31 腾讯科技(深圳)有限公司 Method and apparatus for rotating photo automatically, and terminal
CN106199066A (en) * 2016-07-08 2016-12-07 上海与德通讯技术有限公司 The direction calibration method of intelligent terminal, device
US20170305349A1 (en) * 2013-03-15 2017-10-26 Mouhamad A. Naboulsi Safety control system for vehicles
WO2018053722A1 (en) * 2016-09-21 2018-03-29 北京小米移动软件有限公司 Panoramic photo capture method and device
EP3422697A1 (en) * 2016-03-31 2019-01-02 Ninebot (Beijing) Tech Co., Ltd. Information processing method, and electronic device and computer storage medium
CN109360149A (en) * 2018-09-25 2019-02-19 平安普惠企业管理有限公司 A kind of picture upload method, system and terminal device

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1866351A (en) * 2005-05-17 2006-11-22 乐金电子(中国)研究开发中心有限公司 Mobile communication terminal with displaying still image and method of displaying still image using same
JP2010213116A (en) * 2009-03-11 2010-09-24 Sharp Corp Antenna apparatus, receiving apparatus, receiving system, antenna installation direction determining method and program
JP2011109396A (en) * 2009-11-17 2011-06-02 Nippon Avionics Co Ltd Document camera
US20170305349A1 (en) * 2013-03-15 2017-10-26 Mouhamad A. Naboulsi Safety control system for vehicles
CN103237117A (en) * 2013-03-25 2013-08-07 广东欧珀移动通信有限公司 Method and device for implementing background image rotation in phones using MTK (MediaTek) platform
CN104252697A (en) * 2013-06-26 2014-12-31 腾讯科技(深圳)有限公司 Method and apparatus for rotating photo automatically, and terminal
EP3422697A1 (en) * 2016-03-31 2019-01-02 Ninebot (Beijing) Tech Co., Ltd. Information processing method, and electronic device and computer storage medium
CN106199066A (en) * 2016-07-08 2016-12-07 上海与德通讯技术有限公司 The direction calibration method of intelligent terminal, device
WO2018053722A1 (en) * 2016-09-21 2018-03-29 北京小米移动软件有限公司 Panoramic photo capture method and device
CN109360149A (en) * 2018-09-25 2019-02-19 平安普惠企业管理有限公司 A kind of picture upload method, system and terminal device

Also Published As

Publication number Publication date
CN112422827B (en) 2022-09-23

Similar Documents

Publication Publication Date Title
US9712745B2 (en) Method and apparatus for operating camera function in portable terminal
JP6942940B2 (en) Image processing equipment, image processing methods and programs
CN104902170A (en) Photo-taking method and terminal
CN109561257B (en) Picture focusing method, device, terminal and corresponding storage medium
US20130002718A1 (en) Image display apparatus, image display control method and program
US20190230269A1 (en) Monitoring camera, method of controlling monitoring camera, and non-transitory computer-readable storage medium
CN104580891A (en) Method for terminal to take images
JP2014042160A (en) Display terminal, setting method of target area of moving body detection and program
CN113473004A (en) Shooting method and device
CN107231522A (en) A kind of mobile terminal and its photographic method, computer-readable recording medium
EP2793462B1 (en) Method and apparatus for video call in communication system
CN104363372A (en) Image processing method and image processing terminal
US20200074217A1 (en) Techniques for providing user notice and selection of duplicate image pruning
CN103512557A (en) Electronic equipment and method for determining relative location between electronic equipment
CN112422827B (en) Information processing method, device and equipment and storage medium
CN115514897B (en) Method and device for processing image
CN109547678B (en) Processing method, device, equipment and readable storage medium
CN104104870A (en) Photographing control method, photographing control device and photographing equipment
EP3644600A1 (en) Imaging device, information processing method, system, and carrier means
CN109429008B (en) Image processing apparatus, information processing system, information processing method, and storage medium
US20210051276A1 (en) Method and apparatus for providing video in portable terminal
US9307152B2 (en) Display control apparatus and camera system where dialogue box is displayed based on display mode
CN104994279A (en) Method for starting wide angle camera based on terminal status and terminal
CN104978566A (en) Picture processing method and terminal
CN104994282A (en) Large view angle camera control method and user terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant