CN110730301A - Head adjusting method and device, electronic equipment and storage medium - Google Patents

Head adjusting method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN110730301A
CN110730301A CN201910971943.1A CN201910971943A CN110730301A CN 110730301 A CN110730301 A CN 110730301A CN 201910971943 A CN201910971943 A CN 201910971943A CN 110730301 A CN110730301 A CN 110730301A
Authority
CN
China
Prior art keywords
machine head
preset range
zone bit
posture
handpiece
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
CN201910971943.1A
Other languages
Chinese (zh)
Other versions
CN110730301B (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.)
Zhejiang Hande Robot Co Ltd
Shenzhen Schroder Industry Group Co Ltd
Original Assignee
Zhejiang Hande Robot Co Ltd
Shenzhen Schroder Industry Group Co 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 Zhejiang Hande Robot Co Ltd, Shenzhen Schroder Industry Group Co Ltd filed Critical Zhejiang Hande Robot Co Ltd
Priority to CN201910971943.1A priority Critical patent/CN110730301B/en
Publication of CN110730301A publication Critical patent/CN110730301A/en
Application granted granted Critical
Publication of CN110730301B publication Critical patent/CN110730301B/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/68Control of cameras or camera modules for stable pick-up of the scene, e.g. compensating for camera body vibrations
    • 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

Abstract

The application provides a method and a device for adjusting a machine head, electronic equipment and a storage medium, wherein the method comprises the following steps: detecting whether a machine head corner of the terminal equipment is within a first preset range; if the nose corner of the terminal equipment is within the first preset range, detecting a nose zone bit of the terminal equipment, wherein the nose zone bit comprises a first zone bit and a second zone bit; the second preset range is smaller than the first preset range; if the machine head zone bit is the first zone bit, determining not to adjust the machine head; and if the machine head zone bit is the second zone bit, judging whether the machine head corner of the terminal equipment is within a second preset range, and adjusting the machine head according to a judgment result. The machine head is adjusted by detecting the machine head zone bit. Therefore, the number of times of adjusting the machine head can be effectively reduced on the premise of ensuring the certain level of the machine head, so that the video picture of the machine head is clearer and more stable.

Description

