CN112859189A - Workpiece detection device, detection method, and computer-readable storage medium - Google Patents

Workpiece detection device, detection method, and computer-readable storage medium Download PDF

Info

Publication number
CN112859189A
CN112859189A CN202011626466.4A CN202011626466A CN112859189A CN 112859189 A CN112859189 A CN 112859189A CN 202011626466 A CN202011626466 A CN 202011626466A CN 112859189 A CN112859189 A CN 112859189A
Authority
CN
China
Prior art keywords
workpiece
light
laser
conveying path
detection image
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
CN202011626466.4A
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.)
Midea Group Co Ltd
Guangdong Midea White Goods Technology Innovation Center Co Ltd
Original Assignee
Midea Group Co Ltd
Guangdong Midea White Goods Technology Innovation Center 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 Midea Group Co Ltd, Guangdong Midea White Goods Technology Innovation Center Co Ltd filed Critical Midea Group Co Ltd
Priority to CN202011626466.4A priority Critical patent/CN112859189A/en
Publication of CN112859189A publication Critical patent/CN112859189A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01VGEOPHYSICS; GRAVITATIONAL MEASUREMENTS; DETECTING MASSES OR OBJECTS; TAGS
    • G01V8/00Prospecting or detecting by optical means
    • G01V8/10Detecting, e.g. by using light barriers
    • G01V8/20Detecting, e.g. by using light barriers using multiple transmitters or receivers

Abstract

The application discloses a workpiece detection device, a detection method and a computer readable storage, wherein the workpiece detection device comprises: the light source assembly is used for forming a light curtain in the workpiece conveying path, and the light curtain forms light spots on the surface of the conveying path; the image acquisition assembly is used for photographing the light spots to obtain a detection image; and the controller is connected with the image acquisition assembly and is used for detecting and confirming that the light spots in the detection image are changed so as to confirm that the workpiece is detected. By the mode, irregular workpieces can be detected, and detection precision is improved.

Description

