A high-speed spectrometer safety monitoring device and monitoring method based on image processing

The high-speed spectrometer safety monitoring device based on image processing automatically identifies the minute gaps between the excitation hole and the sample, solving the problems of large errors and low efficiency in manual detection, and achieving efficient and accurate safety monitoring.

CN111783578BActive Publication Date: 2024-11-26WUXI JINYIBO INSTR TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010567285.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-06-19
Publication Date
2024-11-26
Estimated Expiration
2040-06-19

AI Technical Summary

Technical Problem

The safety inspection of existing spectrometers mainly relies on manual judgment, which has large errors and is easily affected by visual fatigue, resulting in inaccurate test results and low efficiency.

Method used

A high-speed spectrometer safety monitoring device based on image processing is adopted. The device automatically identifies the minute gaps between the excitation hole and the sample through the image acquisition device and image processor. The ORB image stitching technology and Faster R-CNN target detection model are used for accurate detection, and an alarm is triggered in real time when a safety problem is detected.

Benefits of technology

It enables automatic and accurate detection of the excitation hole cover status, reduces human error, improves detection efficiency and reliability, and reduces system cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111783578B_ABST
    Figure CN111783578B_ABST
Patent Text Reader

Abstract

The present invention provides a high-speed spectrometer safety monitoring device based on image processing, which can automatically and accurately identify the tiny gap between the excitation hole and the sample, and the device has a simple structure and is suitable for popularization and use. At the same time, the present invention discloses a high-speed spectrometer safety monitoring method based on image processing. It includes: an image acquisition device, a light source, and an image processor; the cameras of the image acquisition device are symmetrically installed on both sides of the excitation platform of the spectrometer through mounting brackets; the light source is installed just above the excitation hole of the spectrometer, and the projection of the center point of the light source is the excitation hole; the image processor is communicatively connected to the image acquisition device; the image data acquired by the image acquisition device is transmitted to the image processor, and the image processor analyzes and identifies the image data. Once it is identified that the excitation hole is not completely covered by the workpiece, it is judged that there is a safety problem and a real-time alarm is issued.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of spectrum analysis industry, and in particular to a high-speed spectrometer safety monitoring device and a monitoring method based on image processing. Background Art

[0002] Spectrometers are widely used in power, metallurgy, steel and other industries due to their advantages of fast analysis speed, low detection limit, good accuracy, simultaneous detection of multiple elements and low sample consumption. The working process of the spectrometer is as follows: the sample is placed on the excitation hole, and the excitation light source emits reflected light and emitted light through the excitation hole to hit the sample; the sample evaporates and atomizes (transforms into gaseous atoms) under the action of energy, and the outer electrons of the gaseous atoms are excited to a high energy state; when jumping from a higher energy level to a lower energy level, the atoms will release excess energy and emit characteristic spectral lines.

[0003] However, if the sample is not flat or the sample area is smaller than the excitation hole, it will not be able to completely cover the excitation hole, leaving the combustion chamber in an unsealed state. When the sample is excited, the current intensity changes, which affects pre-combustion and exposure, causing incomplete combustion of the sample, resulting in low spectrometer analysis results, or subtle gaps that are not easy to detect will cause argon gas leakage in the excitation hole and electric sparks to overflow, causing safety hazards. At present, in most spectral analysis industries, the safety inspection of spectrometers is still in the manual inspection stage. Technicians use their eyes to observe whether the excitation hole is completely blocked by the workpiece, and then manually adjust the position of the sample.

[0004] However, there are the following problems in manually confirming whether the excitation hole is completely blocked:

[0005] (1) It is basically completed by the subjective judgment and experience of the quality inspector, so there is a large error;

[0006] (2) When the number of inspections is high, quality inspectors working for long periods of time are prone to visual fatigue, work laziness and other human factors, making the results of safety inspections even more uncertain. Summary of the invention

