CN110580477A - automatic identification device and method for relay shell number - Google Patents

automatic identification device and method for relay shell number Download PDF

Info

Publication number
CN110580477A
CN110580477A CN201910945147.0A CN201910945147A CN110580477A CN 110580477 A CN110580477 A CN 110580477A CN 201910945147 A CN201910945147 A CN 201910945147A CN 110580477 A CN110580477 A CN 110580477A
Authority
CN
China
Prior art keywords
relay
light source
machine vision
processing unit
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
CN201910945147.0A
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.)
GUILIN SPACEFLIGHT ELECTRONIC CO Ltd
Original Assignee
GUILIN SPACEFLIGHT ELECTRONIC 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 GUILIN SPACEFLIGHT ELECTRONIC CO Ltd filed Critical GUILIN SPACEFLIGHT ELECTRONIC CO Ltd
Priority to CN201910945147.0A priority Critical patent/CN110580477A/en
Publication of CN110580477A publication Critical patent/CN110580477A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/10Image acquisition
    • G06V10/12Details of acquisition arrangements; Constructional details thereof
    • G06V10/14Optical characteristics of the device performing the acquisition or on the illumination arrangements
    • G06V10/147Details of sensors, e.g. sensor lenses
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/25Determination of region of interest [ROI] or a volume of interest [VOI]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Vascular Medicine (AREA)
  • Character Input (AREA)

Abstract

The invention discloses an automatic identification device for a relay shell number, which comprises an image acquisition unit, a machine vision processing unit and a communication unit. The image acquisition unit consists of a relay fixing platform, a mixed light source and an industrial camera. The relay to be identified is placed on the relay fixing platform. The hybrid light source and the industrial camera are both positioned right above the relay fixing platform. The central line of the industrial camera is coincident with the central line of the mixed light source, and the central lines of the industrial camera and the mixed light source are opposite to the placement position of the relay to be identified on the relay fixing platform; the image output end of the industrial camera is connected with the input end of the machine vision processing unit, and the output end of the machine vision processing unit is connected with an external input system through the communication unit. The invention can solve the problems of high labor intensity, strong subjectivity, easy fatigue, low accuracy, manual input and the like in the conventional manual identification method, and has the characteristics of high identification accuracy and high input efficiency.

Description

