Earphone control method, earphone and storage medium
By integrating the image module and rotation mechanism in the headphones, identifying and avoiding the obstructions, the problem that the headphone shooting effect is affected by the obstructions is solved, and a better shooting effect is achieved.
Patent Information
- Application Number
- CN202411719004.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2044-11-27
AI Technical Summary
Due to the obstruction of obstacles, the shooting effect of the headphones is poor.
By setting an image module and a rotation mechanism in the headset, the image is collected and the type of occlusion is determined. If the occlusion is a evasable type, the rotation direction is determined based on the position information of the occlusion, and the rotation mechanism is controlled to drive the image module to rotate to reduce the area of the occlusion within the shooting range.
Effectively avoid covers and improve the shooting effect of wireless headphones.
Smart Images

Figure CN119562186A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of wireless earphones, and in particular to an earphone control method, an earphone, and a storage medium. Background Art
[0002] Wireless earbuds with integrated camera functionality have cameras mounted on them, allowing users to easily capture images from specific angles while wearing them. However, since the shooting position is fixed, users often find obstructed areas in the image after taking a shot. This can lead to poorer capture quality due to obstructions.
[0003] The above content is only used to assist in understanding the technical solution of this application and does not constitute an admission that the above content is prior art. Summary of the Invention
[0004] The main purpose of this application is to provide a method for controlling headphones, headphones, and a storage medium, aiming to solve the technical problem of poor shooting effects of headphones due to obstruction by obstacles.
[0005] To achieve the above objectives, this application proposes a control method for headphones, wherein at least one earphone unit of the headphones is provided with an image module, the image module being connected to the earphone unit via a rotating mechanism, and the method comprising:
[0006] Determining the type of the obstruction according to the image captured by the image module;
[0007] If the type of the obstruction is an avoidable obstruction, determining the rotation direction according to the position information of the obstruction;
[0008] The rotating mechanism is controlled to drive the image module to move in the rotating direction, so as to reduce the area of the obstruction in the image.
[0009] In one embodiment, the step of determining the type of the obstruction according to the image captured by the image module includes:
[0010] Determining an occlusion position of the occluder in the image;
[0011] determining an optional avoidance direction according to the obstruction position and a current state of the rotation mechanism;
[0012] The type of the obstruction is determined according to the optional avoiding direction and the current state.
[0013] In one embodiment, the step of determining the type of the obstruction according to the optional avoidance direction and the current state includes:
[0014] determining a rotatable direction of the rotating mechanism based on the current state;
[0015] If the rotatable direction is the same as the avoidable direction, determining that the type of the obstruction is an avoidable obstruction;
[0016] Otherwise, the type of the obstruction is determined to be an unavoidable obstruction.
[0017] In one embodiment, the step of determining the type of the obstruction according to the image captured by the image module includes:
[0018] Obtaining an image recognition result of the image;
[0019] If the recognition result is a cheek, determining that the obstruction is an avoidable obstruction;
[0020] If the recognition result is hair, the occlusion type is determined according to the occlusion area of the occlusion object.
[0021] In one embodiment, the step of determining the type of obstruction according to the obstruction area of the obstruction object includes:
[0022] If the obstruction area is less than a preset threshold, the obstruction is determined to be an avoidable obstruction.
[0023] If the occlusion area is greater than or equal to a preset threshold, the occlusion is determined to be an unavoidable occlusion.
[0024] In one embodiment, the step of determining the rotation direction based on the position information of the obstruction includes:
[0025] determining a direction of the occluder in the image based on the position information;
[0026] Based on the stated direction, the target direction opposite to the stated direction is set as the rotation direction.
[0027] In one embodiment, after the step of controlling the rotation mechanism to drive the image module to move in the rotation direction to reduce the area of the obstruction in the image, the method further includes:
[0028] Acquiring area information of the obstruction when the rotating mechanism moves;
[0029] If the rotating mechanism is in motion and the area information is positively correlated with the motion time, the rotating mechanism is controlled to stop running.
[0030] In one embodiment, after the step of determining the type of the obstruction based on the image captured by the image module, the method further includes:
[0031] If the obstruction is an unavoidable obstruction, an anti-obstruction prompt is output based on the location information of the obstruction.
[0032] In addition, to achieve the above-mentioned purpose, the present application also proposes an earphone, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the earphone control method as described above.
[0033] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium. A computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the headphone control method as described above are implemented.
[0034] One or more technical solutions proposed in this application have at least the following technical effects:
[0035] During the shooting process, if an obstruction appears within the shooting field of view and the obstruction is avoidable, the headphone's image module determines the shooting direction that needs to be adjusted based on the obstruction's position information. Based on this control direction, the rotation mechanism drives the image module to rotate to reduce the area of the obstruction within the shooting range. Based on this, the wireless headphones can effectively avoid obstructions during shooting, thereby improving the shooting effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0037] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0038] Figure 1 A flowchart of the first embodiment of the headphone control method of the present application is provided;
[0039] Figure 2 Optional schematic diagram of an obstruction within the shooting range provided by the headset control method of the present application;
[0040] Figure 3 Another optional schematic diagram showing the obstruction within the shooting range provided for the control method of the headphones in this application;
[0041] Figure 4 This is a flowchart illustrating the second embodiment of the headphone control method of this application.
[0042] Figure 5 A flowchart of the third embodiment of the headphone control method of the present application is provided;
[0043] Figure 6 A flowchart of a fourth embodiment of the headphone control method of the present application is provided;
[0044] Figure 7 This is a schematic diagram of the device structure of the hardware operating environment involved in the headset control method in the embodiment of the present application.
[0045] The purpose, features and advantages of this application will be further explained with reference to the accompanying drawings in conjunction with the embodiments. DETAILED DESCRIPTION
[0046] It should be understood that the specific embodiments described herein are merely used to explain the technical solutions of the present application and are not intended to limit the present application.
[0047] The main solution of this embodiment is to determine the type of obstruction based on the image captured by the image module. If the obstruction is avoidable, the corresponding rotation direction is determined, and the rotation mechanism is controlled to drive the image module in the rotation direction to reduce the area of the obstruction in the captured image. Based on this, the headset equipped with the image module can actively avoid detected obstructions when taking pictures, thereby improving the shooting effect.
[0048] In this embodiment, for ease of description, the following description is made with headphones as the execution subject.
[0049] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0050] An embodiment of the present application provides a method for controlling headphones, which is applied to headphones. The headphones are wireless headphones such as OWS (Open Wearable Stereo) headphones, TWS (True Wireless Stereo) headphones, etc., and can also be head-mounted headphones. The headphones are provided with an image module, which is connected to the headphone unit via a rotating mechanism, wherein the rotating mechanism includes a single-axis rotating mechanism, a two-axis rotating mechanism, a spherical rotating mechanism, or a universal joint rotating mechanism, and the image module includes at least a camera device, a storage module, and an image processing module. The headphones capture and transmit images or videos based on the camera device of the image module.
[0051] Please refer to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the headphone control method of the present application.
[0052] In this embodiment, the headset control method includes steps S10 to S30:
[0053] Step S10: determining the type of the obstruction according to the image captured by the image module.
[0054] It should be noted that obstructions are divided into avoidable obstructions and unavoidable obstructions. Avoidable obstructions refer to those whose proportion of the current shooting range can be reduced after the shooting position of the image module is changed by rotating the mechanism, while unavoidable obstructions are those whose proportion of the current shooting range can be reduced.
[0055] In this embodiment, when the earphone determines through image analysis that there is an obstruction in the currently captured image, or when it receives an obstruction avoidance command from a control terminal such as a charging case or mobile phone, the earphone analyzes the type of obstruction in the image captured by the image module.
[0056] Specifically, when the headset's imaging module is in operation, it reads the currently captured preview image in real time, then segments the captured image into multiple small blocks and analyzes each block separately. By comparing each block with features in a preset obstruction feature library, it determines whether an obstruction exists within that block. Alternatively, the light intensity of the preview image can be analyzed to determine the presence of an obstruction based on this light intensity information. For example, if the light intensity in a certain area is the same as when hair is obstructing the view, the captured image is determined to contain an obstruction. Optionally, the image's contour information can be identified, and image analysis and comparison can be performed based on this contour information to further determine the presence of an obstruction, such as by identifying the contour of a face, and to determine the presence of an obstruction in the captured image.
[0057] When an obstruction appears in the captured image, the type of obstruction can be determined by the image module's rotatable space and the obstruction's avoidable direction, or by the obstruction's avoidable direction. Specifically, the image module's rotatable space refers to the remaining rotational space of the image module in the current shooting state, determined based on the current state of the rotation mechanism. For example, if the rotation mechanism can rotate 20° to the right and 50° to the left, the rotatable space is determined to be 20° to the right and 50° to the left.
[0058] The dodgeable direction refers to a direction different from the direction of the obstruction in the field of view. For example, after identifying the obstruction on the left side of the field of view, the dodgeable directions of the obstruction are determined to be the right side and the top and bottom sides. It should be understood that the above types of dodgeable directions are for illustrative purposes only, and can be rotated in three dimensions, not limiting the dodgeable direction to two dimensions.
[0059] Specifically, if there is a direction in the rotatable space that is the same as the dodgeable direction, then the occluder is determined to be an dodgeable occluder. Alternatively, if the occluder has an dodgeable direction when the image module can rotate in any direction, then the occluder is determined to be an dodgeable occluder.
[0060] In this embodiment, image analysis technology is used to identify the avoidable direction of the obstruction in the image, and the type of the obstruction is determined based on the rotatable space of the image module. When the obstruction is judged to be an avoidable obstruction, the rotation mechanism is controlled to adjust the shooting position of the image module to reduce the proportion of the obstruction in the shooting range, so that the headset can automatically identify and avoid obstructions that appear during the shooting process, thereby improving the shooting effect of the headset.
[0061] Step S20: If the type of the obstruction is an avoidable obstruction, determine the rotation direction according to the position information of the obstruction.
[0062] It should be noted that the location information of the obstruction includes the current position of the obstruction, and the direction of rotation of the rotating mechanism can be determined based on the location information.
[0063] In this embodiment, the process of determining the rotation direction based on position information begins by analyzing the position of the obstruction using an image processing algorithm to determine the obstruction's direction in the image. Subsequently, based on the obstruction's direction, the direction of the unobstructed position is determined, and this direction is set as the rotation direction. For example, if the obstruction is located on the left side of the image, the right, top, or bottom side is set as the rotation direction.
[0064] For example, please refer to Figure 2 , Figure 2 For an image captured by the current image module with an obstruction that can be avoided, image analysis technology determines that the obstruction is located on the left side of the capture range. The corresponding rotation directions for this obstruction are right, up, or down. When the image module rotates up or down, the area of the obstruction within the capture range may remain the same or increase. When determining the rotation direction, the direction opposite to the obstruction's location is typically used.
[0065] Therefore, as an optional implementation, the direction of the occluder in the image may be determined based on the position information, and then the target direction opposite to the direction may be set as the rotation direction.
[0066] It is understandable that the rotating mechanism can move in multiple directions. Therefore, in addition to selecting the target direction opposite to the direction of the obstruction as the rotation direction, other directions that can reduce the area of the obstruction can also be selected as the rotation direction. For example, please refer to... Figure 3 At this point, the obstruction is located in the upper left corner. The downward direction can be selected as the rotation direction of the rotating mechanism, so that when the rotating mechanism rotates downward, the shooting range is downward, thereby gradually reducing the obstruction area.
[0067] In this embodiment, when the type of obstruction is an avoidable obstruction, the direction of rotation required is calculated in real time based on the position information of the avoidable obstruction, so that the headset controls the rotation mechanism to rotate based on the rotation direction, thereby realizing automatic anti-obstruction adjustment of the headset, and at the same time being able to adjust the shooting position in real time to improve the shooting effect.
[0068] Optionally, if the obstruction type is unavoidable, an anti-obstruction prompt can be output based on the obstruction's location information, allowing the user to adjust the headset's shooting range or adjust the rotation mechanism accordingly. For example, an anti-obstruction prompt message can be generated, stating that an obstruction is currently blocking the left shooting position, affecting the normal shooting effect, and prompting the user to adjust the shooting position or clear the obstruction. This prompt message can then be output through the headset's audio playback module.
[0069] Step S30 , controlling the rotation mechanism to drive the image module to move in the rotation direction to reduce the area of the obstruction in the image.
[0070] In this embodiment, the rotating mechanism is controlled to drive the image module to move in the rotation direction. In addition to reducing the area of the obstruction in the image, that is, reducing the overlapping area between the avoidable obstruction and the shooting field of view, it can also make the avoidable obstruction leave the shooting field of view of the image module, thereby improving the shooting effect of the headset.
[0071] In the process of controlling the rotation mechanism to drive the image module in the rotation direction, the rotation parameters of the rotation mechanism can be determined first, including the required rotation step length, and then the rotation mechanism movement can be controlled based on the rotation step length and rotation direction. The rotation step length can be determined based on the proportion or area of the obstruction in the shooting range. Please continue to refer to Figure 2 By calculating that the proportion of the obstruction in the shooting range is 25%, the mapping relationship between the rotation angle of the rotation mechanism and the range of the image module is used to determine that the step length of the right rotation is 30°. At this time, the rotation mechanism needs to be controlled to rotate 30° to the right, thereby effectively reducing
[0072] This embodiment provides a method for controlling headphones. When there is an obstruction in an image captured by an image module, the type of obstruction in the image is identified. When the type of obstruction is an avoidable obstruction, the rotation direction of the rotation mechanism is determined based on the posture of the obstruction, and the rotation mechanism is controlled to operate based on the rotation direction, so that the avoidable obstruction can leave the current shooting field of view, or the overlapping area between the avoidable obstruction and the shooting field of view is reduced, so that when shooting based on the image module of the headphones, the headphones can automatically identify and bypass the obstruction, thereby improving the shooting effect.
[0073] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the first embodiment can be referred to the above introduction and will not be described in detail later. Figure 4 , step S10 further includes steps S11 to S13:
[0074] Step S11: determining the blocking position of the blocking object in the image.
[0075] In this embodiment, the position of the occluder in the image can be determined first by image recognition technology, and the optional avoidance direction can be determined based on the occlusion position. For example, after the image is detected for occluders by a deep learning algorithm such as YOLO, SSD or other target detection models, the position, size and category information of the occluder are output based on the algorithm. The size includes the area occupied within the shooting range, and the category information is the basic information of the occluder such as trees, hair or cheeks. Among them, the optional avoidance direction is the direction opposite to the direction of the occlusion position, and can also be other directions besides the direction of the occlusion position. For example, if the occlusion position is on the left, the optional avoidance direction can be the top and bottom in addition to the right.
[0076] By determining the blocking position and then determining the optional avoiding direction of the rotating mechanism according to the blocking position, the accuracy of determining the type of the blocking object is improved.
[0077] Step S12: determining an optional avoiding direction and a current state of the rotating mechanism according to the blocking position.
[0078] In this embodiment, an optional avoidance direction can be generated based on the results of the occlusion position analysis of the obstruction, wherein the avoidance direction is a direction away from the obstruction area, ensuring that after the rotating mechanism adjusts the shooting range, the proportion of the obstruction in the shooting range gradually decreases or disappears.
[0079] After determining the optional avoidance direction, it is also necessary to determine the current state of the rotating mechanism. The states of the rotating mechanism include full-rotation state and non-full-rotation state. The full-rotation state means that the rotating mechanism cannot continue to rotate in a certain direction. For example, when it is in the right full-rotation state, it means that the rotating mechanism cannot continue to rotate to the right to adjust the shooting field of view of the image module to the right.
[0080] By determining and analyzing the current state of the rotating mechanism, the rotatable space of the image module is determined, so that when the rotatable space is the same as the optional avoiding direction, the current obstruction is determined to be an avoidable obstruction.
[0081] Step S13: determining the type of the obstruction according to the optional avoiding direction and the current state.
[0082] In this embodiment, after obtaining the evasive direction and the current state, it is necessary to first determine the rotatable direction of the rotating mechanism based on the current state. For example, if the current state is full right rotation, the rotatable direction is to the left. If the current state is not full rotation, the rotatable direction is the direction that the rotating mechanism is set to be able to rotate.
[0083] After determining the rotatable direction, if the rotatable direction is the same as the dodgeable direction, then the obstruction type is determined to be a dodgeable obstruction. In this case, the rotatable direction and the dodgeable direction are considered to be a single direction.
[0084] Optionally, the rotatable direction and the dodgeable direction can be a set of multiple directions in addition to being a single direction. Therefore, if a subset of the rotatable directions contains a subset that is the same as the dodgeable direction, then the occlusion type is determined to be a dodgeable occlusion.
[0085] If the rotational direction and the avoidable direction are different, or if they do not share a common subset of directions, the occluder is considered unavoidable. For example, if the occluder is located to the left, right, or bottom of the field of view, the corresponding avoidable direction is upward, but the rotation mechanism can only rotate to the right or left. In this case, the occluder cannot be avoided and is considered unavoidable.
[0086] This embodiment provides a method for controlling headphones. By analyzing the position information of the obstruction and the corresponding avoidable direction, as well as the current state of the rotating mechanism, it can determine whether the obstruction is an avoidable obstruction based on the avoidable direction and the current state of the rotating mechanism. Therefore, when the obstruction is an avoidable obstruction, the headphones can flexibly control the shooting field of view based on the type of obstruction, thereby improving the shooting effect.
[0087] Based on the first embodiment of this application, in the third embodiment of this application, the content that is the same as or similar to that in the first embodiment can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 5 Step S10 also includes steps S14 to S16:
[0088] Step S14: obtaining an image recognition result of the image.
[0089] Step S15: If the recognition result is a cheek, the obstruction is determined to be an avoidable obstruction.
[0090] Step S16: If the identification result is hair, determine the occlusion type based on the occlusion area of the occluder.
[0091] In this embodiment, the specific content of the obstruction in the image is analyzed by image recognition technology, for example, the obstruction is determined to be hair based on the current shooting brightness.
[0092] For example, adaptive histogram equalization or a Retinex algorithm can be used to enhance the image contrast based on the current shooting brightness, making the contrast between hair and the background more pronounced. This can then determine that the current occluder is hair. Alternatively, the color vector of the pixels in the image, including the values of the red (R), green (G), and blue (B) channels, can be analyzed. Since the color of hair is typically different from the surrounding color, a preliminary distinction can be made based on color features. Alternatively, edge detection algorithms such as edge detection and the Sobel operator can be used to extract edge information from the image. Hair edges are typically delicate and irregular, while cheek edges are relatively smooth. Based on this, the occluder can be identified as hair or cheek. This process requires preparing an image dataset containing hair and cheek occluders for algorithm training and validation. The dataset should include images with different lighting conditions, angles, and degrees of occlusion. A machine learning or deep learning algorithm is then trained using the prepared dataset, and its performance is evaluated through methods such as cross-validation. Parameters are adjusted to optimize recognition results. Finally, the trained algorithm is applied to actual image recognition scenarios.
[0093] As an optional implementation, if the recognition result is a cheek, the position of the cheek is relatively fixed for the headset, and the occlusion of the cheek can be avoided by rotation. In this case, the occluder is determined to be an avoidable occluder.
[0094] Alternatively, if the identification result is hair, the type of obstruction can be determined by analyzing the corresponding hairstyle. Hairstyles typically include long and short hair. When wearing headphones for filming, long hair essentially covers the headphones, and no matter how the headphones' rotation mechanism rotates, it cannot avoid the hair. On the other hand, if the hairstyle is short, the headphones can control the rotation mechanism to avoid the obstruction caused by the short hair. Therefore, when the identification result is hair, the obstruction area can be determined based on the hair type, and thus the obstruction type can be determined based on the obstruction area.
[0095] Specifically, if the occlusion area is less than a preset threshold, the obstruction is determined to be avoidable. If the occlusion area is greater than or equal to the preset threshold, the obstruction is determined to be unavoidable. It is understandable that if the hairstyle is long, it will basically cover the recording range of the headset, corresponding to a larger occlusion area, and in this case, the hair is considered an unavoidable obstruction.
[0096] Optionally, the category of the occluder may be determined directly based on the hair style. For example, when the hair style is long, the occluder is determined to be an unavoidable occluder; and when the hair style is short, the occluder is determined to be an avoidable occluder.
[0097] This embodiment provides a control method for headphones. By analyzing the specific information of obstructions appearing in an image using image recognition technology, the image recognition result is obtained. When the image recognition result is a cheek, it is determined to be an avoidable obstruction. When the recognition result is hair, the obstruction area is calculated based on the hair's hairstyle information. The size of the obstruction area is then used to determine whether the obstruction is avoidable. This allows the headphones to flexibly control the shooting field of view based on the type of obstruction when the obstruction is avoidable, thereby improving the shooting effect.
[0098] Based on the first embodiment of this application, in the fourth embodiment of this application, the content that is the same as or similar to that in the first embodiment can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 6 After step S30, steps S40 to S50 are also included:
[0099] Step S40: Obtain the area information of the obstruction when the rotating mechanism is in motion.
[0100] Step S50: If the rotating mechanism is in motion and the area information is positively correlated with the motion time, control the rotating mechanism to stop running.
[0101] In this embodiment, when controlling the movement of the rotating mechanism, the headset also needs to continuously determine whether the proportion of obstructions in the shooting range in the current image during the rotation process is gradually increasing after decreasing due to the rotation, thereby causing the anti-obstruction effect of the rotating mechanism to deteriorate after rotation.
[0102] Therefore, it is necessary to obtain the area information of the obstruction in real time when the rotating mechanism is in motion. If the area information is positively correlated with the movement time of the rotating mechanism, it means that during the movement of the rotating mechanism, although the obstruction of the original obstruction has been reduced, the same type of obstruction or a new obstruction has appeared in the shooting field of view. At this time, the rotating mechanism needs to be controlled to stop running.
[0103] Optionally, after the rotation mechanism is controlled to stop running, the process may jump to step S10 to determine the type of blocking object based on the image captured by the image module, thereby re-controlling the movement of the rotation mechanism.
[0104] This embodiment provides a method for controlling headphones. During the process of controlling the rotation of the rotating mechanism, the current anti-obstruction effect is judged, and when the anti-obstruction effect deteriorates, the rotating mechanism is promptly controlled to stop moving, so as to avoid the situation where the area of the obstruction in the current shooting range becomes larger after the rotating mechanism moves.
[0105] The present application provides an earphone, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the earphone control method of the first embodiment described above.
[0106] Reference below Figure 7 The diagram shows a structural schematic of an earphone suitable for implementing embodiments of this application. Figure 7 The headphones shown are merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of this application.
[0107] like Figure 7 As shown, the headset may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes based on programs stored in a read-only memory (ROM) 1002 or programs loaded from a storage device 1003 into a random access memory (RAM) 1004. RAM 1004 also stores various programs and data required for headset operation. Processing device 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems may be connected to I / O interface 1006: input device 1007 including, for example, a touchscreen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output device 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage device 1003 including, for example, a magnetic tape, hard disk, etc.; and communication device 1009. The communication device 1009 can allow the headset to communicate with other devices wirelessly or wired to exchange data. Although the figure shows a headset with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have instead.
[0108] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program comprising program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0109] The headphones provided in this application, using the headphone control method of the above-mentioned embodiment, can solve the technical problem of poor headphone photography due to obstruction. Compared with the prior art, the beneficial effects of the headphones provided in this application are the same as those of the headphone control method provided in the above-mentioned embodiment, and the other technical features of the headphones are the same as those disclosed in the above-mentioned embodiment, and are not further described here.
[0110] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0111] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
[0112] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, a computer program) stored thereon, wherein the computer-readable program instructions are used to execute the earphone control method in the above-mentioned embodiment.
[0113] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared or semiconductor systems, systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0114] The computer-readable storage medium may be contained in the earphone, or may exist independently without being assembled into the earphone.
[0115] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the headset, the headset:
[0116] Determining the type of the obstruction according to the image captured by the image module;
[0117] If the type of the obstruction is an avoidable obstruction, determining the rotation direction according to the position information of the obstruction;
[0118] The rotating mechanism is controlled to drive the image module to move in the rotating direction, so as to reduce the area of the obstruction in the image.
[0119] Computer program code for performing the operations of the present application may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0120] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, program segment or part of code, and the module, program segment or part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, as well as the combination of boxes in the block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or can be implemented using a combination of dedicated hardware and computer instructions.
[0121] The modules described in the embodiments of the present application may be implemented in software or hardware, wherein the name of a module does not necessarily limit the unit itself.
[0122] The computer-readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the aforementioned headphone control method. This computer-readable storage medium can address the technical issue of poor headphone photography due to obstructions. Compared to the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the headphone control method provided in the aforementioned embodiment, and are not further elaborated here.
[0123] The above description is only part of the embodiments of the present application and does not limit the patent scope of the present application. All equivalent structural transformations made by using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect application in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A method for controlling a headset, characterized in that: Applied to earphones, at least one earphone unit of the earphones is provided with an image module, the image module is connected to the earphone unit via a rotating mechanism, and the control method of the earphones includes: Determining the type of the obstruction according to the image captured by the image module; If the type of the obstruction is an avoidable obstruction, determining the rotation direction according to the position information of the obstruction; The rotating mechanism is controlled to drive the image module to move in the rotating direction to reduce the area of the obstruction in the image.
2. The method for controlling the earphone according to claim 1, characterized in that: The step of determining the type of the obstruction according to the image collected by the image module comprises: Determine an occlusion position of the occluder in the image; Determining an optional avoiding direction according to the blocking position and a current state of the rotating mechanism; The type of the obstruction is determined according to the optional avoiding direction and the current state.
3. The method for controlling the earphone according to claim 2, characterized in that: The step of determining the type of the obstruction according to the optional avoiding direction and the current state comprises: determining a rotatable direction of the rotating mechanism based on the current state; If the rotatable direction is the same as the avoidable direction, determining the type of the obstruction is an avoidable obstruction; Otherwise, it is determined that the type of the obstruction is an unavoidable obstruction.
4. The method for controlling the earphone according to claim 1, wherein: The step of determining the type of the obstruction according to the image collected by the image module comprises: Obtaining an image recognition result of the image; If the recognition result is a cheek, determining that the obstruction is an avoidable obstruction; If the recognition result is hair, the occlusion type is determined according to the occlusion area of the occlusion object.
5. The method for controlling the earphone according to claim 4, characterized in that: The step of determining the type of occlusion according to the occlusion area of the occlusion object comprises: If the occluded area is smaller than a preset threshold, the occluder is determined to be an avoidable occluder; If the occlusion area is greater than or equal to a preset threshold, the occlusion is determined to be an unavoidable occlusion.
6. The method for controlling the earphone according to claim 1, characterized in that: The step of determining the rotation direction according to the position information of the blocking object comprises: Determine the direction of the occluder in the image based on the position information; Based on the direction, a target direction opposite to the direction is set as the rotation direction.
7. The method for controlling the earphone according to claim 1, characterized in that: After the step of controlling the rotating mechanism to drive the image module to move in the rotating direction to reduce the area of the obstruction in the image, the method further includes: Acquiring area information of the obstruction when the rotating mechanism moves; If the rotating mechanism is in a moving state and the area information is positively correlated with the moving time, the rotating mechanism is controlled to stop running.
8. The method for controlling the earphone according to any one of claims 1 to 7, characterized in that: After the step of determining the type of the obstruction according to the image captured by the image module, the method further includes: If the type of the obstruction is an unavoidable obstruction, an anti-obstruction prompt is output based on the position information of the obstruction.
9. A headset, characterized in that: The headset comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the headset control method according to any one of claims 1 to 8.
10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the earphone control method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
AR photographing device, AR earphone and method for using AR photographing device
CN108965851A
Image correction method, electronic equipment and storage medium
CN110971825A
Multifunctional bluetooth earphone
CN207304834U
Security camera with anti-shielding function
CN211123593U
Bluetooth earphone with camera shooting function
CN213043823U