A distribution space editing method, defect screening method, and product classification method
Through the graphical interface editing of defect distribution space and demarcating molecular space, the problem of difficulty in classification and screening of defects and non-defects in the existing technology is solved, and efficient and user-friendly defect screening effect is achieved.
Patent Information
- Application Number
- CN202211064868.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-01
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2042-09-01
AI Technical Summary
In the prior art, the classification and screening of defects and non-defects is more difficult, and the classification and screening methods of related technologies are complex, which is not friendly to the testing personnel and is difficult for non-professional testing personnel to operate, which increases the difficulty of classification and screening of defects and non-defects.
Provide a defect distribution space editing method, which receives user operation instructions through a graphical interface, constructs and divides data space, subdivides to be filtered into multiple subspaces for filtering, and increases user friendliness.
Accurate classification and screening of screening defects is realized, the difficulty of distinguishing defects from non-defects is reduced, and the convenience and efficiency of the detection personnel are improved.
Smart Images

Figure CN115576469B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of detection technology, and in particular to a defect distribution space editing method, a defect screening method, a product classification method, a defect distribution space editing device, a defect screening device, a product classification device, a computer device and a readable storage medium. Background Art
[0002] At present, in order to ensure product quality and reduce the cost of defective products during the production process, it is necessary to test product quality in key processes. In the process of using intelligent AOI (Automatic Optical Inspection) equipment to perform high-precision inspection on the appearance of industrial products, some results will be detected, which include both defects and non-defects such as dust, dirt, and water stains. Therefore, it is necessary to classify and screen defects to distinguish between defects and non-defects detected in the product.
[0003] However, the imaging of non-defects and defects is similar, which makes it difficult to classify and screen defects and non-defects. In addition, the classification and screening methods in related technologies are relatively complex and less friendly to inspectors. Non-professional inspectors find it difficult to operate, which further increases the difficulty of classifying and screening defects and non-defects. Summary of the invention
[0004] In view of this, the present application provides a defect distribution space editing method, a defect screening method, a product classification method, a defect distribution space editing device, a defect screening device, a product classification device, a computer device and a readable storage medium, which solves the problem that it is difficult to classify and screen defects and non-defects in related technologies.
[0005] In a first aspect, an embodiment of the present application provides a defect distribution space editing method, comprising: receiving a first operation instruction from a user, displaying a graphical interface, the graphical interface including a feature quantity pool and a coordinate space editing area, the feature quantity pool including multiple feature quantity identifiers, the feature quantity identifiers being used to indicate feature quantities of defects to be screened, the feature quantities including key features and constraint features; receiving a second operation instruction from a user to drag the feature quantity identifier from the feature quantity pool to a coordinate axis, determining the feature quantity identifier selected by the user in the feature quantity pool, and constructing a first data space according to the key features indicated by the feature quantity identifier; receiving a third operation instruction from a user to edit a numerical scale in the coordinate space editing area, determining the numerical scale selected by the user in the coordinate space editing area, and generating a first data space according to the numerical scale. The first data space is divided into multiple areas by the first type of boundary lines generated by the numerical scale; a fourth operation instruction of the user is received to drag the feature quantity identifier from the feature quantity pool to the feature arrangement area, the feature quantity identifier selected by the user in the feature quantity pool is determined, and a second data space is constructed according to the key features and multiple areas indicated by the feature quantity identifier; a fifth operation instruction of the user is received to edit the numerical scale in the coordinate space editing area, the numerical scale selected by the user in the coordinate space editing area is determined, and the second data space is divided into multiple independent subspaces according to the second type of boundary lines generated by the numerical scale; a sixth operation instruction of the user is received to add constraint conditions of the constraint features to each subspace, and the subspace after adding the constraint conditions is used for classifying and screening the defects to be screened.
[0006] In the second aspect, an embodiment of the present application provides a defect screening method, including: obtaining multiple defects to be screened; according to the method of the first aspect, constructing a data space based on the characteristic quantities of the multiple defects to be screened, and dividing the data space into multiple independent subspaces, wherein the multiple defects to be screened are point sets in the data space; classifying and screening the defects to be screened in the subspace to determine whether the defects to be screened are defects or non-defects.
[0007] In the third aspect, an embodiment of the present application provides a product classification method, including: acquiring multiple product images of a product, and segmenting defects to be screened from the multiple product images; determining whether the defect to be screened is a defect according to the method of the second aspect; if the defect to be screened is a defect, determining the defect level of the defect to be screened, and counting the number of defects to be screened with different defect levels; determining the classification of the product according to the defect level of the defect to be screened that is a defect and the number of defects to be screened with different defect levels.
[0008] In a fourth aspect, an embodiment of the present application provides a defect distribution space editing device, including: a receiving module, used to receive a first operation instruction from a user; a display module, used to display a graphical interface in response to the first operation instruction, the graphical interface including a feature quantity pool and a coordinate space editing area, the feature quantity pool including multiple feature quantity identifiers, the feature quantity identifiers are used to indicate the feature quantities of the defects to be screened, and the feature quantities include key features and constraint features; the receiving module is also used to receive a second operation instruction from the user to drag the feature quantity identifier from the feature quantity pool to the coordinate axis; a construction module is used to determine the feature quantity identifier selected by the user in the feature quantity pool in response to the second operation instruction, and construct the first data space according to the key features indicated by the feature quantity identifier; the receiving module is also used to receive a third operation instruction from the user to edit the numerical scale in the coordinate space editing area; the dividing module is used to determine the numerical scale selected by the user in the coordinate space editing area in response to the third operation instruction, and generate a first data space according to the numerical scale The first type of boundary line divides the first data space into multiple areas; the receiving module is also used to receive a fourth operation instruction from the user to drag the feature quantity identifier from the feature quantity pool to the feature arrangement area; the construction module is also used to respond to the fourth operation instruction to determine the feature quantity identifier selected by the user in the feature quantity pool, and construct the second data space according to the key features and multiple areas indicated by the feature quantity identifier; the receiving module is also used to receive a fifth operation instruction from the user to edit the numerical scale in the coordinate space editing area; the dividing module is also used to respond to the fifth operation instruction to determine the numerical scale selected by the user in the coordinate space editing area, and divide the second data space into multiple independent subspaces according to the second type of boundary line generated by the numerical scale; the receiving module is also used to receive a sixth operation instruction from the user; the adding module is used to respond to the sixth operation instruction to add constraint conditions of the constraint features to each subspace, and the subspace after adding the constraint conditions is used for classification and screening of defects to be screened.
[0009] In the fifth aspect, an embodiment of the present application provides a defect screening device, including: an acquisition module for acquiring multiple defects to be screened; a processing module for constructing a data space based on the characteristic quantities of the multiple defects to be screened according to the device of the fourth aspect, and dividing the data space into multiple independent subspaces, wherein the multiple defects to be screened are point sets in the data space; a screening module for classifying and screening the defects to be screened in the subspace to determine whether the defects to be screened are defects or non-defects.
[0010] In the sixth aspect, an embodiment of the present application provides a product classification device, including: an acquisition module, used to acquire multiple product images of a product, and segment defects to be screened from the multiple product images; a judgment module, used to determine whether the defect to be screened is a defect according to the device of the fifth aspect; a determination module, used to determine the defect level of the defect to be screened if the defect to be screened is a defect, and count the number of defects to be screened with different defect levels; a classification module, used to determine the classification of the product according to the defect level of the defect to be screened that is a defect and the number of defects to be screened with different defect levels.
[0011] In a seventh aspect, an embodiment of the present application provides a computer device, which includes a processor and a memory, wherein the memory stores programs or instructions that can be executed on the processor, and when the programs or instructions are executed by the processor, the steps of the method of the first aspect are implemented.
[0012] In an eighth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method of the first aspect are implemented.
[0013] In the ninth aspect, an embodiment of the present application provides a chip, the chip including a processor and a communication interface, the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the method of the first aspect.
[0014] In a tenth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method of the first aspect.
[0015] In an embodiment of the present application, a graphical interface is provided, in which a coordinate space editing area and a feature pool including multiple feature quantity identifiers are displayed, each feature quantity identifier indicates a feature quantity of the defect to be screened, and the feature quantity identifier can be operated by the user to realize the selection of the feature quantity indicated by it. Receive the user's operation instruction, construct a data space according to the key features indicated by the feature quantity identifier selected by the user in the feature quantity pool, so as to convert the defect to be screened into a point set distributed in the data space, and generate a boundary line according to the numerical scale edited by the user in the coordinate space editing area, and divide the data space into multiple independent subspaces based on the boundary line. Further, receive the user's operation instruction, determine the constraint features indicated by the feature quantity identifier selected by the user for each subspace in the feature quantity pool, and determine the constraint conditions edited by the user on the constraint features in the coordinate space editing area, so that the defect to be screened can be classified and screened into defects and non-defects in the subspace. Specifically, the defect to be screened falling into the subspace is judged as a true defect if it meets all the constraints of the subspace, otherwise it is a false defect.
[0016] In an embodiment of the present application, in order to determine whether the defects to be screened detected from the product appearance are defects, a method for building a defect distribution space based on a graphical framework is proposed. The graphical framework can construct and divide the data space through graphical operations, and visualize the distribution of defects, which is conducive to subdividing the defects to be screened into multiple subspaces for screening, thereby screening out true defects. In addition, by designing the thinking framework of structured parameter adjustment into an operational graphical interface, the operability of the defect distribution space parameter adjustment is increased, which can greatly increase the user-friendliness of the defect screening link.
[0017] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0019] Figure 1 A schematic diagram showing a flow chart of a defect distribution space editing method according to an embodiment of the present application is shown;
[0020] Figure 2 A schematic diagram showing the length and width of a two-dimensional coordinate system data space of an embodiment of the present application is shown;
[0021] Figure 3 A schematic diagram showing the three-dimensional coordinate system data space of length, width and contrast of an embodiment of the present application is shown;
[0022] Figure 4 A schematic diagram showing the secondary two-dimensional coordinate system data space of contrast and area in an embodiment of the present application;
[0023] Figure 5 A schematic diagram showing a process flow of a defect screening method according to an embodiment of the present application is shown;
[0024] Figure 6 A schematic diagram showing a process flow of a product classification method according to an embodiment of the present application is shown;
[0025] Figure 7 A structural block diagram of a defect distribution space editing device according to an embodiment of the present application is shown;
[0026] Figure 8 A structural block diagram of a defect screening device according to an embodiment of the present application is shown;
[0027] Fig. 9A structural block diagram of a product classification device according to an embodiment of the present application is shown;
[0028] Fig.10 A structural block diagram of a computer device according to an embodiment of the present application is shown. DETAILED DESCRIPTION
[0029] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0030] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0031] In the following, in combination with the accompanying drawings, the defect distribution space editing method, defect screening method, product classification method, defect distribution space editing device, defect screening device, product classification device, computer equipment and readable storage medium provided in the embodiments of the present application are described in detail through specific embodiments and their application scenarios.
[0032] The present application embodiment provides a defect distribution space editing method, such as Figure 1 As shown, the method includes:
[0033] Step 101, receiving a first operation instruction from a user, and displaying a graphical interface, wherein the graphical interface includes a feature pool and a coordinate space editing area, wherein the feature pool includes a plurality of feature identifiers, and the feature identifiers are used to indicate feature quantities of defects to be screened, and the feature quantities include key features and constraint features.
[0034] In this step, the user triggers the display of a graphical interface, which displays a coordinate space editing area and a feature quantity pool including multiple feature quantity identifiers. Each feature quantity identifier indicates a feature quantity of the defect to be screened. The feature quantity identifier can be operated by the user (i.e., the inspection personnel) to select the feature quantity indicated by it.
[0035] It should be noted that before displaying multiple feature quantity identifiers, the feature quantity of each defect to be screened is calculated, wherein the feature quantity includes key features and constraint features, thereby generating and displaying the corresponding feature quantity identifier. These feature quantities are the basic attributes of the defect to be screened, including but not limited to: length, width, aspect ratio, length and width mean (that is, (length + width) / 2), area, absolute value of the difference between the defect grayscale mean and the background grayscale mean, linearity, equivalent bone length, etc. In practical applications, more than a dozen to dozens of feature quantities can be selectively calculated as needed. These feature quantities can be divided into: scale features, derived scale features, position features, morphological features, grayscale features, defect grayscale features, defect field grayscale features, etc. according to the attribute type. According to their functions, they can be divided into key features and constraint features. Key features are used to divide subspaces. Key features include but are not limited to: length, width, aspect ratio, length and width mean, area, etc. Constraint features are used to distinguish the corresponding defects to be screened in the subspace as defects or non-defects. Features other than key features can be used as constraint features.
[0036] Step 102, receiving a second operation instruction of a user to drag a feature quantity identifier from a feature quantity pool to a coordinate axis, determining the feature quantity identifier selected by the user in the feature quantity pool, and constructing a first data space according to key features indicated by the feature quantity identifier.
[0037] In this step, a second operation instruction from a user is received, and the second operation instruction is used to select a feature identifier in the feature pool. In response to the second operation instruction, a first data space is constructed according to key features indicated by the feature identifier selected by the user in the feature pool, so that the defects to be screened are converted into point sets distributed in the first data space.
[0038] Step 103, receiving a third operation instruction from the user to edit a numerical scale in the coordinate space editing area, determining the numerical scale selected by the user in the coordinate space editing area, and dividing the first data space into a plurality of areas according to a first type of boundary line generated by the numerical scale.
[0039] In this step, a third operation instruction from a user is received, and the third operation instruction is used to edit a numerical scale in the coordinate space editing area. In response to the third operation instruction, a first type of boundary line is generated according to the numerical scale edited by the user in the coordinate space editing area, and the first data space is divided into a plurality of areas based on the first type of boundary line.
[0040] Step 104, receiving a fourth operation instruction of the user dragging a feature identifier from the feature pool to the feature arrangement area, determining the feature identifier selected by the user in the feature pool, and constructing a second data space according to key features and multiple areas indicated by the feature identifier.
[0041] In this step, a fourth operation instruction from a user is received, the fourth operation instruction being used to select a feature identifier in the feature pool. In response to the fourth operation instruction, a second data space is constructed according to key features indicated by the feature identifier selected by the user in the feature pool.
[0042] Step 105, receiving a fifth operation instruction from the user to edit the numerical scale in the coordinate space editing area, determining the numerical scale selected by the user in the coordinate space editing area, and dividing the second data space into a plurality of mutually independent subspaces according to the second type of boundary lines generated by the numerical scale.
[0043] In this step, a fifth operation instruction from a user is received, and the fifth operation instruction is used to edit a numerical scale in the coordinate space editing area. In response to the fifth operation instruction, a second type of boundary line is generated according to the numerical scale edited by the user in the coordinate space editing area, and the second data space is divided into a plurality of mutually independent subspaces based on the second type of boundary line.
[0044] Step 106, receiving the sixth operation instruction of the user, adding constraint conditions of the constraint features to each subspace, and the subspace after adding the constraint conditions is used to classify and screen the defects to be screened.
[0045] In this step, the sixth operation instruction of the user is received, and the sixth operation instruction is used to select a feature quantity identifier in the feature quantity pool and edit a constraint condition in the coordinate space editing area. In response to the sixth operation instruction, the constraint feature indicated by the feature quantity identifier selected by the user for each subspace in the feature quantity pool is determined, and the constraint condition edited by the user for the constraint feature in the coordinate space editing area is determined, so that defects and non-defects can be classified and screened in the subspace. Specifically, if the defect to be screened falls into the subspace and satisfies all the constraint conditions of the subspace, it is judged as a true defect, otherwise it is a false defect.
[0046] In the embodiment of the present application, in order to determine whether the defects to be screened detected from the product appearance are defects, a method for building a defect distribution space based on a graphical framework is proposed. The graphical framework can construct and divide the data space through graphical operations and visualize the distribution of defects, which is conducive to subdividing the defects to be screened into multiple subspaces for screening, thereby screening out true defects.
[0047] Specifically, the embodiments of the present application determine how to select feature quantities and how to set constraints, simplify the setting of conditions for distinguishing defects from non-defects, unify the methods and ideas for defect screening, thereby reducing the difficulty of distinguishing defects from non-defects, and can greatly improve the speed and capacity of engineering deployment.
[0048] In addition, by designing the thinking framework of structured parameter adjustment into an operational graphical interface, the operability of parameter adjustment of defect distribution space is increased, which can greatly increase the user-friendliness of the defect screening process.
[0049] It should be noted that the embodiments of the present application can change the feature quantity represented by the coordinate axis. The specific implementation method includes but is not limited to dragging a feature quantity identifier from the feature quantity pool to the coordinate axis or near the coordinate axis. The coordinate axis is then the numerical axis representing the feature quantity indicated by the feature quantity identifier, and the scale range of the numerical axis can be manually set by the user.
[0050] When editing a numerical scale, the coordinate space editing area may be a coordinate axis or an area near the coordinate axis. The user may determine the selected numerical scale by clicking on the coordinate space editing area.
[0051] It is also possible to add constraint features and constraint conditions graphically. The specific implementation method includes but is not limited to dragging a feature quantity mark from the feature quantity pool into the feature arrangement area as a constraint feature of the subspace. It should be noted that the feature arrangement area can be a position area on the graphical interface or a subspace. When editing constraint conditions, the coordinate space editing area is a position area on the graphical interface where users can edit constraint conditions.
[0052] In one embodiment of the present application, the key features include: length, width, aspect ratio, length-width mean and contrast; a method for constructing a first data space includes: receiving an instruction from a user to drag a first feature quantity identifier from a feature quantity pool to a first coordinate axis, determining that the key feature indicated by the first feature quantity identifier selected by the user is length, receiving an instruction from a user to drag a second feature quantity identifier from a feature quantity pool to a second coordinate axis, determining that the key feature indicated by the second feature quantity identifier selected by the user is width, and establishing a two-dimensional coordinate system data space with length as the first coordinate axis and width as the second coordinate axis, wherein the two-dimensional coordinate system data space is the first data space; a method for dividing the first data space into multiple areas includes: receiving a third operation instruction from a user to edit the numerical scale of the length value, the aspect ratio and the length-width mean in the coordinate space editing area, determining multiple different length values, multiple different aspect ratios and multiple different length-width means, and in the two-dimensional coordinate system In the data space, multiple boundary lines with different length values, multiple boundary lines with different aspect ratios, and multiple boundary lines with different length and width averages are added to divide the two-dimensional coordinate system data space into multiple areas; a method for constructing a second data space includes: receiving a fourth operation instruction from a user to drag a third feature quantity identifier from a feature quantity pool to a feature arrangement area, determining that the key feature indicated by the third feature quantity identifier selected by the user is contrast, and using contrast as a third coordinate axis to convert multiple areas into a three-dimensional coordinate system data space, wherein the three-dimensional coordinate system data space is the second data space; a method for dividing the second data space into multiple independent subspaces includes: receiving a fifth operation instruction from a user to edit the contrast numerical scale in a coordinate space editing area, determining multiple different contrast values, and adding multiple boundary lines with different contrast values in the three-dimensional coordinate system data space to divide the three-dimensional coordinate system data space into multiple independent subspaces.
[0053] In this embodiment, the user selects key features, including length L, width W, and the aspect ratio K, length and width average N, and contrast A derived from the length and width coordinate system, thereby establishing a three-dimensional coordinate system data space through the above key features selected by the user, wherein the length and width average N = (L+W) / 2.
[0054] Specifically, Figure 2 As shown, first, a two-dimensional coordinate system data space is established with length L as the Y axis (i.e., the first coordinate axis) and width W as the X axis (i.e., the second coordinate axis). Then, multiple different length values (including 41, 80, 90, 150, 180), multiple different aspect ratios (including 1, 2, 4.5), and multiple different length and width averages (including 8, 25, 50) set by the user are determined, so as to add boundary lines of different length values, boundary lines of different aspect ratios, and boundary lines of different length and width averages in the two-dimensional coordinate system data space, thereby dividing the two-dimensional coordinate system data space into multiple areas.
[0055] like Figure 2 As shown, the dividing line is adjusted through the graphical operation function to divide the part of the coordinate system with a slope greater than 1 into 10 areas. Because the aspect ratio corresponds to the slope in the graphical coordinate system, it must be greater than 1, that is, all defects will be distributed in the 10 areas in the upper half with a slope greater than 1, and each area can also be selected in the graphical coordinate system to be numbered and named. For example, the specific data in Table 1 is divided into 10 areas, and each area corresponds to a defect parent class. For example, area 1 is named: 1.0 Linear Defect.
[0056] Table 1
[0057] area Length (unit: pixel) Width (in pixels) Aspect Ratio Average length and width (unit: pixel) District 10 [6,41] [5,20.5] [2,+∞] - Zone 1 [41,90] [5,20] -- - Zone 2 [41,80] -- -- - Zone 3 -- -- [1,2] [8,25] Zone 4 [90,180] [5,90] [2,+∞] - Zone 5 [80,150] -- [2,4.5] - Zone 6 -- -- [1,2] [25,50] District 7 [180,+∞] [6,+∞] [2,+∞] - District 8 [150,+∞] -- [2,4.5] - District 9 -- -- [1,2] [50,+∞]
[0058] Then, the data space is upgraded from two dimensions to three dimensions. Specifically, the two-dimensional coordinate system data space is further added with a one-dimensional key feature: contrast, that is, the contrast is used as the Z axis (also the third coordinate axis), thereby converting it into a three-dimensional coordinate system data space. Figure 3 In the three-dimensional coordinate system data space shown, you can select contrast A and add numerical scales 30 and 60. Figure 2 The corresponding subspace B is obtained from the 2 regions in . The subspace B is taken as a subclass and named as: 2.1 Moderate block defects.
[0059] After being divided into multiple independent subspaces, constraint conditions of constraint features can be added to each subspace to achieve classification and screening of defects to be screened. For example, in the subspace B, representative feature quantities are selected as constraint features to distinguish defects and non-defects distributed in the subspace according to their characteristics. In the embodiment of the present application, for subspace B, the constraint conditions of the selected constraint features are: area>50, the ratio of defects to their minimum bounding rectangle>0.3, and the number of high-gradient pixels>10, where the defect is an irregular area, and the area of this area divided by its minimum bounding rectangle is the minimum bounding rectangle ratio. For defects to be screened in subspace B that meet the constraint conditions, they are defects, and defects to be screened that do not meet the constraint conditions are non-defects.
[0060] It should be noted that for different subspaces, the constraint features to be selected need to be determined according to the actual screening situation, and the embodiments of the present application do not limit this.
[0061] In the embodiment of the present application, a data space is established and divided into subspaces, so that defects and non-defects are classified and screened in the subspaces.
[0062] In addition, the ease of parameter adjustment can be increased by graphically adjusting the parameters.
[0063] In one embodiment of the present application, the key features include: length, width, aspect ratio, length-width mean, contrast and area; a method for constructing a first data space includes: receiving an instruction from a user to drag a fourth feature quantity identifier from a feature quantity pool to a first coordinate axis, determining that the key feature indicated by the fourth feature quantity identifier selected by the user is length, receiving an instruction from a user to drag a fifth feature quantity identifier from a feature quantity pool to a second coordinate axis, determining that the key feature indicated by the fifth feature quantity identifier selected by the user is width, and establishing a first-level two-dimensional coordinate system data space with length as the first coordinate axis and width as the second coordinate axis, wherein the first-level two-dimensional coordinate system data space is the first data space; a method for dividing the first data space into multiple areas includes: receiving a third operation instruction from a user to edit the numerical scale of the length value, the aspect ratio and the length-width mean in the coordinate space editing area, determining multiple different length values, multiple different aspect ratios and multiple different length-width mean values, and adding multiple boundary lines of different length values, multiple boundary lines of different aspect ratios and multiple different length-width mean values in the first-level two-dimensional coordinate system data space. The method of constructing the second data space comprises: receiving a fourth operation instruction of a user dragging a sixth feature quantity identifier from a feature quantity pool to a feature arrangement area, determining that the key feature indicated by the sixth feature quantity identifier selected by the user is contrast, receiving an instruction of a user dragging a seventh feature quantity identifier from a feature quantity pool to a feature arrangement area, determining that the key feature indicated by the seventh feature quantity identifier selected by the user is area, and using contrast as a first coordinate axis and area as a second coordinate axis, converting the multiple areas into a secondary two-dimensional coordinate system data space, wherein the secondary two-dimensional coordinate system data space is the second data space; the method of dividing the second data space into a plurality of mutually independent subspaces comprises: receiving an instruction of a user editing a numerical scale of contrast and area in a coordinate space editing area, determining a plurality of different contrast values and a plurality of different area values, and adding a plurality of boundary lines of different contrast values and a plurality of boundary lines of different area values in the secondary two-dimensional coordinate system data space, so as to divide the secondary two-dimensional coordinate system data space into a plurality of mutually independent subspaces.
[0064] In this embodiment, the user selects key features, including length L, width W, and the aspect ratio K, length and width average N, contrast A, and area S derived from the length and width coordinate system, thereby establishing a two-dimensional coordinate system data space through the above key features selected by the user, wherein the length and width average N = (L+W) / 2.
[0065] Specifically, Figure 2As shown, first, a primary two-dimensional coordinate system data space is established with length L as the Y axis (i.e., the first coordinate axis) and width W as the X axis (i.e., the second coordinate axis). Then, multiple different length values (including 41, 80, 90, 150, 180), multiple different aspect ratios (including 1, 2, 4.5), and multiple different length and width averages (including 8, 25, 50) set by the user are determined, so that boundary lines of different length values, boundary lines of different aspect ratios, and boundary lines of different length and width averages are added to the primary two-dimensional coordinate system data space, thereby dividing the primary two-dimensional coordinate system data space into multiple regions.
[0066] like Figure 2 As shown, the dividing line is adjusted by the graphical operation function to divide the part of the coordinate system with a slope greater than 1 into 10 areas. Because the aspect ratio corresponds to the slope in the graphical coordinate system, it must be greater than 1, that is, all defects will be distributed in the 10 areas in the upper half with a slope greater than 1, and each area can also be selected in the graphical coordinate system to be numbered and named.
[0067] Then, if Figure 4 As shown, contrast A and area S are selected in each area respectively, and contrast A is used as the Y axis (i.e., the first coordinate axis) and area S is used as the X axis (i.e., the second coordinate axis) to construct a secondary two-dimensional coordinate system data space. Boundary lines with different contrast values and boundary lines with different area values are added to the secondary two-dimensional coordinate system data space to obtain multiple subspaces. Different subspaces are regarded as a subclass. For example, Figure 2 The 2 regions in correspond to the subspace C.
[0068] After being divided into multiple independent subspaces, constraint conditions of constraint features can be added to each subspace to achieve classification and screening of defects to be screened. For example, in subspace C, representative feature quantities are selected as constraint features to distinguish defects and non-defects distributed in the subspace according to their characteristics. In the embodiment of the present application, subspace C is named as: 2.1 Block Scratches, and the constraint conditions of the selected constraint features include but are not limited to: the minimum enclosing rectangle ratio of the defect>0.5, the number of independent regions<3, where the defect is an irregular area, and the area of this area divided by its minimum enclosing rectangle is the minimum enclosing rectangle ratio; when multiple unconnected regions are merged into one defect, the number of unconnected regions of this defect is called the number of independent regions. For defects to be screened in subspace C that meet the constraint conditions, they are defects, and defects to be screened that do not meet the constraint conditions are non-defects.
[0069] It should be noted that for different subspaces, the constraint features to be selected need to be determined according to the actual screening situation, and the embodiments of the present application do not limit this.
[0070] In the embodiment of the present application, a data space is established and divided into subspaces, so that defects and non-defects are classified and screened in the subspaces.
[0071] In addition, the ease of parameter adjustment can be increased by graphically adjusting the parameters.
[0072] In one embodiment of the present application, after the first data space is divided into multiple areas, the areas can also be resized, merged or divided. Specifically, a user's move instruction for at least a portion of the line segments of the first type of boundary line is received, and the at least a portion of the line segments is moved to adjust the size of the area on both sides of the at least a portion of the line segments; and / or, a user's delete instruction for at least a portion of the line segments of the first type of boundary line is received, and the at least a portion of the line segments is deleted to merge the areas on both sides of the at least a portion of the line segments; and / or, a user's add instruction for adding a first target line to the first type of boundary line is received, and the first target line is added to the target area among the multiple areas to divide the target area into two areas according to the first target line.
[0073] In this embodiment, after the regions are divided, the regions may be edited and modified, including but not limited to adding, deleting, and moving the boundary lines of the divided regions to adjust the size of each region.
[0074] In addition, each area can be selected, and the selected area can be named or a sub-area can be added to the area.
[0075] Through the above method, it is possible to adjust the area through graphical operation, which is convenient for users to operate and improves the efficiency of defect screening.
[0076] In one embodiment of the present application, after the second data space is divided into a plurality of mutually independent subspaces, the subspaces may be resized, merged or divided. Specifically, a user's move instruction for at least a portion of the line segments of the second type of boundary line is received, and at least a portion of the line segments is moved to adjust the size of the subspaces on both sides of at least a portion of the line segments; and / or, a user's delete instruction for at least a portion of the line segments of the second type of boundary line is received, and at least a portion of the line segments is deleted to merge the subspaces on both sides of at least a portion of the line segments; and / or, a user's add instruction for adding a second target line to the second type of boundary line is received, and a second target line is added to a first target subspace among the plurality of subspaces to divide the first target subspace into two subspaces according to the plane corresponding to the second target line.
[0077] In this embodiment, after the subspaces are divided, the subspaces may be edited and modified, including but not limited to adding, deleting, and moving the boundary lines of the divided areas to adjust the size of each subspace.
[0078] In addition, each subspace can be selected, and a naming operation can be performed on the selected subspace or a sub-category operation can be added to the subspace.
[0079] Through the above method, it is possible to adjust the subspace through graphical operation, which is convenient for users to operate and improves the efficiency of defect screening.
[0080] The present application embodiment provides a defect screening method, such as Figure 5 As shown, the method includes:
[0081] Step 501, obtaining a plurality of defects to be screened;
[0082] Step 502, constructing a data space based on the feature quantities of the plurality of defects to be screened, and dividing the data space into a plurality of mutually independent subspaces, wherein the plurality of defects to be screened are point sets in the data space;
[0083] Step 503: classify and screen the defects to be screened in the subspace to determine whether the defects to be screened are defects or non-defects.
[0084] In this embodiment, a plurality of defects to be screened are obtained, and the defects to be screened can be defects to be screened segmented from product images of industrial products that need to be quality inspected, or can be sample defects. A data space is constructed based on the feature quantities of the plurality of defects to be screened, so that the defects to be screened are converted into point sets distributed in the data space, and the data space is divided into a plurality of mutually independent subspaces, and the defects to be screened are classified and screened into defects and non-defects in the subspaces.
[0085] Specifically, the characteristic quantity of each defect to be screened is calculated, and the defect to be screened is d. Each defect to be screened contains n characteristic quantities x1, x2, ..., x n , then m samples d1, d2, ..., d m Constitute a set D. On this basis, transform the concept and regard the set D as a distribution consisting of x1, x2, ..., x n The goal of defect classification screening is to find one or more boundaries to accurately divide the point set distributed in the data space into defect sets D. t and the non-defective set D f .
[0086] Select key features, construct data space, and set numerical scales based on inspection regulations and screening experience to divide the data space into multiple subspaces, corresponding to multiple subclasses, so that the defects to be screened will fall into the corresponding subspaces according to the values of their key features. Furthermore, in each subspace, constraints of constraint features are added to screen and distinguish defects from non-defects.
[0087] Furthermore, it should be noted that in the embodiment of the present application, a method of constructing a defect distribution space based on a graphical framework is used to determine whether the defects to be screened detected from the product appearance are defects. The graphical framework can construct and divide the data space through graphical operations, and visualize the distribution of defects, which is conducive to subdividing the defects to be screened into multiple subspaces for screening, thereby screening out true defects. The present application designs the thinking framework of structured parameter adjustment into an operational graphical interface, increases the ease of adjustment of the defect distribution space, and can greatly increase the user-friendliness of the defect screening link.
[0088] The technical solution of the present application can accurately distinguish whether the defect to be screened is a defect or a non-defect, thereby reducing the missed detection rate and passed detection rate of industrial products and improving the quality inspection effect of industrial products.
[0089] In one embodiment of the present application, defects to be screened are classified and screened in a subspace to determine whether the defects to be screened are defects or non-defects, including: for a target defect to be screened among multiple defects to be screened, according to the target key features of the target defect to be screened, the target defect to be screened is divided into a second target subspace corresponding to the target key features; if the constraint features of the target defect to be screened satisfy the constraint conditions added corresponding to the second target subspace, the target defect to be screened is determined to be a defect; if the constraint features of the target defect to be screened do not satisfy the constraint conditions added corresponding to the second target subspace, the target defect to be screened is determined to be a non-defect.
[0090] In this embodiment, for any defect to be screened among the multiple defects to be screened (i.e., the target defect to be screened), the target defect to be screened is divided into the second target subspace corresponding to the target key feature according to the value of the target key feature of the target defect to be screened, and then whether the target defect to be screened is a true defect is determined according to whether the constraint feature of the target defect to be screened satisfies the constraint condition in the second target subspace. For example, the length and width of the target defect to be screened satisfy Figure 3 , the target defect to be screened is divided into subspace B. If the value of the constraint feature (i.e., contrast) of the target defect to be screened also satisfies the constraint condition corresponding to subspace B, the target defect to be screened is determined to be a defect; if the value of the constraint feature of the target defect to be screened does not satisfy the constraint condition corresponding to subspace B, the target defect to be screened is determined to be a non-defect.
[0091] Through the above method, it is possible to accurately classify and screen whether the defects to be screened are true defects.
[0092] In one embodiment of the present application, after dividing the first data space into a plurality of regions, it further includes: determining a target region where a key feature of the defect to be screened is located, and using a classification label corresponding to the target region as the type of the defect to be screened.
[0093] In this embodiment, the user can add a corresponding classification label to each area, and the classification label is related to the key features of the area to realize the naming of each area. For example, Figure 2 Area 1 in the figure can be named as 1.0 Linear Defect. If a defect to be screened falls into an area, the type of defect to be screened can be determined based on the name of the area. For example, the length and width of the defect to be screened meet Figure 2 If the length and width values corresponding to zone 1 in , the defect to be screened is divided into zone 1, that is, the defect to be screened may be a linear defect.
[0094] Through the above method, the specific type of defects to be screened is determined.
[0095] In one embodiment of the present application, after the target defects to be screened are divided into the second target subspace corresponding to the target key features, it also includes: taking the classification label corresponding to the second target subspace as the type of the target defects to be screened.
[0096] In this embodiment, the user can add a corresponding classification label to each subspace, and the classification label is related to the feature quantity of the subspace, so as to name each subspace. Figure 3 The subspace B in can be named as 2.1 Moderate block defect. If a defect to be screened is determined to fall into a subspace, the type of defect to be screened can be determined based on the name of the subspace. For example, the length, width, and contrast of the target defect to be screened meet Figure 3 The length, width, and contrast values corresponding to the subspace B in , then the target defect to be screened is divided into the subspace B, that is, the target defect to be screened may be a moderate block defect.
[0097] Through the above method, the specific type of defects to be screened is determined.
[0098] In one embodiment of the present application, the numerical scale edited according to the user's fifth operation instruction is greater than a preset threshold; the method also includes: determining the defects to be screened whose key features are in the subspace as out-of-specification defects.
[0099] In this embodiment, the user can set the numerical scale of the fifth operation instruction to be edited so that it is greater than a preset threshold value. The preset threshold value is a dividing value that can divide defects within the specification and defects outside the specification. Specifically, defects to be screened whose key features are smaller than the preset threshold value are excluded from the subspace, and defects to be screened within the subspace are defects outside the specification.
[0100] Through the above method, the out-of-specification defects are determined.
[0101] The present application embodiment provides a product classification method, such as Figure 6 As shown, the method includes:
[0102] Step 601, obtaining multiple product images of a product, and segmenting defects to be screened from the multiple product images;
[0103] Step 602, determining whether the defect to be screened is a defect, if the defect to be screened is a defect, determining the defect level of the defect to be screened, and counting the number of defects to be screened of different defect levels;
[0104] Step 603: Determine the classification of the product according to the defect levels of the defects to be screened and the number of defects to be screened of different defect levels.
[0105] In this embodiment, first, multiple product images taken under different camera and light source angle combinations are obtained, which are referred to as multiple image channels. Then, an image channel with clear defect imaging is selected to segment the defect to obtain a defect mask (that is, the defect to be screened). Then, the feature quantity on the product image corresponding to the defect to be screened is calculated, where the feature quantity includes key features and constraint features, and the key features are selected to construct a data space, and the data space is divided into multiple independent subspaces according to inspection regulations and screening experience, and the constraint conditions of the constraint features are added to each subspace, so as to judge whether the defect to be screened is a true defect based on whether the constraint features of any defect to be screened meet the constraint conditions corresponding to the subspace where it is located. And, in the case where it is determined to be a true defect, the defect level of the defect to be screened is determined.
[0106] In the above manner, the multiple defects to be screened are judged as true or false defects and the defect levels of the true defects are determined, so as to count the defects to be screened of different defect levels. By counting the level and number of true defects in a product, it is determined whether the product is OK, NG or Quality B.
[0107] Exemplarily, the defect levels are divided into 1 to 5 levels, and the degree of defects increases in sequence. If a product is detected with 1 or 0 level 1 defects and no higher level defects, the product is determined to be OK; if a product is detected with 2 or more level 1 defects and no higher level defects, the product is determined to be Quality B; if a product is detected with 1 or more level 2 and above defects, the product is determined to be NG.
[0108] The embodiments of the present application can accurately determine product quality, reduce the over-inspection rate and missed-inspection rate of product appearance quality inspection, and improve the product quality inspection effect.
[0109] In one embodiment of the present application, determining the defect level of the defect to be screened includes: determining the numerical range of a specific feature in the feature quantity of the defect to be screened; and using the defect level corresponding to the numerical range of the specific feature as the defect level of the defect to be screened.
[0110] In this embodiment, a specific feature is selected from the feature quantity to classify the true defects into defect levels, wherein the specific feature is one of a key feature or a constraint feature, and the smaller the value of the selected specific feature is, the lower the defect level is.
[0111] Specifically, the defect level is determined according to the numerical range of the specific feature. For example, the area is selected as the specific feature for defect level classification, the area interval of 50 to 100 is classified as level 1, the area interval of 100 to 200 is classified as level 2, the area interval of 200 to 350 is classified as level 3, the area interval of 350 to 500 is classified as level 4, and the area interval of 500 to infinity is classified as level 5.
[0112] Through the above method, accurate classification of defect levels can be achieved, providing a basis for judgment for product quality inspection.
[0113] As a specific implementation of the above-mentioned defect distribution space editing method, the embodiment of the present application provides a defect distribution space editing device. Figure 7 As shown, the defect distribution space editing device 700 includes: a receiving module 701, a display module 702, a construction module 703, a division module 704 and an adding module 705.
[0114] Among them, the receiving module 701 is used to receive a first operation instruction from the user; the display module 702 is used to display a graphical interface in response to the first operation instruction, the graphical interface includes a feature quantity pool and a coordinate space editing area, the feature quantity pool includes multiple feature quantity identifiers, the feature quantity identifiers are used to indicate the feature quantities of the defects to be screened, and the feature quantities include key features and constraint features; the receiving module 701 is also used to receive a second operation instruction from the user to drag the feature quantity identifier from the feature quantity pool to the coordinate axis; the construction module 703 is used to determine the feature quantity identifier selected by the user in the feature quantity pool in response to the second operation instruction, and construct the first data space according to the key features indicated by the feature quantity identifier; the receiving module 701 is also used to receive a third operation instruction from the user to edit the numerical scale in the coordinate space editing area; the division module 704 is used to determine the numerical scale selected by the user in the coordinate space editing area in response to the third operation instruction, and divide the first data space according to the first type of boundary line generated by the numerical scale. The receiving module 701 is also used to receive a fourth operation instruction from a user to drag a feature identifier from the feature pool to the feature arrangement area; the constructing module 703 is also used to respond to the fourth operation instruction, determine the feature identifier selected by the user in the feature pool, and construct the second data space according to the key features and multiple areas indicated by the feature identifier; the receiving module 701 is also used to receive a fifth operation instruction from the user to edit the numerical scale in the coordinate space editing area; the dividing module 704 is also used to respond to the fifth operation instruction, determine the numerical scale selected by the user in the coordinate space editing area, and divide the second data space into multiple independent subspaces according to the second type of boundary line generated by the numerical scale; the receiving module 701 is also used to receive a sixth operation instruction from the user; the adding module 705 is used to respond to the sixth operation instruction, and add constraint conditions of the constraint features to each subspace, and the subspace after adding the constraint conditions is used for classifying and screening the defects to be screened.
[0115] In this embodiment, a graphical interface is provided, in which a coordinate space editing area and a feature pool including multiple feature quantity identifiers are displayed, each feature quantity identifier indicates a feature quantity of the defect to be screened, and the feature quantity identifier can be operated by the user to realize the selection of the feature quantity indicated by it. The user's operation instruction is received, and the data space is constructed according to the key features indicated by the feature quantity identifier selected by the user in the feature quantity pool, so that the defect to be screened is converted into a point set distributed in the data space, and the boundary line is generated according to the numerical scale edited by the user in the coordinate space editing area, and the data space is divided into multiple independent subspaces based on the boundary line. Further, the user's operation instruction is received, and the constraint features indicated by the feature quantity identifier selected by the user for each subspace in the feature quantity pool are determined, and the constraint conditions edited by the user on the constraint features in the coordinate space editing area are determined, so that the defects to be screened can be classified and screened into defects and non-defects in the subspace. Specifically, the defects to be screened that fall into the subspace are judged as true defects if they meet all the constraints of the subspace, otherwise they are false defects.
[0116] In an embodiment of the present application, in order to determine whether the defects to be screened detected from the product appearance are defects, a method for building a defect distribution space based on a graphical framework is proposed. The graphical framework can construct and divide the data space through graphical operations, and visualize the distribution of defects, which is conducive to subdividing the defects to be screened into multiple subspaces for screening, thereby screening out true defects. In addition, by designing the thinking framework of structured parameter adjustment into an operational graphical interface, the operability of the defect distribution space parameter adjustment is increased, which can greatly increase the user-friendliness of the defect screening link.
[0117] Furthermore, the key features include: length, width, aspect ratio, length-width mean and contrast; the receiving module 701 is specifically used to receive an instruction from a user to drag a first feature quantity identifier from a feature quantity pool to a first coordinate axis, and to receive an instruction from a user to drag a second feature quantity identifier from a feature quantity pool to a second coordinate axis; the constructing module 703 is specifically used to determine that the key feature indicated by the first feature quantity identifier selected by the user is length, determine that the key feature indicated by the second feature quantity identifier selected by the user is width, and establish a two-dimensional coordinate system data space with length as the first coordinate axis and width as the second coordinate axis, wherein the two-dimensional coordinate system data space is the first data space; the receiving module 701 is specifically used to receive a third operation instruction from a user to edit the numerical scale of the length value, the aspect ratio and the length-width mean in the coordinate space editing area; the dividing module 704 is specifically used to determine multiple different length values, multiple different aspect ratios and multiple different length-width means, and in the two-dimensional coordinate system In the data space, multiple boundary lines with different length values, multiple boundary lines with different aspect ratios, and multiple boundary lines with different length and width averages are added to divide the two-dimensional coordinate system data space into multiple areas; a receiving module 701 is specifically used to receive a fourth operation instruction of a user dragging a third feature quantity identifier from a feature quantity pool to a feature arrangement area; a construction module 703 is specifically used to determine that the key feature indicated by the third feature quantity identifier selected by the user is contrast, and with contrast as the third coordinate axis, multiple areas are converted into a three-dimensional coordinate system data space, wherein the three-dimensional coordinate system data space is the second data space; the receiving module 701 is specifically used to receive a fifth operation instruction of a user editing the contrast numerical scale in the coordinate space editing area; a dividing module 704 is specifically used to determine multiple different contrast values, and in the three-dimensional coordinate system data space, add multiple boundary lines with different contrast values to divide the three-dimensional coordinate system data space into multiple independent subspaces.
[0118] Further, the key features include: length, width, aspect ratio, length-width mean, contrast and area; a receiving module 701 is specifically used to receive an instruction from a user to drag a fourth feature quantity identifier from a feature quantity pool to a first coordinate axis, and to receive an instruction from a user to drag a fifth feature quantity identifier from a feature quantity pool to a second coordinate axis; a constructing module 703 is specifically used to determine that the key feature indicated by the fourth feature quantity identifier selected by the user is length, and to determine that the key feature indicated by the fifth feature quantity identifier selected by the user is width, and to establish a primary two-dimensional coordinate system data space with length as the first coordinate axis and width as the second coordinate axis, wherein the primary two-dimensional coordinate system data space is the first data space; the receiving module 701 is specifically used to receive a third operation instruction from a user to edit the numerical scale of the length value, the aspect ratio and the length-width mean in the coordinate space editing area; a dividing module 704 is specifically used to determine a plurality of different length values, a plurality of different aspect ratios and a plurality of different length-width mean values, and to add a plurality of boundary lines of different length values, a plurality of boundary lines of different aspect ratios and a plurality of boundary lines of different length-width mean values in the primary two-dimensional coordinate system data space. The receiving module 701 is specifically used to receive a fourth operation instruction of a user dragging a sixth feature quantity identifier from a feature quantity pool to a feature arrangement area, and to receive an instruction of a user dragging a seventh feature quantity identifier from a feature quantity pool to a feature arrangement area; the constructing module 703 is specifically used to determine that the key feature indicated by the sixth feature quantity identifier selected by the user is contrast, and to determine that the key feature indicated by the seventh feature quantity identifier selected by the user is area, and to convert the multiple areas into a secondary two-dimensional coordinate system data space with contrast as a first coordinate axis and area as a second coordinate axis, wherein the secondary two-dimensional coordinate system data space is a second data space; the receiving module 701 is specifically used to receive an instruction of a user editing a numerical scale of contrast and area in a coordinate space editing area; the dividing module 704 is specifically used to determine a plurality of different contrast values, a plurality of different area values, and to add a plurality of boundary lines of different contrast values and a plurality of boundary lines of different area values in the secondary two-dimensional coordinate system data space, so as to divide the secondary two-dimensional coordinate system data space into a plurality of mutually independent subspaces.
[0119] Furthermore, the receiving module 701 is also used to receive a user's instruction to move at least a portion of the line segments of the first type of boundary line; the dividing module 704 is also used to move at least a portion of the line segments to adjust the size of the areas on both sides of at least a portion of the line segments; and / or, the receiving module 701 is also used to receive a user's instruction to delete at least a portion of the line segments of the first type of boundary line, and the dividing module 704 is also used to delete at least a portion of the line segments to merge the areas on both sides of at least a portion of the line segments; and / or, the receiving module 701 is also used to receive a user's instruction to add a first target line to the first type of boundary line, and the dividing module 704 is also used to add a first target line to the target area among multiple areas to divide the target area into two areas according to the first target line.
[0120] Furthermore, the receiving module 701 is also used to receive a user's instruction to move at least a portion of the line segments of the second type of boundary line, and the dividing module 704 is also used to move at least a portion of the line segments to adjust the size of the subspaces on both sides of at least a portion of the line segments; and / or, the receiving module 701 is also used to receive a user's instruction to delete at least a portion of the line segments of the second type of boundary line, and the dividing module 704 is also used to delete at least a portion of the line segments to merge the subspaces on both sides of at least a portion of the line segments; and / or, the receiving module 701 is also used to receive a user's instruction to add a second target line to the second type of boundary line, and the dividing module 704 is also used to add a second target line in a first target subspace among multiple subspaces to divide the first target subspace into two subspaces according to the plane corresponding to the second target line.
[0121] As a specific implementation of the above-mentioned defect screening method, the present application embodiment provides a defect screening device. Figure 8 As shown, the defect screening device 800 includes: an acquisition module 801 , a processing module 802 and a screening module 803 .
[0122] Among them, the acquisition module 801 is used to obtain multiple defects to be screened; the processing module 802 is used to construct a data space based on the characteristic quantities of multiple defects to be screened according to the defect distribution space editing device, and divide the data space into multiple independent subspaces, wherein the multiple defects to be screened are point sets in the data space; the screening module 803 is used to classify and screen the defects to be screened in the subspace to determine whether the defects to be screened are defects or non-defects.
[0123] In this embodiment, a plurality of defects to be screened are obtained, and the defects to be screened can be defects to be screened segmented from a product image of an industrial product that needs to be quality inspected, or can be a sample image. A data space is constructed based on the feature quantities of the plurality of defects to be screened, so that the defects to be screened are converted into a point set distributed in the data space, and the data space is divided into a plurality of mutually independent subspaces, and the defects to be screened are classified and screened into defects and non-defects in the subspaces.
[0124] In the embodiment of the present application, a method of building a defect distribution space based on a graphical framework is used to determine whether the defects to be screened detected from the product appearance are defects. The graphical framework can construct and divide the data space through graphical operations, and visualize the distribution of defects, which is conducive to subdividing the defects to be screened into multiple subspaces for screening, thereby screening out true defects. The present application designs the thinking framework of structured parameter adjustment into an operational graphical interface, increases the ease of adjustment of the defect distribution space, and can greatly increase the user-friendliness of the defect screening link.
[0125] The technical solution of the present application can accurately distinguish whether the defect to be screened is a defect or a non-defect, thereby reducing the missed detection rate and passed detection rate of industrial products and improving the quality inspection effect of industrial products.
[0126] Furthermore, the screening module 803 is specifically used to: for a target defect to be screened among multiple defects to be screened, according to the target key feature of the target defect to be screened, divide the target defect to be screened into a second target subspace corresponding to the target key feature; if the constraint feature of the target defect to be screened satisfies the constraint condition added corresponding to the second target subspace, then determine that the target defect to be screened is a defect; if the constraint feature of the target defect to be screened does not satisfy the constraint condition added corresponding to the second target subspace, then determine that the target defect to be screened is a non-defect.
[0127] Furthermore, the screening module 803 is further configured to use the classification label corresponding to the second target subspace as the type of target defects to be screened.
[0128] Furthermore, the numerical scale edited according to the fifth operation instruction of the user is greater than a preset threshold; the screening module 803 is also used to determine the defects to be screened whose key features are in the subspace as out-of-specification defects.
[0129] As a specific implementation of the above-mentioned product classification method, the present application embodiment provides a product classification device. Fig. 9 As shown, the product classification device 900 includes: an acquisition module 901 , a judgment module 902 , a determination module 903 and a classification module 904 .
[0130] Among them, the acquisition module 901 is used to acquire multiple product images of the product and segment the defects to be screened from the multiple product images; the judgment module 902 is used to determine whether the defect to be screened is a defect according to the defect screening device; the determination module 903 is used to determine the defect level of the defect to be screened if the defect to be screened is a defect, and count the number of defects to be screened with different defect levels; the classification module 904 is used to determine the classification of the product according to the defect level of the defect to be screened that is a defect and the number of defects to be screened with different defect levels.
[0131] In this embodiment, first, multiple product images taken under different camera and light source angle combinations are obtained, which are referred to as multiple image channels. Then, an image channel with clear defect imaging is selected to segment the defect to obtain a defect mask (that is, the defect to be screened). Then, the feature quantity on the product image corresponding to the defect to be screened is calculated, where the feature quantity includes key features and constraint features, and the key features are selected to construct a data space, and the data space is divided into multiple independent subspaces according to inspection regulations and screening experience, and the constraint conditions of the constraint features are added to each subspace, so as to judge whether the defect to be screened is a true defect based on whether the constraint features of any defect to be screened meet the constraint conditions corresponding to the subspace where it is located. And, in the case where it is determined to be a true defect, the defect level of the defect to be screened is determined.
[0132] In the above manner, the multiple defects to be screened are judged as true or false defects and the defect levels of the true defects are determined, so as to count the defects to be screened of different defect levels. By counting the level and number of true defects in a product, it is determined whether the product is OK, NG or Quality B.
[0133] The embodiments of the present application can accurately determine product quality, reduce the over-inspection rate and missed-inspection rate of product appearance quality inspection, and improve the product quality inspection effect.
[0134] Furthermore, the determination module 903 is specifically used to determine the numerical range of a specific feature in the feature quantity of the defect to be screened, and use the defect level corresponding to the numerical range of the specific feature as the defect level of the defect to be screened.
[0135] The above-mentioned device in the embodiment of the present application may be a computer device, or a component in the computer device, such as an integrated circuit or a chip, and the computer device may be an AOI device.
[0136] The above-mentioned device provided in the embodiment of the present application can achieve Figure 1 , Figure 5 or Figure 6 To avoid repetition, the various processes implemented by the method embodiment are not described here.
[0137] The present application also provides a computer device, such as Fig.10 As shown, the computer device 1000 includes a processor 1001 and a memory 1002. The memory 1002 stores programs or instructions that can be run on the processor 1001. When the program or instructions are executed by the processor 1001, the various steps of the above-mentioned defect distribution space editing method embodiment or defect screening method embodiment or product classification method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, they are not repeated here.
[0138] It should be noted that the computer device in the embodiment of the present application includes the above-mentioned mobile computer device and non-mobile computer device.
[0139] The memory 1002 can be used to store software programs and various data. The memory 1002 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 1002 may include a volatile memory or a non-volatile memory, or the memory 1002 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 1002 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
[0140] The processor 1001 may include one or more processing units; optionally, the processor 1001 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 1001.
[0141] In one embodiment of the present application, taking an AOI device for appearance inspection of a mobile phone glass cover as an example, it includes:
[0142] Optical imaging device, with two upper and lower linear array cameras and multiple groups of light sources at different angles in one inspection station. Through different combinations of cameras and light sources, defect imaging from multiple perspectives can be achieved.
[0143] Preferably, the optical imaging device is specifically used to: combine projected bright field, projected dark field, reflected bright field, and reflected dark field to achieve clear imaging of the product outline and imaging of defects. Imaging of the product outline facilitates locating the inspection area in the image, and clear imaging of defects facilitates detection and segmentation of defects.
[0144] Inspection platform software is used to integrate image input, output, cropping, and storage, build inspection operator processes, and build defect classification filters.
[0145] The defect detection module is used to build the operator process of defect detection to realize the detection of defect areas and the calculation of defect feature quantities. The detection process can be divided into five steps: establishing a coordinate system, data format conversion, contour area acquisition, defect detection, and defect feature quantity calculation.
[0146] The defect classification and screening module is used to distinguish and screen true defects, classify defects, such as scratches, pressure injuries, etc., and divide defects into 5 levels, thereby realizing product classification.
[0147] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned defect distribution space editing method embodiment or defect screening method embodiment or product classification method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0148] An embodiment of the present application also provides a chip, which includes a processor and a communication interface, wherein the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned defect distribution space editing method embodiment or defect screening method embodiment or product classification method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0149] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0150] An embodiment of the present application also provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned defect distribution space editing method embodiment or defect screening method embodiment or product classification method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0151] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes 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 one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0152] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A defect distribution space editing method, characterized in that: include: Receive a first operation instruction from a user and display a graphical interface, wherein the graphical interface includes a feature value pool and a coordinate space editing area, wherein the feature value pool includes a plurality of feature value identifiers, wherein the feature value identifiers are used to indicate feature values of defects to be screened, and wherein the feature values include key features and constraint features; receiving a second operation instruction of a user dragging a feature quantity identifier from the feature quantity pool to a coordinate axis, determining the feature quantity identifier selected by the user in the feature quantity pool, and constructing a first data space according to key features indicated by the feature quantity identifier; receiving a third operation instruction from a user to edit a numerical scale in the coordinate space editing area, determining the numerical scale selected by the user in the coordinate space editing area, and dividing the first data space into a plurality of areas according to a first type of boundary line generated by the numerical scale; receiving a fourth operation instruction of a user dragging a feature quantity identifier from the feature quantity pool to a feature arrangement area, determining the feature quantity identifier selected by the user in the feature quantity pool, and constructing a second data space according to the key features indicated by the feature quantity identifier and the multiple areas; receiving a fifth operation instruction from a user to edit a numerical scale in the coordinate space editing area, determining the numerical scale selected by the user in the coordinate space editing area, and dividing the second data space into a plurality of mutually independent subspaces according to a second type of boundary line generated by the numerical scale; A sixth operation instruction from the user is received, and constraint conditions of the constraint features are added to each of the subspaces. The subspaces after adding the constraint conditions are used to classify and screen the defects to be screened.
2. The method according to claim 1, characterized in that The key features include: length, width, aspect ratio, length and width mean, and contrast; The receiving a second operation instruction of a user dragging a feature quantity identifier from the feature quantity pool to a coordinate axis, determining the feature quantity identifier selected by the user in the feature quantity pool, and constructing a first data space according to key features indicated by the feature quantity identifier, comprises: Receiving an instruction from a user to drag a first feature quantity identifier from the feature quantity pool to a first coordinate axis, determining that the key feature indicated by the first feature quantity identifier selected by the user is length, receiving an instruction from a user to drag a second feature quantity identifier from the feature quantity pool to a second coordinate axis, determining that the key feature indicated by the second feature quantity identifier selected by the user is width, and establishing a two-dimensional coordinate system data space with the length as the first coordinate axis and the width as the second coordinate axis, wherein the two-dimensional coordinate system data space is the first data space; The receiving a third operation instruction of the user to edit a numerical scale in the coordinate space editing area, determining the numerical scale selected by the user in the coordinate space editing area, and dividing the first data space into a plurality of areas according to a first type of boundary line generated by the numerical scale, includes: receiving a third operation instruction from a user to edit the numerical scales of the length value, the aspect ratio, and the length-width average in the coordinate space editing area, determining a plurality of different length values, a plurality of different aspect ratios, and a plurality of different length-width averages, and adding the plurality of boundary lines of the different length values, the plurality of boundary lines of the different aspect ratios, and the plurality of boundary lines of the different length-width averages in the two-dimensional coordinate system data space, so as to divide the two-dimensional coordinate system data space into a plurality of regions; The receiving a fourth operation instruction of a user dragging a feature quantity identifier from the feature quantity pool to a feature arrangement area, determining the feature quantity identifier selected by the user in the feature quantity pool, and constructing a second data space according to the key features indicated by the feature quantity identifier and the multiple areas, includes: receiving a fourth operation instruction of a user dragging a third feature quantity identifier from the feature quantity pool to the feature arrangement area, determining that the key feature indicated by the third feature quantity identifier selected by the user is contrast, and using the contrast as a third coordinate axis, converting the multiple regions into a three-dimensional coordinate system data space, wherein the three-dimensional coordinate system data space is the second data space; The receiving of a fifth operation instruction from a user to edit a numerical scale in the coordinate space editing area, determining the numerical scale selected by the user in the coordinate space editing area, and dividing the second data space into a plurality of mutually independent subspaces according to a second type of boundary line generated by the numerical scale, includes: A fifth operation instruction is received from the user to edit the numerical scale of the contrast in the coordinate space editing area, a plurality of different contrast values are determined, and boundary lines of the plurality of different contrast values are added in the three-dimensional coordinate system data space to divide the three-dimensional coordinate system data space into a plurality of mutually independent subspaces.
3. The method according to claim 1, characterized in that The key features include: length, width, aspect ratio, length and width mean, contrast and area; The receiving a second operation instruction of a user dragging a feature quantity identifier from the feature quantity pool to a coordinate axis, determining the feature quantity identifier selected by the user in the feature quantity pool, and constructing a first data space according to key features indicated by the feature quantity identifier, comprises: Receive an instruction from a user to drag a fourth feature quantity identifier from the feature quantity pool to a first coordinate axis, determine that the key feature indicated by the fourth feature quantity identifier selected by the user is length, receive an instruction from a user to drag a fifth feature quantity identifier from the feature quantity pool to a second coordinate axis, determine that the key feature indicated by the fifth feature quantity identifier selected by the user is width, and establish a first-level two-dimensional coordinate system data space with the length as the first coordinate axis and the width as the second coordinate axis, wherein the first-level two-dimensional coordinate system data space is the first data space; The receiving a third operation instruction of the user to edit a numerical scale in the coordinate space editing area, determining the numerical scale selected by the user in the coordinate space editing area, and dividing the first data space into a plurality of areas according to a first type of boundary line generated by the numerical scale, includes: receiving a third operation instruction from a user to edit the numerical scales of the length value, the aspect ratio, and the length-width mean in the coordinate space editing area, determining a plurality of different length values, a plurality of different aspect ratios, and a plurality of different length-width mean values, and adding the plurality of boundary lines of the different length values, the plurality of boundary lines of the different aspect ratios, and the plurality of boundary lines of the different length-width mean values in the primary two-dimensional coordinate system data space, so as to divide the primary two-dimensional coordinate system data space into a plurality of regions; The receiving a fourth operation instruction of a user dragging a feature quantity identifier from the feature quantity pool to a feature arrangement area, determining the feature quantity identifier selected by the user in the feature quantity pool, and constructing a second data space according to the key features indicated by the feature quantity identifier and the multiple areas, includes: receiving a fourth operation instruction of a user dragging a sixth feature quantity identifier from the feature quantity pool to a feature arrangement area, determining that the key feature indicated by the sixth feature quantity identifier selected by the user is contrast, receiving an instruction of a user dragging a seventh feature quantity identifier from the feature quantity pool to the feature arrangement area, determining that the key feature indicated by the seventh feature quantity identifier selected by the user is area, using the contrast as a first coordinate axis and the area as a second coordinate axis, converting the multiple areas into a secondary two-dimensional coordinate system data space, wherein the secondary two-dimensional coordinate system data space is the second data space; The receiving of a fifth operation instruction from a user to edit a numerical scale in the coordinate space editing area, determining the numerical scale selected by the user in the coordinate space editing area, and dividing the second data space into a plurality of mutually independent subspaces according to a second type of boundary line generated by the numerical scale, includes: Receive a user's instruction to edit the contrast and area numerical scales in the coordinate space editing area, determine a plurality of different contrast values, a plurality of different area values, and add boundary lines of the plurality of different contrast values and a plurality of different area values in the secondary two-dimensional coordinate system data space to divide the secondary two-dimensional coordinate system data space into a plurality of mutually independent subspaces.
4. The method according to claim 2 or 3, characterized in that: After dividing the first data space into a plurality of areas, the method further includes: receiving a user's instruction to move at least a portion of the first-type boundary line, and moving the at least a portion of the line segment to adjust the size of the area on both sides of the at least a portion of the line segment; and / or, receiving a user's instruction to delete at least a portion of the first-type boundary line, deleting the at least a portion of the line segment to merge areas on both sides of the at least a portion of the line segment; and / or, An instruction to add a first target line to the first type of boundary line is received from a user, and the first target line is added to a target area among the multiple areas, so as to divide the target area into two areas according to the first target line.
5. The method according to claim 2 or 3, characterized in that: After dividing the second data space into a plurality of mutually independent subspaces, the method further includes: receiving a user's instruction to move at least a portion of the second-type boundary line, and moving the at least a portion of the line segment to adjust the size of the subspaces on both sides of the at least a portion of the line segment; and / or, receiving a user's instruction to delete at least a portion of the second-type boundary line, deleting the at least a portion of the line segment to merge the subspaces on both sides of the at least a portion of the line segment; and / or, An instruction from a user to add a second target line to the second-type boundary line is received, and the second target line is added to a first target subspace among the multiple subspaces, so as to divide the first target subspace into two subspaces according to a plane corresponding to the second target line.
6. A defect screening method, characterized in that: include: Obtain multiple defects to be screened; According to the defect distribution space editing method according to any one of claims 1 to 5, a data space is constructed based on the characteristic quantities of the plurality of defects to be screened, and the data space is divided into a plurality of mutually independent subspaces, wherein the plurality of defects to be screened are point sets in the data space; The defects to be screened are classified and screened in the subspace to determine whether the defects to be screened are defects or non-defects.
7. The method according to claim 6, characterized in that The classifying and screening the defects to be screened in the subspace to determine whether the defects to be screened are defects or non-defects includes: For a target defect to be screened among the multiple defects to be screened, according to a target key feature of the target defect to be screened, dividing the target defect to be screened into a second target subspace corresponding to the target key feature; If the constraint feature of the target defect to be screened satisfies the constraint condition added corresponding to the second target subspace, determining that the target defect to be screened is a defect; If the constraint feature of the target defect to be screened does not satisfy the constraint condition added corresponding to the second target subspace, the target defect to be screened is determined to be a non-defect.
8. The method according to claim 7, characterized in that After dividing the target defects to be screened into the second target subspace corresponding to the target key features, the method further includes: The classification label corresponding to the second target subspace is used as the type of the target defect to be screened.
9. The method according to any one of claims 6 to 8, characterized in that The numerical scale edited according to the user's fifth operation instruction is greater than a preset threshold; the method further includes: Defects to be screened whose key features are within the subspace are determined as out-of-specification defects.
10. A product classification method, characterized in that: include: Acquire multiple product images of a product, and segment defects to be screened from the multiple product images; According to the defect screening method according to any one of claims 6 to 9, determining whether the defect to be screened is a defect; If the defect to be screened is the defect, determining the defect level of the defect to be screened, and counting the number of defects to be screened of different defect levels; The classification of the product is determined according to the defect levels of the defects to be screened and the number of the defects to be screened of different defect levels.
11. The method according to claim 10, characterized in that The step of determining the defect level of the defect to be screened includes: Determining the numerical range of a specific feature in the feature quantity of the defect to be screened; The defect level corresponding to the numerical range of the specific feature is used as the defect level of the defect to be screened.
12. A defect distribution space editing device, characterized in that: include: A receiving module, used for receiving a first operation instruction from a user; A display module, configured to display a graphical interface in response to the first operation instruction, wherein the graphical interface includes a feature quantity pool and a coordinate space editing area, wherein the feature quantity pool includes a plurality of feature quantity identifiers, wherein the feature quantity identifiers are used to indicate feature quantities of defects to be screened, and wherein the feature quantities include key features and constraint features; The receiving module is further used to receive a second operation instruction from a user to drag a feature quantity identifier from the feature quantity pool to a coordinate axis; A construction module, configured to determine, in response to the second operation instruction, a feature quantity identifier selected by a user in the feature quantity pool, and construct a first data space according to key features indicated by the feature quantity identifier; The receiving module is further used to receive a third operation instruction from a user to edit a numerical scale in the coordinate space editing area; a division module, configured to determine, in response to the third operation instruction, a numerical scale selected by a user in the coordinate space editing area, and divide the first data space into a plurality of regions according to a first type of boundary line generated by the numerical scale; The receiving module is further used to receive a fourth operation instruction of a user dragging a feature quantity identifier from the feature quantity pool to a feature arrangement area; The construction module is further configured to determine, in response to the fourth operation instruction, a feature quantity identifier selected by a user in the feature quantity pool, and construct a second data space according to the key features indicated by the feature quantity identifier and the multiple regions; The receiving module is further used to receive a fifth operation instruction from a user to edit a numerical scale in the coordinate space editing area; The division module is further used to determine the numerical scale selected by the user in the coordinate space editing area in response to the fifth operation instruction, and divide the second data space into a plurality of mutually independent subspaces according to the second type of boundary lines generated by the numerical scale; The receiving module is further used to receive a sixth operation instruction from the user; The adding module is used to respond to the sixth operation instruction and add the constraint conditions of the constraint feature to each of the subspaces respectively, and the subspace after adding the constraint conditions is used to classify and screen the defects to be screened.
13. The device according to claim 12, characterized in that The key features include: length, width, aspect ratio, length and width mean, and contrast; The receiving module is specifically used to receive an instruction from a user to drag a first feature quantity identifier from the feature quantity pool to a first coordinate axis, and receive an instruction from a user to drag a second feature quantity identifier from the feature quantity pool to a second coordinate axis; The construction module is specifically used to determine that the key feature indicated by the first feature quantity identifier selected by the user is length, determine that the key feature indicated by the second feature quantity identifier selected by the user is width, and establish a two-dimensional coordinate system data space with the length as the first coordinate axis and the width as the second coordinate axis, wherein the two-dimensional coordinate system data space is the first data space; The receiving module is specifically used to receive a third operation instruction from a user to edit the numerical scale of the length value, the aspect ratio and the length-width mean in the coordinate space editing area; The division module is specifically used to determine a plurality of different length values, a plurality of different aspect ratios, and a plurality of different length and width average values, and add the plurality of boundary lines of the different length values, the plurality of boundary lines of the different aspect ratios, and the plurality of boundary lines of the different length and width average values in the two-dimensional coordinate system data space, so as to divide the two-dimensional coordinate system data space into a plurality of regions; The receiving module is specifically used to receive a fourth operation instruction of a user dragging a third feature quantity identifier from the feature quantity pool to the feature arrangement area; The construction module is specifically used to determine that the key feature indicated by the third feature quantity identifier selected by the user is contrast, and to convert the multiple regions into a three-dimensional coordinate system data space with the contrast as the third coordinate axis, wherein the three-dimensional coordinate system data space is the second data space; The receiving module is specifically used to receive a fifth operation instruction from a user to edit the numerical scale of the contrast in the coordinate space editing area; The division module is specifically used to determine a plurality of different contrast values, and to add boundary lines of the plurality of different contrast values in the three-dimensional coordinate system data space, so as to divide the three-dimensional coordinate system data space into a plurality of mutually independent subspaces.
14. The device according to claim 12, characterized in that The key features include: length, width, aspect ratio, length and width mean, contrast and area; The receiving module is specifically used to receive an instruction from a user to drag a fourth feature quantity identifier from the feature quantity pool to the first coordinate axis, and receive an instruction from a user to drag a fifth feature quantity identifier from the feature quantity pool to the second coordinate axis; The construction module is specifically used to determine that the key feature indicated by the fourth feature quantity identifier selected by the user is length, determine that the key feature indicated by the fifth feature quantity identifier selected by the user is width, and establish a primary two-dimensional coordinate system data space with the length as the first coordinate axis and the width as the second coordinate axis, wherein the primary two-dimensional coordinate system data space is the first data space; The receiving module is specifically used to receive a third operation instruction from a user to edit the numerical scale of the length value, the aspect ratio and the length-width mean in the coordinate space editing area; The division module is specifically used to determine a plurality of different length values, a plurality of different aspect ratios, and a plurality of different length and width average values, and add the plurality of boundary lines of the different length values, the plurality of boundary lines of the different aspect ratios, and the plurality of boundary lines of the different length and width average values in the primary two-dimensional coordinate system data space, so as to divide the primary two-dimensional coordinate system data space into a plurality of regions; The receiving module is specifically used to receive a fourth operation instruction of a user dragging a sixth feature quantity identifier from the feature quantity pool to the feature arrangement area, and receive an instruction of a user dragging a seventh feature quantity identifier from the feature quantity pool to the feature arrangement area; The construction module is specifically used to determine that the key feature indicated by the sixth feature quantity identifier selected by the user is contrast, determine that the key feature indicated by the seventh feature quantity identifier selected by the user is area, and use the contrast as the first coordinate axis and the area as the second coordinate axis to convert the multiple regions into a secondary two-dimensional coordinate system data space, wherein the secondary two-dimensional coordinate system data space is the second data space; The receiving module is specifically used to receive a user's instruction to edit the numerical scale of contrast and area in the coordinate space editing area; The division module is specifically used to determine multiple different contrast values, multiple different area values, and to add boundary lines of the multiple different contrast values and the multiple different area values in the secondary two-dimensional coordinate system data space, so as to divide the secondary two-dimensional coordinate system data space into multiple independent subspaces.
15. The device according to claim 13 or 14, characterized in that The receiving module is further used to receive a user's instruction to move at least a portion of the first-type boundary line; the dividing module is further used to move the at least a portion of the line segment to adjust the size of the area on both sides of the at least a portion of the line segment; and / or, The receiving module is further used to receive a user's instruction to delete at least a portion of the first-type boundary line, and the dividing module is further used to delete the at least a portion of the line segment to merge the areas on both sides of the at least a portion of the line segment; and / or, The receiving module is further used to receive a user's instruction to add a first target line to the first type of boundary line, and the dividing module is further used to add the first target line to the target area among the multiple areas to divide the target area into two areas according to the first target line.
16. The device according to claim 13 or 14, characterized in that The receiving module is further used to receive a user's instruction to move at least a portion of the second-type boundary line, and the dividing module is further used to move the at least a portion of the line segment to adjust the size of the subspace on both sides of the at least a portion of the line segment; and / or, The receiving module is further used to receive a user's instruction to delete at least a portion of the second-type boundary line, and the dividing module is further used to delete the at least a portion of the line segment to merge the subspaces on both sides of the at least a portion of the line segment; and / or, The receiving module is further used to receive a user's instruction to add a second target line to the second type of boundary line, and the dividing module is further used to add the second target line to the first target subspace among the multiple subspaces, so as to divide the first target subspace into two subspaces according to the plane corresponding to the second target line.
17. A defect screening device, characterized in that: include: An acquisition module, used to acquire multiple defects to be screened; A processing module, configured to construct a data space based on the characteristic quantities of the plurality of defects to be screened according to the defect distribution space editing device according to any one of claims 12 to 16, and divide the data space into a plurality of mutually independent subspaces, wherein the plurality of defects to be screened are point sets in the data space; The screening module is used to classify and screen the defects to be screened in the subspace to determine whether the defects to be screened are defects or non-defects.
18. The device according to claim 17, characterized in that The screening module is specifically used for: For a target defect to be screened among the multiple defects to be screened, according to a target key feature of the target defect to be screened, dividing the target defect to be screened into a second target subspace corresponding to the target key feature; If the constraint feature of the target defect to be screened satisfies the constraint condition added corresponding to the second target subspace, determining that the target defect to be screened is a defect; If the constraint feature of the target defect to be screened does not satisfy the constraint condition added corresponding to the second target subspace, the target defect to be screened is determined to be a non-defect.
19. The device according to claim 18, characterized in that The screening module is further configured to use the classification label corresponding to the second target subspace as the type of the defect to be screened.
20. The device according to any one of claims 17 to 19, characterized in that The numerical scale edited according to the fifth operation instruction of the user is greater than a preset threshold; The screening module is further used to determine the defects to be screened whose key features are within the subspace as out-of-specification defects.
21. A product classification device, characterized in that: include: An acquisition module, used to acquire multiple product images of a product and segment defects to be screened from the multiple product images; A judgment module, used to determine whether the defect to be screened is a defect according to the defect screening device according to any one of claims 17 to 20; A determination module, configured to determine the defect level of the defect to be screened if the defect to be screened is the defect, and to count the number of defects to be screened of different defect levels; The classification module is used to determine the classification of the product according to the defect level of the defects to be screened and the number of the defects to be screened of different defect levels.
22. The device according to claim 21, characterized in that The determination module is specifically used to determine the numerical range of a specific feature in the feature quantity of the defect to be screened, and use the defect level corresponding to the numerical range of the specific feature as the defect level of the defect to be screened.
23. A computer device, characterized in that: It includes a processor and a memory, the memory stores a program or instruction running on the processor, and when the program or instruction is executed by the processor, it implements the steps of the defect distribution space editing method as described in any one of claims 1 to 5, or the steps of the defect screening method as described in any one of claims 6 to 9, or the steps of the product classification method as described in claim 10 or 11.
24. A readable storage medium having a program or instruction stored thereon, characterized in that: When the program or instruction is executed by the processor, the steps of the defect distribution space editing method as described in any one of claims 1 to 5, or the steps of the defect screening method as described in any one of claims 6 to 9, or the steps of the product classification method as described in claim 10 or 11 are implemented.
Citation Information
Patent Citations
Product display method and device, computer equipment and storage medium
CN114820105A
Apparatus and computer-readable medium for assisting image classification
US20030202703A1