CN114418971A - Fault detection method and device, electronic equipment and storage medium - Google Patents

Fault detection method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114418971A
CN114418971A CN202210006218.2A CN202210006218A CN114418971A CN 114418971 A CN114418971 A CN 114418971A CN 202210006218 A CN202210006218 A CN 202210006218A CN 114418971 A CN114418971 A CN 114418971A
Authority
CN
China
Prior art keywords
detected
image
straight line
gap distance
edge
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
CN202210006218.2A
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.)
Shanghai Electric Group Corp
Original Assignee
Shanghai Electric Group Corp
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 Shanghai Electric Group Corp filed Critical Shanghai Electric Group Corp
Priority to CN202210006218.2A priority Critical patent/CN114418971A/en
Publication of CN114418971A publication Critical patent/CN114418971A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • 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
    • G06T2207/30164Workpiece; Machine component

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Quality & Reliability (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

The application provides a fault detection method, a fault detection device, electronic equipment and a storage medium, and relates to the technical field of fault detection. The fault is detected in a machine vision mode, so that whether the electromagnetic brake breaks down or not is accurately judged, and the use process is convenient and simple.

Description

Fault detection method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of fault detection technologies, and in particular, to a fault detection method and apparatus, an electronic device, and a storage medium.
Background
With the development of society, subways become main transportation means for rail transit in various cities in China. In the faults of the subway, the doors of the subway frequently move in the operation peak period with large passenger flow due to the large number of the doors of the subway, and the caused faults are higher in the total number of the faults of the vehicles.
The electromagnetic brake is an important component in a train door system, in the prior art, a force sensitive resistor and other sensors are additionally arranged between two meshing gears of the electromagnetic brake, and the sensors are combined with a peripheral circuit to detect and monitor the sensors to judge whether the brake works reliably and stably. However, the gap between the two meshing gears of the electromagnetic brake is very small, the difficulty in arranging the sensor between the two meshing gears is high, and the accuracy of the sensor measurement is not high.
Disclosure of Invention
In order to solve the problems in the prior art, embodiments of the present application provide a fault detection method, apparatus, electronic device, and storage medium, which not only accurately determine whether a fault occurs in an electromagnetic brake, but also are convenient and simple to use.
In a first aspect, an embodiment of the present application provides a fault detection method, where the method includes:
acquiring an image to be detected acquired by an image acquisition module; the image to be detected comprises a first object to be detected and a second object to be detected;
performing edge detection processing on the image to be detected, and determining a target edge straight line of the first object to be detected and a target edge straight line of the second object to be detected;
determining a gap distance between the first object to be detected and the second object to be detected based on the target edge straight line of the first object to be detected and the target edge straight line of the second object to be detected;
and if the gap distance is not within the preset range, performing fault alarm on the first object to be detected and the second object to be detected.
In a possible implementation manner, after the image to be detected acquired by the image acquisition module is acquired, before the edge detection processing is performed on the first object to be detected and the second object to be detected in the image to be detected, the method further includes:
denoising the noise information in the image to be detected to obtain a denoised image; the noise information in the image to be detected is image information in the image to be detected except for image information of a first object to be detected and image information of a second object to be detected;
performing graying processing based on the de-noised image to obtain a grayscale image; the gray image comprises the first object to be detected and the second object to be detected.
In a possible implementation manner, the performing an edge detection process on the image to be detected to determine a target edge straight line of the first object to be detected and a target edge straight line of the second object to be detected includes:
performing edge detection processing on the image to be detected to obtain an edge detection image, and image edge information of the first object to be detected and image edge information of the second object to be detected;
performing straight line extraction on the edge detection image, and determining a plurality of edge straight lines in the edge detection image;
and respectively determining a target edge straight line corresponding to the image edge information of the first object to be detected and a target edge straight line corresponding to the image edge information of the second object to be detected from the edge straight lines.
In a possible embodiment, the determining a gap distance between the first object to be detected and the second object to be detected based on the target edge straight line of the first object to be detected and the target edge straight line of the second object to be detected includes:
determining a pixel gap distance between a target edge straight line of the first object to be detected and a target edge straight line of the second object to be detected;
and determining the gap distance between the first object to be detected and the second object to be detected based on the pixel gap distance.
In a possible implementation, the determining a gap distance between the first object to be detected and the second object to be detected based on the pixel gap distance includes:
and converting the pixel gap distance into the gap distance between the first object to be detected and the second object to be detected based on the distance from the image acquisition module at the set position to the first object to be detected and the second object to be detected, the pixel gap distance, the focal length corresponding to the image acquisition module and the actual distance corresponding to the unit pixel distance.
In a second aspect, an embodiment of the present application provides a fault detection apparatus, including:
the acquisition unit is used for acquiring the image to be detected acquired by the image acquisition module; the image to be detected comprises a first object to be detected and a second object to be detected;
the edge detection unit is used for carrying out edge detection processing on the image to be detected and determining a target edge straight line of the first object to be detected and a target edge straight line of the second object to be detected;
the determining unit is used for determining the gap distance between the first object to be detected and the second object to be detected based on the target edge straight line of the first object to be detected and the target edge straight line of the second object to be detected;
and the alarm unit is used for carrying out fault alarm on the first object to be detected and the second object to be detected if the gap distance is not within a preset range.
In a possible embodiment, the apparatus further comprises:
the preprocessing unit is used for carrying out denoising processing on the noise information in the image to be detected to obtain a denoised image; the noise information in the image to be detected is image information in the image to be detected except for image information of a first object to be detected and image information of a second object to be detected;
performing graying processing based on the de-noised image to obtain a grayscale image; the gray image comprises the first object to be detected and the second object to be detected.
In a possible implementation, the edge detection unit is further configured to:
performing edge detection processing on the image to be detected to obtain an edge detection image, and image edge information of the first object to be detected and image edge information of the second object to be detected;
performing straight line extraction on the edge detection image, and determining a plurality of edge straight lines in the edge detection image;
and respectively determining a target edge straight line corresponding to the image edge information of the first object to be detected and a target edge straight line corresponding to the image edge information of the second object to be detected from the edge straight lines.
In a possible implementation, the determining unit is further configured to:
determining a pixel gap distance between a target edge straight line of the first object to be detected and a target edge straight line of the second object to be detected;
and determining the gap distance between the first object to be detected and the second object to be detected based on the pixel gap distance.
In a possible implementation, the determining unit is further configured to:
and converting the pixel gap distance into the gap distance between the first object to be detected and the second object to be detected based on the distance from the image acquisition module at the set position to the first object to be detected and the second object to be detected, the pixel gap distance, the focal length corresponding to the image acquisition module and the actual distance corresponding to the unit pixel distance.
In a third aspect, an embodiment of the present application provides an electronic device, including a memory and a processor, where the memory stores a computer program that is executable on the processor, and when the computer program is executed by the processor, the steps of the fault detection method in any one of the above first aspects are implemented.
In a fourth aspect, the present application provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the steps of the fault detection method in any one of the above first aspects are implemented.
According to the fault detection method provided by the embodiment of the application, the image to be detected acquired by the image acquisition module is acquired, the edge detection processing is carried out on the image to be detected, the determined target edge straight line of the first object to be detected and the determined target edge straight line of the second object to be detected are subjected to distance measurement, the gap distance is determined, whether the first object to be detected and the second object to be detected are in fault or not is finally judged according to the gap distance, and if the gap distance is not within the preset range, fault alarm is carried out. According to the fault detection method provided by the embodiment of the application, whether the electromagnetic brake breaks down or not is accurately judged in a machine vision mode, and the use process is convenient and simple.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a schematic flowchart illustrating a fault detection method provided in an embodiment of the present application;
fig. 2 is a schematic flow chart illustrating another fault detection method provided in the embodiment of the present application;
fig. 3 is a schematic structural diagram illustrating a fault detection apparatus provided in an embodiment of the present application;
fig. 4 is a schematic structural diagram illustrating another fault detection apparatus provided in an embodiment of the present application;
fig. 5 shows a schematic structural diagram of an electronic device provided in an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application clearer, the present application will be described in further detail with reference to the accompanying drawings, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that references in the specification of the present application to the terms "comprises" and "comprising," and variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In order to solve the problem that fault detection of an electromagnetic brake in a subway door is complex in the prior art, the embodiment of the application provides a convenient, fast and efficient fault detection method. By the fault detection method provided by the embodiment of the application, the faults which may occur can be conveniently and efficiently detected in a machine vision mode.
Fig. 1 shows a schematic flowchart of a fault detection method provided in an embodiment of the present application, which is applied to an electronic device. The electronic device may be a computer or other device disposed in a cab of a subway, and as shown in fig. 1, the fault detection method provided in the embodiment of the present application includes the following steps:
step S101: and acquiring the image to be detected acquired by the image acquisition module.
The image to be detected comprises a first object to be detected and a second object to be detected.
Illustratively, the first object to be detected and the second object to be detected are meshing gears of an electromagnetic brake. And acquiring an image to be detected for the meshing gear of the actual electromagnetic brake through an image acquisition module with a preset position. The preset image acquisition module can be a camera and other equipment, and the shooting angle, the focal length of the camera and the like are adjusted, so that the user can take a picture.
Before shooting, the camera can be arranged right above the first object to be detected and the second object to be detected. In the subway operation process, a camera arranged inside a sliding plug door starts to photograph a first object to be detected and a second object to be detected, photographs can be taken according to a set time period, an image to be detected is acquired, the image to be detected is acquired by a computer arranged in a cab of the subway, the acquired image to be detected is subjected to continuous subsequent processing, and the gap distance between the first object to be detected and the second object to be detected is judged.
Further, after the image to be detected is acquired, the image to be detected may be preprocessed, and the specific preprocessing process may be: denoising noise information in the image to be detected to obtain a denoised image, wherein the noise information in the image to be detected is image information in the image to be detected except image information of the first object to be detected and image information of the second object to be detected, and carrying out graying processing based on the denoised image to obtain a grayscale image.
The gray image comprises a first object to be detected and a second object to be detected.
In order to accurately acquire the gap distance between the first object to be detected and the second object to be detected, the image to be detected can be processed, image information except the first object to be detected and the second object to be detected in the image to be detected is removed as noise information to obtain a de-noised image, and the de-noised image is subjected to graying processing to obtain a grayscale image. After preprocessing, noise information in the image information can be effectively removed, and the gap distance between the first object to be detected and the second object to be detected can be accurately acquired in subsequent steps.
Step S102: and performing edge detection processing on the image to be detected, and determining a target edge straight line of the first object to be detected and a target edge straight line of the second object to be detected.
In a possible embodiment, in order to measure the gap distance between the first object to be detected and the second object to be detected, it is necessary to determine which of the two straight lines is measured on the image to be detected, and therefore, the boundary of the first object to be detected and the boundary of the second object to be detected need to be highlighted, and the measurement accuracy is improved. And performing edge detection processing on the image to be detected, and determining a target edge straight line of the first object to be detected and a target edge straight line of the second object to be detected.
Specifically, a target edge straight line of the first object to be detected and a target edge straight line of the second object to be detected may be determined as follows: the method comprises the steps of carrying out edge detection processing on an image to be detected to obtain an edge detection image, image edge information of a first object to be detected and image edge information of a second object to be detected, carrying out straight line extraction on the edge detection image to determine a plurality of edge straight lines in the edge detection image, and respectively determining a target edge straight line corresponding to the image edge information of the first object to be detected and a target edge straight line corresponding to the image edge information of the second object to be detected from the plurality of edge straight lines.
For example, the first object to be detected and the second object to be detected are meshing gears of an electromagnetic brake. The first object to be detected is referred to as a first meshing gear, and the second object to be detected is referred to as a second meshing gear.
The edge detection processing is performed on the image to be detected, so that an edge detection image with all determined edge information can be obtained, and the outline of the meshing gear is determined substantially. The image edge information of the first meshing gear and the image edge information of the second meshing gear can be acquired from the edge detection image. The edge information in the image to be detected can be determined through an edge detection algorithm or a characteristic extraction mode.
The method comprises the steps of determining a plurality of edge information from an edge detection image, performing straight line extraction on the edge information of the edge detection image to obtain a plurality of edge straight lines, screening the edge straight lines, and determining two required target edge straight lines, namely a target edge straight line corresponding to the image edge information of a first object to be detected and a target edge straight line corresponding to the image edge information of a second object to be detected.
Step S103: and determining the gap distance between the first object to be detected and the second object to be detected based on the target edge straight line of the first object to be detected and the target edge straight line of the second object to be detected.
In one possible embodiment, a pixel gap distance between a target edge straight line of the first object to be detected and a target edge straight line of the second object to be detected is determined, and a gap distance between the first object to be detected and the second object to be detected is determined based on the pixel gap distance.
The target edge straight line of the first object to be detected and the target edge straight line of the second object to be detected in the edge detection image are determined, and the pixel gap distance between the first object to be detected and the second object to be detected in the edge detection image can be calculated. After the pixel gap distance is determined, the pixel gap distance may be converted into a real gap distance between the first object to be detected and the second object to be detected by conversion.
Illustratively, the pixel gap distance is converted into the gap distance between the first object to be detected and the second object to be detected based on the distances from the image acquisition module at the set position to the first object to be detected and the second object to be detected, the pixel gap distance, the focal length corresponding to the image acquisition module, and the actual distance corresponding to the unit pixel distance.
In the process of taking a picture, the camera is fixed in position. The positions of the first object to be detected and the second object to be detected are right below the camera, and after the positions are fixed, the distances from the camera to the first object to be detected and the second object to be detected are stored in a computer in a subway cab in advance. And then the focal length of the camera and the actual distance corresponding to the unit pixel distance on the image to be detected are stored in a computer in the subway cab in advance. Wherein, the actual distance corresponding to the unit pixel distance on the image to be detected can be understood as a scale.
In the placing process of the camera, the first object to be detected and the second object to be detected are stationary, the middle point of the distance between the first object to be detected and the second object to be detected in the stationary gap is determined, the vertical line is drawn for the middle point of the distance between the stationary gap, the camera is placed on the vertical line, and after the position of the camera is fixed, the distance from the camera to the first object to be detected and the second object to be detected can be the distance from the position of the camera to the middle point of the distance between the first object to be detected and the second object to be detected in the stationary gap.
When shooting the first object to be detected and the second object to be detected, the distance from the camera to the first object to be detected and the distance from the camera to the second object to be detected are determined.
And then acquiring the focal length of the camera and the actual distance corresponding to the unit pixel distance on the image to be detected. Wherein, the actual distance corresponding to the unit pixel distance on the image to be detected can be understood as a scale.
The three conditions can be determined when photographing, then the pixel gap distance is obtained, and the actual gap distance between the first object to be detected and the second object to be detected can be determined through a formula. The formula for determining the gap distance is as follows:
Figure BDA0003456876120000091
wherein d issExpressed as the actual clearance distance between the first meshing gear and the second meshing gear in the electromagnetic brake; z is the distance from the camera to the middle point of the distance of the static clearance between the first meshing gear and the second meshing gear; dpExpressed as a pixel gap distance; d represents an actual distance corresponding to the unit pixel distance; f denotes the focal length of the camera.
The actual gap distance between the first meshing gear and the second meshing gear in the electromagnetic brake can be determined through the above formula.
Step S104: and if the gap distance is not within the preset range, performing fault alarm on the first object to be detected and the second object to be detected.
In a possible embodiment, if the obtained gap distance is within a preset range, the gap indicates that the gap is within a normal working range, and if the gap distance is not within the preset range, a fault alarm is performed on the first object to be detected and the second object to be detected.
Compared with the fault detection method in the prior art, the fault detection method provided by the embodiment of the application is characterized in that the real gap distance between the first object to be detected and the second object to be detected is finally determined by acquiring the pixel gap distance between the first object to be detected and the second object to be detected in the image to be detected in a machine vision mode. The method and the device can conveniently and intuitively detect the possible faults. In addition, the method provided by the embodiment of the application is easier to implement, high in detection efficiency and precision and more economical in implementation mode.
The embodiment of the present application provides a detailed fault detection method, as shown in fig. 2, the fault detection method includes the following steps:
step S201: and acquiring the image to be detected acquired by the image acquisition module.
Step S202: and denoising the noise information in the image to be detected to obtain a denoised image.
Step S203: and carrying out graying processing based on the de-noised image to obtain a grayscale image.
Step S204: and carrying out edge detection processing on the gray level image to obtain an edge detection image, and image edge information of the first object to be detected and image edge information of the second object to be detected.
Step S205: and performing straight line extraction on the edge detection image, and determining a plurality of edge straight lines in the edge detection image.
Step S206: and respectively determining a target edge straight line corresponding to the image edge information of the first object to be detected and a target edge straight line corresponding to the image edge information of the second object to be detected from the edge straight lines.
Step S207: and determining the pixel gap distance between the target edge straight line of the first object to be detected and the target edge straight line of the second object to be detected.
Step S208: and converting the pixel gap distance into the gap distance between the first object to be detected and the second object to be detected based on the distance from the image acquisition module at the set position to the first object to be detected and the second object to be detected, the pixel gap distance, the focal length corresponding to the image acquisition module and the actual distance corresponding to the unit pixel distance.
Based on the same inventive concept, an embodiment of the present invention further provides a schematic structural diagram of a fault detection apparatus, as shown in fig. 3, the fault detection apparatus includes:
an obtaining unit 301, configured to obtain an image to be detected, which is acquired by the image acquisition module; the image to be detected comprises a first object to be detected and a second object to be detected;
an edge detection unit 302, configured to perform edge detection processing on an image to be detected, and determine a target edge straight line of a first object to be detected and a target edge straight line of a second object to be detected;
a determining unit 303, configured to determine a gap distance between the first object to be detected and the second object to be detected based on a target edge straight line of the first object to be detected and a target edge straight line of the second object to be detected;
and the alarm unit 304 is configured to perform fault alarm on the first object to be detected and the second object to be detected if the gap distance is not within the preset range.
In a possible implementation, the edge detection unit 302 is further configured to:
carrying out edge detection processing on an image to be detected to obtain an edge detection image, image edge information of a first object to be detected and image edge information of a second object to be detected;
performing straight line extraction on the edge detection image, and determining a plurality of edge straight lines in the edge detection image;
and respectively determining a target edge straight line corresponding to the image edge information of the first object to be detected and a target edge straight line corresponding to the image edge information of the second object to be detected from the edge straight lines.
In a possible implementation, the determining unit 303 is further configured to:
determining a pixel gap distance between a target edge straight line of a first object to be detected and a target edge straight line of a second object to be detected;
and determining the gap distance between the first object to be detected and the second object to be detected based on the pixel gap distance.
In a possible implementation, the determining unit 303 is further configured to:
and converting the pixel gap distance into the gap distance between the first object to be detected and the second object to be detected based on the distance from the image acquisition module at the set position to the first object to be detected and the second object to be detected, the pixel gap distance, the focal length corresponding to the image acquisition module and the actual distance corresponding to the unit pixel distance.
In a possible implementation manner, fig. 4 shows a schematic structural diagram of another fault detection apparatus provided in an embodiment of the present application, where the fault detection apparatus further includes:
the preprocessing unit 401 is configured to perform denoising processing on noise information in an image to be detected to obtain a denoised image; the noise information in the image to be detected is image information in the image to be detected except for the image information of the first object to be detected and the image information of the second object to be detected;
carrying out graying processing based on the de-noised image to obtain a grayscale image; the gray image comprises a first object to be detected and a second object to be detected.
The embodiment of the present application further provides an electronic device, where the electronic device at least includes a memory and a processor for storing data, and for the processor for data Processing, when performing Processing, the processor may be implemented by using a microprocessor, a CPU, a GPU (Graphics Processing Unit), a DSP, or an FPGA. For the memory, the memory stores therein an operation instruction, which may be a computer executable code, and the operation instruction implements the steps in the flow of the fault detection method according to the embodiment of the present application.
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application. As shown in fig. 5, the electronic device 500 includes a memory 501, a processor 502, a data acquisition module 503, and a bus 504. The memory 501, the processor 502 and the data acquisition module 503 are all connected by a bus 504, and the bus 504 is used for data transmission among the memory 501, the processor 502 and the data acquisition module 503.
The memory 501 may be used to store software programs and modules, and the processor 502 executes various functional applications and data processing of the electronic device 500 by running the software programs and modules stored in the memory 501, such as the fault detection method provided in the embodiments of the present application. The memory 501 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program of at least one application, and the like; the storage data area may store data created according to the use of the electronic device 500, and the like. Further, the memory 501 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 volatile solid state storage device.
The processor 502 is a control center of the electronic device 500, connects various parts of the entire electronic device 500 using the bus 504 and various interfaces and lines, and performs various functions of the electronic device 500 and processes data by running or executing software programs and/or modules stored in the memory 501 and calling data stored in the memory 501. Alternatively, the processor 502 may include one or more Processing units, such as a CPU, a GPU (Graphics Processing Unit), a digital Processing Unit, and the like.
The data obtaining module 503 is configured to obtain data, where the data obtaining module 503 may be an image collecting module, or specifically may be a camera.
An embodiment of the present application further provides a computer-readable non-volatile storage medium, which includes program code for causing a computing terminal to execute any one of the steps of the fault detection method described above when the program code runs on the computing terminal.
In some possible embodiments, various aspects of the fault detection method provided by the present application may also be implemented in the form of a program product including program code for causing a computer device to perform the steps of the fault detection method according to various exemplary embodiments of the present application described above in this specification when the program product runs on the computer device, for example, the computer device may perform the flow of the fault detection method of steps S101 to S104 shown in fig. 1.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (13)

1. A method of fault detection, the method comprising:
acquiring an image to be detected acquired by an image acquisition module; the image to be detected comprises a first object to be detected and a second object to be detected;
performing edge detection processing on the image to be detected, and determining a target edge straight line of the first object to be detected and a target edge straight line of the second object to be detected;
determining a gap distance between the first object to be detected and the second object to be detected based on the target edge straight line of the first object to be detected and the target edge straight line of the second object to be detected;
and if the gap distance is not within the preset range, performing fault alarm on the first object to be detected and the second object to be detected.
2. The method according to claim 1, wherein the first object to be inspected and the second object to be inspected are meshing gears of an electromagnetic brake.
3. The method according to claim 1, wherein after the image to be detected acquired by the image acquisition module is acquired, and before the edge detection processing is performed on the first object to be detected and the second object to be detected in the image to be detected, the method further comprises:
denoising the noise information in the image to be detected to obtain a denoised image; the noise information in the image to be detected is image information in the image to be detected except for image information of a first object to be detected and image information of a second object to be detected;
performing graying processing based on the de-noised image to obtain a grayscale image; the gray image comprises the first object to be detected and the second object to be detected.
4. The method according to claim 1, wherein the performing edge detection processing on the image to be detected to determine a target edge straight line of the first object to be detected and a target edge straight line of the second object to be detected comprises:
performing edge detection processing on the image to be detected to obtain an edge detection image, and image edge information of the first object to be detected and image edge information of the second object to be detected;
performing straight line extraction on the edge detection image, and determining a plurality of edge straight lines in the edge detection image;
and respectively determining a target edge straight line corresponding to the image edge information of the first object to be detected and a target edge straight line corresponding to the image edge information of the second object to be detected from the edge straight lines.
5. The method according to claim 1, wherein the determining a gap distance between the first object to be detected and the second object to be detected based on the target edge straight line of the first object to be detected and the target edge straight line of the second object to be detected comprises:
determining a pixel gap distance between a target edge straight line of the first object to be detected and a target edge straight line of the second object to be detected;
and determining the gap distance between the first object to be detected and the second object to be detected based on the pixel gap distance.
6. The method according to claim 5, wherein the determining a gap distance between the first object to be detected and the second object to be detected based on the pixel gap distance comprises:
and converting the pixel gap distance into the gap distance between the first object to be detected and the second object to be detected based on the distance from the image acquisition module at the set position to the first object to be detected and the second object to be detected, the pixel gap distance, the focal length corresponding to the image acquisition module and the actual distance corresponding to the unit pixel distance.
7. A fault detection device, characterized in that the device comprises:
the acquisition unit is used for acquiring the image to be detected acquired by the image acquisition module; the image to be detected comprises a first object to be detected and a second object to be detected;
the edge detection unit is used for carrying out edge detection processing on the image to be detected and determining a target edge straight line of the first object to be detected and a target edge straight line of the second object to be detected;
the determining unit is used for determining the gap distance between the first object to be detected and the second object to be detected based on the target edge straight line of the first object to be detected and the target edge straight line of the second object to be detected;
and the alarm unit is used for carrying out fault alarm on the first object to be detected and the second object to be detected if the gap distance is not within a preset range.
8. The apparatus of claim 7, further comprising:
the preprocessing unit is used for carrying out denoising processing on the noise information in the image to be detected to obtain a denoised image; the noise information in the image to be detected is image information in the image to be detected except for image information of a first object to be detected and image information of a second object to be detected;
performing graying processing based on the de-noised image to obtain a grayscale image; the gray image comprises the first object to be detected and the second object to be detected.
9. The apparatus of claim 7, wherein the edge detection unit is further configured to:
performing edge detection processing on the image to be detected to obtain an edge detection image, and image edge information of the first object to be detected and image edge information of the second object to be detected;
performing straight line extraction on the edge detection image, and determining a plurality of edge straight lines in the edge detection image;
and respectively determining a target edge straight line corresponding to the image edge information of the first object to be detected and a target edge straight line corresponding to the image edge information of the second object to be detected from the edge straight lines.
10. The apparatus of claim 7, wherein the determining unit is further configured to:
determining a pixel gap distance between a target edge straight line of the first object to be detected and a target edge straight line of the second object to be detected;
and determining the gap distance between the first object to be detected and the second object to be detected based on the pixel gap distance.
11. The apparatus of claim 7, wherein the determining unit is further configured to:
and converting the pixel gap distance into the gap distance between the first object to be detected and the second object to be detected based on the distance from the image acquisition module at the set position to the first object to be detected and the second object to be detected, the pixel gap distance, the focal length corresponding to the image acquisition module and the actual distance corresponding to the unit pixel distance.
12. An electronic device comprising a memory and a processor, the memory having stored thereon a computer program operable on the processor, the computer program, when executed by the processor, implementing the method of any of claims 1-6.
13. A computer-readable storage medium having a computer program stored therein, the computer program characterized by: the computer program, when executed by a processor, implements the method of any of claims 1-6.
CN202210006218.2A 2022-01-05 2022-01-05 Fault detection method and device, electronic equipment and storage medium Pending CN114418971A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210006218.2A CN114418971A (en) 2022-01-05 2022-01-05 Fault detection method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210006218.2A CN114418971A (en) 2022-01-05 2022-01-05 Fault detection method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114418971A true CN114418971A (en) 2022-04-29

Family

ID=81271674

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210006218.2A Pending CN114418971A (en) 2022-01-05 2022-01-05 Fault detection method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114418971A (en)

Similar Documents

Publication Publication Date Title
CN108088799B (en) Method and system for measuring Motor vehicle exhaust Rigemann blackness
CN111667448B (en) Image processing method, device and equipment
EP2899547A1 (en) Method and apparatus for determining acceleration of vehicle
CN110610137B (en) Method and device for detecting vehicle running state, electronic equipment and storage medium
CN109916488B (en) Dynamic vehicle weighing method and device
CN109916485B (en) Dynamic vehicle weighing method and device
CN111950523A (en) Ship detection optimization method and device based on aerial photography, electronic equipment and medium
CN111191556A (en) Face recognition method and device and electronic equipment
CN111274852A (en) Target object key point detection method and device
CN114418971A (en) Fault detection method and device, electronic equipment and storage medium
CN110838142B (en) Luggage size recognition method and device based on depth image
CN112837384A (en) Vehicle marking method and device and electronic equipment
CN109870404B (en) Rain shed structure damage identification method and device and terminal equipment
CN109102499B (en) Detection method and system for top of bullet train
CN115289991B (en) Subway track deformation monitoring method and device and electronic equipment
CN103020889A (en) Method and device for image gradient computation
CN113836199B (en) Method and device for processing sensing data of vehicle, electronic equipment and storage medium
CN110634124A (en) Method and equipment for area detection
CN113984109B (en) Track detection data correction method and device and electronic equipment
CN112146834B (en) Method and device for measuring structural vibration displacement
CN111473767B (en) Remote distance measurement method and device
CN114612363A (en) Bolt looseness detection method and device, electronic equipment and storage medium
JPH0810130B2 (en) Object measuring device by optical cutting line method
CN113508395A (en) Method for detecting an object
CN112665585B (en) Method and device for eliminating periodic vibration interference of vehicle and terminal equipment

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