CN108226165B - Method for detecting quality of capillary glass tube - Google Patents

Method for detecting quality of capillary glass tube Download PDF

Info

Publication number
CN108226165B
CN108226165B CN201711484842.9A CN201711484842A CN108226165B CN 108226165 B CN108226165 B CN 108226165B CN 201711484842 A CN201711484842 A CN 201711484842A CN 108226165 B CN108226165 B CN 108226165B
Authority
CN
China
Prior art keywords
image
capillary glass
glass tube
picture
photo
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.)
Active
Application number
CN201711484842.9A
Other languages
Chinese (zh)
Other versions
CN108226165A (en
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.)
Xingzhen Guangzhou Gene Technology Co ltd
Original Assignee
Xingzhen Guangzhou Gene Technology 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 Xingzhen Guangzhou Gene Technology Co ltd filed Critical Xingzhen Guangzhou Gene Technology Co ltd
Priority to CN201711484842.9A priority Critical patent/CN108226165B/en
Publication of CN108226165A publication Critical patent/CN108226165A/en
Application granted granted Critical
Publication of CN108226165B publication Critical patent/CN108226165B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • G01N2021/8887Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges based on image processing techniques

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Chemical & Material Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Biochemistry (AREA)
  • General Health & Medical Sciences (AREA)
  • General Physics & Mathematics (AREA)
  • Immunology (AREA)
  • Pathology (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)

Abstract

The invention relates to a method for detecting the quality of a capillary glass tube, which comprises the following steps of placing the capillary glass tube on a tube frame; closing the pipe frame and the leveling push plate, obtaining a contact part of the capillary glass pipe and the pipe frame, and marking the position of the contact part on the capillary glass pipe as a first position; taking a picture of the capillary glass tube and recording the picture as a first picture; opening the pipe frame, taking a picture and recording the picture as a second picture; respectively carrying out image correction on the first photo and the second photo; acquiring an image A of the first position in a corrected first photo, acquiring an image B of the first position in a corrected second photo, and replacing the image A of the first corrected photo with the image B to obtain a third photo; carrying out image binarization on the photo III; and comparing the result of the image binarization with a preset value. The invention accurately shoots the complete image of the capillary glass tube and then transmits the shot image to the industrial control computer to finish the quality detection of the capillary glass tube.

Description

