CN116660273A - Chain piece missing detection method in chain and electronic equipment - Google Patents

Chain piece missing detection method in chain and electronic equipment Download PDF

Info

Publication number
CN116660273A
CN116660273A CN202310935618.6A CN202310935618A CN116660273A CN 116660273 A CN116660273 A CN 116660273A CN 202310935618 A CN202310935618 A CN 202310935618A CN 116660273 A CN116660273 A CN 116660273A
Authority
CN
China
Prior art keywords
chain
image
row
determining
detection area
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.)
Granted
Application number
CN202310935618.6A
Other languages
Chinese (zh)
Other versions
CN116660273B (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.)
Fitow Tianjin Detection Technology Co Ltd
Original Assignee
Fitow Tianjin Detection 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 Fitow Tianjin Detection Technology Co Ltd filed Critical Fitow Tianjin Detection Technology Co Ltd
Priority to CN202310935618.6A priority Critical patent/CN116660273B/en
Publication of CN116660273A publication Critical patent/CN116660273A/en
Application granted granted Critical
Publication of CN116660273B publication Critical patent/CN116660273B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/02Measuring arrangements characterised by the use of optical techniques for measuring length, width or thickness
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/14Measuring arrangements characterised by the use of optical techniques for measuring distance or clearance between spaced objects or spaced apertures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Theoretical Computer Science (AREA)
  • Biochemistry (AREA)
  • Chemical & Material Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Immunology (AREA)
  • Pathology (AREA)
  • Quality & Reliability (AREA)
  • Signal Processing (AREA)
  • Geometry (AREA)
  • Image Analysis (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Abstract

The embodiment of the application discloses a chain piece missing detection method in a chain and electronic equipment. The method comprises the following steps: acquiring an original chain image of a chain to be detected, and determining a single-row detection area image among all chain pins according to the type of the chain to be detected and the original chain image; for any single-row detection area image, extracting gaps in the single-row detection area image, and determining the respective corresponding gap width of each gap; and determining the row width of the single-row detection area image, and detecting whether the row corresponding to the single-row detection area image lacks a chain piece according to the row width, the gap width and the type of the chain to be detected. Based on the method, each row in the chain can be automatically and sequentially detected, whether each row lacks a chain piece or not can be more intuitively determined by utilizing the row width and the gap width, the condition of missing detection caused by manual detection is avoided, and the detection efficiency and the accuracy are higher.

Description

Chain piece missing detection method in chain and electronic equipment
Technical Field
The embodiment of the application relates to the technical field of chain detection, in particular to a chain piece missing detection method in a chain and electronic equipment.
Background
The chain, which is an important component in a motor vehicle transmission, has a very important effect on the performance and the normal operation of the motor vehicle transmission. Therefore, before the chain leaves the factory, it is necessary to perform quality detection on the chain, in particular, whether the chain lacks a chain piece.
At present, quality detection of a chain is usually carried out manually, but hundreds of chain pins are usually arranged in the chain, a plurality of chain pieces are arranged on each chain pin, and when manual detection is carried out, the risk of missed detection can be generated due to huge factors, and particularly on a flow line, the risk of missed detection is further increased.
Disclosure of Invention
The embodiment of the application provides a chain piece missing detection method in a chain and electronic equipment, so as to avoid missing detection.
In a first aspect, an embodiment of the present application provides a method for detecting a missing piece in a chain, where the method includes:
acquiring an original chain image of a chain to be detected, and determining a single-row detection area image among all chain pins according to the type of the chain to be detected and the original chain image;
for any single-row detection area image, extracting gaps in the single-row detection area image, and determining the gap width corresponding to each gap;
And determining the row width of the single-row detection area image, and detecting whether the row corresponding to the single-row detection area image lacks chain pieces according to the row width, the gap width and the type of the chain to be detected.
In a second aspect, an embodiment of the present application further provides an electronic device, including:
one or more processors;
storage means for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement a method for detecting a chain medium chain segment loss as provided by any of the embodiments of the present application.
According to the technical scheme, an original chain image of a chain to be detected is acquired, and a single-row detection area image among all chain pins is determined according to the type of the chain to be detected and the original chain image; for any single-row detection area image, extracting gaps in the single-row detection area image, and determining the gap width corresponding to each gap; and determining the row width of the single-row detection area image, and detecting whether the row corresponding to the single-row detection area image lacks chain pieces according to the row width, the gap width and the type of the chain to be detected. Based on the method, each row in the chain can be automatically and sequentially detected, whether each row lacks a chain piece or not can be more intuitively determined by utilizing the row width and the gap width, the condition of missing detection caused by manual detection is avoided, and the detection efficiency and the accuracy are higher.
In addition, in the application, the first chain pin in the original chain image is determined according to the type of the chain to be detected and the original chain image, and after the original chain image is acquired, the first chain pin in the original chain image can be identified as long as the type of the chain to be detected is known.
Drawings
Fig. 1 is a schematic flow chart of a method for detecting chain sheet missing in a chain according to an embodiment of the application;
FIG. 2 is a schematic illustration of a single line area image according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a single-line subject circumscribing image according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a chain sheet missing detection device in a chain according to a second embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device according to a third embodiment of the present application.
Detailed Description
The application is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the application and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present application are shown in the drawings.
Example 1
Fig. 1 is a schematic flow chart of a method for detecting a chain-in-chain loss, which is provided in an embodiment of the present application, and the method may be implemented by a device for detecting a chain-in-chain loss, and the device may be implemented in a hardware and/or software manner and may be generally integrated in an electronic device such as a computer with data computing capability, and specifically includes the following steps:
and 101, acquiring an original chain image of a chain to be detected, and determining a single-row detection area image among all chain pins according to the type of the chain to be detected and the original chain image.
In the step, the chain to be detected is driven to rotate by means of the detected related hardware device, and image information of the chain to be detected is acquired row by row in the rotation process of the chain to be detected until the acquisition line number reaches a preset threshold value, so that an original chain image is obtained, and the preset threshold value is larger than the pixel line number corresponding to the size of the chain to be detected.
The image information can be acquired through the line-scan camera, and since the line-scan camera usually has only one line of photosensitive units, only one line of the line-scan camera can be generally acquired during acquisition, and the acquisition line number in the step is the acquisition line number of the line-scan camera.
In addition, the number of pixel rows corresponding to the size of the chain to be detected refers to the number of rows required to be acquired when the linear array camera acquires the complete chain to be detected, and the setting of the number of pixel rows corresponding to the size of the chain to be detected can be set to different values according to different chain types.
In a specific embodiment, the preset threshold may be determined according to the number of pixel rows corresponding to the size of the chain to be detected, for example, 12000, and the preset threshold may be set to 12200, that is, the preset threshold may be greater than the number of pixel rows corresponding to the size of the chain to be detected. Based on the setting, can guarantee to gather all elements of waiting to detect the chain, avoid the condition emergence that chain part was missed.
Since the display length of the current acquired image is limited by the display device, the acquisition can be performed in multiple times, and the acquisition is continuous and uninterrupted. And then splicing the images acquired for multiple times according to the acquisition sequence to obtain an original chain image.
In addition, in order to identify the result between each chain, each chain has a corresponding identification code, the identification code can be stuck or etched on the chain in the form of a two-dimensional code, before the original chain image is acquired, the identification code of the chain to be detected is obtained by scanning the two-dimensional code, the identification code can also be stuck or etched on the chain directly, the identification code is identified through an image acquisition device, and in the subsequent processing process, the detection process and the detection result of each chain are distinguished by utilizing the identification code.
Since incomplete rows may appear at the head and tail ends of the original chain image, the incomplete rows at the head and tail ends may be removed, i.e., the pins at the head and tail ends in the original chain image may be removed.
Specifically, a chain main body image can be extracted from an original chain image, and vertex coordinate information of the chain main body image can be determined; and eliminating chain pins at two ends in the original chain image according to the vertex coordinate information.
The chain main body image refers to a chain piece part which is left after two ends of the chain pin protruding out of the chain piece part are removed, the chain main body image is rectangular, and 4 vertexes of the rectangle are vertexes of the chain main body image.
When the chain pin is removed, a rectangular frame is generated according to any vertex coordinate information, the center point of the rectangular frame is the vertex, the length and the width of the rectangular frame are both preset values, then a chain pin positioned at the farthest end of the rectangular frame in the target direction is identified through a pattern identification algorithm, and then the chain pin is removed in the whole row.
The target direction changes according to the position of the vertex, is positioned at the vertex of the head end, points to the direction of the head end, is positioned at the vertex of the tail end, and points to the direction of the tail end.
In addition, when determining the image of the single-row detection area, since the arrangement of the chain pins and the chain sheets in the same type of chain is fixed, each row has a corresponding row number identifier, in order to facilitate the subsequent confirmation of which row of chain sheets is missing, the first chain pin needs to be determined first, and then the single-row detection area corresponding to each row number identifier in the chain to be detected is determined. Under the means, the operator can correspond to the corresponding row in the actual chain only by outputting the row number identification of the chain missing piece.
Specifically, the first chain pin in the original chain image can be determined according to the type of the chain to be detected and the original chain image; then, from the first chain pin, a preset number of single-row detection area images corresponding to the type of the chain to be detected are extracted, wherein the single-row detection area images are area images between two chain pins.
Specifically, when determining the first chain pin, the distance between the chain pins in the original chain image can be determined first, and the target chain pins meeting the preset first chain pin condition corresponding to the type of the chain to be detected can be determined according to the sequential arrangement of the distances; the target chain pin is then determined to be the first chain pin in the original chain image. It should be noted that each type of chain to be tested has only one first pin.
In a specific example, the intervals between the chain pins are different according to the types of the chains to be detected, for example, for a first preset type of chain, the total number of the chain pins is m, and the first chain pin is the o th in n low continuous intervals; for a second preset type of chain, the total number of chain pins is p, and the first chain pin is the r-th of q low continuous pitches; for a third predetermined type of chain, the total number of pins is s and the first pin is the u-th of the t low consecutive pitches.
Where a low continuous pitch refers to a pitch of a continuous low value. In this embodiment, the distribution of the pitch will have a more distinct distinction between high and low values, and thus, the successive low values can be determined according to the pitch distribution characteristics.
In addition, when the distance between the pins in the original chain image is determined, as the chain to be detected may rotate, etc., the part of the pin protruding from the chain sheet may be shorter in the acquired image, and in the process of determining the first pin, the distance between the pins is calculated aiming at the part of the pin protruding from the chain sheet, and when the part of the pin protruding from the chain sheet is shorter, abnormal data may not appear in the calculation range of the pin distance, resulting in positioning the first pin, therefore, the pin segment image in the original chain image may be extracted first, and the pins in the pin segment image may be lengthened, so as to obtain the lengthened pin segment image.
And combining the pre-extracted chain main body image with the lengthened chain pin segment image to obtain a lengthened chain image, determining the distance between the chain pins according to the lengthened chain image, and further determining the first chain pin. The pre-extracted chain main body image is the chain main body image extracted in the process.
In addition, from the first chain pin, when determining single-row detection area images, a preset number of single-row area images corresponding to the type of the chain to be detected can be extracted; filtering impurity influence areas in the single-row area images for any single-row area image, and extracting single-row main body external images from the single-row area images after filtering; for any target line, determining a single-line detection area image of the target line according to the single-line area image of the target line and the single-line main body external image.
The preset number refers to the total number of chain pins corresponding to the type of the chain to be detected. The single line area image may be referred to as fig. 2, and fig. 2 is a schematic diagram of a single line area image according to a first embodiment of the present application. As shown in fig. 2, the single line area image is a selected portion of a rectangular frame with an angle.
The impurity influence region is mainly a region where a black patch is present, and the black patch is mainly inconsistent with the depth of the chain image, that is, the gray value is different, so that the black patch can be identified by the gray value, and the region where the black patch is present is determined as the impurity influence region.
In particular, morphological open operation can be adopted for processing during filtering.
In addition, because the single-row area image may have some angles due to the rotation of the chain to be detected, the single-row area image and the single-row main body external image (the single-row main body external image may be regarded as an image without angles) may be subtracted to obtain an angle influence area, and then the single-row main body external image is used to subtract the angle influence area, so that the single-row detection area image may be obtained.
Referring to fig. 3, fig. 3 is a schematic diagram of a single-line external subject image according to an embodiment of the present application. As shown in fig. 3, the single line subject circumscribed image is a selected portion of a rectangular frame.
It should be noted that, in the embodiments shown in fig. 2 and fig. 3, the angle of the image of the single line area is relatively small, which may be difficult to be manually resolved, and the image may be processed by this method.
Based on the above operation, adverse effects of the angle on the detection can be avoided. It should be noted that the above subtraction operation may be performed by using a difference algorithm, which is not described herein.
Step 102, for any single-row detection area image, extracting gaps in the single-row detection area image, and determining the gap width corresponding to each gap.
In the step, when the gap is extracted, the extraction modes of the single-layer chain pin and the double-layer chain pin are different, so that the height of a single-row detection area image is required to be acquired firstly, and the row type of the single-row detection area image is determined according to the height of the single-row detection area image, wherein the row type comprises the single-layer chain pin and the double-layer chain pin; and then extracting gaps in the single-row detection area image according to the row type, and determining the respective gap width of each gap.
Specifically, the single-layer chain pin and the double-layer chain pin are directly different in height, so that two single-row detection area images with larger spacing can be determined as the double-layer chain pin, and a single-row detection area image with smaller spacing can be determined as the single-layer chain pin.
And for the single-layer chain pin, the single-layer chain pin is directly extracted in a binarization threshold mode, namely, a part of the binarized image, of which the gray value is smaller than a preset threshold value, is regarded as a gap.
For the double-layer chain pin, if the row type is the double-layer chain pin, cutting the target area in the single-row detection area image; and extracting gaps in the cut single-row detection area image. Specifically, the splitting may be a morphological processing manner, and the splitting step may split the area that is actually not connected (usually, the gap is small and the gap ignores the formed non-connected feature), but the area that is displayed to be connected in the image, so as to improve the accuracy of identifying the gap. And then extracting gaps according to the single-layer chain pin mode.
Where the target region refers to a region in the single line detection region image that is actually not connected, but that is displayed connected in the image.
In addition, the determination of the slit width can be determined by coordinates of both ends of the edge in the slit width direction, and after the slit width is determined, slits smaller than the width threshold value can be filtered out, and the slits can be regarded as slits which do not need to be acquired.
Step 103, determining the row width of the single-row detection area image, and detecting whether the row corresponding to the single-row detection area image is in chain missing or not according to the row width, the gap width and the type of the chain to be detected.
In this step, if the type of the chain to be detected is the first preset type, after determining the line width of the image of the single line detection area, the line width may be compensated, which needs to be described, because the first preset type of the chain to be detected may have a partial area with virtual focus and slight distortion, that is, distortion areas, and some gaps may be extracted by mistake in the distortion areas, and these gaps may cause the situation that the width of more gaps is subtracted by mistake during final detection, resulting in a smaller final result, so that a certain compensation is required.
Specifically, a distortion region in a single-line detection region image may be first determined, and a line width compensation value may be determined according to the distortion region; and compensating the line width by using the line width compensation value.
The method for determining whether the distortion area exists in any slot can be determined by polling the slots, and a specific determination mode can be to combine the slot areas with intersections into a temporary area, wherein the transverse slots (slots parallel to the chain pin direction) and the longitudinal slots (slots perpendicular to the chain pin direction) can be summarized first, then each transverse slot is polled in sequence for any longitudinal slot, whether the intersection exists between the longitudinal slot and the polled transverse slot is determined, and the longitudinal slot and the polled transverse slot can be combined into the temporary area.
And judging whether the width of the longitudinal gap in the temporary region is larger than a first distortion judgment threshold value and whether the total width of the temporary region is smaller than a second distortion judgment threshold value, and judging that the temporary region is normal without compensation if the width of the longitudinal gap is larger than the first distortion judgment threshold value and the total width of the temporary region is smaller than the second distortion judgment threshold value.
If the total width of the temporary region is equal to or greater than the second distortion determination threshold and less than the third distortion determination threshold, and the height of the vertical slit in the temporary region is equal to or greater than the fourth distortion threshold, the region having a lower gray value (which means that the gray value is significantly smaller than the surrounding influence gray value, of course, the gray threshold may be set for quantization, and if the gray value is smaller than the gray threshold, the gray value is considered to be lower) is set as the distortion region.
The first distortion determination threshold value, the second distortion determination threshold value, the third distortion determination threshold value, and the fourth distortion determination threshold value are determined according to the relevant parameter values in the temporary area indicated as normal in the history data, so as to distinguish the abnormal temporary area.
And then the number of the pixel points in the distortion area is obtained, and a line width compensation value is determined according to the equal ratio of the number of the pixel points, for example, the product of the number of the pixel points and the ratio is determined as the line width compensation value. The ratio may be preset and will not be described here. When the ratio is set in advance, statistics can be performed based on past empirical data to obtain a corresponding ratio.
Of course, a mapping relationship may be set for different pixel numbers and different line width compensation values, where the mapping relationship may also be obtained by statistics according to previous empirical data, for example, the pixel number is in a first range, the corresponding line width compensation value is a, the pixel number is in a second range, the corresponding line width compensation value is b, and the more the range is set, the more accurate the compensation is.
When the detection is carried out, a judging threshold value can be determined according to the type of the chain to be detected, and the difference value between the row width and the sum of the gap widths can be determined.
If the difference value is larger than or equal to the judging threshold value, judging that the row corresponding to the single-row detection area image does not lack a chain piece; if the difference value is smaller than the judging threshold value, judging that the row corresponding to the single-row detection area image lacks a chain piece, and determining the position of the chain missing piece according to the gap width.
When judging whether the chain is missing, the difference value of the adjacent rows can be synthesized to determine, if the difference value of a certain row and the adjacent rows is suddenly changed in the overall row difference value, the risk of the chain missing of the certain row and the adjacent rows can be determined, and the prompt can be performed.
In the embodiment, an original chain image of a chain to be detected is acquired, and a single-row detection area image among all chain pins is determined according to the type of the chain to be detected and the original chain image; for any single-row detection area image, extracting gaps in the single-row detection area image, and determining the respective corresponding gap width of each gap; and determining the row width of the single-row detection area image, and detecting whether the row corresponding to the single-row detection area image lacks a chain piece according to the row width, the gap width and the type of the chain to be detected. Based on the method, each row in the chain can be automatically and sequentially detected, whether each row lacks a chain piece or not can be more intuitively determined by utilizing the row width and the gap width, the condition of missing detection caused by manual detection is avoided, and the detection efficiency and the accuracy are higher.
Example two
Referring to fig. 4, fig. 4 is a schematic structural diagram of a chain sheet missing detection device in a chain according to a second embodiment of the application. The device for detecting the chain middle chain piece missing provided by the embodiment of the application can execute the method for detecting the chain middle chain piece missing provided by any embodiment of the application, and has the corresponding functional modules and beneficial effects of the execution method. The device can be realized by adopting a software and/or hardware mode, as shown in fig. 4, the device for detecting the missing of the chain sheet in the chain specifically comprises: a first determining module 401, a second determining module 402, and a detecting module 403.
The first determining module is used for acquiring an original chain image of the chain to be detected and determining a single-row detection area image among all the chain pins according to the type of the chain to be detected and the original chain image;
the second determining module is used for extracting gaps in the single-line detection area image for any single-line detection area image and determining the gap width corresponding to each gap;
the detection module is used for determining the row width of the single-row detection area image and detecting whether the row corresponding to the single-row detection area image lacks a chain piece according to the row width and the gap width.
Further, the first determining module is specifically configured to:
And in the process of rotating the chain to be detected, acquiring image information of the chain to be detected line by line until the acquisition line number reaches a preset threshold value, so as to obtain an original chain image, wherein the preset threshold value is larger than the actual line number of the chain to be detected.
Further, the first determining module is specifically further configured to:
determining a first chain pin in an original chain image according to the type of the chain to be detected and the original chain image;
and extracting a preset number of single-row detection area images corresponding to the type of the chain to be detected from the first chain pin, wherein the single-row detection area images are area images between two chain pins.
Further, the first determining module is specifically further configured to:
determining the distance between the chain pins in the original chain image, and determining target chain pins meeting the preset first chain pin condition corresponding to the type of the chain to be detected according to the sequential arrangement of the distance;
the target chain pin is determined to be the first chain pin in the original chain image.
Further, the first determining module is specifically further configured to:
extracting a preset number of single-row area images corresponding to the type of the chain to be detected;
filtering impurity influence areas in the single-row area images for any single-row area image, and extracting single-row main body external images from the single-row area images after filtering;
For any target line, determining a single-line detection area image of the target line according to the single-line area image of the target line and the single-line main body external image.
Further, the second determining module is specifically configured to:
acquiring the height of a single-row detection area image, and determining the row type of the single-row detection area image according to the height of the single-row detection area image;
and extracting gaps in the single-row detection area image according to the row type, and determining the respective corresponding gap width of each gap.
Further, the second determining module is specifically further configured to:
if the line type is double-layer chain pins, segmenting a target area in the image of the single-line detection area;
and extracting gaps in the cut single-row detection area image.
Further, the first determining module is specifically further configured to:
extracting a chain pin segment image in an original chain image, and lengthening a chain pin in the chain pin segment image to obtain a lengthened chain pin segment image;
and combining the pre-extracted chain main body image with the lengthened chain pin segment image to obtain a lengthened chain image, and determining the distance between the chain pins according to the lengthened chain image.
Further, the apparatus further comprises:
and the rejecting module is used for rejecting chain pins at the head end and the tail end in the original chain image.
Further, the rejection module is specifically configured to:
extracting a chain main body image from an original chain image, and determining vertex coordinate information of the chain main body image;
and eliminating chain pins at two ends in the original chain image according to the vertex coordinate information.
Further, if the type of the chain to be detected is a first preset type, the device further includes:
a third determining module, configured to determine a distortion area in the image of the single-line detection area, and determine a line width compensation value according to the distortion area;
and the compensation module is used for compensating the line width by using the line width compensation value.
Further, the detection module is specifically configured to:
determining a judging threshold according to the type of the chain to be detected, and determining a difference value between the row width and the sum of the gap widths;
if the difference value is larger than or equal to the judging threshold value, judging that the row corresponding to the single-row detection area image does not lack a chain piece;
if the difference value is smaller than the judging threshold value, judging that the row corresponding to the single-row detection area image lacks a chain piece, and determining the position of the chain missing piece according to the gap width.
Example III
Fig. 5 is a schematic structural diagram of an electronic device according to a third embodiment of the present application, as shown in fig. 5, the electronic device includes a processor 510, a memory 520, an input device 530, and an output device 540; the number of processors 510 in the electronic device may be one or more, one processor 510 being taken as an example in fig. 5; the processor 510, memory 520, input device 530, and output device 540 in the electronic device may be connected by a bus or other means, for example in fig. 5.
The memory 520 is used as a computer readable storage medium, and may be used to store a software program, a computer executable program, and a module, such as program instructions/modules corresponding to the method for detecting a chain-in-chain-segment loss in the embodiment of the present application (for example, the first determining module 401, the second determining module 402, and the detecting module 403 in the apparatus for detecting a chain-in-chain-segment loss in the chain). The processor 510 executes various functional applications of the electronic device and data processing by running software programs, instructions and modules stored in the memory 520, i.e., implements the method for detecting chain loss in a chain described above.
Acquiring an original chain image of a chain to be detected, and determining a single-row detection area image among all chain pins according to the type of the chain to be detected and the original chain image;
for any single-row detection area image, extracting gaps in the single-row detection area image, and determining the respective corresponding gap width of each gap;
and determining the row width of the single-row detection area image, and detecting whether the row corresponding to the single-row detection area image lacks a chain piece according to the row width, the gap width and the type of the chain to be detected.
Further, the original chain image of the chain to be detected is acquired, including:
And in the process of rotating the chain to be detected, acquiring image information of the chain to be detected line by line until the acquisition line number reaches a preset threshold value, so as to obtain an original chain image, wherein the preset threshold value is larger than the actual line number of the chain to be detected.
Further, determining a single line detection area image between the chain pins according to the type of the chain to be detected and the original chain image, including:
determining a first chain pin in an original chain image according to the type of the chain to be detected and the original chain image;
and extracting a preset number of single-row detection area images corresponding to the type of the chain to be detected from the first chain pin, wherein the single-row detection area images are area images between two chain pins.
Further, according to the type of the chain to be detected and the original chain image, determining the first chain pin in the original chain image includes:
determining the distance between the chain pins in the original chain image, and determining target chain pins meeting the preset first chain pin condition corresponding to the type of the chain to be detected according to the sequential arrangement of the distance;
the target chain pin is determined to be the first chain pin in the original chain image.
Further, extracting a preset number of single-row detection area images corresponding to the type of the chain to be detected, including:
Extracting a preset number of single-row area images corresponding to the type of the chain to be detected;
filtering impurity influence areas in the single-row area images for any single-row area image, and extracting single-row main body external images from the single-row area images after filtering;
for any target line, determining a single-line detection area image of the target line according to the single-line area image of the target line and the single-line main body external image.
Further, extracting slits in the single-line detection area image, and determining a slit width corresponding to each slit, including:
acquiring the height of a single-row detection area image, and determining the row type of the single-row detection area image according to the height of the single-row detection area image;
and extracting gaps in the single-row detection area image according to the row type, and determining the respective corresponding gap width of each gap.
Further, extracting a slit in the single-line detection area image according to the line type includes:
if the line type is double-layer chain pins, segmenting a target area in the image of the single-line detection area;
and extracting gaps in the cut single-row detection area image.
Further, determining the spacing between the pins in the original chain image includes:
Extracting a chain pin segment image in an original chain image, and lengthening a chain pin in the chain pin segment image to obtain a lengthened chain pin segment image;
and combining the pre-extracted chain main body image with the lengthened chain pin segment image to obtain a lengthened chain image, and determining the distance between the chain pins according to the lengthened chain image.
Further, after acquiring the original chain image of the chain to be detected, before determining the single line detection area image between the pins according to the type of the chain to be detected and the original chain image, the method further comprises:
and eliminating chain pins at the head end and the tail end in the original chain image.
Further, the removing the chain pins at the head end and the tail end in the original chain image comprises the following steps:
extracting a chain main body image from an original chain image, and determining vertex coordinate information of the chain main body image;
and eliminating chain pins at two ends in the original chain image according to the vertex coordinate information.
Further, if the type of the chain to be detected is a first preset type, after determining the row width of the image of the single row detection area, the method further includes:
determining a distortion region in the single-line detection region image, and determining a line width compensation value according to the distortion region;
And compensating the line width by using the line width compensation value.
Further, detecting whether a row corresponding to the single-row detection area image lacks a chain piece according to the row width, the gap width and the type of the chain to be detected, including:
determining a judging threshold according to the type of the chain to be detected, and determining a difference value between the row width and the sum of the gap widths;
if the difference value is larger than or equal to the judging threshold value, judging that the row corresponding to the single-row detection area image does not lack a chain piece;
if the difference value is smaller than the judging threshold value, judging that the row corresponding to the single-row detection area image lacks a chain piece, and determining the position of the chain missing piece according to the gap width.
Memory 520 may include primarily a program storage area and a data storage area, wherein the program storage area may store an operating system, at least one application program required for functionality; the storage data area may store data created according to the use of the terminal, etc. In addition, memory 520 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage device. In some examples, memory 520 may further include memory located remotely from processor 510, which may be connected to the electronic device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 530 may be used to receive input power construction drawings and generate key signal inputs related to user settings and function control of the electronic device. The output 540 may include a display device such as a display screen.
Example IV
A fourth embodiment of the present application also provides a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform a method for detecting a chain-in-chain-segment loss, the method comprising:
acquiring an original chain image of a chain to be detected, and determining a single-row detection area image among all chain pins according to the type of the chain to be detected and the original chain image;
for any single-row detection area image, extracting gaps in the single-row detection area image, and determining the respective corresponding gap width of each gap;
and determining the row width of the single-row detection area image, and detecting whether the row corresponding to the single-row detection area image lacks a chain piece according to the row width, the gap width and the type of the chain to be detected.
Further, the original chain image of the chain to be detected is acquired, including:
and in the process of rotating the chain to be detected, acquiring image information of the chain to be detected line by line until the acquisition line number reaches a preset threshold value, so as to obtain an original chain image, wherein the preset threshold value is larger than the actual line number of the chain to be detected.
Further, determining a single line detection area image between the chain pins according to the type of the chain to be detected and the original chain image, including:
determining a first chain pin in an original chain image according to the type of the chain to be detected and the original chain image;
and extracting a preset number of single-row detection area images corresponding to the type of the chain to be detected from the first chain pin, wherein the single-row detection area images are area images between two chain pins.
Further, according to the type of the chain to be detected and the original chain image, determining the first chain pin in the original chain image includes:
determining the distance between the chain pins in the original chain image, and determining target chain pins meeting the preset first chain pin condition corresponding to the type of the chain to be detected according to the sequential arrangement of the distance;
the target chain pin is determined to be the first chain pin in the original chain image.
Further, extracting a preset number of single-row detection area images corresponding to the type of the chain to be detected, including:
extracting a preset number of single-row area images corresponding to the type of the chain to be detected;
filtering impurity influence areas in the single-row area images for any single-row area image, and extracting single-row main body external images from the single-row area images after filtering;
For any target line, determining a single-line detection area image of the target line according to the single-line area image of the target line and the single-line main body external image.
Further, extracting slits in the single-line detection area image, and determining a slit width corresponding to each slit, including:
acquiring the height of a single-row detection area image, and determining the row type of the single-row detection area image according to the height of the single-row detection area image;
and extracting gaps in the single-row detection area image according to the row type, and determining the respective corresponding gap width of each gap.
Further, extracting a slit in the single-line detection area image according to the line type includes:
if the line type is double-layer chain pins, segmenting a target area in the image of the single-line detection area;
and extracting gaps in the cut single-row detection area image.
Further, determining the spacing between the pins in the original chain image includes:
extracting a chain pin segment image in an original chain image, and lengthening a chain pin in the chain pin segment image to obtain a lengthened chain pin segment image;
and combining the pre-extracted chain main body image with the lengthened chain pin segment image to obtain a lengthened chain image, and determining the distance between the chain pins according to the lengthened chain image.
Further, after acquiring the original chain image of the chain to be detected, before determining the single line detection area image between the pins according to the type of the chain to be detected and the original chain image, the method further comprises:
and eliminating chain pins at the head end and the tail end in the original chain image.
Further, the removing the chain pins at the head end and the tail end in the original chain image comprises the following steps:
extracting a chain main body image from an original chain image, and determining vertex coordinate information of the chain main body image;
and eliminating chain pins at two ends in the original chain image according to the vertex coordinate information.
Further, if the type of the chain to be detected is a first preset type, after determining the row width of the image of the single row detection area, the method further includes:
determining a distortion region in the single-line detection region image, and determining a line width compensation value according to the distortion region;
and compensating the line width by using the line width compensation value.
Further, detecting whether a row corresponding to the single-row detection area image lacks a chain piece according to the row width, the gap width and the type of the chain to be detected, including:
determining a judging threshold according to the type of the chain to be detected, and determining a difference value between the row width and the sum of the gap widths;
If the difference value is larger than or equal to the judging threshold value, judging that the row corresponding to the single-row detection area image does not lack a chain piece;
if the difference value is smaller than the judging threshold value, judging that the row corresponding to the single-row detection area image lacks a chain piece, and determining the position of the chain missing piece according to the gap width.
Of course, the storage medium containing the computer executable instructions provided in the embodiments of the present application is not limited to the above method operations, and may also perform the related operations in the chain-in-chain-piece missing detection method provided in any embodiment of the present application.
From the above description of embodiments, it will be clear to a person skilled in the art that the present application may be implemented by means of software and necessary general purpose hardware, but of course also by means of hardware, although in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, etc., including several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to execute the method of the embodiments of the present application.
It should be noted that, in the above-mentioned embodiments of the search apparatus, each unit and module included are only divided according to the functional logic, but not limited to the above-mentioned division, as long as the corresponding functions can be implemented; in addition, the specific names of the functional units are also only for distinguishing from each other, and are not used to limit the protection scope of the present application.
Note that the above is only a preferred embodiment of the present application and the technical principle applied. It will be understood by those skilled in the art that the present application is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the application. Therefore, while the application has been described in connection with the above embodiments, the application is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the application, which is set forth in the following claims.

Claims (10)

1. A method for detecting a missing chain piece in a chain, the method comprising:
acquiring an original chain image of a chain to be detected, and determining a single-row detection area image among all chain pins according to the type of the chain to be detected and the original chain image;
For any single-row detection area image, extracting gaps in the single-row detection area image, and determining the gap width corresponding to each gap;
and determining the row width of the single-row detection area image, and detecting whether the row corresponding to the single-row detection area image lacks chain pieces according to the row width, the gap width and the type of the chain to be detected.
2. The method according to claim 1, wherein the acquiring the raw chain image of the chain to be detected comprises:
and in the process of rotating the chain to be detected, acquiring image information of the chain to be detected line by line until the acquisition line number reaches a preset threshold value, so as to obtain an original chain image, wherein the preset threshold value is larger than the pixel line number corresponding to the size of the chain to be detected.
3. The method of claim 1, wherein said determining a single line image of the detection area between the pins from the type of chain to be detected and the original image of the chain comprises:
determining a first chain pin in the original chain image according to the type of the chain to be detected and the original chain image;
and extracting a preset number of single-row detection area images corresponding to the type of the chain to be detected from the first chain pin, wherein the single-row detection area images are area images between two chain pins.
4. A method according to claim 3, wherein determining the first chain pin in the original chain image from the type of chain to be detected and the original chain image comprises:
determining the distance between the chain pins in the original chain image, and determining target chain pins meeting the preset first chain pin condition corresponding to the type of the chain to be detected according to the sequential arrangement of the distance;
determining the target chain pin as a first chain pin in the original chain image;
the determining the distance between the chain pins in the original chain image comprises the following steps:
extracting a chain pin segment image in the original chain image, and lengthening a chain pin in the chain pin segment image to obtain a lengthened chain pin segment image;
and combining the pre-extracted chain main body image with the lengthened chain pin segment image to obtain a lengthened chain image, and determining the distance between the chain pins according to the lengthened chain image.
5. A method according to claim 3, wherein extracting a preset number of single line detection area images corresponding to the type of chain to be detected comprises:
extracting a preset number of single-row area images corresponding to the type of the chain to be detected;
Filtering impurity influence areas in the single-line area images for any single-line area image, and extracting single-line main body external images from the single-line area images after filtering;
for any target line, determining a single-line detection area image of the target line according to the single-line area image of the target line and the single-line main body external image.
6. The method of claim 1, wherein the extracting the slits in the single line detection area image and determining a respective slit width for each slit comprises:
acquiring the height of the single-row detection area image, and determining the row type of the single-row detection area image according to the height of the single-row detection area image, wherein the row type comprises a single-layer chain pin and a double-layer chain pin;
extracting gaps in the single-row detection area image according to the row type, and determining the gap width corresponding to each gap;
extracting a gap in the single line detection area image according to the line type, including:
if the line type is a double-layer chain pin, cutting a target area in the single-line detection area image;
and extracting gaps in the single-row detection area image after segmentation.
7. The method of claim 1, wherein after said acquiring an original chain image of a chain to be inspected, said method further comprises, prior to said determining a single row of inspection area images between pins based on a type of chain to be inspected and said original chain image:
removing chain pins at the head end and the tail end of the original chain image;
the removing the chain pins at the head end and the tail end in the original chain image comprises the following steps:
extracting a chain main body image from the original chain image, and determining vertex coordinate information of the chain main body image;
and eliminating chain pins at the upper end and the lower end in the original chain image according to the vertex coordinate information.
8. The method according to claim 1, wherein after said determining the line width of the single line detection area image, if the type of the chain to be detected is a first preset type, the method further comprises:
determining a distortion region in the single-line detection region image, and determining a line width compensation value according to the distortion region;
and compensating the line width by using the line width compensation value.
9. The method according to claim 1, wherein the detecting whether the row corresponding to the single-row detection area image lacks a chain piece according to the row width, the gap width, and the type of the chain to be detected includes:
Determining a judging threshold according to the type of the chain to be detected, and determining a difference value between the row width and the sum of the gap widths;
if the difference value is larger than or equal to the judging threshold value, judging that the row corresponding to the single-row detection area image does not lack a chain piece;
and if the difference value is smaller than the judging threshold value, judging that the row corresponding to the single-row detection area image lacks a chain piece, and determining the position of the chain missing piece according to the gap width.
10. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs,
when executed by the one or more processors, causes the one or more processors to implement the method of chain in chain strand loss detection as recited in any one of claims 1-9.
CN202310935618.6A 2023-07-28 2023-07-28 Chain piece missing detection method in chain and electronic equipment Active CN116660273B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310935618.6A CN116660273B (en) 2023-07-28 2023-07-28 Chain piece missing detection method in chain and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310935618.6A CN116660273B (en) 2023-07-28 2023-07-28 Chain piece missing detection method in chain and electronic equipment

Publications (2)

Publication Number Publication Date
CN116660273A true CN116660273A (en) 2023-08-29
CN116660273B CN116660273B (en) 2023-10-27

Family

ID=87717408

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310935618.6A Active CN116660273B (en) 2023-07-28 2023-07-28 Chain piece missing detection method in chain and electronic equipment

Country Status (1)

Country Link
CN (1) CN116660273B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10300426A (en) * 1997-05-01 1998-11-13 Tsubakimoto Chain Co Roller chain wear detecting method and device
US20110093218A1 (en) * 2009-10-20 2011-04-21 Tibor Vozner Conveyor chain monitoring system and method
CN205484094U (en) * 2016-01-18 2016-08-17 桂盟链条(太仓)有限公司 Chain piece concentric reducer check out test set
CN107848599A (en) * 2015-07-06 2018-03-27 科尼全球公司 For checking the arrangements and methods of chain situation
CN108802052A (en) * 2018-07-23 2018-11-13 西安工程大学 A kind of detecting system and its detection method about slide fastener defect
CN113008894A (en) * 2021-01-26 2021-06-22 宁波诺视智能科技有限公司 Chain appearance detection device and method
WO2022036919A1 (en) * 2020-08-17 2022-02-24 深圳市商汤科技有限公司 Defect detection method and apparatus, and electronic device and computer storage medium
CN114674833A (en) * 2022-05-30 2022-06-28 菲特(天津)检测技术有限公司 Chain detection device and detection method
CN115032709A (en) * 2022-06-13 2022-09-09 杭州盾牌链条有限公司 Chain image detection equipment and chain image contrast detection method
CN115588018A (en) * 2022-10-10 2023-01-10 菲特(天津)检测技术有限公司 Image processing method and device, electronic equipment and storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10300426A (en) * 1997-05-01 1998-11-13 Tsubakimoto Chain Co Roller chain wear detecting method and device
US20110093218A1 (en) * 2009-10-20 2011-04-21 Tibor Vozner Conveyor chain monitoring system and method
CN107848599A (en) * 2015-07-06 2018-03-27 科尼全球公司 For checking the arrangements and methods of chain situation
CN205484094U (en) * 2016-01-18 2016-08-17 桂盟链条(太仓)有限公司 Chain piece concentric reducer check out test set
CN108802052A (en) * 2018-07-23 2018-11-13 西安工程大学 A kind of detecting system and its detection method about slide fastener defect
WO2022036919A1 (en) * 2020-08-17 2022-02-24 深圳市商汤科技有限公司 Defect detection method and apparatus, and electronic device and computer storage medium
CN113008894A (en) * 2021-01-26 2021-06-22 宁波诺视智能科技有限公司 Chain appearance detection device and method
CN114674833A (en) * 2022-05-30 2022-06-28 菲特(天津)检测技术有限公司 Chain detection device and detection method
CN115032709A (en) * 2022-06-13 2022-09-09 杭州盾牌链条有限公司 Chain image detection equipment and chain image contrast detection method
CN115588018A (en) * 2022-10-10 2023-01-10 菲特(天津)检测技术有限公司 Image processing method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN116660273B (en) 2023-10-27

Similar Documents

Publication Publication Date Title
CN103258201B (en) A kind of form lines extracting method of amalgamation of global and local message
CN110097542B (en) Method and device for detecting chip bubbles and storage medium
CN108510476B (en) Mobile phone screen circuit detection method based on machine vision
CN110705405A (en) Target labeling method and device
CN108318773B (en) Transmission conductor strand breakage detection method and system
CN108229232B (en) Method and device for scanning two-dimensional codes in batch
CN113284154B (en) Steel coil end face image segmentation method and device and electronic equipment
KR102470422B1 (en) Method of automatically detecting sewing stitch based on CNN feature map and system for the same
WO2019019250A1 (en) Method and apparatus for acquiring inclination value of inclined image, and terminal and storage medium
CN113822385A (en) Coal conveying abnormity monitoring method, device and equipment based on image and storage medium
CN107194971B (en) Golden finger positioning method and device and computer readable storage medium
CN116843687A (en) Communication optical cable surface flaw detection method and device
CN116660273B (en) Chain piece missing detection method in chain and electronic equipment
CN113469974B (en) Method and system for monitoring state of grate plate of pellet grate
CN110992323A (en) Steel strip detection method and device based on image processing and steel clamping detection method
CN113920073A (en) Thin card counting method and device, electronic equipment and storage medium
CN108268868B (en) Method and device for acquiring inclination value of identity card image, terminal and storage medium
CN117788394A (en) State detection method, device, equipment and storage medium of power equipment
CN112967224A (en) Electronic circuit board detection system, method and medium based on artificial intelligence
CN112634259A (en) Automatic modeling and positioning method for keyboard keycaps
CN113012137B (en) Panel defect inspection method, system, terminal device and storage medium
CN116597421A (en) Parking space monitoring method, device and equipment based on image recognition
CN116029987A (en) Welding quality detection method and device and electronic equipment
CN115424181A (en) Target object detection method and device
CN113255637A (en) Image boundary positioning method, image processing device, image processing apparatus 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
GR01 Patent grant
GR01 Patent grant