CN115576469A - Distribution space editing method, defect screening method and product classification method - Google Patents

Distribution space editing method, defect screening method and product classification method Download PDF

Info

Publication number
CN115576469A
CN115576469A CN202211064868.9A CN202211064868A CN115576469A CN 115576469 A CN115576469 A CN 115576469A CN 202211064868 A CN202211064868 A CN 202211064868A CN 115576469 A CN115576469 A CN 115576469A
Authority
CN
China
Prior art keywords
user
defect
feature quantity
screened
data space
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211064868.9A
Other languages
Chinese (zh)
Inventor
张武杰
胡昌欣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Casi Vision Technology Luoyang Co Ltd
Casi Vision Technology Beijing Co Ltd
Original Assignee
Casi Vision Technology Luoyang Co Ltd
Casi Vision Technology Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Casi Vision Technology Luoyang Co Ltd, Casi Vision Technology Beijing Co Ltd filed Critical Casi Vision Technology Luoyang Co Ltd
Priority to CN202211064868.9A priority Critical patent/CN115576469A/en
Publication of CN115576469A publication Critical patent/CN115576469A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04845Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range for image manipulation, e.g. dragging, rotation, expansion or change of colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/54Browsing; Visualisation therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/0486Drag-and-drop
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Databases & Information Systems (AREA)
  • Quality & Reliability (AREA)
  • Data Mining & Analysis (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Computing Systems (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Multimedia (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The application provides a distribution space editing method, a defect screening method and a product classification method, wherein the method comprises the following steps: a graphical interface is provided in which a coordinate space editing area and a feature quantity pool including a plurality of feature quantity identifiers are displayed, each feature quantity identifier indicating one feature quantity of a defect to be screened. Receiving an operation instruction of a user, constructing a data space according to key features corresponding to feature quantity marks selected by the user in the feature quantity pool, generating a boundary line according to numerical scales edited by the user in a coordinate space editing area, and dividing the data space into a plurality of mutually independent subspaces based on the boundary line. Furthermore, an operation instruction of a user is received, a constraint feature corresponding to the feature quantity identifier selected by the user for each subspace in the feature quantity pool is determined, and a constraint condition for editing the constraint feature in the coordinate space editing area by the user is determined, so that defect and non-defect classification screening can be performed on the defect to be screened in the subspace.

Description

Distribution space editing method, defect screening method and product classification method
Technical Field
The present application relates to the field of inspection technologies, and in particular, to a defect distribution space editing method, a defect screening method, a product classification method, a defect distribution space editing apparatus, a defect screening apparatus, a product classification apparatus, a computer device, and a readable storage medium.
Background
At present, in order to ensure the quality of products and reduce the cost of defective products in the production process, the quality of the products needs to be detected in a key process. Some results can be detected in the process of carrying out high-precision detection on the appearance of an industrial product by adopting intelligent Automatic Optical Inspection (AOI) equipment, and the results not only contain defects, but also contain non-defects such as dust fall, dirt, water stain and the like. Therefore, classification and screening of defects are required to distinguish detected defects from non-defects in the product.
However, non-defects are similar to defect imaging, which causes difficulty in classifying and screening defects and non-defects, and the classification and screening manner in the related technology is complex, so that the method is low in friendliness to testers, and non-professional testers are difficult to operate, thereby further increasing difficulty in classifying and screening defects and non-defects.
Disclosure of Invention
In view of the above, the present application provides a defect distribution space editing method, a defect screening method, a product classification method, a defect distribution space editing apparatus, a defect screening apparatus, a product classification apparatus, a computer device and a readable storage medium, which solve the problem in the related art that classification and screening of defects and non-defects are difficult.
In a first aspect, an embodiment of the present application provides a method for editing a defect distribution space, including: receiving a first operation instruction of a user, and displaying a graphical interface, wherein the graphical interface comprises a characteristic quantity pool and a coordinate space editing area, the characteristic quantity pool comprises a plurality of characteristic quantity identifications, the characteristic quantity identifications are used for indicating characteristic quantities of defects to be screened, and the characteristic quantities comprise key characteristics and constraint characteristics; receiving a second operation instruction of dragging the characteristic quantity identifier from the characteristic quantity pool to a coordinate axis by a user, determining the characteristic quantity identifier selected by the user in the characteristic quantity pool, and constructing a first data space according to the key characteristic indicated by the characteristic quantity identifier; receiving a third operation instruction of a user for editing 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 first data space into a plurality of areas according to a first boundary line generated by the numerical scale; receiving a fourth operation instruction of a user for dragging the feature quantity identifier from the feature quantity pool to the 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 and the plurality of areas indicated by the feature quantity identifier; receiving a fifth operation instruction of a user for editing the numerical value scales in the coordinate space editing area, determining the numerical value scales selected by the user in the coordinate space editing area, and dividing a second data space into a plurality of mutually independent subspaces according to a second type boundary line generated by the numerical value scales; and receiving a sixth operation instruction of the user, respectively adding constraint conditions of constraint characteristics for each subspace, wherein the subspace after the constraint conditions are added is used for classifying and screening the defects to be screened.
In a second aspect, an embodiment of the present application provides a defect screening method, including: obtaining a plurality of defects to be screened; according to the method of the first aspect, a data space is constructed based on the feature quantities of a 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; and classifying and screening the defects to be screened in the subspace to determine whether the defects to be screened are defects or non-defects.
In a third aspect, an embodiment of the present application provides a product classification method, including: obtaining a plurality of product images of a product, and segmenting defects to be screened from the plurality of product images; according to the method of the second aspect, it is determined whether the defect to be screened is a defect; if the defects to be screened are defects, determining the defect grades of the defects to be screened, and counting the number of the defects to be screened with different defect grades; and determining the classification of the product according to the defect grade of the defect to be screened which is the defect and the quantity of the defects to be screened with different defect grades.
In a fourth aspect, an embodiment of the present application provides a defect distribution space editing apparatus, including: the receiving module is used for receiving a first operation instruction of a user; the display module is used for responding to the first operation instruction and displaying a graphical interface, the graphical interface comprises a characteristic quantity pool and a coordinate space editing area, the characteristic quantity pool comprises a plurality of characteristic quantity identifications, the characteristic quantity identifications are used for indicating the characteristic quantity of the defect to be screened, and the characteristic quantity comprises key characteristics and constraint characteristics; the receiving module is further used for receiving a second operation instruction for dragging the characteristic quantity identifier from the characteristic quantity pool to the coordinate axis by the user; the construction module is used for responding to the second operation instruction, determining the characteristic quantity identifier selected by the user in the characteristic quantity pool, and constructing a first data space according to the key characteristic indicated by the characteristic quantity identifier; the receiving module is also used for receiving a third operation instruction of the user for editing the numerical value scale in the coordinate space editing area; the dividing module is used for responding to a third operation instruction, determining numerical value scales selected by a user in the coordinate space editing area, and dividing the first data space into a plurality of areas according to a first-class boundary line generated by the numerical value scales; the receiving module is further used for receiving a fourth operation instruction of dragging the feature quantity identifier from the feature quantity pool to the feature arrangement area by the user; the building module is further used for responding to a fourth operation instruction, determining the characteristic quantity identification selected by the user in the characteristic quantity pool, and building a second data space according to the key characteristics and the plurality of areas indicated by the characteristic quantity identification; the receiving module is also used for receiving a fifth operation instruction of the user for editing the numerical value scale in the coordinate space editing area; the dividing module is further used for responding to a fifth operation instruction, determining numerical scales selected by a 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 boundary line generated by the numerical scales; the receiving module is further used for receiving a sixth operation instruction of the user; and the adding module is used for responding to a sixth operation instruction, respectively adding constraint conditions of constraint characteristics to each subspace, and classifying and screening the defects to be screened by the subspaces to which the constraint conditions are added.
In a fifth aspect, an embodiment of the present application provides a defect screening apparatus, including: the system comprises an acquisition module, a selection module and a selection module, wherein the acquisition module is used for acquiring a plurality of defects to be screened; a processing module, configured to construct a data space based on the feature quantities of the plurality of defects to be screened according to the apparatus in the fourth aspect, and divide the data space into a plurality of mutually independent subspaces, where the plurality of defects to be screened are point sets in the data space; and the screening module is used for classifying and screening the defects to be screened in the subspace so as to determine whether the defects to be screened are defects or non-defects.
In a sixth aspect, an embodiment of the present application provides a product sorting apparatus, including: the system comprises an acquisition module, a selection module and a selection module, wherein the acquisition module is used for acquiring a plurality of product images of a product and segmenting defects to be screened from the plurality of product images; a judging module, configured to determine whether the defect to be screened is a defect according to the apparatus of the fifth aspect; the determining module is used for determining the defect grade of the defect to be screened and counting the number of the defects to be screened of different defect grades if the defect to be screened is a defect; and the classification module is used for determining the classification of the product according to the defect grade of the defect to be screened which is the defect and the quantity of the defects to be screened with different defect grades.
In a seventh aspect, embodiments of the present application provide a computer device, which includes a processor and a memory, where the memory stores a program or instructions executable on the processor, and the program or instructions, when executed by the processor, implement the steps of the method according to the first aspect.
In an eighth aspect, embodiments of the present application provide a readable storage medium on which a program or instructions are stored, which when executed by a processor, implement the steps of the method according to the first aspect.
In a ninth aspect, embodiments of the present application provide a chip, where the chip includes a processor and a communication interface, where the communication interface is coupled to the processor, and the processor is configured to execute a program or instructions to implement the method according to the first aspect.
In a tenth aspect, embodiments of the present application provide a computer program product, stored on a storage medium, for execution by at least one processor to implement a method as in the first aspect.
In the embodiment of the present application, a graphical interface is provided, in which a coordinate space editing area and a feature quantity pool including a plurality of feature quantity identifiers are displayed, each feature quantity identifier indicates one feature quantity of a defect to be screened, and the feature quantity identifiers can be operated by a user to implement selection of the feature quantity indicated by the feature quantity identifier. Receiving an operation instruction of a user, constructing a data space according to key features indicated by feature quantity identifications selected by the user in a feature quantity pool, converting defects to be screened into point sets distributed in the data space, generating a boundary line according to numerical scales edited by the user in a coordinate space editing area, and dividing the data space into a plurality of mutually independent subspaces based on the boundary line. Furthermore, an operation instruction of a user is received, 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 of the user for editing the constraint feature in the coordinate space editing area is determined, so that the defect to be screened can be classified and screened into defects and non-defects in the subspace. Specifically, if all the constraints of the subspace are met, the defect to be screened falling into the subspace is judged to be a true defect, otherwise, the defect to be screened is judged to be a false defect.
In the embodiment of the application, in order to judge whether the defect to be screened detected from the product appearance is a defect, a method for building a defect distribution space based on a graphical frame is provided. The graphical framework can construct and divide a data space through graphical operation, and visualize the distribution of defects, thereby being beneficial to subdividing the defects to be screened into a plurality of subspaces for screening, and screening out true defects. Moreover, the thinking framework of the structured parameter adjustment is designed into a graphical interface with operability, so that the operability of parameter adjustment of the defect distribution space is improved, and the user friendliness of the link of defect screening can be greatly improved.
The foregoing description is only an overview of the technical solutions of the present application, and the present application can be implemented according to the content of the description in order to make the technical means of the present application more clearly understood, and the following detailed description of the present application is given in order to make the above and other objects, features, and advantages of the present application more clearly understandable.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is a schematic flow chart illustrating a defect distribution space editing method according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a two-dimensional coordinate system data space with length and width according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a length, width, and contrast three-dimensional coordinate coefficient data space according to an embodiment of the present application;
FIG. 4 shows a schematic diagram of a contrast, area secondary two-dimensional coordinate system data space of an embodiment of the present application;
FIG. 5 is a schematic flow chart diagram illustrating a defect screening method according to an embodiment of the present application;
FIG. 6 is a flow chart illustrating a method of product classification in an embodiment of the present application;
fig. 7 is a block diagram showing a structure of a defect distribution space editing apparatus according to an embodiment of the present application;
fig. 8 is a block diagram showing a structure of a defect screening apparatus according to an embodiment of the present application;
fig. 9 is a block diagram showing a structure of a product sorting apparatus according to an embodiment of the present application;
fig. 10 shows a block diagram of a computer device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described clearly below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments, which can be derived from the embodiments in the present application by a person skilled in the art, are within the scope of protection of the present application.
The terms first, second and the like in the description and in the claims of the present application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that embodiments of the application are capable of operation in sequences other than those illustrated or described herein, and that the terms "first," "second," etc. are generally used in a generic sense and do not limit the number of terms, e.g., a first term can be one or more than one. In addition, "and/or" in the specification and claims means at least one of connected objects, a character "/" generally means that a preceding and succeeding related objects are in an "or" relationship.
The defect distribution space editing method, the defect screening method, the product classification method, the defect distribution space editing apparatus, the defect screening apparatus, the product classification apparatus, the computer device, and the readable storage medium provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings and application scenarios thereof.
The embodiment of the application provides a method for editing a defect distribution space, as shown in fig. 1, the method includes:
step 101, receiving a first operation instruction of a user, and displaying a graphical interface, wherein the graphical interface comprises a feature quantity pool and a coordinate space editing area, the feature quantity pool comprises a plurality of feature quantity identifiers, the feature quantity identifiers are used for indicating feature quantities of defects to be screened, and the feature quantities comprise key features and constraint features.
In the step, a user triggers and displays a graphical interface, the graphical interface displays a coordinate space editing area and a feature quantity pool comprising a plurality of feature quantity identifications, each feature quantity identification indicates one feature quantity of the defects to be screened, and the feature quantity identifications can be operated by the user (namely, a detector) so as to realize the selection of the indicated feature quantity.
It should be noted that before displaying a plurality of feature quantity identifiers, the feature quantity of each defect to be screened is calculated, wherein the feature quantity includes a key feature and a constraint feature, so as to generate and display the corresponding feature quantity identifier. These characteristic quantities are used as basic attributes of the defect to be screened, and include, but are not limited to: length, width, aspect ratio, length-to-width mean (i.e., (length + width)/2), area, absolute value of difference of defect gray level mean and background gray level mean, linearity, equivalent bone length, and the like. In practical application, dozens to dozens of different characteristic quantities can be selectively calculated according to needs. These feature quantities can be classified according to attribute types as: scale features, derivative scale features, location features, morphology features, grayscale features, defect domain grayscale features, and the like. The partition into key features and constraint features according to their roles, the key features are used to partition the subspace, and the key features include but are not limited to: length, width, aspect ratio, length-width mean, area, etc., the constraint feature is used to distinguish the corresponding defect to be screened in the subspace as a defect or a non-defect, and features other than the key feature can be used as the constraint feature.
And 102, receiving a second operation instruction of the user for dragging the characteristic quantity identifier from the characteristic quantity pool to the coordinate axis, determining the characteristic quantity identifier selected by the user in the characteristic quantity pool, and constructing a first data space according to the key characteristic indicated by the characteristic quantity identifier.
In this step, a second operation instruction of the user is received, and the second operation instruction is used for selecting the feature quantity identifier in the feature quantity pool. And responding to the second operation instruction, and constructing a first data space according to the key features indicated by the feature quantity identifications selected by the user in the feature quantity pool, so that the defects to be screened are converted into point sets distributed in the first data space.
Step 103, receiving a third operation instruction of the user for editing 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 first data space into a plurality of areas according to a first type boundary line generated by the numerical scale.
In this step, a third operation instruction of the user is received, and the third operation instruction is used for editing the numerical scale in the coordinate space editing area. And responding to the third operation instruction, generating a first type boundary line according to the numerical scale edited in the coordinate space editing area by the user, and dividing the first data space into a plurality of areas based on the first type boundary line.
And 104, receiving a fourth operation instruction for dragging the feature quantity identifier from the feature quantity pool to the feature arrangement area by the user, 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 and the plurality of areas indicated by the feature quantity identifier.
In this step, a fourth operation instruction of the user is received, and the fourth operation instruction is used for selecting the feature quantity identifier in the feature quantity pool. In response to the fourth operation instruction, the second data space is constructed according to the key features indicated by the feature quantity identifications selected by the user in the feature quantity pool.
And 105, receiving a fifth operation instruction of the user for editing the numerical value scale in the coordinate space editing area, determining the numerical value 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 boundary line generated by the numerical value scale.
In this step, a fifth operation instruction of the user is received, and the fifth operation instruction is used for editing the numerical scale in the coordinate space editing area. And responding to the fifth operation instruction, generating a second type boundary line according to the numerical scale edited in the coordinate space editing area by the user, and dividing the second data space into a plurality of mutually independent subspaces based on the second type boundary line.
And 106, receiving a sixth operation instruction of the user, respectively adding constraint conditions of constraint characteristics to each subspace, wherein the subspace to which the constraint conditions are added is used for classifying and screening the defects to be screened.
In this step, a sixth operation instruction of the user for selecting a feature quantity identifier in the feature quantity pool and editing the constraint condition in the coordinate space editing area is received. And responding to the sixth operation instruction, determining the constraint characteristics indicated by the characteristic quantity identifiers selected by the user for each subspace in the characteristic quantity pool, and determining the constraint conditions edited by the user for the constraint characteristics 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, which falls into the subspace, is determined to be a true defect if all the constraints of the subspace are met, and is determined to be a false defect otherwise.
In the embodiment of the application, in order to judge whether the defect to be screened detected from the product appearance is a defect, a method for building a defect distribution space based on a graphical frame is provided. The graphical framework can construct and divide a data space through graphical operation, and visualize the distribution of defects, thereby being beneficial to subdividing the defects to be screened into a plurality of subspaces for screening, and screening out true defects.
Specifically, the embodiment of the application determines how to select the characteristic quantity and set the constraint condition, simplifies the condition setting for distinguishing the defects from the non-defects, and unifies the method and thought for screening the defects, thereby reducing the difficulty in distinguishing the defects from the non-defects and greatly improving the speed and the capability of engineering deployment.
Moreover, the thinking framework of the structured parameter adjustment is designed into a graphical interface with operability, so that the operability of parameter adjustment of the defect distribution space is improved, and the user friendliness of the defect screening link can be greatly improved.
It should be noted that the feature quantity represented by the coordinate axis can be changed in the embodiment of the present application, and a specific implementation manner includes, but is not limited to, dragging a certain feature quantity identifier from the feature quantity pool to the coordinate axis or to the vicinity of the coordinate axis, where the coordinate axis is a numerical axis representing the feature quantity indicated by the feature quantity identifier, and a scale range of the numerical axis may be manually set by a user.
When the numerical value scale is edited, the coordinate space editing area can be a coordinate axis or an area near the coordinate axis, and the selected numerical value scale can be determined by clicking the coordinate space editing area by a user.
It is also possible to add constraint features and constraint conditions graphically, where a specific implementation manner includes, but is not limited to, dragging a feature quantity identifier from a feature quantity pool into a feature arrangement region as a constraint feature of a subspace, and it should be noted that the feature arrangement region may be a location region on a graphical interface or may be a subspace. When editing the constraint condition, the coordinate space editing area is a position area on the graphical interface, and the user can edit the constraint condition at the position area.
In one embodiment of the present application, the key features include: length, width, aspect ratio, length-width mean, and contrast; a manner of constructing a first data space, comprising: receiving an instruction of dragging a first characteristic quantity identifier from a characteristic quantity pool to a first coordinate axis by a user, determining that a key characteristic indicated by the first characteristic quantity identifier selected by the user is length, receiving an instruction of dragging a second characteristic quantity identifier from the characteristic quantity pool to a second coordinate axis by the user, determining that a key characteristic indicated by the second characteristic quantity identifier selected by the user is width, and establishing a two-dimensional coordinate coefficient data space by taking the length as the first coordinate axis and the width as the second coordinate axis, wherein the two-dimensional coordinate system data space is a first data space; a method of partitioning a first data space into a plurality of regions, comprising: receiving a third operation instruction of a user for editing numerical scales of length values, length-width ratios and length-width mean values in a coordinate space editing area, determining a plurality of different length values, a plurality of different length-width ratios and a plurality of different length-width mean values, and adding a plurality of boundary lines of different length values, a plurality of boundary lines of different length-width ratios and a plurality of boundary lines of different length-width mean values in a two-dimensional coordinate coefficient data space so as to divide the two-dimensional coordinate coefficient data space into a plurality of areas; a manner of constructing a second data space, comprising: receiving a fourth operation instruction of dragging a third characteristic quantity identifier from the characteristic quantity pool to the characteristic arrangement area by a user, determining that a key characteristic indicated by the third characteristic quantity identifier selected by the user is a contrast, and converting the plurality of areas into a three-dimensional coordinate coefficient data space by taking the contrast as a third coordinate axis, wherein the three-dimensional coordinate system data space is a second data space; the method for dividing the second data space into a plurality of mutually independent subspaces comprises the following steps: receiving a fifth operation instruction of editing the numerical scale of the contrast in the coordinate space editing area by a user, determining a plurality of different contrast numerical values, and adding a plurality of boundary lines of the different contrast numerical values in the three-dimensional coordinate coefficient data space so as to divide the three-dimensional coordinate system data space into a plurality of mutually independent subspaces.
In this embodiment, the user selects a key feature, which includes a length L, a width W, and an aspect ratio K, a mean value N of the length and the width, and a contrast ratio a derived from the length and the width coordinate systems, so as to establish a three-dimensional coordinate coefficient data space through the key feature selected by the user, where the mean value N = (L + W)/2.
Specifically, as shown in fig. 2, first, a two-dimensional coordinate system data space is established with the length L as the Y axis (i.e., the first coordinate axis) and the width W as the X axis (i.e., the second coordinate axis). And then determining a plurality of different length values (including 41, 80, 90, 150 and 180), a plurality of different aspect ratios (including 1, 2 and 4.5) and a plurality of different length-width mean values (including 8, 25 and 50) set by a user, so as to add boundary lines of different length values, boundary lines of different aspect ratios and boundary lines of different length-width mean values in the two-dimensional coordinate coefficient data space, thereby dividing the two-dimensional coordinate system data space into a plurality of regions.
As shown in fig. 2, the division of the portion having the coordinate system slope larger than 1 into 10 regions by the graphically operating function adjustment boundary is implemented. Since the aspect ratio, i.e. the slope in the corresponding graphical coordinate system, is necessarily greater than 1, i.e. all defects are distributed in 10 regions in the upper half where the slope is greater than 1, and each region in the graphical coordinate system can also be selected and named after it is numbered. Illustratively, the specific data in table 1 is divided into 10 regions, and each region is associated with a defect parent, for example, region 1 is named as: 1.0 line defects.
TABLE 1
Region(s) Long (Unit: pixel) Width (Unit: pixel) Aspect ratio Length and width mean value (unit: pixel)
Zone 10 [6,41] [5,20.5] [2,+∞] -
Region 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]
Zone 7 [180,+∞] [6,+∞] [2,+∞] -
Zone 8 [150,+∞] -- [2,4.5] -
Zone 9 -- -- [1,2] [50,+∞]
The data space is then raised from two dimensions to three dimensions. Specifically, a one-dimensional key feature is further added to the two-dimensional coordinate system data space: the contrast ratio is taken as the Z axis (namely, the third coordinate axis), so that the three-dimensional coordinate data space is converted. In the three-dimensional coordinate system data space shown in fig. 3, the contrast a can be selected to add the numerical scales 30 and 60, and the 2 regions in fig. 2 correspond to obtain the subspace B. Taking subspace B as a subclass, named: 2.1 moderate blockiness defect.
After the defect classification is performed, the defect classification method can be used for classifying defects to be screened. For example, in the subspace B, a representative feature quantity is selected as a constraint feature to distinguish the defect and the non-defect according to the characteristics of the defect and the non-defect distributed in the subspace. For subspace B in the embodiment of the present application, the constraint conditions of the selected constraint features are: the area is larger than 50, the ratio of the defect to the minimum circumscribed rectangle is larger than 0.3, and the number of high-gradient pixels is larger than 10, wherein the defect is an irregular region, and the ratio of the area of the region divided by the minimum circumscribed rectangle is the ratio of the minimum circumscribed rectangle. And regarding the defects to be screened which meet the constraint condition in the subspace B, namely the defects, and regarding the defects to be screened which do not meet the constraint condition, namely the defects are non-defects.
It should be noted that, for different subspaces, the constraint feature to be selected needs to be determined according to an actual screening situation, which is not limited in the embodiment of the present application.
According to the embodiment of the application, the defect and non-defect are classified and screened in the subspace by establishing the data space and dividing the subspace.
In addition, the easy operation of parameter adjustment can be increased in a parameter adjustment graphical mode.
In one embodiment of the present application, the key features include: length, width, aspect ratio, length-width mean, contrast, and area; a manner of constructing a first data space, comprising: receiving an instruction of dragging a fourth characteristic quantity identifier from the characteristic quantity pool to a first coordinate axis by a user, determining that a key characteristic indicated by the fourth characteristic quantity identifier selected by the user is length, receiving an instruction of dragging a fifth characteristic quantity identifier from the characteristic quantity pool to a second coordinate axis by the user, determining that the key characteristic indicated by the fifth characteristic quantity identifier selected by the user is width, and establishing a primary two-dimensional coordinate system data space by taking 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 a first data space; a method for partitioning a first data space into a plurality of regions, comprising: receiving a third operation instruction of a user for editing numerical scales of length values, length-width ratios and length-width mean values in a coordinate space editing area, determining a plurality of different length values, a plurality of different length-width ratios and a plurality of different length-width mean values, and adding a plurality of boundary lines of different length values, a plurality of boundary lines of different length-width ratios and a plurality of boundary lines of different length-width mean values in a primary two-dimensional coordinate system data space to divide the primary two-dimensional coordinate coefficient data space into a plurality of areas; a manner of constructing a second data space, comprising: receiving a fourth operation instruction of dragging a sixth feature quantity identifier from the feature quantity pool to the feature arrangement area by a user, determining that a key feature indicated by the sixth feature quantity identifier selected by the user is a contrast, receiving an instruction of dragging a seventh feature quantity identifier from the feature quantity pool to the feature arrangement area by the user, determining that a key feature indicated by the seventh feature quantity identifier selected by the user is an area, converting the plurality of areas into a secondary two-dimensional coordinate coefficient data space by taking the contrast as a first coordinate axis and the area as a second coordinate axis, wherein the secondary two-dimensional coordinate system data space is a second data space; the method for dividing the second data space into a plurality of mutually independent subspaces comprises the following steps: receiving an instruction of a user for editing numerical scales of contrast and area in a coordinate space editing area, determining a plurality of different contrast numerical values and a plurality of different area values, and adding a plurality of boundary lines of different contrast numerical values and a plurality of boundary lines of different area values in a secondary two-dimensional coordinate coefficient data space so as to divide the secondary two-dimensional coordinate coefficient data space into a plurality of mutually independent subspaces.
In this embodiment, the user selects a key feature, which includes a length L, a width W, and an aspect ratio K, a mean value N, a contrast a, and an area S derived from the length and width coordinate systems, so as to establish a two-dimensional coordinate coefficient data space by using the key feature selected by the user, where the mean value N = (L + W)/2.
Specifically, as shown in fig. 2, first, a first-level two-dimensional coordinate system data space is established with the length L as the Y axis (i.e., the first coordinate axis) and the width W as the X axis (i.e., the second coordinate axis). And then determining a plurality of different length values (including 41, 80, 90, 150 and 180), a plurality of different aspect ratios (including 1, 2 and 4.5) and a plurality of different length-width mean values (including 8, 25 and 50) set by a user, so as to add boundary lines of different length values, boundary lines of different aspect ratios and boundary lines of different length-width mean values in the primary two-dimensional coordinate system data space, thereby dividing the primary two-dimensional coordinate system data space into a plurality of regions.
As shown in fig. 2, it is realized that a portion having a slope of a coordinate system larger than 1 is divided into 10 regions by a graphic operation function adjustment boundary. Since the aspect ratio, i.e. the slope in the corresponding graphical coordinate system, must be larger than 1, i.e. all defects are distributed in 10 regions in the upper half with a slope larger than 1, and each region in the graphical coordinate system may also be selected and numbered.
Then, as shown in fig. 4, a contrast a and an area S are respectively selected from each region, a secondary two-dimensional coordinate coefficient data space is constructed with the contrast a as a Y axis (i.e., a first coordinate axis) and the area S as an X axis (i.e., a second coordinate axis), boundary lines with different contrast values and boundary lines with different area values are added to the secondary two-dimensional coordinate coefficient data space to obtain a plurality of subspaces, and the different subspaces are used as a sub-class, for example, a subspace C is correspondingly obtained by using 2 regions in fig. 2.
After the defect classification is performed, the defect classification method can be used for classifying defects to be screened. For example, in the subspace C, a representative feature quantity is selected as a constraint feature to distinguish the defect and the non-defect according to the characteristics of the defect and the non-defect distributed in the subspace. In the embodiment of the present application, subspace C is named: 2.1 bulk scratches, the constraints of the selected constraint feature include, but are not limited to: the proportion of the minimum circumscribed rectangle of the defect is greater than 0.5, and the number of the independent regions is less than 3, wherein the defect is an irregular region, and the proportion of the minimum circumscribed rectangle is obtained by dividing the area of the region by the minimum circumscribed rectangle; when a plurality of regions which are not connected together are fused and called a defect, the number of the regions which are not connected together of the defect is called the number of independent regions. And regarding the defects to be screened which meet the constraint condition in the subspace C, namely the defects, and regarding the defects to be screened which do not meet the constraint condition, namely the defects are non-defects.
It should be noted that, for different subspaces, the constraint features to be selected need to be determined according to the actual screening situation, which is not limited in the embodiment of the present application.
According to the embodiment of the application, the defect and non-defect are classified and screened in the subspace by establishing the data space and dividing the subspace.
In addition, the easy operability of parameter adjustment can be improved in a parameter adjustment graphical mode.
In one embodiment of the present application, after the first data space is divided into a plurality of regions, the regions may be further resized, merged, or divided. Specifically, receiving a moving instruction of a user for at least one part of line segments of the first boundary line, and moving at least one part of line segments to adjust the sizes of areas on two sides of at least one part of line segments; and/or receiving a deleting instruction of a user for at least one part of line segments of the first boundary line, and deleting at least one part of line segments so as to merge areas on two sides of at least one part of line segments; and/or receiving an adding instruction of adding a first target line to the first boundary line by a user, and adding the first target line in a target area in the plurality of areas so as to divide the target area into two areas according to the first target line.
In this embodiment, after dividing the regions, editing and modifying the regions may be performed, including but not limited to adding, deleting, and moving the boundary of the divided regions to adjust the size of each region.
In addition, each region can be selected, and the selected region can be subjected to naming operation or sub-region operation added in the region.
By means of the method, the region is adjusted through graphical operation, operation of a user is facilitated, and defect screening efficiency is improved.
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 further resized, merged, or divided. Specifically, receiving a moving instruction of a user for at least one part of line segments of the second-type boundary line, and moving at least one part of line segments to adjust the size of subspaces on two sides of at least one part of line segments; and/or receiving a deleting instruction of a user for at least one part of line segments of the second type boundary line, and deleting at least one part of line segments so as to merge subspaces on two sides of at least one part of line segments; and/or receiving an adding instruction of adding a second target line to the second type boundary line by a user, and adding the second target line in a first target subspace of the plurality of subspaces so as to divide the first target subspace into two subspaces according to a plane corresponding to the second target line.
In this embodiment, after the sub-spaces are divided, the sub-spaces may be edited and modified, including but not limited to adding, deleting, and moving the dividing line of the divided region to adjust the size of each sub-space.
In addition, each subspace may be selected, and a naming operation may be performed on the selected subspace or a sub-sort operation may be added to the subspace.
By the aid of the method, the subspace is adjusted through graphical operation, user operation is facilitated, and defect screening efficiency is improved.
The embodiment of the application provides a defect screening method, as shown in fig. 5, the method includes:
step 501, obtaining a plurality of defects to be screened;
step 502, constructing a data space based on the characteristic quantities of a 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;
and 503, classifying and screening the defects to be screened in the subspace to determine whether the defects to be screened are defects or non-defects.
In this embodiment, a plurality of defects to be screened are obtained, and the defects to be screened may be defects to be screened that are segmented on a product image of an industrial product that needs quality inspection, or may be defects of a sample. And constructing a data space according to the characteristic 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, the data space is divided into a plurality of mutually independent subspaces, and classification screening of defects and non-defects is carried out on the defects to be screened in the subspaces.
Specifically, the characteristic quantity of each defect to be screened is calculated, the defect to be screened is recorded as d, and each defect to be screened comprises n characteristic quantities x 1 ,x 2 ,......,x n Then m samples d 1 ,d 2 ,......,d m Forming a set D. On the basis of the concept, the set D is regarded as being distributed by x 1 ,x 2 ,......,x n The n-dimensional features form a point set in a high-dimensional data space, and 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 a defect set D t And non-defect set D f
Selecting key features, constructing a data space, setting numerical value scales on the basis of the requirements of the inspection gauges and the screening experience, dividing the data space into a plurality of subspaces, namely corresponding to a plurality of subclasses, and enabling the defects to be screened to fall into the corresponding subspaces according to the values of the key features. Further, in each subspace, constraint conditions of constraint features are added respectively for screening and distinguishing defects from non-defects.
Moreover, it should be noted that in the embodiment of the present application, a defect distribution space is established based on a graphical frame, so that it is determined whether a defect to be screened detected from an appearance of a product is a defect. The graphical framework can construct and divide a data space through graphical operation, and visualize the distribution of defects, thereby being beneficial to subdividing the defects to be screened into a plurality of subspaces for screening, and screening out true defects. The method and the system have the advantages that the thinking framework for adjusting the parameters in the structured mode is designed into the graphical interface with operability, the operability of adjusting the parameters in the defect distribution space is improved, and the user friendliness of the link of defect screening can be greatly improved.
The technical scheme of this application can accurately distinguish and treat that the screening defect is defect or non-defect to can reduce the hourglass rate of examining and the excessive rate of examining of industrial product, improve the quality testing effect of industrial product.
In one embodiment of the present application, classifying and screening defects to be screened in a subspace to determine whether the defects to be screened are defects or non-defects includes: for a target defect to be screened in the plurality of defects to be screened, dividing the target defect to be screened into a second target subspace corresponding to the target key feature according to the target key feature of the target defect to be screened; if the constraint characteristics of the target defect to be screened meet the constraint conditions correspondingly added to the second target subspace, determining the target defect to be screened as a defect; and if the constraint characteristics of the target defect to be screened do not meet the constraint conditions correspondingly added to the second target subspace, determining that the target defect to be screened is a non-defect.
In this embodiment, for any defect to be screened (that is, a defect to be screened of a target) in the plurality of defects to be screened, the defect to be screened of the target is divided into a second target subspace corresponding to the target key feature according to a value of the target key feature of the defect to be screened of the target, and then whether the defect to be screened of the target is a true defect is determined according to whether the constraint feature of the defect to be screened of the target satisfies a constraint condition in the second target subspace. For example, if the length and width of the target defect to be screened satisfy the length and width values corresponding to the subspace B in fig. 3, the target defect to be screened is divided into the subspaces B. If the value of the constraint characteristic (namely, the contrast) of the target defect to be screened also meets the constraint condition corresponding to the subspace B, determining that the target defect to be screened is indeed a defect; and if the value of the constraint characteristic of the target defect to be screened does not meet the constraint condition corresponding to the subspace B, determining that the target defect to be screened is a non-defect.
By the method, whether the defects to be screened are true defects or not can be accurately classified and screened.
In an embodiment of the present application, after dividing the first data space into a plurality of regions, the method further includes: and determining a target area where the key features of the defects to be screened are located, and taking the classification labels corresponding to the target area as the types of the defects to be screened.
In this embodiment, the user may add a corresponding classification tag to each region, where the classification tag is related to a key feature of the region, so as to name each region. For example, region 1 in fig. 2 may be named 1.0 line defects. If a defect to be screened is determined to fall within a region, the type of defect to be screened can be determined according to the name of the region. For example, if the length and width of the defect to be screened satisfy the length and width values corresponding to region 1 in fig. 2, the defect to be screened is divided into region 1, that is, the defect to be screened may be a linear defect.
Through the mode, the specific type of the defect to be screened is determined.
In an embodiment of the present application, after dividing the target to-be-screened defects into a second target subspace corresponding to the target key features, the method further includes: and taking the classification label corresponding to the second target subspace as the type of the target defect to be screened.
In this embodiment, a user may add a corresponding classification tag to each subspace, where the classification tag is related to a feature quantity of the subspace, so as to name each subspace. For example, the subspace B designation in FIG. 3 may be named 2.1 medium blockiness defects. If a defect to be screened is determined to fall into a subspace, the type of the defect to be screened can be determined according to the name of the subspace. For example, if the length, width, and contrast of the target defect to be screened satisfy the length, width, and contrast values corresponding to the subspace B in fig. 3, 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.
Through the mode, the specific type of the defect to be screened is determined.
In an embodiment of the application, the numerical scale edited according to the fifth operation instruction of the user is larger than a preset threshold; the method further comprises the following steps: and determining the defect to be screened with the key feature in the subspace as the out-of-specification defect.
In this embodiment, the user may set the numerical scale edited by the fifth operation instruction to be greater than a preset threshold, where the preset threshold is a division value, and can divide the in-specification defect and the out-specification defect, specifically, the defects to be screened whose key features are smaller than the preset threshold are all discharged outside the subspace, and the defects to be screened that are in the subspace are the out-specification defects.
Through the mode, the defect outside the specification is determined.
An embodiment of the present application provides a product classification method, as shown in fig. 6, the method includes:
601, acquiring a plurality of product images of a product, and segmenting defects to be screened from the plurality of product images;
step 602, determining whether the defect to be screened is a defect, if the defect to be screened is a defect, determining the defect grade of the defect to be screened, and counting the number of the defects to be screened of different defect grades;
step 603, determining product classification according to the defect grade of the defect to be screened which is the defect and the quantity of the defects to be screened of different defect grades.
In this embodiment, first, a plurality of product images of the product taken at different combinations of camera and light source angles, referred to as a plurality of image channels, are acquired. Then, an image channel with clear defect imaging is selected to segment the defect, and a defect mask (namely, the defect to be screened) is obtained. And then calculating the characteristic quantity on the product image corresponding to the defect to be screened, wherein the characteristic quantity comprises key characteristics and constraint characteristics, selecting the key characteristics to construct a data space, dividing the data space into a plurality of mutually independent subspaces according to the inspection rule requirements and the screening experience, and adding constraint conditions of the constraint characteristics in each subspace, so as to judge whether the defect to be screened is a true defect according to whether the constraint characteristics of any defect to be screened meet the constraint conditions corresponding to the subspace where the defect to be screened is located. And determining the defect grade of the defect to be screened under the condition that the defect is judged to be a true defect.
Through the mode, the true and false defects of the plurality of divided defects to be screened are judged, the defect grade of the true defect is determined, and therefore the defects to be screened with different defect grades are counted. The classification of a product is determined to be OK, NG or QualityB by counting the number and level of true defects present in the product.
Illustratively, the defect levels are classified into 1 to 5 levels, and the defect degrees increase in order. If the product is detected to have 1 or 0 grade-1 defects and has no defects with higher grade, judging the product to be OK; if the product is detected to have 2 or more than 1-level defects and has no defects with higher levels, judging the product to be qualityB; if a product is detected with 1 or more defects of grade 2 and above, it is judged to be NG.
According to the embodiment of the application, the product quality can be accurately determined, the over-detection rate and the omission factor of the product appearance quality detection are reduced, and the quality detection effect of the product is improved.
In one embodiment of the present application, determining a defect level of a defect to be screened includes: judging the numerical range of the specific features in the feature quantity of the defects to be screened; and taking the defect grade corresponding to the numerical range of the specific characteristic as the defect grade of the defect to be screened.
In this embodiment, a specific feature is selected from the feature quantities, and the defect level is classified for the true defects, 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.
Specifically, the defect level is correspondingly determined according to the numerical range of the specific feature. Illustratively, the area is selected as a specific feature of the defect level classification, the classification into 1 class with an area interval of 50 to 100, the classification into 2 classes with an area interval of 100 to 200, the classification into 3 classes with an area interval of 200 to 350, the classification into 4 classes with an area interval of 350 to 500, and the classification into 5 classes with an area interval of 500 to infinity are selected.
By the aid of the mode, the defect grades are accurately divided, and judgment basis is provided for product quality detection.
As a specific implementation of the defect distribution space editing method, an embodiment of the present application provides a defect distribution space editing apparatus. As shown in fig. 7, the defect distribution space editing apparatus 700 includes: a receiving module 701, a display module 702, a construction module 703, a dividing module 704, and an adding module 705.
The receiving module 701 is configured to receive a first operation instruction of a user; a display module 702, configured to respond to a first operation instruction, to display a graphical interface, where 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 feature quantities of defects to be screened, and the feature quantities include key features and constraint features; the receiving module 701 is further configured to receive a second operation instruction for a user to drag a feature quantity identifier from the feature quantity pool to a coordinate axis; a constructing module 703, configured to determine, in response to the second operation instruction, a feature quantity identifier selected by the user in the feature quantity pool, and construct a first data space according to the key feature indicated by the feature quantity identifier; the receiving module 701 is further configured to receive a third operation instruction of the user for editing the numerical scale in the coordinate space editing area; a dividing module 704, configured to determine, in response to a third operation instruction, a numerical scale selected by a user in the coordinate space editing area, and divide the first data space into multiple areas according to a first-class boundary line generated by the numerical scale; the receiving module 701 is further configured to receive a fourth operation instruction for the user to drag a feature quantity identifier from the feature quantity pool to the feature arrangement region; the building module 703 is further configured to, in response to the fourth operation instruction, determine a feature quantity identifier selected by the user in the feature quantity pool, and build the second data space according to the key feature indicated by the feature quantity identifier and the plurality of regions; the receiving module 701 is further configured to receive a fifth operation instruction of the user for editing the numerical scale in the coordinate space editing area; the dividing module 704 is further configured to determine, in response to a fifth operation instruction, a numerical scale selected by a user in the coordinate space editing area, and divide the second data space into a plurality of mutually independent subspaces according to a second type boundary line generated by the numerical scale; the receiving module 701 is further configured to receive a sixth operation instruction of the user; and an adding module 705, configured to respond to the sixth operation instruction, add a constraint condition of a constraint feature to each subspace, where the subspace after adding the constraint condition is used to sort and screen the defect to be screened.
In this embodiment, a graphical interface is provided in which a coordinate space editing area and a feature quantity pool including a plurality of feature quantity identifiers are displayed, each feature quantity identifier indicating one feature quantity of a defect to be screened, and the feature quantity identifiers can be operated by a user to implement selection of the feature quantity indicated by the feature quantity identifier. Receiving an operation instruction of a user, constructing a data space according to key features indicated by feature quantity identifiers selected by the user in a feature quantity pool, converting defects to be screened into point sets distributed in the data space, generating a boundary line according to numerical scales edited by the user in a coordinate space editing area, and dividing the data space into a plurality of mutually independent subspaces based on the boundary line. Further, an operation instruction of a user is received, 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 on the constraint feature in the coordinate space editing area is determined, so that the defect to be screened can be classified and screened into defects and non-defects in the subspace. Specifically, if all the constraints of the subspace are met, the defect to be screened falling into the subspace is judged to be a true defect, otherwise, the defect to be screened is judged to be a false defect.
In the embodiment of the application, in order to judge whether the to-be-screened defect detected from the product appearance is a defect, a method for building a defect distribution space based on a graphical frame is provided. The graphical framework can construct and divide a data space through graphical operation, and visualize the distribution of defects, thereby being beneficial to subdividing the defects to be screened into a plurality of subspaces for screening, and screening out true defects. Moreover, the thinking framework of the structured parameter adjustment is designed into a graphical interface with operability, so that the operability of parameter adjustment of the defect distribution space is improved, and the user friendliness of the defect screening link can be greatly improved.
Further, key features include: length, width, aspect ratio, length-width mean, and contrast; a receiving module 701, configured to specifically receive an instruction for a user to drag a first feature quantity identifier from the feature quantity pool to a first coordinate axis, and receive an instruction for a user to drag a second feature quantity identifier from the feature quantity pool to a second coordinate axis; the building module 703 is specifically configured to determine that a key feature indicated by a first feature quantity identifier selected by a user is a length, determine that a key feature indicated by a second feature quantity identifier selected by the user is a width, and establish a two-dimensional coordinate coefficient data space with the length as a first coordinate axis and the width as a second coordinate axis, where the two-dimensional coordinate system data space is a first data space; the receiving module 701 is specifically configured to receive a third operation instruction of a user to edit a length value, an aspect ratio, and a numerical scale of a length-width average value in a coordinate space editing area; a dividing module 704, configured to specifically determine a plurality of different length values, a plurality of different aspect ratios, and a plurality of different length-width mean values, and 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 a two-dimensional coordinate coefficient data space, so as to divide the two-dimensional coordinate coefficient data space into a plurality of regions; a receiving module 701, specifically configured to receive a fourth operation instruction that the user drags the third feature quantity identifier from the feature quantity pool to the feature arrangement region; the building module 703 is specifically configured to determine that the key feature indicated by the third feature quantity identifier selected by the user is a contrast, and convert the multiple regions into a three-dimensional coordinate coefficient data space with the contrast as a third coordinate axis, where the three-dimensional coordinate data space is a second data space; the receiving module 701 is specifically configured to receive a fifth operation instruction for editing the numerical scale of the contrast in the coordinate space editing area by the user; the dividing module 704 is specifically configured to determine a plurality of different contrast values, and add a plurality of boundary lines with 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.
Further, key features include: length, width, aspect ratio, length-width mean, contrast, and area; the receiving module 701 is specifically configured to receive an instruction for a user to drag a fourth feature quantity identifier from the feature quantity pool to the first coordinate axis, and receive an instruction for a user to drag a fifth feature quantity identifier from the feature quantity pool to the second coordinate axis; the building module 703 is specifically configured to determine that a key feature indicated by the fourth feature quantity identifier selected by the user is a length, determine that a key feature indicated by the fifth feature quantity identifier selected by the user is a width, and establish a primary two-dimensional coordinate system data space by taking the length as a first coordinate axis and taking the width as a second coordinate axis, where the primary two-dimensional coordinate system data space is a first data space; the receiving module 701 is specifically configured to receive a third operation instruction for a user to edit the length value, the aspect ratio, and the numerical scale of the length-width average value in the coordinate space editing area; a dividing module 704, configured to specifically determine a plurality of different length values, a plurality of different aspect ratios, and a plurality of different length-width mean values, and 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 a primary two-dimensional coordinate system data space, so as to divide the primary two-dimensional coordinate coefficient data space into a plurality of regions; a receiving module 701, configured to specifically receive a fourth operation instruction for a user to drag a sixth feature quantity identifier from the feature quantity pool to the feature arrangement region, and receive an instruction for the user to drag a seventh feature quantity identifier from the feature quantity pool to the feature arrangement region; the constructing module 703 is specifically configured to determine that a key feature indicated by the sixth feature quantity identifier selected by the user is a contrast, determine that a key feature indicated by the seventh feature quantity identifier selected by the user is an area, convert the multiple regions into a secondary two-dimensional coordinate coefficient data space with the contrast as a first coordinate axis and the area as a second coordinate axis, where the secondary two-dimensional coordinate system data space is a second data space; a receiving module 701, specifically configured to receive an instruction for a user to edit numerical scales of contrast and area in a coordinate space editing area; the dividing module 704 is specifically configured to determine a plurality of different contrast values and a plurality of different area values, and add a plurality of boundary lines with different contrast values and a plurality of boundary lines with different area values in the secondary two-dimensional coordinate coefficient data space, so as to divide the secondary two-dimensional coordinate coefficient data space into a plurality of mutually independent subspaces.
Further, the receiving module 701 is further configured to receive a moving instruction of a user for at least a part of line segments of the first-class boundary line; a dividing module 704, configured to move at least a portion of the line segment to adjust the size of the areas on both sides of the at least a portion of the line segment; and/or, the receiving module 701 is further configured to receive a deletion instruction of the user for at least a part of line segments of the first-class boundary line, and the dividing module 704 is further configured to delete at least a part of line segments, so as to merge regions on two sides of at least a part of line segments; and/or the receiving module 701 is further configured to receive an adding instruction of adding a first target line to the first type boundary line by a user, and the dividing module 704 is further configured to add the first target line in a target area in the multiple areas, so as to divide the target area into two areas according to the first target line.
Further, the receiving module 701 is further configured to receive a moving instruction of the user for at least a portion of line segments of the second-class boundary line, and the dividing module 704 is further configured to move at least a portion of line segments to adjust sizes of subspaces on two sides of at least a portion of line segments; and/or the receiving module 701 is further configured to receive a deletion instruction of the user for at least a part of line segments of the second-class boundary line, and the dividing module 704 is further configured to delete at least a part of line segments, so as to merge subspaces on two sides of at least a part of line segments; and/or the receiving module 701 is further configured to receive an increasing instruction of a user for increasing a second target line for the second type boundary line, and the dividing module 704 is further configured to increase the second target line in 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.
As a specific implementation of the defect screening method, the embodiment of the present application provides a defect screening apparatus. As shown in fig. 8, the defect screening apparatus 800 includes: an acquisition module 801, a processing module 802, and a screening module 803.
The acquiring module 801 is used for acquiring a plurality of defects to be screened; a processing module 802, configured to construct a data space based on feature quantities of a plurality of defects to be screened according to the defect distribution space editing apparatus, and divide the data space into a plurality of mutually independent subspaces, where the plurality of defects to be screened are point sets in the data space; and the screening module 803 is configured to sort and screen the defect to be screened in the subspace, so as to determine whether the defect to be screened is a defect or a non-defect.
In this embodiment, a plurality of defects to be screened are obtained, and the defects to be screened may be defects to be screened that are segmented on a product image of an industrial product that needs quality detection, or may be sample images. And constructing a data space according to the characteristic 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, the data space is divided into a plurality of mutually independent subspaces, and classification screening of defects and non-defects is carried out on the defects to be screened in the subspaces.
In the embodiment of the application, the defect distribution space is built based on the graphical frame, so that whether the defects to be screened detected from the product appearance are defects or not is judged. The graphical framework can construct and divide a data space through graphical operation, and visualize the distribution of defects, thereby being beneficial to subdividing the defects to be screened into a plurality of subspaces for screening, and screening out true defects. The method and the system have the advantages that the thinking framework for adjusting the parameters in the structured mode is designed into the graphical interface with operability, the operability of adjusting the parameters in the defect distribution space is improved, and the user friendliness of the link of defect screening can be greatly improved.
According to the technical scheme, whether the defect to be screened is a defect or a non-defect can be accurately distinguished, so that the missing detection rate and the over-detection rate of the industrial product can be reduced, and the quality detection effect of the industrial product is improved.
Further, the screening module 803 is specifically configured to: for a target defect to be screened in the plurality of defects to be screened, dividing the target defect to be screened into a second target subspace corresponding to the target key feature according to the target key feature of the target defect to be screened; if the constraint characteristics of the target defect to be screened meet the constraint conditions correspondingly added to the second target subspace, determining the target defect to be screened as a defect; and if the constraint characteristics of the target defect to be screened do not meet the constraint conditions correspondingly added to the second target subspace, determining that the target defect to be screened is a non-defect.
Further, the screening module 803 is further configured to use the classification label corresponding to the second target subspace as the type of the target defect to be screened.
Further, the numerical scale edited according to the fifth operation instruction of the user is larger than a preset threshold; the screening module 803 is further configured to determine the defect to be screened, in which the key feature is located in the subspace, as an out-of-specification defect.
As a specific implementation of the product classification method, the embodiment of the present application provides a product classification device. As shown in fig. 9, the product sorting apparatus 900 includes: an acquisition module 901, a judgment module 902, a determination module 903, and a classification module 904.
The acquiring module 901 is configured to acquire a plurality of product images of a product and segment defects to be screened from the plurality of product images; a judging module 902, configured to determine whether a defect to be screened is a defect according to the defect screening apparatus; a determining module 903, configured to determine a defect level of the defect to be screened if the defect to be screened is a defect, and count the number of the defects to be screened of different defect levels; a classification module 904, configured to determine a classification of the product according to the defect grade of the defect to be screened, which is a defect, and the number of the defects to be screened of different defect grades.
In this embodiment, first, a plurality of product images of the product taken at different combinations of camera and light source angles, referred to as a plurality of image channels, are acquired. Then, an image channel with clear defect imaging is selected to segment the defect, and a defect mask (namely, the defect to be screened) is obtained. And then calculating the characteristic quantity on the product image corresponding to the defect to be screened, wherein the characteristic quantity comprises key characteristics and constraint characteristics, selecting the key characteristics to construct a data space, dividing the data space into a plurality of mutually independent subspaces according to the inspection rule requirements and the screening experience, and adding constraint conditions of the constraint characteristics in each subspace, so as to judge whether the defect to be screened is a true defect according to whether the constraint characteristics of any defect to be screened meet the constraint conditions corresponding to the subspace where the defect to be screened is located. And determining the defect grade of the defect to be screened under the condition that the defect is judged to be a true defect.
Through the method, the plurality of segmented defects to be screened are judged to be true and false defects and the defect grade of the true defect is determined, so that the defects to be screened with different defect grades are counted. The classification of a product is determined to be OK, NG or QualityB by counting the number and level of true defects present in the product.
According to the embodiment of the application, the product quality can be accurately determined, the over-detection rate and the missing-detection rate of the product appearance quality detection are reduced, and the quality detection effect of the product is improved.
Further, the determining module 903 is specifically configured to determine a numerical range where a specific feature in the feature quantity of the defect to be screened is located, and use a defect level corresponding to the numerical range where the specific feature is located as a defect level of the defect to be screened.
The above-mentioned apparatus in the embodiment of the present application may be a computer device, or may be a component in a computer device, such as an integrated circuit or a chip, and the computer device may be an AOI device.
The device provided in the embodiment of the present application can implement each process implemented by the method embodiment in fig. 1, 5, or 6, and is not described here again to avoid repetition.
As shown in fig. 10, the computer device 1000 includes a processor 1001 and a memory 1002, where a program or an instruction that can be executed on the processor 1001 is stored in the memory 1002, and when the program or the instruction is executed by the processor 1001, the steps of the defect distribution space editing method embodiment, the defect screening method embodiment, or the product classification method embodiment are implemented, and the same technical effects can be achieved.
It should be noted that the computer devices in the embodiments of the present application include the mobile computer device and the non-mobile computer device described above.
The memory 1002 may be used to store software programs as well as various data. The memory 1002 may mainly include a first storage area storing a program or an instruction and a second storage area storing data, wherein the first storage area may store an operating system, an application program or an instruction (such as a sound playing function, an image playing function, and the like) required for at least one function, and the like. Further, memory 1002 may include volatile memory or nonvolatile memory, or memory 1002 may include both volatile and nonvolatile memory. The non-volatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash Memory. The volatile Memory may be a Random Access Memory (RAM), a Static Random Access Memory (Static RAM, SRAM), a Dynamic Random Access Memory (Dynamic RAM, DRAM), a Synchronous Dynamic Random Access Memory (Synchronous DRAM, SDRAM), a Double Data Rate Synchronous Dynamic Random Access Memory (Double Data Rate SDRAM, ddr SDRAM), an Enhanced Synchronous SDRAM (ESDRAM), a Synchronous Link DRAM (SLDRAM), and a Direct Memory bus RAM (DRRAM). The memory 1002 in the embodiments of the subject application includes, but is not limited to, these and any other suitable types of memory.
Processor 1001 may include one or more processing units; optionally, the processor 1001 integrates an application processor, which mainly handles operations related to the operating system, user interface, application programs, etc., and a modem processor, which mainly handles wireless communication signals, such as a baseband processor. It will be appreciated that the modem processor described above may not be integrated into processor 1001.
In one embodiment of the present application, taking AOI apparatus for appearance inspection of a glass cover plate of a mobile phone as an example, the AOI apparatus includes:
an optical imaging device, an upper linear array camera and a lower linear array camera are arranged in a detection station, and an upper light source and a lower light source are arranged in a plurality of groups at different angles. And the defect imaging under multiple visual angles is realized by shooting through different combinations of the camera and the light source.
Preferably, the optical imaging device is used in particular for: the projection bright field, the projection dark field, the reflection bright field and the reflection dark field are combined to realize clear imaging of the outline of the product and imaging of the defect. The imaging of the outline of the product is convenient for positioning the detection area in the image, and the clear imaging of the defect is convenient for detecting and segmenting the defect.
And the detection platform software is used for integrating the input, the output, the cutting and the storage of the image, building a detection operator flow and building a defect classification filter.
And the defect detection module is used for building an operator flow of defect detection to realize the detection of the defect area and the calculation of the defect characteristic quantity. The detection process can be divided into five steps: establishing a coordinate system, converting a data format, acquiring a contour area, detecting defects and calculating defect characteristic quantities.
And the defect classification and screening module is used for distinguishing and screening true defects, classifying the defects, such as scratches, crush damages and the like, and classifying the defects into 5 grades so as to realize product classification.
The embodiment of the present application further provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or the instruction is executed by a processor, the program or the instruction implements each process of the defect distribution space editing method embodiment, the defect screening method embodiment, or the product classification method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
The embodiment of the present application further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to execute a program or an instruction to implement each process of the defect distribution space editing method embodiment, the defect screening method embodiment, or the product classification method embodiment, and can achieve the same technical effect, and in order to avoid repetition, the details are not repeated here.
It should be understood that the chips mentioned in the embodiments of the present application may also be referred to as system-on-chip, system-on-chip or system-on-chip, etc.
The embodiments of the present application further provide a computer program product, where the program product is stored in a storage medium, and the program product is executed by at least one processor to implement the processes of the defect distribution space editing method embodiment, the defect screening method embodiment, or the product classification method embodiment, and can achieve the same technical effects, and in order to avoid repetition, the details are not repeated here.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a component of' 8230; \8230;" does not exclude the presence of another like element in a process, method, article, or apparatus that comprises the element. Further, it should be noted that the scope of the methods and apparatuses in the embodiments of the present application is not limited to performing the functions in the order illustrated or discussed, but may include performing the functions in a substantially simultaneous manner or in a reverse order based on the functions recited, e.g., the described methods may be performed in an order different from that described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
While the present embodiments have been described with reference to the accompanying drawings, it is to be understood that the invention is not limited to the precise embodiments described above, which are meant to be illustrative and not restrictive, and that various changes may be made therein by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (24)

1. A method for editing defect distribution space, comprising:
receiving a first operation instruction of a user, and displaying a graphical interface, wherein the graphical interface comprises a characteristic quantity pool and a coordinate space editing area, the characteristic quantity pool comprises a plurality of characteristic quantity identifiers, the characteristic quantity identifiers are used for indicating characteristic quantities of defects to be screened, and the characteristic quantities comprise key characteristics and constraint characteristics;
receiving a second operation instruction for dragging a feature quantity identifier from the feature quantity pool to a coordinate axis by a user, 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 of a user for editing numerical scales in the coordinate space editing area, determining the numerical scales 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-class boundary line generated by the numerical scales;
receiving a fourth operation instruction of a user for 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 plurality of areas;
receiving a fifth operation instruction of a user for editing numerical value scales in the coordinate space editing area, determining the numerical value scales 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 boundary line generated by the numerical value scales;
and receiving a sixth operation instruction of the user, respectively adding constraint conditions of the constraint characteristics to each subspace, wherein the subspace after the constraint conditions are added is used for classifying and screening the defects to be screened.
2. The method of claim 1, wherein the key features comprise: length, width, aspect ratio, length-width mean, and contrast;
the receiving a second operation instruction that the user drags the feature quantity identifier from the feature quantity pool to the 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 feature indicated by the feature quantity identifier includes:
receiving an instruction of dragging a first feature quantity identifier from the feature quantity pool to a first coordinate axis by a user, determining that a key feature indicated by the first feature quantity identifier selected by the user is length, receiving an instruction of dragging a second feature quantity identifier from the feature quantity pool to a second coordinate axis by the user, determining that a key feature indicated by the second feature quantity identifier selected by the user is width, and establishing a two-dimensional coordinate coefficient data space by taking 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 a user for editing numerical scales in the coordinate space editing area, determining the numerical scales 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 boundary line generated by the numerical scales, includes:
receiving a third operation instruction of a user for editing numerical scales of length values, length-width ratios and length-width mean values in the coordinate space editing area, determining a plurality of different length values, a plurality of different length-width ratios and a plurality of different length-width mean values, and adding boundary lines of the plurality of different length values, the plurality of different length-width ratios and the plurality of different length-width mean values in the two-dimensional coordinate coefficient data space to divide the two-dimensional coordinate coefficient data space into a plurality of regions;
the receiving a fourth operation instruction that the user drags the feature quantity identifier from the feature quantity pool to the 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 feature indicated by the feature quantity identifier and the plurality of areas, includes:
receiving a fourth operation instruction that a user drags a third feature quantity identifier from the feature quantity pool to a feature arrangement area, determining that a key feature indicated by the third feature quantity identifier selected by the user is a contrast, and converting the plurality of areas into a three-dimensional coordinate coefficient data space by taking the contrast as a third coordinate axis, wherein the three-dimensional coordinate system data space is the second data space;
the receiving a fifth operation instruction of the user for editing 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 a second type boundary line generated by the numerical scale, includes:
receiving a fifth operation instruction of editing the numerical scale of the contrast in the coordinate space editing area by a user, determining a plurality of different contrast numerical values, and adding boundary lines of the plurality of different contrast numerical values 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 of claim 1, wherein the key features comprise: length, width, aspect ratio, length-width mean, contrast, and area;
the receiving a second operation instruction that a user drags 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 a key feature indicated by the feature quantity identifier includes:
receiving an instruction of dragging a fourth feature quantity identifier from the feature quantity pool to a first coordinate axis by a user, determining that a key feature indicated by the fourth feature quantity identifier selected by the user is length, receiving an instruction of dragging a fifth feature quantity identifier from the feature quantity pool to a second coordinate axis by the user, determining that a 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 by taking 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 a user for editing numerical scales in the coordinate space editing area, determining the numerical scales 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 boundary line generated by the numerical scales, includes:
receiving a third operation instruction of a user for editing numerical scales of length values, length-width ratios and length-width mean values in the coordinate space editing area, determining a plurality of different length values, a plurality of different length-width ratios and a plurality of different length-width mean values, and adding boundary lines of the plurality of different length values, the plurality of different length-width ratios and the plurality of different length-width mean values in the primary two-dimensional coordinate system data space to divide the primary two-dimensional coordinate system data space into a plurality of regions;
the receiving a fourth operation instruction that the user drags the feature quantity identifier from the feature quantity pool to the 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 feature indicated by the feature quantity identifier and the plurality of areas, includes:
receiving a fourth operation instruction of dragging a sixth feature quantity identifier from the feature quantity pool to a feature arrangement area by a user, determining that a key feature indicated by the sixth feature quantity identifier selected by the user is a contrast, receiving an instruction of dragging a seventh feature quantity identifier from the feature quantity pool to the feature arrangement area by the user, determining that a key feature indicated by the seventh feature quantity identifier selected by the user is an area, and converting the plurality of areas into a secondary two-dimensional coordinate coefficient data space by taking the contrast as a first coordinate axis and the area as a second coordinate axis, wherein the secondary two-dimensional coordinate system data space is the second data space;
the receiving a fifth operation instruction of the user for editing 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 a second type boundary line generated by the numerical scale, includes:
receiving an instruction of a user for editing numerical scales of contrast and area in the coordinate space editing area, determining a plurality of different contrast numerical values and a plurality of different area values, and adding boundary lines of the plurality of different contrast numerical values and boundary lines of the plurality of different area values in the secondary two-dimensional coordinate coefficient data space so as to divide the secondary two-dimensional coordinate system data space into a plurality of mutually independent subspaces.
4. The method of claim 2 or 3, further comprising, after said dividing said first data space into a plurality of regions:
receiving a moving instruction of a user for at least one part of line segments of the first boundary line, and moving the at least one part of line segments to adjust the sizes of areas on two sides of the at least one part of line segments; and/or the presence of a gas in the gas,
receiving a deleting instruction of a user for at least one part of line segments of the first boundary line, and deleting the at least one part of line segments so as to merge areas on two sides of the at least one part of line segments; and/or the presence of a gas in the gas,
and receiving an adding instruction of adding a first target line to the first-class boundary line by a user, and adding the first target line in a target area in the plurality of 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, wherein after said dividing the second data space into a plurality of mutually independent subspaces, further comprising:
receiving a moving instruction of a user for at least one part of line segments of the second-type boundary line, and moving the at least one part of line segments to adjust the size of subspaces on two sides of the at least one part of line segments; and/or the presence of a gas in the gas,
receiving a deleting instruction of a user for at least one part of line segments of the second-class boundary line, and deleting the at least one part of line segments so as to merge subspaces on two sides of the at least one part of line segments; and/or the presence of a gas in the gas,
and receiving an adding instruction of adding a second target line to the second type boundary line by a user, and adding the second target line in a first target subspace of the plurality of subspaces so as to divide the first target subspace into two subspaces according to a plane corresponding to the second target line.
6. A method of defect screening, comprising:
obtaining a plurality of defects to be screened;
the method for editing the defect distribution space according to any one of claims 1 to 5, wherein a data space is constructed based on the feature 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;
and classifying and screening the defects to be screened in the subspace to determine whether the defects to be screened are defects or non-defects.
7. The method according to claim 6, wherein 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 comprises:
for a target defect to be screened in the plurality of defects to be screened, dividing the target defect to be screened into a second target subspace corresponding to the target key feature according to the target key feature of the target defect to be screened;
if the constraint characteristics of the target defect to be screened meet the constraint conditions correspondingly added to the second target subspace, determining the target defect to be screened as a defect;
and if the constraint characteristics of the target defect to be screened do not meet the constraint conditions added correspondingly to the second target subspace, determining that the target defect to be screened is a non-defect.
8. The method according to claim 7, further comprising, after said dividing the target defect to be screened into a second target subspace corresponding to the target key feature:
and taking the classification label corresponding to the second target subspace as the type of the target defect to be screened.
9. The method according to any one of claims 6 to 8, wherein the numerical scale edited according to the fifth operation instruction of the user is greater than a preset threshold; the method further comprises the following steps:
and determining the defect to be screened with the key feature in the subspace as the out-of-specification defect.
10. A method of product classification, comprising:
obtaining a plurality of product images of a product, and segmenting defects to be screened from the plurality of product images;
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 defects to be screened are the defects, determining the defect grades of the defects to be screened, and counting the number of the defects to be screened with different defect grades;
and determining the classification of the product according to the defect grade of the defect to be screened which is the defect and the quantity of the defects to be screened of different defect grades.
11. The method of claim 10, wherein said determining a defect level of said defect to be screened comprises:
judging the numerical range of the specific features in the feature quantity of the defects to be screened;
and taking the defect grade corresponding to the numerical range in which the specific characteristic is positioned as the defect grade of the defect to be screened.
12. A defect distribution space editing apparatus, comprising:
the receiving module is used for receiving a first operation instruction of a user;
the display module is used for responding to the first operation instruction and displaying a graphical interface, the graphical interface comprises a characteristic quantity pool and a coordinate space editing area, the characteristic quantity pool comprises a plurality of characteristic quantity identifications, the characteristic quantity identifications are used for indicating characteristic quantities of the defects to be screened, and the characteristic quantities comprise key characteristics and constraint characteristics;
the receiving module is further configured to receive a second operation instruction for a user to drag a feature quantity identifier from the feature quantity pool to a coordinate axis;
the construction module is used for responding to the second operation instruction, determining the characteristic quantity identification selected by the user in the characteristic quantity pool, and constructing a first data space according to the key characteristic indicated by the characteristic quantity identification;
the receiving module is further configured to receive a third operation instruction of the user for editing the numerical scale in the coordinate space editing area;
the dividing module is used for responding to the third operation instruction, determining numerical scales selected by a user in the coordinate space editing area, and dividing the first data space into a plurality of areas according to a first-class boundary line generated by the numerical scales;
the receiving module is further configured to receive a fourth operation instruction for a user to drag a feature quantity identifier from the feature quantity pool to a feature arrangement area;
the building 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 build a second data space according to a key feature indicated by the feature quantity identifier and the plurality of regions;
the receiving module is further configured to receive a fifth operation instruction of the user for editing the numerical scale in the coordinate space editing area;
the dividing module is further configured to determine, in response to the fifth operation instruction, a numerical scale selected by a user in the coordinate space editing area, and divide the second data space into a plurality of mutually independent subspaces according to a second type boundary line generated by the numerical scale;
the receiving module is further configured to receive a sixth operation instruction of the user;
and the adding module is used for responding to the sixth operation instruction, respectively adding the constraint conditions of the constraint characteristics to each subspace, and the subspace after the constraint conditions are added is used for classifying and screening the defects to be screened.
13. The apparatus of claim 12, wherein the key features comprise: length, width, aspect ratio, length-width mean, and contrast;
the receiving module is specifically configured to receive an instruction for a user to drag a first feature quantity identifier from the feature quantity pool to a first coordinate axis, and receive an instruction for a user to drag a second feature quantity identifier from the feature quantity pool to a second coordinate axis;
the building module is specifically configured to determine that a key feature indicated by the first feature quantity identifier selected by the user is a length, determine that a key feature indicated by the second feature quantity identifier selected by the user is a width, and establish a two-dimensional coordinate coefficient data space with the length as a first coordinate axis and the width as a second coordinate axis, where the two-dimensional coordinate system data space is the first data space;
the receiving module is specifically configured to receive a third operation instruction of a user to edit a numerical scale of a length value, an aspect ratio and a length-width mean value in the coordinate space editing area;
the dividing module is specifically configured to determine a plurality of different length values, a plurality of different aspect ratios, and a plurality of different length-width mean values, and add boundary lines of the plurality of different length values, the plurality of boundary lines of different aspect ratios, and the plurality of boundary lines of different length-width mean values to the two-dimensional coordinate coefficient data space, so as to divide the two-dimensional coordinate coefficient data space into a plurality of regions;
the receiving module is specifically configured to receive a fourth operation instruction for a user to drag a third feature quantity identifier from the feature quantity pool to the feature arrangement area;
the building module is specifically configured to determine that a key feature indicated by the third feature quantity identifier selected by the user is a contrast, and convert the plurality of regions into a three-dimensional coordinate coefficient data space with the contrast as a third coordinate axis, where the three-dimensional coordinate coefficient data space is the second data space;
the receiving module is specifically configured to receive a fifth operation instruction for a user to edit the numerical scale of the contrast in the coordinate space editing area;
the dividing module is specifically configured to determine a plurality of different contrast values, and add boundary lines of the plurality of different contrast values to 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 apparatus of claim 12, wherein the key features comprise: length, width, aspect ratio, length-width mean, contrast, and area;
the receiving module is specifically configured to receive an instruction for a user to drag a fourth feature quantity identifier from the feature quantity pool to a first coordinate axis, and receive an instruction for a user to drag a fifth feature quantity identifier from the feature quantity pool to a second coordinate axis;
the building module is specifically configured to determine that a key feature indicated by the fourth feature quantity identifier selected by the user is a length, determine that a key feature indicated by the fifth feature quantity identifier selected by the user is a width, and establish a primary two-dimensional coordinate system data space with the length as a first coordinate axis and the width as a second coordinate axis, where the primary two-dimensional coordinate system data space is the first data space;
the receiving module is specifically configured to receive a third operation instruction of a user to edit a numerical scale of a length value, an aspect ratio and a length-width mean value in the coordinate space editing area;
the dividing module is specifically configured to determine a plurality of different length values, a plurality of different aspect ratios, and a plurality of different length-width means, and add boundary lines of the plurality of different length values, the plurality of boundary lines of the different aspect ratios, and the plurality of boundary lines of the different length-width means to the primary two-dimensional coordinate system data space to divide the primary two-dimensional coordinate system data space into a plurality of regions;
the receiving module is specifically configured to receive a fourth operation instruction for a user to drag a sixth feature quantity identifier from the feature quantity pool to the feature arrangement region, and receive an instruction for the user to drag a seventh feature quantity identifier from the feature quantity pool to the feature arrangement region;
the building module is specifically configured to determine that a key feature indicated by the sixth feature quantity identifier selected by the user is a contrast, determine that a key feature indicated by the seventh feature quantity identifier selected by the user is an area, and convert the multiple regions into a secondary two-dimensional coordinate coefficient data space with the contrast as a first coordinate axis and the area as a second coordinate axis, where the secondary two-dimensional coordinate system data space is the second data space;
the receiving module is specifically used for receiving an instruction of a user for editing numerical scales of contrast and area in the coordinate space editing area;
the dividing module is specifically configured to determine a plurality of different contrast values and a plurality of different area values, and add boundary lines of the plurality of different contrast values and boundary lines of the plurality of different area values to 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.
15. The apparatus of claim 13 or 14,
the receiving module is further used for receiving a moving instruction of a user to at least one part of line segments of the first boundary line; the dividing module is further configured to move the at least one portion of line segment to adjust sizes of regions on two sides of the at least one portion of line segment; and/or the presence of a gas in the gas,
the receiving module is further configured to receive a deletion instruction of a user for at least one part of line segments of the first-class boundary line, and the dividing module is further configured to delete the at least one part of line segments to merge regions on two sides of the at least one part of line segments; and/or the presence of a gas in the gas,
the receiving module is further configured to receive an adding instruction for adding a first target line to the first-class boundary line by a user, and the dividing module is further configured to add the first target line in a target area of the multiple areas, so as to divide the target area into two areas according to the first target line.
16. The apparatus of claim 13 or 14,
the receiving module is further configured to receive a moving instruction of a user for at least a part of line segments of the second-class boundary line, and the dividing module is further configured to move the at least a part of line segments to adjust sizes of subspaces on two sides of the at least a part of line segments; and/or the presence of a gas in the gas,
the receiving module is further configured to receive a deletion instruction of a user for at least one part of line segments of the second-class boundary line, and the dividing module is further configured to delete the at least one part of line segments to merge subspaces on two sides of the at least one part of line segments; and/or the presence of a gas in the gas,
the receiving module is further configured to receive an adding instruction of adding a second target line to the second-class boundary line by a user, and the dividing module is further configured to add the second target line in 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.
17. A defect screening apparatus, comprising:
the acquiring module is used for acquiring a plurality of defects to be screened;
the processing module is used for constructing a data space based on the characteristic quantities of a plurality of defects to be screened according to the defect distribution space editing device as claimed in any one of claims 12 to 16, 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;
and the screening module is used for classifying and screening the defects to be screened in the subspace so as to determine whether the defects to be screened are defects or non-defects.
18. The apparatus according to claim 17, wherein the screening module is specifically configured to:
for a target defect to be screened in the plurality of defects to be screened, dividing the target defect to be screened into a second target subspace corresponding to the target key feature according to the target key feature of the target defect to be screened;
if the constraint characteristics of the target defect to be screened meet the constraint conditions correspondingly added to the second target subspace, determining the target defect to be screened as a defect;
and if the constraint characteristics of the target defect to be screened do not meet the constraint conditions correspondingly added to the second target subspace, determining that the target defect to be screened is a non-defect.
19. The apparatus of claim 18,
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 apparatus according to any one of claims 17 to 19, wherein 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 for determining the defect to be screened with the key features in the subspace as the out-of-specification defect.
21. A product sorting apparatus, comprising:
the system comprises an acquisition module, a selection module and a selection module, wherein the acquisition module is used for acquiring a plurality of product images of a product and segmenting defects to be screened from the plurality of product images;
a judging module, configured to determine whether the defect to be screened is a defect according to the defect screening apparatus of any one of claims 17 to 20;
the determining module is used for determining the defect grade of the defect to be screened if the defect to be screened is the defect, and counting the number of the defects to be screened of different defect grades;
and the classification module is used for determining the classification of the product according to the defect grade of the defect to be screened which is the defect and the quantity of the defects to be screened with different defect grades.
22. The apparatus of claim 21,
the determining module is specifically configured to determine a numerical range in which a specific feature in the feature quantity of the defect to be screened is located, and use a defect level corresponding to the numerical range in which the specific feature is located as a defect level of the defect to be screened.
23. A computer device comprising a processor and a memory, said memory storing a program or instructions running on said processor, said program or instructions, when executed by said processor, implementing the steps of the defect distribution space editing method according to any one of claims 1 to 5, or the steps of the defect screening method according to any one of claims 6 to 9, or the steps of the product classification method according to claim 10 or 11.
24. A readable storage medium, on which a program or instructions are stored, which, when being executed by a processor, carry out the steps of the method for editing a defect distribution space according to any one of claims 1 to 5, or the steps of the method for screening defects according to any one of claims 6 to 9, or the steps of the method for classifying products according to claim 10 or 11.
CN202211064868.9A 2022-09-01 2022-09-01 Distribution space editing method, defect screening method and product classification method Pending CN115576469A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211064868.9A CN115576469A (en) 2022-09-01 2022-09-01 Distribution space editing method, defect screening method and product classification method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211064868.9A CN115576469A (en) 2022-09-01 2022-09-01 Distribution space editing method, defect screening method and product classification method

Publications (1)

Publication Number Publication Date
CN115576469A true CN115576469A (en) 2023-01-06

Family

ID=84578739

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211064868.9A Pending CN115576469A (en) 2022-09-01 2022-09-01 Distribution space editing method, defect screening method and product classification method

Country Status (1)

Country Link
CN (1) CN115576469A (en)

Similar Documents

Publication Publication Date Title
US7881520B2 (en) Defect inspection system
US11386542B2 (en) Training data creation method and device, and defect inspection method and device
JP4616864B2 (en) Appearance inspection method and apparatus, and image processing evaluation system
US7231079B2 (en) Method and system for inspecting electronic circuit pattern
JP2001156135A (en) Method and device for sorting defective image and manufacturing method of semiconductor device using them
JP5371916B2 (en) Interactive threshold adjustment method and system in inspection system
US20130202189A1 (en) Defect classification method and apparatus, and defect inspection apparatus
US20060093082A1 (en) Method of inspection for inner defects of an object and apparatus for same
US20060274932A1 (en) Inspecting method, inspecting system, and method for manufacturing electronic devices
US20070014467A1 (en) System and method for fast template matching by adaptive template decomposition
JP2004294358A (en) Method and apparatus for inspecting defect
CN113406092B (en) Digital production detection system, method, device, equipment and storage medium
CN103988069A (en) Inspection area setting method for image inspecting device
CN113033516A (en) Object identification statistical method and device, electronic equipment and storage medium
JP2013105245A (en) Image processing method, device and program
EP3450956B1 (en) Particle analysis apparatus and particle analysis system
CN117115171B (en) Slight bright point defect detection method applied to subway LCD display screen
US20150170355A1 (en) Wafer appearance inspection system and method of sensitivity threshold setting
JP2000306964A (en) Inspection data processing method, and inspection data processor
CN115576469A (en) Distribution space editing method, defect screening method and product classification method
CN115577135A (en) Defect screening method, product classification method, device and computer equipment
JP2001134763A (en) Method for sorting defect on basis of picked-up image and method for displaying the result
CN114005036A (en) Bare soil monitoring and early warning method and device, computer equipment and storage medium
US20230052350A1 (en) Defect inspecting system and defect inspecting method
Olson Image analysis using the Aperio ScanScope

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination