Earphone assembly method, device and computer readable storage medium
Patent Information
- Application Number
- CN202310956120.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-31
- Publication Date
- 2026-10-23
- Estimated Expiration
- 2043-07-31
AI Technical Summary
然而这种组装方式无法准确获得耳机上壳和耳机下壳的位姿,影响耳机的组装良品率
[0039]本发明中,通过获取待组装的耳机上壳和耳机下壳的耳机点云;基于所述耳机点云确定所述耳机上壳的第一位姿信息,并基于所述耳机点云确定耳机下壳的第二位姿信息;基于所述第一位姿信息和所述第二位姿信息调整所述耳机上壳和/或者所述耳机下壳的位姿后,组装调整位姿后的耳机上壳和调整位姿后的耳机下壳得到耳机,其中,所述调整位姿后的耳机上壳的组装面和所述调整位姿后的耳机下壳的组装面对齐。
Smart Images

Figure CN116916237B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of wireless earphone technology, and more particularly to an earphone assembly method, apparatus, and computer-readable storage medium. Background Technology
[0002] The earphones are assembled from an upper earphone shell and a lower earphone shell. During assembly, the upper and lower earphone shells need to be aligned using an earphone pressing fixture before being pressed together. Currently, the alignment of the upper and lower earphone shells is primarily determined by a small hole at the top of the upper earphone shell within the pressing fixture, and the position of the lower earphone shell is determined by the earphone stem. Then, based on the positions of the upper and lower earphone shells, it is determined whether they are aligned.
[0003] When determining the pose of the upper earphone shell, the position and orientation of the small hole in the upper earphone shell are determined by the image of the hole in the upper earphone shell within the pressing fixture. Similarly, when determining the pose of the lower earphone shell, the position and orientation of the circular image of the earphone stem section in the lower earphone shell within the pressing fixture are determined. However, this assembly method cannot accurately obtain the poses of the upper and lower earphone shells, affecting the assembly yield of the earphones. Summary of the Invention
[0004] The main objective of this invention is to provide a headphone assembly method, apparatus, and computer-readable storage medium, which aims to improve the accuracy of the obtained poses of the headphone upper shell and lower shell, thereby increasing the headphone assembly yield.
[0005] To achieve the above objectives, the present invention provides a headphone assembly method, the headphone assembly method comprising the following steps:
[0006] Obtain the headphone point cloud of the upper and lower earphone shells to be assembled;
[0007] The first pose information of the upper shell of the earphone is determined based on the earphone point cloud, and the second pose information of the lower shell of the earphone is determined based on the earphone point cloud.
[0008] After adjusting the poses of the upper and / or lower earphone shells based on the first and second pose information, the earphones are assembled with the adjusted upper and lower earphone shells to obtain earphones, wherein the assembly surfaces of the adjusted upper and lower earphone shells are aligned.
[0009] Optionally, the step of determining the first pose information of the upper shell of the earphone based on the earphone point cloud includes:
[0010] Based on the headphone point cloud, the first pose information of the headphone upper shell is determined with the microphone window of the headphone upper shell as a reference.
[0011] Optionally, the step of determining the first pose information of the earphone upper shell based on the earphone point cloud and using the microphone window of the earphone upper shell as a reference includes:
[0012] The mid-vertical plane of the microphone window is determined based on the headphone point cloud;
[0013] The transverse plane of the microphone window is determined based on the central perpendicular plane, and the assembly plane of the assembly surface of the earphone shell is determined based on the transverse plane and the first preset distance, wherein the assembly plane is parallel to the transverse plane.
[0014] Based on the headphone point cloud and the assembly plane, the outer contour curve of the outer contour of the assembly surface of the headphone upper shell is determined, and the intersection point cloud and the center point cloud of the center point of the assembly surface of the upper shell are determined based on the outer contour curve. The intersection point cloud is the point cloud of any intersection point of the outer contour curve and the vertical plane.
[0015] The position information of the upper shell of the earphone is determined based on the center point cloud, and the attitude information of the upper shell of the earphone is determined based on the intersection point cloud and the center point cloud. The position information and the attitude information are then determined as the first attitude information.
[0016] Optionally, the step of determining the perpendicular plane of the microphone window based on the headphone point cloud includes:
[0017] A three-dimensional headphone image is constructed based on the headphone point cloud, and edge detection is performed on the three-dimensional headphone image to obtain two non-circular edges and two circular edges of the microphone window;
[0018] Determine the first midpoint point cloud of the first midpoint, the second midpoint point cloud of the second midpoint, the first vertex point cloud of the first vertex, and the second vertex point cloud of the second vertex, wherein the first midpoint and the second midpoint are the midpoints of the two non-circular arc edges, and the first vertex and the second vertex are the vertices of the two circular arc edges.
[0019] The third midpoint point cloud is determined based on the first vertex point cloud and the second vertex point cloud, wherein the third midpoint is the midpoint of the line segment formed by the first vertex and the second vertex;
[0020] The plane passing through the first midpoint, the second midpoint, and the third midpoint is defined as the perpendicular plane for determining the microphone window.
[0021] Optionally, the step of determining the transverse plane of the microphone window based on the perpendicular plane includes:
[0022] A target point is determined on the perpendicular plane, wherein the straight line formed by the target point and the third midpoint and the straight line formed by the first midpoint and the second midpoint form a preset angle;
[0023] The plane passing through the target point, the first vertex, and the second vertex is defined as the transverse plane.
[0024] Optionally, before the step of performing edge detection on the three-dimensional headphone image to obtain the two non-circular edges and two circular edges of the microphone window, the method further includes:
[0025] The earphone point cloud is projected onto a preset projection plane to obtain planar coordinate points, and a planar earphone image is constructed based on the planar coordinate points.
[0026] A planar caliper for edge detection is constructed based on the planar headphone image, and a three-dimensional caliper for edge detection is constructed based on the planar caliper and a preset depth;
[0027] The step of performing edge detection on the three-dimensional headphone image to obtain the two non-circular edges and two circular edges of the microphone window includes:
[0028] Edge detection of the 3D headphone image is performed using the 3D caliper to obtain two non-circular edges and two circular edges of the microphone window.
[0029] Optionally, the step of projecting the headphone point cloud onto a preset projection plane to obtain planar coordinate points includes:
[0030] The region point cloud of a preset area is obtained from the headphone point cloud, and the region planar points are determined based on the region point cloud, wherein the relative distance between the preset region and the image of the microphone window is a second preset distance;
[0031] A region plane is constructed based on the region points, and the projection angle of the region plane relative to a preset projection plane is determined, wherein the projection angle is the angle by which the region plane needs to be rotated to be parallel to the preset projection plane;
[0032] Based on the projection angle, the headphone point cloud is projected onto a preset projection plane to obtain planar coordinate points.
[0033] Optionally, before the step of determining the perpendicular plane of the microphone window based on the headphone point cloud, the method further includes:
[0034] A viewport image is obtained by cropping the 3D image constructed from the headphone point cloud using a preset cropping box, wherein the viewport image includes the image of the microphone window;
[0035] The step of determining the perpendicular plane of the microphone window based on the headphone point cloud includes:
[0036] The perpendicular plane of the non-circular arc edge of the microphone window is determined based on the image point cloud of the viewport image.
[0037] To achieve the above objectives, the present invention also provides an earphone assembly device, the earphone assembly device comprising: a memory, a processor, and an earphone assembly program stored in the memory and executable on the processor, wherein the earphone assembly program, when executed by the processor, implements the steps of the earphone assembly method as described above.
[0038] Furthermore, to achieve the above objectives, the present invention also proposes a computer-readable storage medium storing an earphone assembly program, which, when executed by a processor, implements the steps of the earphone assembly method as described above.
[0039] In this invention, headphone point clouds of the upper and lower earphone shells to be assembled are obtained; a first pose information of the upper earphone shell is determined based on the headphone point cloud, and a second pose information of the lower earphone shell is determined based on the headphone point cloud; the poses of the upper earphone shell and / or the lower earphone shell are adjusted based on the first and second pose information, and the adjusted upper earphone shell and the adjusted lower earphone shell are assembled to obtain the earphone, wherein the assembly surface of the adjusted upper earphone shell and the assembly surface of the adjusted lower earphone shell are aligned.
[0040] This invention determines the pose information of the upper and lower earphone shells in the pressing fixture by using three-dimensional point clouds. It can determine the pose information of the upper and lower earphone shells in three-dimensional space. Compared with determining the pose information of the upper and lower earphone shells by using planar images, the pose information of the upper and lower earphone shells obtained by this invention is more accurate, which can improve the assembly yield of the earphones when assembling them based on the pose information of the upper and lower earphone shells. Attached Figure Description
[0041] Figure 1 This is a schematic diagram of the hardware operating environment involved in the embodiments of the present invention;
[0042] Figure 2 This is a flowchart illustrating the first embodiment of the headphone assembly method of the present invention;
[0043] Figure 3 This is a combination tooling involved in one embodiment of the headphone assembly method of the present invention;
[0044] Figure 4 This is a schematic flowchart illustrating one embodiment of the headphone assembly method of the present invention.
[0045] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0046] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0047] like Figure 1 As shown, Figure 1 This is a schematic diagram of the device structure of the hardware operating environment involved in the embodiments of the present invention.
[0048] It should be noted that the headphone assembly equipment in this embodiment of the invention can be the central control equipment of the headphone production line, or it can be an intelligent device that establishes a communication connection with the central control equipment of the headphone production line, such as headphones, smartphones, personal computers, servers, etc., without specific limitations.
[0049] like Figure 1 As shown, the headphone assembly device may include: a processor 1001, such as a CPU; a network interface 1004; a user interface 1003; a memory 1005; and a communication bus 1002. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen and an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be high-speed RAM or non-volatile memory, such as a disk drive. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0050] Those skilled in the art will understand that Figure 1 The device structure shown does not constitute a limitation on the headphone assembly device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0051] like Figure 1 As shown, the memory 1005, serving as a computer storage medium, may include an operating system, a network communication module, a user interface module, and a headphone assembly program. The operating system is a program that manages and controls the device's hardware and software resources, supporting the operation of the headphone assembly program and other software or programs. Figure 1In the device shown, the user interface 1003 is mainly used for data communication with the client; the network interface 1004 is mainly used for establishing a communication connection with the server; and the processor 1001 can be used to call the headphone assembly program stored in the memory 1005 and perform the following operations:
[0052] Obtain the headphone point cloud of the upper and lower earphone shells to be assembled;
[0053] The first pose information of the upper shell of the earphone is determined based on the earphone point cloud, and the second pose information of the lower shell of the earphone is determined based on the earphone point cloud.
[0054] After adjusting the poses of the upper and / or lower earphone shells based on the first and second pose information, the earphones are assembled with the adjusted upper and lower earphone shells to obtain earphones, wherein the assembly surfaces of the adjusted upper and lower earphone shells are aligned.
[0055] Furthermore, the step of determining the first pose information of the upper shell of the earphone based on the earphone point cloud includes:
[0056] Based on the headphone point cloud, the first pose information of the headphone upper shell is determined with the microphone window of the headphone upper shell as a reference.
[0057] Furthermore, the step of determining the first pose information of the earphone upper shell based on the earphone point cloud and using the microphone window of the earphone upper shell as a reference includes:
[0058] The mid-vertical plane of the microphone window is determined based on the headphone point cloud;
[0059] The transverse plane of the microphone window is determined based on the central perpendicular plane, and the assembly plane of the assembly surface of the earphone shell is determined based on the transverse plane and the first preset distance, wherein the assembly plane is parallel to the transverse plane.
[0060] Based on the headphone point cloud and the assembly plane, the outer contour curve of the outer contour of the assembly surface of the headphone upper shell is determined, and the intersection point cloud and the center point cloud of the center point of the assembly surface of the upper shell are determined based on the outer contour curve. The intersection point cloud is the point cloud of any intersection point of the outer contour curve and the vertical plane.
[0061] The position information of the upper shell of the earphone is determined based on the center point cloud, and the attitude information of the upper shell of the earphone is determined based on the intersection point cloud and the center point cloud. The position information and the attitude information are then determined as the first attitude information.
[0062] Furthermore, the step of determining the perpendicular bisector of the microphone window based on the headphone point cloud includes:
[0063] A three-dimensional headphone image is constructed based on the headphone point cloud, and edge detection is performed on the three-dimensional headphone image to obtain two non-circular edges and two circular edges of the microphone window;
[0064] Determine the first midpoint point cloud of the first midpoint, the second midpoint point cloud of the second midpoint, the first vertex point cloud of the first vertex, and the second vertex point cloud of the second vertex, wherein the first midpoint and the second midpoint are the midpoints of the two non-circular arc edges, and the first vertex and the second vertex are the vertices of the two circular arc edges.
[0065] The third midpoint point cloud is determined based on the first vertex point cloud and the second vertex point cloud, wherein the third midpoint is the midpoint of the line segment formed by the first vertex and the second vertex;
[0066] The plane passing through the first midpoint, the second midpoint, and the third midpoint is defined as the perpendicular plane for determining the microphone window.
[0067] Further, the step of determining the transverse plane of the microphone window based on the perpendicular plane includes:
[0068] A target point is determined on the perpendicular plane, wherein the straight line formed by the target point and the third midpoint and the straight line formed by the first midpoint and the second midpoint form a preset angle;
[0069] The plane passing through the target point, the first vertex, and the second vertex is defined as the transverse plane.
[0070] Furthermore, before the step of performing edge detection on the three-dimensional headphone image to obtain the two non-circular edges and two circular edges of the microphone window, the method further includes:
[0071] The earphone point cloud is projected onto a preset projection plane to obtain planar coordinate points, and a planar earphone image is constructed based on the planar coordinate points.
[0072] A planar caliper for edge detection is constructed based on the planar headphone image, and a three-dimensional caliper for edge detection is constructed based on the planar caliper and a preset depth;
[0073] The step of performing edge detection on the three-dimensional headphone image to obtain the two non-circular edges and two circular edges of the microphone window includes:
[0074] Edge detection of the 3D headphone image is performed using the 3D caliper to obtain two non-circular edges and two circular edges of the microphone window.
[0075] Furthermore, the step of projecting the headphone point cloud onto a preset projection plane to obtain planar coordinate points includes:
[0076] The region point cloud of a preset area is obtained from the headphone point cloud, and the region planar points are determined based on the region point cloud, wherein the relative distance between the preset region and the image of the microphone window is a second preset distance;
[0077] A region plane is constructed based on the region points, and the projection angle of the region plane relative to a preset projection plane is determined, wherein the projection angle is the angle by which the region plane needs to be rotated to be parallel to the preset projection plane;
[0078] Based on the projection angle, the headphone point cloud is projected onto a preset projection plane to obtain planar coordinate points.
[0079] Furthermore, before the step of determining the perpendicular bisector of the microphone window based on the headphone point cloud, the method further includes:
[0080] A viewport image is obtained by cropping the 3D image constructed from the headphone point cloud using a preset cropping box, wherein the viewport image includes the image of the microphone window;
[0081] The step of determining the perpendicular plane of the microphone window based on the headphone point cloud includes:
[0082] The perpendicular plane of the non-circular arc edge of the microphone window is determined based on the image point cloud of the viewport image.
[0083] Based on the above structure, various embodiments of the headphone assembly method are proposed.
[0084] Reference Figure 2 , Figure 2 This is a schematic flowchart of the first embodiment of the headphone assembly method of the present invention.
[0085] This invention provides an embodiment of a headphone assembly method. It should be noted that although the flowchart shows a logical order, in some cases, the steps shown or described may be executed in a different order. In this embodiment, the executing entity of the headphone assembly method can be the central control equipment of the headphone production line, or a smart device that establishes a communication connection with the central control equipment of the headphone production line, such as headphones, smartphones, personal computers, servers, etc. No limitation is made in this embodiment. For ease of description, the executing entity is omitted from the description of each embodiment. In this embodiment, the headphone assembly method includes:
[0086] Step S10: Obtain the headphone point cloud of the upper and lower earphone shells to be assembled;
[0087] When determining the pose of the upper earphone shell, the position and orientation of the small holes in the upper earphone shell are determined by the image of the holes in the upper earphone shell within the pressing fixture. Similarly, when determining the pose of the lower earphone shell, the position and orientation of the circular image of the earphone stem section of the lower earphone shell within the pressing fixture are determined by the image of the circular image of the lower earphone shell within the pressing fixture. However, since both the upper and lower earphone shells are three-dimensional structures, determining the displacement and rotation angles using planar images cannot accurately obtain the pose information of the upper and lower earphone shells. This results in misalignment of the upper and lower earphone shells during earphone assembly, affecting the assembly yield rate of the earphones.
[0088] This embodiment proposes a method for determining the pose information of the upper and lower shells of an earphone based on three-dimensional point clouds. By determining the pose information of the upper and lower shells in three-dimensional space, the obtained pose information of the upper and lower shells of the earphones is more accurate, thereby improving the assembly yield of the earphones.
[0089] Specifically, in this embodiment, point clouds (hereinafter referred to as headphone point clouds for distinction) of the upper and lower shells of the headphones to be assembled are acquired. At least one depth camera is provided on the headphone pressing fixture, and the headphone point clouds of the upper and lower shells are acquired through the depth camera.
[0090] Furthermore, if multiple depth cameras are installed on the headphone pressing fixture, in order to ensure that the obtained headphone point cloud can be completely constructed into the headphone upper and lower shells, in one feasible embodiment, the camera coordinate systems of each depth camera can be calibrated to be consistent in advance by adjusting the camera parameters; in another feasible embodiment, after obtaining the camera point clouds collected by each camera, the camera point clouds collected by each camera can be transformed to the same coordinate system to obtain the headphone point cloud. The specific settings can be configured according to requirements and are not limited here. For example, in one feasible embodiment, refer to... Figure 3 Four depth cameras can be installed on the four sides of the pressing fixture (i.e., Figure 3 The four depth cameras (marked as 1, 2, 3, and 4 in the image) surround... Figure 3 The Bluetooth headset shown is used to obtain headphone point cloud data.
[0091] Step S20: Determine the first pose information of the upper shell of the earphone based on the earphone point cloud, and determine the second pose information of the lower shell of the earphone based on the earphone point cloud;
[0092] In this embodiment, after obtaining the headphone point cloud, the pose information of the upper earphone shell in the pressing fixture is determined based on the headphone point cloud (hereinafter referred to as the first pose information for distinction), and the pose information of the lower earphone shell in the pressing fixture is determined based on the headphone point cloud (hereinafter referred to as the second pose information for distinction).
[0093] Furthermore, in one feasible embodiment, the first pose information can be determined based on the entire upper shell of the earphone; in another feasible embodiment, the pose of a certain component or point on the upper shell of the earphone can also be used as the first pose information. The specific settings can be made according to actual needs and are not limited here. Similarly, the second pose information can also be obtained in the same way, and will not be elaborated here.
[0094] Step S30: After adjusting the poses of the upper earphone shell and / or the lower earphone shell based on the first pose information and the second pose information, assemble the upper earphone shell and the lower earphone shell after adjusting the poses to obtain the earphone, wherein the assembly surface of the upper earphone shell after adjusting the poses and the assembly surface of the lower earphone shell after adjusting the poses are aligned.
[0095] In this embodiment, the poses of the upper and / or lower earphone shells are adjusted based on the first and second pose information, so that the assembly surfaces of the upper and lower earphone shells are aligned after the pose adjustment. In specific implementations, the pose adjustment can be performed on the upper earphone shell, the lower earphone shell, or both simultaneously; no specific limitation is imposed here.
[0096] After adjusting the poses of the upper and / or lower earphone shells based on the first and second pose information, the earphones are assembled after the poses are adjusted.
[0097] Further, in one feasible embodiment, step S10: determining the first pose information of the upper shell of the earphone based on the earphone point cloud includes:
[0098] Step S101: Based on the headphone point cloud, determine the first pose information of the headphone upper shell using the microphone window of the headphone upper shell as a reference.
[0099] A microphone for playing sound is provided on the upper shell of the earphone. The microphone is lower than the surface of the earphone shell, so that a microphone window is formed on the upper shell of the earphone. In this embodiment, the microphone window of the upper shell of the earphone is used as a reference to determine the first position information of the upper shell of the earphone in the earphone pressing tool. Compared with using the small hole of the upper shell of the earphone as a reference, the position reference selected in this embodiment is easier to identify and can improve the accuracy of determining the first position information.
[0100] Further, in one feasible embodiment, the two midpoints of the non-circular arc edge of the microphone window and the two vertices of the circular arc edge of the microphone window can be determined based on the point cloud of the microphone window, and the intersection of the line connecting the two midpoints and the line connecting the two vertices can be used as the center point to determine the first pose information; in another feasible embodiment, the first pose information can be determined based on the headphone point cloud, with the microphone window as the reference, and the plane where the headphone upper shell assembly surface is located (hereinafter referred to as the assembly bonding plane for distinction).
[0101] Furthermore, in one feasible implementation, the second pose information can be determined by referring to a certain component or point on the lower shell of the earphone as a reference and in accordance with the method for determining the first pose information, which will not be elaborated here.
[0102] In this embodiment, headphone point clouds of the upper and lower earphone shells to be assembled are obtained; a first pose information of the upper earphone shell is determined based on the headphone point cloud, and a second pose information of the lower earphone shell is determined based on the headphone point cloud; after adjusting the poses of the upper earphone shell and / or the lower earphone shell based on the first pose information and the second pose information, the adjusted upper earphone shell and the adjusted lower earphone shell are assembled to obtain the earphone, wherein the assembly surface of the adjusted upper earphone shell and the assembly surface of the adjusted lower earphone shell are aligned.
[0103] This embodiment determines the pose information of the upper and lower earphone shells in the pressing fixture by using three-dimensional point clouds. It can determine the pose information of the upper and lower earphone shells in three-dimensional space. Compared with determining the pose information of the upper and lower earphone shells by using planar images, the pose information of the upper and lower earphone shells obtained in this embodiment is more accurate, which improves the assembly yield of the earphones when assembling the earphones based on the pose information of the upper and lower earphone shells.
[0104] Furthermore, based on the first embodiment described above, a second embodiment of the headphone assembly algorithm of the present invention is proposed. In this embodiment, step S101: determining the first pose information of the headphone upper shell based on the headphone point cloud and using the microphone window of the headphone upper shell as a reference includes:
[0105] Step S1011: Determine the mid-vertical plane of the microphone window based on the headphone point cloud;
[0106] The distance and angle between the microphone window of the earphone shell and the assembly surface of the earphone shell are fixed. In this embodiment, the assembly plane where the assembly surface of the earphone shell is located is determined based on the microphone window, and the outer contour line of the earphone assembly surface is determined according to the intersection of the assembly plane and the earphone point cloud.
[0107] Specifically, since the cross-section of the microphone window (hereinafter referred to as the window cross-section for distinction) can be a plane that cuts across the microphone window at any angle, while this embodiment requires a window cross-section parallel to the assembly plane (hereinafter referred to as the cross-sectional plane for distinction). In this embodiment, the perpendicular bisector of the microphone window is determined based on the headphone point cloud. It should be noted that the perpendicular bisector of the microphone window can be the perpendicular bisector of the non-circular edge of the microphone window or the perpendicular bisector of the circular edge of the microphone window; there is no limitation here.
[0108] Furthermore, in one feasible embodiment, the perpendicular plane of the non-circular edge of the microphone window can be used as the perpendicular plane of the microphone window; in another feasible embodiment, the perpendicular plane of the microphone window can be determined based on the midpoint of the non-circular edge of the microphone window and the vertex of the circular edge of the microphone window. The specific settings can be made according to actual needs and are not limited here.
[0109] Step S1012: Determine the transverse plane of the microphone window based on the central perpendicular plane, and determine the assembly plane where the assembly surface of the earphone shell is located based on the transverse plane and the first preset distance, wherein the assembly plane is parallel to the transverse plane;
[0110] In this embodiment, the transverse plane of the microphone window is determined based on the perpendicular plane. In one feasible implementation, if the microphone window is parallel to the assembly surface, the transverse plane of the window that is perpendicular to the perpendicular plane and passes through the two midpoints of the non-circular arc edge is determined as the transverse plane; in another feasible implementation, if the microphone window is not parallel to the assembly surface and forms a certain angle, the transverse plane of the window that forms that certain angle with the perpendicular plane and passes through the two midpoints of the non-circular arc edge can be determined as the transverse plane. The specific settings can be made according to actual needs and are not limited here.
[0111] After determining the transverse plane, the assembly plane where the assembly surface of the earphone shell is located is determined based on the transverse plane and the first preset distance, wherein the assembly plane is parallel to the transverse plane.
[0112] Step S1013: Based on the headphone point cloud and the assembly plane, determine the outer contour curve of the outer contour of the assembly surface of the headphone upper shell, and determine the intersection point cloud and the center point cloud of the center point of the upper shell assembly surface based on the outer contour curve, wherein the intersection point cloud is the point cloud of any intersection point among the various intersection points of the outer contour curve and the vertical plane.
[0113] In this embodiment, the outer contour curve of the assembly surface of the earphone upper shell is determined based on the earphone point cloud and the assembly plane. Specifically, the earphone point cloud can be used as the independent variable in the plane equation of the assembly plane to obtain the equation value. The earphone point cloud whose equation value is within a preset range (hereinafter referred to as the first preset range for distinction) is determined as the point cloud of the outer contour curve, and the outer contour curve is constructed based on the point cloud of the outer contour curve. Further, in a feasible embodiment, the point cloud of the outer contour curve can be filtered, and the point cloud of the outer contour curve whose z-axis value is within a preset value range can be determined as the point cloud for constructing the outer contour line. The specific settings can be set according to actual needs and are not limited here.
[0114] The intersection point cloud and the center point cloud of the upper shell assembly surface are determined based on the outer contour curve. The intersection point cloud is the point cloud of any intersection point between the outer contour curve and the vertical plane.
[0115] Step S1014: Determine the position information of the upper shell of the earphone based on the center point cloud, and determine the attitude information of the upper shell of the earphone based on the intersection point cloud and the center point cloud, and determine the position information and the attitude information as the first attitude information.
[0116] The position information of the earphone shell is determined based on the center point cloud. In one feasible embodiment, the coordinates of the center point cloud can be used to determine the position information of the earphone shell. In another feasible embodiment, the coordinates of the center point in the tooling coordinate system of the pressing tool can be used to determine the position information. The specific settings can be made according to actual needs and are not limited here.
[0117] The orientation information of the earphone upper shell is determined based on the intersection point cloud and the center point cloud. Specifically, in one feasible embodiment, the angle of the vector formed by the intersection point cloud and the center point cloud in the tooling coordinate system can be used as the orientation information of the earphone upper shell.
[0118] The obtained position information and orientation information of the headphone shell are determined as the first orientation information of the headphone shell.
[0119] Further, in this embodiment, the second pose information of the lower earphone shell can be determined with reference to steps S1013-S1014. Specifically, based on the earphone point cloud and the assembly plane, the outer contour curve of the outer contour of the assembly surface of the lower earphone shell (hereinafter referred to as the lower shell curve for distinction) is determined. The earphone point cloud is used as the independent variable in the plane equation of the assembly plane to obtain the equation value. The earphone point cloud whose obtained equation value is within a preset range (hereinafter referred to as the second preset range for distinction) is determined as the point cloud of the lower shell. The lower shell curve is constructed based on the point cloud of the lower shell. It should be noted that the first preset range and the second preset range are different.
[0120] Further, in one feasible embodiment, step S1011: determining the perpendicular bisector of the microphone window based on the headphone point cloud includes:
[0121] Step S10111: Obtain a three-dimensional headphone image constructed based on the headphone point cloud, and perform edge detection on the three-dimensional headphone image to obtain two non-circular edges and two circular edges of the microphone window;
[0122] In this embodiment, a 3D headphone image is acquired based on the headphone point cloud, and edge detection is performed on the 3D headphone image to obtain two non-circular edges and two circular edges of the microphone window. In a specific feasible embodiment, edge detection can be performed by constructing calipers, or other methods can be used for edge detection; no specific limitation is set here.
[0123] Step S10112: Determine the first midpoint point cloud of the first midpoint, the second midpoint point cloud of the second midpoint, the first vertex point cloud of the first vertex, and the second vertex point cloud of the second vertex, wherein the first midpoint and the second midpoint are the midpoints of the two non-circular arc edges, and the first vertex and the second vertex are the vertices of the two circular arc edges.
[0124] In this embodiment, the midpoints of the two non-circular arc sides are referred to as the first midpoint and the second midpoint, respectively, and the vertices of the two circular arc sides are referred to as the first vertex and the second vertex, respectively. The first midpoint point cloud of the first midpoint, the second midpoint point cloud of the second midpoint, the first vertex point cloud of the first vertex, and the second vertex point cloud of the second vertex are determined, and the perpendicular bisector plane is determined based on the first midpoint point cloud, the second midpoint point cloud, the first vertex point cloud, and the second vertex point cloud.
[0125] Step S10113: Determine the third midpoint point cloud based on the first vertex point cloud and the second vertex point cloud, wherein the third midpoint is the midpoint of the line segment formed by the first vertex and the second vertex;
[0126] In this embodiment, the midpoint of the line segment formed by the first vertex and the second vertex is called the third midpoint, and the third midpoint point cloud is determined based on the point cloud of the first vertex and the point cloud of the second vertex.
[0127] Step S10114: The plane passing through the first midpoint, the second midpoint, and the third midpoint is determined as the perpendicular plane for determining the microphone window.
[0128] The plane passing through the first midpoint, the second midpoint, and the third midpoint is defined as the perpendicular bisector plane for determining the microphone window.
[0129] Further, in one feasible embodiment, step S1012: determining the transverse plane of the microphone window based on the perpendicular bisector includes:
[0130] Step S10121: Determine a target point on the perpendicular plane, wherein the straight line formed by the target point and the third midpoint and the straight line formed by the first midpoint and the second midpoint form a preset angle.
[0131] In this embodiment, the cross-section of the window that forms a certain angle with the vertical plane and passes through the midpoints of the two non-circular arc edges is defined as the cross-sectional plane. Specifically, a target point is determined on the vertical plane, wherein the straight line formed by the target point and the third midpoint and the straight line formed by the first midpoint and the second midpoint form a preset angle. This preset angle is equal to the angle between the microphone window and the assembly surface.
[0132] Step S10122: Determine the plane passing through the target point, the first vertex, and the second vertex as the transverse plane.
[0133] The plane passing through the target point, the first vertex, and the second vertex is defined as the transverse plane. In this embodiment, the transverse plane is parallel to the assembly surface of the earphone upper shell, thus allowing the assembly bonding plane to be determined based on the transverse plane.
[0134] Furthermore, in one feasible embodiment, before step S10111, which involves performing edge detection on the three-dimensional headphone image to obtain the two non-circular edges and two circular edges of the microphone window, the method further includes:
[0135] Step S10115: Project the headphone point cloud onto a preset projection plane to obtain planar coordinate points, and construct a planar headphone image based on the planar coordinate points;
[0136] In this embodiment, the headphone point cloud is projected onto a preset projection plane to obtain planar coordinate points, and a planar headphone image is constructed based on these planar coordinate points. The specific point cloud projection method is not limited here.
[0137] Step S10116: Construct a planar caliper for edge detection based on the planar headphone image, and construct a three-dimensional caliper for edge detection based on the planar caliper and a preset depth;
[0138] A planar caliper for edge detection is constructed based on planar headphone images. The specific method of constructing the planar caliper is not limited here and can be set according to actual needs.
[0139] A 3D caliper with edge detection is constructed based on a planar caliper and a preset depth. The preset depth is the depth of the microphone window, which means that the rectangular planar caliper is given a cube-shaped 3D caliper by adding the depth.
[0140] In this embodiment, step S10111: performing edge detection on the three-dimensional headphone image to obtain two non-circular edges and two circular edges of the microphone window includes:
[0141] Step S101111: Edge detection is performed on the three-dimensional headphone image using the three-dimensional calipers to obtain two non-circular edges and two circular edges of the microphone window.
[0142] Edge detection of the 3D headphone image was performed using 3D calipers to obtain two non-circular edges and two circular edges of the microphone window.
[0143] This embodiment constructs a three-dimensional caliper based on a planar caliper. Compared to directly constructing a three-dimensional caliper based on a three-dimensional point cloud, this embodiment avoids the interference of microphone depth on the caliper during the construction process, resulting in a more accurate three-dimensional caliper. Consequently, the edge detection results are more accurate, thereby improving the accuracy of determining the assembly bonding plane and increasing the assembly yield.
[0144] Further, in a feasible embodiment, step S10115: the step of projecting the headphone point cloud onto a preset projection plane to obtain planar coordinate points includes:
[0145] Step S101151: Obtain the region point cloud of the preset region from the headphone point cloud, and determine the region plane points based on the region point cloud, wherein the relative distance between the preset region and the image of the microphone window is a second preset distance;
[0146] In this embodiment, before projecting the point cloud, the rotation angle of the headphone point cloud relative to the preset coordinate plane is determined. The headphone point cloud is rotated before being projected, thereby achieving complete projection of the entire microphone window. This results in higher accuracy of edge detection, which in turn improves the accuracy of determining the assembly bonding plane and increases the assembly yield.
[0147] Specifically, a region point cloud of a preset area is obtained from the headphone point cloud, and a region planar point is determined based on the region point cloud. The relative distance between the preset area and the image of the microphone window is a second preset distance.
[0148] Step S101152: Construct a region plane based on the region points, and determine the projection angle of the region plane relative to a preset projection plane, wherein the projection angle is the angle by which the region plane needs to be rotated to be parallel to the preset projection plane.
[0149] A region plane is constructed based on region points, and the projection angle of the region plane relative to the preset projection plane is determined. The projection angle is the angle by which the region plane needs to be rotated to be parallel to the preset projection plane.
[0150] In one feasible embodiment, the preset plane can be the coordinate plane of the tooling coordinate system of the pressing tooling, such as the XOY plane; in another feasible embodiment, the preset plane can also be the plane of the coordinate plane of the tooling coordinate system of the pressing tooling, and there is no specific limitation here. Further, in one feasible embodiment, the XOY coordinate plane of the tooling coordinate system can be used as the preset plane. In the pressing tooling, the upper shell and lower shell of the earphone are usually placed with the assembly surface parallel to the XOY coordinate plane. Therefore, using the XOY coordinate plane of the tooling coordinate system as the preset plane can reduce the amount of calculation in the projection process and improve the efficiency of earphone assembly.
[0151] Step S101153: Project the headphone point cloud onto a preset projection plane based on the projection angle to obtain planar coordinate points.
[0152] The headphone point cloud is projected onto a preset projection plane based on the projection angle to obtain planar coordinate points. Specifically, the headphone point cloud can be rotated according to the projection angle, and then projected onto the preset projection plane to obtain planar coordinate points.
[0153] Furthermore, in one feasible embodiment, before step S1011: determining the perpendicular bisector of the microphone window based on the headphone point cloud, the method further includes:
[0154] Step S1015: A viewport image is obtained by cropping the three-dimensional image constructed from the headphone point cloud using a preset cropping box, wherein the viewport image includes the image of the microphone window;
[0155] In this embodiment, before determining the perpendicular bisector of the microphone window based on the headphone point cloud, a viewport image is obtained by cropping the 3D image constructed from the headphone point cloud using a preset cropping frame. The viewport image includes the image of the microphone window. This embodiment can reduce the processing range of the point cloud, thereby improving the accuracy and speed of point cloud processing, and increasing the efficiency and yield of headphone assembly.
[0156] In this embodiment, step S1011: determining the perpendicular bisector of the microphone window based on the headphone point cloud includes:
[0157] Step S10117: Determine the perpendicular plane of the non-circular arc edge of the microphone window based on the image point cloud of the window image.
[0158] In this embodiment, the perpendicular plane of the non-circular arc edge of the microphone window is determined based on the image point cloud of the window image. The specific process of determining the perpendicular plane will not be described in detail here.
[0159] In this embodiment, the perpendicular plane of the microphone window is determined based on the headphone point cloud; the transverse plane of the microphone window is determined based on the perpendicular plane, and the assembly plane of the headphone upper shell is determined based on the transverse plane and a first preset distance, wherein the assembly plane is parallel to the transverse plane; the outer contour curve of the outer contour of the assembly surface of the headphone upper shell is determined based on the headphone point cloud and the assembly plane, and the intersection point cloud and the center point cloud of the center point of the upper shell assembly surface are determined based on the outer contour curve, wherein the intersection point cloud is the point cloud of any intersection point of the outer contour curve and the perpendicular plane; the position information of the headphone upper shell is determined based on the center point cloud, and the posture information of the headphone upper shell is determined based on the intersection point cloud and the center point cloud, and the position information and posture information are determined as the first posture information. This embodiment realizes the determination of the first posture information of the headphone upper shell based on the assembly surface of the headphone upper shell, making the obtained headphone upper shell posture information more accurate, and improving the assembly yield of the headphone when assembling the headphone based on the headphone upper shell posture information.
[0160] Furthermore, in one feasible implementation, refer to Figure 4 The specific process for determining the first pose information can be as follows:
[0161] Obtain a 3D headphone image constructed based on headphone point cloud (i.e. Figure 4 The input point cloud image shown is shown in Figure 1.
[0162] A viewport image is obtained by cropping the 3D image constructed from the headphone point cloud using a preset cropping box. The viewport image includes the microphone window image. A region point cloud of a preset area is obtained from the point cloud of the viewport image, and region plane points are determined based on the region point cloud. The relative distance between the preset region and the microphone window image is a second preset distance. A region plane (i.e., a viewport) is constructed based on the region points. Figure 4 As shown in Figure 2, obtain the projection plane and calculate the plane equation a*A+b*B+C*z+D=0.
[0163] Determine the projection angle of the region plane relative to the preset projection plane, where the projection angle is the angle by which the region plane needs to be rotated to be parallel to the preset projection plane; project the image point cloud onto the preset projection plane based on the projection angle to obtain planar coordinate points; construct a planar headphone image (i.e., ...) based on the planar coordinate points. Figure 4 As shown in step 3, all point clouds are rotated to the projection plane and corona is projected onto the plane to obtain projection plane points. A 2D image is then generated based on these projection plane points.
[0164] A planar caliper for edge detection is constructed based on a planar headphone image, and a three-dimensional caliper for edge detection is constructed based on the planar caliper and a preset depth (i.e., ... Figure 4The diagram shows: 4. Locate the viewport outline, extract the circumscribed portion; 5. Construct a 2D boundary based on the non-circular edges of the viewport to extract the calipers; 6. Transform the 2D calipers into a rectangular 3D caliper.
[0165] Edge detection of the 3D headphone image was performed using 3D calipers to obtain the two non-circular edges and two circular edges of the microphone window (i.e., Figure 4 The non-circular edges L1 and L2 of the viewport are determined based on the extraction within a rectangular 3D caliper (Figure 7).
[0166] Determine the point cloud of the first midpoint, the point cloud of the second midpoint, the point cloud of the first vertex, and the point cloud of the second vertex, where the first and second midpoints are the midpoints of two non-circular arc edges, and the first and second vertices are the vertices of two circular arc edges, respectively. Based on the point clouds of the first and second vertices, determine the point cloud of the third midpoint, where the third midpoint is the midpoint of the line segment formed by the first and second vertices (i.e.,...). Figure 4 Figure 8 shows the extraction of the top endpoint coordinates C1C2 of the arc segment, and the midpoint O of C1C2; Figure 9 shows the calculation of the closest point P1P2 on L1 and L2 to O.
[0167] The plane passing through the first midpoint, the second midpoint, and the third midpoint is defined as the perpendicular bisector plane for determining the microphone window (i.e., Figure 4 The diagram shows 10 generating a perpendicular plane through P1, O, and P2.
[0168] Determine the target point on the perpendicular bisector plane, where the straight line formed by the target point and the third midpoint forms a predetermined angle with the straight line formed by the first midpoint and the second midpoint (i.e., ...). Figure 4 As shown in Figure 11, find P3, which passes through point O and forms a fixed angle with line P1P2 in the perpendicular bisector plane.
[0169] The plane passing through the target point, the first vertex, and the second vertex is defined as the transverse plane; the assembly plane where the assembly surface of the earphone upper shell is located is determined based on the transverse plane and the first preset distance, wherein the assembly plane is parallel to the transverse plane; the outer contour curve of the outer contour of the assembly surface of the earphone upper shell is determined based on the image point cloud and the assembly plane, and the intersection point cloud and the center point cloud of the center point of the upper shell assembly surface are determined based on the outer contour curve, wherein the intersection point cloud is the point cloud of any intersection point of the outer contour curve and the perpendicular bisector plane; the position information of the earphone upper shell is determined based on the center point cloud, and the attitude information of the earphone upper shell is determined based on the intersection point cloud and the center point cloud, and the position information and attitude information are determined as the first attitude information (i.e., Figure 4As shown in the diagram, 12 generates a transverse plane through point C1C2P3, 13 finds an assembly plane that is parallel to the transverse plane and at a certain distance from the transverse plane, 14 finds the outer contour curve C of the assembly plane and the upper shell of the earphone, 15 finds the intersection point W of the curve contour C and the perpendicular plane, 16 finds the angle U of the straight line O2W, and 17 outputs the center O2 (X, Y, Z) of the upper shell and the angle U.
[0170] Furthermore, embodiments of the present invention also propose a computer-readable storage medium storing an earphone assembly program, wherein the earphone assembly program, when executed by a processor, implements the steps of the earphone assembly method described below.
[0171] The various embodiments of the headphone assembly equipment and computer-readable storage medium of the present invention can be referred to the various embodiments of the headphone assembly method of the present invention, and will not be repeated here.
[0172] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0173] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0174] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0175] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.
Claims
1. A method for assembling headphones, characterized in that, The headphone assembly method includes the following steps: Obtain the headphone point cloud of the upper and lower earphone shells to be assembled; The first pose information of the upper shell of the earphone is determined based on the earphone point cloud, and the second pose information of the lower shell of the earphone is determined based on the earphone point cloud. After adjusting the poses of the upper and / or lower earphone shells based on the first and second pose information, the upper and lower earphone shells with adjusted poses are assembled to obtain earphones, wherein the assembly surfaces of the upper and lower earphone shells with adjusted poses are aligned. The step of determining the first pose information of the upper shell of the earphone based on the earphone point cloud includes: The mid-vertical plane of the microphone window is determined based on the headphone point cloud; The transverse plane of the microphone window is determined based on the central perpendicular plane, and the assembly plane of the assembly surface of the earphone shell is determined based on the transverse plane and the first preset distance, wherein the assembly plane is parallel to the transverse plane. Based on the headphone point cloud and the assembly plane, the outer contour curve of the outer contour of the assembly surface of the headphone upper shell is determined, and the intersection point cloud and the center point cloud of the center point of the assembly surface of the upper shell are determined based on the outer contour curve. The intersection point cloud is the point cloud of any intersection point of the outer contour curve and the vertical plane. The position information of the upper shell of the earphone is determined based on the center point cloud, and the attitude information of the upper shell of the earphone is determined based on the intersection point cloud and the center point cloud. The position information and the attitude information are then determined as the first attitude information.
2. The headphone assembly method as described in claim 1, characterized in that, The step of determining the perpendicular plane of the microphone window based on the headphone point cloud includes: A three-dimensional headphone image is constructed based on the headphone point cloud, and edge detection is performed on the three-dimensional headphone image to obtain two non-circular edges and two circular edges of the microphone window; Determine the first midpoint point cloud of the first midpoint, the second midpoint point cloud of the second midpoint, the first vertex point cloud of the first vertex, and the second vertex point cloud of the second vertex, wherein the first midpoint and the second midpoint are the midpoints of the two non-circular arc edges, and the first vertex and the second vertex are the vertices of the two circular arc edges. The third midpoint point cloud is determined based on the first vertex point cloud and the second vertex point cloud, wherein the third midpoint is the midpoint of the line segment formed by the first vertex and the second vertex; The plane passing through the first midpoint, the second midpoint, and the third midpoint is defined as the perpendicular plane of the microphone window.
3. The headphone assembly method as described in claim 2, characterized in that, The step of determining the transverse plane of the microphone window based on the perpendicular plane includes: A target point is determined on the perpendicular plane, wherein the straight line formed by the target point and the third midpoint and the straight line formed by the first midpoint and the second midpoint form a preset angle; The plane passing through the target point, the first vertex, and the second vertex is defined as the transverse plane.
4. The headphone assembly method as described in claim 2, characterized in that, Before the step of performing edge detection on the three-dimensional headphone image to obtain the two non-circular edges and two circular edges of the microphone window, the method further includes: The earphone point cloud is projected onto a preset projection plane to obtain planar coordinate points, and a planar earphone image is constructed based on the planar coordinate points. A planar caliper for edge detection is constructed based on the planar headphone image, and a three-dimensional caliper for edge detection is constructed based on the planar caliper and a preset depth; The step of performing edge detection on the three-dimensional headphone image to obtain the two non-circular edges and two circular edges of the microphone window includes: Edge detection of the 3D headphone image is performed using the 3D caliper to obtain two non-circular edges and two circular edges of the microphone window.
5. The headphone assembly method as described in claim 4, characterized in that, The step of projecting the earphone point cloud onto a preset projection plane to obtain planar coordinate points includes: The region point cloud of a preset area is obtained from the headphone point cloud, and the region planar points are determined based on the region point cloud, wherein the relative distance between the preset region and the image of the microphone window is a second preset distance; A regional plane is constructed based on the regional plane points, and the projection angle of the regional plane relative to the preset projection plane is determined, wherein the projection angle is the angle by which the regional plane needs to be rotated to be parallel to the preset projection plane; Based on the projection angle, the headphone point cloud is projected onto a preset projection plane to obtain planar coordinate points.
6. The headphone assembly method according to any one of claims 1 to 5, characterized in that, Before the step of determining the perpendicular bisector of the microphone window based on the headphone point cloud, the method further includes: A viewport image is obtained by cropping the 3D image constructed from the headphone point cloud using a preset cropping box, wherein the viewport image includes the image of the microphone window; The step of determining the perpendicular plane of the microphone window based on the headphone point cloud includes: The perpendicular plane of the non-circular edge of the microphone window is determined based on the image point cloud of the viewport image.
7. An earphone assembly device, characterized in that, The headphone assembly device includes: a memory, a processor, and a headphone assembly program stored in the memory and executable on the processor, wherein the headphone assembly program, when executed by the processor, implements the steps of the headphone assembly method as described in any one of claims 1 to 6.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores an earphone assembly program, which, when executed by a processor, implements the steps of the earphone assembly method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Assembly system and method based on binocular vision
CN106624709A
Workpiece pose rapid high-precision estimation method and apparatusbased on point cloud data
CN110634161A