[0007] In order to solve the problem of inaccurate results and low inspection efficiency when manually identifying whether the excitation hole is completely covered, the present invention provides a high-speed spectrometer safety monitoring device based on image processing, which can automatically and accurately identify the tiny gap between the excitation hole and the sample, and the device structure is simple and suitable for popularization and use. At the same time, the present invention discloses a high-speed spectrometer safety monitoring method based on image processing.

[0008] The technical solution of the present invention is as follows: a high-speed spectrometer safety monitoring device based on image processing, characterized in that it comprises:

[0009] An image acquisition device, a light source, and an image processor; the cameras of the image acquisition device are symmetrically mounted on both sides of the excitation platform of the spectrometer through mounting brackets; the light source is mounted directly above the excitation hole of the spectrometer, and the projection of the center point of the light source is the excitation hole;

[0010] The image processor is communicatively connected to the image acquisition device; the image data acquired by the image acquisition device is transmitted to the image processor, and the image processor analyzes and identifies the image data. Once it is identified that the excitation hole is not completely covered by the workpiece, it is determined that there is a safety issue and a real-time alarm is issued.

[0011] It is further characterized by:

[0012] The image acquisition device includes a first camera and a second camera; the image processor is connected to the first camera and the second camera respectively based on a USB port, and the image processor is connected to the light source through a PWM interface;

[0013] It also includes a light sensor, which is arranged on one side of the light source and connected to the A / D interface of the image processor;

[0014] The calculation method of the installation angle θ of the first camera and the second camera is:

[0015]

[0016] Wherein, L1 is half of the width of the exciting platform, L2 is the horizontal distance between the mounting bracket and the center of the exciting platform, L3 is half of the width of the mounting platform of the light source, h1 is the height of the mounting bracket, and h2 is the height between the bottom surface of the mounting platform of the light source and the upper surface of the exciting platform; the relationship among L1, L2, L3, h1, and h2 is as follows:

[0017]

[0018] It also includes an audible and visual alarm, which is connected to the image processor via a USB port.

[0019] A high-speed spectrometer safety monitoring method based on image processing, characterized in that it comprises the following steps:

[0020] S1: After the workpiece is placed on the excitation hole, the image acquisition device is started; the image processor obtains the image data transmitted by the first camera and the second camera at the same time point, and records them as the first image and the second image respectively;

[0021] S2: stitching the first image and the second image based on the ORB image stitching technology to obtain a complete excitation platform image;

[0022] S3: inputting the excitation platform image into the safety detection network, performing target detection on the excitation hole using a target detection model trained based on Faster R-CNN, and obtaining a target image with target matching degree;

[0023] S4: preset a detection threshold;

[0024] comparing the target matching degree with the detection threshold;

[0025] When the target matching degree is greater than or equal to the detection threshold, it indicates that the excitation hole is not completely blocked, and the image processor sends a warning message to the sound and light alarm;

[0026] Otherwise, when the target matching degree is less than the detection threshold, the recognition is terminated.

[0027] It is further characterized by:

[0028] In step S2, the first image and the second image are stitched together based on the ORB image stitching technology, which includes the following steps in detail:

[0029] a1: ORB feature point extraction;

[0030] Calculating the brightness center and direction vector of the region where the feature points in the first image and the second image are located to determine the position information of the feature points; using the binary robust scale-invariant key point feature vector to construct a binary string for matching;

[0031] a2: Image registration:

[0032] Selecting the feature points with high credibility as matching points;

[0033] Find the corresponding matching points in the first image and the second image, and find the geometric transformation relationship between the two images according to the direct linear transformation between the matching points;

[0034] a3: Weighted image fusion:

[0035] Finding an overlapping portion between the first image and the second image;

[0036] According to the relationship that is proportional to the color of the pixels in the overlapping part, the distance from the pixel point on the left image to the boundary of the right image, the distance from the upper pixel point on the right image to the boundary of the left image and the confidence level, a fusion coefficient is determined, and weighted processing is performed on the pixels in the overlapping part to obtain the fused excitation platform image;

