A notebook computer shell injection molding part flaw detection method and system

By using dual-camera rotation and differential response map processing, the problem of detecting weld lines under the interference of heat dissipation holes was solved, achieving high-precision defect identification of injection molded parts and reducing the rate of missed detections and false alarms.

CN122016826BActive Publication Date: 2026-07-21CHONGQING CHENGTIAN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHONGQING CHENGTIAN TECH CO LTD
Filing Date
2026-04-16
Publication Date
2026-07-21

Smart Images

  • Figure CN122016826B_ABST
    Figure CN122016826B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of machine vision, and specifically relates to a notebook shell injection molding part defect detection method and system, which comprises the following steps: a first camera pair performs rotational scanning on a non-defect calibration part, Gaussian fitting is performed on a response curve, and a peak center angle and a peak width parameter are obtained. Two cameras are fixed at an initial rotation angle symmetrical to the peak center angle, one frame is synchronously collected, and linear feature response intensity is extracted; if both do not exceed a suspected defect threshold, it is determined that there is no defect; if there is a threshold exceeding, a peak excitation rotation angle is calculated through a Gaussian double-point sampling closed solution, the first camera is rotated to the angle, the second camera is rotated to a reference rotation angle so that a defect response amplitude is minimum and a distance constraint is met, and after synchronous collection, affine registration and pixel-by-pixel difference are performed; then, shallow linear defect areas are marked according to a connected region aspect ratio screening. The present application solves the problem of random directionality of shallow linear defects under the interference of heat dissipation holes and optimizes the observation angle under the double industrial cameras.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of machine vision technology, specifically a method and system for detecting defects in injection-molded laptop casings. Background Technology

[0002] Laptop casings are typically injection molded from engineering plastics such as PC / ABS. During the mold filling stage, the molten resin flows within the cavity and encounters core components such as heat dissipation holes, causing it to split. The split melt fronts then reconverge near the arc transition zone. At the fusion interface, due to the decreased melt temperature and insufficient local pressure, the molecular chains of the two melts cannot fully diffuse and fuse, forming shallow linear depressions on the surface of the part with a width of tens to hundreds of micrometers and a depth of several to tens of micrometers. In the injection molding industry, this type of defect is commonly referred to as a weld line.

[0003] The formation of weld lines cannot be completely controlled by a single process parameter. Besides deviations in process parameter settings such as injection speed, holding pressure, and mold temperature, insufficient drying of raw materials leading to excessive moisture content can also cause localized vaporization at the melt front convergence, exacerbating insufficient molecular chain diffusion. Furthermore, occasional factors such as batch-to-batch viscosity differences in raw materials, fluctuations in recycled material ratios, and degradation of residual material in the barrel can all cause fluctuations in melt flowability between batches or within a single batch, resulting in weld lines appearing with a certain probability even under nominally fixed process parameters. Therefore, weld lines are an occasional appearance defect in injection molding that is difficult to completely eliminate through process adjustments and must be identified piece-by-piece during the finished product inspection stage. A small bevel is formed on each side of the weld line groove. The presence of this bevel causes the weld line area to produce directional scattered bright lines that can be captured by a camera at a specific observation angle, constituting the optical reflection parameters for visual inspection.

[0004] In machine vision inspection, the detection of the aforementioned shallow linear defects also faces visual interference. First, the inclination angle of the weld line groove is determined by the local temperature gradient and pressure distribution during injection molding, and varies between individuals due to fluctuations in these various random factors. The inclination angle determines the directional scattering direction, which in turn determines the optimal observation angle for the strongest bright ripple response. Since this angle varies from part to part, when shooting with a fixed single observation angle, the directional scattering direction of the inclination surface of some inspected parts deviates from the camera's observation direction, and the bright ripple response is insufficient to distinguish it from the background diffuse reflection, resulting in missed detections. Second, the circular through-hole heat dissipation array near the arc transition area of ​​the laptop casing also produces linear bright ripples in the image: when the camera is at a certain rotation angle, the periodic arrangement of the heat dissipation hole edges in the response map of the linear feature extraction operator presents a linear response highly similar to the weld line bright ripples in direction, width, and local contrast. The two form a feature-level superposition in a single frame image, and it is impossible to determine whether the linear bright ripples originate from the weld line inclination or the heat dissipation hole edge based on the single frame response intensity, leading to misjudgment. Summary of the Invention

[0005] (1) Technical problems to be solved:

[0006] The purpose of this invention is to provide a method and system for detecting defects in injection-molded parts of notebook casings, in order to solve the problem of random directional shallow linear defects under the interference of heat dissipation holes, and to address the optimization problem of observation angle of dual industrial cameras.

[0007] (2) Technical solution: To achieve the above objectives, on one hand, the present invention provides a method for detecting defects in injection-molded parts of notebook casings, applied to a detection device in which a first camera and a second camera each rotate independently around a horizontal single axis to adjust the observation angle, and the injection-molded part is placed horizontally on a detection stage; the method includes: The first camera is rotated gradually within a preset rotation angle range and images of the defect-free injection-molded calibration part are acquired frame by frame. The linear feature response intensity of the arc transition area in each frame image is extracted to obtain the response curve of the linear feature response intensity as a function of the rotation angle. The peak width parameter is obtained by curve fitting the response curve. The first camera and the second camera simultaneously acquire one frame of image of the injection molded part to be inspected at their respective initial rotation angles, and extract the linear feature response intensity of the arc transition area to obtain the first response intensity and the second response intensity; when the first response intensity and the second response intensity do not exceed the preset suspected defect threshold, it is determined that the injection molded part to be inspected has no shallow linear defects. When at least one of the first response intensity or the second response intensity exceeds the preset suspected defect threshold, the peak excitation rotation angle is calculated by using the closed solution of the Gaussian response curve through two-point sampling based on the first response intensity, the second response intensity, the initial rotation angle of the first camera, the initial rotation angle of the second camera, and the peak width parameter. The first camera is rotated to the peak excitation rotation angle, and a rotation angle with a difference from the peak excitation rotation angle not less than the preset spacing threshold is determined as the reference rotation angle. The second camera is rotated to the reference rotation angle, and the first camera and the second camera simultaneously acquire the first image and the second image of the injection molded part to be inspected. After registering the first image and the second image, the difference in linear feature response intensity is calculated pixel by pixel to obtain the differential response map. Continuous linear regions in the differential response map whose difference value exceeds a preset judgment threshold are marked as shallow linear defect regions.

[0008] Furthermore, the method of gradually rotating the first camera within a preset rotation angle range and acquiring images of the defect-free injection-molded calibration part frame by frame, extracting the linear feature response intensity of the arc transition area in each frame image, obtaining a response curve of the linear feature response intensity changing with the rotation angle, and performing curve fitting on the response curve to obtain the peak width parameter includes: The first camera is used during the calibration scanning process of the defect-free injection-molded calibration part. The rotation angle corresponding to the frame is denoted as The value ranges from 1 to positive integers, To calibrate the total number of scan frames; the first... The linear feature response intensity extracted from the circular arc transition region in the frame image is denoted as ;by The maximum value is used as the peak amplitude. The initial value is given by When taking the maximum value, the corresponding As the center angle of the peak of the response curve The initial value is set using a preset angle as the peak width parameter. Initial values; , , Given undetermined parameters, the objective function is minimized using the nonlinear least squares method. The peak width parameter is obtained by iterative solution. ,in Peak amplitude, The center angle of the peak value of the response curve.