Method for detecting quality of capillary glass tube
Technical Field
The invention relates to the field of glass tube quality detection, in particular to a capillary glass tube quality detection method.
Background
At present, the methods adopted for detecting the quality of the glass tube are various, wherein the method of direct detection by human eyes is more applied, but due to the reason of light, the defects of visual blind spots exist in the glass tube when the human eyes detect the quality of the glass tube, the human eyes can identify the defects on the glass tube only at a specific angle, the human eyes are easy to fatigue after long-time work, and the detection of bubbles and foreign matters in the glass tube cannot be accurately detected by the human eyes, so that the reliability of the detection result is not high.
In addition, the method for detecting human eyes only can be used for large glass tubes and glass tubes with common quality requirements, but cannot be used for detecting high-specification capillary glass tubes for biological experiments and optical experiments.
Disclosure of Invention
In order to solve the technical problems, the invention provides a method for detecting the quality of a capillary glass tube, which accurately shoots a complete image of the capillary glass tube and then transmits the shot image to an industrial control computer to finish the quality detection of the capillary glass tube.
In order to achieve the above object, the present invention provides a method for quality inspection of a capillary glass tube, comprising the steps of,
s010, placing the capillary glass tube on a tube frame, wherein an infrared industrial camera is arranged above the tube frame and electrically connected with an industrial control computer, a leveling push plate for adjusting the position of the capillary glass tube is arranged on the upper surface of the tube frame, the tube frame comprises a first supporting part and a second supporting part, and the first supporting part and the second supporting part can move in opposite directions or in opposite directions to realize the closing and opening of the tube frame;
s020, closing the pipe frame and the leveling push plate, obtaining a contact part of the capillary glass pipe and the pipe frame at the moment, and marking the position of the contact part on the capillary glass pipe as a first position, wherein the leveling push plate is propped against two ends of the capillary glass pipe;
s030, taking a picture of the capillary glass tube by using an industrial camera and recording the picture as a picture I;
s040, opening the pipe frame, taking a picture of the capillary glass pipe by using an industrial camera and recording the picture as a second picture;
s050, respectively correcting the images of the first photo and the second photo;
step 060, acquiring an image of the first position in the corrected first picture as an image A, acquiring an image of the first position in the corrected second picture as an image B, and replacing the image A in the corrected first picture with the image B to obtain a third picture;
s070, carrying out image binarization on the third photo;
s080, comparing the result of the image binaryzation with a preset value, and judging whether the capillary glass tube is qualified.
Preferably, the image correction in step S050 includes the steps of,
s051, loading images;
s052, preprocessing the loaded image;
s053, determining the image edge by using a function;
s054, determining an orientation fixed point according to the determined image edge;
and S055, correcting the image by using the OpenCV algorithm by taking the determined orientation fixed point as input.
Preferably, the step S052 includes white balancing the image, and adjusting the contrast and brightness of the image.
Preferably, the S053 comprises the following steps,
s053a, carrying out binarization processing on the image and obtaining a binary image;
s053b, detecting the binary image by using a canny operator and obtaining an image C;
S053C, detecting all straight lines in the image C by using a HoughLinesP function and obtaining an image D;
and S053D, drawing an edge frame according to the image D.
Preferably, the S054 comprises the following steps,
s054a, extracting intersection points among the detected straight lines, and screening the extracted intersection points;
s054b, finding out two points with the farthest distance from the screened points, using the two points as diagonal lines to form a rectangle, and using the formed rectangular area as the size of the corrected image;
s054c, acquiring four vertexes of the rectangle and marking one of the vertexes, wherein the marked vertex is used as a square point.
Preferably, the S055 comprises the steps of,
s055a, performing matrix transformation on the image by using a findHomography function to obtain a transformation matrix;
s055b, correcting the image by using a warpPerspectral function to obtain a corrected image by taking the transformation matrix as input;
and S055c, performing enhancement filtering on the corrected image by using the filter2D function to obtain a final image.
As a preferable scheme, in step S020, before closing the pipe frame and the leveling push plate, it is necessary to determine whether the industrial control computer has recorded the lens parameter of the industrial camera, and if not, the lens parameter needs to be recorded first as the correction parameter.
Preferably, the shot parameters include Canny operator threshold, contrast and brightness.
Preferably, in step S052, a gray scale world automatic white balance algorithm is used to perform white balance on the image.
According to the method for detecting the quality of the capillary glass tube, the first photo and the second photo are taken, the tube frame is closed when the first photo is taken, and the tube frame is opened when the second photo is taken, so that the contact parts of the capillary glass tube and the tube frame in the two photos are different, the image of the first position in the corrected first photo is obtained and is recorded as an image A, the image of the first position in the corrected second photo is obtained and is recorded as an image B, the image A in the corrected first photo is replaced by the image B, the third photo is obtained, the third complete image photo of the capillary glass tube is spliced, then the third photo is subjected to image binarization, the result of the image binarization is compared with a preset value, and whether the capillary glass tube is qualified or not is judged. Furthermore, the first and second pictures are corrected before the third picture is formed, so that the error of quality inspection of the capillary glass tube caused by image deformation of the shot pictures due to lens position deviation and fisheye deformation is avoided, and the consistency of the synthesized third picture and the detected capillary glass tube is improved. The method realizes the purpose of detecting the quality of the high-specification capillary glass tube for biological experiments and optical experiments.
Drawings
FIG. 1 is a flow chart of a method of the present invention;
FIG. 2 is a schematic view of the external structure of a capillary glass tube quality inspection apparatus;
FIG. 3 is a schematic structural view of a mold body;
FIG. 4 is an exploded view of the die body;
FIG. 5 is a schematic structural diagram of a driving device;
FIG. 6 is a schematic view showing the structure of a capillary glass tube when it is placed on a tube holder.
Wherein: 1. a mold body; 2. a light shield; 3. a light source; 4. an industrial camera; 5. a base; 6. a pipe frame; 7. a second cushion block; 8. an edge frame; 9. a square point; 10. a second support portion; 11. placing the capillary glass tube; 12. a first support section; 13. a PMMA plate; 14. a first cushion block; 15. a first link; 16. a second link; 17. a rectangular parallelepiped recess; 18. leveling the push plate; 19. a capillary glass tube.
Detailed Description
The following detailed description of embodiments of the present invention is provided in connection with the accompanying drawings and examples. The following examples are intended to illustrate the invention but are not intended to limit the scope of the invention.
The invention provides a method for detecting the quality of a capillary glass tube, which comprises the following steps,
s010, placing the capillary glass tube on a tube frame, wherein an infrared industrial camera is arranged above the tube frame and electrically connected with an industrial control computer, a leveling push plate for adjusting the position of the capillary glass tube is arranged on the upper surface of the tube frame, the tube frame comprises a first supporting part and a second supporting part, and the first supporting part and the second supporting part can move in opposite directions or in opposite directions to realize the closing and opening of the tube frame;
s020, closing the pipe frame and the leveling push plate, obtaining a contact part of the capillary glass pipe and the pipe frame at the moment, and marking the position of the contact part on the capillary glass pipe as a first position, wherein the leveling push plate is propped against two ends of the capillary glass pipe;
s030, taking a picture of the capillary glass tube by using an industrial camera and recording the picture as a picture I;
s040, opening the pipe frame, taking a picture of the capillary glass pipe by using an industrial camera and recording the picture as a second picture;
s050, respectively correcting the images of the first photo and the second photo;
step 060, acquiring an image of the first position in the corrected first picture as an image A, acquiring an image of the first position in the corrected second picture as an image B, and replacing the image A in the corrected first picture with the image B to obtain a third picture;
s070, carrying out image binarization on the third photo;
s080, comparing the result of the image binaryzation with a preset value, and judging whether the capillary glass tube is qualified.
According to the method for detecting the quality of the capillary glass tube, the first photo and the second photo are taken, the tube frame is closed when the first photo is taken, and the tube frame is opened when the second photo is taken, so that the contact parts of the capillary glass tube and the tube frame in the two photos are different, the image of the first position in the corrected first photo is obtained and is recorded as an image A, the image of the first position in the corrected second photo is obtained and is recorded as an image B, the image A in the corrected first photo is replaced by the image B, the third photo is obtained, the third complete image photo of the capillary glass tube is spliced, then the third photo is subjected to image binarization, the result of the image binarization is compared with a preset value, and whether the capillary glass tube is qualified or not is judged. When a camera is used for shooting a picture, because a photographer hardly ensures that the lens of the camera is completely right opposite to a to-be-shot object, the shot picture and the picture to be actually expressed have certain deformation; even if the lens can be ensured to be completely opposite to the object to be shot, the shot picture still has certain fisheye deformation because the short-focus lens is generally a spherical lens. Furthermore, the first and second pictures are corrected before the third picture is formed, so that the error of quality inspection of the capillary glass tube caused by image deformation of the shot pictures due to lens position deviation and fisheye deformation is avoided, and the consistency of the synthesized third picture and the detected capillary glass tube is improved. The method realizes the purpose of detecting the quality of the high-specification capillary glass tube for biological experiments and optical experiments.
Wherein the image correction in step S050 comprises the steps of,
s051, loading images, wherein the images loaded in the step are original images (src) of the shot photo I or the shot photo II.
S052, preprocessing the loaded image;
the specific steps include that step S052 includes white balancing the image, and adjusting the contrast and brightness of the image. The white balance is carried out on the image in the lens before the capillary glass tube is shot, different compensation modes are set according to the color temperature of light during shooting, so that the non-color cast of the image is ensured, the error caused by the fine color cast when the fine cracks on the capillary glass tube are detected is avoided, and the accuracy of the detection result is improved.
S053, determining the image edge by using a function;
the method comprises the specific steps of S053a, carrying out binarization processing on an image and obtaining a binary image, namely setting the gray value of a pixel point on the image to be 0 or 255, namely displaying an obvious black and white effect on the whole image; s053b, detecting the binary image by using a canny operator to obtain an image C, namely detecting all lines in the image by using the canny operator; S053C, detecting all straight lines in the image C by using a HoughLinesP function and obtaining an image D, namely screening straight lines in the lines detected in the step S053b by using the HoughLinesP function; and S053D, drawing an edge frame according to the image D, namely, drawing an edge frame to surround all the straight lines screened out in the step S053c in the edge frame, wherein four edges of the edge frame are determined by the outermost points of the straight lines screened out in the step S053c in the four directions of the edge frame.
S054, determining an orientation fixed point according to the determined image edge;
s054a, extracting the intersection points between the detected straight lines, and screening the extracted intersection points; s054b, finding out two points with the farthest distance from the screened points, using the two points as diagonal lines to form a rectangle, and using the formed rectangular area as the size of the corrected image; s054c, acquiring four vertexes of the rectangle and marking one of the vertexes, wherein the marked vertex is used as a square point.
And S055, correcting the image by using the OpenCV algorithm by taking the determined orientation fixed point as input.
The method specifically comprises the steps of S055a, performing matrix transformation on the image by using a findHomography function to obtain a transformation matrix; correcting the image by taking the transformation matrix as input and utilizing a warPerspectral function to obtain a corrected image; and S055c, performing enhancement filtering on the corrected image by using the filter2D function to obtain a final image. The specific process of the step is that the rectangle size determined by the four vertexes obtained in S054c is used as the size (dst.size) of the corrected image, a blank new image (dst) is created by using Mat:: zero function, the original image (src) and the new image (dst) are used as input parameters and are transmitted to a findHomography function, and a transformation matrix is obtained after processing. The original image (src), the new image (dst), the size of the corrected image (dst. size) and the transformation matrix obtained in the step S055a are used as input, and are transmitted to a warp Perspectral function, and the corrected image is obtained after processing; and (5) transmitting the corrected image obtained in the step (S055 b) into a filter2D function, and enhancing to obtain a final image (result). Through the steps, the first and second shot pictures are subjected to image correction before the third shot picture is formed, so that the error of quality inspection of the capillary glass tube caused by deformation of the shot pictures is avoided, and further, the consistency of the synthesized third shot picture and the detected capillary glass tube is improved.
In step S020, before closing the pipe frame and the leveling push plate, it is determined whether the industrial control computer has recorded the lens parameter of the industrial camera, and if not, the lens parameter needs to be recorded first as a correction parameter. The shot parameters include Canny operator threshold, contrast and brightness.
The invention also provides a capillary glass tube quality detection device as shown in fig. 2-6, which is characterized by comprising a die body 1, an industrial camera 4, an industrial control computer and a leveling push plate 18, wherein the die body 1 comprises a tube frame 6, the tube frame 6 comprises a first supporting part 12 and a second supporting part 10, the first supporting part 12 and the second supporting part 10 can move oppositely or move in opposite directions to realize the closing and opening of the tube frame 6, a lens of the industrial camera 4 is positioned above the tube frame 6, the leveling push plate 18 is arranged on the upper surface of the tube frame 6 and can slide back and forth relative to the upper surface of the tube frame 6, and the industrial control computer is electrically connected with the industrial camera 4. The process of detecting the quality of the capillary glass tube by adopting the invention is as follows: (1) placing a capillary glass tube 19 on a tube frame 6, (2) closing the tube frame 6 and the leveling push plate 18 to obtain a contact part of the capillary glass tube 19 and the tube frame 6, and marking the position of the contact part on the capillary glass tube 19 as a position I, wherein the leveling push plate 18 props against two ends of the capillary glass tube 19 to fix the capillary glass tube 19 and ensure that all the capillary glass tubes 19 are parallel and level to each other; (3) taking a picture of the capillary glass tube 19 by using the industrial camera 4 and recording the picture as a picture I; (4) the pipe frame 6 is opened, at the moment, the leveling push plate 18 is propped against the two ends of the capillary glass pipe 19, so the capillary glass pipe 19 cannot move along with the movement of the pipe frame 6, the relative position between the pipe frame 6 and the capillary glass pipe 19 is changed after the pipe frame 6 moves, the contact part of the capillary glass pipe 19 and the pipe frame 6 at the moment is obtained, the position of the contact part on the capillary glass pipe 19 is recorded as a position two, and the position two and the position are ensured to have no overlapped part when the pipe frame 6 moves; (5) then, the industrial camera 4 is used for photographing the capillary glass tube 19 and recording the photographed picture as a second picture; (6) acquiring an image of the first position in the first photo as an image A, acquiring an image of the first position in the second photo as an image B, and replacing the image A in the first photo with the image B to obtain a third photo, wherein the part of the first photo blocked by the cross beam in the third photo is replaced by the image of the corresponding position in the second photo, so that the third photo is a complete image of the capillary glass tube 19; (7) and transmitting the third photo to an industrial control computer, and comparing the image binarization result of the third photo with a preset value by the industrial control computer so as to judge whether the capillary glass tube 19 is qualified. The invention accurately shoots the complete image of the capillary glass tube 19 and then transmits the shot image to the industrial control computer to finish the quality detection of the capillary glass tube 19, and the aim of detecting the quality of the high-specification capillary glass tube 19 for biological experiments and optical experiments is fulfilled through the processes.
Further, the quality detection device for the capillary glass tube 19 provided by the invention further comprises a PMMA plate 13, a light shield 2 and a light source 3, wherein the first support part 12 can be butted with the second support part 10 to form a frame structure, a plurality of beams which are parallel to each other and not in contact with each other are arranged on the upper surface of the frame structure, and the PMMA plate 13 is arranged below the beams; light shield 2 detains and locates 1 top of mould, industry camera 4 set up in the top of light shield 2 and with the top of light shield 2 is connected, light source 3 set up in on the lateral wall of light shield 2 and the slope shine in the upper surface of pipe support 6. The PMMA plate 13 is arranged below the cross beam and used as a background plate during shooting, diffuse reflection cannot occur due to the fact that the PMMA plate 13 is mirror reflection, the light source 3 and the frame structure form an acute angle, a lens of the camera arranged above the frame structure cannot be affected by the light source 3, and imaging effect is good.
Further, light source 3 is a plurality of infrared light source, and is a plurality of infrared light source about 6 central symmetry of pipe support distributes, industry camera 4 is infrared industry camera, adopts single infrared light to compare the light that reflects off with adopting white light and can be few very much, has effectually prevented the interference of reverberation to the camera lens, has guaranteed the shooting quality. In addition, in the embodiment, the PMMA plate 13 and the light shielding cover 2 are both black, because the black optical absorption effect is good, the reflected light is further reduced. Further, the lens of the industrial camera 4 is arranged right opposite to the center of the pipe frame 6, so that the deformation of the shot picture due to oblique shooting is avoided.
Further, a driving device is connected to a side of the pipe frame 6, and the driving device can drive the first supporting portion 12 and the second supporting portion 10 to move towards each other or towards opposite directions. The lower surface of pipe support 6 is equipped with and runs through first supporting part 12 with the cuboid form recess 17 that second supporting part 10 set up, mould body 1 still includes base 5, first cushion 14 and second cushion 7, pipe support 6 set up in the upper surface of base 5, first cushion 14 with second cushion 7 all set up in cuboid form recess 17, first cushion 14 is located first supporting part 12 with between the base 5 and with base 5 fixed connection, second cushion 7 is located second supporting part 10 with between the base 5 and with base 5 fixed connection, PMMA board 13 fixed set up in first cushion 14 with the upper surface of second cushion 7. As shown in fig. 4, in this embodiment, the grooves are formed in the first cushion block 14 and the second cushion block 7, and the PMMA plate 13 is embedded in the grooves to fix the PMMA plate 13, so that the PMMA plate 13 is effectively prevented from moving along with the movement of the pipe frame 6 by fixing the PMMA plate 13, and the background is completely the same when the capillary glass tube 19 is shot for multiple times.
Further, the first support portion 12 and the second support portion 10 are connected by a link, the link is disposed between the first pad 14 and the second pad 7 and is rotatable with respect to the first support portion 12 and the second support portion 10, the link includes a first link 15 and a second link 16, and the first link 15 and the second link 16 are disposed to intersect. As shown in fig. 5, a first sliding groove and a second sliding groove are respectively formed at two end portions of the first connecting rod 15, a first sliding block corresponding to the first sliding groove is arranged on the first supporting portion 12, and the first sliding block is arranged in the first sliding groove and can rotate along with the first connecting rod 15 and slide in the first sliding groove; a second sliding block corresponding to the second sliding groove is arranged on the second supporting part 10, and the second sliding block is arranged in the second sliding groove and can slide in the second sliding groove while rotating along with the first connecting rod 15; a third sliding chute and a fourth sliding chute are respectively arranged at two end parts of the second connecting rod 16, a third sliding block corresponding to the third sliding chute is arranged on the first supporting part 12, and the third sliding block is arranged in the third sliding chute and can rotate along with the second connecting rod 16 and simultaneously slide in the third sliding chute; a fourth sliding block corresponding to the fourth sliding groove is arranged on the second supporting portion 10, and the fourth sliding block is arranged in the fourth sliding groove and can slide in the fourth sliding groove while rotating along with the second connecting rod 16. In this embodiment, the driving device is disposed at a side portion of the first supporting portion 12, the driving device is disposed to push or pull the first supporting portion 12 toward or away from the second supporting portion 10, and the first supporting portion 12 and the second supporting portion 10 are connected by a cross connecting rod, so that the first supporting portion 12 and the second supporting portion 10 can be synchronously opened or closed under the driving of the connecting rod.
As shown in fig. 4, in this embodiment, the number of the beams is 2, 2 beams are respectively defined as a first beam and a second beam, the first beam is disposed on the first support portion 12, the second beam is disposed on the second support portion 10, a plurality of capillary glass tube 19 placing locations 11 are disposed on the beams, each capillary glass tube 19 placing location 11 includes a first support location and a second support location, the first support location is disposed on an upper surface of the first beam, and the second support location is disposed on an upper surface of the second beam and aligned with the first support location. The capillary glass tube 19 can be supported by arranging 2 cross beams, so that the capillary glass tube 19 can be supported, the contact area between the cross beams and the capillary glass tube 19 can be reduced as much as possible, and the influence of the shielding of the cross beams on the quality detection result of the capillary glass tube 19 is avoided. In this embodiment, the first supporting position and the second supporting position are both circular arc groove structures with the same size, and the circular arc groove structures can enable the first supporting position and the second supporting position to support the capillary glass tube 19 more stably, so that the capillary glass tube 19 is prevented from sliding down in the movement process of the tube frame 6. Position 11 is placed to capillary glass pipe 19 quantity is 8 in this embodiment, places position 11 through setting up 8 capillary glass pipes 19, can carry out the quality to 8 capillary glass pipes 19 simultaneously and detect, improves the efficiency that the quality detected. The infrared industrial camera is arranged at the top of the light shield 2 and connected with the top of the light shield 2, the infrared light source is arranged on the side wall of the light shield 2, an included angle between the infrared light source and the plane where the frame structure is located is beta, wherein beta is more than 20 degrees and less than 60 degrees. In this embodiment, β =45 °, by setting β to 45 °, it can be ensured that light emitted from the infrared light source is irradiated on the capillary glass tube 19 in a straight and oblique manner, and by irradiating the infrared light source from both sides, the tube wall edge of the capillary glass tube 19 and the seal of the capillary glass tube 19 can be illuminated, so that defects of the product can be easily found.
The above description is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and substitutions can be made without departing from the technical principle of the present invention, and these modifications and substitutions should also be regarded as the protection scope of the present invention.

