Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, 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 making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention can detect whether the imaging device for shooting the image rotates to rotate the shot image so as to store or display the normal image, can detect the supporting equipment such as a holder or a bracket for mounting the imaging device when detecting whether the imaging device rotates, and can correspondingly determine that the imaging device also rotates if the supporting equipment rotates; the method can also detect a moving object (such as an unmanned aerial vehicle UAV) carrying the imaging device, and determine whether the imaging device rotates by judging whether the moving object turns over or the like.
Specifically, referring to fig. 4, which is a flowchart illustrating a first embodiment of an image processing method according to the present invention, the method according to the present invention may be executed by a processor in an imaging device such as a camera, a video camera, or the like, and the image processing method specifically includes performing a rotation operation on a captured image such as a picture or a video, so as to store or display the captured image in a normal display manner (the upper portion of a captured object is displayed on the upper portion of a display terminal), and specifically, the method includes:
s101: when an image is acquired, the position state of an imaging device used for shooting the image is determined.
The image processing method according to the embodiment of the present invention is executed when an imaging device such as a camera or a video camera takes an image such as a photograph or a video.
The position status may specifically be related rotation angle information obtained from a sensor (such as an accelerometer or a gyroscope) in the support device or the mobile object, the rotation angle information including an angle and a direction in which the corresponding support device or the mobile object has rotated. The position status may be an indication message indicating that the support device or the mobile object has rotated, which is obtained from another processor, and the other processor determines the indication message after analyzing and processing the related rotation angle information obtained from the sensor in the support device or the mobile object.
The sensors that detect the rotation may in particular comprise accelerometers, gyroscopes, etc. The sensor may determine the position state of the corresponding imaging device according to an angle between the relative axial direction of the supporting device or the moving object and the gravity direction, or according to a value of the gravitational acceleration detected by the gravity sensor, for example, if the gravitational acceleration value of the supporting device or the moving object is detected to be-g (g refers to the gravitational acceleration), it may be determined that the supporting device or the moving object is flipped by 180 degrees.
The related information (such as the above-mentioned rotation angle information) for confirming the position state may be obtained from a sensor such as a gravity sensor actively when the image is collected; or may be acquired from the sensor periodically or in real time as needed to enable a timely determination of the positional state of the imaging device at the time of the acquired image. Of course, the sensors may actively push when they detect rotation (the sensed data changes).
S102: and if the position state indicates that the imaging device is in a rotated position state after rotation, rotating the acquired image according to a preset rotation rule.
As long as the rotation of the supporting apparatus or the moving object is detected, it can be determined that the rotation of the imaging device has occurred, and a rotation operation needs to be performed on the captured image. Particularly, when it is detected that the imaging device is rotated by 90 degrees or 180 degrees, it is necessary to rotate the captured image by 90 degrees or 180 degrees in the opposite direction of the rotation according to the rotation rule, or rotate the image by 270 degrees or 180 degrees in the rotation direction according to the rotation rule, so that the upper half of the image is displayed on the upper half of the display device, and the lower half of the display device corresponds to the lower half of the displayed image.
Before executing the S101 or the S102, it may be determined whether a user selects a rotation operation function for controlling automatic rotation of the image, if so, the S101 or the S102 is executed, otherwise, the S101 or the S102 is not executed, so as to meet different requirements of the user.
Specifically, whether the position state is detected to indicate that the imaging device is in the rotated position state after rotation may be described with reference to the corresponding embodiments of fig. 7 to 9.
S103: and outputting the image after the rotation operation is performed.
The image on which the rotation operation is performed is output so as to store the rotated image in a memory or display the rotated image in a display.
It can be understood that, when the acquired image is one or more pictures, the executed rotation operation rotates each picture; when the acquired image is a video, the executed rotation operation rotates each frame in the video so as to rotate the whole video.
The embodiment of the invention can rotate the shot image according to the rotation state of the imaging device, meets the automatic and intelligent requirements of users on image rotation, and has lower realization cost.
Referring to fig. 5 again, the method of the embodiment of the present invention is a flowchart illustrating a second embodiment of the image processing method, where the method may be executed by a processor in an imaging device such as a camera, a video camera, or the like, and the image processing specifically includes performing a rotation operation on an image such as a captured picture or video, so as to store or display the captured image in a normal display manner (the upper portion of the image corresponding to the captured object is displayed on the upper portion of the display terminal), and specifically, the method includes:
s201: and judging whether the automatic rotation operation function is started or not.
Mechanical keys or APP buttons may be provided for the user, and when the user wishes to perform automatic image rotation, the rotation operation function is turned on by clicking the trigger mechanical button or APP button.
Before executing the automatic image rotation, it is detected whether the related function is turned on, if so, the following S202 is executed, otherwise, the process is ended.
S202: when an image is acquired, the position state of an imaging device used for shooting the image is determined.
Whether the position state is a rotational position state is determined based on rotation angle information of a support device on which the imaging apparatus is mounted, or rotation angle information of a moving object on which the imaging apparatus is mounted, or rotation angle information of the imaging apparatus.
S203: and if the position state indicates that the imaging device is in a rotated position state after rotation, rotating the acquired image according to a preset rotation rule.
The rotation rule comprises reversely rotating the image according to the rotation angle and the direction indicated in the rotation position state; or according to the rotation angle and the direction indicated in the rotation position state, rotating the image in the indicated direction, and ensuring that the sum of the rotation angle of the image and the rotation angle indicated in the rotation position state is 360 degrees.
For example, when it is determined that the imaging device is rotated 90 degrees counterclockwise, the image is rotated 90 degrees clockwise, or the image is rotated 270 degrees counterclockwise.
S204: and outputting the image after the rotation operation is performed.
Specifically, the specific description of S202 to S204 may refer to the description of the corresponding embodiment in fig. 4.
S205: and storing the image after the rotation operation is executed or displaying the image after the rotation operation is executed.
The embodiment of the invention can rotate the shot image according to the rotation state of the imaging device, meets the automatic intelligent requirement of the user on the image rotation, has lower cost, can open and close the function according to the functional requirement of the user, and meets different requirements of the user.
Referring to fig. 6 again, it is a flowchart illustrating a third embodiment of the image processing method according to the present invention, where the method according to the present invention may be executed by a processor in an imaging device such as a camera, a video camera, or the like, and the image processing specifically includes performing a rotation operation on a captured image such as a picture or a video, so as to store or display the captured image in a normal display manner (the upper portion of the captured object is displayed on the upper portion of the display terminal), and specifically, the method includes:
s301: when an image is acquired, the position state of an imaging device used for shooting the image is determined.
Whether the position state is a rotational position state is determined based on rotation angle information of a support device on which the imaging apparatus is mounted, or rotation angle information of a moving object on which the imaging apparatus is mounted, or rotation angle information of the imaging apparatus.
S302: and if the position state indicates that the imaging device is in a rotated position state after rotation, judging whether an automatic rotation operation function is started.
Mechanical keys or APP buttons may be provided for the user, and when the user wishes to perform automatic image rotation, the rotation operation function is turned on by clicking the trigger mechanical button or APP button.
Before executing the automatic image rotation, whether the related function is started is detected, if so, the following step S303 is executed, otherwise, the process is ended.
S303: and executing rotation operation on the acquired image according to a preset rotation rule.
The rotation rule comprises reversely rotating the image according to the rotation angle and the direction indicated in the rotation position state; or according to the rotation angle and the direction indicated in the rotation position state, rotating the image in the indicated direction, and ensuring that the sum of the rotation angle of the image and the rotation angle indicated in the rotation position state is 360 degrees.
For example, when it is determined that the imaging device is rotated 90 degrees counterclockwise, the image is rotated 90 degrees clockwise, or the image is rotated 270 degrees counterclockwise.
S304: and outputting the image after the rotation operation is performed.
Specifically, the specific descriptions of S301 to S304 may refer to the description of the corresponding embodiment in fig. 4.
S305: and storing the image after the rotation operation is executed or displaying the image after the rotation operation is executed.
The embodiment of the invention can rotate the shot image according to the rotation state of the imaging device, meets the automatic intelligent requirement of the user on the image rotation, has lower cost, can open and close the function according to the functional requirement of the user, and meets different requirements of the user.
The method for detecting whether the position state is the rotation position state in the embodiments of the present invention includes various methods, and specifically, whether the imaging apparatus is in the rotation position state may be determined by detecting the supporting device, the moving object, and the imaging apparatus itself of the imaging apparatus, and may be determined based on the supporting device, the moving object, and the imaging apparatus, respectively, or may be determined based on a combination of any two or three of the three, so as to determine comprehensively whether the position state of the imaging apparatus is the rotation position state. Please refer to the following description of the corresponding embodiments of fig. 7 to 9.
Referring to fig. 7, a flowchart of a method for detecting whether a position status is a rotation position status according to an embodiment of the present invention is shown, where the method includes:
s401: acquiring rotation angle information of a supporting device used for mounting the imaging device;
s402: and if the acquired rotation angle information of the supporting equipment reaches a preset first angle threshold, determining that the position state of the imaging device is a rotation position state representing that the imaging device is in a rotated state.
Wherein the S401 includes: acquiring rotation angle information of a supporting device from a rotation angle sensor configured in the supporting device on which the imaging device is mounted; or the rotation angle information of the supporting device is acquired from a rotation angle sensor externally arranged on the imaging device and used for detecting the rotation angle of the supporting device.
The first angle threshold value can be configured to be 90 degrees, and when the included angle between the vertical axis corresponding to the normal vertical placement of the supporting equipment and the gravity direction of the gravity sensor reaches 90 degrees, the rotation position state of the imaging device after rotation can be determined.
The embodiment of the invention can effectively monitor the supporting equipment connected with the imaging device, thereby determining the rotation condition of the imaging device, meeting the requirements of users on realizing automation and intellectualization of image rotation and having lower software and hardware costs.
Referring to fig. 8, a schematic flow chart of another method for detecting whether a position status is a rotational position status according to an embodiment of the present invention is shown, where the method includes:
s501: acquiring rotation angle information of a moving object for mounting the imaging device;
s502: and if the acquired rotation angle information of the moving object reaches a preset second angle threshold, determining that the position state of the imaging device is a rotation position state representing that the imaging device is in a rotated state.
The S501 may specifically include: acquiring rotation angle information of a moving object mounted with the imaging device from a rotation angle sensor configured in the moving object; or the rotation angle information of the moving object is acquired from a rotation angle sensor for detecting the moving object, which is externally mounted to the imaging device.
The second angle threshold may be configured to be 90 degrees, and when the moving object is normally and vertically placed, an included angle between the vertical axis corresponding to the moving object and the gravity direction of the gravity sensor reaches 90 degrees, it may be determined that the imaging device is in the rotated position state after the rotation.
The embodiment of the invention can effectively monitor the moving object connected with the imaging device, thereby determining the rotation condition of the imaging device, meeting the requirements of users on realizing automation and intellectualization of image rotation and having lower software and hardware costs.
Referring to fig. 9, a schematic flow chart of another method for detecting whether a position status is a rotational position status according to an embodiment of the present invention is shown, where the method includes:
s601: acquiring rotation angle information of the imaging device;
s602: and if the acquired rotation angle information of the imaging device reaches a preset third angle threshold, determining that the position state of the imaging device is a rotation position state representing that the imaging device is in a rotated state.
The S601 may specifically include: acquiring rotation angle information of the imaging device from a rotation angle sensor configured in the imaging device; or the rotation angle information of the imaging device is acquired from a rotation angle sensor that is external to the imaging device and detects the rotation angle information of the imaging device.
The third angle threshold may be configured to be 90 degrees, and when the included angle between the vertical axis corresponding to the normal vertical placement of the imaging device and the gravity direction of the gravity sensor reaches 90 degrees, it may be determined that the imaging device is in the rotated position state.
The embodiment of the invention can effectively monitor the imaging device, determine the rotation condition of the imaging device, meet the requirements of users on realizing automation and intellectualization of image rotation, and has lower software and hardware cost.
Referring again to fig. 10, which is a flowchart illustrating a fourth embodiment of the image processing method according to the present invention, the method according to the present invention may be executed by a processor, and the processor determines whether to execute a rotation operation on the captured image by communicating with other processors for detecting the position status of the support device of the imaging apparatus and the moving object, and specifically, the method includes:
s701: when an image is acquired, sending an inquiry request, wherein the inquiry request is used for requesting to acquire whether the position state of an imaging device for shooting the image is a rotation position state;
whether the position state of the imaging device of the image is the rotational position state is determined by the other processors, and a specific manner of detecting whether the position state is the rotational position state by the other processors may be described with reference to the corresponding embodiments in fig. 7 to 9.
S702: if confirmation information responding to the inquiry request is received, rotating the acquired image according to a preset rotating rule, wherein the confirmation information is used for determining that an imaging device of the image is in a rotating position state;
s703: and outputting the image after the rotation operation is performed.
Further, the method of the embodiment of the present invention may further include: and storing the image after the rotation operation is executed or displaying the image after the rotation operation is executed.
Further, before the step S701, the method according to the embodiment of the present invention may further include: judging whether an automatic rotation operation function is started, if so, executing the request for sending the inquiry; or before the rotating operation is performed in S702, the method further includes: and judging whether an automatic rotation operation function is started, if so, executing rotation operation on the acquired image according to a preset rotation rule.
The embodiment of the invention can quickly determine whether to rotate the image, meets the requirements of users on realizing automation and intellectualization of image rotation, and has lower software and hardware cost.
Referring to fig. 11 again, a flowchart of a fifth embodiment of the image processing method according to the present invention is shown, and the method according to the embodiment of the present invention may be executed by a processor, and is configured to detect a position state of a supporting device of an imaging apparatus and a moving object, and communicate with a corresponding processor that performs an image rotation operation to trigger a rotation operation on an image captured by the imaging apparatus. The method specifically comprises the following steps:
s801: receiving an inquiry request for requesting whether a position state of an imaging device of an image at the time of image capturing is a rotational position state;
s802: acquiring the position state of the imaging device;
wherein whether the position state is a rotational position state is determined according to rotation angle information of a support apparatus on which the imaging device is mounted, or rotation angle information of a moving object on which the imaging device is mounted, or rotation angle information of the imaging device.
Specifically, detecting whether the position status is the rotation position status may include: acquiring rotation angle information of a supporting device used for mounting the imaging device; and if the acquired rotation angle information of the supporting equipment reaches a preset first angle threshold, determining that the position state of the imaging device is a rotation position state representing that the imaging device is in a rotated state. Wherein acquiring rotation angle information of a supporting device for mounting the imaging apparatus includes: acquiring rotation angle information of a supporting device from a rotation angle sensor configured in the supporting device on which the imaging device is mounted; or the rotation angle information of the supporting device is acquired from a rotation angle sensor externally arranged on the imaging device and used for detecting the rotation angle of the supporting device.
Or, detecting whether the position state is a rotation position state, including: acquiring rotation angle information of a moving object for mounting the imaging device; and if the acquired rotation angle information of the moving object reaches a preset second angle threshold, determining that the position state of the imaging device is a rotation position state representing that the imaging device is in a rotated state. Wherein the acquiring of the rotation angle information of the moving object on which the imaging apparatus is mounted includes: acquiring rotation angle information of a moving object mounted with the imaging device from a rotation angle sensor configured in the moving object; alternatively, the rotation angle information of the moving object is acquired from a rotation angle sensor that is external to the moving object of the imaging device and that detects the moving object.
Alternatively, detecting whether the position state is a rotational position state may include: acquiring rotation angle information of the imaging device; and if the acquired rotation angle information of the imaging device reaches a preset third angle threshold, determining that the position state of the imaging device is a rotation position state representing that the imaging device is in a rotated state. Wherein the acquiring of the rotation angle information of the imaging device includes: acquiring rotation angle information of the imaging device from a rotation angle sensor configured in the imaging device; alternatively, the rotation angle information of the imaging device is acquired from a rotation angle sensor that is externally provided to the imaging device and detects the rotation angle information of the imaging device.
For each of the above-mentioned associated information (the above-mentioned rotation angle information) for confirming the position state, it may be actively acquired from a sensor such as a gravity sensor; or may be acquired from the sensor periodically or in real time as needed to enable a timely determination of the positional state of the imaging device at the time of the acquired image. Of course, the sensors may actively push when they detect rotation (the sensed data changes).
S802 may be executed before S801, and after detecting that the position state is a rotational position state indicating that the imaging apparatus is rotated, it is further required to detect whether an automatic rotation function is turned on, and if so, a position state indicating that the imaging apparatus is in the rotational position state after rotation is generated so that confirmation information can be fed back in time when an inquiry request is received, and S803 described below is executed.
S803: and when the position state is a rotation position state which indicates that the imaging device is rotated, responding to the inquiry request and returning confirmation information so as to rotate the image shot by the imaging device.
The method of the embodiment of the invention further comprises the following steps: judging whether an automatic rotation operation function is started or not; if so, executing the acquisition of the position state of the imaging device; or further comprising: judging whether an automatic rotation operation function is started or not; and if so, executing the response to the inquiry request and returning confirmation information.
The embodiment of the invention can quickly inform the image rotation processor whether to rotate the image, meets the requirements of users on realizing automation and intellectualization of image rotation, and has lower software and hardware cost.
The image processing apparatus, the imaging apparatus, and the system according to the embodiments of the present invention are described in detail below.
Referring to fig. 12, a schematic structural diagram of a first embodiment of an image processing apparatus according to the present invention is shown, where the apparatus according to the embodiment of the present invention may be configured in various cameras or intelligent mobile terminals with camera shooting functions, and specifically, the apparatus includes:
the determining module 11 is configured to determine, when an image is acquired, a position state of an imaging device used for capturing the image;
the processing module 12 is configured to, if the position state indicates a rotational position state after the imaging device is rotated, perform a rotation operation on the acquired image according to a preset rotation rule;
and an output module 13, configured to output the image after the rotation operation is performed.
Further optionally, whether the position state is a rotational position state is determined according to rotation angle information of a support device on which the imaging apparatus is mounted, or rotation angle information of a moving object on which the imaging apparatus is mounted, or rotation angle information of the imaging apparatus.
Further optionally, the image processing apparatus according to the embodiment of the present invention further includes:
a detecting module 14, configured to detect whether the position status is a rotational position status.
Optionally, the detection module is specifically configured to acquire rotation angle information of a supporting device used for mounting the imaging apparatus; and if the acquired rotation angle information of the supporting equipment reaches a preset first angle threshold, determining that the position state of the imaging device is a rotation position state representing that the imaging device is in a rotated state.
Optionally, the detection module 14 is specifically configured to acquire rotation angle information of a supporting device mounted with the imaging apparatus from a rotation angle sensor configured in the supporting device; alternatively, the rotation angle information of the support device is acquired from a rotation angle sensor that is external to the support device of the imaging apparatus and detects the rotation angle of the support device.
Optionally, the detection module 14 is specifically configured to acquire rotation angle information of a moving object used for mounting the imaging apparatus; and if the acquired rotation angle information of the moving object reaches a preset second angle threshold, determining that the position state of the imaging device is a rotation position state representing that the imaging device is in a rotated state.
Optionally, the detection module 14 is specifically configured to acquire rotation angle information of a moving object mounted with the imaging device from a rotation angle sensor configured in the moving object; alternatively, the rotation angle information of the moving object is acquired from a rotation angle sensor that is external to the moving object of the imaging device and that detects the moving object.
Optionally, the detection module 14 is specifically configured to acquire rotation angle information of the imaging apparatus; and if the acquired rotation angle information of the imaging device reaches a preset third angle threshold, determining that the position state of the imaging device is a rotation position state representing that the imaging device is in a rotated state.
Optionally, the detecting module 14 is specifically configured to acquire rotation angle information of the imaging apparatus from a rotation angle sensor configured in the imaging apparatus; alternatively, the rotation angle information of the imaging device is acquired from a rotation angle sensor that is externally provided to the imaging device and detects the rotation angle information of the imaging device.
Further optionally, the image processing apparatus according to the embodiment of the present invention further includes:
and a judging module 15, configured to judge whether the automatic rotation operation function is turned on.
The judging module 15 may execute the judging step before whether to execute the rotation operation, and notify the processing module 12 to execute the rotation operation when the judging result is yes. Or, before determining the position state of the imaging apparatus, it is determined whether the function of the automatic rotation operation is turned on, and if so, the determination module 11 is notified to determine the position state of the imaging apparatus.
Further optionally, the rotation rule comprises: reversely rotating the image according to the rotation angle and direction indicated in the rotation position state; or according to the rotation angle and the direction indicated in the rotation position state, rotating the image in the indicated direction, and ensuring that the sum of the rotation angle of the image and the rotation angle indicated in the rotation position state is 360 degrees.
It should be noted that, for specific implementation of each module in the embodiment of the present invention, reference may be made to the description of the relevant step in each embodiment of the foregoing method item, which is not described herein again.
The embodiment of the invention can effectively monitor the imaging device, determine the rotation condition of the imaging device, meet the requirements of users on realizing automation and intellectualization of image rotation, and has lower software and hardware cost.
Referring to fig. 13 again, the structural diagram of an imaging device according to an embodiment of the present invention is shown, where the imaging device according to an embodiment of the present invention may refer to various cameras and video cameras, and may also refer to an intelligent mobile terminal with a camera shooting function, and the imaging device includes various existing software and hardware structures, and further specifically, the imaging device according to an embodiment of the present invention specifically includes: an imaging lens 111, an optical sensor 112, and a processor 113, wherein:
the processor 113 is configured to determine a position state of the imaging apparatus when an image is acquired through the camera lens and the optical sensor; if the position state indicates that the imaging device is in a rotated position state after rotation, rotating the acquired image according to a preset rotation rule; and outputting the image after the rotation operation is performed.
Further alternatively, the processor 113 determines whether the position state is a rotational position state based on rotation angle information of a support device on which the imaging apparatus is mounted, or rotation angle information of a moving object on which the imaging apparatus is mounted, or rotation angle information of the imaging apparatus.
Further optionally, the processor 113 is further configured to detect whether the position status is a rotation position status.
Further optionally, the processor 113 is specifically configured to acquire rotation angle information of a supporting device used for mounting the imaging apparatus; and if the acquired rotation angle information of the supporting equipment reaches a preset first angle threshold, determining that the position state of the imaging device is a rotation position state representing that the imaging device is in a rotated state.
Further optionally, the processor 113 is specifically configured to acquire rotation angle information of a supporting device mounted with the imaging apparatus from a rotation angle sensor configured in the supporting device; alternatively, the rotation angle information of the supporting device is acquired from a rotation angle sensor that is externally provided to the supporting device of the present imaging apparatus and that detects the supporting device.
Further optionally, the processor 113 is specifically configured to acquire rotation angle information of a moving object on which the imaging apparatus is mounted; and if the acquired rotation angle information of the moving object reaches a preset second angle threshold, determining that the position state of the imaging device is a rotation position state which shows that the imaging device is in the rotated state.
Further optionally, the processor 113 is specifically configured to acquire rotation angle information of the moving object from a rotation angle sensor disposed in the moving object on which the imaging apparatus is mounted; alternatively, the rotation angle information of the moving object is acquired from a rotation angle sensor that is external to the moving object of the present imaging apparatus and that detects the rotation angle of the moving object.
Further optionally, the processor 113 is specifically configured to acquire rotation angle information of the imaging apparatus; and if the acquired rotation angle information of the imaging device reaches a preset third angle threshold, determining that the position state of the imaging device is a rotation position state which shows that the imaging device is rotated.
Further optionally, the processor 113 is specifically configured to acquire rotation angle information of the imaging apparatus from a rotation angle sensor configured in the imaging apparatus; alternatively, the rotation angle information of the present imaging apparatus is acquired from a rotation angle sensor that is externally provided to the present imaging apparatus and detects the rotation angle information of the present imaging apparatus.
Further optionally, the processor 113 is further configured to determine whether an automatic rotation operation function is turned on.
Further optionally, the rotation rule according to which the processor 113 follows includes: reversely rotating the image according to the rotation angle and direction indicated in the rotation position state; or according to the rotation angle and the direction indicated in the rotation position state, rotating the image in the indicated direction, and ensuring that the sum of the rotation angle of the image and the rotation angle indicated in the rotation position state is 360 degrees.
In the embodiment of the present invention, the specific implementation of the processor 113 may refer to the description of the relevant steps in the foregoing method embodiment, which is not described herein again.
The embodiment of the invention can effectively monitor the imaging device, determine the rotation condition of the imaging device, meet the requirements of users on realizing automation and intellectualization of image rotation, and has lower software and hardware cost.
Referring to fig. 14 again, a schematic structural diagram of another image processing apparatus according to an embodiment of the present invention is shown, where the imaging apparatus according to an embodiment of the present invention may also be configured in various cameras, video cameras, or mobile intelligent terminals with a camera shooting function, and specifically, the image processing apparatus according to an embodiment of the present invention includes:
the device comprises a request module 21, a processing module and a display module, wherein the request module is used for sending an inquiry request when an image is acquired, and the inquiry request is used for requesting to acquire whether the position state of an imaging device used for shooting the image is a rotation position state;
a rotation module 22, configured to, if confirmation information in response to the inquiry request is received, perform a rotation operation on the acquired image according to a preset rotation rule, where the confirmation information is used to determine that an imaging device of the image is in a rotation position state;
and an output module 23, configured to output the image after the rotation operation is performed.
Further optionally, the apparatus according to the embodiment of the present invention may further include:
and a judging module 24, configured to judge whether the automatic rotation operation function is turned on.
The determining module 24 may determine whether the function of the rotation operation is turned on before the requesting module 21 initiates the query request, and if so, notify the requesting module 21 to initiate the query request, otherwise, do not need to initiate the query request. The determining module 24 may also determine whether the function of the rotation operation is turned on before the rotation module 22 performs the rotation operation, and if so, notify the rotation module 22 to rotate the acquired image, otherwise, the image does not need to be rotated.
Specifically, for the specific implementation of the image processing apparatus according to the embodiment of the present invention, reference may be made to the description of the relevant steps in the foregoing method embodiment, which is not repeated herein.
The embodiment of the invention can quickly determine whether to rotate the image, meets the requirements of users on realizing automation and intellectualization of image rotation, and has lower software and hardware cost.
The embodiment of the present invention further provides a processor, which may call a program stored in an external or internal memory to perform an automatic rotation operation of an image, and specifically, the processor is configured to send an inquiry request when an image is acquired, where the inquiry request is used to request to acquire whether a position state of an imaging device used to capture the image is a rotational position state; if confirmation information responding to the inquiry request is received, rotating the acquired image according to a preset rotating rule, wherein the confirmation information is used for determining that an imaging device of the image is in a rotating position state; and outputting the image after the rotation operation is performed.
Further, the processor is also used for judging whether the automatic rotation operation function is started.
The embodiment of the invention can quickly determine whether to rotate the image, meets the requirements of users on realizing automation and intellectualization of image rotation, and has lower software and hardware cost.
Referring to fig. 15 again, the image processing apparatus according to an embodiment of the present invention is a schematic structural diagram of another image processing apparatus, the image processing apparatus according to an embodiment of the present invention may be an independent apparatus for monitoring whether rotation occurs in the imaging apparatus, the supporting device on which the imaging apparatus is mounted, and the moving object on which the imaging apparatus is mounted, or the image processing apparatus may be built in the imaging apparatus, the supporting device on which the imaging apparatus is mounted, and the moving object on which the imaging apparatus is mounted, and specifically, the image processing apparatus may include:
a receiving module 31 configured to receive an inquiry request for requesting whether a position state of an imaging device of an image is a rotational position state at the time of image capturing;
an obtaining module 32 for obtaining the monitored position status of the imaging device;
a response module 33, configured to, when the position status indicates that the imaging device is in a rotated position status after rotation, return confirmation information in response to the inquiry request, so as to perform a rotation operation on the image captured by the imaging device.
Further optionally, whether the position state is a rotational position state is determined according to rotation angle information of a support device on which the imaging apparatus is mounted, or rotation angle information of a moving object on which the imaging apparatus is mounted, or rotation angle information of the imaging apparatus.
Further optionally, the imaging apparatus according to the embodiment of the present invention may further include:
and the detection module 34 is configured to detect whether the position status is a rotation position status.
Further optionally, the detection module 34 is specifically configured to acquire rotation angle information of a supporting device used for mounting the imaging apparatus; and if the acquired rotation angle information of the supporting equipment reaches a preset first angle threshold, determining that the position state of the imaging device is a rotation position state representing that the imaging device is in a rotated state.
Further optionally, the detection module 34 is specifically configured to acquire rotation angle information of a supporting device mounted with the imaging apparatus from a rotation angle sensor configured in the supporting device; alternatively, the rotation angle information of the support device is acquired from a rotation angle sensor that is external to the support device of the imaging apparatus and detects the rotation angle of the support device.
Further optionally, the detection module 34 is specifically configured to acquire rotation angle information of a moving object used for mounting the imaging apparatus; and if the acquired rotation angle information of the moving object reaches a preset second angle threshold, determining that the position state of the imaging device is a rotation position state representing that the imaging device is in a rotated state.
Further optionally, the detection module 34 is specifically configured to acquire rotation angle information of a moving object mounted with the imaging device from a rotation angle sensor configured in the moving object; alternatively, the rotation angle information of the moving object is acquired from a rotation angle sensor that is external to the moving object of the imaging device and that detects the moving object.
Further optionally, the detection module 34 is specifically configured to acquire rotation angle information of the imaging apparatus; and if the acquired rotation angle information of the imaging device reaches a preset third angle threshold, determining that the position state of the imaging device is a rotation position state representing that the imaging device is in a rotated state.
Further optionally, the detecting module 34 is specifically configured to acquire rotation angle information of the imaging apparatus from a rotation angle sensor configured in the imaging apparatus; alternatively, the rotation angle information of the imaging device is acquired from a rotation angle sensor that is externally provided to the imaging device and detects the rotation angle information of the imaging device.
Further optionally, the imaging apparatus according to the embodiment of the present invention may further include:
and a judging module 35, configured to judge whether the automatic rotation operation function is turned on.
The determining module 35 may determine whether the corresponding function is turned on before the responding module 33 sends a confirmation message, and if so, notify the responding module 33 to return a confirmation message to notify that the imaging apparatus is in the rotational position state, otherwise, not reply a message or reply a message that the imaging apparatus is not in the rotational position state, so as to not perform the image rotation operation.
It should be noted that, for specific implementation of each module in the embodiment of the present invention, reference may be made to the detailed description of the relevant step in the foregoing method embodiment, which is not described herein again.
Further, an embodiment of the present invention further provides a processor, which may be configured to call a program stored in an external or content storage device, to complete an automatic rotation operation of an image, and in particular, the processor is configured to receive an inquiry request for requesting whether a position state of an imaging device of the image is a rotational position state at the time of image capturing; acquiring the position state of the imaging device; and when the position state is a rotation position state which indicates that the imaging device is rotated, responding to the inquiry request and returning confirmation information so as to rotate the image shot by the imaging device.
Further optionally, the processor detects whether the position state is a rotational position state or not, which is determined according to rotation angle information of a support device on which the imaging apparatus is mounted, or rotation angle information of a moving object on which the imaging apparatus is mounted, or rotation angle information of the imaging apparatus.
Further optionally, the processor is further configured to detect whether the position status is a rotational position status.
Further optionally, the processor is specifically configured to acquire rotation angle information of a supporting device used for mounting the imaging apparatus; and if the acquired rotation angle information of the supporting equipment reaches a preset first angle threshold, determining that the position state of the imaging device is a rotation position state representing that the imaging device is in a rotated state.
Further optionally, the processor is specifically configured to acquire rotation angle information of a supporting device mounted with the imaging apparatus from a rotation angle sensor configured in the supporting device; alternatively, the rotation angle information of the support device is acquired from a rotation angle sensor that is external to the support device of the imaging apparatus and detects the rotation angle of the support device.
Further optionally, the processor is specifically configured to acquire rotation angle information of a moving object on which the imaging device is mounted; and if the acquired rotation angle information of the moving object reaches a preset second angle threshold, determining that the position state of the imaging device is a rotation position state representing that the imaging device is in a rotated state.
Further optionally, the processor is specifically configured to acquire rotation angle information of the moving object from a rotation angle sensor configured in the moving object on which the imaging device is mounted; alternatively, the rotation angle information of the moving object is acquired from a rotation angle sensor that is external to the moving object of the imaging device and that detects the moving object.
Further optionally, the processor is specifically configured to acquire rotation angle information of the imaging device; and if the acquired rotation angle information of the imaging device reaches a preset third angle threshold, determining that the position state of the imaging device is a rotation position state representing that the imaging device is in a rotated state.
Further optionally, the processor is specifically configured to acquire rotation angle information of the imaging apparatus from a rotation angle sensor configured in the imaging apparatus; alternatively, the rotation angle information of the imaging device is acquired from a rotation angle sensor that is externally provided to the imaging device and detects the rotation angle information of the imaging device.
Further optionally, the processor is further configured to determine whether an automatic rotation operation function is turned on.
The specific implementation of the processor may refer to the description of the relevant steps in the above method embodiments, which is not repeated herein.
The embodiment of the invention can quickly inform the image rotation processor whether to rotate the image, meets the requirements of users on realizing automation and intellectualization of image rotation, and has lower software and hardware cost.
Referring to fig. 16 again, it is a schematic structural diagram of an imaging system according to an embodiment of the present invention, where the imaging system includes an image acquisition module 211, a rotation processing module 212, an image storage module 213, an image display module 214, a rotation detection module 311, a sensor 312, and a key 313, and specifically, signal flows among the modules include:
the image acquisition module 211 comprises a lens, an image sensor and other components, and sends the acquired image to the rotation processing module 212 after acquiring the image;
after receiving the image, the rotation processing module 212 initiates an inquiry to the rotation detection module 311 to detect whether the imaging device, the supporting device, or the moving object causes the imaging device where the image acquisition module 211 is located to rotate;
the rotation detection module 311 receives data from the sensor 312 for monitoring the rotation of the imaging device, the support apparatus, or the moving object, analyzes the data, and determines whether the rotation of the imaging device, the support apparatus, or the moving object causes the rotation of the imaging device. The sensor 312 may be an accelerometer or the like;
the rotation detection module 311 detects whether the key 313 is triggered and the auto-rotation function is enabled after determining that the imaging device is rotated. The key 313 may be a physical key, or a touch screen key of APP, or the like;
after detecting that the automatic rotation function is started, the rotation detection module 311 returns a confirmation message for confirming rotation to the rotation processing module 212 to which the rotation detection module responds to the inquiry;
after receiving the confirmation message, the rotation processing module 212 performs rotation processing on the image acquired by the image acquisition module 211, and outputs the rotated image to the image storage module 213 and/or the display module 214, so that the user can view the rotated image.
The embodiment of the invention can quickly inform the image rotation processor whether to rotate the image, meets the requirements of users on realizing automation and intellectualization of image rotation, and has lower software and hardware cost.
Referring to fig. 17, a schematic structural diagram of an image processing system according to an embodiment of the present invention is shown, where the system according to an embodiment of the present invention specifically includes: the imaging device comprises an imaging device 1 and a supporting device 2 for supporting the imaging device, wherein the imaging device 1 is in data connection with the supporting device 2, the imaging device 1 comprises a processor, and the supporting device 2 comprises a sensor for sensing the rotation of the supporting device; wherein,
the processor is used for determining the position state of the imaging device according to the rotation angle information of the supporting equipment when the image is acquired; if the position state indicates that the imaging device is in a rotated position state after rotation, rotating the acquired image according to a preset rotation rule; and outputting the image after the rotation operation is performed.
Further optionally, the processor is specifically configured to acquire rotation angle information of a supporting device used for mounting the imaging apparatus; and if the acquired rotation angle information of the supporting equipment reaches a preset angle threshold, determining that the position state of the imaging device is a rotation position state representing that the imaging device is in rotation.
Further optionally, the processor is specifically configured to acquire rotation angle information of a supporting device mounted with the imaging apparatus from a rotation angle sensor configured in the supporting device; alternatively, the rotation angle information of the support device is acquired from a rotation angle sensor that is external to the support device of the imaging apparatus and detects the rotation angle of the support device.
In the embodiment of the present invention, the specific implementations of the apparatus, the device, and the processor may refer to the related descriptions in the method, the related apparatus, and the processor, which are not described herein again.
The embodiment of the invention can rotate the shot image according to the rotation state of the imaging device, meets the automatic and intelligent requirements of users on image rotation, and has lower realization cost.
Referring to fig. 18, it is a schematic structural diagram of an image processing system according to an embodiment of the present invention, where the system according to the embodiment of the present invention includes: an imaging device 3 and a moving object 4 for supporting the imaging device, the imaging device 3 being in data communication with the moving object 4, the imaging device 3 comprising a processor, the moving object 4 comprising a sensor for sensing rotation of the moving object; wherein,
the processor is used for determining the position state of the imaging device according to the rotation angle information of the moving object when the image is acquired; if the position state indicates that the imaging device is in a rotated position state after rotation, rotating the acquired image according to a preset rotation rule; and outputting the image after the rotation operation is performed.
Further optionally, the processor is specifically configured to acquire rotation angle information of a moving object on which the imaging device is mounted; and if the acquired rotation angle information of the moving object reaches a preset second angle threshold, determining that the position state of the imaging device is a rotation position state representing that the imaging device is in a rotated state.
Further optionally, the processor is specifically configured to acquire rotation angle information of the moving object from a rotation angle sensor configured in the moving object on which the imaging device is mounted; alternatively, the rotation angle information of the moving object is acquired from a rotation angle sensor that is external to the moving object of the imaging device and that detects the moving object.
In the embodiment of the present invention, the specific implementation of the apparatus, the mobile object, and the processor may refer to the above method, the related apparatus, and the related description in the processor, which are not repeated herein.
The embodiment of the invention can rotate the shot image according to the rotation state of the imaging device, meets the automatic and intelligent requirements of users on image rotation, and has lower realization cost.
In the embodiments provided in the present invention, it should be understood that the disclosed related devices and methods can be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. 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 invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit 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 invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer processor (processor) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes performed by the present specification and drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.