Automatic identification device and method for relay shell number
Technical Field
The invention relates to the technical field of relays, in particular to a device and a method for automatically identifying the serial number of a relay shell.
Background
the military relay shell is made of metal materials, the shell number is composed of Arabic numerals, and the military relay shell is generated by etching the surface of the military relay shell through laser marking equipment. When the serial numbers are used, an operator needs to visually observe and identify the marked serial numbers on the relay shell, and then operates the keyboard to input the memorized serial numbers into test software or information acquisition software in a computer. Because the human eyes judge that the character content is reflected by the character area and the background area to form images differently, the shell number is judged incorrectly due to the random change of the light, and the quality problems of repeated numbers, missed numbers or wrong numbers occur. In addition, the manual entry of the serial number is easy to cause the situations of wrong entry and missing entry. Although there has been an attempt to mark a bar code or a two-dimensional code on a housing in order to solve the problem of manual entry by automatically recognizing a number through a bar code scanning gun, efficient operation cannot be achieved due to the problem of metal light reflection.
Disclosure of Invention
the invention aims to solve the problems of low identification accuracy and low input efficiency of the existing identification method of the relay number, and provides an automatic identification device and method of the relay shell number.
In order to solve the problems, the invention is realized by the following technical scheme:
an automatic identification device for the serial number of a relay shell comprises an image acquisition unit, a machine vision processing unit and a communication unit; the image acquisition unit consists of a relay fixing platform, a mixed light source and an industrial camera;
the relay to be identified is placed on the relay fixing platform; the hybrid light source and the industrial camera are both positioned right above the relay fixing platform;
the mixed light source is formed by combining a plane annular diffusion light source and a three-dimensional annular ring light source; the diffusion light source is positioned in the middle of the light source, and the annular light source is embedded at the radial outer side of the diffusion light source; the light emitting directions of the diffusion light source and the annular light source face the relay to be identified on the relay fixing platform;
the central line of the industrial camera is coincident with the central line of the mixed light source, and the central lines of the industrial camera and the mixed light source are opposite to the placement position of the relay to be identified on the relay fixing platform;
the image output end of the industrial camera is connected with the input end of the machine vision processing unit, and the output end of the machine vision processing unit is connected with an external input system through the communication unit.
in the above scheme, the light-emitting angle of the diffuse light source is 90 degrees and the light-emitting angle of the annular light source is 45-60 degrees relative to the relay fixing platform.
The method for automatically identifying the serial number of the relay shell realized by the device comprises the following steps:
step 1, placing a relay to be identified on a relay fixing platform, and turning on a mixed light source to polish the relay to be identified on the relay fixing platform;
step 2, the industrial camera collects the number image on the relay shell to be identified and sends the number image to the machine vision processing unit;
Step 3, the machine vision processing unit carries out binarization processing on the numbered image, so that the colorful numbered image is changed into a gray-scale numbered image;
step 4, the machine vision processing unit uses a Threshold () function of OpenCV to carry out global automatic Threshold processing on the number image of the gray level so as to obtain a Threshold number image;
Step 5, the machine vision processing unit firstly carries out primary filtering on the threshold number image by using a median filtering method, and then carries out secondary filtering on the threshold number image after primary filtering by using a mean filtering method to obtain a filtered number image;
step 6, the machine vision processing unit adjusts the filtered numbered images by using a WarpPeractive () function of OpenCV to obtain numbered images in the horizontal direction;
Step 7, the machine vision processing unit cuts the number image in the horizontal direction to obtain a single character image;
step 8, the machine vision processing unit extracts the characteristics of the single character image in sequence by adopting a stroke characteristic method and a contour topological method, compares the extracted characteristics with a template and identifies a final character;
and 9, the machine vision processing unit sends the recognized characters to an external entry system through a communication unit so as to complete the entry of the serial number on the relay shell to be recognized.
compared with the prior art, the identification of the metal shell number is carried out by adopting a machine vision technology, a light source structure design technology and a Windows programming technology, namely, a special light source system is utilized to obtain an illumination effect, an industrial camera is utilized to obtain a shell number image, then the machine vision technology is utilized to process the image, finally the character of the shell number is given, and finally, the communication technology and third-party entry system software are utilized to carry out seamless entry. The invention replaces two links of manual reading and inputting, thereby solving the problems of high labor intensity, strong subjectivity, easy fatigue, low accuracy, manual inputting and the like in the existing manual identification method and having the characteristics of high identification accuracy and high inputting efficiency.
drawings
fig. 1 is a schematic block diagram of an automatic identification device for relay housing numbers.
fig. 2 is a schematic structural diagram of an image acquisition unit.
Reference numbers in the figures: 1. a relay fixing platform; 2. a hybrid light source; 2-1 a diffuse light source; 2-2, a low angle annular light source; 3. an industrial camera; 4. and (5) a relay to be identified.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail below with reference to specific examples.
an automatic identification device for the serial number of a relay shell is shown in figure 1 and comprises an image acquisition unit, a machine vision processing unit and a communication unit.
The image acquisition unit, as shown in fig. 2, is composed of a relay fixing platform 1, a mixed light source 2 and an industrial camera 3. The relay 4 to be identified is placed on the relay fixing platform 1. The hybrid light source 2 and the industrial camera 3 are both located right above the relay fixing platform 1. The central line of the industrial camera 3 coincides with the central line of the mixed light source 2, and the central lines of the industrial camera and the mixed light source are opposite to the placement position of the relay 4 to be identified on the relay fixing platform 1. The image output end of the industrial camera 3 is connected with the input end of the machine vision processing unit, and the output end of the machine vision processing unit is connected with an external input system through the communication unit.
Because the relay shell metal not only reflects light, but also has irregular mechanical scratches, when meeting a direct light source, stronger reflection can be generated, and a reflecting object can reflect the shape of the light source like a mirror, so that the influence on imaging is great, therefore, the invention adopts the mixed light source 2 to carry out reflection inhibition design. The hybrid light source 2 of the present invention is composed of a planar annular diffuse light source 2-1 and a solid annular low-angle annular light source 2-2. The diffuse light source 2-1 is located in the middle of the light source, and the low-angle annular light source 2-2 is embedded in the radial outer side of the diffuse light source 2-1. The light emitting directions of the diffusion light source 2-1 and the low-angle annular light source 2-2 face the relay 4 to be identified on the relay fixing platform 1. In the preferred embodiment of the invention, relative to the relay fixing platform 1, the light-emitting angle of the diffusion light source 2-1 is 90 degrees, and the light-emitting angle of the low-angle annular light source 2-2 is 45-60 degrees, so that the whole view field image achieves the purpose of inhibiting light reflection.
The method for automatically identifying the serial number of the relay shell realized by the device comprises the following steps:
step 1, placing a relay 4 to be identified on a relay fixing platform 1, and turning on a mixed light source 2 to polish the relay 4 to be identified on the relay fixing platform 1;
step 2, the industrial camera 3 collects the number image on the shell of the relay 4 to be identified and sends the number image to the machine vision processing unit;
Step 3, the machine vision processing unit carries out binarization processing on the numbered image, so that the colorful numbered image is changed into a gray-scale numbered image, the original three channels are changed into one channel, and the execution efficiency of the algorithm is improved;
step 4, after random noise of character illumination is suppressed by a special light path, a machine vision processing unit performs global automatic Threshold processing on the number image of the gray scale by using a Threshold function of OpenCV to obtain a Threshold number image; thus, a better binarization processing effect can be obtained;
Step 5, the machine vision processing unit firstly carries out primary filtering on the threshold number image by using a median filtering method, and then carries out secondary filtering on the threshold number image after primary filtering by using a mean filtering method to obtain a filtered number image; therefore, the mechanical scratches on the surface of the shell can be effectively removed, the contrast between the numbered character target and the background is enhanced, and the subsequent identification is facilitated;
step 6, the machine vision processing unit adjusts the filtered numbered image by using a WarpPeractive () function of OpenCV, so that the whole character image is in the horizontal direction, and further the numbered image in the horizontal direction is obtained;
Step 7, the machine vision processing unit cuts the number image in the horizontal direction to obtain a single character image;
step 8, the machine vision processing unit extracts the characteristics of the single character image in sequence by adopting a stroke characteristic method and a contour topological method, compares the extracted characteristics with a template and identifies a final character;
the purpose of feature extraction is to continue simplifying the character image into a plurality of primitives including strokes, sizes, mutation areas and the like, then comparing the primitive with the template, and checking whether the features exist or not. In practical applications, however, the resulting image may have tilt, distortion, scratch, blocking, stain, etc., which will affect the extraction of the primitive. After comparison of various feature extraction methods, the extraction of shell number feature elements is realized by adopting a method of combining a stroke feature method with a contour topology method;
and 9, the machine vision processing unit sends the recognized characters to an external entry system through a communication unit so as to complete the entry of the serial number on the shell of the relay 4 to be recognized.
After the character recognition is completed, the characters need to be automatically written into a text input box of a third-party software form, so that the automation efficiency is improved, and the problem of an operator in the process of copying the characters to the third-party software is avoided. After the recognized characters are obtained, firstly, a window father handle of the third-party software is obtained by using a GetParent function of a Windows Api library, an assembly code is embedded after an image address of a window in a memory is determined, so that the third-party software can jump to a specified input text box address when the operation of the third-party software is called, and then the recognized characters are written into the specified memory address by using a Textout function of the API function library.
It should be noted that, although the above-mentioned embodiments of the present invention are illustrative, the present invention is not limited thereto, and thus the present invention is not limited to the above-mentioned embodiments. Other embodiments, which can be made by those skilled in the art in light of the teachings of the present invention, are considered to be within the scope of the present invention without departing from its principles.

