A vision-based method and system for detecting the integrity of the dustproof mesh on headphone speakers.

By acquiring images from multiple angles and analyzing internal light reflection textures, the accuracy problem of identifying abnormal three-dimensional bonding of headphone speaker dustproof mesh in existing technologies has been solved, achieving efficient detection and precise positioning of three-dimensional bonding quality.

CN121937463BActive Publication Date: 2026-05-26HANZHONG SHENGDA ELECTRONIC TECH CO LTD
View PDF 2 Cites -1 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HANZHONG SHENGDA ELECTRONIC TECH CO LTD
Filing Date
2026-03-31
Publication Date
2026-05-26

Smart Images

  • Figure CN121937463B_ABST
    Figure CN121937463B_ABST
Patent Text Reader

Abstract

This invention relates to the field of image data processing technology, specifically to a vision-based method and system for detecting the integrity of a headphone speaker dustproof mesh. The method includes: acquiring multi-angle images of the headphone speaker assembly before and after dustproof mesh application; determining the applicable application area based on the multi-angle images before application and dividing this area into multiple sub-regions; for each sub-region, extracting texture edge features based on light reflection textures and comparing the changes in these features before and after application to calculate the application effectiveness index for each sub-region; and filtering and identifying abnormal application areas based on the distribution characteristics of the application effectiveness index for each sub-region. This method combines multi-angle two-dimensional image acquisition with internal light reflection texture analysis, achieving effective identification of three-dimensional application anomalies in the dustproof mesh without relying on laser ranging.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image data processing technology, and specifically to a vision-based method and system for detecting the integrity of the dustproof mesh on an earphone speaker. Background Technology

[0002] As a key protective component of the speaker system, the dustproof mesh of an earphone speaker primarily functions to prevent dust, magnetic particles, and liquids from splashing into the speaker, while ensuring a smooth sound path, thereby directly protecting the acoustic performance and longevity of the earphones. In the automated or semi-automated production and assembly process of earphones, the application of the dustproof mesh is an extremely delicate and critical step. The application location is often situated on the complex curved surfaces or narrow cavities of the earphone, requiring a high degree of consistency in the application quality.

[0003] Currently, automated inspection of dustproof mesh bonding quality mainly relies on planar image-based visual inspection technology. However, existing planar image inspection methods can only acquire two-dimensional surface information. For three-dimensional bonding anomalies such as localized bubbling and collapse that occur during the bonding process, the planar imaging cannot accurately capture deformation information in the depth direction, resulting in poor accuracy in identifying three-dimensional bonding quality anomalies and a high risk of missed or false detections. Furthermore, because the surface of the dustproof mesh itself has a large area of ​​porous structure, light can directly penetrate the mesh, making traditional three-dimensional ranging solutions based on laser scanning impossible. Summary of the Invention

[0004] This invention provides a vision-based method and system for detecting the integrity of the dustproof mesh on an earphone speaker, in order to solve existing problems.

[0005] The present invention provides a vision-based method and system for detecting the integrity of the dustproof mesh of an earphone speaker, which adopts the following technical solution:

[0006] In a first aspect, one embodiment of the present invention provides a vision-based method for detecting the integrity of a dustproof mesh on an earphone speaker. The method includes: acquiring multi-angle images of an earphone speaker assembly under test before and after dustproof mesh bonding; wherein, when acquiring the multi-angle images, a specific light source is controlled to illuminate the bonding area of ​​the earphone speaker assembly under test to form a recognizable light reflection texture inside the assembly; determining a bonding area based on the multi-angle images before bonding, and dividing the bonding area into multiple sub-regions; for each sub-region, extracting texture edge features formed based on the light reflection texture inside the sub-region, comparing the changes in the texture edge features before and after bonding, and calculating a bonding effectiveness index for each sub-region; and filtering and identifying bonding abnormal areas based on the distribution characteristics of the bonding effectiveness index for each sub-region.

[0007] Furthermore, acquiring multi-angle images of the headphone speaker assembly under test before and after the dustproof mesh is applied includes: controlling multiple optical cameras arranged at different shooting angles to take pictures of the same assembly under test before and after the dustproof mesh application process, acquiring images before and after application from each shooting angle; marking the images before and after application according to the shooting angle labels to establish a temporal correlation between the images before and after application from the same shooting angle.

[0008] Furthermore, determining the bonding area based on the multi-angle images before bonding includes: performing foreground segmentation on each viewpoint image before bonding to extract the foreground area of ​​the headphone speaker assembly; extracting corner points within the foreground area, and determining the bonding area of ​​the dustproof mesh based on the spatial distribution of the corner points.

[0009] Further, dividing the fitable area into multiple sub-regions includes: calculating the path validity of each corner point within the fitable area, as well as the path validity similarity index and structural correlation index between each corner point; calculating the aggregation weight between the corner points based on the path validity similarity index and the structural correlation index; aggregating corner points whose aggregation weights satisfy preset aggregation conditions into a corner point group, and determining a sub-region based on the enclosing area of ​​the corner point group.

[0010] Furthermore, the method for calculating the path effectiveness includes: extracting texture edges passing through the corner point to form an edge group; calculating the ratio of the length of the edge group to the total length of all texture edges within the conformable area to obtain a measure of the light change concentration at the corner point; calculating the cumulative difference between the brightness gradient magnitude of each edge point in the edge group and the brightness gradient magnitude of the corner point to obtain a measure of the light distribution significance at the corner point; and combining the light change concentration and the light distribution significance to calculate the path effectiveness of the corner point.

[0011] Further, the calculation of the bonding effectiveness index of each sub-region includes: in the multi-angle image after bonding, determining the corresponding mapping region based on the spatial position of the sub-region in the image before bonding, and extracting the corner points in the mapping region; establishing the correspondence between the corner points in the sub-region before bonding and the corner points in the mapping region after bonding; calculating the degree of difference in the number of corner points in the sub-region before and after bonding, and the positional offset distance between the corresponding corner points before and after bonding; and determining the bonding effectiveness index of the sub-region based on the degree of difference in the number and the positional offset distance.

[0012] Furthermore, establishing the correspondence between the front corner point in the sub-region and the back corner point in the mapping region includes: for each front corner point in the sub-region, determining the back corner point with the smallest spatial distance from it in the mapping region as the corresponding corner point of the front corner point, so as to establish the correspondence between the front and back corner points.

[0013] Furthermore, the step of filtering and identifying abnormal bonding regions based on the distribution characteristics of the bonding effectiveness index of each sub-region includes: determining the bonding abnormality of each sub-region based on the bonding effectiveness index calculated under each shooting angle; and, when the same sub-region is determined to be a bonding abnormality under each shooting angle, the sub-region is confirmed as a bonding abnormality region by comprehensively considering the bonding abnormality determination results of the same component under each shooting angle.

[0014] Furthermore, the step of determining the fitting anomaly for each sub-region includes: normalizing the fitting effectiveness index of each sub-region to obtain a normalized fitting effectiveness index; comparing the normalized fitting effectiveness index with a preset fitting effectiveness determination threshold, and dividing each sub-region into a fitting effective region and a fitting ineffective region based on the comparison result; marking the fitting effective region and the fitting ineffective region with differentiated visual labels respectively, and generating a visual detection result image for output.

[0015] Secondly, another embodiment of the present invention provides a vision-based detection system for the integrity of the dustproof mesh of an earphone speaker, comprising a central cloud server and a vision module communicatively connected to the central cloud server, wherein:

[0016] The vision module is used to acquire multi-angle images of the headphone speaker assembly under test before and after the dustproof mesh is attached, and send them to the central cloud server. The vision module includes a specific light source and optical cameras arranged at multiple different shooting angles. The specific light source is used to illuminate the attachment area of ​​the headphone speaker assembly under test when acquiring the multi-angle images, so as to form a recognizable light reflection texture inside the assembly.

[0017] The central cloud server is used to acquire the multi-angle images; determine the bonding area based on the multi-angle images before bonding, and divide the bonding area into multiple sub-regions; for each sub-region, extract the texture edge features formed by the light reflection texture inside the sub-region, compare the changes of the texture edge features before and after bonding, and calculate the bonding effectiveness index of each sub-region; based on the distribution characteristics of the bonding effectiveness index of each sub-region, filter and identify bonding abnormal areas.