[0037] The safety detection network includes a feature extraction module, a region generation module, a precise positioning module, and a pooling module;

[0038] Select the part before the fully connected layer of the 16-layer visual geometry group network as the feature extraction module to extract features from the spliced ​​image; the input of the feature extraction module is the spliced ​​image of the stimulating platform, and the output is the feature value extracted based on the image of the stimulating platform;

[0039] Constructing a region generation module based on a region generation network; dividing the input image into several image regions, determining whether the image region is foreground or background by calculating the similarity between the image region and the corresponding region in the truth map, and marking them with labels, and then performing binary classification on these regions to obtain foreground image regions and background image regions;

[0040] Then, a boundary rectangle regression calculation is performed to obtain a relatively fuzzy excitation hole position by calculating the size of the offset between the foreground image area and the true value;

[0041] In the region generation module, the loss functions of the binary classification and the boundary rectangle regression parts are summed up to perform joint training; the input of the region generation module is the excitation stage image and the feature value, and the output is the foreground image region and the excitation hole position corresponding to the foreground image region;

[0042] The precise positioning module performs precise positioning operations based on non-maximum suppression:

[0043] b1: selecting the foreground image region with the highest foreground probability, performing non-maximum suppression, and screening the foreground image region with the highest foreground probability;

[0044] b2: Repeat the screening operation of b1 until the ratio of the image area in the viewfinder of the foreground image area to the total image area is greater than or equal to 0.85, that is, all the generated areas that meet the conditions are screened out, and the current precise positioning operation is stopped;

[0045] The precise positioning module inputs the image feature values ​​of the screened foreground image area into the pooling module;

[0046] The pooling module is constructed based on the region of interest pooling network, and the output is the final detected excitation hole position;

[0047] The training data collection method of the safety monitoring network is as follows:

[0048] c1: based on the horizontal angles between the first camera, the second camera and the exciting platform, the image acquisition device acquires images of the exciting platform at different horizontal angles and different exposure degrees of the exciting holes to obtain basic image data;

[0049] c2: Flip and translate the basic image data to increase the number of images and obtain image data from more angles, which are recorded as sample data;

[0050] c3: using a framing tool to frame the excitation hole area in each frame of the sample data, cutting off irrelevant areas, and finally obtaining the training data;

[0051] In step S4, if the target matching degree is less than the detection threshold, before the current recognition is terminated, the image processor sends a safety signal to the spectrometer to prompt the spectrometer to perform subsequent work.

[0052] The present invention provides a high-speed spectrometer safety monitoring device based on image processing. The image of the workpiece and the excitation hole on the excitation table is transmitted to the image processor for image recognition through an image acquisition device, and an alarm is issued in real time when a safety problem is detected. The covering state of the excitation hole is detected in real time through the cooperation of the image acquisition device and the image processor. The detection standard is objective, and no error will occur due to the human judgment of the operator. The device can work continuously, and no error will occur due to the fatigue of the operator. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Figure 1 It is a schematic diagram of the structure of the safety monitoring device;

[0054] Figure 2 This is the electrical connection diagram of the safety monitoring device system;

[0055] Figure 3 This is a schematic diagram of the image processor connection structure;

[0056] Figure 4 Angle diagram for camera installation Figure 1 ;

[0057] Figure 5 Angle diagram for camera installation Figure 2 ;

[0058] Figure 6 This is a schematic diagram of the security detection network structure;

[0059] Figure 7 This is a schematic diagram of the safety monitoring process. DETAILED DESCRIPTION