Head adjusting method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of electronic technologies, and in particular, to a method and an apparatus for adjusting a head, an electronic device, and a storage medium.
Background
The crawler needs to obtain a high-quality viewing field in the crawling process, and even if the crawler meets the condition that the ground is uneven, the machine head needs to be kept parallel to the ground, so that the crawler can conveniently observe and obtain video images with stable levels. In order to keep the handpiece in the horizontal mode all the time, whether the handpiece angle is in the horizontal angle range needs to be continuously judged.
According to the traditional machine head adjusting method, when the angle of the machine head slightly exceeds the horizontal angle range, the angle of the machine head can be adjusted, so that a video picture obtained through a camera arranged in the machine head is easy to shake and blur, the watching requirement cannot be met, and the observation accuracy is influenced.
Disclosure of Invention
An object of the embodiments of the present application is to provide a method and an apparatus for adjusting a handpiece, an electronic device, and a storage medium, so as to solve the problem that the conventional handpiece is too sensitive to adjust and a video image obtained by a camera in the handpiece is easy to shake.
In a first aspect, an embodiment of the present application provides a method for adjusting a head, including: detecting whether a machine head rotation angle of the terminal equipment is within a first preset range, wherein the machine head rotation angle is a deflection angle between a current posture and a horizontal posture of a machine head; if the machine head corner of the terminal equipment is within the first preset range, detecting a machine head zone bit of the terminal equipment, wherein the machine head zone bit comprises a first zone bit and a second zone bit, the first zone bit represents a posture that the machine head is adjusted to the horizontal posture by the previous machine head adjustment in a second preset range, and the second zone bit represents a posture that the machine head is adjusted to the horizontal posture by the previous machine head adjustment in the second preset range; the second preset range is smaller than the first preset range; if the machine head zone bit is the first zone bit, determining not to adjust the machine head; and if the machine head zone bit is the second zone bit, judging whether the machine head corner of the terminal equipment is within a second preset range, and adjusting the machine head according to a judgment result.
The embodiment of the application selects different adjusting modes to adjust the machine head by detecting the zone bit of the machine head. Therefore, the number of times of adjusting the machine head can be effectively reduced on the premise of ensuring the certain degree of the machine head, so that the video pictures acquired by the camera in the machine head are clearer and more stable, and the observation accuracy is improved.
Further, the adjusting the machine head according to the judgment result comprises: if the machine head rotation angle of the terminal equipment is not within the second preset range, adjusting the machine head to a posture of which the deflection angle between the machine head and the horizontal posture is within the second preset range; and if the machine head rotation angle of the terminal equipment is within the second preset range, determining not to adjust the machine head, and setting the machine head zone bit as a first zone bit.
This application embodiment is through adjusting the aircraft nose to the second within range that predetermines for the aircraft nose is in the horizontality, sets up the aircraft nose sign into first zone bit simultaneously, makes the follow-up setting that can reduce the adjustment to the aircraft nose to a certain extent according to the aircraft nose zone bit, guarantees that the video picture that obtains can be clearly stable.
Further, after detecting whether the nose rotation angle of the terminal device is within a first preset range, the method further includes: and if the machine head rotating angle of the terminal equipment is not within the first preset range, adjusting the machine head to a posture of which the deflection angle between the machine head and the horizontal posture is within the first preset range, and setting the machine head zone bit as a second zone bit.
The embodiment of the application judges whether the posture of the machine head needs to be adjusted by detecting whether the rotating angle of the machine head is in a first preset range or not under the horizontal state of the machine head at a certain degree, and sets the machine head zone bit as the second zone bit if necessary so as to enable the posture of the machine head to be subsequently adjusted and ensure that the acquired video picture is in the horizontal state at a certain degree.
Further, the method further comprises: after a reset instruction for resetting the machine head of the terminal equipment is received, the machine head is adjusted to a posture, wherein the deflection angle between the machine head and the horizontal posture is within a second preset range; and setting the machine head zone bit as a first zone bit.
According to the embodiment of the application, after the reset instruction is received, the machine head is adjusted to be in the approximately horizontal posture, and the machine head zone bit is set to be the first zone bit, so that when the quality of the obtained video picture does not meet the watching requirement, the machine head can be adjusted to be in the range of the horizontal posture through the reset instruction, and the quality of the video picture is guaranteed to meet the requirement.
Further, the adjusting the handpiece to a posture in which a deflection angle between the handpiece and the horizontal posture is within a second preset range includes: judging whether the machine head corner is within a first preset range or not; if the machine head corner is within a first preset range, adjusting the machine head to the direction that the machine head corner exceeds the first preset range, and executing the step of judging whether the machine head corner is within the first preset range; if the nose corner is not within a first preset range, detecting a nose direction state, wherein the nose direction state represents the direction of a deflection angle between the current posture and the horizontal posture of the nose; if the direction state of the machine head is positive, the machine head is adjusted anticlockwise to a posture, the deflection angle between the machine head and the horizontal posture is within a second preset range; and if the direction state of the machine head is reverse, clockwise adjusting the machine head to a posture of which the deflection angle between the machine head and the horizontal posture is within a second preset range.
When the handpiece is adjusted after the reset instruction is received, the handpiece can be adjusted to be out of the first preset range, and then the direction of the handpiece is set and adjusted according to the reverse state of the handpiece, so that the situation that the acquired video picture is inverted due to the inversion of the handpiece after the handpiece is adjusted is prevented.
Further, when the machine head is adjusted, the direction state of the machine head is detected, and the rotating direction for adjusting the machine head is determined according to the direction state of the machine head; wherein the handpiece orientation state characterizes a direction of a deflection angle between the handpiece current attitude and a horizontal attitude; when the direction state of the machine head is positive, determining to adjust the machine head in a counterclockwise direction; and when the direction state of the machine head is reverse, determining to adjust the machine head according to the clockwise direction.
The embodiment of the application can also determine the adjusting direction of the machine head through the direction state of the machine head in the adjusting process of the machine head, so that the machine head is prevented from being inverted in the adjusting process, the video picture acquired by the picture can be clearer, and the follow-up checking according to the video picture is convenient.
In a second aspect, an embodiment of the present application provides a handpiece adjusting device, including: the first detection module is used for detecting whether a machine head rotation angle of the terminal equipment is within a first preset range, wherein the machine head rotation angle is a deflection angle between a current posture and a horizontal posture of a machine head; when the machine head rotation angle of the terminal equipment is within the first preset range, a second detection module is used for detecting a machine head zone bit of the terminal equipment, wherein the machine head zone bit comprises a first zone bit and a second zone bit, the first zone bit represents a posture that the machine head is adjusted to the horizontal posture at the last time by machine head adjustment and the deflection angle between the machine head and the horizontal posture is within a second preset range, and the second zone bit represents a posture that the machine head is not determined to be adjusted to the horizontal posture at the last time by machine head adjustment and the deflection angle between the machine head and the horizontal posture is within the second preset range; the second preset range is smaller than the first preset range; when the machine head zone bit is the first zone bit, the adjusting module is used for determining that machine head adjustment is not performed; and when the machine head zone bit is the second zone bit, the adjusting module is used for judging whether the machine head corner of the terminal equipment is within a second preset range or not, and adjusting the machine head according to the judgment result.
The embodiment of the application detects the zone bit of the machine head by setting the detection module, and selects different adjusting modes to adjust the machine head. Therefore, the number of times of adjusting the machine head by the adjusting module can be effectively reduced on the premise of ensuring the certain level of the machine head, so that the video pictures acquired by the camera in the machine head are clearer and more stable, and the observation accuracy is improved.
Further, the adjusting module is specifically configured to: when the machine head rotation angle of the terminal equipment is not within the second preset range, the machine head is adjusted to a posture of which the deflection angle between the machine head and the horizontal posture is within the second preset range; and when the machine head rotation angle of the terminal equipment is within the second preset range, determining not to adjust the machine head, and setting the machine head zone bit as a first zone bit.
This application embodiment is through setting up the adjusting module, with the aircraft nose adjustment to the second within range that predetermines for the aircraft nose is in the horizontality, sets up the aircraft nose sign into first zone bit simultaneously, makes follow-up setting that can be according to the aircraft nose zone bit, reduces the adjustment to the aircraft nose to a certain extent, guarantees that the video picture that obtains can be clear stable.
In a third aspect, an embodiment of the present application further provides an electronic device, including: the system comprises a processor, a memory and a bus, wherein the processor and the memory are communicated with each other through the bus; the memory stores program instructions executable by the processor, which when called by the processor are capable of performing the methods described above.
In a fourth aspect, the present application also provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform the above-mentioned method.
Additional features and advantages of the present application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the embodiments of the present application.
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 of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 is a schematic flow chart of a method for adjusting a head according to an embodiment of the present disclosure;
fig. 2 is a schematic front view of a handpiece according to an embodiment of the present disclosure;
fig. 3 is a schematic flow chart of another method for adjusting a handpiece according to an embodiment of the present disclosure;
fig. 4 is a schematic flow chart of a further method for adjusting a head according to an embodiment of the present disclosure;
FIG. 5 is a schematic diagram of a handpiece adjustment according to a handpiece orientation state according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a machine head adjusting device according to an embodiment of the present disclosure;
fig. 7 is a block diagram of an electronic device applicable to the embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. Meanwhile, in the description of the present application, the terms "first", "second", and the like are used only for distinguishing the description, and are not to be construed as indicating or implying relative importance.
In the working process of the crawler, the ground is possibly uneven, the condition that one end of the crawler is unbalanced can occur, meanwhile, the machine head rotates along with the balance change of the crawler, and at the moment, in order to enable the machine head to be kept in a horizontal mode all the time, whether the angle of the machine head is in the horizontal angle range needs to be continuously judged.
Fig. 1 is a schematic flowchart of a machine head adjustment method provided in an embodiment of the present application, where the machine head adjustment method includes:
step 110: whether the machine head rotation angle of the terminal equipment is within a first preset range is detected.
Step 120: and if the nose corner of the terminal equipment is within the first preset range, detecting the nose zone bit of the terminal equipment.
It should be noted that the handpiece is arranged on the terminal device, and the handpiece can acquire the picture in the environment where the terminal device is located, so that the environment can be detected. The terminal device may be configured as an electronic device with high mobility, such as a crawler, a mobile robot, and the like, and the specific type of the terminal device is not limited, and may be set according to actual requirements. The traditional machine head is too sensitive to adjust, and the machine head is continuously adjusted. Therefore, pictures acquired by the camera in the machine head are changed all the time, so that the camera is focused all the time, finally acquired video pictures are unclear and are shaken all the time, and the requirement of observing through the video pictures cannot be met.
In the optional implementation process of the application, whether the nose corner needs to be adjusted or not can be judged for the first time by detecting whether the nose corner is in a first preset range or not, and the previous adjustment process of the nose is represented by setting the nose zone bit, so that how to adjust the nose can be judged according to the nose zone bit and the nose corner in the following process.
The machine head rotating angle is a deflection angle between the current posture and the horizontal posture of the machine head. When the machine head is in a horizontal posture, the machine head is parallel to the ground, namely, an image acquired by the machine head is parallel to the ground.
Meanwhile, the nose rotation angle can be acquired by a gravity sensor provided in the nose. The gravity sensor can adopt a single-shaft angle sensor, and the gravity sensor needs to be balanced with the measuring platform during measurement. By collecting signals output by the single-axis sensor, the inclination angle of the gravity sensor relative to the horizontal direction can be obtained. The gravity sensor can calculate the inclination angle of the equipment relative to the horizontal plane by sensing gravity. Fig. 2 is a schematic front view of a handpiece according to an embodiment of the present disclosure, and as shown in fig. 2, an angle a may be regarded as an inclination angle of a device sensed by a gravity sensor with respect to a horizontal plane when the handpiece is in a horizontal posture. The angle b can be regarded as the angle of inclination of the device relative to the horizontal, as sensed by the gravity sensor, in the current attitude of the handpiece.
It is worth mentioning that historical adjustment conditions of the machine head can be represented by setting a machine head flag bit, and subsequent adjustment of the machine head is determined according to the historical adjustment conditions of the machine head. The machine head zone bits comprise a first zone bit and a second zone bit, and the first zone bit represents the posture of the machine head which is adjusted to the horizontal posture by the machine head regulation last time and the deflection angle of the machine head is within a second preset range. The second zone bit represents a posture in which the previous time of adjusting the machine head to adjust the machine head to a deflection angle between the machine head and the horizontal posture is within a second preset range.
The second preset range is smaller than the first preset range, when the rotation angle of the machine head is within the second preset range, the machine head can be represented to be in a horizontal state, at the moment, the pictures obtained through the machine head are relatively parallel, and the picture quality can meet the requirements in the direction. When the aircraft nose corner is in first preset within range, can characterize the aircraft nose and be in approximate horizontality, then need look over the aircraft nose flag bit and judge whether follow-up still need adjust the aircraft nose this moment. The first preset range may be [ -10 °,10 ° ], and the corresponding second preset range may be [ -2 °,2 ° ]; the first predetermined range may be [ -8 °,8 ° ], and the corresponding second predetermined range may be [ -3 °,3 ° ]. The specific first preset range and the second preset range are not limited, and can be adjusted according to actual handpiece adjustment requirements.
Step 130: and if the machine head zone bit is the first zone bit, determining not to adjust the machine head.
In an alternative implementation of the present application, when the nose flag is the first flag, it is clear that the nose has been adjusted to the horizontal state last time, and that the rotation angle of the nose has not changed excessively thereafter, and it is considered that even though the nose rotation angle may slightly exceed the first preset range, the nose rotation angle does not exceed the second preset range, that is, the nose is still in the substantially horizontal state. The picture that the aircraft nose acquireed can also satisfy the observation demand, if carry out the aircraft nose regulation this moment and probably cause the picture change that acquires for the camera in the aircraft nose focuses repeatedly. But rather results in a unclear picture. Therefore, the adjustment of the machine head is determined not to be carried out, so that the stable and clear picture acquired by the machine head is ensured.
Step 140: and if the machine head zone bit is the second zone bit, judging whether the machine head corner of the terminal equipment is within a second preset range, and adjusting the machine head according to a judgment result.
In an optional implementation process of the present application, when the handpiece flag is the second flag, it cannot be determined whether the handpiece is adjusted to the horizontal state last time. Before, the rotation angle of the machine head possibly exceeds the first preset range, namely the machine head is not in a roughly horizontal state any more, but the rotation angle of the machine head is adjusted to be within the first preset range and does not reach the second preset range, and the adjustment is needed again to enable the machine head to enter the horizontal state again, so that the acquired picture level is ensured.
Therefore, the embodiment of the application selects different adjusting modes to adjust the machine head by detecting the zone bit of the machine head. The number of times that the aircraft nose was adjusted can be reduced effectively under the prerequisite of guaranteeing aircraft nose certain degree level for the video picture that acquires through the camera in the aircraft nose is more clear stable, improves the accuracy of observing.
Fig. 3 is a schematic flow chart of another method for adjusting a handpiece according to an embodiment of the present application, where step 140 includes:
step 141: and if the machine head rotating angle of the terminal equipment is not within the second preset range and the machine head zone bit is the second zone bit, adjusting the machine head to a posture with the deflection angle between the machine head and the horizontal posture within the second preset range.
Step 142: and if the machine head corner of the terminal equipment is within the second preset range and the machine head zone bit is the second zone bit, determining not to adjust the machine head and setting the machine head zone bit as the first zone bit.
In an optional implementation of the present application, after determining that the handpiece flag is the second flag, it is also determined that the handpiece needs to be adjusted to the horizontal state. It may be determined whether the nose rotation angle is within a second predetermined range. If the machine head rotating angle is not in the second preset range, the machine head rotating angle is adjusted to be in the first preset range, and machine head adjustment is needed, so that the machine head rotating angle is in the second preset range, and the machine head is in a horizontal state.
If the machine head rotating angle is within the second preset range, the machine head rotating angle is adjusted to be within the second preset range, the machine head rotating angle is within the second preset range, machine head adjustment is not needed again, and meanwhile, the machine head zone bit can be set to be the first zone bit to indicate that the machine head is adjusted in place and is in a horizontal state. Therefore, the machine head is in a horizontal state, and the subsequent pictures acquired by the machine head can meet the observation requirements.
It should be noted that in the process of executing the step 141 of adjusting the handpiece to the posture in which the deflection angle between the handpiece and the horizontal posture is within the second preset range, at least one handpiece adjustment may be repeatedly performed. After each adjustment of the handpiece, the step of determining whether the handpiece rotation angle of the terminal device is within the second preset range in step 140 may be performed to determine whether the adjustment is completed. And executing step 142 until the step of judging whether the machine head rotation angle of the terminal device is within the second preset range is executed after the machine head is adjusted, and the machine head rotation angle is within the second preset range.
With continuing reference to fig. 3 on the basis of the above embodiment, after step 110, the method further includes:
step 150: and if the machine head rotating angle of the terminal equipment is not within the first preset range, adjusting the machine head to a posture of which the deflection angle between the machine head and the horizontal posture is within the first preset range, and setting the machine head zone bit as a second zone bit.
In an optional implementation process of the application, after whether the nose rotation angle needs to be adjusted is judged for the first time by detecting whether the nose rotation angle is within a first preset range. If the rotating angle of the machine head is not within the first preset range, the machine head is not in a roughly horizontal state, and at the moment, the picture acquired by the machine head is not parallel to the horizontal plane, so that the observation through the picture is difficult. Therefore, the machine head needs to be adjusted to adjust the machine head rotation angle to be within the first preset range, so that the machine head enters a substantially horizontal state first, and the quality of the acquired picture is ensured. And meanwhile, the machine head zone bit is set to be a second zone bit, so that the machine head can be adjusted again in the following process, and the machine head is ensured to enter a horizontal state.
It should be noted that in the process of executing the step 150 of adjusting the handpiece to the posture in which the deflection angle between the handpiece and the horizontal posture is within the second preset range, at least one handpiece adjustment may be repeatedly performed. After each adjustment of the handpiece, the step of detecting whether the handpiece rotation angle of the terminal device is within the first preset range in step 110 may be performed to determine whether the adjustment is completed. And executing step 120 until the step of detecting whether the machine head rotation angle of the terminal device is within the first preset range is executed after the machine head is adjusted, and the machine head rotation angle is within the first preset range, so that the machine head is not adjusted.
Fig. 4 is a schematic flow chart of a further method for adjusting a handpiece according to an embodiment of the present application, where the method further includes:
step 410: after a reset instruction for resetting the machine head of the terminal equipment is received, the machine head is adjusted to a posture, wherein the deflection angle between the machine head and the horizontal posture is within a second preset range.
Step 420: and setting the machine head zone bit as a first zone bit.
In the optional implementation process of the application, when the operator acquires the picture through the head of the terminal device, in some special scenes, such as a place which is difficult to observe, and when the crawler is just started, the picture level is still required to be the most important index. The resetting of the handpiece can be performed by sending a reset command, namely: and adjusting the machine head to enable the machine head corner to be within a second preset range, keeping the machine head horizontal, ensuring the image level acquired by the machine head, and meeting the application requirement of a special scene.
Meanwhile, the machine head zone bit can be set to be the first zone bit, the representation shows that after the machine head is adjusted, the machine head is in the horizontal state when the machine head rotating angle is within the second preset range.
On the basis of the above embodiment, in the step 410, it may be determined whether the nose rotation angle is within a first preset range. And if the machine head rotating angle is within a first preset range, adjusting the machine head to the direction that the machine head rotating angle exceeds the first preset range, and executing the step of judging whether the machine head rotating angle is within the first preset range. And if the machine head rotating angle is not within a first preset range, detecting a machine head direction state, wherein the machine head direction state represents the direction of a deflection angle between the current posture and the horizontal posture of the machine head. If the direction state of the machine head is positive, the machine head is adjusted anticlockwise to a posture, the deflection angle between the machine head and the horizontal posture is within a second preset range; and if the direction state of the machine head is reverse, clockwise adjusting the machine head to a posture of which the deflection angle between the machine head and the horizontal posture is within a second preset range.
Because the measuring mode of the machine head rotation angle is that the collected machine head rotation angle is between [ -90,90], the condition that the machine head picture is turned over when the mobile equipment is initialized but the machine head rotation angle is in the first preset angle range can also occur.
In the optional implementation process of the application, after the reset instruction is received, whether the frame angle of the machine head is within a first preset range can be judged in advance, so that the effect of judging whether the frame of the machine head is turned over or not can be achieved. And if the machine head rotating angle is within the first preset range, adjusting the machine head, and adjusting the machine head rotating angle to be out of the first preset range so as to prevent the machine head picture from turning over, but the machine head rotating angle is within the first preset angle range. If the machine head rotating angle is not within the first preset range, detecting the machine head direction state, and if the machine head direction state is positive, performing machine head adjustment anticlockwise to enable the machine head rotating angle to be within the second preset range and enable the machine head picture not to be turned over. If the direction state of the machine head is reverse, the machine head is adjusted clockwise, so that the rotating angle of the machine head is in a second preset range, and the picture of the machine head is not turned over.
Wherein the handpiece orientation state characterizes a direction of a deflection angle between the current attitude and the horizontal attitude of the handpiece. Assuming that the horizontal posture of the handpiece is taken as a standard, the deflection angle between the forward direction representation current posture of the handpiece direction state and the horizontal posture is [ k pi, (k +1) pi ], the deflection angle between the reverse direction representation current posture and the horizontal posture of the handpiece direction state is [ (k-1) pi, k pi ], wherein k is an integer.
It is worth to be noted that, the judgment of whether the frame of the machine head is turned over can be realized by adjusting the machine head according to the preset direction and determining whether the frame of the machine head is turned over according to the change condition of the angle of the machine head. Taking the case of adjusting the machine head in the counterclockwise direction, if the numerical value of the machine head angle measured at intervals of preset time length is reduced, determining that the machine head picture is not turned over; and if the numerical value of the handpiece angle obtained by measuring the interval preset time length is increased, determining that the handpiece picture is turned over. Similarly, taking the example of adjusting the machine head in the clockwise direction, if the numerical value of the machine head angle obtained by measuring at intervals of the preset time length is increased, determining that the machine head picture is not turned over; and if the numerical value of the handpiece angle measured at the preset time interval is smaller, determining that the handpiece picture is turned over.
For example, fig. 5 is a schematic diagram of adjusting the handpiece according to the handpiece orientation state according to the embodiment of the present application, assuming that the first predetermined range is [ -10 °,10 ° ], and the second predetermined range is [ -2 °,2 ° ], if and only if the handpiece rotation angle is within the range of p, the handpiece image is not flipped. As shown in fig. 5, if the handpiece rotation angle is-2 ° when receiving the reset instruction, the handpiece screen is in the turning state, and if the handpiece adjustment is not performed in advance, the subsequently acquired handpiece screens are all in the turning state. And adjusting the machine head, namely adjusting the machine head corner to be outside a first preset range, namely-30 degrees when the machine head corner is y, judging the machine head direction state, namely-30 degrees when the machine head is deviated from the horizontal posture, reversing the machine head direction state, clockwise adjusting the machine head until the machine head corner is-2 degrees when the machine head picture is in a non-turnover state, and stopping adjusting the machine head.
On the basis of the embodiment, when the machine head is adjusted, the direction state of the machine head is detected, and the rotating direction for adjusting the machine head is determined according to the direction state of the machine head; wherein the handpiece orientation state characterizes a direction of a deflection angle between the handpiece current attitude and a horizontal attitude; when the direction state of the machine head is positive, determining to adjust the machine head in a counterclockwise direction; and when the direction state of the machine head is reverse, determining to adjust the machine head according to the clockwise direction.
In the optional implementation of this application, at the in-process that carries out the aircraft nose and adjust, can determine the direction of rotation that the aircraft nose adjusted through aircraft nose direction state earlier, carry out the adjustment of aircraft nose again, prevent that the aircraft nose from inverting for the condition of the picture upset that obtains through the aircraft nose takes place. The direction state of the machine head and the direction for adjusting the machine head correspond to the above, and the details are not described herein.
It should be noted that the image obtained by the machine head can be rotated to turn over the image and prevent the image from being inverted, so that the processed image is parallel to the horizontal plane, and the processed image can be conveniently observed in the subsequent process.
Fig. 6 is a schematic structural diagram of a head adjusting device according to an embodiment of the present application, and based on the same inventive concept, the embodiment of the present application further provides a head adjusting device 600, including: the first detecting module 610 is configured to detect whether a machine head rotation angle of the terminal device is within a first preset range, where the machine head rotation angle is a deflection angle between a current posture and a horizontal posture of the machine head. When the nose rotation angle of the terminal device is within the first preset range, the second detection module 620 is configured to detect a nose marker bit of the terminal device, where the nose marker bit includes a first marker bit and a second marker bit, the first marker bit represents a posture where a nose is adjusted to a deflection angle with the horizontal posture in a second preset range by the previous nose adjustment, and the second marker bit represents a posture where the nose is adjusted to a deflection angle with the horizontal posture in the second preset range by the previous nose adjustment is not determined; the second preset range is smaller than the first preset range. When the head flag is the first flag, the adjusting module 630 is configured to determine not to perform head adjustment. When the nose flag is the second flag, the adjusting module 630 is configured to determine whether the nose rotation angle of the terminal device is within a second preset range, and adjust the nose according to the determination result.
On the basis of the foregoing embodiment, the adjusting module 630 is specifically configured to: when the machine head rotation angle of the terminal equipment is not within the second preset range, the machine head is adjusted to a posture of which the deflection angle between the machine head and the horizontal posture is within the second preset range; and when the machine head rotation angle of the terminal equipment is within the second preset range, determining not to adjust the machine head, and setting the machine head zone bit as a first zone bit.
On the basis of the above embodiment, the apparatus further includes: when the machine head rotation angle of the terminal equipment is not within the first preset range, the initial adjusting module is used for adjusting the machine head to a posture with a deflection angle between the machine head and the horizontal posture within the first preset range, and setting the machine head zone bit as a second zone bit.
On the basis of the above embodiment, the apparatus further includes: after a reset instruction for resetting the machine head of the terminal equipment is received, the reset module is used for adjusting the machine head to a posture of which the deflection angle between the machine head and the horizontal posture is within a second preset range; and setting the machine head zone bit as a first zone bit.
On the basis of the above embodiment, the reset module is specifically configured to: judging whether the machine head corner is within a first preset range or not; if the machine head corner is within a first preset range, adjusting the machine head to the direction that the machine head corner exceeds the first preset range, and executing the step of judging whether the machine head corner is within the first preset range; if the nose corner is not within a first preset range, detecting a nose direction state, wherein the nose direction state represents the direction of a deflection angle between the current posture and the horizontal posture of the nose; if the direction state of the machine head is positive, the machine head is adjusted anticlockwise to a posture, the deflection angle between the machine head and the horizontal posture is within a second preset range; and if the direction state of the machine head is reverse, clockwise adjusting the machine head to a posture of which the deflection angle between the machine head and the horizontal posture is within a second preset range.
On the basis of the above embodiment, when the handpiece is adjusted, the direction setting module is used for detecting the handpiece direction state, and determining the rotation direction for adjusting the handpiece according to the handpiece direction state; wherein the handpiece orientation state characterizes a direction of a deflection angle between the handpiece current attitude and a horizontal attitude; when the direction state of the machine head is positive, determining to adjust the machine head in a counterclockwise direction; and when the direction state of the machine head is reverse, determining to adjust the machine head according to the clockwise direction.
The embodiment of the present application provides a handpiece adjustment apparatus 600 for executing the above method, and the specific implementation manner thereof is consistent with the implementation manner of the handpiece adjustment method, and is not described herein again.
Referring to fig. 7, fig. 7 is a block diagram illustrating a structure of an electronic device 10 applicable to the embodiment of the present application. The electronic device 10 may include a memory 101, a memory controller 102, a processor 103, a peripheral interface 104, an input-output unit 105, a display unit 107.
The memory 101, the memory controller 102, the processor 103, the peripheral interface 104, the input/output unit 105, and the display unit 107 are electrically connected to each other directly or indirectly to implement data transmission or interaction. For example, the components may be electrically connected to each other via one or more communication buses or signal lines. At least one software or firmware (firmware) is stored in the memory 101 or a software function module solidified in an Operating System (OS). The processor 103 is used to execute executable modules, software functional modules or computer programs stored in the memory 101.
The Memory 101 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like. The memory 101 is configured to store a program, and the processor 103 executes the program after receiving an execution instruction, and the method disclosed in any of the foregoing embodiments of the present application may be applied to the processor 103, or implemented by the processor 103.
The processor 103 may be an integrated circuit chip having signal processing capabilities. The Processor 103 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor 103 may be any conventional processor or the like.
The peripheral interface 104 couples various input/output devices to the processor 103 as well as to the memory 101. In some embodiments, the peripheral interface 104, the processor 103, and the memory controller 102 may be implemented in a single chip. In other examples, they may be implemented separately from the individual chips.
The input/output unit 105 is used for providing input data to a user to enable the user to interact with the electronic device 10. The input/output unit 105 may be, but is not limited to, a mouse, a keyboard, and the like.
The display unit 107 provides an interactive interface (e.g., a user interface) between the electronic device 10 and a user or for displaying image data to a user reference. In this embodiment, the display unit 107 may be a liquid crystal display or a touch display. In the case of a touch display, the display can be a capacitive touch screen or a resistive touch screen, which supports single-point and multi-point touch operations. Supporting single-point and multi-point touch operations means that the touch display can sense touch operations simultaneously generated from one or more positions on the touch display, and the sensed touch operations are sent to the processor 103 for calculation and processing.
It will be appreciated that the configuration shown in FIG. 7 is merely illustrative and that the electronic device 10 may include more or fewer components than shown in FIG. 7 or may have a different configuration than shown in FIG. 7. The components shown in fig. 7 may be implemented in hardware, software, or a combination thereof.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working process of the apparatus described above may refer to the corresponding process in the foregoing method, and will not be described in too much detail herein.
In summary, the embodiments of the present application provide a method and an apparatus for adjusting a head, an electronic device, and a storage medium, where the method includes: detecting whether a machine head rotation angle of the terminal equipment is within a first preset range, wherein the machine head rotation angle is a deflection angle between a current posture and a horizontal posture of a machine head; if the machine head corner of the terminal equipment is within the first preset range, detecting a machine head zone bit of the terminal equipment, wherein the machine head zone bit comprises a first zone bit and a second zone bit, the first zone bit represents a posture that the machine head is adjusted to the horizontal posture by the previous machine head adjustment in a second preset range, and the second zone bit represents a posture that the machine head is adjusted to the horizontal posture by the previous machine head adjustment in the second preset range; the second preset range is smaller than the first preset range; if the machine head zone bit is the first zone bit, determining not to adjust the machine head; and if the machine head zone bit is the second zone bit, judging whether the machine head corner of the terminal equipment is within a second preset range, and adjusting the machine head according to a judgment result. The embodiment of the application selects different adjusting modes to adjust the machine head by detecting the zone bit of the machine head. Therefore, the number of times of adjusting the machine head can be effectively reduced on the premise of ensuring the certain degree of the machine head, so that the video pictures acquired by the camera in the machine head are clearer and more stable, and the observation accuracy is improved.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or 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 of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
In addition, 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.
Furthermore, the functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
It should be noted that the functions, if implemented in the form of software functional modules and sold or used as independent products, 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: 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.
In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (10)