[0009] Furthermore, the method of simultaneously acquiring one frame each from the first camera and the second camera at their respective initial rotation angles of the injection-molded part under inspection, and extracting the linear feature response intensity of the arc transition region to obtain the first response intensity and the second response intensity includes: The Gabor filter direction angle is determined by the tangent direction of the arc transition area contour line in the injection molded part design file. The Gabor filter spatial frequency is determined based on the width of the shallow recess in the injection molded part design file. Gabor filtering is applied to the circular transition region in the current frame image. The convolution result of the real part of the filter kernel with the image is recorded as the real response, and the convolution result of the imaginary part of the filter kernel with the image is recorded as the imaginary response. The square root of the sum of the squares of the real and imaginary responses is taken to obtain the amplitude of the Gabor filter response in the current frame. Within the arc transition area The maximum value is taken as the linear feature response intensity of the current frame image. The values ​​of the first and second frames acquired by the first and second cameras are respectively used to calculate the linear feature response intensity within the arc transition region. The maximum value is used to obtain the first response strength. Second response strength .

[0010] Furthermore, the first camera and the second camera simultaneously acquire one frame each of images of the injection molded part to be inspected at their respective initial rotation angles. The initial rotation angle of the first camera... Initial rotation angle of the second camera ,in The peak center angle of the response curve, To preset the symmetrical offset angle, and The value of must make and All are within the preset rotation angle range of the first camera; the initial rotation angles of the first and second cameras are about symmetry.

[0011] Furthermore, when at least one of the first response intensity or the second response intensity exceeds a preset suspected defect threshold, the method for calculating the peak excitation rotation angle using a closed-loop solution of a Gaussian response curve based on the first response intensity, the second response intensity, the initial rotation angle of the first camera, the initial rotation angle of the second camera, and the peak width parameter includes: by Indicates the peak excitation rotation angle, through the first response intensity Second response strength Peak excitation rotation angle obtained The closed solution is: ; in The initial rotation angle of the first camera. The initial rotation angle of the second camera. For peak width parameter, When calculated When the rotation angle exceeds the preset range of the first camera, the nearest boundary value of the preset rotation angle range is taken as... .

[0012] Furthermore, the method for determining a rotation angle whose difference from the peak excitation rotation angle is not less than a preset spacing threshold as a reference rotation angle includes: The diameter of the heat dissipation holes obtained from the injection molded part design file is denoted as... The distance between the center holes is denoted as Calculate the minimum offset angle of the linear response at the edge of the heat dissipation hole. Traverse candidate rotation angles within the preset rotation angle range of the first camera. Filtering simultaneously satisfies and All candidate values, of which The peak excitation rotation angle, For the preset spacing threshold, The peak center angle of the response curve; select from the candidate values ​​that meet the conditions. Get the minimum value As a reference rotation angle ,in Peak amplitude, This is the peak width parameter.

[0013] Furthermore, the first camera is gradually rotated within a preset rotation angle range, and frame-by-frame images of the defect-free injection-molded calibration part are acquired, wherein the difference in rotation angle between adjacent frames satisfies .

[0014] Furthermore, the method of simultaneously acquiring data from the first and second cameras on the injection-molded part under inspection, registering the first and second images, and calculating the difference in linear feature response intensity pixel by pixel to obtain the differential response map includes: Images of the injection-molded part to be inspected are captured by a first camera and a second camera, respectively, and denoted as the first image and the second image. The coordinates of corresponding feature points in the first image and the second image are extracted, and the affine transformation matrix is ​​obtained by fitting using the least squares method. ; the first image The homogeneous coordinates of a pixel are denoted as ,pass The corresponding coordinates of each pixel in the first image in the second image coordinate system are obtained. The first image is reverse-mapped and resampled so that the first image and the second image correspond pixel by pixel in the second image coordinate system. The corresponding first image and the second image are then subjected to Gabor filtering in the arc transition area to obtain the first amplitude image and the second amplitude image. The difference is then calculated pixel by pixel to obtain the differential response image.

[0015] Furthermore, the method for marking continuous linear regions in the differential response map where the difference value exceeds a preset judgment threshold as shallow linear defect regions includes: For each connected region in the difference response graph where the difference value exceeds a preset threshold, the projection range along the main direction is calculated as the length, with the direction of the eigenvector corresponding to the largest eigenvalue of the covariance matrix of the connected region point set as the main direction. The projection range along the secondary direction is used as the width. ;Will Connected regions with a linearity threshold not lower than a preset threshold are marked as shallow linear defect regions. Connected regions with linearity below the preset threshold are identified as heat dissipation hole residual interference and are removed.

[0016] Based on the same inventive concept, this invention also provides a defect detection system for injection-molded notebook casings, applied to a detection device in which a first camera and a second camera each rotate independently around a horizontal single axis to adjust the observation angle, and the injection-molded part is placed horizontally on a detection table; the system includes: The calibration module is used to rotate the first camera gradually within a preset rotation angle range and acquire images of the defect-free injection-molded calibration part frame by frame. The linear feature response intensity is extracted from the arc transition area in each frame image to obtain the response curve of the linear feature response intensity as a function of the rotation angle. The peak width parameter is obtained by curve fitting the response curve. The initial acquisition module is used to simultaneously acquire one frame of image of the injection molded part under inspection by the first camera and the second camera at their respective initial rotation angles, and extract the linear feature response intensity of the arc transition area to obtain the first response intensity and the second response intensity; when the first response intensity and the second response intensity do not exceed the preset suspected defect threshold, it is determined that the injection molded part under inspection has no shallow linear defects. The secondary acquisition module is used to calculate the peak excitation rotation angle based on the first response intensity, the second response intensity, the initial rotation angle of the first camera, the initial rotation angle of the second camera, and the peak width parameter when at least one of the first response intensity or the second response intensity exceeds a preset suspected defect threshold. The module rotates the first camera to the peak excitation rotation angle and determines a rotation angle whose difference from the peak excitation rotation angle is not less than a preset spacing threshold as a reference rotation angle. The second camera is then rotated to the reference rotation angle. The first camera and the second camera simultaneously acquire the first image and the second image of the injection molded part under inspection. The analysis module is used to register the first image and the second image and calculate the difference in linear feature response intensity pixel by pixel to obtain a differential response map. Continuous linear regions in the differential response map whose difference values ​​exceed a preset judgment threshold are marked as shallow linear defect regions.

[0017] (3) Beneficial effects: Compared with the prior art, the beneficial effects of the present invention are: 1. To address the issue that the slope angle of shallow linear defect areas varies piece by piece due to factors such as raw material moisture content, batch viscosity fluctuations, and occasional process disturbances, making it impossible to predict the optimal observation angle in advance, two cameras are used to acquire one frame each at a symmetrical initial rotation angle. By sampling closed solutions, the peak excitation rotation angle of each injection molded part to be inspected is calculated. Without performing rotation scanning, the optimal observation angle for each piece is determined individually, solving the problem of missed inspections caused by individual differences in slope angle when shooting at a fixed angle.

[0018] 2. To address the issue of feature-level superposition of linear feature responses at the edges of heat dissipation holes and bright patterns in shallow linear defect regions in a single-frame image, making it impossible to distinguish the source based on the single-frame response intensity, the second camera is positioned at the reference rotation angle corresponding to the weaker range of linear feature responses. By performing a difference operation on the two images, the edge response of the heat dissipation holes is effectively canceled out in the difference image, and the bright patterns of weld lines are clearly displayed in the difference image, thus solving the problem of high false alarm rate caused by heat dissipation hole interference.

[0019] 3. Based on the rotation angle, among the candidate angles that meet the distance condition between the peak excitation rotation angle and the candidate angle, the position that minimizes the amplitude of the response Gaussian curve is further selected. Combined with the aspect ratio of the connected region in the difference graph, residual heat dissipation hole edge responses are eliminated, which further improves the accuracy of defect area marking and reduces false alarms caused by residual interference. Attached Figure Description