[0060] like Figure 1 to Figure 3As shown, the present invention is a high-speed spectrometer safety monitoring device based on image processing, which includes: an image acquisition device, a light source 5, and an image processor 8; the cameras of the image acquisition device are symmetrically installed on both sides of the excitation platform 1 of the spectrometer 13 through the mounting bracket 11; the light source 5 is installed just above the excitation hole 2 of the spectrometer 13, and the projection of the center point of the light source 5 is the excitation hole 2, so as to avoid the shadow in the field of view of the image acquisition device; the light source 5 is installed on the spectrometer 13 through the mounting platform 10 and the light source mounting column 12; the image processor 8 is communicatively connected to the image acquisition device; the image data acquired by the image acquisition device is transmitted to the image processor 8, and the image processor 8 analyzes and identifies the image data. Once it is identified that the excitation hole 2 is not completely covered by the workpiece, it is determined that there is a safety problem and a real-time alarm is issued; the image acquisition device includes a first camera 3 and a second camera 4; the image processor 8 is connected to the first camera 3 and the second camera 4 respectively based on the USB port, the image processor 8 is connected to the light source 5 through the PWM interface, and the light source 5 is independently powered by the power supply 6; the light sensor 7 is arranged on one side of the light source 5 and connected to the A / D interface of the image processor 8; the sound and light alarm 9 is connected to the image processor 8 through the USB port.

[0061] like Figure 4 and 5 As shown, the calculation method of the installation angle θ of the first camera 3 and the second camera 4 is:

[0062]

[0063] Among them, L1 is half of the width of the exciting platform 1, L2 is the horizontal distance between the mounting bracket 11 and the center of the exciting platform 1, L3 is half of the width of the mounting platform 10 of the light source 5, h1 is the height of the mounting bracket 11, and h2 is the height between the bottom end surface of the mounting platform 10 of the light source 5 and the upper end surface of the exciting platform 1; the relationship between L1, L2, L3, h1, and h2 is as follows:

[0064]

[0065] When designing the image acquisition system of this patent, the installation positions of the two CCD camera-based cameras: the first camera 3 and the second camera 4 need to be specially designed according to the structure of the spectrometer; Figure 1 As shown, the structure of the excitation platform of the spectrometer is symmetrically arranged, so the installation method of the first camera 3 and the second camera 4 is the same, and the first camera 3 on one side is taken as an example for explanation.

[0066] Let the half-width of the excitation stage 1 be L1, h2 be the height from the bottom end face of the mounting platform 10 of the light source 5 to the upper end face of the excitation stage 1, the half-width L3 (L3 < L1) of the width of the mounting platform 10 of the light source 5, h1 be the height of the mounting bracket 11, and the horizontal distance from the mounting bracket 11 to the center of the excitation stage 1 be L2 for installation. The technical effects achieved after installing the first camera 3 and the second camera 4 are as follows: Without capturing the mounting platform 10 of the light source 5, at least half of the excitation stage 1 appears in the camera's field of view.

[0067] To calculate the installation angle θ of the first camera 3, the following Figure 4 and Figure 5 two schemes are used to calculate the maximum and minimum values of the installation angle θ respectively.

[0068] 1) As Figure 4 shown: where θ represents the minimum tilt angle of the first camera 3; θ′ represents the shooting field of view of the first camera 3. Here, the extension line of the farthest end of the shooting range of the first camera 3 coincides with the center of the excitation stage 1, and its vertical included angle with the excitation stage 1 is θ0, and the extension line of the nearest end of the shooting range falls at L1′ which is horizontal to the position of the excitation stage 1. First, consider the critical situation, that is, the extension line of the farthest end of the field of view of the first camera 3 just passes through the edge of the mounting platform 10. At this time, the angle of the first camera 3 just cannot capture the mounting platform 10. If θ is adjusted a little larger, the mounting platform 10 will be captured. From this, the following relationship can be obtained:

[0069]

[0070] Then consider the limiting conditions of L2 and h1. From the geometric relationship, it can be obtained that:

[0071]

[0072] Since both L3 and h2 are fixed values, therefore, in the case as Figure 4 shown, L2 and h1 need to satisfy the above proportional relationship, where the equal sign represents the critical situation of the scheme as Figure 4 shown.