[0018] The beneficial effects of the technical solution of the present invention are:

[0019] In this embodiment of the invention, multi-angle images of the headphone speaker assembly under test before and after the dustproof mesh is applied are acquired. During the acquisition of these multi-angle images, a specific light source is used to illuminate the application area of ​​the headphone speaker assembly to form a recognizable light reflection texture within the assembly. Based on the multi-angle images before application, the application area is determined and divided into multiple sub-regions. For each sub-region, texture edge features formed by the light reflection texture are extracted, and the changes in texture edge features before and after application are compared to calculate the application effectiveness index for each sub-region. Based on the distribution characteristics of the application effectiveness index for each sub-region, abnormal application areas are screened and identified.

[0020] This invention combines multi-angle two-dimensional image acquisition with internal light reflection texture analysis to effectively identify three-dimensional bonding anomalies of dustproof netting without relying on laser ranging, overcoming the technical limitations of existing planar visual inspection that cannot perceive depth deformation. Furthermore, by using the light reflection texture formed inside the component by a specific light source as a detection benchmark, and analyzing the interception and disturbance of light paths caused by dustproof netting bonding, the invention transforms the difficult-to-observe three-dimensional deformation into quantifiable image feature changes, improving the objectivity and accuracy of the detection. Moreover, by adaptively dividing the bonding area into multiple sub-regions and calculating bonding effectiveness indices for each, and performing anomaly screening based on the distribution characteristics of each sub-region, the invention achieves precise localization of minor defects such as localized bulging or collapse, avoiding missed detections caused by overall evaluation. Finally, by comparing the composite index of changes in the number and positional shift of corner points within sub-regions before and after bonding, the invention quantifies the degree to which the dustproof netting maintains the edge morphology of the internal texture, providing a reproducible numerical basis for identifying three-dimensional bonding defects and improving the objectivity and consistency of the detection results. Attached Figure Description

[0021] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1 A schematic flowchart illustrating the vision-based method for detecting the integrity of the dustproof mesh on an earphone speaker provided in this application embodiment;

[0023] Figure 2 This is a schematic diagram of the architecture of a vision-based detection system for the integrity of the dustproof mesh of an earphone speaker provided in an embodiment of this application. Detailed Implementation

[0024] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, the following detailed description, in conjunction with the accompanying drawings and preferred embodiments, provides a specific implementation method, structure, features, and effects of the invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.

[0025] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0026] The following description, in conjunction with the accompanying drawings, details a specific solution provided by the present invention.

[0027] like Figure 1 As shown in the figure, this application provides a vision-based method for detecting the integrity of the dustproof mesh on an earphone speaker, including:

[0028] Step S110: Acquire multi-angle images of the headphone speaker assembly under test before and after the dustproof mesh is applied; wherein, when acquiring multi-angle images, a specific light source is controlled to illuminate the application area of ​​the headphone speaker assembly under test, so as to form a recognizable light reflection texture inside the assembly.

[0029] The aforementioned multi-angle images refer to a collection of two-dimensional digital images of the same headphone speaker assembly, which are synchronously or sequentially acquired from different spatial perspectives by multiple optical cameras arranged at specific angular intervals around the dustproof mesh bonding station. These images cover multiple sides and curved surface normals of the bonding area inside the assembly, and fully record the distribution of light reflection texture inside the assembly and its spatial geometric projection relationship under specific light source illumination.

[0030] The aforementioned scheme acquires multi-angle images before and after bonding to establish a temporal comparison benchmark and eliminate blind spots in single-view observation. The pre-bonding image captures and records the light reflection texture path and corner distribution within the component in its original state, forming a reference system for bonding quality assessment. The post-bonding image records the actual optical state of the dustproof mesh after bonding. By comparing the differences in texture edge features before and after bonding from the same viewpoint (including the degree of light path truncation and corner position offset), the stereoscopic fit between the dustproof mesh and the bonding area is indirectly quantified. Simultaneously, multi-view stereoscopic coverage ensures omnidirectional imaging and recording of the bonding area with complex curved surfaces, avoiding information loss due to surface occlusion or perspective distortion from a single viewpoint. Thus, cross-view data fusion enables a high-confidence determination of bonding integrity and the location of local defects.

[0031] The aforementioned specific light source refers to a ring-shaped light source arranged above the bonding area of ​​the headphone speaker assembly. This light source consists of multiple light-emitting units arranged in a concentric circular array, with its geometric center coaxially aligned with the center of the bonding area of ​​the component under test. It is used to project uniform and directionally controllable incident light onto the internal curved surface of the component. The identifiable light reflection texture refers to the texture pattern with light and dark contrast formed on the camera imaging plane after the incident light from the specific light source undergoes specular and diffuse reflection on the metal or plastic curved surface inside the headphone speaker assembly. This pattern represents a continuous or discontinuous light path, and its intensity distribution is closely related to the microscopic geometry, roughness, and normal vector of the component surface. Before the dustproof mesh is bonded, it presents a complete and continuous light path. However, after bonding, the light path is interrupted or distorted due to the mesh's blocking, scattering, and slight deformation, thus becoming a quantifiable visual feature.

[0032] To create a recognizable light reflection texture inside the component, a ring light source can be positioned directly above the bonding area of ​​the component under test, with the geometric center of the light source coinciding with the center of the mold base. This ensures that the incident light illuminates the internal curved surface of the component at a low angle, thereby creating a high-contrast light-dark boundary edge on the curved surface. At the same time, the luminous intensity and color temperature of the light source are controlled so that the camera sensor can capture an image with a sufficient signal-to-noise ratio, and the optical focus of each camera converges at the center of the bonding area, ensuring that the spatial distribution details of the internal reflection texture can be clearly recorded from different perspectives.

[0033] Optionally, after step S110, the above-mentioned vision-based method for detecting the integrity of the dustproof mesh of the headphone speaker may further include: before and after the dustproof mesh bonding process, controlling multiple optical cameras arranged at different shooting angles to take pictures of the same component under test, and obtaining pre-bonding and post-bonding images from each shooting angle; marking the pre-bonding and post-bonding images according to the shooting angle labels to establish the temporal correlation between the pre-bonding and post-bonding images from the same shooting angle.

[0034] The above-mentioned solution involves a time-series management and data association mechanism for multi-view image acquisition. Its implementation process includes triggering multiple optical cameras arranged at different spatial angles around the bonding station to acquire images of the same headphone speaker component under test at two time nodes: before and after the dustproof net bonding process. This obtains omnidirectional visual data covering the bonding area inside the component. The images acquired before bonding record the original internal texture features of the component without the dustproof net, while the images acquired after bonding record the actual optical state after the dustproof net is bonded. By uniquely identifying and encoding these images according to their spatial viewpoint position at the time of acquisition, a one-to-one correspondence is established between the images before bonding and the images after bonding under the same spatial viewpoint, forming time-series associated image pairs.

[0035] The core purpose of establishing temporal correlation is to ensure the spatial consistency of subsequent image comparison analysis. That is, only images before and after bonding that come from the same shooting perspective have a basis for geometric registration, thereby eliminating the interference of image content differences caused by perspective switching on bonding quality judgment. Through this temporal marking mechanism, image pairs under the same perspective can be accurately called for texture feature change analysis during the data processing stage, ensuring that the detection logic strictly follows the principle of before and after comparison in the time dimension, and avoiding misjudgment caused by image mismatch.

[0036] In actual engineering deployment, multiple optical cameras can be arranged around the ring light source at preset angular intervals, with the optical principal axis of each camera pointing to the center of the mating area; image labeling can adopt a composite encoding method that includes camera number and shooting time sequence label, such as embedding viewpoint identifier and timestamp in image metadata, so as to realize fast time sequence association retrieval and pairing processing in the process of data storage and retrieval, and support subsequent automatic alignment and difference analysis of images before and after mating from the same viewpoint.

[0037] Step S120: Determine the bonding area based on the multi-angle images before bonding, and divide the bonding area into multiple sub-regions.