Claims (9)

1. A method for detecting the quality of a capillary glass tube is characterized by comprising the following steps,
s010, placing a capillary glass tube on a tube frame, wherein an infrared industrial camera is arranged above the tube frame and is electrically connected with an industrial control computer, a leveling push plate for adjusting the position of the capillary glass tube is arranged on the upper surface of the tube frame, the tube frame comprises a first supporting part and a second supporting part, the capillary glass tube is placed on the first supporting part and the second supporting part, and the first supporting part and the second supporting part can move in opposite directions or in opposite directions to realize the closing and opening of the tube frame;
s020, closing the pipe frame and the leveling push plate, obtaining a contact part of the capillary glass pipe and the pipe frame at the moment, and marking the position of the contact part on the capillary glass pipe as a first position, wherein the leveling push plate is propped against two ends of the capillary glass pipe;
s030, taking a picture of the capillary glass tube by using an industrial camera and recording the picture as a picture I;
s040, keeping the position of the leveling push plate unchanged, opening the pipe frame, taking a picture of the capillary glass pipe by using an industrial camera and recording the picture as a second picture;
s050, respectively correcting the images of the first photo and the second photo;
step 060, acquiring an image of the first position in the corrected first picture as an image A, acquiring an image of the first position in the corrected second picture as an image B, and replacing the image A in the corrected first picture with the image B to obtain a third picture;
s070, carrying out image binarization on the third photo;
s080, comparing the result of the image binaryzation with a preset value, and judging whether the capillary glass tube is qualified.
2. The method for quality inspection of a capillary glass tube according to claim 1, wherein the image correction in step S050 includes the steps of,
s051, loading images;
s052, preprocessing the loaded image;
s053, determining the image edge by using a function;
s054, determining an orientation fixed point according to the determined image edge;
and S055, correcting the image by using the OpenCV algorithm by taking the determined orientation fixed point as input.
3. The method for quality inspection of a capillary glass tube according to claim 2, wherein the step S052 includes white balancing the image, adjusting the contrast and brightness of the image.
4. The method for quality inspection of a capillary glass tube according to claim 2, wherein the step S053 comprises the steps of,
s053a, carrying out binarization processing on the image and obtaining a binary image;
s053b, detecting the binary image by using a canny operator and obtaining an image C;
S053C, detecting all straight lines in the image C by using a HoughLinesP function and obtaining an image D;
and S053D, drawing an edge frame according to the image D.
5. The method for quality inspection of a capillary glass tube according to claim 2, wherein the step S054 comprises the steps of,
s054a, extracting intersection points among the detected straight lines, and screening the extracted intersection points;
s054b, finding out two points with the farthest distance from the screened points, using the two points as diagonal lines to form a rectangle, and using the formed rectangular area as the size of the corrected image;
s054c, acquiring four vertexes of the rectangle and marking one of the vertexes, wherein the marked vertex is used as a square point.
6. The method for quality inspection of capillary glass tubes according to claim 2, wherein the step S055 comprises the step of,
s055a, performing matrix transformation on the image by using a findHomography function to obtain a transformation matrix;
s055b, correcting the image by using a warpPerspectral function to obtain a corrected image by taking the transformation matrix as input;
and S055c, performing enhancement filtering on the corrected image by using the filter2D function to obtain a final image.
7. The method for detecting the quality of the capillary glass tube as claimed in claim 1, wherein in step S020, before closing the tube frame and the leveling push plate, it is determined whether the industrial control computer has recorded lens parameters of the industrial camera, and if not, the lens parameters are recorded as correction parameters.
8. The method according to claim 7, wherein the lens parameters include Canny operator threshold, contrast and brightness.
9. The method for detecting the quality of the capillary glass tube as claimed in claim 3, wherein the step S052 is a gray world automatic white balance algorithm to perform white balance on the image.
CN201711484842.9A 2017-12-29 2017-12-29 Method for detecting quality of capillary glass tube Active CN108226165B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711484842.9A CN108226165B (en) 2017-12-29 2017-12-29 Method for detecting quality of capillary glass tube

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711484842.9A CN108226165B (en) 2017-12-29 2017-12-29 Method for detecting quality of capillary glass tube