[0073] 2) As Figure 5 shown. It is necessary to make the extension line of the nearest end of the field of view of the first camera 3 coincide with the edge position L1 of the excitation stage 1, then the extension line of the farthest end of the field of view of the first camera 3 intersects the horizontal line of the excitation stage 1 at L1′. Assume that at this time it is in the critical situation, that is, the extension line of the farthest end of the field of view of the first camera 3 just passes through the edge of the mounting platform 10 and the mounting platform 10 does not appear in the field of view. Its vertical included angle with the excitation stage 1 is θ0. If the angle of the first camera 3 is adjusted a little larger, the mounting platform 10 will be captured. From this, the following relationship can be obtained:

[0074]

[0075] According to the geometric relationship, the constraints of L2 and h1 are obtained:

[0076]

[0077] The equal sign indicates that Figure 5 Critical case of the scenario shown.

[0078] The installation method of the first camera 3 and the second camera 4 in the technical solution of the present invention not only combines the structural characteristics of the spectrometer, but also prepares the image stitching step. In practical applications, the technician selects one of the two schemes for adjustment according to actual needs, and refers to the given angle range and the limit conditions of the bracket position and height. First, the position and height of the mounting bracket 11 need to be set, and then the adjustment is made by observing the picture of the first camera 3 and the second camera 4. In order to keep the first camera 3 and the second camera 4 in the same position, the same reference object can be set at a left-right symmetrical position on the excitation platform 1 of the spectrometer 13, and the camera angle is adjusted by adjusting the edge of the first camera 3 and the second camera 4 field of view. Through the excitation platform image collected by this method, the error caused by parameter reasons can be avoided during image stitching.

[0079] like Figure 3 The principle of the device of the present invention is as follows.

[0080] Automatic light source control: The light sensor 7 sends the analog signal 0-3.3v to the A / D interface of the image processor 8, subtracts it from the light intensity given by the test requirements, and uses PID feedback calculation after obtaining the difference. The calculation result controls the power drive circuit through the PWM interface of the image processor 8 to adjust the brightness of the light source 5 based on the LED dot matrix light source. In the embodiment, the light sensor 7 is implemented based on SM2160B; specific parameters, the measurement range is 0-65535lux, the resolution is 1lux; the light source 5 uses an LED dot matrix light source.

[0081] CCD signal acquisition: The cameras in the left and right image acquisition devices: the first camera 3 and the second camera 4 are based on CCD cameras and are connected to the USB interface of the image processor 8 through the USB interface respectively, for acquiring the image of the excitation stage. The first camera 3 and the second camera 4 are 3 million pixel driver-free models, with a focal length of 6 to 12 mm and a viewing angle of 53 to 28 degrees.

[0082] Image processing: The main chip of the image processor 8 is a VPM642 microprocessor. The image signals of the first camera 3 and the second camera 4 are collected through USB, and the image stitching processing is performed through an image stitching algorithm based on oriented brief (ORB). The target recognition model based on a faster region convolutional neural network (Faster Region Convolutional Neural Network, Faster R-CNN) is used to identify whether the workpiece completely covers the excitation hole 2.

[0083] Data communication: The chip-based Ethernet interface of the image processor 8 is connected to the spectrometer 13 via a coaxial cable to achieve data interaction.

[0084] like Figure 7 As shown, a high-speed spectral safety monitoring method based on a safety monitoring device includes the following steps.

[0085] S1: After the workpiece is placed on the excitation hole, the image acquisition device is started; the image processor 8 obtains the image data transmitted by the first camera and the second camera at the same time point, and records them as the first image and the second image respectively.

[0086] S2: stitching the first image and the second image based on the ORB image stitching technology to obtain a complete excitation platform image;

[0087] The detailed steps include:

[0088] a1: ORB feature point extraction;

[0089] Calculate the brightness center and direction vector of the area where the feature points in the first image and the second image are located to determine the position information of the feature points; use the binary robust scale-invariant key point feature vector to construct a binary string for matching;

[0090] a2: Image registration:

[0091] Filter out feature points with high credibility as matching points;

[0092] Find the corresponding matching points in the first image and the second image, and find the geometric transformation relationship between the two images based on the direct linear transformation between the matching points;