[0020] The above and / or other aspects of this application will become more apparent from the description of certain embodiments with reference to the accompanying drawings, in which: Figure 1 This is a flowchart of a defect detection method for injection-molded laptop shells according to Embodiment 1 of the present invention; Figure 2 This is a module block diagram of a defect detection system for injection-molded laptop shells according to Embodiment 2 of the present invention; Figure 3 This is a schematic diagram of the defect detection device for injection-molded laptop shell parts according to an embodiment of the present invention. Detailed Implementation

[0021] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0022] Before providing examples, it is necessary to describe the application scenario of this invention. This method is applicable to the online appearance inspection station of injection-molded laptop shells, automatically identifying shallow linear defects formed by weld lines in the arc transition area. The directional scattering bright fringes in the weld line region are highly sensitive to the observation angle: when deviating from the optimal observation angle by several degrees, the bright fringe response is submerged in background diffuse noise, showing almost no difference from defect-free areas; only when the observation angle approaches a specific angle that makes the directional scattering of the inclined surface directly face the camera direction does the bright fringe response show a significant peak. Since the optimal observation angle varies for different parts due to individual differences in the inclination angle of the weld line's inclined surface, searching for peak values ​​frame by frame through rotational scanning requires multiple step-by-frame rotations and acquisitions for each part, delaying production line time. Therefore, it is necessary to solve the problem of optimizing the observation angle of shallow linear defects with random directionality under the interference of heat dissipation holes, avoiding the inefficiency of multiple scans with a single camera.

[0023] The following embodiment is based on the following hardware conditions: the detection device includes a first camera, a second camera, independent horizontal single-axis rotation mechanisms, a detection stage, an image acquisition control unit, and an image processing unit. The injection-molded part is placed horizontally on the detection stage. The first and second cameras are respectively mounted on their respective horizontal single-axis rotation mechanisms, allowing independent rotation around a horizontal single axis to adjust the observation angle. The image acquisition control unit sends a synchronous trigger signal to the two cameras, and the image processing unit executes all subsequent calculation steps. The rotation mechanisms of the two cameras should have sufficient angular repeatability accuracy, generally not less than 0.1°, to ensure that the deviation between the actual rotation angle and the commanded rotation angle in each acquisition step does not affect the reliability of the calculation results.

[0024] like Figure 3 The diagram shows a structural schematic of a defect detection device for a laptop casing injection molded part. The device includes a detection table, an injection molded part to be inspected, a first camera, and a second camera. The injection molded part is placed horizontally on the detection table. The surface of the laptop back panel injection molded part has a local heat dissipation hole array and an arc transition area (a high-defect area). The two cameras are symmetrically suspended above the injection molded part via independent rotation axes, and the observation angle can be independently adjusted around a single horizontal axis.

[0025] Example 1: As Figure 1 As shown, this embodiment provides a method for detecting defects in injection-molded laptop casings. The method is applied to a detection device where a first camera and a second camera each rotate independently around a horizontal single axis to adjust the observation angle. The injection-molded part is placed horizontally on a detection table. The method includes: The first camera is rotated gradually within a preset rotation angle range and images of the defect-free injection-molded calibration part are acquired frame by frame. The linear feature response intensity of the arc transition area in each frame is extracted to obtain the response curve of the linear feature response intensity as a function of the rotation angle. The peak width parameter is obtained by curve fitting the response curve.

[0026] For example, a calibration process is performed once for each injection molded part model before mass production testing begins. Three or more defect-free injection molded calibration parts of the same model (generally taken to reduce the impact of individual differences on the calibration results) are placed on the testing table. The first camera is positioned within a preset rotation angle range. Rotate gradually within the circle, acquiring one image frame at each rotation angle to obtain a total of Frame calibration image sequence, where To calibrate the total number of scan frames, linear feature response intensity is extracted from the arc transition region in each frame. The rotation angle and corresponding response intensity are recorded sequentially for each frame, resulting in a set of response curve data points showing the linear feature response intensity changing with the rotation angle. Curve fitting is then performed on this data set to obtain the peak width parameter. Peak amplitude and the peak center angle of the response curve .

[0027] Regarding the extraction method of linear feature response intensity, this implementation uses Gabor filtering as the preferred solution. Gabor filtering has optimal bandpass filtering characteristics for linear features of specific directions and frequencies when the defect orientation angle and feature spatial frequency are known. When the defect orientation angle is unknown in advance or when it is necessary to respond to multiple linear features simultaneously, a multi-directional Gabor filter group can be used and the maximum value of the response in each direction can be taken; or a linear structure enhancement filter based on the ratio of eigenvalues ​​of the Hessian matrix (Frangi frame) can be used, assuming the image is at the feature scale. The two eigenvalues ​​of the Hessian matrix at point are arranged in ascending order of absolute value as follows: and Linear characteristic response intensity ,in and To adjust parameters; alternatively, a ridge detection operator can be used, integrating the smaller absolute eigenvalues ​​of the image's gray-level Hessian matrix within the circular transition region and taking the maximum value. The response values ​​obtained through any of these methods can be used as the linear feature response intensity of the current frame. , , , , These are internal parameters belonging only to the Frangi framework, and the calculation methods will not be elaborated further.

[0028] Regarding the selection of the function form for the response curve, this embodiment prefers the Gaussian function as the fitting function because it has good fitting accuracy for the scattering response curves of common PC / ABS injection molding materials. In cases where the scattering response peaks are sharper due to high-filled glass fiber PC / ABS or special colorant formulations, the Lorentzian function can be used for fitting. The half-peak and half-width parameters obtained from this fitting function have the same effect as those in the Gaussian fitting. The closed-loop solution is replaced accordingly using two-point extrapolation. When insufficient calibration data (e.g., fewer than 5 calibration pieces) leads to insufficient fitting confidence, piecewise linear interpolation approximation can be used. The ratio of the function value difference to the angle difference at symmetrical two points of the linear interpolation curve is taken as the slope estimate, and the peak position is located through linear extrapolation. All three methods described above are specific optional implementations of "obtaining the peak width parameter by curve fitting the response curve".

[0029] The calibration process is repeated once after the model is changed, and the calibration results of the same model are reused during mass production, so there is no need to repeat the calibration for each part to be inspected.

[0030] The first camera and the second camera simultaneously acquire one frame of image of the injection molded part to be inspected at their respective initial rotation angles, and extract the linear feature response intensity of the arc transition area to obtain the first response intensity and the second response intensity; when the first response intensity and the second response intensity do not exceed the preset suspected defect threshold, it is determined that the injection molded part to be inspected has no shallow linear defects. When at least one of the first response intensity or the second response intensity exceeds the preset suspected defect threshold, the peak excitation rotation angle is calculated by using the closed solution of the Gaussian response curve through two-point sampling based on the first response intensity, the second response intensity, the initial rotation angle of the first camera, the initial rotation angle of the second camera, and the peak width parameter. The first camera is rotated to the peak excitation rotation angle, and a rotation angle with a difference from the peak excitation rotation angle not less than the preset spacing threshold is determined as the reference rotation angle. The second camera is rotated to the reference rotation angle, and the first camera and the second camera simultaneously acquire the first image and the second image of the injection molded part to be inspected. After registering the first image and the second image, the difference in linear feature response intensity is calculated pixel by pixel to obtain the differential response map. Continuous linear regions in the differential response map whose difference value exceeds a preset judgment threshold are marked as shallow linear defect regions.