[0038] Step S120 above, which determines the bonding area, aims to precisely define the physical spatial range that the dustproof net should theoretically cover. By separating the effective foreground area of ​​the headphone speaker assembly from the image background, visual interference from the base and surrounding structures is eliminated. This establishes an accurate spatial benchmark and region of interest for subsequent bonding quality assessment, ensuring that the detection and analysis are only performed on the curved or cavity area where the dustproof net should actually be bonded, avoiding interference from invalid background areas on texture feature extraction and defect judgment. Dividing the bonding area into multiple sub-regions is to adapt to the non-uniform distribution of the geometric morphology and optical reflection characteristics within the bonding area. By adaptively subdividing based on the consistency of local texture structure, independent and refined evaluation of the bonding state of different local areas can be achieved. This division enables the detection system to identify and locate the specific spatial position of small three-dimensional defects such as local bubbles or collapses, avoiding the submergence of local abnormal information caused by the overall area averaging process, thereby improving the spatial resolution and targeted screening capability of defect detection.

[0039] Optionally, step S120 above, which determines the bonding area based on the multi-angle images before bonding, includes: performing foreground segmentation on each viewpoint image before bonding, extracting the foreground area of ​​the headphone speaker assembly; extracting corner points within the foreground area, and determining the bonding area of ​​the dustproof mesh based on the spatial distribution of the corner points.

[0040] The foreground segmentation mentioned above refers to the image processing process that separates the headphone speaker component from the background base at the pixel level based on the difference in image grayscale or color features. By using adaptive thresholding or edge contour extraction, the pixels belonging to the component are marked as the foreground region, thereby eliminating the interference of the background environment on subsequent feature analysis and obtaining a clean image region containing only the component to be detected.

[0041] Corner points are local feature points in an image that have high curvature or significant gradient changes. In light reflection texture images, they appear as turning points, intersections, or locations of abrupt changes in intensity along light paths, corresponding to the geometric corners or texture boundaries of the internal surfaces of a component. Extracting these feature points using corner detection algorithms can capture key structural points within the component, providing a discretized spatial reference benchmark for subsequent region segmentation and fitting change evaluation. It is understood that the aforementioned corner detection algorithms are mature existing technologies; their specific implementation schemes and working principles can be found in related technologies, and will not be elaborated upon in the embodiments of this application.

[0042] Determining the bonding area based on the spatial distribution of corner points refers to using the geometric topological relationship of the extracted set of corner points to determine the outer contour boundary of the corner point distribution through convex hull algorithm or connected component analysis. The continuous pixel area enclosed by this boundary is determined as the bonding area that the dustproof net should theoretically cover. The geometry and area of ​​this area reflect the actual spatial range of the bonding surface inside the component, and a physical boundary benchmark for bonding quality assessment is established.

[0043] In the implementation of the above scheme, foreground segmentation ensures accurate separation of the detection target from the background, corner point extraction captures the distribution of structural feature points inside the component, and region determination based on the spatial distribution of corner points transforms these discrete features into continuous spatial region definitions. The three work together to achieve accurate mapping from the original image to the region of interest for the detection, providing accurate geometric benchmarks and spatial range constraints for subsequent sub-region division and fitting effectiveness calculation.

[0044] Optionally, step S120 of dividing the fitable area into multiple sub-regions includes: calculating the path validity of each corner point within the fitable area and the path validity similarity index and structural correlation index between each corner point; calculating the aggregation weight between corner points based on the path validity similarity index and structural correlation index; aggregating corner points whose aggregation weights meet the preset aggregation conditions into a corner point group, and determining the sub-region based on the enclosing area of ​​the corner point group.

[0045] The path validity mentioned above is a quantitative indicator characterizing the concentration and local saliency of light reflection texture at a corner point, used to evaluate the weight and reliability of the corner point in characterizing changes in bonding quality. In the bonding detection system based on light reflection texture, path validity reflects the integrity of the light path around a specific corner point as a structural positioning reference and the prominence of the corner point relative to the neighborhood texture. A corner point with higher path validity means that its location has richer optical contrast information and more concentrated light change characteristics, and is more sensitive to texture truncation effects during the dustproof mesh bonding process. Therefore, it has higher confidence as a key feature point for sub-region division and bonding quality evaluation. By calculating the path validity of each corner point, the response capability of different positions inside the component to changes in bonding state can be distinguished, providing an objective quantitative basis for subsequent adaptive sub-region division based on feature similarity, and ensuring that the sub-region boundary matches the consistency of the internal optical structure.

[0046] The above step S120 can calculate the path validity of the corner point in at least one of the following ways:

[0047] The first approach: structural importance assessment based on texture path length normalization;

[0048] In this approach, the geometric proportion of the texture edge passing through the target corner point in the overall edge structure can be statistically analyzed to reflect the representative weight of the corner point's location on the overall light path. The reliability of the corner point as a sensitive detection benchmark for local illumination changes can be evaluated by combining the degree of dispersion of the corner point and its neighboring edge points in the brightness gradient. The effectiveness of the path is determined by the composite result of this structural importance weight and the degree of dispersion of the local gradient.

[0049] The second approach is to determine path effectiveness by analyzing the combined contribution of the spatial extension range of the texture edge around the corner and the local lighting contrast characteristics.

[0050] In this method, the positioning weight of the corner point in the overall structure can be determined based on the proportion of the coverage of the edge group passing through the corner point in space relative to the overall texture coverage of the fitable area. At the same time, the degree of light reflection change at the position is characterized by the cumulative difference in brightness gradient response between the corner point and its surrounding edge pixels. The fusion result of positioning weight and degree of change is used as a numerical representation of path effectiveness.

[0051] The third approach: employing a joint evaluation strategy based on edge geometric distribution and local optical contrast;

[0052] Optionally, the method for calculating the path effectiveness includes: extracting texture edges passing through corner points to form edge groups; calculating the ratio of the length of the edge group to the total length of all texture edges within the conformable area to obtain a measure of the concentration of light changes at the corner point; calculating the cumulative difference between the brightness gradient magnitude of each edge point within the edge group and the brightness gradient magnitude of the corner point to obtain a measure of the significance of the light distribution at the corner point; and combining the concentration of light changes and the significance of the light distribution to calculate the path effectiveness of the corner point.

[0053] The aforementioned texture edges refer to regions on the internal curved surface of an earphone speaker assembly that experience abrupt changes in light intensity under specific light source illumination, caused by variations in surface normals, differences in material reflectivity, or abrupt changes in microscopic geometry. These appear as pixel lines with significant brightness gradients in an image, their direction reflecting the reflection path of incident light on the internal surface of the assembly. They are the basic geometric units constituting identifiable light reflection textures. An edge group refers to a collection of texture edge pixels centered at a specific corner point or endpoint. This collection contains continuous light path segments originating from or terminating at that corner point, characterizing the spatial extension and geometric topological relationship of the local illumination distribution at that corner point. It is the fundamental data structure for evaluating the concentration of light variation features around that corner point. An optional implementation of the above scheme to form an edge group includes: performing edge detection operation on a local image region containing the target corner point, extracting a continuous pixel sequence with a brightness gradient magnitude exceeding a preset threshold as candidate texture edges; filtering out edge segments that pass through the pixel coordinates of the target corner point from the candidate texture edges; and aggregating and integrating all texture edge segments that pass through the corner point, marking them as edge groups belonging to the corner point, thereby establishing a topological association between the corner point and the local light reflection path.

[0054] Under specific light source illumination, the textured edges formed inside the headphone speaker assembly correspond to the reflection paths of light on the curved surface of the assembly, representing a geometric representation of the illumination distribution. An edge group, as a collection of textured edges passing through a specific corner, quantifies the spatial extension and structural complexity of the light reflection path at that corner location through its geometric length. The normalized ratio of the edge group length to the total length of all textured edges within the bonding area quantifies the weight of the light path associated with that corner in the overall illumination texture from a geometric topological perspective. A larger ratio indicates more convergent light reflection paths at that corner location, or a more complex local structure, meaning a higher concentration of light variation characteristics at that corner. This concentration measure effectively identifies key structural points most sensitive to changes in the dustproof mesh bonding state, as the abundant light reflection information at these corners is more easily disrupted or distorted by mesh occlusion or deformation after bonding, thus providing a spatial benchmark with high information weight for subsequent bonding effectiveness evaluation.