1. A method of adjusting a handpiece, comprising:
detecting whether a machine head rotation angle of the terminal equipment is within a first preset range, wherein the machine head rotation angle is a deflection angle between a current posture and a horizontal posture of a machine head;
if the machine head corner of the terminal equipment is within the first preset range, detecting a machine head zone bit of the terminal equipment, wherein the machine head zone bit comprises a first zone bit and a second zone bit, the first zone bit represents a posture that the machine head is adjusted to the horizontal posture by the previous machine head adjustment in a second preset range, and the second zone bit represents a posture that the machine head is adjusted to the horizontal posture by the previous machine head adjustment in the second preset range; the second preset range is smaller than the first preset range;
if the machine head zone bit is the first zone bit, determining not to adjust the machine head;
and if the machine head zone bit is the second zone bit, judging whether the machine head corner of the terminal equipment is within a second preset range, and adjusting the machine head according to a judgment result.
2. The handpiece adjustment method according to claim 1, wherein the handpiece adjustment according to the judgment result includes:
if the machine head rotation angle of the terminal equipment is not within the second preset range, adjusting the machine head to a posture of which the deflection angle between the machine head and the horizontal posture is within the second preset range;
and if the machine head rotation angle of the terminal equipment is within the second preset range, determining not to adjust the machine head, and setting the machine head zone bit as a first zone bit.
3. The handpiece adjustment method according to claim 1, characterized in that after the detection of whether the handpiece rotation angle of the terminal device is within a first preset range, the method further comprises:
and if the machine head rotating angle of the terminal equipment is not within the first preset range, adjusting the machine head to a posture of which the deflection angle between the machine head and the horizontal posture is within the first preset range, and setting the machine head zone bit as a second zone bit.
4. The handpiece adjustment method of claim 1, wherein the method further comprises:
after a reset instruction for resetting the machine head of the terminal equipment is received, the machine head is adjusted to a posture, wherein the deflection angle between the machine head and the horizontal posture is within a second preset range;
and setting the machine head zone bit as a first zone bit.
5. The handpiece adjustment method according to claim 4, wherein the adjusting the handpiece to a posture in which a deflection angle from the horizontal posture is within a second preset range includes:
judging whether the machine head corner is within a first preset range or not;
if the machine head corner is within a first preset range, adjusting the machine head to the direction that the machine head corner exceeds the first preset range, and executing the step of judging whether the machine head corner is within the first preset range;
if the nose corner is not within a first preset range, detecting a nose direction state, wherein the nose direction state represents the direction of a deflection angle between the current posture and the horizontal posture of the nose;
if the direction state of the machine head is positive, the machine head is adjusted anticlockwise to a posture, the deflection angle between the machine head and the horizontal posture is within a second preset range;
and if the direction state of the machine head is reverse, clockwise adjusting the machine head to a posture of which the deflection angle between the machine head and the horizontal posture is within a second preset range.
6. The handpiece adjustment method according to any one of claims 1 to 4, characterized in that, in the handpiece adjustment, a handpiece orientation state is detected, and a rotation direction in which the handpiece adjustment is performed is determined based on the handpiece orientation state;
wherein the handpiece orientation state characterizes a direction of a deflection angle between the handpiece current attitude and a horizontal attitude; when the direction state of the machine head is positive, determining to adjust the machine head in a counterclockwise direction; and when the direction state of the machine head is reverse, determining to adjust the machine head according to the clockwise direction.
7. A handpiece adjustment device, comprising:
the first detection module is used for detecting whether a machine head rotation angle of the terminal equipment is within a first preset range, wherein the machine head rotation angle is a deflection angle between a current posture and a horizontal posture of a machine head;
when the machine head rotation angle of the terminal equipment is within the first preset range, a second detection module is used for detecting a machine head zone bit of the terminal equipment, wherein the machine head zone bit comprises a first zone bit and a second zone bit, the first zone bit represents a posture that the machine head is adjusted to the horizontal posture at the last time by machine head adjustment and the deflection angle between the machine head and the horizontal posture is within a second preset range, and the second zone bit represents a posture that the machine head is not determined to be adjusted to the horizontal posture at the last time by machine head adjustment and the deflection angle between the machine head and the horizontal posture is within the second preset range; the second preset range is smaller than the first preset range;
when the machine head zone bit is the first zone bit, the adjusting module is used for determining that machine head adjustment is not performed;
and when the machine head zone bit is the second zone bit, the adjusting module is used for judging whether the machine head corner of the terminal equipment is within a second preset range or not, and adjusting the machine head according to the judgment result.
8. The handpiece adjustment device according to claim 7, wherein the adjustment module is specifically configured to:
when the machine head rotation angle of the terminal equipment is not within the second preset range, the machine head is adjusted to a posture of which the deflection angle between the machine head and the horizontal posture is within the second preset range;
and when the machine head rotation angle of the terminal equipment is within the second preset range, determining not to adjust the machine head, and setting the machine head zone bit as a first zone bit.
9. An electronic device, comprising: the system comprises a processor, a memory and a bus, wherein the processor and the memory are communicated with each other through the bus;
the memory stores program instructions executable by the processor, the processor invoking the program instructions to perform the method of any of claims 1-6.
10. A non-transitory computer-readable storage medium storing computer instructions that cause a computer to perform the method of any one of claims 1-6.
CN201910971943.1A 2019-10-14 2019-10-14 Head adjusting method and device, electronic equipment and storage medium Active CN110730301B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910971943.1A CN110730301B (en) 2019-10-14 2019-10-14 Head adjusting method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910971943.1A CN110730301B (en) 2019-10-14 2019-10-14 Head adjusting method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110730301A true CN110730301A (en) 2020-01-24
CN110730301B CN110730301B (en) 2021-06-04