[0031] Furthermore, the method of gradually rotating the first camera within a preset rotation angle range and acquiring images of the defect-free injection-molded calibration part frame by frame, extracting the linear feature response intensity of the arc transition area in each frame image, obtaining a response curve of the linear feature response intensity changing with the rotation angle, and performing curve fitting on the response curve to obtain the peak width parameter includes: The first camera is used during the calibration scanning process of the defect-free injection-molded calibration part. The rotation angle corresponding to the frame is denoted as The value ranges from 1 to positive integers, To calibrate the total number of scan frames; the first... The linear feature response intensity extracted from the circular arc transition region in the frame image is denoted as ;by The maximum value is used as the peak amplitude. The initial value is given by When taking the maximum value, the corresponding As the center angle of the peak of the response curve The initial value is set using a preset angle as the peak width parameter. Initial values; , , Given undetermined parameters, the objective function is minimized using the nonlinear least squares method. The peak width parameter is obtained by iterative solution. ,in Peak amplitude, The center angle of the peak value of the response curve.

[0032] For example, the first camera during the calibration scanning process... The rotation angle corresponding to the frame is denoted as , The value ranges from 1 to positive integers, To determine the total number of scan frames. The first... The linear feature response intensity extracted from the circular arc transition region in the frame image is denoted as .

[0033] by The maximum value is used as the peak amplitude. The initial value of the iteration, with When taking the maximum value, the corresponding As the center angle of the peak of the response curve The initial value for the iteration is set using a preset angle (generally 3°, since the half-width of the typical scattering response of PC / ABS material is about 2° to 5°, taking the middle value can reduce the number of iteration steps) as the peak width parameter. The initial value for the iteration. , , Given undetermined parameters, the objective function is minimized using the nonlinear least squares method. The peak width parameter is obtained by iterative solution and convergence. Peak amplitude and the peak center angle of the response curve .

[0034] Regarding the selection of iterative solution algorithms, the Levenberg-Marquardt algorithm is preferred because it can still converge even when the initial values ​​deviate significantly. When the number of calibration data points is determined... When dealing with a large number of frames (e.g., more than 50) and the initial values ​​are of good quality, the Gauss-Newton algorithm can also be used to reduce the computational cost per iteration. Both algorithms are functionally equivalent in achieving the objective of "minimizing the above objective function using nonlinear least squares." , , The values ​​are consistent when the convergence condition is the same. The convergence criterion is generally set as the values ​​in two adjacent iterations. , , The changes do not exceed 0.1% of the initial value, or the decrease in the objective function does not exceed [a certain percentage]. If the iteration fails to converge after more than 500 steps, the initial value is usually reselected and the process is retried. The anomaly is recorded for manual verification of the calibration component's quality.

[0035] Taking a specific implementation example: For a certain model of laptop casing PC / ABS injection molded part, the preset rotation angle range is... to The calibrated scan step size was 1°, and a total of 31 frames were acquired. After the fitting converges, we obtain , (Normalized to a grayscale range of 255) (Caused by the deflection of the surface normal in the circular transition zone from zero degree); When calibrating multiple parts, the results are obtained by fitting each part. The mean value is used as the final peak width parameter.

[0036] Furthermore, the method of simultaneously acquiring one frame each from the first camera and the second camera at their respective initial rotation angles of the injection-molded part under inspection, and extracting the linear feature response intensity of the arc transition region to obtain the first response intensity and the second response intensity includes: The Gabor filter direction angle is determined by the tangent direction of the arc transition area contour line in the injection molded part design file. The Gabor filter spatial frequency is determined based on the width of the shallow recess in the injection molded part design file. Gabor filtering is applied to the circular transition region in the current frame image. The convolution result of the real part of the filter kernel with the image is recorded as the real response, and the convolution result of the imaginary part of the filter kernel with the image is recorded as the imaginary response. The square root of the sum of the squares of the real and imaginary responses is taken to obtain the amplitude of the Gabor filter response in the current frame. Within the arc transition area The maximum value is taken as the linear feature response intensity of the current frame image. The values ​​of the first and second frames acquired by the first and second cameras are respectively used to calculate the linear feature response intensity within the arc transition region. The maximum value is used to obtain the first response strength. Second response strength .

[0037] For example, the Gabor filter direction angle is determined by the tangent direction of the arc transition area contour line in the injection molded part design file (e.g., CAD engineering drawings, SolidWords files, UG files, etc.). The width of the shallow recess in the injection molded part design file. (Micrometer-level) and pixel resolution of camera optical systems Determine the Gabor filter space frequency .

[0038] Construct a Gabor filter kernel, the actual part of which is The imaginary part is ,in , , The spatial wavelength of the Gabor filter core (generally taken as...) ), The aspect ratio is typically 0.5. This represents the phase offset (typically set to 0). The above parameter values ​​are preferred examples; those skilled in the art can adjust them according to the actual defect width and image resolution.

[0039] Perform Gabor filtering on the circular transition region in the current frame image: This will filter the core data. With images Perform two-dimensional convolution to obtain the real response. ; the imaginary part of the filter kernel With images Perform two-dimensional convolution to obtain the imaginary response. The square root of the sum of the squares of the real and imaginary responses is used to obtain the amplitude map of the Gabor filter response for the current frame. .

[0040] Within the arc transition zone The maximum value is taken as the linear feature response intensity of the current frame image. For each frame image synchronously acquired by the first camera and the second camera at their respective initial rotation angles, the value within the arc transition zone is calculated according to the above steps. The maximum value is used to obtain the first response strength. Second response strength .

[0041] Regarding the Gabor filter direction angle Determination: If the injection molded part design file is unavailable, during the calibration scan, multi-directional Gabor filtering can be performed on the frame image with the highest response intensity (e.g., traversing 18 directions from 0° to 170° with a step size of 10°), and the direction corresponding to the largest response amplitude can be used as the reference. The estimated value; this estimation method is functionally equivalent to reading directly from the design file, both belonging to the implementation method of determining the Gabor filter direction angle by the tangent direction of the arc transition area contour line.

[0042] Furthermore, the first camera and the second camera simultaneously acquire one frame each of images of the injection molded part to be inspected at their respective initial rotation angles. The initial rotation angle of the first camera... Initial rotation angle of the second camera ,in The peak center angle of the response curve, To preset the symmetrical offset angle, and The value of must make and All are within the preset rotation angle range of the first camera; the initial rotation angles of the first and second cameras are about symmetry.

[0043] For example, the initial rotation angle of the first camera is set to Set the initial rotation angle of the second camera to ,in The peak center angle of the response curve obtained by fitting during the calibration phase. To preset the symmetrical offset angle, and and All must be within the preset rotation angle range Inside.

[0044] The value of directly affects the signal-to-noise ratio and effective range of the two-point extrapolation; After a few hours, and The difference is slight. The value is close to zero, making the calculated results extremely sensitive to noise in response intensity measurements. When it is too big, and All of these could potentially drop to the sensor noise floor, rendering the calculations meaningless. Generally The range of values ​​is to Taking the specific implementation parameters mentioned above as an example, ,generally The angle is between 1.6° and 4.8°, and this embodiment uses... (approximately) As a preferred value, a balance is achieved between signal-to-noise ratio and effective coverage.

[0045] The initial rotation angles of the first and second cameras are about Symmetry, that is This ensures that the sampling points of both cameras are equidistant from the peak center on the response curve, thus validating the premise for deriving the closed-loop solution from the two points. After recalibration following the model change, a new solution is obtained. When valuing, it should be updated synchronously. and This is to ensure that the symmetrical relationship always holds.

[0046] Furthermore, when at least one of the first response intensity or the second response intensity exceeds a preset suspected defect threshold, the method for calculating the peak excitation rotation angle using a closed-loop solution of a Gaussian response curve based on the first response intensity, the second response intensity, the initial rotation angle of the first camera, the initial rotation angle of the second camera, and the peak width parameter includes: by Indicates the peak excitation rotation angle, through the first response intensity Second response strength Peak excitation rotation angle obtained The closed solution is: ; in The initial rotation angle of the first camera. The initial rotation angle of the second camera. For peak width parameter, When calculated When the rotation angle exceeds the preset range of the first camera, the nearest boundary value of the preset rotation angle range is taken as... .