[0055] The brightness gradient magnitude of each edge point within the aforementioned edge group characterizes the rate of change in light reflection intensity at a local location, reflecting the drastic degree of local change in illumination characteristics at that point. Corner points, as characteristic extreme points of local geometry or illumination distribution, should theoretically exhibit a quantifiable deviation in brightness gradient magnitude from their surrounding edge points. Calculating the cumulative difference between the brightness gradient magnitude of a corner point and the brightness gradient magnitudes of all edge points within the edge group essentially quantifies the total difference in brightness contrast between the corner point and the surrounding texture light paths. A larger cumulative value indicates a higher degree of uniqueness in the light intensity change gradient at the corner point relative to smooth edges at other locations within the group, meaning the corner point has stronger indicative power in the local illumination distribution. In the bonding quality evaluation based on light reflection texture, highly indicative corner points signify that they are located at critical turning points in light direction or extreme positions in local illumination, with optical characteristics significantly different from the surrounding texture. This uniqueness makes it easier for the detection mechanism to capture changes in the optical properties of the corner point caused by occlusion or deformation after the dustproof net is attached, thus ensuring that the measurement can effectively identify the key feature points that are most sensitive to changes in the attachment state.

[0056] The above-mentioned calculation of the path effectiveness based on the concentration of light changes and the significance of light distribution can adopt a variety of fusion strategies: (1) adopt a multiplicative fusion strategy, multiply the two measures to achieve nonlinear coupling, so that the corner points that perform well in both structural importance and optical contrast are numerically amplified, while those that stand out in a single dimension are suppressed, thereby screening out the key feature points that are most sensitive to changes in the fitting state; (2) adopt a weighted linear combination strategy, assign structural weight coefficients and optical weight coefficients to the two measures respectively, and calculate the path effectiveness by linear weighted summation, and adapt to different surface complexities or lighting conditions by adjusting the weight ratio. The detection requirements are as follows: (3) A nonlinear mapping fusion strategy is adopted. First, the two measures are normalized to a unified dimension range, and then the nonlinear mapping function is used for fusion calculation. The nonlinear characteristics are used to adjust the discrimination of feature points in different value ranges to adapt to the detection sensitivity requirements of different types of fitting defects; (4) A conditional logic combination strategy is adopted. The two measures are set with dual thresholds. Only when the corner points meet the minimum reliability requirements are the effective path validity given. Otherwise, they are marked as low confidence feature points and removed. The hard threshold screening mechanism ensures that the corner points participating in the subsequent processing have sufficient structural representativeness and optical sensitivity.

[0057] The aforementioned structural correlation index is a comprehensive metric used to quantify the spatial geometric proximity and local surface structural consistency between different corner points within a fitable region. Its value reflects the physical proximity of two corner points, the geometric overlap range of the associated texture edges, and the similarity of the local illumination gradient direction. By integrating spatial distance information between corner points, the intersection range of edge groups, and optical response consistency, this index characterizes the degree of correlation between corner points in terms of three-dimensional geometry and surface reflection characteristics, providing an objective quantitative basis for adaptive sub-region division based on local structural similarity.

[0058] The aforementioned structural correlation index can be determined by a composite calculation of the Euclidean distance between corner points and the number of overlapping pixels in the edge group. Corner point pairs with closer spatial distance and larger edge group overlap range have higher structural correlation. Alternatively, it can be determined by a coupled calculation of gradient direction difference and spatial proximity, using the degree of gradient direction difference to characterize the richness of optical contrast information at two locations, and combining spatial distance to evaluate the similarity of local structures. Or, it can be determined based on a joint evaluation of geometric connectivity and optical consistency, comprehensively considering whether there is a continuous texture edge connection between corner points and the similarity of local brightness distribution, to reflect whether two corner points are located in similar illumination-affected areas and have similar geometric features.

[0059] The aforementioned aggregation weight is a quantitative indicator used to quantify the suitability of different corner points within a fitable region to form a unified sub-region. Its value comprehensively reflects the similarity of the effectiveness of the lighting feature paths between corner points and the closeness of the correlation of local geometric structures. By integrating the path effectiveness similarity index and the structural correlation index, this weight evaluates the fit of corner point pairs in terms of local texture consistency and spatial continuity. The higher the weight value, the more likely the two corner points are to be aggregated into the same corner point group to form a continuous sub-region, providing a direct decision basis for adaptive sub-region division based on local similarity.

[0060] The above aggregation weights can be obtained through at least one of the following methods: (1) Using a multiplicative fusion strategy, the path effectiveness similarity index and the structural correlation index are multiplied. The nonlinear coupling of the two dimensions of information is achieved through algebraic multiplication, so that only when the corner points have both high illumination feature similarity and strong structural correlation can a high aggregation weight be obtained. Corner point pairs that are not good in either dimension will be given low weights and excluded from the aggregation candidates, thereby ensuring that the corner point groups formed by aggregation have highly consistent local textures and close spatial connections. (2) Using a weighted linear combination strategy, the path effectiveness similarity index and the structural correlation index are assigned illumination consistency weight coefficients and structural continuity weight coefficients, respectively. The aggregation weights are calculated by linear weighted summation. The illumination consistency weight reflects the priority of local optical feature similarity in sub-region division, and the structural continuity weight reflects the importance of geometric spatial proximity in maintaining regional connectivity. By adjusting the ratio of the two weight coefficients, the sub-region division requirements under different surface complexities or uneven illumination conditions can be adapted. (3) A normalization mapping fusion strategy is adopted. First, the path effectiveness similarity index and the structural correlation index are numerically normalized and mapped to a unified numerical range. Then, the aggregation weight is calculated by multiplying or weighted summing the normalized values. Normalization is used to eliminate the difference between the original dimensions and numerical ranges of the two indices, ensuring that the contribution of illumination feature similarity and structural correlation in the aggregation decision is at a comparable benchmark, and improving the universality and cross-sample consistency of the corner aggregation threshold setting.

[0061] The aforementioned preset aggregation conditions refer to the criteria or threshold used to determine whether the aggregation weights between corner points meet the requirements for forming a corner point group. These conditions set the minimum correlation standard that corner points must meet to be aggregated into the same group. Only when the aggregation weights between corner points are greater than or equal to the numerical or logical requirements specified by the preset conditions are these corner points allowed to be included in the same corner point group and the sub-region is determined based on its enclosing area. This ensures that the generated sub-region has sufficient local texture consistency and structural continuity, and avoids incorrectly aggregating corner points with excessive feature differences or weak spatial correlation, which would lead to excessive heterogeneity within the sub-region.

[0062] When setting preset aggregation conditions, the geometric complexity of the bonding area, the uniformity of the distribution of illumination texture, and the requirements of the detection system for the accuracy of local defect positioning can be comprehensively considered. Specifically, when the surface curvature of the bonding area changes drastically or the illumination distribution is uneven, the preset aggregation conditions can be appropriately relaxed to allow for a larger range of corner point aggregation, ensuring that the sub-region covers the complete local structure. When it is necessary to finely identify small bonding defects, the preset aggregation conditions can be tightened to improve the granularity of the sub-region division, making the coverage area of ​​each sub-region smaller, thereby improving the spatial resolution of defect positioning. At the same time, the overall area of ​​the bonding area and the corner point density can be dynamically adjusted to balance the number of sub-region divisions and the computational load of subsequent bonding effectiveness calculations.

[0063] For the corner point group formed by aggregation, the two-dimensional spatial coordinate set of all corner points inside it is extracted. The convex hull algorithm is used to construct the smallest convex polygon containing all corner points of the corner point group. The closed region defined by the convex polygon is the enclosing region of the corner point group. Its boundary is composed of line segments connecting the extreme points of the outer periphery of the corner point group. The interior contains all corner points and the continuous pixel space between adjacent corner points, thereby transforming the discrete corner point set into a continuous sub-region candidate range with clear geometric boundaries.

[0064] Step S130: For each sub-region, extract the texture edge features formed by light reflection texture within the sub-region, compare the changes in texture edge features before and after bonding, and calculate the bonding effectiveness index of each sub-region.