Claims (3)

1. An automatic identification device for the serial number of a relay shell is characterized by comprising an image acquisition unit, a machine vision processing unit and a communication unit; the image acquisition unit consists of a relay fixing platform (1), a mixed light source (2) and an industrial camera (3);
the relay (4) to be identified is placed on the relay fixing platform (1); the hybrid light source (2) and the industrial camera (3) are both positioned right above the relay fixing platform (1);
the mixed light source (2) is formed by combining a planar annular diffusion light source (2-1) and a stereoscopic annular light source (2-2); the diffusion light source (2-1) is positioned in the middle of the light source, and the annular light source (2-2) is embedded at the radial outer side of the diffusion light source (2-1); the light emitting directions of the diffusion light source (2-1) and the annular light source (2-2) face to a relay (4) to be identified on the relay fixing platform (1);
The central line of the industrial camera (3) is coincident with the central line of the mixed light source (2), and the central lines of the industrial camera and the mixed light source are opposite to the placement position of the relay (4) to be identified on the relay fixing platform (1);
the image output end of the industrial camera (3) is connected with the input end of the machine vision processing unit, and the output end of the machine vision processing unit is connected with an external recording system through the communication unit.
2. The relay housing number automatic identification device according to claim 1, wherein the light-emitting angle of the diffuse light source (2-1) is 90 degrees and the light-emitting angle of the ring-shaped light source (2-2) is 45-60 degrees with respect to the relay fixing platform (1).
3. the relay housing number automatic identification method realized by the relay housing number automatic identification device of claim 1 is characterized by comprising the following steps:
Step 1, placing a relay (4) to be identified on a relay fixing platform (1), and turning on a mixed light source (2) to polish the relay (4) to be identified on the relay fixing platform (1);
Step 2, the industrial camera (3) collects a number image on the shell of the relay (4) to be identified and sends the number image to the machine vision processing unit;
step 3, the machine vision processing unit carries out binarization processing on the numbered image, so that the colorful numbered image is changed into a gray-scale numbered image;
step 4, the machine vision processing unit uses a Threshold () function of OpenCV to carry out global automatic Threshold processing on the number image of the gray level so as to obtain a Threshold number image;
step 5, the machine vision processing unit firstly carries out primary filtering on the threshold number image by using a median filtering method, and then carries out secondary filtering on the threshold number image after primary filtering by using a mean filtering method to obtain a filtered number image;
step 6, the machine vision processing unit adjusts the filtered numbered images by using a WarpPeractive () function of OpenCV to obtain numbered images in the horizontal direction;
Step 7, the machine vision processing unit cuts the number image in the horizontal direction to obtain a single character image;
Step 8, the machine vision processing unit extracts the characteristics of the single character image in sequence by adopting a stroke characteristic method and a contour topological method, compares the extracted characteristics with a template and identifies a final character;
and 9, the machine vision processing unit sends the recognized characters to an external entry system through a communication unit so as to complete the entry of the serial number on the shell of the relay (4) to be recognized.
CN201910945147.0A 2019-09-30 2019-09-30 automatic identification device and method for relay shell number Pending CN110580477A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910945147.0A CN110580477A (en) 2019-09-30 2019-09-30 automatic identification device and method for relay shell number

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910945147.0A CN110580477A (en) 2019-09-30 2019-09-30 automatic identification device and method for relay shell number