[0047] For example, for the injection molded part to be inspected, the first camera is positioned at an initial rotation angle. The second camera is positioned at the initial rotation angle. Simultaneously acquire one frame of image from each image and extract the first response intensity. Second response strength .

[0048] Preset suspected defect threshold The determination method is as follows: During the calibration phase, no fewer than 30 defect-free parts of the same model are tested. and Images were acquired at each location, and linear feature response intensities were extracted. The mean of the obtained response intensity samples plus three times the standard deviation was used as the baseline. This ensures that the probability of false triggering of normal, defect-free parts is below 0.15% under the Gaussian distribution assumption. Taking the above PC / ABS injection molded parts parameters as an example, 30 defect-free parts... The mean response intensity at point 42 and the standard deviation is 6, then (Grayscale unit).

[0049] when and None exceeded When the system determines that the injection molded part has no shallow linear defects, it directly outputs a pass / fail conclusion without performing subsequent rotation and differential steps. This rapid pass-through path adapts to the actual cycle time requirements of mass production where the majority of parts are pass / fail (typically over 95%), and the vast majority of parts are judged after the initial dual acquisition.

[0050] when or At least one of them exceeds At that time, with The peak excitation rotation angle is represented by the following closed-form solution. ,in The initial rotation angle of the first camera. The initial rotation angle of the second camera. The peak width parameter is obtained from the fitting during the calibration phase. , , .

[0051] The derivation of the above closed solution is as follows: Assume that the linear characteristic response intensity of the weld line of the inspected part approximately follows a Gaussian distribution with respect to the observation angle, i.e. ,in The rotation angle is used to excite the true peak value of this component.

[0052] Will and Divide the two expressions and take the natural logarithm, using Expanding and rearranging, we obtain the closed-form solution described above. This derivation relies solely on the Gaussian response curve assumption and the peak width parameter. These two premises are obtained through pre-fitting during the calibration stage, and it is not required that the initial rotation angles of the two cameras be strictly symmetrical about the true peak excitation rotation angle.