[0065] The above step S130 can extract texture edge features in at least one of the following ways: (1) In the image before bonding, extract the corner points inside the sub-region as a set of texture feature points; in the image after bonding, determine the corresponding mapping region based on the spatial position of the sub-region in the image before bonding, and extract the corner points in the mapping region as a set of texture feature points after bonding. (2) In the image before bonding, perform edge detection on the sub-region, extract the light reflection texture edges inside the sub-region to form a set of texture edge line segments; in the image after bonding, determine the corresponding mapping region based on the spatial position of the sub-region in the image before bonding, perform edge detection on the mapping region, and extract the light reflection texture edges in the mapping region to form a set of texture edge line segments. (3) In the image before bonding, extract the set of corner points formed by light reflection texture inside the sub-region, and extract the texture edge passing through the corner point to form an edge group for each corner point. The set of corner points and the edge group corresponding to each corner point are used together as the texture edge feature of the sub-region. In the image after bonding, determine the corresponding mapping region according to the spatial position of the sub-region in the image before bonding, and extract the set of corner points and the edge group corresponding to each corner point within the mapping region.

[0066] Optionally, the above calculation of the bonding effectiveness index for each sub-region includes: in the multi-angle image after bonding, determining the corresponding mapping region based on the spatial position of the sub-region in the image before bonding, and extracting the corner points within the mapping region; establishing the correspondence between the corner points before bonding within the sub-region and the corner points after bonding within the mapping region; calculating the degree of difference in the number of corner points before and after bonding within the sub-region, as well as the positional offset distance between the corresponding corner points before and after bonding; and determining the bonding effectiveness index of the sub-region based on the degree of difference in the number and the positional offset distance.

[0067] The aforementioned mapped region refers to the corresponding region in the multi-angle images acquired after the dustproof net is bonded, which has the same spatial range and geometric position in pixel coordinate space as the determined sub-region in the image before bonding. The boundary of this region in the image after bonding is directly mapped by the corner coordinates or enclosing contour of the sub-region before bonding. It is used to characterize the actual optical state within this local spatial range after the dustproof net is bonded, and is the basic comparison unit for evaluating texture changes before and after bonding and calculating bonding effectiveness indicators. The two-dimensional pixel coordinate range or geometric boundary information of the sub-region in the image before bonding can be directly used to locate the image region with the same pixel coordinate index in the image after bonding from the same shooting perspective. It can be understood that since the images before and after bonding are acquired from the same optical camera and maintain the same spatial perspective and imaging geometry, the pixel coordinates of the sub-region in the image before bonding can be directly used as the search range in the image after bonding, thereby extracting the mapped region corresponding to the spatial position in the image after bonding, ensuring that the texture feature comparison before and after bonding is based on strict spatial alignment.

[0068] The above scheme establishes a correspondence between the corner points before bonding within a sub-region and the corner points after bonding within the mapped region. This aims to achieve precise spatial alignment and individualized change tracking of local texture features before and after bonding. By determining a unique corresponding corner point for each corner point before bonding in the bonding state, a one-to-one feature matching mapping is established, thereby accurately quantifying the degree of disturbance to the texture structure at a specific spatial location caused by the bonding of the dustproof net. The establishment of this correspondence enables the detection system to accurately calculate the difference in the number of corner points before and after bonding to assess the density of texture truncation. At the same time, by measuring the Euclidean distance between corresponding corner points, the spatial displacement of local deformation is quantified, providing a reproducible numerical basis for comprehensively evaluating the bonding effectiveness of sub-regions. This avoids the loss of local abnormal information due to feature point mismatch or global averaging, ensuring that the bonding quality assessment can accurately reflect the true bonding state of each sub-region in three-dimensional space.

[0069] The above-mentioned optional implementation methods for establishing the correspondence between the front corner point of the sub-region and the rear corner point of the mapping region include:

[0070] The first implementation method: establish a correspondence based on the spatial proximity criterion;

[0071] Optionally, the above-mentioned establishment of the correspondence between the front corner point of the sub-region and the back corner point of the mapping region includes: for each front corner point of the sub-region, determining the back corner point of the mapping region with the smallest spatial distance to it as the corresponding corner point of the front corner point, so as to establish the correspondence between the front and back corner points.

[0072] The above scheme establishes a one-to-one correspondence between the corner points before and after bonding based on the spatial geometric proximity criterion. The mechanism is that for each extracted corner point before bonding in a sub-region, all corner points after bonding are traversed and searched in the mapping region. The Euclidean spatial distance between each corner point after bonding and the corresponding corner point before bonding is calculated. The corner point with the smallest spatial distance is determined as the unique corresponding corner point of the corresponding corner point before bonding, thus establishing a matching mapping based on the nearest neighbor principle. This correspondence establishment method ensures that the feature points with the closest geometric positions are matched as the optical representations of the same physical position in different temporal states before and after bonding with the dustproof net. By minimizing the feature point association under the assumption of spatial displacement, the subsequently calculated position offset distance can accurately reflect the actual geometric deformation or texture displacement of the local position caused by the bonding operation. At the same time, it avoids the computational overhead caused by complex feature descriptor calculations, improves processing efficiency while ensuring spatial alignment accuracy, and is suitable for application scenarios where the imaging system has good spatial stability and the viewing angle before and after bonding is strictly consistent.

[0073] The second implementation method: establish a correspondence based on the similarity of local feature descriptors;

[0074] In this embodiment, for each pre-fitting corner point in the sub-region, the texture feature descriptor in its neighborhood is extracted, and the corresponding feature descriptor of each post-fitting corner point is extracted in the mapping region. By calculating the similarity distance between the feature descriptors, the post-fitting corner point with the highest similarity is determined as the corresponding corner point, thereby establishing a correspondence based on the similarity of local texture structure. This is suitable for scenes with slight viewpoint shifts or lighting changes.

[0075] The third implementation method: establishing a correspondence based on topological proximity constraints;

[0076] In this embodiment, when determining the corresponding corner point, not only the spatial distance or feature similarity of a single corner point is considered, but also the consistency of the connection relationship between the corner point and its neighboring corner points is comprehensively evaluated. It is required that the matching corner point pairs not only have similar individual features, but also that their respective sets of neighboring corner points have corresponding matching relationships. The global rationality of the corresponding relationship at the spatial layout level is ensured through topological consistency verification, avoiding structural misalignment caused by local optimal matching.

[0077] The fourth implementation method: establish the correspondence using a bidirectional nearest neighbor verification mechanism;

[0078] In this embodiment, preliminary matching based on spatial distance or feature similarity can be performed first to determine candidate corresponding corner points. Then, reverse verification is performed to see if the candidate corner point after bonding is also matched with the corner point before bonding as its nearest neighbor or with the highest similarity. The correspondence is confirmed only when both bidirectional matching is satisfied. The reliability of establishing the correspondence is improved by eliminating erroneous matching caused by feature loss or noise interference through mutual consistency verification.

[0079] The degree of difference in the number of corner points before and after bonding within the aforementioned sub-region is a quantitative indicator characterizing the effect of dustproof mesh bonding on the local texture structure coverage and truncation effect. Its value reflects the magnitude of change in the number of detectable texture feature points within the sub-region before and after bonding. This degree of difference is assessed by comparing the total number of corner points extracted from the sub-region in the image before bonding with the total number of corner points extracted from the corresponding mapped region in the image after bonding. The greater the difference in number, the more severe the light reflection texture in the region is blocked or truncated after bonding, or the more significant the corner point detection failure caused by local deformation, thus indicating the probability of bonding incompleteness or the existence of local defects. The degree of difference can be calculated using the absolute difference method, which directly calculates the absolute value of the arithmetic difference between the number of corner points before and after bonding to obtain the overall scale of the change in the number of corner points; or it can be calculated using the normalized difference method, which calculates the ratio of the absolute difference to the total number of corner points before bonding or the edge length of the sub-region to obtain the relative rate of change or the change in line density, so as to eliminate the influence of differences in the area or initial texture density of different sub-regions on the comparability of absolute values, and to provide a unified quantitative benchmark for the bonding quality differences between different sub-regions.