Workpiece detection device, detection method, and computer-readable storage medium
Technical Field
The present disclosure relates to the field of optical inspection technologies, and in particular, to a workpiece inspection apparatus, an inspection method, and a computer-readable storage medium.
Background
In the field of industrial production, workpieces are generally conveyed by a conveyor belt to be processed or the like. Although the technology has been developed, intelligent devices such as robots, etc., have replaced manual work for processing workpieces on conveyor belts. Therefore, it is generally necessary to detect the workpiece on the conveyor belt through a sensor, and when the workpiece is detected, the robot is further controlled to perform the next processing on the workpiece.
The existing sensor generally adopts an infrared sensor, and the infrared sensor is low in price and easy to install and detect. The principle of the infrared sensor is that an infrared transmitter is arranged on one side of a conveyor belt, an infrared receiver is arranged on the other corresponding side of the conveyor belt, when a workpiece passes through the infrared sensor, a light path between the infrared transmitter and the infrared receiver is blocked, and the workpiece is determined to be detected.
The disadvantages of this approach are: only one beam of light exists between the infrared transmitter and the infrared receiver, and the condition of missing detection can occur when the shape of the workpiece is irregular.
Disclosure of Invention
In order to solve the above problems, the present application provides a workpiece detection apparatus, a detection method, and a computer-readable storage medium, which can detect an irregular workpiece and improve detection accuracy.
The technical scheme adopted by the application is as follows: there is provided a workpiece inspection apparatus, comprising: the light source assembly is used for forming a light curtain in the workpiece conveying path, and the light curtain forms light spots on the surface of the conveying path; the image acquisition assembly is used for photographing the light spots to obtain a detection image; and the controller is connected with the image acquisition assembly and is used for detecting and confirming that the light spots in the detection image are changed so as to confirm that the workpiece is detected.
Wherein the light curtain covers at least the largest cross-section of the workpiece as it passes.
Wherein, the coverage area of the light curtain is rectangular.
The light source assembly comprises at least two lasers, a laser light curtain formed by each laser covers a triangular area, and at least two triangular areas are combined to form a rectangular area.
Wherein the at least two lasers comprise: the first laser forms a first laser light curtain, the first laser light curtain covers a first triangular area, and one side of the first triangular area intersects with the edge of one side of the conveying path and is perpendicular to the conveying path; the second laser forms a second laser light curtain, the second laser light curtain covers a second triangular area, and one side of the second triangular area intersects with the edge of the other side of the conveying path and is perpendicular to the conveying path; the third laser forms a third laser light curtain, and the third laser light curtain covers the third triangular area; wherein the first triangular region, the second triangular region and the third triangular region at least partially overlap to form a rectangular region in combination.
Wherein the third triangular region includes a base corresponding to the conveying path, and a length of the base is less than a width of the conveying path.
Wherein the colors of the laser light curtains formed by the at least two lasers are different.
The image acquisition assembly is arranged on one side, away from the initial direction of the workpiece, of the laser light curtain, and a shooting light path of the image acquisition assembly and the surface of the conveying path form a preset angle.
Wherein the workpiece is a sole.
The workpiece detection device further comprises a gluing mechanism, and the controller is further used for sending a gluing instruction to the gluing mechanism when the sole is detected, so that the gluing mechanism can glue the sole.
Another technical scheme adopted by the application is as follows: there is provided a workpiece inspecting method applied to the workpiece inspecting apparatus as described above, the method comprising: acquiring a detection image; wherein the detection image at least comprises a light spot; and detecting and confirming the change of the light spots in the detection image to determine that the workpiece is detected.
Wherein, detect and confirm that the facula in the detection image changes, include: carrying out binarization processing on the detection image; carrying out contour extraction on the detection image after binarization processing to obtain a light spot graph; and detecting and confirming that the light spot pattern is not a straight line so as to determine that the laser pattern changes.
Wherein, detect and confirm that the facula figure is not the straight line, include: performing linear fitting on the boundary of the light spot graph to obtain a fitting error; and detecting and confirming that the fitting error is larger than a set error threshold value so as to determine that the light spot pattern is not a straight line.
Wherein, detect and confirm that the facula in the detection image changes, include: extracting the pixel value of each pixel in the light spot graph in the detection image; counting the number of pixels meeting the requirement of a preset pixel value; and detecting and confirming that the number of pixels is greater than a set number threshold value to determine that the light spot pattern changes.
The method for extracting the pixel value of each pixel in the light spot pattern in the detection image comprises the following steps: extracting the RGB value of each pixel in a light spot pattern in a detection image; converting the extracted RGB value into HSV value; counting the number of pixels meeting the requirement of a preset pixel value, wherein the counting comprises the following steps: and counting the number of pixels meeting the preset HSV value requirement.
The application provides a work piece detection device includes: the light source assembly is used for forming a light curtain in the workpiece conveying path, and the light curtain forms light spots on the surface of the conveying path; the image acquisition assembly is used for photographing the light spots to obtain a detection image; and the controller is connected with the image acquisition assembly and is used for detecting and confirming that the light spots in the detection image are changed so as to confirm that the workpiece is detected. By means of the mode, the light curtain is used for forming the light spots on the conveying path, the workpiece in the space area covered by the light curtain can be detected, compared with the existing detection of the area of one line, the detection of the workpiece in the irregular shape can be achieved, the situation of false detection is reduced, and the detection precision is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts. Wherein:
FIG. 1 is a schematic side view of a workpiece inspection device according to a first embodiment of the present disclosure;
FIG. 2 is a schematic front view of a workpiece inspection device according to a first embodiment of the present disclosure;
FIG. 3 is a perspective view of a light source module and a transmission path;
FIG. 4 is a schematic view of an application scenario in which the sole moves on a conveyance path;
FIG. 5 is a schematic structural diagram of a second embodiment of a workpiece detection apparatus provided in the present application;
FIG. 6 is a schematic structural diagram of a third embodiment of a workpiece detection apparatus provided in the present application;
FIG. 7 is a schematic flow chart diagram illustrating an embodiment of a workpiece inspection method provided herein;
FIG. 8 is a schematic flow chart of step 72 of FIG. 7;
FIG. 9 is a schematic diagram of a three-color laser light curtain mixing provided by the present application;
FIG. 10 is another schematic flow chart of step 72 of FIG. 7;
FIG. 11 is a schematic flow chart diagram illustrating an embodiment of a method for detecting a sole of a shoe according to the present application;
FIG. 12 is a schematic structural diagram of an embodiment of a computer-readable storage medium provided in the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. It is to be understood that the specific embodiments described herein are merely illustrative of the application and are not limiting of the application. It should be further noted that, for the convenience of description, only some of the structures related to the present application are shown in the drawings, not all of the structures. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first", "second", etc. in this application are used to distinguish between different objects and not to describe a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
Referring to fig. 1 and 2, fig. 1 is a schematic side view of a first embodiment of a workpiece inspection apparatus provided in the present application, and fig. 2 is a schematic front view of the first embodiment of the workpiece inspection apparatus provided in the present application, wherein the inspection apparatus 100 includes a light source assembly 10, an image capturing assembly 20, and a controller 30.
The light source assembly 10 is configured to form a light curtain in the conveying path 300 of the workpiece 200, where the light curtain forms a light spot on the surface of the conveying path 300; the image acquisition component 20 is used for photographing the light spots to obtain a detection image; the controller 30 is connected to the image capturing assembly 20 for detecting and confirming the change of the light spot in the detected image to confirm the detection of the workpiece 200.
Alternatively, as shown in fig. 3, fig. 3 is a perspective view of the light source module and the transmission path, and the light source module 10 may include a laser, and the laser forms a triangular laser light curtain. It is understood that the light emitting direction of the laser is perpendicular to the transmission path 300, and the triangular light curtain forms a line on the transmission path 300, which is perpendicular to the extending direction of the transmission path.
It is noted that in this embodiment, the light curtain covers at least the largest cross-section of the workpiece 200 as it passes through. It is understood that, since the present embodiment mainly detects whether there is a workpiece by detecting whether the shape of the light spot formed on the conveying path 300 by the light source assembly 10 is changed, it can be understood that the light spot formed is not blocked when there is no workpiece passing through, and remains unchanged. When a workpiece passes through the light curtain, the light curtain is at least partially shielded, so that light spots formed on the conveying path 300 by the light curtain are deformed, and the workpiece is detected.
In a specific application scenario, the method can be applied to detection of the sole. Fig. 4 is a schematic view of an application scenario in which the sole moves on the conveying path, as shown in fig. 4. It will be appreciated that in some particular soles, such as sports shoes and high heels, the bottom surface is not flat, and in particular the front part of the sole, may be upturned. If the infrared light sensor is used for detecting, if infrared light passes through the sole, the sole cannot be detected, and false detection is caused.
Further, the image capturing assembly 20 of the present embodiment may be a common camera, and is configured to photograph the light spot, and further acquire the detection image. In other embodiments, if a colored light source is used for the light source assembly 10, a color camera may be used for the camera. The image acquisition assembly 20 is disposed on a side of the laser light curtain away from the initial direction of the workpiece, and a shooting light path of the image acquisition assembly 20 forms a preset angle with the surface of the transmission path. It should be noted that the shooting range of the camera needs to cover at least the spot area, and taking laser as an example, the shooting range of the camera covers at least the corresponding linear area below the laser.
Further, the controller 30 is configured to perform image processing on the detection image after acquiring the detection image, so as to determine whether the light spot changes. In an embodiment, a light spot image when no workpiece passes through, that is, a complete standard image, may be obtained in advance, then a new light spot image obtained in real time is compared with the standard image, when the similarity is greater than a set threshold, it is determined that the two images are consistent and the light spot is not changed, and when the similarity is less than the set threshold, it is determined that the two images are inconsistent and the light spot is changed and the workpiece passes through.
Different from the prior art, the workpiece detection apparatus provided in this embodiment includes: the light source assembly is used for forming a light curtain in the workpiece conveying path, and the light curtain forms light spots on the surface of the conveying path; the image acquisition assembly is used for photographing the light spots to obtain a detection image; and the controller is connected with the image acquisition assembly and is used for detecting and confirming that the light spots in the detection image are changed so as to confirm that the workpiece is detected. By means of the mode, the light curtain is used for forming the light spots on the conveying path, the workpiece in the space area covered by the light curtain can be detected, compared with the existing detection of the area of one line, the detection of the workpiece in the irregular shape can be achieved, the situation of false detection is reduced, and the detection precision is improved.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a second embodiment of the workpiece detection apparatus provided in the present application, and unlike the above embodiments, a light source assembly in the present embodiment includes a first laser 11 and a second laser 12.
Wherein, the first laser 11 forms a first laser light curtain, the first laser light curtain covers a first triangular area, one side of the first triangular area intersects with one side edge of the conveying path and is perpendicular to the conveying path, and the other side of the first triangular area intersects with the other side edge of the conveying path; the second laser 12 forms a second laser light curtain covering a second triangular area, one side of which intersects with the other side edge of the conveying path and is perpendicular to the conveying path, and the other side of which intersects with the one side edge of the conveying path. As shown in fig. 5, the light curtain intersection region formed by the first laser 11 and the second laser 12 covers at least a rectangular region having a length of one side and a height of H1 with respect to the width L of the conveying path.
It will be appreciated that, with the arrangement described above, if a workpiece passes through any point within the rectangular region of L × H1, the spot formed on the transport path will change, confirming that the workpiece has been detected.
Referring to fig. 6, fig. 6 is a schematic structural diagram of a third embodiment of the workpiece detection apparatus provided in the present application, and unlike the above embodiments, the light source assembly in the present embodiment includes a first laser 11, a second laser 12, and a third laser 13.
Wherein, the first laser 11 forms a first laser light curtain, the first laser light curtain covers a first triangular area, one side of the first triangular area intersects with one side edge of the conveying path and is perpendicular to the conveying path, and the other side of the first triangular area intersects with the other side edge of the conveying path; the second laser 12 forms a second laser light curtain, the second laser light curtain covers a second triangular area, one side of the second triangular area intersects with the other side edge of the conveying path and is perpendicular to the conveying path, and the other side of the second triangular area intersects with one side edge of the conveying path; the third laser 13 forms a third laser light curtain covering a third triangular area. As shown in fig. 6, the light curtain intersection region formed by the first laser 11, the second laser 12, and the third laser covers at least a rectangular region having a length of one side of the width L of the conveyance path and a height of H2. Compared with the second embodiment, the spatial range capable of detection is larger due to the fact that H2 is larger than H1 as a result of adding one laser.
It will be appreciated that, with the arrangement described above, if a workpiece passes through any point within the rectangular region of L × H2, the spot formed on the transport path will change, confirming that the workpiece has been detected.
Optionally, in an embodiment, the third triangular region includes a base corresponding to the conveying path, and a length of the base is smaller than a width of the conveying path. Then, three different light spots are formed on the transmission path by the three lasers, which are respectively as follows from left to right: a spot formed by the first laser 11, a mixed spot formed by the first laser 11, the second laser 12, the third laser 13, and a spot formed by the second laser 12. Then, the three lasers can be set to different colors, and three sections of light spots with different colors are formed on the conveying path through color mixing, so that the area where the workpiece is located can be further detected. This scheme will be described in the following examples and will not be described in detail here.
Referring to fig. 7, fig. 7 is a schematic flowchart illustrating an embodiment of a workpiece inspection method provided in the present application, the method including:
step 71: acquiring a detection image; wherein the detection image comprises at least a spot of light.
Wherein, the detection image is obtained by shooting by a camera.
Step 72: and detecting and confirming the change of the light spots in the detection image to determine that the workpiece is detected.
In conjunction with the above-mentioned embodiment of fig. 6, the laser light curtains of the three lasers form a straight line on the conveying path, as shown in fig. 8, fig. 8 is a schematic flow chart of step 72 in fig. 7, and step 72 may specifically include:
step 721: and carrying out binarization processing on the detected image.
Because the gray value of the light spot area is generally larger than that of other areas, during the binarization processing, a proper gray value can be selected, all pixels smaller than the set gray value are defined as gray values 0, and all pixels larger than the set gray value are defined as gray values 255, so that the light spot in the image after the binarization processing is a white area, and non-light spot areas are all black.
Step 722: and carrying out contour extraction on the detection image after binarization processing to obtain a light spot pattern.
Because the previous step is carried out with binarization processing, the contour extraction in the step is easier, and only the pixels with the gray value of 255 need to be reserved and the pixels with the gray value of 0 need to be removed.
Step 723: and detecting and confirming that the light spot pattern is not a straight line so as to determine that the laser pattern changes.
As can be known from fig. 3, the light spot formed on the transmission path by the laser is a straight line, and when the laser light curtain is broken, the straight line light spot is also broken, so that in this embodiment, it is only necessary to detect whether the light spot is a straight line.
Optionally, performing linear fitting on the boundary of the light spot graph to obtain a fitting error; and detecting and confirming that the fitting error is larger than a set error threshold value so as to determine that the light spot pattern is not a straight line.
The following examples illustrate:
assuming that the fitted straight line is x ═ a · t + b, the error from all points to the straight line x ═ a · t + b should be minimal, i.e. when (a, b) takes what value, respectively, the value (error) of this equation is minimal, as follows:
Figure BDA0002877586190000081
the parametric solution of this equation is given directly:
Figure BDA0002877586190000082
Figure BDA0002877586190000083
wherein the content of the first and second substances,
Figure BDA0002877586190000084
after substitution arrangement, the following can be obtained:
Figure BDA0002877586190000091
Figure BDA0002877586190000092
error:
point set (x)tT), t is 0,1,.., the fitting error of N-1 to the straight line x is:
|a·t+b-xt|
|a·t+b-xt|
thus, in the manner described above, only the fitting error | a · t + b-x needs to be determinedtAnd if the | is larger than the set error threshold, determining that the light spot graph is not a straight line, and if not, determining that the light spot graph is a straight line.
In addition, in another embodiment, the three lasers have different colors, for example, the first laser 11 is red, the second laser 12 is blue, and the third laser 13 is green, so as shown in fig. 9, fig. 9 is a schematic diagram of mixing the three-color laser light curtains provided by the present application. The laser lines intersect on the conveying path to form a straight line from A to D, and then a line segment AB on the straight line is red, a line segment BC is white, and a line segment CD is blue.
(1) If some part of the workpiece is contacted with the 1 area on the light curtain, some part of the red line segment between the AB is abnormal;
(2) if some part of the workpiece is contacted with the 8 area on the light curtain, some part of the blue line segment between the CDs is abnormal;
(3) if some portion of the workpiece contacts the 234567 area of the light curtain; then there are some anomalies in the white line segment between BC.
In another embodiment, as shown in fig. 10, fig. 10 is another schematic flow chart of step 72 in fig. 7, and step 72 may further include:
step 726: and extracting the pixel value of each pixel in the light spot pattern in the detection image.
In order to facilitate statistics, in this embodiment, the RGB values of the pixels are converted into HSV values. HSV (Hue, Saturation, Value) is a color space created by a.r. smith in 1978, also known as the hexagonal cone Model (hexcon Model), based on the intuitive nature of color. The parameters of the colors in this model are: hue (H), saturation (S), lightness (V).
Firstly, defining RGB color space parameters:
Figure BDA0002877586190000101
Figure BDA0002877586190000102
Figure BDA0002877586190000103
Cmax=max(R',G',B')
Cmin=min(R',G',B')
Δ=Cmax-Cmin
calculating H:
Figure BDA0002877586190000104
calculating S:
Figure BDA0002877586190000105
and calculating V:
V=Cmax
step 727: and counting the number of pixels meeting the requirement of the preset pixel value.
Step 728: and detecting and confirming that the number of pixels is greater than a set number threshold value to determine that the light spot pattern changes.
Specifically, if the number of non-white pixel points is greater than the set threshold number, it is determined that an abnormality occurs, the non-white pixel points are abnormal, and similarly, if the number of AB segment non-red pixel points is greater than the set threshold, it is determined that the abnormality occurs, and if the number of CD segment non-blue pixel points is greater than the set threshold, it is determined that the abnormality occurs.
Different from the prior art, the workpiece detection method provided by the embodiment includes: acquiring a detection image; wherein the detection image at least comprises a light spot; and detecting and confirming the change of the light spots in the detection image to determine that the workpiece is detected. By means of the mode, the light curtain is used for forming the light spots on the conveying path, the workpiece in the space area covered by the light curtain can be detected, compared with the existing detection of the area of one line, the detection of the workpiece in the irregular shape can be achieved, the situation of false detection is reduced, and the detection precision is improved.
Further, in one embodiment, a rectangular effective coverage area is formed by combining a plurality of lasers, detection can be achieved for any position of the irregular workpiece in the rectangular area, and detection applicability of the irregular workpiece to various shapes is improved.
Referring to fig. 11, fig. 11 is a schematic flow chart of an embodiment of a sole detection method provided in the present application, the method including:
step 111: acquiring a detection image; wherein the detection image comprises at least a spot of light.
Wherein, the detection image is obtained by shooting by a camera.
Step 112: and detecting and confirming that the light spots in the detection image change so as to confirm that the sole is detected.
In conjunction with the above embodiment of fig. 1, in the factory assembly line, the shoe sole follows the conveyor belt (i.e., the conveying path 200), and the detection trigger is needed between the processes, that is, before starting one process, the detection trigger is needed to start when the shoe sole is detected. Taking the gluing as an example, when the sole is detected, the sole gluing operation is triggered to start, so that the sole gluing operation precision can be ensured.
In conjunction with the above embodiment of fig. 6, the laser light curtains of the three lasers form a straight line on the conveying path, and step 112 may specifically include:
step 112a 1: and carrying out binarization processing on the detected image.
Because the gray value of the light spot area is generally larger than that of other areas, during the binarization processing, a proper gray value can be selected, all pixels smaller than the set gray value are defined as gray values 0, and all pixels larger than the set gray value are defined as gray values 255, so that the light spot in the image after the binarization processing is a white area, and non-light spot areas are all black.
Step 112a 2: and carrying out contour extraction on the detection image after binarization processing to obtain a light spot pattern.
Because the previous step is carried out with binarization processing, the contour extraction in the step is easier, and only the pixels with the gray value of 255 need to be reserved and the pixels with the gray value of 0 need to be removed.
Step 112a 3: and detecting and confirming that the light spot pattern is not a straight line so as to determine that the laser pattern changes.
As can be known from fig. 3, the light spot formed on the transmission path by the laser is a straight line, and when the laser light curtain is broken, the straight line light spot is also broken, so that in this embodiment, it is only necessary to detect whether the light spot is a straight line.
Optionally, performing linear fitting on the boundary of the light spot graph to obtain a fitting error; and detecting and confirming that the fitting error is larger than a set error threshold value so as to determine that the light spot pattern is not a straight line. Reference may be made to the above-described embodiments for the line fitting method, which are not described in detail here.
In addition, in another embodiment, the three lasers have different colors, for example, the first laser 11 is red, the second laser 12 is blue, and the third laser 13 is green, so as shown in fig. 9, fig. 9 is a schematic diagram of mixing the three-color laser light curtains provided by the present application. The laser lines intersect on the conveying path to form a straight line from A to D, and then a line segment AB on the straight line is red, a line segment BC is white, and a line segment CD is blue.
(1) If some part of the sole touches the 1 area on the light curtain, some part of the red line segment between AB is abnormal;
(2) if some part of the sole touches 8 areas on the light curtain, some parts of blue line segments between CDs are abnormal;
(3) if some part of the sole touches the 234567 area on the light curtain; then there are some anomalies in the white line segment between BC.
In another embodiment, step 112 may further include:
step 112b 1: and extracting the pixel value of each pixel in the light spot pattern in the detection image.
In order to facilitate statistics, in this embodiment, the RGB values of the pixels are converted into HSV values. HSV (Hue, Saturation, Value) is a color space created by a.r. smith in 1978, also known as the hexagonal cone Model (hexcon Model), based on the intuitive nature of color. The parameters of the colors in this model are: hue (H), saturation (S), lightness (V).
Step 112b 2: and counting the number of pixels meeting the requirement of the preset pixel value.
Step 112b 3: and detecting and confirming that the number of pixels is greater than a set number threshold value to determine that the light spot pattern changes.
Specifically, if the number of non-white pixel points is greater than the set threshold number, it is determined that an abnormality occurs, the non-white pixel points are abnormal, and similarly, if the number of AB segment non-red pixel points is greater than the set threshold, it is determined that the abnormality occurs, and if the number of CD segment non-blue pixel points is greater than the set threshold, it is determined that the abnormality occurs.
In addition, the corresponding position of the conveying path is further provided with a gluing mechanism, the gluing mechanism is connected with a controller, and the controller is further used for sending a gluing instruction to the gluing mechanism when the sole is detected, so that the gluing mechanism can carry out gluing operation on the sole.
Specifically, the rubber coating mechanism can include camera, manipulator and rubber coating shower nozzle, and the camera is used for acquireing the sole image, and the manipulator snatchs the rubber coating shower nozzle and is used for carrying out the rubber coating operation to the sole. Further, the controller is connected with the camera, the manipulator and the gluing nozzle and used for determining the sole outline and the sole type according to the sole image, further determining a gluing track according to the sole outline and determining gluing parameters according to the sole type; and then controlling the manipulator to move according to the gluing track and controlling the gluing nozzle to discharge glue according to the gluing parameters.
Wherein the sole contour extraction may include:
(1) an initial image having an image of the sole is acquired. Wherein, the initial image is an image directly obtained by photographing with a camera.
(2) A sole region in the initial image is determined.
Taking an R-CNN network as an example, the R-CNN uses the idea of sliding windows for reference, and adopts a scheme of identifying regions, which specifically comprises the following steps:
1. inputting an initial image, and extracting a plurality of (for example, 2000) candidate regions (possible target regions) with independent categories from the initial image through a specified algorithm;
in general, the candidate area is a rectangular frame, and the size of the candidate area may be set according to the size of the initial image or may be customized.
2. Obtaining a feature vector for each candidate region by using a convolutional neural network;
3. for the feature Vector corresponding to each candidate region, classification is performed by using a Support Vector Machine (SVM), and the size of the target bounding box is adjusted by a bounding box regression.
(3) And extracting the sole region from the initial image to obtain a sole image of the sole to be coated with glue.
The gluing parameters can include the shrinkage distance of a gluing nozzle, the inclination angle of the gluing nozzle and the gluing amount.
Wherein, the shrinking distance of the gluing nozzle refers to the distance between the gluing track and the outline of the sole. It will be understood that, since the glue is applied along the glue application path, the glue is formed with a certain width on the sole, so as to avoid the glue from overflowing, or from overflowing under external pressure, it is necessary to ensure a certain shrinkage distance between the glue application path and the sole profile. Therefore, when the gluing operation is performed, a gluing track needs to be arranged at a position with a certain shrinkage distance from the outline of the sole, and the gluing nozzle performs the gluing operation along the gluing track.
The inclination angle of the gluing nozzle refers to an included angle between the glue outlet direction of the gluing nozzle and the gravity direction. It will be appreciated that since the sole surface is generally irregular (non-horizontal), uneven application of glue may occur for irregular soles if the direction of the glue is maintained constant at all times. Therefore, when the gluing operation is performed, the inclination angle of the gluing nozzle needs to be adjusted corresponding to the fluctuation of the sole plane.
The coating amount refers to the coating volume per unit distance, and the unit is generally milliliter per centimeter (ml/cm). The glue application amount is generally determined by the glue discharging speed of the glue application nozzle and the moving speed of the glue application nozzle.
For the contraction distance, since the edge portion of the sole of the sports shoe is warped upward, particularly significantly in the forefoot and heel portions, the height of the sole edge (the height of the sole surface with respect to the reference plane) is significantly greater than the height of the middle portion of the sole; while the height of the heel portion of a high-heeled shoe is significantly greater than the forefoot portion, the edge portions and the middle portion are of the same height when the forefoot and heel portions are viewed. Therefore, the contraction distance of the gluing nozzle corresponding to the sports shoe is larger than that of the gluing nozzle corresponding to the high-heeled shoe.
For the inclination angle, because the edge of the sole of the sports shoe is upwarped, when gluing, the glue body (after being extruded) is also required to cover the inner side of the upwarped part, so the inclination angle of the gluing nozzle is further increased on the premise of increasing the contraction distance, and the glue body is enabled to cover the inner side of the upwarped part of the edge as much as possible. For the high-heeled shoes, the inclined plane is formed between the front part and the rear heel part, so that the inclination angle of the glue spraying nozzle is slightly adjusted during glue coating. Therefore, the inclination angle of the gluing nozzle corresponding to the high-heeled shoes is larger than that of the gluing nozzle corresponding to the high-heeled shoes.
For the amount of glue applied, a matching amount of glue can be set for each type of sole, according to standards or specifications common in the industry.
Of course, in other embodiments, the corresponding shrinking distance d of the glue nozzle, the inclination angle a of the glue nozzle, and the glue application amount m may be set according to specific parameters of the sports shoe and the high-heeled shoe.
Different from the prior art, the workpiece detection method provided by the embodiment includes: acquiring a detection image; wherein the detection image at least comprises a light spot; and detecting and confirming that the light spots in the detection image change so as to confirm that the sole is detected. Through the mode, the light curtain is utilized to form the light spots on the conveying path, the sole in the space area covered by the light curtain can be detected, and compared with the existing detection on the area of one line, the detection on the sole (the sole upwarps and floats) in the irregular shape can be realized, so that the false detection condition is reduced, and the detection precision is improved.
Referring to fig. 12, fig. 12 is a schematic structural diagram of an embodiment of a computer-readable storage medium 120 provided in the present application, where the computer-readable storage medium 120 stores program data 121, and the program data 121, when executed by a controller, is configured to implement the following methods:
acquiring a detection image; wherein the detection image at least comprises a light spot; and detecting and confirming the change of the light spots in the detection image to determine that the workpiece is detected.
Optionally, the following may be specifically mentioned: carrying out binarization processing on the detection image; carrying out contour extraction on the detection image after binarization processing to obtain a light spot graph; and detecting and confirming that the light spot pattern is not a straight line so as to determine that the laser pattern changes.
Optionally, the following may be specifically mentioned: extracting the pixel value of each pixel in the light spot graph in the detection image; counting the number of pixels meeting the requirement of a preset pixel value; and detecting and confirming that the number of pixels is greater than a set number threshold value to determine that the light spot pattern changes.
In the several embodiments provided in the present application, it should be understood that the disclosed method and apparatus may be implemented in other manners. For example, the above-described device embodiments are merely illustrative, and for example, the division of the modules or units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The above description is only for the purpose of illustrating embodiments of the present application and is not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made according to the content of the present specification and the accompanying drawings, or which are directly or indirectly applied to other related technical fields, are also included in the scope of the present application.

Claims (16)

1. A workpiece inspection apparatus, the inspection apparatus comprising:
the light source assembly is used for forming a light curtain in a workpiece conveying path, and the light curtain forms light spots on the surface of the conveying path;
the image acquisition assembly is used for photographing the light spots to obtain a detection image;
and the controller is connected with the image acquisition assembly and is used for detecting and confirming that the light spots in the detection image are changed so as to determine that the workpiece is detected.
2. The workpiece inspection apparatus according to claim 1,
the light curtain covers at least the maximum cross-section of the workpiece as it passes.
3. The workpiece inspection apparatus according to claim 2,
the coverage area of the light curtain is rectangular.
4. The workpiece inspection apparatus according to claim 3,
the light source assembly comprises at least two lasers, a laser light curtain formed by each laser covers a triangular area, and the at least two triangular areas are combined to form the rectangular area.
5. The workpiece inspection apparatus according to claim 4,
the at least two lasers include:
the first laser forms a first laser light curtain, the first laser light curtain covers a first triangular area, and one edge of the first triangular area intersects with one side edge of the conveying path and is perpendicular to the conveying path;
the second laser forms a second laser light curtain, the second laser light curtain covers a second triangular area, and one side of the second triangular area intersects with the edge of the other side of the conveying path and is perpendicular to the conveying path;
a third laser to form a third laser light curtain covering a third triangular region;
wherein the first triangular region, the second triangular region, and the third triangular region at least partially overlap to form, in combination, the rectangular region.
6. The workpiece inspection apparatus according to claim 5,
the third triangular region includes a base corresponding to the conveying path, and a length of the base is smaller than a width of the conveying path.
7. The workpiece inspection apparatus according to claim 4,
the colors of the laser light curtains formed by the at least two lasers are different.
8. The workpiece inspection apparatus according to claim 1,
the image acquisition assembly is arranged on one side, away from the initial direction of the workpiece, of the laser light curtain, and a shooting light path of the image acquisition assembly and the surface of the conveying path form a preset angle.
9. The workpiece inspection apparatus according to claim 1,
the workpiece is a sole.
10. The workpiece inspection apparatus according to claim 9,
the workpiece detection device further comprises a gluing mechanism, and the controller is further used for sending a gluing instruction to the gluing mechanism when the sole is detected, so that the gluing mechanism can glue the sole.
11. A workpiece inspection method applied to the workpiece inspection apparatus according to any one of claims 1 to 10, the method comprising:
acquiring a detection image; wherein the detection image comprises at least a spot of light;
and detecting and confirming the change of the light spots in the detection image to determine that the workpiece is detected.
12. The method of claim 11,
the detecting and confirming that the light spot in the detection image changes comprises:
carrying out binarization processing on the detection image;
carrying out contour extraction on the detection image after binarization processing to obtain a light spot graph;
and detecting and confirming that the light spot pattern is not a straight line so as to determine that the laser pattern changes.
13. The method of claim 12,
the detecting and confirming that the light spot pattern is not a straight line includes:
performing linear fitting on the boundary of the light spot graph to obtain a fitting error;
and detecting and confirming that the fitting error is larger than a set error threshold value so as to determine that the light spot graph is not a straight line.
14. The method of claim 11,
the detecting and confirming that the light spot in the detection image changes comprises:
extracting a pixel value of each pixel in the light spot graph in the detection image;
counting the number of pixels meeting the requirement of a preset pixel value;
and detecting and confirming that the number of the pixels is larger than a set number threshold value so as to determine that the light spot pattern changes.
15. The method of claim 14,
the extracting a pixel value of each pixel in the light spot pattern in the detection image includes:
extracting the RGB value of each pixel in the light spot pattern in the detection image;
converting the extracted RGB values into HSV values;
the counting of the number of pixels meeting the requirement of a preset pixel value comprises the following steps:
and counting the number of pixels meeting the preset HSV value requirement.
16. A computer-readable storage medium, in which program data are stored, which program data, when executed by a controller, are adapted to carry out the method according to any one of claims 11-15.
CN202011626466.4A 2020-12-31 2020-12-31 Workpiece detection device, detection method, and computer-readable storage medium Pending CN112859189A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011626466.4A CN112859189A (en) 2020-12-31 2020-12-31 Workpiece detection device, detection method, and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011626466.4A CN112859189A (en) 2020-12-31 2020-12-31 Workpiece detection device, detection method, and computer-readable storage medium

Publications (1)

Publication Number Publication Date
CN112859189A true CN112859189A (en) 2021-05-28

Family

ID=75999504

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011626466.4A Pending CN112859189A (en) 2020-12-31 2020-12-31 Workpiece detection device, detection method, and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN112859189A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115082463A (en) * 2022-08-22 2022-09-20 聊城市宁泰电机有限公司 Generator end cover visual detection method based on image data
CN116051563A (en) * 2023-03-31 2023-05-02 深圳市美亚迪光电有限公司 Detection device for detecting surface flatness of lamp panel of GOB surface sealing technology

Citations (27)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4855608A (en) * 1987-06-12 1989-08-08 Peterson Ii William D Laser curtain having an array of parabolic mirrors each focusing radiation on a corresponding detector positioned in mirror's focal point
JP2001281166A (en) * 2000-03-30 2001-10-10 Dainippon Screen Mfg Co Ltd Method and device for inspecting defect in cyclic pattern
JP2003322516A (en) * 2002-04-30 2003-11-14 Ricoh Co Ltd Shape measuring method and shape measuring device
CN1743836A (en) * 2005-08-23 2006-03-08 北京华力兴科技发展有限责任公司 Safety inspection system for roll-on/roll-off transport vehicle
CN2888442Y (en) * 2005-08-23 2007-04-11 北京华力兴科技发展有限责任公司 Safety check-up system for roll on/roll off transportation vehicle
US20090207419A1 (en) * 2007-12-04 2009-08-20 Yi-Yuh Hwang Large areas undistorted imaging apparatus for light speckles and method thereof
DE102008016766A1 (en) * 2008-04-02 2009-11-19 Sick Ag Optoelectronic sensor e.g. charge coupled device sensor, for detecting object in monitoring region, has controller spectrally modifying lighting condition when contrast of image data is evaluated as reliable object recognition
CN101784227A (en) * 2007-07-06 2010-07-21 工业研究有限公司 laser speckle imaging systems and methods
JP2010237167A (en) * 2009-03-31 2010-10-21 Sunx Ltd Photoelectric sensor
JP2011215122A (en) * 2010-03-17 2011-10-27 Kyokko Denki Kk Object detector
CN102460064A (en) * 2009-05-13 2012-05-16 乔治城铁路设备公司 System and method for inspecting surfaces using optical wavelength filtering
CN104034734A (en) * 2014-06-25 2014-09-10 深圳市云特科技有限公司 Windlass steel cable detection device and method
JP2014169993A (en) * 2013-02-07 2014-09-18 Sumitomo Electric Ind Ltd Person detection device, person movement determination system, unit bath, toilet unit and bed
US20140267702A1 (en) * 2013-03-15 2014-09-18 Siemens Healthcare Diagnostics Inc. Optical metrology by light beam analysis
WO2016208626A1 (en) * 2015-06-25 2016-12-29 Jfeスチール株式会社 Surface flaw detection method, surface flaw detection device, and manufacturing method for steel material
CN106442556A (en) * 2016-11-16 2017-02-22 哈尔滨理工大学 Device and method for detecting surface defects of perforated plate workpiece
CN106840003A (en) * 2017-02-27 2017-06-13 宁德时代新能源科技股份有限公司 Detection device
CN106871805A (en) * 2017-02-16 2017-06-20 石家庄铁道大学 vehicle-mounted rail gauge measuring system and measuring method
WO2018038731A1 (en) * 2016-08-25 2018-03-01 Spectra Systems Corporation Optically based banknote authentication system having broke discrimination
CN109000580A (en) * 2018-09-29 2018-12-14 北京信息科技大学 A kind of strain measurement method and device
US20190340750A1 (en) * 2018-05-02 2019-11-07 Toyo Tire Corporation Inspection method for side plate of tire mold
CN110596126A (en) * 2018-05-25 2019-12-20 上海翌视信息技术有限公司 Sheet glass edge flaw detection method based on image acquisition
CN111354038A (en) * 2018-12-21 2020-06-30 广东美的白色家电技术创新中心有限公司 Anchor object detection method and device, electronic equipment and storage medium
CN111862195A (en) * 2020-08-26 2020-10-30 Oppo广东移动通信有限公司 Light spot detection method and device, terminal and storage medium
CN111928944A (en) * 2020-08-18 2020-11-13 深圳市汇投智控科技有限公司 Laser ray detection method, device and system
CN111998774A (en) * 2020-08-12 2020-11-27 中车青岛四方机车车辆股份有限公司 Rapid detection method for shape and position size of part
EP3754244A1 (en) * 2019-06-21 2020-12-23 Wilhelm Bahmüller Maschinenbau-Präzisionswerkzeuge GmbH Device and method for monitoring a hazardous area

Patent Citations (27)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4855608A (en) * 1987-06-12 1989-08-08 Peterson Ii William D Laser curtain having an array of parabolic mirrors each focusing radiation on a corresponding detector positioned in mirror's focal point
JP2001281166A (en) * 2000-03-30 2001-10-10 Dainippon Screen Mfg Co Ltd Method and device for inspecting defect in cyclic pattern
JP2003322516A (en) * 2002-04-30 2003-11-14 Ricoh Co Ltd Shape measuring method and shape measuring device
CN1743836A (en) * 2005-08-23 2006-03-08 北京华力兴科技发展有限责任公司 Safety inspection system for roll-on/roll-off transport vehicle
CN2888442Y (en) * 2005-08-23 2007-04-11 北京华力兴科技发展有限责任公司 Safety check-up system for roll on/roll off transportation vehicle
CN101784227A (en) * 2007-07-06 2010-07-21 工业研究有限公司 laser speckle imaging systems and methods
US20090207419A1 (en) * 2007-12-04 2009-08-20 Yi-Yuh Hwang Large areas undistorted imaging apparatus for light speckles and method thereof
DE102008016766A1 (en) * 2008-04-02 2009-11-19 Sick Ag Optoelectronic sensor e.g. charge coupled device sensor, for detecting object in monitoring region, has controller spectrally modifying lighting condition when contrast of image data is evaluated as reliable object recognition
JP2010237167A (en) * 2009-03-31 2010-10-21 Sunx Ltd Photoelectric sensor
CN102460064A (en) * 2009-05-13 2012-05-16 乔治城铁路设备公司 System and method for inspecting surfaces using optical wavelength filtering
JP2011215122A (en) * 2010-03-17 2011-10-27 Kyokko Denki Kk Object detector
JP2014169993A (en) * 2013-02-07 2014-09-18 Sumitomo Electric Ind Ltd Person detection device, person movement determination system, unit bath, toilet unit and bed
US20140267702A1 (en) * 2013-03-15 2014-09-18 Siemens Healthcare Diagnostics Inc. Optical metrology by light beam analysis
CN104034734A (en) * 2014-06-25 2014-09-10 深圳市云特科技有限公司 Windlass steel cable detection device and method
WO2016208626A1 (en) * 2015-06-25 2016-12-29 Jfeスチール株式会社 Surface flaw detection method, surface flaw detection device, and manufacturing method for steel material
WO2018038731A1 (en) * 2016-08-25 2018-03-01 Spectra Systems Corporation Optically based banknote authentication system having broke discrimination
CN106442556A (en) * 2016-11-16 2017-02-22 哈尔滨理工大学 Device and method for detecting surface defects of perforated plate workpiece
CN106871805A (en) * 2017-02-16 2017-06-20 石家庄铁道大学 vehicle-mounted rail gauge measuring system and measuring method
CN106840003A (en) * 2017-02-27 2017-06-13 宁德时代新能源科技股份有限公司 Detection device
US20190340750A1 (en) * 2018-05-02 2019-11-07 Toyo Tire Corporation Inspection method for side plate of tire mold
CN110596126A (en) * 2018-05-25 2019-12-20 上海翌视信息技术有限公司 Sheet glass edge flaw detection method based on image acquisition
CN109000580A (en) * 2018-09-29 2018-12-14 北京信息科技大学 A kind of strain measurement method and device
CN111354038A (en) * 2018-12-21 2020-06-30 广东美的白色家电技术创新中心有限公司 Anchor object detection method and device, electronic equipment and storage medium
EP3754244A1 (en) * 2019-06-21 2020-12-23 Wilhelm Bahmüller Maschinenbau-Präzisionswerkzeuge GmbH Device and method for monitoring a hazardous area
CN111998774A (en) * 2020-08-12 2020-11-27 中车青岛四方机车车辆股份有限公司 Rapid detection method for shape and position size of part
CN111928944A (en) * 2020-08-18 2020-11-13 深圳市汇投智控科技有限公司 Laser ray detection method, device and system
CN111862195A (en) * 2020-08-26 2020-10-30 Oppo广东移动通信有限公司 Light spot detection method and device, terminal and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
刘吉 等: "基于矩形激光光幕的射击精度光电检测系统", 《光电子·激光》, vol. 22, no. 05, 31 May 2011 (2011-05-31), pages 748 - 752 *
李繁 等: "曲面叶片三维工作变形连续扫描激光测试", 航空动力学报, no. 12, 17 December 2018 (2018-12-17), pages 182 - 189 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115082463A (en) * 2022-08-22 2022-09-20 聊城市宁泰电机有限公司 Generator end cover visual detection method based on image data
CN116051563A (en) * 2023-03-31 2023-05-02 深圳市美亚迪光电有限公司 Detection device for detecting surface flatness of lamp panel of GOB surface sealing technology

Similar Documents

Publication Publication Date Title
CN112859189A (en) Workpiece detection device, detection method, and computer-readable storage medium
CN104680519B (en) Seven-piece puzzle recognition methods based on profile and color
US10805552B2 (en) Visual inspection device and illumination condition setting method of visual inspection device
US20070110309A1 (en) Shadow detection in images
EP1477765B1 (en) Method of detecting object of detection and device therefor, and method of inspecting object of inspection and device therefor
US7936926B2 (en) Apparatus, method, and program for face feature point detection
US20180328789A1 (en) Image Inspection Device
US11195042B2 (en) Drug inspection assistance device, drug identification device, image processing device, image processing method, and program
CN107301634A (en) A kind of robot automatic sorting method and system
US9336449B2 (en) Vehicle recognition device
US9519975B2 (en) Method of detecting edge under non-uniform lighting background
CN109916308B (en) Information acquisition method and system for shoe sole
EP3943880A1 (en) Item detection device, item detection method, and industrial vehicle
CN104392210A (en) Gesture recognition method
CN110607405A (en) Leather inner contour recognition cutting device and method based on machine vision industrial application
CN108109138B (en) Method for self-adaptive light uniformization of high-light area of mirror-like object
US11935216B2 (en) Vision inspection system and method of inspecting parts
KR101263158B1 (en) Method and apparatus for detecting vehicle
US20190227523A1 (en) Safety monitoring system, safety monitoring method and safety monitoring program
Yang et al. People tracking by integrating multiple features
JPH04137014A (en) Traveling path terminal detector for mobile vehicle
US20210090262A1 (en) Adhered substance detection apparatus
Jȩdrasiak et al. Image recognition technique for unmanned aerial vehicles
CN113686300A (en) Conveyor belt article attitude detection system and method
US20200151495A1 (en) Drug identification device, image processing device, image processing method, and program

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