Family

ID=69220138

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910971943.1A Active CN110730301B (en) 2019-10-14 2019-10-14 Head adjusting method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110730301B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150338211A1 (en) * 2014-05-26 2015-11-26 Xiaomi Inc. Method and terminal for measuring angle
CN106796481A (en) * 2016-09-27 2017-05-31 深圳市大疆创新科技有限公司 Control method, control device and electronic installation
CN106851567A (en) * 2017-01-16 2017-06-13 深圳拓邦股份有限公司 A kind of localization method, apparatus and system
CN108007474A (en) * 2017-08-31 2018-05-08 哈尔滨工业大学 A kind of unmanned vehicle independent positioning and pose alignment technique based on land marking
CN207390659U (en) * 2017-11-10 2018-05-22 苏州凌犀物联网技术有限公司 A kind of head inceptive positioning device
CN109525723A (en) * 2018-11-09 2019-03-26 Oppo广东移动通信有限公司 Electronic equipment, the method for adjustment of center of gravity, device and terminal device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150338211A1 (en) * 2014-05-26 2015-11-26 Xiaomi Inc. Method and terminal for measuring angle
CN106796481A (en) * 2016-09-27 2017-05-31 深圳市大疆创新科技有限公司 Control method, control device and electronic installation
CN106851567A (en) * 2017-01-16 2017-06-13 深圳拓邦股份有限公司 A kind of localization method, apparatus and system
CN108007474A (en) * 2017-08-31 2018-05-08 哈尔滨工业大学 A kind of unmanned vehicle independent positioning and pose alignment technique based on land marking
CN207390659U (en) * 2017-11-10 2018-05-22 苏州凌犀物联网技术有限公司 A kind of head inceptive positioning device
CN109525723A (en) * 2018-11-09 2019-03-26 Oppo广东移动通信有限公司 Electronic equipment, the method for adjustment of center of gravity, device and terminal device