[0053] when or When the noise level is below the sensor noise floor (generally set to 0.5% of the sensor's full scale, which is approximately 1.3 gray units in an 8-bit grayscale image, rounded down to 1 gray unit), the response intensity is taken as the preset minimum value. Substitute (grayscale unit) into the above formula to avoid logarithmic divergence; or determine that the response intensity is invalid, directly perform a full rotational scan on the component to search for the peak value, as the degradation processing path. The scanning range of the degradation processing path is the same as that of the calibration stage, and the step size is taken as... .

[0054] When calculated Exceeding the preset rotation angle range When, take the nearest boundary value as (like Then let ,like Then let The physical meaning of this situation is: the weld line bevel angle deviation of the inspected part is extremely large, exceeding the normal variation range of individuals of the same model, and is therefore an abnormal part; generally, a manual re-inspection mark is triggered simultaneously, recording the part number and the calculated out-of-bounds deviation. This value allows process engineers to trace raw material batches or process parameter deviations, rather than simply taking boundary values ​​and then automatically determining whether the result is qualified or unqualified.

[0055] Regarding the equivalent extrapolation method when using the Lorentzian function as the response curve fitting function: If the Lorentzian function is used in the calibration stage... Fit the response curve, where For Lorentzian peak amplitude, The central angle of the Lorentzian peak. These are the half-peak and half-width parameters. All three are obtained by fitting using the nonlinear least squares method during the calibration stage, and are compared with those obtained by Gaussian fitting. , , They are independent of each other and have different names. In this case, the derivation of the corresponding two-point closed solution is as follows: Will and Combined and organized into and Subtracting them gives us ;in and The linear feature response intensity observations of the images acquired by the first and second cameras at the initial rotation angle (and) , (For the same physical quantity, different subscripts are used here to distinguish it from the calculation path in the Gaussian case.) Requirements: , , , The fitting is known from the calibration stage and , The above calculation method is equivalent to the Gaussian case in terms of the functional objective of "calculating the peak excitation rotation angle through the analytical solution of the two-point sampling of the pre-calibrated single-peak response curve". It belongs to the equivalent implementation method that achieves the same function and the same effect with basically the same means.

[0056] Furthermore, the method for determining a rotation angle whose difference from the peak excitation rotation angle is not less than a preset spacing threshold as a reference rotation angle includes: The diameter of the heat dissipation holes obtained from the injection molded part design file is denoted as... The distance between the center holes is denoted as Calculate the minimum offset angle of the linear response at the edge of the heat dissipation hole. Traverse candidate rotation angles within the preset rotation angle range of the first camera. Filtering simultaneously satisfies and All candidate values, of which The peak excitation rotation angle, For the preset spacing threshold, The peak center angle of the response curve; select from the candidate values ​​that meet the conditions. Get the minimum value As a reference rotation angle ,in Peak amplitude, This is the peak width parameter.

[0057] For example, the peak excitation rotation angle is calculated. Then, rotate the first camera to And determine the reference rotation angle according to the following steps. It is used for positioning the second camera.

[0058] The diameter of the heat dissipation holes obtained from the injection molded part design file is denoted as... The distance between the center holes is denoted as Calculate the minimum offset angle of the linear response at the edge of the heat dissipation hole. ; The physical meaning is: the direction in which the strongest linear response is produced when the observation angle deviates from the edge of the heat dissipation hole (i.e., (Direction) reached When the above conditions are met, the arrangement direction of the periodic edges of the heat dissipation holes is mismatched with the response direction of the linear feature extraction operator, causing a significant decrease in the linear response of the heat dissipation hole edges. The dimension is radians, which are then converted to degrees for subsequent angle selection. (The following is an example: the diameter of the ventilation holes on the casing of a certain model of laptop.) mm, hole spacing Taking mm as an example, .

[0059] The derivation is based on the geometry of the aperture array arrangement, for an aperture center spacing of... Aperture is A square aperture array, when the observation direction deviates from the principal arrangement direction of the aperture array by an angle At that time, the lateral offset of the centers of two adjacent holes in the direction perpendicular to the observation is: When this lateral offset exceeds the hole radius When adjacent aperture edge arc segments no longer form a continuous collinear linear characteristic in the observation direction, the Gabor filter response decreases significantly. Setting the critical lateral offset at which the response decreases significantly equals the aperture radius, we obtain the critical offset angle. ; based on the diameter of the heat dissipation holes mm, hole spacing Taking mm as an example, Note that this value is the geometric lower bound at which the response begins to decrease significantly; the finite angular selectivity of the actual filter kernel will make the effective interference range slightly wider than this, and in engineering implementation, it is generally... We conservatively take 1.2 times the calculated value above, which is approximately 17.4°, to allow for a margin.

[0060] Within the preset rotation angle range Within, candidate rotation angles are traversed using the same angular step size as the calibration scan. Filtering simultaneously satisfies ,in The preset spacing threshold is used. The first constraint ensures that there is a sufficient gap between the reference rotation angle and the peak excitation rotation angle, so that the amplitude of the weld line bright fringe response in the second image is significantly reduced compared to the first image, thus making the weld line bright fringe stand out in the difference image; the second constraint ensures that the reference rotation angle deviates from the direction of the maximum value of the linear response of the heat dissipation hole edge, so that the response of the heat dissipation hole edge in the second image is not additionally enhanced.

[0061] The value is generally not less than To ensure that the weld line response amplitude in the second image decreases by at least [percentage missing] compared to the first image. This produces sufficient differential contrast. Taking the above PC / ABS injection molded part parameters as an example, Generally take .

[0062] From the candidate values ​​that satisfy the above dual constraints, select the one that makes... Get the minimum value As a reference rotation angle This selection criterion ensures that, among the candidate angles that satisfy both the spacing and the direction of the heat dissipation holes, the position with the weakest weld line response is further selected, maximizing the contrast between the weld line and the heat dissipation hole responses in the difference diagram.

[0063] When the preset rotation angle range is narrow (e.g., the total width of the range is insufficient) When the double constraint filtering returns an empty set, the following strategy is used: First, retain the second constraint ( ),Will The filter increments gradually decrease according to a preset step size (usually 0.5°) until the results are not empty; if Decrease to the minimum allowed value (Generally take) If the condition cannot be met even after 1000, then abandon the second constraint and retain only the first one. Furthermore, the preset linearity threshold is increased during the subsequent differential graph connectivity analysis stage to compensate for the enhanced interference from the heat dissipation holes. Each trigger of the above degradation strategy should be logged. When the trigger frequency exceeds 5% of the total detection volume, the rotation angle range is generally expanded or the hardware configuration is re-evaluated.

[0064] like and If the design documents cannot be obtained, a two-dimensional Fourier transform can be performed on the heat dissipation hole region in the calibration scan image sequence to extract the period corresponding to the main peak of the spatial frequency of the hole array in order to estimate the period. Then perform circle fitting on the hole edge profile to estimate... Substitute the obtained estimated value into the above formula to calculate. Functionally, it is equivalent to reading directly from the design file.

[0065] Furthermore, the first camera is gradually rotated within a preset rotation angle range, and frame-by-frame images of the defect-free injection-molded calibration part are acquired, wherein the difference in rotation angle between adjacent frames satisfies .

[0066] For example, during the calibration scan, the difference in rotation angle between adjacent frames must satisfy... The reason is that if the sampling interval exceeds Then the sampling density of the nonlinear least squares iteration of Gaussian fitting is insufficient near the peak. and The estimation error will increase significantly, thus affecting the accuracy of the two-point derivation of the closed solution. For example, the step size must not exceed 1.6°, but this implementation takes 1° to leave a margin.

[0067] During the calibration phase When the initial value is unknown, a coarse scan can be performed first with a larger step size (e.g., 2°) to obtain the desired result. Rough valuation , and then The calibration scan is re-executed using the fine scan step size to ensure the step size constraint is met. The coarse and fine scans can be executed continuously in the same calibration process, and the total time is still within the downtime allowed for mass production changeover. It should be noted that this step size constraint only applies to the angle stepping of the first camera in the calibration scan, and is unrelated to the operation of each of the two cameras acquiring only one frame during the mass production testing phase, thus not increasing the burden on the mass production cycle.

[0068] Furthermore, the method of simultaneously acquiring data from the first and second cameras on the injection-molded part under inspection, registering the first and second images, and calculating the difference in linear feature response intensity pixel by pixel to obtain the differential response map includes: Images of the injection-molded part to be inspected are captured by a first camera and a second camera, respectively, and denoted as the first image and the second image. The coordinates of corresponding feature points in the first image and the second image are extracted, and the affine transformation matrix is ​​obtained by fitting using the least squares method. ; the first image The homogeneous coordinates of a pixel are denoted as ,pass The corresponding coordinates of each pixel in the first image in the second image coordinate system are obtained. The first image is reverse-mapped and resampled so that the first image and the second image correspond pixel by pixel in the second image coordinate system. The corresponding first image and the second image are then subjected to Gabor filtering in the arc transition area to obtain the first amplitude image and the second amplitude image. The difference is then calculated pixel by pixel to obtain the differential response image.

[0069] For example, the first camera is rotated to the peak excitation rotation angle. The second camera rotates to the reference rotation angle. Subsequently, simultaneous image acquisition is triggered on the same injection molded part to be inspected, resulting in the first image. With the second image .

[0070] extract and The coordinates of the corresponding feature points in the mid-circular transition zone can be obtained. These feature points can be extracted using corner detection operators (such as Harris or FAST corner detection), or a fixed set of feature points can be preset based on the geometric relationship of the hole array in the injection molded part design file. Both methods can provide a sufficient number of corresponding point pairs. An affine transformation matrix is ​​then fitted to the corresponding point coordinates using the least squares method. Make the homogeneous coordinates of feature points in the first image Homogeneous coordinates of corresponding points in the second image satisfy The first image is resampled by reverse mapping of each pixel, so that the first image and the second image correspond pixel by pixel in the second image coordinate system, thus obtaining the registered first image. .

[0071] In choosing the registration transformation method, affine transformation is the preferred method. It is suitable for scenarios where the optical axes of the two cameras are approximately parallel and the geometric distortion caused by the rotation angle change is mainly linear scaling and cropping. The affine transformation matrix... With 6 degrees of freedom, at least 3 pairs of corresponding points are required for the solution. If the optical axes of the two cameras are mounted at an angle exceeding 2°, affine transformation is insufficient to eliminate viewpoint distortion. In this case, a homography matrix (i.e., an 8-degree-of-freedom projection transformation matrix, denoted as ) can be used. Registration is performed. satisfy ( (This indicates that homogeneous coordinates are equivalent), and can be solved by a direct linear transformation algorithm from four or more pairs of corresponding points; for scenarios with good camera mounting accuracy (optical axis angle not exceeding 0.5°) and high pixel resolution (physical size corresponding to a single pixel not exceeding 5 micrometers), only horizontal translation can be used. Vertical translation amount In-plane rotation angle A rigid body transformation (with 3 degrees of freedom) is constructed to reduce the number of registration parameters and mitigate the impact of feature point matching errors. All three registration methods described above are specific implementations of "registering the first image with the second image," and the resulting registration ensures that the pixel correspondence between the two images is established within the circular arc transition region.

[0072] After registration and Gabor filtering is performed in the circular transition region (the filtering parameters are the same as those mentioned above, i.e., the direction angle). Spatial frequency ,wavelength Aspect Ratio Phase shift ), thus obtaining the first value image Second value map Then calculate the difference pixel by pixel. Obtain the difference response plot Because the first camera is located at the peak excitation rotation angle The weld line is bright. The middle response amplitude is the largest; the second camera is located at the reference rotation angle. The response amplitude of the weld line deviates from the peak value on the Gaussian curve and is significantly lower than the peak value. The response of the bright fringes at the edges of the heat dissipation holes showed little difference in amplitude between the two images. The value approaches zero. Regarding the difference... For pixels with negative values, set them to zero before performing subsequent connected component analysis to avoid false connected components caused by image noise.

[0073] Furthermore, the method for marking continuous linear regions in the differential response map where the difference value exceeds a preset judgment threshold as shallow linear defect regions includes: For each connected region in the difference response graph where the difference value exceeds a preset threshold, the projection range along the main direction is calculated as the length, with the direction of the eigenvector corresponding to the largest eigenvalue of the covariance matrix of the connected region point set as the main direction. The projection range along the secondary direction is used as the width. ;Will Connected regions with a linearity threshold not lower than a preset threshold are marked as shallow linear defect regions. Connected regions with linearity below the preset threshold are identified as heat dissipation hole residual interference and are removed.

[0074] For example, for the difference response map The difference in the mean value exceeds the preset judgment threshold. The pixels are labeled with connected components (using the 8-connectivity criterion), resulting in several connected components. For each connected component, the coordinate set of all pixels within that component is extracted, and its covariance matrix is ​​calculated. The direction of the eigenvector corresponding to the larger eigenvalue of the covariance matrix is ​​taken as the principal direction, and the direction of the eigenvector corresponding to the smaller eigenvalue is taken as the secondary direction. The projection range of all pixel coordinates within that connected component along the principal direction is calculated as the length. The projection range along the secondary direction is used as the width. .

[0075] Will Not lower than the preset linearity threshold The connected regions are marked as shallow linear defect regions; Below The connected regions were identified as heat dissipation hole residual interference and removed.

[0076] and Values: During the calibration phase, perform a complete inspection process on at least 20 known parts with weld line defects and at least 20 known parts without defects, and record the differential peak values ​​of each connected region in the differential response graph. Distribution, with operating points corresponding to a false negative rate of less than 1% and a false positive rate of less than 2%. The combination is considered the preferred value. Taking the specific implementation example of the above PC / ABS injection molded part as an example, the above statistical method yields the following results. (Normalized to a grayscale range of 255) At that time, the false alarm rate was 0.6% and the false alarm rate was 1.3%, which met the mass production quality requirements.

[0077] Regarding compensation measures when the reference rotation angle fails to meet the minimum direction constraint of the heat dissipation hole: [The following is a possible solution / measurement] The algorithm is improved to version 6.0 to enhance the ability to eliminate circular residual responses from heat dissipation holes; at the same time, morphological closing operations (with a kernel size of 3 pixels × 3 pixels) are performed on the difference response map to suppress short line segment responses formed by heat dissipation hole residuals, and then connected region marking is performed.

[0078] Finally, taking the online mass production testing of a certain model of laptop casing PC / ABS injection molded parts as an example, the complete execution process of the calibration stage and the mass production testing stage is illustrated to help this embodiment be understood and implemented: During the calibration phase, the defect-free calibration part is placed on the inspection table; the first camera is placed in... to The image was captured frame by frame within a 1° step range, for a total of 31 frames. Gabor filtering is performed on the circular transition region of each frame image to extract the linear feature response intensity of each frame. The Gaussian curve was fitted using the Levenberg-Marquardt algorithm to obtain... , , ;set up , For no fewer than 30 defect-free parts and Data were collected from various locations, and the mean plus three standard deviations was used to determine the standard deviation. Perform the complete process on 20 defective parts and 20 non-defective parts, and determine the ROC statistical method. , The above parameters are stored in the image processing unit configuration file and reused during mass production.

[0079] Mass production testing phase: Place the injection molded part on the testing table; place the first camera... The second camera was placed Simultaneously acquire one frame from each, and extract... and ;like and If the condition is deemed acceptable, proceed to the next item; otherwise, calculate using the closed-form solution. Check for any boundary violations and address them; rotate the first camera to... ,Sure And rotate the second camera to Synchronous data collection and Perform registration, Gabor filtering, and differencing to obtain... Perform connected component analysis and output defect region marking results and pass / fail conclusions. For mass production scenarios where more than 95% of parts are qualified, the vast majority of parts to be inspected are judged after the initial dual acquisition, and the overall cycle time is compatible with mass production requirements.

[0080] Example 2: Based on the same inventive concept, such as Figure 2 As shown, this embodiment also provides a defect detection system for injection-molded laptop casings, applied to a detection device in which a first camera and a second camera each rotate independently around a horizontal single axis to adjust the observation angle, and the injection-molded part is placed horizontally on the detection table; the system includes: The calibration module is used to rotate the first camera gradually within a preset rotation angle range and acquire images of the defect-free injection-molded calibration part frame by frame. The linear feature response intensity is extracted from the arc transition area in each frame image to obtain the response curve of the linear feature response intensity as a function of the rotation angle. The peak width parameter is obtained by curve fitting the response curve. The initial acquisition module is used to simultaneously acquire one frame of image of the injection molded part under inspection by the first camera and the second camera at their respective initial rotation angles, and extract the linear feature response intensity of the arc transition area to obtain the first response intensity and the second response intensity; when the first response intensity and the second response intensity do not exceed the preset suspected defect threshold, it is determined that the injection molded part under inspection has no shallow linear defects. The secondary acquisition module is used to calculate the peak excitation rotation angle based on the first response intensity, the second response intensity, the initial rotation angle of the first camera, the initial rotation angle of the second camera, and the peak width parameter when at least one of the first response intensity or the second response intensity exceeds a preset suspected defect threshold. The module rotates the first camera to the peak excitation rotation angle and determines a rotation angle whose difference from the peak excitation rotation angle is not less than a preset spacing threshold as a reference rotation angle. The second camera is then rotated to the reference rotation angle. The first camera and the second camera simultaneously acquire the first image and the second image of the injection molded part under inspection. The analysis module is used to register the first image and the second image and calculate the difference in linear feature response intensity pixel by pixel to obtain a differential response map. Continuous linear regions in the differential response map whose difference values ​​exceed a preset judgment threshold are marked as shallow linear defect regions.

[0081] It should be noted that the specific methods by which each module performs operations in the system described in the above embodiments have been described in detail in the embodiments related to the method, and will not be elaborated here.

[0082] The above is the complete content of the specific embodiments of the present invention. Any adjustments and substitutions made by those skilled in the art to the response curve function form, linear feature extraction operator, image registration transformation method, and parameter values ​​in the above embodiments without departing from the core concept of the present invention fall within the protection scope of the present invention.

Claims

1. A method for detecting defects in injection-molded notebook casings, applied to a detection device in which a first camera and a second camera each rotate independently around a horizontal single axis to adjust the observation angle, the injection-molded part being placed horizontally on a detection table; characterized in that, The method includes: The first camera is rotated gradually within a preset rotation angle range and images of the defect-free injection-molded calibration part are acquired frame by frame. The linear feature response intensity of the arc transition area in each frame image is extracted to obtain the response curve of the linear feature response intensity as a function of the rotation angle. The peak width parameter is obtained by curve fitting the response curve. The first camera and the second camera simultaneously acquire one frame of image of the injection molded part to be inspected at their respective initial rotation angles, and extract the linear feature response intensity of the arc transition area to obtain the first response intensity and the second response intensity; when the first response intensity and the second response intensity do not exceed the preset suspected defect threshold, it is determined that the injection molded part to be inspected has no shallow linear defects. When at least one of the first response intensity or the second response intensity exceeds the preset suspected defect threshold, the peak excitation rotation angle is calculated by using the closed solution of the Gaussian response curve through two-point sampling based on the first response intensity, the second response intensity, the initial rotation angle of the first camera, the initial rotation angle of the second camera, and the peak width parameter. The first camera is rotated to the peak excitation rotation angle, and a rotation angle with a difference from the peak excitation rotation angle not less than the preset spacing threshold is determined as the reference rotation angle. The second camera is rotated to the reference rotation angle, and the first camera and the second camera simultaneously acquire the first image and the second image of the injection molded part to be inspected. After registering the first image and the second image, the difference in linear feature response intensity is calculated pixel by pixel to obtain the differential response map. Continuous linear regions in the differential response map whose difference value exceeds the preset judgment threshold are marked as shallow linear defect regions. The method for obtaining the peak width parameter by curve fitting the response curve includes: The first camera is used during the calibration scanning process of the defect-free injection-molded calibration part. The rotation angle corresponding to the frame is denoted as The value ranges from 1 to positive integers, To calibrate the total number of scan frames; the first... The linear feature response intensity extracted from the circular arc transition region in the frame image is denoted as ;by The maximum value is used as the peak amplitude. The initial value is given by When taking the maximum value, the corresponding As the center angle of the peak of the response curve The initial value is set using a preset angle as the peak width parameter. Initial values; , , Given undetermined parameters, the objective function is minimized using the nonlinear least squares method. The peak width parameter is obtained by iterative solution. ,in Peak amplitude, The center angle of the peak of the response curve; The method for calculating the peak excitation rotation angle by sampling the closed solution of the Gaussian response curve at two points includes: by Indicates the peak excitation rotation angle, through the first response intensity Second response strength Peak excitation rotation angle obtained The closed solution is: ; in The initial rotation angle of the first camera. The initial rotation angle of the second camera. For peak width parameter, When calculated When the rotation angle exceeds the preset range of the first camera, the nearest boundary value of the preset rotation angle range is taken as... .

2. The method for detecting defects in injection-molded notebook casings according to claim 1, characterized in that, The method of simultaneously acquiring one frame each from the first and second cameras at their respective initial rotation angles of the injection-molded part under inspection, and extracting the linear feature response intensity of the arc transition region to obtain the first and second response intensities includes: The Gabor filter direction angle is determined by the tangent direction of the arc transition area contour line in the injection molded part design file. The Gabor filter spatial frequency is determined based on the width of the shallow recess in the injection molded part design file. Gabor filtering is applied to the circular transition region in the current frame image. The convolution result of the real part of the filter kernel with the image is recorded as the real response, and the convolution result of the imaginary part of the filter kernel with the image is recorded as the imaginary response. The square root of the sum of the squares of the real and imaginary responses is taken to obtain the amplitude of the Gabor filter response in the current frame. Within the arc transition area The maximum value is taken as the linear feature response intensity of the current frame image. The values ​​of the first and second frames acquired by the first and second cameras are respectively used to calculate the linear feature response intensity within the arc transition region. The maximum value is used to obtain the first response strength. Second response strength .

3. The method for detecting defects in injection-molded notebook casings according to claim 1, characterized in that, The first camera and the second camera simultaneously acquire one frame each of images of the injection molded part to be inspected at their respective initial rotation angles. The initial rotation angle of the first camera... Initial rotation angle of the second camera ,in The peak center angle of the response curve, To preset the symmetrical offset angle, and The value of must make and All are within the preset rotation angle range of the first camera; the initial rotation angles of the first and second cameras are about symmetry.

4. The method for detecting defects in injection-molded notebook casings according to claim 1, characterized in that, Methods for determining a rotation angle whose difference from the peak excitation rotation angle is not less than a preset spacing threshold as a reference rotation angle include: The diameter of the heat dissipation holes obtained from the injection molded part design file is denoted as... The distance between the center holes is denoted as Calculate the minimum offset angle of the linear response at the edge of the heat dissipation hole. Traverse candidate rotation angles within the preset rotation angle range of the first camera. Filtering simultaneously satisfies and All candidate values, of which The peak excitation rotation angle, For the preset spacing threshold, The peak center angle of the response curve; select from the candidate values ​​that meet the conditions. Get the minimum value As a reference rotation angle ,in Peak amplitude, This is the peak width parameter.

5. The method for detecting defects in injection-molded parts of a notebook computer casing according to claim 1, characterized in that, The first camera is rotated gradually within a preset rotation angle range, and images of the defect-free injection-molded calibration part are acquired frame by frame. The difference in rotation angle between adjacent frames satisfies the following condition. .

6. The method for detecting defects in injection-molded notebook casings according to claim 1, characterized in that, The method of simultaneously acquiring data from the first and second cameras on the injection-molded part under inspection, registering the first and second images, and then calculating the difference in linear feature response intensity pixel by pixel to obtain the differential response map includes: Images of the injection-molded part to be inspected are captured by a first camera and a second camera, respectively, and denoted as the first image and the second image. The coordinates of corresponding feature points in the first image and the second image are extracted, and the affine transformation matrix is ​​obtained by fitting using the least squares method. ; the first image The homogeneous coordinates of a pixel are denoted as ,pass The corresponding coordinates of each pixel in the first image in the second image coordinate system are obtained. The first image is reverse-mapped and resampled so that the first image and the second image correspond pixel by pixel in the second image coordinate system. The corresponding first image and the second image are then subjected to Gabor filtering in the arc transition area to obtain the first amplitude image and the second amplitude image. The difference is then calculated pixel by pixel to obtain the differential response image.

7. The method for detecting defects in injection-molded parts of a notebook casing according to claim 6, characterized in that, Methods for marking continuous linear regions in the differential response map where the difference value exceeds a preset threshold as shallow linear defect regions include: For each connected region in the difference response graph where the difference value exceeds a preset threshold, the projection range along the main direction is calculated as the length, with the direction of the eigenvector corresponding to the largest eigenvalue of the covariance matrix of the connected region point set as the main direction. The projection range along the secondary direction is used as the width. ;Will Connected regions with a linearity threshold not lower than a preset threshold are marked as shallow linear defect regions. Connected regions with linearity below the preset threshold are identified as heat dissipation hole residual interference and are removed.

8. A defect detection system for injection-molded notebook casings, applied to a detection device in which a first camera and a second camera each rotate independently around a horizontal single axis to adjust the observation angle, the injection-molded part being placed horizontally on a detection table; characterized in that, The system includes: The calibration module is used to rotate the first camera gradually within a preset rotation angle range and acquire images of the defect-free injection-molded calibration part frame by frame. The linear feature response intensity is extracted from the arc transition area in each frame image to obtain the response curve of the linear feature response intensity as a function of the rotation angle. The peak width parameter is obtained by curve fitting the response curve. The initial acquisition module is used to simultaneously acquire one frame of image of the injection molded part under inspection by the first camera and the second camera at their respective initial rotation angles, and extract the linear feature response intensity of the arc transition area to obtain the first response intensity and the second response intensity; when the first response intensity and the second response intensity do not exceed the preset suspected defect threshold, it is determined that the injection molded part under inspection has no shallow linear defects. The secondary acquisition module is used to calculate the peak excitation rotation angle based on the first response intensity, the second response intensity, the initial rotation angle of the first camera, the initial rotation angle of the second camera, and the peak width parameter when at least one of the first response intensity or the second response intensity exceeds a preset suspected defect threshold. The module rotates the first camera to the peak excitation rotation angle and determines a rotation angle whose difference from the peak excitation rotation angle is not less than a preset spacing threshold as a reference rotation angle. The second camera is then rotated to the reference rotation angle. The first camera and the second camera simultaneously acquire the first image and the second image of the injection molded part under inspection. The analysis module is used to register the first image and the second image and calculate the difference in linear feature response intensity pixel by pixel to obtain a differential response map. Continuous linear regions in the differential response map whose difference values ​​exceed a preset judgment threshold are marked as shallow linear defect regions. The method for obtaining the peak width parameter by curve fitting the response curve includes: The first camera is used during the calibration scanning process of the defect-free injection-molded calibration part. The rotation angle corresponding to the frame is denoted as The value ranges from 1 to positive integers, To calibrate the total number of scan frames; the first... The linear feature response intensity extracted from the circular arc transition region in the frame image is denoted as ;by The maximum value is used as the peak amplitude. The initial value is given by When taking the maximum value, the corresponding As the center angle of the peak of the response curve The initial value is set using a preset angle as the peak width parameter. Initial values; , , Given undetermined parameters, the objective function is minimized using the nonlinear least squares method. The peak width parameter is obtained by iterative solution. ,in Peak amplitude, The center angle of the peak of the response curve; The method for calculating the peak excitation rotation angle by sampling the closed solution of the Gaussian response curve at two points includes: by Indicates the peak excitation rotation angle, through the first response intensity Second response strength Peak excitation rotation angle obtained The closed solution is: ; in The initial rotation angle of the first camera. The initial rotation angle of the second camera. For peak width parameter, When calculated When the rotation angle exceeds the preset range of the first camera, the nearest boundary value of the preset rotation angle range is taken as... .