Publications (2)

Publication Number Publication Date
CN108226165A CN108226165A (en) 2018-06-29
CN108226165B true CN108226165B (en) 2020-10-30

Family

ID=62647298

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711484842.9A Active CN108226165B (en) 2017-12-29 2017-12-29 Method for detecting quality of capillary glass tube

Country Status (1)

Country Link
CN (1) CN108226165B (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1019846A (en) * 1996-06-27 1998-01-23 Shimadzu Corp Multicapillary electrophoretic apparatus
CN1560627A (en) * 2004-02-26 2005-01-05 复旦大学 Multi-chromaticity-electrophoresis separating and detecting system based on array capillary electrofocasing
US8404092B1 (en) * 2011-03-29 2013-03-26 Advanced Analytical Technologies, Inc. Method for the reduction of cross talk in multiplex capillary electrophoresis
JP5198820B2 (en) * 2006-09-26 2013-05-15 三菱レイヨン株式会社 Capillary array sheet inspection apparatus and inspection method
CN103523292A (en) * 2013-10-30 2014-01-22 龙岩烟草工业有限责任公司 Tobacco bale conveyance stabilizing mechanism, tobacco bale imaging detecting device and tobacco bale imaging detecting method
CN103592264A (en) * 2013-11-13 2014-02-19 上海交通大学 On-line CE (capillary electrophoresis) detection device
CN103995007A (en) * 2014-05-06 2014-08-20 湖南润普科技发展有限公司 Total cigarette appearance quality detection device
CN204101478U (en) * 2014-09-15 2015-01-14 河北省激光研究所 A kind of pick-up unit of online glass tube defect
CN204564599U (en) * 2015-02-07 2015-08-19 深圳市品印宝智能科技有限公司 A kind of glass tube outward appearance automatic detection system
CN105973911A (en) * 2016-04-28 2016-09-28 蚌埠国显科技有限公司 Display screen scrolling detection device
CN206038548U (en) * 2016-07-27 2017-03-22 东莞阿李自动化股份有限公司 Pole piece detection device
CN107323962A (en) * 2017-07-26 2017-11-07 佛山汉格斯环保科技有限公司 A kind of glass tube exterior automatic detection system

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1019846A (en) * 1996-06-27 1998-01-23 Shimadzu Corp Multicapillary electrophoretic apparatus
CN1560627A (en) * 2004-02-26 2005-01-05 复旦大学 Multi-chromaticity-electrophoresis separating and detecting system based on array capillary electrofocasing
JP5198820B2 (en) * 2006-09-26 2013-05-15 三菱レイヨン株式会社 Capillary array sheet inspection apparatus and inspection method
US8404092B1 (en) * 2011-03-29 2013-03-26 Advanced Analytical Technologies, Inc. Method for the reduction of cross talk in multiplex capillary electrophoresis
CN103523292A (en) * 2013-10-30 2014-01-22 龙岩烟草工业有限责任公司 Tobacco bale conveyance stabilizing mechanism, tobacco bale imaging detecting device and tobacco bale imaging detecting method
CN103592264A (en) * 2013-11-13 2014-02-19 上海交通大学 On-line CE (capillary electrophoresis) detection device
CN103995007A (en) * 2014-05-06 2014-08-20 湖南润普科技发展有限公司 Total cigarette appearance quality detection device
CN204101478U (en) * 2014-09-15 2015-01-14 河北省激光研究所 A kind of pick-up unit of online glass tube defect
CN204564599U (en) * 2015-02-07 2015-08-19 深圳市品印宝智能科技有限公司 A kind of glass tube outward appearance automatic detection system
CN105973911A (en) * 2016-04-28 2016-09-28 蚌埠国显科技有限公司 Display screen scrolling detection device
CN206038548U (en) * 2016-07-27 2017-03-22 东莞阿李自动化股份有限公司 Pole piece detection device
CN107323962A (en) * 2017-07-26 2017-11-07 佛山汉格斯环保科技有限公司 A kind of glass tube exterior automatic detection system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于机器视觉的精密类玻璃管质量检测系统;张华山等;《玻璃与搪瓷》;20170630;第45卷(第3期);第24-28页 *
玻璃管缺陷检测系统及其性能优化;周叶江;《中国优秀硕士学位论文全文数据库 工程科技Ⅰ辑》;20170415;正文第1-67页 *

Also Published As

Publication number Publication date
CN108226165A (en) 2018-06-29

Similar Documents

Publication Publication Date Title
KR102178903B1 (en) Visual inspection device and illumination condition setting method of visual inspection device
KR101030449B1 (en) Apperance inspecting apparatus of cylinder type rechargeable battery
TWI518404B (en) Liquid crystal panel inspection apparatus
US9292925B2 (en) Imaging system and control method thereof
KR101949257B1 (en) Apparatus for Testing Display device module and Method for Testing the same
WO2012142967A1 (en) Apparatus and method for photographing glass defects in multiple layers
TWI480578B (en) Method for detecting optical center of wide-angle lens, and optical center detection apparatus
KR101284528B1 (en) A measurement equipment and method for the crack inspect of gear rim
CN105021628A (en) Detection method for surface defects of optical fiber image inverter
CN108169247B (en) Capillary glass tube quality detection device
JP6859628B2 (en) Visual inspection method and visual inspection equipment
KR20180048986A (en) Measuring the rotational position of a lenticular lens sheet
CN108226165B (en) Method for detecting quality of capillary glass tube
JP2009097977A (en) Visual inspection device
KR20090107314A (en) Apparatus for inspecting surface and method for inspecting surface
RU2726725C2 (en) Busbar analysis device and method
KR101452215B1 (en) Curve edge vision inspection method and apparatus thereof
KR101403860B1 (en) Wafer surface inspection device and wafer surface inspection method using thereof
KR101198406B1 (en) Pattern inspection device
KR100748108B1 (en) apparatus and method for inspecting CRT panel
KR101217173B1 (en) Apparatus for inspecting substrate and method of inspecting substrate
KR101153246B1 (en) Substrate inspection method
KR101030451B1 (en) Tube and washer inspecting apparatus of cylinder type rechargeable battery
KR20190052516A (en) Surface inspection apparatus
CN207866732U (en) A kind of glass capillary quality inspection device

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
GR01 Patent grant
GR01 Patent grant