Optimization processing method based on mass spectrometer
Through the coordination of the image recognition system and the rotating roller, combined with the fixing effect of the paraffin sleeve, the precise adjustment of the syringe angle is achieved, which solves the problems of low accuracy and poor stability in traditional methods, and improves the reliability and flexibility of adjustment.
Patent Information
- Application Number
- CN202510007890.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-03
- Publication Date
- 2025-03-28
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The traditional syringe angle adjustment method relies on manual experience and mechanical fixtures, and there are problems such as low adjustment accuracy, poor stability, and complex operation, which is difficult to meet the needs of high-precision experiments.
Through the cooperation of the image recognition system and the rotating roller, the precise adjustment of the inclination angle of the syringe is achieved. Use a paraffin sleeve to fix the angle to provide stable support and avoid angle changes caused by external forces.
It improves the accuracy and reliability of syringe angle adjustment, ensures that the syringe maintains a stable tilt angle during long-term use, enhances application flexibility, and adapts to the needs of different scenarios.
Smart Images

Figure CN119716121A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of detection methods, and in particular to an optimization processing method based on a mass spectrometer. Background Art
[0002] In the use of precision instruments such as mass spectrometers, the angle adjustment of the syringe is a crucial link. Traditional methods of adjusting the syringe angle mainly rely on manual experience and mechanical fixtures, such as using clamps and push plates for fixing and adjustment. However, these methods have many limitations, such as low adjustment accuracy, poor stability, and complex operation. Traditional manual adjustment methods rely on the experience and skill level of the operator. Due to interference from human factors, such as hand shaking and visual errors, it is difficult to ensure accurate adjustment of the syringe angle. In addition, long-term operation can easily make the operator feel tired, further affecting the adjustment accuracy and stability.
[0003] For example, Chinese patent announcement number CN117269388B discloses an automatic sampling device and automatic sampling method for a gas chromatograph mass spectrometer, which belongs to the field of detection devices. The automatic sampling device is arranged above the injection port of the mass spectrometer, and is used to position the injection needle to the center of the injection port. It includes a lifting frame and a clamping and holding mechanism, a syringe correction mechanism and a needle tip correction mechanism arranged thereon. The clamping and holding mechanism is arranged just above the injection port to provide a clamping force for the injection needle. The syringe correction mechanism and the needle tip correction mechanism are respectively arranged just above and just below the clamping and holding mechanism to adjust the injection posture of the injection needle, thereby improving detection efficiency and convenience of operation. The present invention also provides an automatic sampling method, which controls each mechanism to accurately position the injection needle.
[0004] The mechanical clamps in the above-mentioned technical documents also have some problems when fixing and adjusting the angle of the syringe. Mechanical structures such as clamps or push plates often have uneven clamping force on the syringe, which can easily cause the syringe to shift or deform during the adjustment process. At the same time, the accuracy and stability of these mechanical structures are also limited by the processing and assembly process, and it is difficult to meet the needs of high-precision experiments. Summary of the invention
[0005] The present application provides an optimization processing method based on a mass spectrometer. Through the cooperation of an image recognition system and a rotating roller, precise adjustment of the inclination angle of the syringe can be achieved. The adjustment accuracy is higher than that of the original splint and push plate method. The paraffin sleeve is used to fix the angle, which provides stable support and avoids angle changes caused by external forces.
[0006] The present application provides an optimization processing method based on a mass spectrometer, comprising: S101, using a camera to capture an image of a syringe, and performing image processing and recognition on the captured image of the syringe through an image recognition system to recognize a vertical line; S102, based on the identified vertical line information, calculating the inclination angle of the syringe, and outputting the calculated inclination angle and the identified vertical line information, wherein the vertical line is a reference for image recognition, and the angle between the vertical line and the side vertical line on the syringe is the inclination angle of the syringe; S103, determining the required angle of the syringe according to the production process requirements, comparing the calculated inclination angle with the required angle, and calculating the difference between the inclination angle and the required angle, that is, the angle at which the roller rotates; S104, putting a paraffin sleeve on the adjusted syringe, and fixing the adjusted syringe by cooling and solidifying the paraffin sleeve; A sample injection device, comprising a syringe, a needle and a camera; The surface of the needle cylinder is provided with a number of vertical lines of different colors, and rollers are installed on both sides of the needle cylinder; The cross-sectional area of the contact surface between the roller and the needle cylinder decreases from the two sides of the roller to the middle, the surface of the roller and the surface of the needle cylinder cooperate with each other, and the two sides of the needle cylinder under the roller are covered with paraffin sleeves, and the paraffin sleeves are fixedly installed on the external bracket; A mounting plate is fixedly mounted on one side of the bottom of the syringe, and a vertical line is arranged on the mounting plate.
[0007] Preferably, two reference vertical lines are selected from the identified vertical lines, one vertical line is the side vertical line, and the other vertical line is the scale line. The side vertical line is rotated to a horizontal position using a rotation matrix, and the two endpoint coordinates of the scale line and the two end point coordinates of the side vertical line rotated to a horizontal position by the rotation matrix are identified. The angle between the scale line and the vertical line rotated to a horizontal position is calculated based on the endpoint coordinates of the two vertical lines, that is, the inclination angle of the syringe.
[0008] Preferably, the measured inclination angle is compared with the required angle, and the difference between the measured inclination angle and the required angle is calculated. The direction of rotation of the roller is determined based on the positive and negative value of the difference. If the inclination angle is less than the required angle, the roller rotates clockwise; otherwise, it rotates counterclockwise. The size of the calculated difference is the rotation angle of the roller. The calculated rotation angle and direction are sent to the control system of the roller. The roller starts to rotate under the drive of the control system. During the rotation, the control system monitors the rotation of the roller in real time. As the roller rotates, the syringe changes its inclination angle driven by the roller.
[0009] Preferably, the specific steps of heating the paraffin sleeve are: S201, respectively setting heaters at the upper, middle and lower parts of the paraffin sleeve, heating the paraffin sleeve using the set heaters, and adjusting the angle of the syringe based on the heating of the paraffin sleeve; S202, after the angle adjustment of the syringe is completed, the upper part of the paraffin sleeve continues to be heated while the middle and lower parts are stopped from being heated; S203, cyclically heating the paraffin sleeve by heating and cooling.
[0010] Preferably, in the process of adjusting the syringe angle, the upper heater continues to heat while the middle and lower heaters stop heating, so that the paraffin in the middle and lower areas gradually cools and hardens.
[0011] Preferably, by setting a timer to take photos, it is possible to identify whether the syringe angle needs to be fine-tuned. If not, no adjustment is made. If the syringe angle needs to be fine-tuned, the middle part of the paraffin sleeve is softened, and the syringe is fine-tuned in the following steps: S301, setting a camera to take photos at regular intervals, taking photos of the syringe at regular intervals, and transmitting the taken photos to an image recognition system; S302, in the image recognition system, the image captured by the camera is processed in real time, and whether the syringe angle is to be adjusted is determined according to the real-time image, and an adjustment threshold is preset. When the tilt angle is greater than or equal to the preset adjustment threshold, the adjustment is performed, otherwise, no adjustment is performed; S303, when adjusting the syringe, the middle area of the paraffin sleeve is heated.
[0012] Preferably, a marking point is set on the syringe, and the motion trajectory of the marking point is obtained by a camera to identify the inclination angle of the syringe. The steps of identifying the motion trajectory of the marking point are: S401, setting a mark point on the syringe, and taking continuous photos of the syringe by setting a time interval of the camera; S402, identifying the marking points on the syringe based on the photos taken by the camera, and recording the positions of the identified marking points; S403, calculating the movement trajectory of the marking point based on the obtained position data and the photo sequence; S404, calculating the inclination angle of the syringe based on the obtained motion trajectory of the marking point.
[0013] Preferably, a marking point is identified, the marking point is a circle, for a circular marking point, an edge detection operator detects the outline of the circle, and the circular outline is identified based on a contour tracking algorithm. In the binary image after edge detection, the edge pixel is obtained as the starting point, and the tracking direction is set from left to right. Starting from the starting point, based on the current tracking direction, the relative position of the current pixel and the next edge pixel, the tracking direction is updated, and the edge pixels found are recorded as contour points. The contour points constitute the final contour, that is, the marking point is identified.
[0014] Preferably, the method for finding the next edge pixel is by checking the neighboring pixels of the current pixel.
[0015] Preferably, for each pair of adjacent photos, the position difference of the marked point in the two adjacent photos is calculated, and the movement direction and distance of the marked point between the adjacent photos are determined based on the position difference. The movement direction is obtained by calculating the vector direction of the position difference, and the distance is obtained by calculating the modulus of the vector. The position points of the marked points in adjacent photos are connected to form a preliminary motion trajectory. By traversing all photos, all adjacent position points are connected according to the movement direction and distance, thereby constructing a complete motion trajectory of the marked point.
[0016] One or more technical solutions provided in the present application have at least the following technical effects or advantages: through the cooperation of the image recognition system and the roller, the syringe tilt angle can be accurately adjusted, and the adjustment accuracy is higher than the original clamping plate and push plate method. The paraffin sleeve is used to fix the angle, which provides stable support, avoids the angle change caused by external force, improves the reliability of adjustment, and ensures that the syringe maintains a stable tilt angle during long-term use. The image recognition system provides real-time feedback on the tilt angle, which can be adjusted at any time as needed, thereby enhancing the flexibility of application and adapting to the use needs in different scenarios; Through heating and cooling treatment, the paraffin sleeve can more firmly fix the syringe, improve the accuracy and stability of syringe angle adjustment, and restore the plasticity of paraffin during heating and cooling process, reduce the discarded paraffin sleeve due to hardening or deformation, and reduce the experimental cost. No matter what syringe angle the experiment requires, it can be achieved quickly and accurately through heating and cooling treatment, which improves the applicability of the device. Through reasonable heating and cooling treatment, the service life of the paraffin sleeve can be extended, and the cost performance of the device can be further improved. Through the combined application of timed photography and image recognition systems, the angle changes of the syringe can be monitored and recorded in real time, and adjustments can be triggered in time. By adjusting the roller angle and heating and softening the middle area of the paraffin sleeve, the syringe angle can be accurately adjusted and fine-tuned to improve the experimental accuracy. By fixing the angle, the stability of the syringe during the experiment can be ensured, and the reliability of the experimental results can be guaranteed. By marking a point on the syringe and using camera photography and image recognition technology, the inclination angle of the syringe can be judged in real time and accurately. When the inclination angle exceeds the preset threshold, the adjustment mechanism can be automatically triggered to fine-tune the syringe to ensure that it is accurately aligned with the target position. The judgment method of marking points and motion trajectories improves the accuracy of the calculation of the syringe inclination angle and reduces errors caused by factors such as syringe shape and lighting conditions. The combination of timed photography and image recognition systems ensures the continuity and stability of the data and improves the reliability of the system. The preset adjustment threshold and automatic adjustment mechanism simplify the adjustment process of the syringe and improves work efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1A schematic flow chart of a mass spectrometer-based optimization treatment method of the present invention; Figure 2 It is a structural schematic diagram of a sample injection device according to an embodiment of the present invention; Figure 3 is a schematic structural diagram of a cross section of a rotating roller according to an embodiment of the present invention; Figure 4 A schematic diagram of a process for heating a paraffin sleeve according to an embodiment of the present invention; Figure 5 A schematic diagram of the structure of heating a paraffin sleeve according to an embodiment of the present invention; Figure 6 A schematic diagram of a process for fine-tuning a syringe according to an embodiment of the present invention; Figure 7 A schematic diagram of the structure of fine-tuning a syringe according to an embodiment of the present invention; Figure 8 A schematic diagram of a process of identifying a motion trajectory of a marker point according to an embodiment of the present invention; Fig. 9 It is a schematic diagram of the structure of the marking point motion trajectory recognition according to an embodiment of the present invention. DETAILED DESCRIPTION
[0018] To facilitate the understanding of the present invention, the present application will be described more comprehensively below with reference to the relevant drawings; the drawings show preferred embodiments of the present invention, but the present invention can be implemented in many different forms and is not limited to the embodiments described herein; on the contrary, the purpose of providing these embodiments is to enable a more thorough and comprehensive understanding of the disclosed content of the present invention.
[0019] It should be noted that the terms “vertical”, “horizontal”, “up”, “down”, “left”, “right” and similar expressions used in this document are only for illustrative purposes and do not represent the only implementation method.
[0020] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by technicians in the technical field to which the present invention belongs; the terms used in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention; the term "and / or" used herein includes any and all combinations of one or more related listed items.
[0021] Embodiment 1: Figure 1 is a flow chart of a mass spectrometer-based optimization processing method according to an embodiment of the present invention, such as Figure 2 and Figure 3As shown, it includes: a sample injection device, which includes a syringe, a needle and a camera. The surface of the syringe is provided with a plurality of vertical lines of different colors, and the vertical lines of different colors serve as visual marks of the image recognition system. Rollers are installed on both sides of the syringe, and the cross-sectional area of the contact surface of the roller and the syringe decreases from the two sides of the roller to the middle. The surface of the roller cooperates with the surface of the syringe, and the angle of the syringe is adjusted by rotating the roller; paraffin sleeves are sleeved on both sides of the syringe below the roller, and the paraffin sleeves are used to fix the angle of the syringe, so that the syringe is more stable when adjusting the angle, and the paraffin sleeves are fixedly installed on the external bracket; a mounting plate is fixedly installed on one side of the bottom of the syringe, and a vertical line is arranged on the mounting plate, and the vertical line serves as a reference datum for image recognition.
[0022] S101, using a camera to capture an image of a syringe, performing image processing and recognition on the captured image of the syringe through an image recognition system, and recognizing a vertical line; Specifically, adjust the position of the syringe, observe the position of the syringe in the camera preview screen, and ensure that all vertical lines on the syringe can appear clearly in the preview screen by fine-tuning the syringe itself to avoid obstruction or blurring of the vertical lines due to improper position of the syringe. Calibrate the camera's viewing angle, adjust the camera's pitch and yaw angles as needed to ensure that the vertical lines of the syringe appear as straight lines in the image. At the same time, adjust the camera's exposure time, white balance, color saturation and other parameters according to the ambient light and syringe color to ensure that the captured image has accurate color and clear details. Use a tripod to fix the camera to avoid image blur due to hand shaking or external vibrations; use the camera to capture the syringe image.
[0023] The noise in the syringe image is removed by Gaussian filter, and the contrast of the image is enhanced by histogram equalization. The syringe image captured by the camera is in RGB color space. The original RGB image is read using the image processing library OpenCV. Each pixel is represented by the intensity value of the three channels of red (R), green (G), and blue (B). The color space conversion function provided by the image processing library OpenCV is used to convert the RGB image into an HSV image. In the HSV color space, hue (H) indicates the type of color, such as red, green, blue, etc. Its value is usually between 0 and 360 degrees. Saturation (S) indicates the purity of the color. Its value is usually between 0 and 1, 0 means gray (no color), 1 means pure color, and value (V) means the brightness of the color, and its value is also between 0 and 1, 0 means black, 1 means white, set the hue range to 0 to 10, saturation to 0.9, and value to 0.5. Use the threshold function provided by the image processing library to segment the image according to the determined threshold range to separate different color areas; use the edge detection algorithm to detect the edge of the vertical line, traverse and process the detected contour coordinates, for each contour, determine the starting and ending coordinates of the vertical line according to its pixel coordinates, the starting and ending coordinates are represented by the (x, y) values in the two-dimensional coordinate system, where x represents the horizontal position and y represents the vertical position, and use the Euclidean distance to calculate the distance between the starting and ending points. For each identified vertical line, extract the color information of the vertical line, and calculate the average color of the vertical line area in the vertical line area as the color feature of the vertical line.
[0024] S102, based on the identified vertical line information, calculating the inclination angle of the syringe, and outputting the calculated inclination angle and the identified vertical line information, wherein the vertical line is a reference for image recognition, and the angle between the vertical line and the side vertical line on the syringe is the inclination angle of the syringe; Furthermore, two reference vertical lines are selected from all the identified vertical lines. These two reference vertical lines have a clear geometric relationship. One vertical line is the side vertical line and the other vertical line is the scale line. The side vertical line is rotated to a horizontal position using a rotation matrix. The two endpoint coordinates of the scale line and the two end point coordinates of the side vertical line in the horizontal position after rotation by the rotation matrix are identified. The angle between the scale line and the vertical line rotated to the horizontal position is calculated based on the endpoint coordinates of the two vertical lines, that is, the inclination angle of the syringe.
[0025] In some embodiments, in an image of a syringe, one is the side line of the syringe (represented as vertical line A), and the other is a scale line on the syringe (represented as vertical line B). Vertical line A and vertical line B are selected as reference vertical lines. Vertical line A is the side of the syringe, and its direction is roughly consistent with the axial direction of the syringe; vertical line B is the scale line, and its position is related to the scale of the syringe. By calculating the current slope of vertical line A and applying a rotation matrix to rotate it to a horizontal position, the coordinates of the two endpoints of vertical line A are (x1, y1) and (x2, y2), the coordinates of the two endpoints of vertical line B are (x3, y3) and (x4, y4), and the direction vector of vertical line A is = (x2-x1, y2-y1), the direction vector of vertical line B is =(x4-x3,y4-y3), ,in, and They are vectors and The modulus of the vector, θ is the angle between the two vectors, cosθ= , and finally obtain the cosine value of the angle, take the inverse cosine of cosθ to obtain the angle θ, and obtain the inclination angle θ of the syringe. The calculated inclination angle value is displayed on the interface of the image recognition software, and the captured syringe image is displayed at the same time, and the recognized vertical lines are marked on the image. Different colors or line styles are used to distinguish vertical lines of different colors, and the calculated inclination angle is marked on the image.
[0026] The angle between the vertical line and the side vertical line can assist in identifying the inclination angle of the syringe. As one side of the angle, the stability and accuracy of the vertical line directly affect the measurement result of the inclination angle. The side vertical line A is rotated to a horizontal position using a rotation matrix. The vertical line is used as a reference in the horizontal direction to help determine the parameters of the rotation matrix and ensure that the rotated side vertical line A is consistent with the horizontal direction.
[0027] S103, determining the required angle of the syringe according to the production process requirements, comparing the calculated inclination angle with the required angle, and calculating the difference between the inclination angle and the required angle, that is, the angle at which the roller needs to rotate; Specifically, the measured current angle is compared with the required angle, and the difference between the current angle and the required angle is calculated. The direction in which the roller needs to rotate is determined based on the positive and negative difference. If the current angle is less than the required angle, the roller needs to rotate clockwise; otherwise, it needs to rotate counterclockwise. The size of the calculated difference is the rotation angle of the roller. The calculated rotation angle and direction are sent to the control system of the roller. Driven by the control system, the roller begins to rotate smoothly and accurately. During the rotation process, the control system will monitor the rotation of the roller in real time to ensure the accuracy and stability of the rotation. As the roller rotates, the syringe begins to gradually change its inclination angle driven by the roller. After the initial adjustment is completed, the camera and image recognition system are used again to measure the inclination angle of the syringe and compare it with the required angle. If the measurement result shows that the inclination angle of the syringe is still slightly different from the required angle, then fine-tuning is required. Repeat the above measurement, calculation and adjustment steps. Through multiple fine-tuning, we can make the inclination angle of the syringe gradually approach and eventually reach the required value.
[0028] S104, putting a paraffin sleeve on the adjusted syringe, and fixing the adjusted syringe by cooling and solidifying the paraffin sleeve; Furthermore, the paraffin sleeve is placed in a hot water bath, and a heating temperature is set to heat the paraffin sleeve. The paraffin sleeve is fully heated so that the paraffin sleeve becomes soft and easy to shape. The heated paraffin sleeve is taken out of the hot water bath, and then the paraffin sleeve is put on the syringe to ensure that the paraffin sleeve can evenly and tightly cover the entire surface of the syringe. During the cooling and solidification process of the paraffin sleeve, a special clamp is used to fix the syringe to prevent it from moving or deforming due to external forces (such as wind, vibration, etc.). After the paraffin sleeve is completely cooled and solidified, its fixing effect is carefully checked, and the fit between the paraffin sleeve and the syringe is observed to ensure that there is no gap or looseness.
[0029] The technical solution in the above-mentioned embodiment of the present application has at least the following technical effects or advantages: through the cooperation of the image recognition system and the rotating roller, the precise adjustment of the inclination angle of the syringe can be achieved, and the adjustment accuracy is higher than that of the original splint and push plate method. The paraffin sleeve is used to fix the angle, which provides stable support and avoids angle changes caused by external forces. The reliability of adjustment is improved, ensuring that the syringe maintains a stable inclination angle during long-term use. The image recognition system provides real-time feedback on the inclination angle, which can be adjusted at any time as needed, thereby enhancing the flexibility of application and adapting to the usage requirements in different scenarios.
[0030] Embodiment 2: Based on the paraffin sleeve in Embodiment 1, in this embodiment, a method of heating the paraffin sleeve from bottom to top is performed to optimize its fixing effect, improve the accuracy and stability of the syringe angle adjustment, and extend the service life of the paraffin sleeve by heating and cooling the paraffin sleeve.
[0031] like Figure 4 and Figure 5 As shown in the figure, the specific steps for heating the paraffin sleeve are: S201, respectively setting heaters at the upper, middle and lower parts of the paraffin sleeve, heating the paraffin sleeve using the set heaters, and adjusting the angle of the syringe based on the heating of the paraffin sleeve; Specifically, heaters are installed at the upper, middle and lower parts of the paraffin sleeve respectively, and these heaters will be used to locally heat the paraffin to control its temperature and state, ensuring that the temperature heated by the heater can reach the melting point of the paraffin; the lower part of the paraffin is heated, and the heating temperature needs to reach above the melting point of the paraffin. The paraffin gradually melts during the heating process, becomes fluid and easy to adjust, and the melted paraffin is convenient for subsequent adjustment of the angle of the syringe, because the paraffin is in a liquid or plastic state at this time and is easy to shape. In the process of adjusting the angle of the syringe, the upper heater needs to be kept on. The continuous heating of the upper heater ensures that the upper paraffin maintains a certain plasticity, which is convenient for adjusting the syringe. At the same time, the middle and lower heaters stop heating, so that the paraffin in this area begins to gradually cool and harden. The cooled and hardened paraffin provides initial support and stability for the syringe, ensuring that the syringe will not change due to the flow of paraffin during the adjustment process. Through this combination of heating and cooling, the state of the paraffin can be accurately controlled, thereby achieving accurate adjustment of the syringe angle.
[0032] S202, after the angle adjustment of the syringe is completed, the upper part of the paraffin sleeve continues to be heated while the middle and lower parts are stopped from being heated; Furthermore, for the upper area of the paraffin sleeve, the upper area of the paraffin sleeve is heated by a heater. After heating (or maintaining the temperature) for a period of time, the heating is stopped to allow the upper paraffin to begin to cool. During the cooling process, the paraffin will gradually harden to form a firm fixed layer. This fixed layer will serve as an important supporting structure for the syringe to ensure its stability during the experiment. For the middle and lower area, unlike the upper area, the heating of the middle and lower area has been stopped after the syringe angle adjustment is completed. The middle and lower paraffin will quickly lose heat and begin to harden. The hardening speed is faster because the middle and lower paraffin is already at a higher temperature and there is a large temperature difference with the external environment. The rapidly hardened middle and lower paraffin provides stable support for the syringe to prevent its angle from changing due to external forces during the experiment.
[0033] S203, cyclically heating the paraffin sleeve by heating and cooling.
[0034] The technical solution in the above-mentioned embodiment of the present application has at least the following technical effects or advantages: through heating and cooling treatment, the paraffin sleeve can be more firmly fixed to the syringe, the accuracy and stability of the syringe angle adjustment can be improved, the heating and cooling process can restore the plasticity of the paraffin, reduce the paraffin sleeve discarded due to hardening or deformation, and reduce the experimental cost. No matter what syringe angle the experiment requires, it can be quickly and accurately achieved through heating and cooling treatment, thereby improving the applicability of the device; through reasonable heating and cooling treatment, the service life of the paraffin sleeve can be extended, and the cost performance of the device can be further improved. Embodiment 3: Based on the heating devices provided at the upper, middle and lower parts of the paraffin sleeve in Embodiment 2, this embodiment sets a timed photo taking function to identify whether the angle of the syringe needs to be adjusted. If the angle of the syringe needs to be adjusted, the middle part of the paraffin sleeve is softened so that the angle of the syringe can be fine-tuned.
[0035] like Figure 6 and Figure 7 As shown, the steps for fine-tuning the syringe are: S301, setting a camera to take photos at regular intervals, taking photos of the syringe at regular intervals, and transmitting the taken photos to an image recognition system; Specifically, the camera is set to take pictures at a fixed time. The time interval of the timed pictures is set to 0.1-0.5 seconds according to specific needs and the performance of the camera, so that the camera can take continuous pictures in the timed picture mode, store the images taken by the camera within the set time interval, and transmit the taken pictures to the image recognition system via a wireless network.
[0036] S302, in the image recognition system, the image captured by the camera is processed in real time, and whether the syringe angle is to be adjusted is determined according to the real-time image, and an adjustment threshold is preset. When the tilt angle is greater than or equal to the preset adjustment threshold, the adjustment is performed, otherwise, no adjustment is performed; Furthermore, the image recognition system is started to identify the position of the syringe, calculate its inclination angle, and determine whether adjustment is needed. A preset adjustment threshold is set. When the inclination angle is greater than or equal to the preset adjustment threshold, adjustment is made, otherwise, no adjustment is made. The detailed steps for calculating the inclination angle are described in S102 and will not be repeated in this embodiment. The syringe is adjusted based on the feedback from the image recognition system.
[0037] S303, when adjusting the syringe, heating the middle area of the paraffin sleeve; Specifically, according to step S302, it is determined whether to fine-tune the syringe. When adjusting the syringe, the heating time and temperature of the middle area of the paraffin sleeve are set so that the paraffin sleeve is softened but not melted. After the middle area of the paraffin sleeve is softened, the inclination angle of the syringe is fine-tuned using a roller based on the feedback of the image recognition system. After the fine-tuning of the syringe is completed, the heating of the middle area of the paraffin sleeve is immediately stopped, and the paraffin sleeve is naturally cooled and hardened. The hardening time should be long enough to ensure that the paraffin sleeve is completely hardened and stably supports the syringe.
[0038] In some embodiments, according to the needs and the performance of the camera, the time interval for the timed photo taking is set to 0.2 seconds. The camera continuously takes images within the set time interval and stores the images in the internal memory. The camera transmits the taken photos to the image recognition system in real time through the wireless network. After receiving the photos transmitted by the camera, the image recognition system immediately starts to process the images in real time. The system identifies the position of the syringe and calculates its current tilt angle. An adjustment threshold is preset. When the tilt angle of the syringe is greater than or equal to 2 degrees, the system determines that adjustment is required. The image recognition system continuously monitors the tilt angle of the syringe. Once it is found that the angle exceeds the preset threshold, an adjustment instruction is immediately issued. After receiving the adjustment instruction from the image recognition system, the syringe is adjusted. First, the middle area of the paraffin sleeve is heated. The melting point of the paraffin sleeve is 60°C, and the heating temperature is set to 55°C. Ensure that the paraffin sleeve is within the range of softening but not melting. Use the heating equipment to heat the middle area of the paraffin sleeve for 10 minutes. During this period, closely observe the changes in the paraffin sleeve to ensure that its softening degree is moderate. After the middle area of the paraffin sleeve is softened, we use the roller to fine-tune the inclination angle of the syringe according to the feedback of the image recognition system. The fine-tuning action of the roller is precise and slow to ensure accurate adjustment of the syringe angle. After the syringe is fine-tuned, stop heating the middle area of the paraffin sleeve immediately, let the paraffin sleeve cool and harden naturally, and wait for 30 minutes to ensure that the paraffin sleeve is completely hardened and stably supports the needle.
[0039] The technical solution in the above-mentioned embodiment of the present application has at least the following technical effects or advantages: through the combined application of timed photography and image recognition system, it can monitor and record the angle changes of the syringe in real time, and trigger adjustments in time; through the adjustment of the roller angle and heating and softening of the middle area of the paraffin sleeve, it can achieve precise adjustment and fine-tuning of the syringe angle, thereby improving the experimental accuracy; and through angle fixing, it can ensure the stability of the syringe during the experiment and the reliability of the experimental results.
[0040] Embodiment 4: Based on the above embodiments, in this embodiment, a marking point is set on the syringe, and the movement trajectory of the marking point is obtained by a camera to identify the inclination angle of the syringe, which can more accurately determine the inclination angle.
[0041] like Figure 8 and Fig. 9 As shown in the figure, the steps of identifying the motion trajectory of the marker point are: S401, setting a mark point on the syringe, and taking continuous photos of the syringe by setting a time interval of the camera; Furthermore, the shooting time interval is set to 0.2 seconds, the continuous shooting function of the camera is started, the syringe is continuously photographed at a preset time interval, and the photos taken by the camera are imported into the image recognition software in the computer in real time. The image recognition software pre-processes the imported photos to remove noise and enhance contrast.
[0042] S402, identifying the marking points on the syringe based on the photos taken by the camera, and recording the positions of the identified marking points; Specifically, circular markers are identified by using an edge detection algorithm, the captured color photo image is converted into a grayscale image, and the grayscale image is filtered using a Gaussian filter to remove noise and unnecessary details. The Canny operator is selected as the edge detection operator, and the Canny operator is used to traverse each pixel in the image. Whether it is an edge is determined based on the gradient of the pixel value change. For circular markers, the edge detection operator will detect its circular outline, and the circular outline is identified based on the outline tracking algorithm. In the binary image after edge detection, an edge pixel is found as the starting point, and the tracking direction is set from left to right. Starting from the starting point, the next edge pixel is found in the current tracking direction, and the next pixel is found by checking the neighboring pixels of the current pixel. According to the relative position of the current pixel and the next edge pixel, the tracking direction is updated. If the next edge pixel is on the right side of the current pixel, continue to track to the right; if it is below, track downward and record the edge pixels found as contour points. These points will constitute the final contour. Continue to find the next edge pixel according to the updated tracking direction and record it as a contour point. Repeat this process until you return to the starting point or no more edge pixels can be found. Connect all the recorded contour points in the order of tracking to form a continuous contour line. After extracting the circular contour, the circular fitting algorithm can be used to further determine the parameters of the circle. The circular fitting algorithm will fit an optimal circle as a marking point based on the points on the contour through the least squares method.
[0043] By calculating the precise coordinates of the center of the circle from the identified circular outline, the calculated coordinates are stored in a database. For continuously taken photos, the positions of the marked points in each photo are calculated one by one to form a series of position data.
[0044] S403, calculating the movement trajectory of the marking point based on the obtained position data and the photo sequence; Furthermore, for each pair of adjacent photos, the position difference of the marked point in the two photos is calculated by subtracting the coordinates. Based on the position difference, the movement direction and distance of the marked point between adjacent photos can be determined. The movement direction is obtained by calculating the vector direction of the position difference, and the distance is obtained by calculating the modulus of the vector. The position points of the marked points in adjacent photos are connected to form a preliminary motion trajectory. By traversing all photos, all adjacent position points are connected according to the movement direction and distance, thereby constructing a complete motion trajectory of the marked point, and the motion trajectory is smoothed using a fitting algorithm.
[0045] S404, calculating the inclination angle of the syringe based on the obtained motion trajectory of the marking point; Specifically, the obtained motion trajectory is divided into several small segments. Each trajectory can be regarded as a continuous motion path of a marked point in a short time. The slope of each motion trajectory is calculated. The slope represents the rate of change of the trajectory in a certain direction. It is calculated by the ratio of the ordinate difference to the abscissa difference between adjacent points. The angle between the slope and the horizontal direction, that is, the inclination angle, is calculated by using the inverse tangent function. When the inclination angle is greater than or equal to the preset threshold, the adjustment mechanism can be automatically triggered, and the syringe can be fine-tuned using the roller and paraffin sleeve.
[0046] The technical solution in the above-mentioned embodiment of the present application has at least the following technical effects or advantages: by marking a point on the syringe and using camera photography and image recognition technology, the inclination angle of the syringe can be judged in real time and accurately. When the inclination angle exceeds the preset threshold, the adjustment mechanism can be automatically triggered to fine-tune the syringe to ensure that it is accurately aligned with the target position. The accuracy of the calculation of the inclination angle of the syringe is improved by the judgment method of marking points and motion trajectories, and the errors caused by factors such as syringe shape and lighting conditions are reduced. The combined use of timed photography and image recognition systems ensures the continuity and stability of the data and improves the reliability of the system. The preset adjustment threshold and automatic adjustment mechanism are used to simplify the adjustment process of the syringe and improve work efficiency.
[0047] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. An optimization processing method based on a mass spectrometer, characterized in that: include: S101, using a camera to capture an image of a syringe, and performing image processing and recognition on the captured image of the syringe through an image recognition system to recognize a vertical line; S102, based on the identified vertical line information, calculating the inclination angle of the syringe, and outputting the calculated inclination angle and the identified vertical line information, wherein the vertical line is a reference for image recognition, and the angle between the vertical line and the side vertical line on the syringe is the inclination angle of the syringe; S103, determining the required angle of the syringe according to the production process requirements, comparing the calculated inclination angle with the required angle, and calculating the difference between the inclination angle and the required angle, that is, the angle at which the roller rotates; S104, putting a paraffin sleeve on the adjusted syringe, and fixing the adjusted syringe by cooling and solidifying the paraffin sleeve; A sample injection device, comprising a syringe, a needle and a camera; The surface of the needle cylinder is provided with a number of vertical lines of different colors, and rollers are installed on both sides of the needle cylinder; The cross-sectional area of the contact surface between the roller and the needle cylinder decreases from the two sides of the roller to the middle, the surface of the roller and the surface of the needle cylinder cooperate with each other, and the two sides of the needle cylinder under the roller are covered with paraffin sleeves, and the paraffin sleeves are fixedly installed on the external bracket; A mounting plate is fixedly mounted on one side of the bottom of the syringe, and a vertical line is arranged on the mounting plate.
2. The mass spectrometer-based optimization processing method according to claim 1, characterized in that: Select two reference vertical lines from the identified vertical lines, one vertical line is the side vertical line, and the other vertical line is the scale line. Use the rotation matrix to rotate the side vertical line to a horizontal position, identify the two endpoint coordinates of the scale line and the two end point coordinates of the side vertical line rotated to a horizontal position by the rotation matrix, and calculate the angle between the scale line and the vertical line rotated to a horizontal position according to the endpoint coordinates of the two vertical lines, that is, the inclination angle of the syringe.
3. The mass spectrometer-based optimization processing method according to claim 1, characterized in that: The measured inclination angle is compared with the required angle, and the difference between the measured inclination angle and the required angle is calculated. The direction of rotation of the roller is determined according to the positive and negative difference. If the inclination angle is less than the required angle, the roller rotates clockwise; otherwise, it rotates counterclockwise. The calculated difference is the rotation angle of the roller. The calculated rotation angle and direction are sent to the control system of the roller. The roller starts to rotate under the drive of the control system. During the rotation, the control system monitors the rotation of the roller in real time. As the roller rotates, the syringe changes its inclination angle driven by the roller.
4. The mass spectrometer-based optimization processing method according to claim 1, characterized in that: Specific steps for heating the paraffin sleeve: S201, respectively setting heaters at the upper, middle and lower parts of the paraffin sleeve, heating the paraffin sleeve using the set heaters, and adjusting the angle of the syringe based on the heating of the paraffin sleeve; S202, after the angle adjustment of the syringe is completed, the upper part of the paraffin sleeve continues to be heated while the middle and lower parts are stopped from being heated; S203, cyclically heating the paraffin sleeve by heating and cooling.
5. The mass spectrometer-based optimization processing method according to claim 4, characterized in that: In the process of adjusting the syringe angle, the upper heater continues to heat while the middle and lower heaters stop heating, so that the paraffin in the middle and lower areas gradually cools and hardens.
6. The mass spectrometer-based optimization processing method according to claim 5, characterized in that: By setting a timer to take photos, determine whether the syringe angle needs to be fine-tuned. If not, do not make any adjustments. If the syringe angle needs to be fine-tuned, soften the middle part of the paraffin sleeve. Steps for fine-tuning the syringe: S301, setting a camera to take photos at regular intervals, taking photos of the syringe at regular intervals, and transmitting the taken photos to an image recognition system; S302, in the image recognition system, the image captured by the camera is processed in real time, and whether the syringe angle is to be adjusted is determined according to the real-time image, and an adjustment threshold is preset. When the tilt angle is greater than or equal to the preset adjustment threshold, the adjustment is performed, otherwise, no adjustment is performed; S303, when adjusting the syringe, the middle area of the paraffin sleeve is heated.
7. The mass spectrometer-based optimization processing method according to claim 6, characterized in that: A marking point is set on the syringe, and the motion trajectory of the marking point is obtained by the camera to identify the inclination angle of the syringe. The steps of identifying the motion trajectory of the marking point are as follows: S401, setting a mark point on the syringe, and taking continuous photos of the syringe by setting a time interval of the camera; S402, identifying the marking points on the syringe based on the photos taken by the camera, and recording the positions of the identified marking points; S403, calculating the movement trajectory of the marking point based on the obtained position data and the photo sequence; S404, calculating the inclination angle of the syringe based on the obtained motion trajectory of the marking point.
8. The mass spectrometer-based optimization processing method according to claim 7, characterized in that: Identify the marking point, which is a circle. For the circular marking point, the edge detection operator detects the outline of the circle. The circular outline is identified based on the contour tracking algorithm. In the binary image after edge detection, the edge pixel is obtained as the starting point, and the tracking direction is set from left to right. Starting from the starting point, based on the current tracking direction, the relative position of the current pixel and the next edge pixel, the tracking direction is updated, and the edge pixels found are recorded as contour points. The contour points constitute the final contour, that is, the marking point is identified.
9. The mass spectrometer-based optimization processing method according to claim 8, characterized in that: The next edge pixel is found by checking the neighboring pixels of the current pixel.
10. The mass spectrometer-based optimization processing method according to claim 7, characterized in that: For each pair of adjacent photos, calculate the position difference of the marked point in the two adjacent photos. Based on the position difference, determine the movement direction and distance of the marked point between the adjacent photos. The movement direction is obtained by calculating the vector direction of the position difference, and the distance is obtained by calculating the modulus of the vector. Connect the position points of the marked points in adjacent photos to form a preliminary motion trajectory. By traversing all photos, all adjacent position points are connected according to the movement direction and distance, thereby constructing the complete motion trajectory of the marked point.
Citation Information
Patent Citations
Automatic sampling device and automatic sampling method for gas chromatography-mass spectrometer
CN117269388B
Method for automatically detecting scales of injector needle cylinders by using machine vision system
CN102303019A
Method for automatically detecting inclination of steel needle of injector by machine vision system
CN102305603A
Mobile phone screen defective product removing method
CN104438125A
Beam-focusing device and method for optical fiber and superconducting thin film in single-photon detection system
CN104465884A