[0093] a3: Weighted image fusion:

[0094] Find the overlapping part between the first image and the second image;

[0095] The fusion coefficient is determined based on the color of the pixels in the overlapping part, the distance from the pixel on the left image to the boundary of the right image, the distance from the upper pixel on the right image to the boundary of the left image, and the confidence level, and the pixels in the overlapping part are weighted to obtain the fused excitation platform image.

[0096] S3: Input the excitation stage image into the safety detection network, use the target detection model trained based on Faster R-CNN to perform target detection on the excitation hole, and obtain the target image with target matching degree;

[0097] like Figure 6 As shown, the security detection network includes a feature extraction module, a region generation module, a precise positioning module, and a pooling module;

[0098] The part before the fully connected layer of the 16-layer Visual Geometry Group (VGG-16) network is selected as the feature extraction module to extract features from the spliced ​​images; the input of the feature extraction module is the spliced ​​stimulating platform image, and the output is the feature value extracted based on the stimulating platform image;

[0099] A region proposal module is built based on the Region Proposal Network (RPN). The input image is divided into several image regions. The image region is determined to be the foreground or background by calculating the similarity between the image region and the corresponding region in the truth map. The image region is then labeled and classified into two categories to obtain the foreground image region and the background image region.

[0100] Then, the boundary rectangle regression calculation is performed to obtain the relatively fuzzy excitation hole position by calculating the offset between the foreground image area and the true value;

[0101] In the region generation module, the loss functions of the binary classification and the boundary rectangle regression parts are summed up for joint training; the input of the region generation module is the excitation stage image and the feature value, and the output is the foreground image area and the excitation hole position corresponding to the foreground image area; the difference between the predicted result and the actual situation is calculated through the loss function; the purpose of training the target detection model is usually to classify, that is, to distinguish between complete occlusion and incomplete occlusion, and to frame the target, that is, to perform regression prediction. Joint training can achieve these two goals at the same time;

[0102] The precise positioning module is the Proposal Layer, which aims to obtain the precise position of the excitation hole.

[0103] In the precise positioning module, precise positioning operations are performed based on non-maximum suppression:

[0104] b1: Select the foreground image area with the highest foreground probability, perform non-maximum suppression, and screen the foreground image area with the highest foreground probability;

[0105] b2: Repeat the screening operation of b1 until the ratio of the image area in the viewfinder of the foreground image area to the total image area is greater than or equal to 0.85, that is, all the generated areas that meet the conditions are screened out, and the current precise positioning operation is stopped;

[0106] The precise positioning module inputs the image feature values ​​of the filtered foreground image area into the pooling module;

[0107] The pooling module is built based on the Region of Interest Pooling (ROI Pooling) network, and the output is the final detected excitation hole position; the purpose of this layer is to extract all eligible generation areas from the image, use maximum pooling, and calculate the local maximum as the representative feature, and pool the extracted area into a fixed-length output, that is, the detected excitation hole position.

[0108] The training data collection method for the security monitoring network is as follows:

[0109] c1: Based on the horizontal angles between the first camera, the second camera and the excitation platform, the shooting angles of the first camera and the second camera can be calculated by the installation angle θ. The excitation platform is subjected to different horizontal angles, such as 0°, 45°, 90°, ..., 360°, and different degrees of exposure of the excitation holes, such as fully exposed to fully blocked images and images taken with special slits, through the image acquisition device to obtain basic image data;

[0110] c2: Flip and translate the basic image data to increase the number of images and obtain image data from more angles, which are recorded as sample data;

[0111] c3: Use the framing tool to frame the excitation hole area in each frame of sample data, cut off irrelevant areas, and finally obtain training data.

[0112] In practical applications, about 400 images are collected, and the images are enhanced by flipping, translating, etc. to make the data volume reach about 2000. Then, the excitation hole area in the sample is framed using a framing tool (LabelImage, etc.). Finally, the image size is adjusted appropriately, and irrelevant areas are cropped to obtain training data.