Publications (1)

Publication Number Publication Date
CN110580477A true CN110580477A (en) 2019-12-17

Family

ID=68814284

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910945147.0A Pending CN110580477A (en) 2019-09-30 2019-09-30 automatic identification device and method for relay shell number

Country Status (1)

Country Link
CN (1) CN110580477A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111506301A (en) * 2020-04-24 2020-08-07 同盾(广州)科技有限公司 Method for bypassing system restriction reflection call and related equipment
CN113205099A (en) * 2021-05-12 2021-08-03 常熟理工学院 Visual detection system and method for material-removing characters on surface of nickel-plated metal

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108038482A (en) * 2017-12-22 2018-05-15 大连运明自动化技术有限公司 A kind of automobile engine cylinder-body sequence number Visual intelligent identifying system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108038482A (en) * 2017-12-22 2018-05-15 大连运明自动化技术有限公司 A kind of automobile engine cylinder-body sequence number Visual intelligent identifying system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111506301A (en) * 2020-04-24 2020-08-07 同盾(广州)科技有限公司 Method for bypassing system restriction reflection call and related equipment
CN111506301B (en) * 2020-04-24 2022-11-11 同盾(广州)科技有限公司 Method for bypassing system restriction reflection call and related equipment
CN113205099A (en) * 2021-05-12 2021-08-03 常熟理工学院 Visual detection system and method for material-removing characters on surface of nickel-plated metal
CN113205099B (en) * 2021-05-12 2024-05-14 常熟理工学院 Nickel plating metal surface material removing character visual detection system and method

Similar Documents

Publication Publication Date Title
US6941016B1 (en) Method for finding contours in an image of an object
CN111044522B (en) Defect detection method and device and terminal equipment
CN108876856B (en) Fire source identification and positioning method and system for large building
CN113269762B (en) Screen defect detection method, system and computer storage medium
KR20120023646A (en) Two-dimensional symbol code and method for reading the symbol code
CN108805126B (en) Method for removing long interference lines of text image
CN110580477A (en) automatic identification device and method for relay shell number
CN113962274B (en) Abnormity identification method and device, electronic equipment and storage medium
CN108197521A (en) A kind of leggy Quick Response Code obtains identification device and method
US20190272627A1 (en) Automatically generating image datasets for use in image recognition and detection
JP2018120445A (en) Car number recognition apparatus
CN114119535A (en) Laser cleaning effect on-line monitoring method based on visual detection
CN115100104A (en) Defect detection method, device and equipment for glass ink area and readable storage medium
CN210488575U (en) Relay shell serial number automatic identification device
WO2020125528A1 (en) Anchor object detection method and apparatus, electronic device, and storage medium
CN111274896A (en) Smoke and fire identification algorithm
US10614566B2 (en) Inspection condition determination device, inspection condition determination method, and inspection condition determination program
JP2007017364A (en) Device and method for extracting silhouette, and device and method for generating three-dimensional shape data
CN114018946A (en) OpenCV-based high-reflectivity bottle cap defect detection method
KR101249374B1 (en) Apparatus and method for detecting target shape from image
CN110378337B (en) Visual input method and system for drawing identification information of metal cutting tool
CN115984211A (en) Visual positioning method, robot and storage medium
US11644427B2 (en) Automatic detection method and automatic detection system for detecting crack on wafer edges
JP2004334288A (en) Engraved letter recognition device and method
CN113808117A (en) Lamp detection method, device, equipment and storage medium

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