Visual inspection system and method
A visual inspection system includes: a visual calibration apparatus, including a calibration member and a calibration member moving apparatus, where the calibration member moving apparatus includes a movable mounting plate, the mounting plate is able to be located at a calibration position within a movement range of the mounting plate, the calibration position is located within an inspection range of a visual inspection apparatus, and the calibration member is disposed on the mounting plate; the visual inspection apparatus, configured to obtain an image of the calibration member and send the image of the calibration member to an upper computer, and the upper computer, configured to determine, based on the image of the calibration member, a systematic calibration result of the visual inspection apparatus.
1 . A visual inspection system, wherein the visual inspection system comprises:
a visual calibrator, comprising a calibration structure and a calibration structure mover, wherein the calibration structure mover comprises a movable mounting plate, the mounting plate is able to be located at a calibration position within a movement range of the mounting plate, the calibration position is located within an inspection range of a visual inspector, and the calibration structure is disposed on the mounting plate;
the visual inspector, configured to obtain an image of the calibration structure and send the image of the calibration structure to an upper computer; and
the upper computer, configured to determine, based on the image of the calibration structure, a systematic calibration result of the visual inspector,
wherein the calibration structure comprises a plurality of size calibration parts with a gradient change in size and a plurality of color card calibration parts with a gradient change in gray value;
the visual inspector is further configured to obtain a first image of the size calibration part and a second image of the color card calibration part and send the first image and the second image to the upper computer; and
the upper computer is further configured to determine, based on the first image and/or the second image, the systematic calibration result of the visual inspector.
2 . The visual inspection system according to claim 1 , wherein the visual calibrator further comprises:
a support base; and
a driver, comprising a fixed part and a movable part moving linearly relative to each other, wherein the fixed part is disposed on the support base, and the movable part is connected to the mounting plate.
3 . The visual inspection system according to claim 2 , wherein the visual calibrator further comprises a sliding guide structure, wherein the sliding guide structure comprises a sliding rail and a slider in sliding fit with each other, and the sliding rail and the slider are disposed between the support base and the mounting plate.
4 . The visual inspection system according to claim 3 , wherein the visual calibrator further comprises an adapting seat, the sliding rail is provided in two, and the slider is correspondingly provided in two; and
the sliding rail and the slider fitting with each other as one set are disposed between the support base and the adapting seat, and the sliding rail and the slider fitting with each other as another set are disposed between the mounting plate and the adapting seat.
5 . The visual inspection system according to claim 1 , wherein the calibration structure comprises:
a plate body having a calibration surface; and
a plurality of size calibration parts spaced apart on the calibration surface in a linear direction, wherein the plurality of size calibration parts each have a length dimension in a first direction and a width dimension in a second direction, with a gradient change in the length dimensions of the plurality of size calibration parts and/or a gradient change in the width dimensions of the plurality of size calibration parts, wherein the first direction and the second direction are directions perpendicular to each other in a horizontal plane.
6 . The visual inspection system according to claim 5 , wherein the size calibration part comprises a protrusion or recess formed on the plate body.
7 . The visual inspection system according to claim 5 , wherein sizes of the plurality of size calibration parts in a third direction exhibit a gradient change, the third direction being perpendicular to both the first direction and the second direction.
8 . The visual inspection system according to claim 5 , further comprising color card calibration parts disposed on the calibration surface of the plate body and having a gradient change in gray value.
9 . The visual inspection system according to claim 5 , wherein a material of the plate body comprises aluminum alloy; and/or
roughness of the calibration surface of the plate body is less than a preset roughness threshold.
10 . A visual inspection method, wherein a visual inspection system comprises a visual inspector, a visual calibrator, and an upper computer, wherein the visual calibrator comprises a calibration structure and a calibration structure mover, the calibration structure mover comprises a movable mounting plate, the mounting plate is able to be located at a calibration position within a movement range of the mounting plate, the calibration position is located within an inspection range of the visual inspector, and the calibration structure is disposed on the mounting plate; and
the visual inspection method comprises:
obtaining, by the visual inspector, an image of the calibration structure and sending the image of the calibration structure to the upper computer; and
determining, by the upper computer based on the image of the calibration structure, a systematic calibration result of the visual inspector,
wherein the calibration structure comprises a plurality of size calibration parts with a gradient change in size and a plurality of color card calibration parts with a gradient change in gray value; and the visual inspection method further comprises:
obtaining, by the visual inspector, a first image of the size calibration part and a second image of the color card calibration part and sending the first image and the second image to the upper computer; and
determining, by the upper computer based on the first image and/or the second image, the systematic calibration result of the visual inspector.
11 . The visual inspection method according to claim 10 , wherein the visual inspection method further comprises:
in a case of having received a calibration instruction, sending, by the upper computer, the calibration instruction to the visual inspector; and
in a case of having received the calibration instruction, notifying, by the visual inspector, a workstation controller to stop material delivery.
12 . The visual inspection method according to claim 11 , wherein the visual inspection method further comprises:
in a case of having detected that no material is present at a calibration position, notifying, by the visual inspector, a driver in the visual calibrator to move the calibration structure to the calibration position, wherein the calibration position is located within the inspection range of the visual inspector; and
in a case of having detected that a material is present at the calibration position, keeping inspecting, by the visual inspector, the current material at the calibration position until a target material leaves the calibration position, and notifying the driver in the visual calibrator to move the calibration structure to the calibration position.
13 . The visual inspection method according to claim 10 , wherein the visual inspection method further comprises:
in a case of having detected the first image and/or the second image, notifying, by the visual inspector, a driver in the visual calibrator to move the calibration structure out of the calibration position.
14 . The visual inspection method according to claim 10 , wherein the visual inspection method further comprises:
in a case that the systematic calibration result is normal, notifying, by the upper computer, the workstation controller to start material delivery; and
in a case that the systematic calibration result is abnormal, notifying, by the upper computer, all inspection structures to perform shutdown inspection, and giving an alarm.
15 . The visual inspection method according to claim 10 , wherein the visual inspection method further comprises:
performing, by the upper computer, visual accuracy calibration based on the first image to obtain a visual accuracy calibration result;
performing, by the upper computer, imaging effect calibration based on the second image to obtain an imaging effect calibration result;
in a case that both the visual accuracy calibration result and the imaging effect calibration result are normal calibration results, performing, by the upper computer, visual algorithm calibration based on a target image to obtain a visual algorithm calibration result; and
determining, by the upper computer, the systematic calibration result of the visual inspector based on the visual accuracy calibration result, the imaging effect calibration result, and the visual algorithm calibration result.
16 . The visual inspection method according to claim 15 , wherein the performing, by the upper computer, visual accuracy calibration based on the first image to obtain a visual accuracy calibration result comprises:
determining, by the upper computer, a first difference between a preset standard value and a measurement value corresponding to a structural parameter of the size calibration part in the first image; and
in a case that the first difference is greater than or equal to a first parameter threshold range, obtaining, by the upper computer, a calibration result indicating that visual accuracy of the visual inspection apparatus is abnormal; or
in a case that the first difference is less than the first parameter threshold range, obtaining, by the upper computer, a calibration result indicating that visual accuracy of the visual inspection apparatus is normal.
17 . The visual inspection method according to claim 16 , further comprising:
determining, by the upper computer, the first parameter threshold range based on a tolerance corresponding to the structural parameter.
18 . The visual inspection method according to claim 16 , wherein the visual inspection method further comprises:
performing, by the upper computer, inspection on the first image through a target visual algorithm to obtain a target standard value corresponding to the structural parameter;
determining, by the upper computer, a second difference between the target standard value and the measurement value corresponding to the structural parameter of the size calibration part in the first image; and
in a case that the second difference is greater than or equal to a second parameter threshold range, obtaining, by the upper computer, a calibration result indicating that a result of a visual algorithm of the visual inspector is abnormal; or
in a case that the second difference is less than the second parameter threshold range, obtaining, by the upper computer, a calibration result indicating that a result of a visual algorithm of the visual inspector is normal.
19 . The visual inspection method according to claim 15 , wherein the performing, by the upper computer, imaging effect calibration based on the second image to obtain an imaging effect calibration result comprises:
determining, by the upper computer, a third difference between a preset gray value and the gray value of the color card calibration part in the second image; and
in a case that the third difference is greater than or equal to a third parameter threshold range, determining, by the upper computer, an inspection result indicating that an imaging effect of the visual inspector is abnormal; or
in a case that the third difference is less than the third parameter threshold range, determining, by the upper computer, an inspection result indicating that an imaging effect of the visual inspector is normal.
20 . The visual inspection method according to claim 10 , wherein the visual inspection method further comprises:
performing, by the upper computer, inspection on a second image through a target visual algorithm to obtain a target gray value;
determining, by the upper computer, a fourth difference between a target gray value and a gray value of a color card calibration part in the second image; and
in a case that the fourth difference is greater than or equal to a fourth parameter threshold range, obtaining, by the upper computer, a calibration result indicating that a result of a visual algorithm of the visual inspector is abnormal; or
in a case that the fourth difference is less than the fourth parameter threshold range, obtaining, by the upper computer, a calibration result indicating that a result of a visual algorithm of the visual inspector is normal.
21 . The visual inspection method according to claim 15 , before the performing, by the upper computer, visual algorithm calibration based on a target image to obtain a visual algorithm calibration result, further comprising:
obtaining, by the upper computer, a first image, second image, third image, and fourth image with parameter values calibrated, wherein the parameter value of the first image is within a first range, the parameter value of the second image is within a second range, the parameter value of the third image is within a third range, and the parameter value of the fourth image is within a fourth range, wherein the first range is different from the second range, and the third range is different from the fourth range; and
evaluating, by the upper computer, a sample image through a target visual inspection algorithm to obtain the first image, second image, third image, and fourth image with parameter values calibrated.
22 . The visual inspection method according to claim 21 , wherein the establishing, by the upper computer, an image calibration library based on the first image, the second image, the third image, and the fourth image comprises:
numbering, by the upper computer, the first image, the second image, the third image, and the fourth image; and
establishing, by the upper computer, the image calibration library based on the numbered first image, second image, third image, and fourth image.
23 . The visual inspection method according to claim 21 , before the obtaining, by the upper computer, a first image, second image, third image, and fourth image with parameter values calibrated, further comprising:
evaluating, by the upper computer, a sample image through a target visual inspection algorithm to obtain the first image, second image, third image, and fourth image with parameter values calibrated.
24 . The visual inspection method according to claim 21 , wherein the performing, by the upper computer, visual algorithm calibration based on a target image to obtain a visual algorithm calibration result comprises:
selecting, by the upper computer, a target image from the image calibration library;
performing, by the upper computer, image recognition on the target image through the visual inspector to obtain a parameter value of the target image;
comparing, by the upper computer, the parameter value with a calibrated parameter value corresponding to the target image; and
in a case that a difference between the parameter value and the calibrated parameter value corresponding to the target image exceeds a fifth parameter threshold range, determining, by the upper computer, that visual algorithm is abnormal.