[0113] S4: Preset a detection threshold; in the embodiment of the present invention, the detection threshold is set to 90%;

[0114] Compare the target match and the detection threshold;

[0115] When the target matching degree is greater than or equal to the detection threshold, it means that the excitation hole is not completely blocked, and the image processor 8 sends a warning message to the sound and light alarm; the spectrometer 13 will not start working;

[0116] Otherwise, the image processor 8 sends a safety signal to the spectrometer 13, and the spectrometer 13 performs subsequent work, and this safety monitoring ends.

[0117] If the security check signal is a warning message, the quality inspector checks and rearranges the workpiece and repeats steps S1 to S4; if the security check signal is normal, the image processor sends a signal to the spectrometer controller to trigger the electric spark device.

[0118] In the technical solution of the present invention, the high-speed spectral safety monitoring method is implemented based on image recognition technology, and the specific implementation of the image recognition algorithm adopted in the solution can also be implemented based on the existing image recognition solution; the target detection model based on Faster R-CNN training is used for detection, which does not require cumbersome artificial feature engineering. It only needs to mark the detection area with a frame to automatically train and identify it, and the cropped image only contains the area around the excitation hole, which can greatly reduce the calculation amount of network iteration, not only ensuring a high recognition efficiency, but also requiring very low hardware performance of the system, greatly reducing the cost of the detection device and the detection system; the technical solution of the present invention automatically monitors and sends out an alarm signal for the potential safety hazards caused by the excitation hole not being completely blocked by the workpiece, overcoming the problems of inaccurate results and low inspection efficiency caused by manual recognition; the detection results can be sent to the image processor of the control system in real time, and the system response can be completed quickly. The present invention can make full use of the existing software and hardware facilities of the enterprise, add low-cost image acquisition and image processing and analysis devices, and well control the cost of upgrading and transformation. The construction of the detection system in the present invention is also not complicated, and is very suitable for use by small and medium-sized enterprises.

Claims

1. A high-speed spectrometer safety monitoring device based on image processing, characterized in that: It includes: Image acquisition device, light source, image processor; The cameras of the image acquisition device are symmetrically mounted on both sides of the excitation platform of the spectrometer through mounting brackets; The light source is installed directly above the excitation hole of the spectrometer, and the projection of the center point of the light source is the excitation hole; The image processor is communicatively connected to the image acquisition device; The image data collected by the image acquisition device is transmitted to the image processor, and the image processor analyzes and identifies the image data. Once it is identified that the excitation hole is not completely covered by the workpiece, it is determined that there is a safety problem and a real-time alarm is issued; The image acquisition device includes a first camera and a second camera; the image processor is connected to the first camera and the second camera respectively based on a USB port, and the image processor is connected to the light source through a PWM interface; The calculation method of the installation angle θ of the first camera and the second camera is: Wherein, L1 is half of the width of the exciting platform, L2 is the horizontal distance between the mounting bracket and the center of the exciting platform, L3 is half of the width of the mounting platform of the light source, h1 is the height of the mounting bracket, and h2 is the height between the bottom surface of the mounting platform of the light source and the upper surface of the exciting platform; the relationship among L1, L2, L3, h1, and h2 is as follows:

2. According to claim 1, a high-speed spectrometer safety monitoring device based on image processing is characterized in that: It also includes a light sensor, which is arranged on one side of the light source and connected to the A / D interface of the image processor.

3. The high-speed spectrometer safety monitoring device based on image processing according to claim 1, characterized in that: It also includes an audible and visual alarm, which is connected to the image processor via a USB port.

