Roller, inspection method and apparatus, coil conveying method and apparatus, device and medium
This application provides a roller, an inspection method for a camera, a camera inspection apparatus, a coil conveying method, a coil conveying apparatus, an electronic device, a computer-readable storage medium, and a computer program product. The roller includes a roller body and a calibration sheet. The roller body includes a roller surface for supporting a coil; the calibration sheet is located on the roller surface of the roller body and avoids the coil, and the calibration sheet is used for inspection of the camera.
1 . An inspection method for a camera, the camera being configured for obtaining a detection image of workpiece conveying by a roller, the roller comprising:
a roller body, comprising a roller surface for supporting a workpiece; and
a calibration pattern located on the roller surface of the roller body and avoiding the workpiece, the calibration pattern being configured for camera inspection, the method comprising:
obtaining a detection image having a calibration pattern;
determining location information of the calibration pattern in the detection image; and
judging whether a location of the camera is abnormal based on the location information of the calibration pattern.
2 . The inspection method for a camera of claim 1 , wherein the judging whether a location of the camera is abnormal based on the location information of the calibration pattern comprises:
calculating an offset parameter of a location of the calibration pattern in the detection image relative to a preset reference location based on the location information of the calibration pattern and preset reference location information; and
judging whether the location of the camera is abnormal based on the offset parameter.
3 . The inspection method for a camera of claim 2 , wherein the calibration pattern comprises a first calibration pattern and a second calibration pattern, the location information of the calibration pattern comprises first location information for indicating a location of a first feature point in the first calibration pattern in the detection image and second location information for indicating a location of a second feature point in the second calibration pattern in the detection image; and
the preset reference location information comprises first reference location information for indicating a reference location of the first feature point and second reference location information for indicating a reference location of the second feature point.
4 . The inspection method for a camera of claim 3 , wherein the offset parameter comprises at least one of a first deviation value, a second deviation value and a third deviation value;
and wherein the calculating an offset parameter of a location of the calibration pattern in the detection image relative to a preset reference location based on the location information of the calibration pattern and preset reference location information comprises at least one of:
calculating the first deviation value based on the first location information and the first reference location information;
calculating the second deviation value based on the second location information and the second reference location information; and
calculating the third deviation value based on the first location information, the second location information, the first reference location information and the second reference location information.
5 . The inspection method for a camera of claim 4 , wherein the first deviation value is an offset distance in a first direction between the location of the first feature point in the detection image and the reference location of the first feature point;
the second deviation value is an offset distance in the first direction between the location of the second feature point in the detection image and the reference location of the second feature point; and
the third deviation value is an included angle formed between a first connecting line connecting the first feature point and the second feature point in the detection image and a second connecting line connecting the reference location of the first feature point and the reference location of the second feature point,
wherein the first direction is a direction different from a vertical direction of the detection image.
6 . The inspection method for a camera of claim 3 , wherein the first feature point is a pattern center of the first calibration pattern, and the second feature point is a pattern center of the second calibration pattern.
7 . The inspection method for a camera of claim 2 , wherein the reference location is a location of the calibration pattern in a first detection image having the calibration pattern obtained by the camera.
8 . The inspection method for a camera of claim 2 , the judging whether the location of the camera is abnormal based on the offset parameter comprises:
judging that the location of the camera is abnormal in response to the offset parameter being greater than a first preset threshold.
9 . The inspection method for a camera of claim 8 , further comprising: sending alarm information and/or adjustment information in response to that the location of the camera is abnormal.
10 . The inspection method for a camera of claim 9 , wherein the adjustment information is sent to control the location of the camera to be adjusted in response to the offset parameter being greater than the first preset threshold and less than or equal to a second preset threshold; and
sending the alarm information in response to the offset parameter being greater than the second preset threshold,
wherein the second preset threshold is greater than the first preset threshold.
11 . The inspection method for a camera of claim 1 , additionally comprising:
if said judging whether a location of the camera is abnormal based on the location information of the calibration pattern indicates that a location of the camera is normal,
controlling the camera to obtain a detection image of a workpiece conveying by the roller; and
driving the roller to convey a workpiece based on an identification result.
12 . An electronic device, comprising:
at least one processor; and
a memory connected to the at least one processor in communication, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the inspection method for a camera of claim 1 .
13 . A computer-readable storage medium stored with a computer program that, when being executed by a processor, implements the inspection method for a camera of claim 1 .
14 . A computer program product, comprising a computer program that, when being executed by a processor, implements the inspection method for a camera of claim 1 .
15 . A camera inspection apparatus, the apparatus comprising: a camera and a roller, the camera being configured for obtaining a detection image of workpiece conveying by the roller, the roller having:
a roller body, comprising a roller surface for supporting a workpiece; and
a calibration pattern located on the roller surface of the roller body and avoiding the workpiece, the calibration pattern being configured for camera inspection;
the apparatus further comprising:
a computer programmed to operate as an obtaining module, configured to obtain a detection image having the calibration pattern;
the computer being further programmed to operate as a determination module, configured to determine location information of the calibration pattern in the detection image; and
the computer being further programmed to operate as a judgment module, configured to judge whether a location of the camera is abnormal based on the location information of the calibration pattern.
16 . The camera inspection apparatus of claim 15 , further comprising:
an alarm module, configured to send alarm information in response to an inspection result indicating that the location of the camera is abnormal.
17 . The camera inspection apparatus of claim 15 , further comprising:
an adjustment mechanism, configured to adjust the location of the camera in response to the inspection result indicating that the location of the camera is abnormal.
18 . The camera inspection apparatus of claim 15 , wherein:
the computer is further programmed to operate as an identification module, configured to identify a detection image obtained by the camera in response to an inspection result indicating that a location of the camera is normal; and
the computer is further programmed to operate as a driving mechanism, configured to drive the roller to convey a workpiece based on an identification result for the detection image.