[0080] The aforementioned positional offset distance between the corner points before and after bonding is a quantitative indicator characterizing the spatial displacement of the local texture structure caused by the bonding of the dustproof mesh. Its value reflects the degree of offset of a specific spatial position relative to its original geometric position before and after the bonding operation. This offset distance is quantified by measuring the spatial interval between the corner point before bonding and its corresponding corner point after bonding, which have established a correspondence, in the image pixel coordinate system. The larger the offset distance, the more significant the three-dimensional deformation such as bubbling and collapse caused by uneven bonding pressure or mesh stretching at that local position, or the more obvious the slippage of the internal structure of the component caused by the bonding operation, thus indicating the spatial distribution of abnormal bonding quality. Positional offset distance can be calculated using Euclidean distance, which involves calculating the square root of the sum of the squares of the differences in the horizontal and vertical coordinates of each pair of corresponding corner points before and after the snapping, thus obtaining the straight-line distance between the corner point pairs. Alternatively, a normalized offset method can be used, which involves calculating the ratio of the Euclidean distance to the maximum pixel spacing or the diagonal length of the sub-region to obtain the relative offset ratio. This eliminates the influence of differences in the scale of different sub-regions on the comparability of absolute distances, providing a unified evaluation benchmark for the degree of snapping deformation between sub-regions of different sizes.

[0081] The aforementioned bonding effectiveness index is a comprehensive metric used to quantitatively evaluate the three-dimensional bonding quality of the dustproof net within a specific sub-region. Its value reflects the degree to which the dustproof net maintains the texture edge morphology of the local area and the physical consistency of the bonding operation by integrating the degree of change in the number of corner points before and after bonding with the spatial offset distance between the corresponding corner points. The higher the index value, the closer the light reflection texture in the sub-region after bonding is to the reference state before bonding, that is, the higher the bonding tightness between the dustproof net and the local area and the better the three-dimensional adaptation. Conversely, it indicates the presence of quality abnormalities such as bonding bubbles, collapse, or incomplete bonding. The fit effectiveness index can be calculated using a multiplicative fusion method, which multiplies the degree of difference in the number of corner points by the cumulative value of the corresponding corner point position offset distance. This algebraic multiplication achieves non-linear coupling between the texture truncation effect and the geometric deformation effect, allowing sub-regions with both high texture occlusion and high position offset to have their values ​​amplified, thus highlighting areas with severe fit defects. Alternatively, a weighted linear combination method can be used, assigning texture integrity weights and geometric consistency weights to the degree of difference in number and position offset distance, respectively. A comprehensive evaluation of the two dimensions is achieved through linear weighted summation, and the weight ratio can be adjusted to meet the detection requirements of different defect types. During the calculation, a sub-region scale normalization strategy can be adopted, which normalizes the ratio of the difference in number to the sub-region edge length and the ratio of the position offset distance to the maximum pixel spacing of the sub-region, in order to eliminate the influence of the area difference of different sub-regions on the comparability of the index.

[0082] Step S140: Based on the distribution characteristics of the bonding effectiveness index of each sub-region, filter and identify bonding abnormal areas.

[0083] The distribution characteristics of the aforementioned bonding effectiveness indicators refer to the numerical distribution pattern and dispersion of the bonding effectiveness indicators corresponding to each sub-region within the spatial range of the bonding area. This characterizes the non-uniform distribution of the dustproof net bonding quality on the overall bonding surface. These characteristics encompass the spatial mapping relationship, numerical concentration trend, dispersion, and extreme value distribution of the bonding effectiveness indicators for each sub-region. By analyzing the distribution pattern of these indicators on a two-dimensional plane, the aggregation pattern and boundary transition characteristics of bonding quality anomalies can be identified, thus providing a statistical basis for targeted screening of local defect areas. One optional method for obtaining the distribution characteristics of the bonding effectiveness indicators includes: after calculating the bonding effectiveness indicators for each sub-region, constructing a three-dimensional or two-dimensional distribution map with the spatial location of the sub-region as the horizontal and vertical coordinates and the bonding effectiveness indicator values ​​as height values ​​or color codes; by performing numerical normalization and threshold segmentation on this distribution map, sub-regions with indicator values ​​lower than a preset judgment standard are marked as candidate bonding anomalies, and the spatial connectivity and neighborhood distribution density of the anomaly areas are further statistically analyzed to determine the final distribution characteristics of the bonding anomaly areas.

[0084] Optionally, step S140 includes: determining the bonding abnormality of each sub-region based on the bonding effectiveness index calculated under each shooting angle; and combining the bonding abnormality determination results of the same component under each shooting angle, when the same sub-region is determined to be bonding abnormal under each shooting angle, confirming the sub-region as a bonding abnormal region.

[0085] The above-mentioned method of determining bonding anomalies based on each shooting angle aims to overcome the problem of missing local texture information caused by surface occlusion, perspective distortion, or uneven lighting that may exist under a single perspective by utilizing the complementary spatial information provided by multi-view imaging. Since the bonding area inside the headphone speaker assembly usually has a complex three-dimensional curved surface structure, a single-view camera may not be able to fully capture the changes in light reflection texture in some local concave or convex areas due to the limitation of the viewpoint. By independently calculating the bonding effectiveness index under different spatial perspectives and determining anomalies separately, it can be ensured that each sub-region has undergone quality assessment under its most favorable observation perspective.

[0086] Integrating the results of the same component’s fit anomaly determination under different shooting angles is a key step in improving detection reliability through a cross-view consistency verification mechanism. This integrated strategy is based on the consistency principle of solid geometry, that is, real physical fit defects (such as local blistering or collapse) should show detectable texture anomaly features in imaging from multiple different viewpoints, while false anomalies caused by accidental noise, dust particles or temporary lighting disturbances under a single viewpoint are unlikely to appear simultaneously under all viewpoints.

[0087] The strict standard of only confirming a sub-region as an anomalous bonding area when it is judged as such under all shooting angles is essentially a fault-tolerant mechanism that implements multi-view cross-validation. This standard effectively eliminates false positive detection results caused by single-view imaging noise or accidental changes in local illumination by requiring that defect evidence be repeatable and consistent across viewing angles. Only when the defect actually exists in physical space and affects the optical reflection characteristics of the sub-region under multiple viewing angles will it be finally marked as an anomalous bonding area, thereby reducing the false detection rate and improving the detection system's confidence in identifying real bonding quality defects.

[0088] Optionally, the above-mentioned determination of fitting anomalies for each sub-region includes: normalizing the fitting effectiveness index of each sub-region to obtain a normalized fitting effectiveness index; comparing the normalized fitting effectiveness index with a preset fitting effectiveness determination threshold, and dividing each sub-region into a fitting effective region and a fitting ineffective region based on the comparison result; marking the fitting effective region and the fitting ineffective region with differentiated visual labels respectively, and generating a visual detection result image for output.

[0089] The above scheme normalizes the fitting effectiveness index of each sub-region to eliminate the inconsistency in the original index value range caused by differences in area scale, initial texture density or geometric complexity between different sub-regions. By mapping the fitting effectiveness index to a unified normalized value range (e.g., a closed interval between zero and one), a normalized fitting effectiveness index is obtained, thereby making the fitting quality level between different sub-regions directly comparable, avoiding judgment bias caused by differences in dimensions or scales, and laying a quantitative foundation for subsequent anomaly screening based on a unified threshold standard.

[0090] The preset bonding effectiveness judgment threshold is a numerical threshold that serves as the boundary standard for bonding quality qualification. By comparing the normalized bonding effectiveness index of each sub-region with the value of this threshold, each sub-region is clearly divided into a bonding effective region (the index meets or exceeds the threshold requirement) and a bonding ineffective region (the index is worse than the threshold requirement) based on the comparison results. This enables the binary discrete judgment of continuous bonding quality index and establishes an objective binary classification standard to distinguish the spatial distribution of normal bonding and abnormal bonding.

[0091] Using differentiated visual labels to mark the effective and ineffective bonding areas refers to using color coding or graphic markings with significant visual differentiation (e.g., green for effective bonding areas and red for ineffective bonding areas) to intuitively mark the spatial location of different categories of sub-regions in the inspection result image, and generating a visual inspection result image containing these marking information for output. This allows operators to quickly identify the spatial distribution and range of bonding defects, achieving intuitive presentation and traceable recording of bonding quality inspection results.

[0092] To facilitate understanding of the working principle of the vision-based method for detecting the integrity of the dustproof mesh on headphone speakers, this application embodiment also provides a specific application example of this method in a certain application scenario. In this application scenario, the vision-based method for detecting the integrity of the dustproof mesh on headphone speakers may include:

[0093] Step 1: Deploy optical cameras on the bonding equipment to photograph the bonding area of ​​the dustproof net;