4. A method for safety monitoring based on the high-speed spectrometer safety monitoring device based on image processing according to claim 1, characterized in that: It includes the following steps: S1: After the workpiece is placed on the excitation hole, the image acquisition device is started; the image processor obtains the image data transmitted by the first camera and the second camera at the same time point, and records them as the first image and the second image respectively; S2: stitching the first image and the second image based on the ORB image stitching technology to obtain a complete excitation platform image; S3: inputting the excitation platform image into the safety detection network, performing target detection on the excitation hole using a target detection model trained based on Faster R-CNN, and obtaining a target image with target matching degree; S4: preset a detection threshold; comparing the target matching degree with the detection threshold; When the target matching degree is greater than or equal to the detection threshold, it indicates that the excitation hole is not completely blocked, and the image processor sends a warning message to the sound and light alarm; Otherwise, when the target matching degree is less than the detection threshold, the recognition is terminated; The safety detection network includes a feature extraction module, a region generation module, a precise positioning module, and a pooling module; Select the part before the fully connected layer of the 16-layer visual geometry group network as the feature extraction module to extract features from the spliced ​​image; the input of the feature extraction module is the spliced ​​image of the stimulating platform, and the output is the feature value extracted based on the image of the stimulating platform; Construct a region generation module based on the region generation network; The input image is divided into several image regions, and the image regions are determined to be foreground or background by calculating the similarity between the image regions and the corresponding regions in the truth image, and are labeled, and then these regions are classified into two categories to obtain foreground image regions and background image regions; Then, a boundary rectangle regression calculation is performed to obtain a relatively fuzzy excitation hole position by calculating the size of the offset between the foreground image area and the true value; In the region generation module, the loss functions of the binary classification and the boundary rectangle regression parts are summed up to perform joint training; the input of the region generation module is the excitation stage image and the feature value, and the output is the foreground image area and the excitation hole position corresponding to the foreground image area; The precise positioning module performs precise positioning operations based on non-maximum suppression: b1: selecting the foreground image region with the highest foreground probability, performing non-maximum suppression, and screening the foreground image region with the highest foreground probability; b2: Repeat the screening operation of b1 until the ratio of the image area in the viewfinder of the foreground image area to the total image area is greater than or equal to 0.85, that is, all the generated areas that meet the conditions are screened out, and the current precise positioning operation is stopped; The precise positioning module inputs the image feature values ​​of the screened foreground image area into the pooling module; The pooling module is constructed based on a region of interest pooling network, and the output is the final detected excitation hole position.

5. The method for safety monitoring using a high-speed spectrometer safety monitoring device based on image processing according to claim 4, characterized in that: In step S2, the first image and the second image are stitched together based on the ORB image stitching technology, which includes the following steps in detail: a1: ORB feature point extraction; Calculating the brightness center and direction vector of the region where the feature points in the first image and the second image are located to determine the position information of the feature points; using the binary robust scale-invariant key point feature vector to construct a binary string for matching; a2: Image registration: Selecting the feature points with high credibility as matching points; Find the corresponding matching points in the first image and the second image, and find the geometric transformation relationship between the two images according to the direct linear transformation between the matching points; a3: Weighted image fusion: Finding an overlapping portion between the first image and the second image; The fusion coefficient is determined based on the color of the pixels in the overlapping part, the distance from the pixel point on the left image to the boundary of the right image, the distance from the upper pixel point on the right image to the boundary of the left image, and the confidence level, and the pixel points in the overlapping part are weighted to obtain the fused excitation platform image.

6. The method for safety monitoring using a high-speed spectrometer safety monitoring device based on image processing according to claim 4, characterized in that: The training data collection method of the safety detection network is as follows: c1: based on the horizontal angles between the first camera, the second camera and the exciting platform, the image acquisition device acquires images of the exciting platform at different horizontal angles and different exposure degrees of the exciting holes to obtain basic image data; c2: Flip and translate the basic image data to increase the number of images and obtain image data from more angles, which are recorded as sample data; c3: Use a framing tool to frame the excitation hole area in each frame of the sample data, cut off irrelevant areas, and finally obtain the training data.

7. The method for safety monitoring using a high-speed spectrometer safety monitoring device based on image processing according to claim 4, characterized in that: In step S4, if the target matching degree is less than the detection threshold, before the current recognition is terminated, the image processor sends a safety signal to the spectrometer to prompt the spectrometer to perform subsequent work.