A battery cover quality detection method, device, computer equipment and storage medium
By performing image processing on the battery cover, extracting the contours and performing quality abnormality detection, the problems of large errors in battery cover detection and difficulty in full inspection in the prior art are solved, accurate quality detection and automated detection of the battery cover are realized, and production efficiency is improved.
Patent Information
- Application Number
- CN202111162244.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-30
- Publication Date
- 2024-12-24
- Estimated Expiration
- 2041-09-30
Smart Images

Figure CN114004790B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing and product quality inspection, and in particular to a battery cover quality inspection method, device, computer equipment and storage medium. Background Art
[0002] During the production process of the battery cover, deformation, dimensional abnormalities such as being too long or too short, and missing buckles may occur due to certain reasons such as processing technology. Moreover, if the battery cover is installed without quality inspection, rework and return of materials are likely to occur. There may also be quality problems when the product leaves the factory, resulting in a poor user experience. Therefore, it is necessary to conduct quality inspection on the battery cover before installation, remove unqualified products in advance, and ensure the quality of materials on the production line.
[0003] In the prior art, manual methods are used to determine whether the battery cover is deformed, has abnormal dimensions, or has missing buckles. However, the manual method requires manual measurement of the length of the battery cover with a ruler, which is prone to certain errors, and there will also be certain errors in determining the buckle and deformation. In addition, for large quantities of materials on the production line, it is impossible to perform a full manual inspection, and only random inspections can be performed, so some unqualified parts will flow into the assembly area. Summary of the invention
[0004] The technical problem to be solved by the present invention is that the error in quality inspection of battery covers in the prior art is large and it is difficult to fully inspect a large number of battery covers.
[0005] In order to solve the above technical problems, the present invention provides a battery cover quality detection method, comprising:
[0006] Acquire a battery cover image of a battery cover to be inspected;
[0007] Extracting the contour of the battery cover to be detected from the battery cover image;
[0008] The quality abnormality detection of the battery cover to be detected is performed based on the contour of the battery cover to be detected; the quality abnormality includes at least one of size abnormality, deformation, and buckle abnormality.
[0009] Optionally, the battery cover image includes a front image of the battery cover to be inspected;
[0010] The step of performing quality abnormality detection on the battery cover to be detected based on the contour of the battery cover to be detected comprises:
[0011] Determine the actual size of the battery cover to be inspected based on the contour of the battery cover to be inspected extracted from the front image;
[0012] The battery cover to be inspected is detected to determine whether the size is abnormal according to the actual size.
[0013] Optionally, the step of determining the actual size of the battery cover to be inspected based on the contour of the battery cover to be inspected extracted from the front image includes:
[0014] Obtaining the number of pixels corresponding to the outline of the battery cover to be detected;
[0015] Based on a preset ratio of the actual size to the number of pixels, the actual size of the battery cover to be detected is determined.
[0016] Optionally, the battery cover image includes a side image of the battery cover to be inspected;
[0017] The step of performing quality abnormality detection on the battery cover to be detected based on the contour of the battery cover to be detected comprises:
[0018] extracting a deformation detection area from the side image;
[0019] Performing edge curve fitting based on the edge of the deformation detection area to obtain a fitting curve of the deformation detection area;
[0020] Whether the battery cover to be inspected is deformed is detected based on the fitting curve.
[0021] Optionally, the step of detecting whether the battery cover to be detected is deformed based on the fitting curve includes:
[0022] Draw a straight line segment with the starting point and the end point of the fitting curve as two end points, and calculate the distance from each fitting point on the fitting curve to the straight line segment;
[0023] Determine whether the number of fitting points whose distance is greater than a set distance threshold exceeds a set number threshold;
[0024] If the number exceeds a set threshold, it is determined that the battery cover to be detected is deformed.
[0025] Optionally, the step of performing quality abnormality detection on the battery cover to be detected based on the contour of the battery cover to be detected includes:
[0026] Extracting a buckle image region from the battery cover image;
[0027] The quality abnormality detection is performed on the battery cover to be inspected based on the similarity between the buckle image area and the buckle image template.
[0028] Optionally, the step of performing quality abnormality detection on the battery cover to be detected based on the similarity between the buckle image area and the buckle image template includes:
[0029] Extracting local features of the buckle area in the battery cover image using a scale-invariant feature transformation algorithm;
[0030] Calculating a structural similarity value between the local feature and a preset buckle image template based on a structural similarity algorithm;
[0031] Determining whether the structural similarity value is less than a set similarity threshold;
[0032] If it is less than, it is determined that the battery cover to be detected has a buckle abnormality; otherwise, it is determined that the battery cover to be detected has no buckle abnormality.
[0033] Optionally, after acquiring the battery cover image of the battery cover to be inspected, the method further includes:
[0034] Performing grayscale processing on the acquired battery cover image to obtain a corresponding grayscale image;
[0035] The obtained grayscale image is low-pass filtered to remove image noise.
[0036] In order to solve the above technical problems, the present invention provides a battery cover quality detection device, comprising:
[0037] An image acquisition module, used to acquire a battery cover image of a battery cover to be inspected;
[0038] A contour extraction module, used to extract the contour of the battery cover to be detected from the battery cover image;
[0039] The quality detection module is used to perform quality abnormality detection on the battery cover to be detected based on the contour of the battery cover to be detected; the quality abnormality includes at least one of size abnormality, deformation, and buckle abnormality.
[0040] Optionally, the battery cover image includes a front image of the battery cover to be inspected;
[0041] The quality detection module is used to determine the actual size of the battery cover to be detected based on the contour of the battery cover to be detected extracted from the front image; and detect whether the battery cover to be detected has abnormal size according to the actual size.
[0042] Optionally, the quality detection module is specifically used to obtain the number of pixels corresponding to the outline of the battery cover to be detected; determine the actual size of the battery cover to be detected based on a preset ratio of the actual size to the number of pixels; and detect whether the battery cover to be detected has abnormal size according to the actual size.
[0043] Optionally, the battery cover image includes a side image of the battery cover to be inspected;
[0044] The quality detection module is used to extract a deformation detection area from the side image; perform edge curve fitting based on the edge of the deformation detection area to obtain a fitting curve of the deformation detection area; and detect whether the battery cover to be detected is deformed based on the fitting curve.
[0045] Optionally, the quality detection module is specifically used to extract a deformation detection area from the side image; perform edge curve fitting based on the edge of the deformation detection area to obtain a fitting curve of the deformation detection area; draw a straight line segment with the starting point and the end point of the fitting curve as two end points, and calculate the distance from each fitting point on the fitting curve to the straight line segment; determine whether the number of fitting points whose distance is greater than a set distance threshold exceeds a set number threshold; if it exceeds the set number threshold, it is determined that the battery cover to be detected is deformed.
[0046] Optionally, the quality detection module is used to extract a buckle image area from the battery cover image; and perform quality anomaly detection on the battery cover to be detected based on the similarity between the buckle image area and the buckle image template.
[0047] Optionally, the quality detection module is specifically used to extract local features of the buckle area in the battery cover image by using a scale-invariant feature transformation algorithm; calculate the structural similarity value between the local features and a pre-set buckle image template based on a structural similarity algorithm; determine whether the structural similarity value is less than a set similarity threshold; if so, determine that a buckle abnormality occurs in the battery cover to be detected; otherwise, determine that no buckle abnormality occurs in the battery cover to be detected.
[0048] Optionally, the battery cover quality detection device further includes:
[0049] The image preprocessing module is used to perform grayscale processing on the battery cover image to obtain a corresponding grayscale image after obtaining the battery cover image of the battery cover to be inspected; and perform low-pass filtering on the obtained grayscale image to remove image noise.
[0050] To solve the above technical problems, the present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above method when executing the computer program.
[0051] In order to solve the above technical problem, the present invention provides a computer-readable storage medium, on which a computer program is stored, and the program implements the above method when executed by a processor.
[0052] Compared with the prior art, one or more embodiments of the above scheme may have the following advantages or beneficial effects:
[0053] By using the battery cover quality detection method, device, computer equipment and storage medium of the present invention, when performing battery cover quality detection, a battery cover image of the battery cover to be detected is obtained; the contour of the battery cover to be detected is extracted from the battery cover image; and quality abnormality detection of the battery cover to be detected is performed based on the contour of the battery cover to be detected; the quality abnormality includes at least one of size abnormality, deformation, and buckle abnormality.
[0054] It can be seen that the solution of the present invention solves the problem of abnormal product installation caused by unqualified battery covers, and can automatically and accurately distinguish qualified battery covers from unqualified ones, and then remove unqualified ones, which can replace manual inspection and effectively improve production efficiency. In addition, image processing is used to determine whether there are quality problems with the battery cover, and unqualified products are removed without the need for manual judgment, saving manpower and time costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0056] Figure 1 A flow chart of a battery cover quality detection method provided by an embodiment of the present invention;
[0057] Figure 2 Another flow chart of the battery cover quality detection method provided by the embodiment of the present invention;
[0058] Figure 3 A front schematic diagram of a battery cover to be inspected provided by an embodiment of the present invention;
[0059] Figure 4 Another flow chart of the battery cover quality detection method provided by the embodiment of the present invention;
[0060] Figure 5 A schematic side view of a battery cover to be inspected provided by an embodiment of the present invention;
[0061] Figure 6 Another flow chart of the battery cover quality detection method provided by the embodiment of the present invention;
[0062] Figure 7 A structural diagram of a battery cover quality detection device provided by an embodiment of the present invention;
[0063] Figure 8Another structural diagram of a battery cover quality detection device provided by an embodiment of the present invention;
[0064] Fig. 9 A structural diagram of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0065] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0066] In order to solve the problems in the prior art of large errors in quality inspection of battery covers and difficulty in fully inspecting large quantities of battery covers, embodiments of the present invention provide a battery cover quality inspection method, apparatus, computer equipment and storage medium.
[0067] The battery cover quality detection method provided by the embodiment of the present invention is first described below.
[0068] Embodiment 1
[0069] like Figure 1 As shown in FIG. 1 , a flow chart of a battery cover quality detection method provided by an embodiment of the present invention is provided. The battery cover quality detection method may include the following steps:
[0070] Step S101: obtaining a battery cover image of a battery cover to be inspected.
[0071] In practical applications, the camera can be fixedly installed at a set height, and a ruler of known length can be set. It should be noted that in order to facilitate the positioning of the ruler from the captured image, the ruler is usually set to be different and unique from the object of the image to be collected, and is placed at a fixed position within the camera's field of view. After installation, the battery cover image of the battery cover to be inspected transmitted by the conveyor belt can be obtained. For scenarios where the camera installation position is fixed, the camera can also be installed at a set height, and the ratio of the actual size of any object in the field of view to the number of pixels can be calculated in advance based on the installation height. In addition, the ruler can be omitted during detection, and the outline of the battery cover can be directly extracted.
[0072] In order to improve the accuracy of battery cover quality inspection, the battery cover image can be preprocessed after obtaining the battery cover image of the battery cover to be inspected. For example, the obtained battery cover image can be gray-scale processed to obtain a corresponding gray-scale image; and the obtained gray-scale image can be low-pass filtered to remove image noise.
[0073] In one case, the acquired color battery cover image (image size is A*B*3) can be grayed to obtain a gray image (image size is A*B). Since the noise frequency band of the battery cover image is mainly distributed in the high frequency band, the gray image can be low-pass filtered. For example, a 3*3 Gaussian kernel can be used to filter the image to remove image noise.
[0074] Step S102: extracting the contour of the battery cover to be detected from the battery cover image.
[0075] Furthermore, edge detection is performed on the denoised image, and the edge transition is made smoother through dilation and erosion. The contour edge consistent with the object is found in the image after edge detection, and the battery cover contour and ruler contour area are screened out by setting the contour area threshold.
[0076] Step S103: performing quality abnormality detection on the battery cover to be detected based on the contour of the battery cover to be detected; the quality abnormality includes at least one of size abnormality, deformation, and buckle abnormality.
[0077] The solution of the present invention solves the problem of abnormal product installation caused by unqualified battery covers. It can automatically and accurately distinguish qualified battery covers from unqualified ones, and then remove unqualified ones, which can replace manual inspection and effectively improve production efficiency. In addition, it uses image processing to determine whether there are quality problems with the battery cover and remove unqualified products without manual judgment, saving manpower and time costs.
[0078] Embodiment 2
[0079] like Figure 2 FIG. 2 is another flow chart of a battery cover quality detection method provided by an embodiment of the present invention. The battery cover quality detection method may include the following steps:
[0080] Step S201: Acquire a battery cover image of a battery cover to be detected; the battery cover image includes a front image of the battery cover to be detected, see Figure 3 , is a front schematic diagram of a battery cover to be inspected provided in an embodiment of the present invention.
[0081] Step S202: extracting the contour of the battery cover to be detected from the battery cover image.
[0082] Step S203: determining the actual size of the battery cover to be inspected based on the contour of the battery cover to be inspected extracted from the front image.
[0083] In one implementation, the actual size of the battery cover to be detected can be determined in the following manner: obtaining the number of pixels corresponding to the outline of the battery cover to be detected; and determining the actual size of the battery cover to be detected based on a preset ratio of the actual size to the number of pixels.
[0084] For example, assume that: the actual size of the ruler is known to be M, the extracted ruler contour length in pixels is PX, and the ratio S of the preset actual size to the number of pixels is calculated using S=M / PX. Then, through the extracted battery cover contour, the number of pixels corresponding to the length of the battery cover is BPX. Using the formula m=S*BPX, it can be concluded that the actual size of the battery cover is m.
[0085] Step S204: Detecting whether the battery cover to be detected has abnormal size according to the actual size.
[0086] It should be noted that Figure 2 The method embodiment shown has Figure 1 In addition to all the beneficial effects of the method embodiment shown, the ratio of the actual size to the number of pixels can be determined in advance using the image taken after the camera is installed and fixed, so as to calculate the actual size of the battery cover, and then perform size abnormality detection on the battery cover, so as to accurately distinguish between qualified and unqualified battery covers, facilitate the elimination of unqualified products, replace manual inspection, effectively improve production efficiency, and save manpower and time costs.
[0087] Embodiment 3
[0088] like Figure 4 As shown, it is another flow chart of the battery cover quality detection method provided by the embodiment of the present invention. The battery cover quality detection method may include the following steps:
[0089] Step S301: Acquire a battery cover image of a battery cover to be detected; the battery cover image includes a side image of the battery cover to be detected, see Figure 5 , is a side schematic diagram of a battery cover to be inspected provided in an embodiment of the present invention.
[0090] Step S302: extracting the contour of the battery cover to be detected from the battery cover image.
[0091] Step S303: extracting a deformation detection area from the side image.
[0092] Step S304: performing edge curve fitting based on the edge of the deformation detection area to obtain a fitting curve of the deformation detection area.
[0093] In one implementation, the least squares method can be used to fit the edge curve. Of course, other algorithms can also be used for curve fitting, which is not limited in the embodiment of the present invention.
[0094] Step S305: Detecting whether the battery cover to be detected is deformed based on the fitting curve.
[0095] Considering that there is a slight curvature at both ends of the battery cover, it is necessary to eliminate the interference of the structure of the battery cover itself when performing deformation detection of the battery cover. For example, for the extracted battery cover contour, starting from the left and right ends, the middle area where the two ends first encounter the curvature is taken as the deformation detection area. Similarly, in order to improve the accuracy of battery cover quality detection, the detection area can be corroded to remove edge noise, and the edge of the battery cover can be extracted using edge detection. Since the upper and lower edges of the battery cover are parallel, the upper edge or the lower edge can be selected for deformation detection of the battery cover.
[0096] In one implementation, whether the battery cover is deformed can be detected in the following manner: a straight line segment is drawn with the starting point and the end point of the fitting curve as the two end points, and the distance from each fitting point on the fitting curve to the straight line segment is calculated; it is determined whether the number of fitting points whose distance is greater than a set distance threshold exceeds a set number threshold; if it exceeds the set number threshold, it is determined that the battery cover to be detected is deformed.
[0097] For example, the coordinate values of the starting point and the end point of the fitting curve are taken to draw a straight line segment L, and the fitting points P1, P2, ..., P on the straight line segment L are calculated. n-1 , P n Distances to the straight line segment d1, d2, ..., d n-1 , d n ; Determine the distances d1, d2, ..., d respectively n-1 , d n Is it greater than the set distance threshold th1? If so, it indicates that the fitting point is an unqualified fitting point. If the number of unqualified fitting points exceeds the set number threshold th2, it is determined that the battery cover is deformed. Otherwise, it is determined that the battery cover is not deformed.
[0098] It should be noted that Figure 4 The method embodiment shown has Figure 1 In addition to all the beneficial effects of the method embodiment shown, a curve fitting method can also be used to determine the deformation degree of the battery cover, and then detect whether the battery cover is deformed, so as to accurately distinguish between qualified and unqualified battery covers, facilitate the removal of unqualified products, replace manual inspection, effectively improve production efficiency, and save manpower and time costs.
[0099] Embodiment 4
[0100] like Figure 6FIG. 2 is another flow chart of a battery cover quality detection method provided by an embodiment of the present invention. The battery cover quality detection method may include the following steps:
[0101] Step S401: obtaining a battery cover image of a battery cover to be inspected.
[0102] Step S402: extracting the contour of the battery cover to be detected from the battery cover image.
[0103] Step S403: extracting a buckle image area from the battery cover image;
[0104] Step S404: performing quality anomaly detection on the battery cover to be inspected based on the similarity between the buckle image region and the buckle image template.
[0105] It is understandable that, for a battery cover with a buckle structure, a missing buckle or a damaged buckle will affect the actual use effect. The buckle anomaly detected by the embodiment of the present invention may include at least two situations: a missing buckle and a damaged buckle.
[0106] In one implementation, the quality abnormality detection of the battery cover to be detected can be performed in the following manner: using a scale-invariant feature transformation algorithm to extract local features of the buckle area in the battery cover image; calculating the structural similarity value between the local features and a preset buckle image template based on structural similarity; judging whether the structural similarity value is less than a set similarity threshold; if so, determining that the battery cover to be detected has a buckle abnormality; otherwise, determining that the battery cover to be detected has no buckle abnormality.
[0107] Specifically, the buckle image area can be set as a buckle sub-template. In this way, when detecting buckle abnormalities, feature point matching is performed on the buckle image template and the battery cover image based on the SIFT (Scale-invariant feature transform) algorithm, and then the KNN (K-Nearest Neighbor) algorithm is used to find the two nearest neighbor data points. If the ratio of the closest to the second closest is greater than the set value, then the closest value is retained and used as the matching point, and then several matching points of the above two images are found. The random sampling consensus algorithm RANSAC (Random sample consensus) is used to select 4 random points from several matching points, and the homography matrix H is calculated. It is continuously iterated until the optimal H matrix is obtained; the battery cover image is mapped and transformed through the H matrix to obtain the matched image, and the matching buckle image area is extracted from the battery cover image through the pixel coordinates of the buckle sub-template; SSIM (Structural Simulation) is further used. Similarity) structural similarity algorithm compares the differences between the two regions. If the value of the structural similarity is less than the set threshold, it is determined that a buckle abnormality has occurred, otherwise it is determined that no buckle abnormality has occurred.
[0108] It should be noted that Figure 6 The method embodiment shown has Figure 1 In addition to all the beneficial effects of the illustrated method embodiment, similarity detection can also be used to determine buckle abnormality detection, such as detecting the missing buckle, so as to accurately distinguish between qualified and unqualified battery covers, facilitate the removal of unqualified products, replace manual inspection, effectively improve production efficiency, and save manpower and time costs.
[0109] The battery cover quality detection device provided by the embodiment of the present invention is described below.
[0110] Embodiment 5
[0111] like Figure 7 FIG. 1 is a structural diagram of a battery cover quality detection device provided by an embodiment of the present invention, and the battery cover quality detection device includes:
[0112] An image acquisition module 510 is used to acquire a battery cover image of a battery cover to be inspected;
[0113] A contour extraction module 520, used to extract the contour of the battery cover to be detected from the battery cover image;
[0114] The quality detection module 530 is used to perform quality abnormality detection on the battery cover to be detected based on the contour of the battery cover to be detected; the quality abnormality includes at least one of size abnormality, deformation, and buckle abnormality.
[0115] The solution of the present invention solves the problem of abnormal product installation caused by unqualified battery covers. It can automatically and accurately distinguish qualified battery covers from unqualified ones, and then remove unqualified ones, which can replace manual inspection and effectively improve production efficiency. In addition, it uses image processing to determine whether there are quality problems with the battery cover and remove unqualified products without manual judgment, saving manpower and time costs.
[0116] In a preferred implementation, Figure 8 As shown, the battery cover quality inspection device also includes: an image preprocessing module 540, which is used to perform grayscale processing on the acquired battery cover image after acquiring the battery cover image of the battery cover to be inspected, so as to obtain a corresponding grayscale image; and perform low-pass filtering on the obtained grayscale image to remove image noise.
[0117] In one embodiment of the present invention, the battery cover image includes a front image of the battery cover to be inspected; accordingly, the quality detection module 530 is used to determine the actual size of the battery cover to be inspected based on the contour of the battery cover to be inspected extracted from the front image; and detect whether the battery cover to be inspected has abnormal size based on the actual size.
[0118] In one scenario, the quality detection module 530 is specifically used to obtain the number of pixels corresponding to the outline of the battery cover to be detected; determine the actual size of the battery cover to be detected based on a preset ratio of the actual size to the number of pixels; and detect whether the battery cover to be detected has abnormal size based on the actual size.
[0119] In another embodiment of the present invention, the battery cover image includes a side image of the battery cover to be inspected; accordingly, the quality detection module 530 is used to extract a deformation detection area from the side image; perform edge curve fitting based on the edge of the deformation detection area to obtain a fitting curve of the deformation detection area; and detect whether the battery cover to be inspected is deformed based on the fitting curve.
[0120] In one scenario, the quality detection module 530 is specifically used to extract a deformation detection area from the side image; perform edge curve fitting based on the edge of the deformation detection area to obtain a fitting curve of the deformation detection area; draw a straight line segment with the starting point and the end point of the fitting curve as two end points, and calculate the distance from each fitting point on the fitting curve to the straight line segment; determine whether the number of fitting points whose distance is greater than a set distance threshold exceeds a set number threshold; if it exceeds the set number threshold, it is determined that the battery cover to be detected is deformed.
[0121] In yet another embodiment of the present invention, the quality detection module 530 is used to extract a buckle image region from the battery cover image; and perform quality anomaly detection on the battery cover to be detected based on the similarity between the buckle image region and the buckle image template.
[0122] In one scenario, the quality detection module 530 is specifically used to extract local features of the buckle area in the battery cover image using a scale-invariant feature transformation algorithm; calculate the structural similarity value between the local features and a pre-set buckle image template based on a structural similarity algorithm; determine whether the structural similarity value is less than a set similarity threshold; if so, determine that a buckle abnormality occurs in the battery cover to be detected; otherwise, determine that no buckle abnormality occurs in the battery cover to be detected.
[0123] Embodiment 6
[0124] To solve the above technical problems, the present invention provides a computer device, such as Fig. 9 As shown, it includes a memory 610, a processor 620, and a computer program stored in the memory and executable on the processor, and the processor implements the method described above when executing the computer program.
[0125] The computer device may be a desktop computer, a notebook, a PDA, a cloud server or other computing device. The computer device may include, but is not limited to, a processor 620 and a memory 610. Those skilled in the art will appreciate that Fig. 9 It is only an example of a computer device and does not constitute a limitation of the computer device. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the computer device may also include input and output devices, network access devices, buses, etc.
[0126] The processor 620 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0127] The memory 610 may be an internal storage unit of the computer device, such as a hard disk or memory of the computer device. The memory 610 may also be an external storage device of the computer device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the computer device. Further, the memory 610 may also include both an internal storage unit of the computer device and an external storage device. The memory 610 is used to store the computer program and other programs and data required by the computer device. The memory 610 may also be used to temporarily store data that has been output or is to be output.
[0128] Embodiment 7
[0129] The embodiment of the present application also provides a computer-readable storage medium, which can be a computer-readable storage medium contained in the memory in the above embodiment; or a computer-readable storage medium that exists independently and is not assembled into a computer device. The computer-readable storage medium stores one or more computer programs, and when the program is executed by the processor, the above method is implemented.
[0130] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory 610, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0131] As for the system or device embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0132] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0133] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0134] It should be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0135] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0136] As used in this specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when" or "upon" or "in response to determining" or "in response to detecting." Similarly, the phrase "if it is determined" or "if a described condition or event is detected" may be interpreted, depending on the context, as meaning "upon determination" or "in response to determining" or "upon detection of a described condition or event" or "in response to detecting a described condition or event."
[0137] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.
Claims
1. A battery cover quality inspection method, characterized in that: include: Acquire a battery cover image of a battery cover to be detected, wherein the battery cover image includes a side image of the battery cover to be detected; Extracting the contour of the battery cover to be detected from the battery cover image; Performing quality abnormality detection on the battery cover to be detected based on the contour of the battery cover to be detected, wherein the quality abnormality includes at least one of size abnormality, deformation, and buckle abnormality; Wherein, the step of performing quality abnormality detection on the battery cover to be detected based on the contour of the battery cover to be detected comprises: extracting a deformation detection area from the side image; Performing edge curve fitting based on the edge of the deformation detection area to obtain a fitting curve of the deformation detection area; Whether the battery cover to be inspected is deformed is detected based on the fitting curve.
2. The battery cover quality inspection method according to claim 1, characterized in that: The battery cover image includes a front image of the battery cover to be inspected; The step of performing quality abnormality detection on the battery cover to be detected based on the contour of the battery cover to be detected comprises: Determine the actual size of the battery cover to be inspected based on the contour of the battery cover to be inspected extracted from the front image; The battery cover to be inspected is detected to determine whether the size is abnormal according to the actual size.
3. The battery cover quality inspection method according to claim 2, characterized in that: The step of determining the actual size of the battery cover to be detected based on the contour of the battery cover to be detected extracted from the front image comprises: Obtaining the number of pixels corresponding to the outline of the battery cover to be detected; Based on a preset ratio of the actual size to the number of pixels, the actual size of the battery cover to be detected is determined.
4. The battery cover quality inspection method according to claim 1, characterized in that: The step of detecting whether the battery cover to be detected is deformed based on the fitting curve comprises: Draw a straight line segment with the starting point and the end point of the fitting curve as two end points, and calculate the distance from each fitting point on the fitting curve to the straight line segment; Determine whether the number of fitting points whose distance is greater than a set distance threshold exceeds a set number threshold; If the number exceeds a set threshold, it is determined that the battery cover to be detected is deformed.
5. The battery cover quality inspection method according to claim 1, characterized in that: The step of performing quality abnormality detection on the battery cover to be detected based on the contour of the battery cover to be detected comprises: Extracting a buckle image region from the battery cover image; The quality anomaly detection is performed on the battery cover to be inspected based on the similarity between the buckle image area and the buckle image template.
6. The battery cover quality inspection method according to claim 5, characterized in that: The step of performing quality abnormality detection on the battery cover to be detected based on the similarity between the buckle image area and the buckle image template includes: Extracting local features of the buckle area in the battery cover image using a scale-invariant feature transformation algorithm; Calculating a structural similarity value between the local feature and a preset buckle image template based on a structural similarity algorithm; Determining whether the structural similarity value is less than a set similarity threshold; If it is less than, it is determined that the battery cover to be detected has a buckle abnormality; otherwise, it is determined that the battery cover to be detected has no buckle abnormality.
7. The battery cover quality inspection method according to any one of claims 1 to 6, characterized in that: After acquiring the battery cover image of the battery cover to be detected, the method further includes: Performing grayscale processing on the acquired battery cover image to obtain a corresponding grayscale image; The obtained grayscale image is low-pass filtered to remove image noise.
8. A battery cover quality detection device based on the battery cover quality detection method according to any one of claims 1 to 7, characterized in that: include: An image acquisition module, used to acquire a battery cover image of a battery cover to be inspected; A contour extraction module, used to extract the contour of the battery cover to be detected from the battery cover image; A quality detection module, used for performing quality abnormality detection of the battery cover to be detected based on the contour of the battery cover to be detected; The quality abnormality includes at least one of size abnormality, deformation, and buckle abnormality.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the battery cover quality detection method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the battery cover quality detection method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Matching method suitable for IC packaging equipment deformation object
CN106815833A
Spinneret plate special-shaped hole size detection method
CN111681206A
Mobile phone battery size measurement method based on machine vision
CN111879241A