[0094] A visual inspection module is deployed around the mold base of the existing bonding equipment. This includes: illuminating the speaker assembly with a ring light source to create a recognizable light reflection texture on the internal curved surface of the assembly, highlighting the internal texture and the deformation of the dustproof mesh edges; arranging optical cameras at 30° intervals around the ring light source, with the optical focus of each camera converging at the center of the mold base to ensure that each camera can capture the speaker assembly to be processed; activating the cameras and controlling each camera to capture images of the same component before and after the bonding process, obtaining pre-bonding and post-bonding images from various shooting angles, and marking them according to camera number and shooting time (e.g., the image taken by camera C4 is recorded as...). and (where a and b represent the images before and after bonding, respectively), to establish the temporal relationship between the images before and after bonding from the same shooting perspective, and transmit the images to the central cloud server for subsequent processing via data cable.

[0095] Step 2: Determine the bonding area based on multi-angle images before bonding;

[0096] Foreground segmentation was performed on images from various perspectives before bonding. The OTSU (Otsu thresholding method) adaptive thresholding method was used to process the images, separating the headphone speaker component area from the base background and extracting the foreground region of the headphone speaker component. The FAST corner detection tool was used to extract corners within the foreground region. A convex hull algorithm was used to perform connected component analysis on the corner region, and the convex hull-enclosed area was determined as the bonding area for the dustproof net based on the spatial distribution of the corners. It is understood that the aforementioned OTSU adaptive threshold method, convex hull algorithm, etc., are all mature existing technologies. For their specific implementation methods and working principles, please refer to the relevant technologies. The embodiments in this application will not be repeated here.

[0097] Step 3: Divide the fitable area into multiple sub-areas;

[0098] Perform Canny edge detection on the foreground image to extract texture edges and calculate the path validity at each corner point within the fitable region. :

[0099] ;

[0100] in, Indicates passing through a corner point Length of the edge group; Represents the total length of all texture edges within the foreground region; ratio It can reflect the concentration of light change characteristics at the current corner point; Representing corner points The brightness gradient magnitude at that location; Represents edge points within an edge group The brightness gradient magnitude; This represents the average brightness gradient of all pixels within the edge group;

[0101] Evaluate the path effectiveness similarity and structural correlation between corner points, and calculate the aggregation weight between corner points. :

[0102] ;

[0103] in, and Corner points With corner points Path efficiency, ratio It can reflect the similarity of path effectiveness; Corner point With corner points The number of overlapping pixels in the corresponding edge group; The Euclidean distance between the two corner points; and These are the gradient vectors at the two corner points; This is a gradient vector similarity measure. Aggregated weights can comprehensively reflect the similarity of lighting features and the correlation of local structures between corner points.

[0104] The `premnmx` function is used to normalize the aggregation weights to the range [−1, 1]. Corner points with aggregation weights greater than or equal to 0.4 are selected and aggregated into corner point groups. The area of ​​the enclosing region of the corner point group is extracted using the convex hull algorithm. This enclosing region is then compared with the fitable region. The intersection of their areas is used as the current sub-region. This completes the division of the fitable area into multiple sub-regions.

[0105] Step 4: Calculate the adhesion effectiveness index for each sub-region;

[0106] In the multi-angle image after bonding, based on sub-regions Determine the corresponding mapping region based on the spatial coordinates of the image before bonding; extract the corner points within the mapping region; for each pre-bonding corner point within the sub-region, determine the post-bonding corner point with the smallest spatial distance from it within the mapping region as the corresponding corner point of the pre-bonding corner point, and establish the correspondence between the pre-bonding and post-bonding corner points.

[0107] Calculate the degree of difference in the number of corner points before and after bonding within a sub-region, as well as the corresponding positional offset distance between the corner points before and after bonding. Determine the bonding effectiveness index of the sub-region based on the degree of difference in number and the positional offset distance. :

[0108] ;

[0109] in, To fit the sub-region in the previous image Number of corner points; This represents the number of corner points within the corresponding mapped area after the fit is achieved. sub-region Edge length; ratio It can reflect the density of changes in the number of corner points before and after bonding; To fit the front corner point Its nearest corresponding corner point in the image after lamination The Euclidean distance between them; sub-region The longest distance between two pixels within the range; It can reflect the relative magnitude of the corner point position offset.

[0110] Finally, the sub-regions are calculated by traversing all the front corner points. Fitting effectiveness index .

[0111] Step 5: Based on the distribution characteristics of the bonding effectiveness index of each sub-region, filter and identify bonding abnormal areas;

[0112] The Sigmoid function is used as an indicator of the fit effectiveness of each sub-region. Normalization is performed to map the value range to the [0,1] interval to obtain a normalized fitting effectiveness index. The normalized fitting effectiveness index is compared with the preset fitting effectiveness judgment threshold of 0.7. Sub-regions with normalized effectiveness greater than 0.7 are marked as fitting effective regions, and those less than or equal to 0.7 are marked as fitting invalid regions.

[0113] Based on the bonding effectiveness index calculated under each shooting angle, bonding anomalies are determined for each sub-region. The bonding anomaly determination results of the same component under each shooting angle are combined. When the same sub-region is determined to be bonding abnormal under each shooting angle, the sub-region is finally confirmed as the bonding abnormal region to eliminate misjudgment caused by single-view imaging noise.

[0114] Differentiated visual identifiers are used to mark the effective bonding area and the ineffective bonding area. Green is used to mark the effective bonding area and red is used to mark the ineffective bonding area. A visual inspection result image containing these color marks is generated and output through a display device to complete the online monitoring and defect location of the current dustproof net bonding quality.

[0115] like Figure 2 As shown, based on the same inventive concept, this application also provides a vision-based detection system 200 for the integrity of the dustproof mesh of an earphone speaker, including: a central cloud server 210 and a vision module 220 communicatively connected to the central cloud server 210, wherein:

[0116] The vision module 220 is used to acquire multi-angle images of the headphone speaker assembly under test before and after the dustproof mesh is attached, and send them to the central cloud server 210. The vision module includes a specific light source and optical cameras arranged at multiple different shooting angles. The specific light source is used to illuminate the attachment area of ​​the headphone speaker assembly under test when acquiring multi-angle images, so as to form a recognizable light reflection texture inside the assembly.

[0117] The central cloud server 210 is used to acquire multi-angle images; based on the multi-angle images before bonding, the bonding area is determined and divided into multiple sub-regions; for each sub-region, the texture edge features formed by light reflection texture are extracted, and the changes in texture edge features before and after bonding are compared to calculate the bonding effectiveness index of each sub-region; based on the distribution characteristics of the bonding effectiveness index of each sub-region, bonding abnormal areas are screened and identified.

[0118] The aforementioned vision module 220 is an image acquisition and execution unit deployed at the headphone speaker dustproof mesh bonding station. It consists of a specific light source and an array of optical cameras arranged at multiple different shooting angles. The specific light source is installed in a ring arrangement above the bonding area of ​​the component under test. It is used to project directional incident light onto the internal curved surface of the component during image acquisition, so as to form a recognizable light reflection texture with a regular pattern of light and dark contrast inside the component. The optical cameras are distributed at specific angle intervals around the ring light source. The optical focus of each camera converges at the center of the mold base to ensure the consistency of the imaging geometry. Before and after the dustproof mesh bonding process, this module triggers each camera to take multi-angle pictures of the same component under test, acquiring pre-bonding and post-bonding images with temporal correlation. The acquired image data is then transmitted to the central cloud server 210 in real time through a data communication link.

[0119] The central cloud server 210 is the core computing unit responsible for image data processing and bonding quality analysis and decision-making. After receiving multi-angle image data sent by the vision module 220 through the communication interface, it sequentially executes the algorithm flow of determining the bonding area, adaptively dividing the sub-regions, calculating the bonding effectiveness index, and filtering abnormal areas. It can be understood that the central cloud server 210 can implement any one of the functions of the aforementioned vision-based method for detecting the bonding integrity of headphone speaker dustproof mesh. For the implementation methods and working principles of each function, please refer to the method embodiment; the system embodiment will not be repeated here.

[0120] This invention is now complete.