Also Published As

Publication number Publication date
CN110730301B (en) 2021-06-04

Similar Documents

Publication Publication Date Title
JP6286442B2 (en) Method, apparatus, facility, program and recording medium for controlling rotation of screen screen
CN107357540B (en) Display direction adjusting method and mobile terminal
US8670023B2 (en) Apparatuses and methods for providing a 3D man-machine interface (MMI)
CN106558027B (en) Method for estimating deviation error in camera pose
EP3567572B1 (en) Screen flickering processing method, device, storage medium, and electronic device
CN108280828B (en) Camera assembly position detection method and device
US20170115732A1 (en) Position Locating Method and Apparatus
US20210084228A1 (en) Tracking shot method and device, and storage medium
US20140375698A1 (en) Method for adjusting display unit and electronic device
US9619707B2 (en) Gaze position estimation system, control method for gaze position estimation system, gaze position estimation device, control method for gaze position estimation device, program, and information storage medium
JP6672673B2 (en) Information processing apparatus, control method, and program
US20220058887A1 (en) Augmented reality system and anchor display method thereof
CN110730301B (en) Head adjusting method and device, electronic equipment and storage medium
US11740477B2 (en) Electronic device, method for controlling electronic device, and non-transitory computer readable storage medium
US9471960B2 (en) Display apparatus and method of controlling the same
TW201523425A (en) Desktop-like device and method for displaying user interface
US20200058101A1 (en) Image processing device, imaging device, terminal apparatus, image correction method, and image processing program
KR100472461B1 (en) Display device for discriminating abnormal image signal and method thereof
JP2016099361A (en) Display device, display method and image output device
US20190318166A1 (en) Vr wearable device and obstacle detecting method thereof
CN112740143A (en) Screen display content control method and device, electronic equipment and storage medium
US20160309086A1 (en) Electronic device and method
CN102945649A (en) Method for adjusting image display parameters of display terminal, and display terminal
WO2015045679A1 (en) Information device and control program
JPWO2017169909A1 (en) Work support apparatus, wearable terminal, work support method, and computer program

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