[0121] In summary, in this embodiment of the invention, multi-angle images of the headphone speaker assembly under test before and after the dustproof mesh is applied are acquired. During the acquisition of these multi-angle images, a specific light source is used to illuminate the application area of ​​the headphone speaker assembly under test, forming a recognizable light reflection texture within the assembly. Based on the multi-angle images before application, the application area is determined and divided into multiple sub-regions. For each sub-region, texture edge features formed by the light reflection texture are extracted, and the changes in texture edge features before and after application are compared to calculate the application effectiveness index for each sub-region. Based on the distribution characteristics of the application effectiveness index for each sub-region, abnormal application areas are screened and identified. This application combines multi-angle two-dimensional image acquisition with internal light reflection texture analysis to effectively identify three-dimensional bonding anomalies of dustproof netting without relying on laser ranging, overcoming the technical limitations of existing planar visual inspection that cannot perceive depth deformation. Furthermore, by using the light reflection texture formed inside the component by a specific light source as a detection benchmark, and analyzing the interception and disturbance of light paths caused by dustproof netting bonding, the difficult-to-observe three-dimensional deformation is transformed into quantifiable image feature changes, improving the objectivity and accuracy of the detection. Moreover, by adaptively dividing the bonding area into multiple sub-regions and calculating bonding effectiveness indices for each, anomaly screening is performed based on the distribution characteristics of each sub-region, enabling precise location of minor defects such as localized bulging or collapse, avoiding missed detections caused by overall evaluation. Finally, by comparing the composite index of changes in the number and positional shift of corner points within the sub-regions before and after bonding, the degree to which the dustproof netting bonding maintains the edge morphology of the internal texture is quantified, providing a reproducible numerical basis for identifying three-dimensional bonding defects and improving the objectivity and consistency of the detection results.

[0122] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A vision-based method for detecting the integrity of the dustproof mesh on an earphone speaker, characterized in that, The method includes: Acquire multi-angle images of the headphone speaker assembly under test before and after the dustproof mesh is applied; wherein, when acquiring the multi-angle images, a specific light source is controlled to illuminate the application area of ​​the headphone speaker assembly under test, so as to form a recognizable light reflection texture inside the assembly. Based on the multi-angle images before bonding, the bonding area is determined and the bonding area is divided into multiple sub-regions; For each sub-region, the texture edge features formed based on the light reflection texture within the sub-region are extracted, and the changes in the texture edge features before and after bonding are compared to calculate the bonding effectiveness index for each sub-region, specifically including: In the multi-angle image after bonding, based on sub-regions Determine the corresponding mapping region based on the spatial coordinates of the image before bonding; extract the corner points within the mapping region; for each pre-bonding corner point within the sub-region, determine the post-bonding corner point with the smallest spatial distance from it within the mapping region as the corresponding corner point of the pre-bonding corner point, and establish the correspondence between the pre-bonding and post-bonding corner points. Calculate the degree of difference in the number of corner points before and after bonding within a sub-region, as well as the corresponding positional offset distance between the corner points before and after bonding. Determine the bonding effectiveness index of the sub-region based on the degree of difference in number and the positional offset distance. : ; in, To fit the sub-region in the previous image Number of corner points; This represents the number of corner points within the corresponding mapped area after the fit is achieved. sub-region Edge length; ratio It can reflect the density of changes in the number of corner points before and after bonding; To fit the front corner point Its nearest corresponding corner point in the image after lamination Euclidean distance between them; sub-region The longest distance between two pixels within the range; It can reflect the relative magnitude of the corner point position offset; Finally, the sub-regions are calculated by traversing all the front corner points. Fitting effectiveness index ; Based on the distribution characteristics of the bonding effectiveness index of each sub-region, bonding abnormal regions are screened and identified, specifically including: Based on the bonding effectiveness index calculated from each shooting angle, bonding anomalies are determined for each sub-region, specifically including: The fitting effectiveness index of each sub-region is numerically normalized to obtain a normalized fitting effectiveness index. The normalized bonding effectiveness index is compared with the preset bonding effectiveness judgment threshold, and each sub-region is divided into bonding effective region and bonding ineffective region based on the comparison result. Differentiated visual identifiers are used to mark the effective bonding area and the ineffective bonding area respectively, and a visual detection result image is generated and output. Based on the combined results of the fitting abnormality judgment of the same component under various shooting angles, when the same sub-region is judged to be fitting abnormally under all shooting angles, the sub-region is confirmed as the fitting abnormality region.

2. The vision-based method for detecting the integrity of the dustproof mesh of an earphone speaker according to claim 1, characterized in that, The acquisition of multi-angle images of the headphone speaker assembly under test before and after the dustproof mesh is applied includes: Before and after the dustproof mesh bonding process, optical cameras positioned at multiple different shooting angles are controlled to take pictures of the same component under test, obtaining images before and after bonding from each shooting angle. The images before and after bonding are marked according to the shooting angle to establish a temporal correlation between the images before and after bonding under the same shooting angle.

3. The vision-based method for detecting the integrity of the dustproof mesh of an earphone speaker according to claim 1, characterized in that, The determination of the bonding area based on the multi-angle image before bonding includes: Foreground segmentation is performed on images from different viewpoints before bonding to extract the foreground region of the headphone speaker assembly; The corner points within the foreground area are extracted, and the applicable area of ​​the dustproof net is determined based on the spatial distribution of the corner points.

4. The vision-based method for detecting the integrity of the dustproof mesh of an earphone speaker according to claim 1, characterized in that, The step of dividing the fitable area into multiple sub-regions includes: Calculate the path effectiveness of each corner point within the fitable area, as well as the path effectiveness similarity index and structural correlation index between each corner point; Based on the path effectiveness similarity index and the structural correlation index, the aggregation weight between the corner points is calculated; Wherein, the aggregate weight between the corner points The calculation formula is as follows: ; in, and Corner points With corner points Path efficiency, ratio It can reflect the similarity of path effectiveness; Corner point With corner points The number of overlapping pixels in the corresponding edge group; The Euclidean distance between the two corner points; and These are the gradient vectors at the two corner points; It is a measure of gradient vector similarity; Corner points whose aggregation weights satisfy the preset aggregation conditions are aggregated into corner point groups, and sub-regions are determined based on the enclosing regions of the corner point groups.

5. The vision-based method for detecting the integrity of the dustproof mesh of an earphone speaker according to claim 4, characterized in that, The method for calculating the effectiveness of the path includes: Extract the texture edges passing through the corner points to form an edge group; Calculate the ratio of the length of the edge group to the total length of all texture edges within the fitable area to obtain a measure of the concentration of light variation at the corner position; Calculate the cumulative difference between the brightness gradient magnitude of each edge point in the edge group and the brightness gradient magnitude of the corner point to obtain a measure of the significance of the light distribution at the corner point; The path effectiveness of the corner point is calculated by combining the concentration of light changes and the significance of light distribution. Among them, the path validity of the corner point The calculation formula is as follows: ; in, Indicates passing through a corner point Length of the edge group; Represents the total length of all texture edges within the foreground region; ratio It can reflect the concentration of light change characteristics at the current corner point; Representing corner points The brightness gradient magnitude at that location; Represents edge points within an edge group The brightness gradient magnitude; This represents the average brightness gradient of all pixels within the edge group.

6. A vision-based detection system for the integrity of the dustproof mesh on an earphone speaker, used in the vision-based detection method for the integrity of the dustproof mesh on an earphone speaker as described in any one of claims 1 to 5, characterized in that, It includes a central cloud server and a vision module that communicates with the central cloud server, wherein: The vision module is used to acquire multi-angle images of the headphone speaker assembly under test before and after the dustproof mesh is attached, and send them to the central cloud server. The vision module includes a specific light source and optical cameras arranged at multiple different shooting angles. The specific light source is used to illuminate the attachment area of ​​the headphone speaker assembly under test when acquiring the multi-angle images, so as to form a recognizable light reflection texture inside the assembly. The central cloud server is used to acquire the multi-angle images; determine the bonding area based on the multi-angle images before bonding, and divide the bonding area into multiple sub-regions; for each sub-region, extract the texture edge features formed by the light reflection texture inside the sub-region, compare the changes of the texture edge features before and after bonding, and calculate the bonding effectiveness index of each sub-region; based on the distribution characteristics of the bonding effectiveness index of each sub-region, filter and identify bonding abnormal areas.