Glass rod parking position detection method, device, equipment and readable storage medium
By combining target detection models with Hough line detection in image processing technology, the problem of low efficiency in manual detection of glass rod stopping positions was solved, and an automated and accurate detection method was achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHENGDU XIJIAO ZHIHUI BIG DATA TECH CO LTD
- Filing Date
- 2022-11-18
- Publication Date
- 2026-05-01
AI Technical Summary
Existing methods for manually determining the stopping position of glass rods are inefficient, wasteful of human resources, and difficult to achieve accurate detection.
A method combining target detection model and Hough line detection is adopted to automatically identify the stopping position of the glass rod through image processing technology, including preprocessing, grayscale image conversion, Hough line detection and noise filtering, thereby improving detection accuracy.
It achieves automated detection of the glass rod's stopping position, reduces environmental interference, improves detection efficiency and accuracy, and significantly enhances accuracy.
Smart Images

Figure CN115880570B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of information technology, and more specifically, to a method, apparatus, device, and readable storage medium for detecting the stopping position of a glass rod. Background Technology
[0002] To grade chemistry experiments, it's necessary to record students' experimental procedures and manually inspect and judge the recordings. In the experiment of assembling a filter and filtering coarse salt water, checking whether the student placed the glass rod against the three layers of filter paper is a crucial grading point. Existing manual judgment methods are wasteful of manpower and inefficient. Therefore, a method for detecting the glass rod's resting position based on target detection algorithms and image contour completion is needed to achieve accurate detection. Summary of the Invention
[0003] The purpose of this invention is to provide a method, apparatus, device, and readable storage medium for detecting the stopping position of a glass rod, thereby improving the aforementioned problems. To achieve the above objective, the technical solution adopted by this invention is as follows:
[0004] Firstly, this application provides a method for detecting the stopping position of a glass rod, including:
[0005] Acquire uploaded images and historical images of experimental exams, wherein the uploaded images of experimental exams are continuous frame images taken from a top-down angle;
[0006] The uploaded images of the experimental exam are identified based on a preset target detection model to obtain at least one frame of filter paper image containing the complete filter paper. The target detection model is obtained by training the historical experimental exam images using a neural network algorithm.
[0007] The filter paper image is preprocessed to obtain a grayscale image, and the grayscale image is then contour-completed using Hough line detection to obtain a three-layer filter paper region.
[0008] Based on the target detection model, the uploaded image of the experimental exam is identified to obtain at least one frame containing the intersection of the glass rod and the funnel as the image to be detected, and the detection result is obtained based on the three-layer filter paper area and the image to be detected.
[0009] Secondly, this application also provides a device for detecting the stopping position of the glass rod, including:
[0010] The acquisition module is used to acquire uploaded images of experimental exams and historical experimental exam images, wherein the uploaded images of experimental exams are continuous frame images taken from a top-down angle;
[0011] The analysis module identifies the uploaded experimental exam images based on a preset target detection model to obtain at least one frame of filter paper image containing the complete filter paper. The target detection model is obtained by training the historical experimental exam images using a neural network algorithm.
[0012] The processing module is used to preprocess the filter paper image to obtain a grayscale image, and to perform contour completion on the grayscale image using Hough line detection to obtain a three-layer filter paper region.
[0013] The output module identifies the uploaded experimental exam image based on the target detection model to obtain at least one frame of the image to be detected containing the intersection of the glass rod and the funnel, and obtains the detection result based on the three-layer filter paper area and the image to be detected.
[0014] Thirdly, this application also provides a device for detecting the stopping position of a glass rod, comprising:
[0015] Memory, used to store computer programs;
[0016] A processor is configured to execute the computer program to implement the steps of the method for detecting the stopping position of the glass rod.
[0017] Fourthly, this application also provides a readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the above-described detection method based on the stopping position of a glass rod. The device includes:
[0018] Memory, used to store computer programs;
[0019] A processor is configured to execute the computer program to implement the steps of the method for detecting the stopping position of the glass rod.
[0020] Fourthly, this application also provides a readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the above-described detection method based on the stopping position of the glass rod.
[0021] The beneficial effects of this invention are as follows:
[0022] I. This invention achieves automatic identification and cutting of the filter paper area by setting a target detection model, thereby reducing the area of filter paper to be detected, avoiding possible environmental interference with filter paper detection, improving detection efficiency, and increasing detection accuracy.
[0023] Second, this invention improves detection accuracy by adjusting contrast and transforming image space during image processing, and by adjusting contrast and using the brightness channel for image processing.
[0024] Third, this invention uses Hough line detection for contour detection and completion, which not only filters out noise and interference points, but also obtains the boundary line between the three-layer filter paper and the single-layer filter paper more accurately and quickly, thus improving the detection accuracy.
[0025] Other features and advantages of the invention will be set forth in the following description, and will be apparent in part from the description, or may be learned by practicing embodiments of the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings. Attached Figure Description
[0026] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0027] Figure 1 This is a schematic diagram of the method for detecting the stopping position of the glass rod as described in an embodiment of the present invention;
[0028] Figure 2 This is a schematic diagram of the structure of the glass rod stopping position detection device described in an embodiment of the present invention;
[0029] Figure 3 This is a schematic diagram of the structure of the glass rod stopping position detection device described in an embodiment of the present invention.
[0030] The diagram is labeled as follows: 1. Acquisition module; 2. Analysis module; 21. First processing unit; 22. Second processing unit; 23. First identification unit; 24. Third processing unit; 3. Processing module; 31. Fourth processing unit; 32. First extraction unit; 33. Fifth processing unit; 34. Sixth processing unit; 35. Seventh processing unit; 351. First clustering unit; 352. First classification unit; 353. Second classification unit; 354. Third classification unit; 355. Tenth processing unit; 36. Eighth processing unit; 37. Ninth processing unit; 4. Output module; 41. Eleventh processing unit; 42. Twelfth processing unit; 43. Thirteenth processing unit; 801. Processor; 802. Memory; 803. Multimedia component; 804. I / O interface; 805. Communication component. Detailed Implementation
[0031] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0032] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this invention, terms such as "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0033] Example 1:
[0034] This embodiment provides a method for detecting the stopping position of a glass rod.
[0035] See Figure 1 The figure shows that the method includes steps S100, S200, S300 and S400.
[0036] Step S100: Obtain the uploaded images of the experimental exam and the historical experimental exam images. The uploaded images of the experimental exam are continuous frame images taken from a top-down angle.
[0037] It is understandable that in this step, the uploaded image of the experimental exam is the view captured by the camera directly above the plane where the filter paper is located, and the historical experimental exam image is the image information collected in previous experimental exams. By storing and uploading the uploaded experimental exam image and the historical experimental exam image, it is convenient for subsequent processing and recognition.
[0038] Step S200: Based on the preset target detection model, identify the uploaded images of the experimental exam to obtain at least one frame of filter paper image containing the complete filter paper. The target detection model is obtained by training the historical experimental exam images using a neural network algorithm.
[0039] It should be noted that step S200 includes steps S210, S220, S230 and S240.
[0040] Step S210: Perform clarity detection on each frame of the uploaded experimental exam images, and filter out the set of frame images that meet the clarity requirements according to the preset clarity threshold.
[0041] It is understandable that in this step, at least one frame of the image captured by the camera containing the three layers of the filter paper to be detected must be sufficiently clear. If lens shake or other factors cause the filter paper image to be blurred or distorted, or if the shooting conditions are dim so that the human eye cannot distinguish the difference between the three layers of filter paper and the single layer of filter paper, or if the lens is severely tilted so that the state between the three layers of filter paper and the single layer of filter paper does not match the actual situation, then that frame of image needs to be discarded and a subsequent frame of image containing the filter paper to be detected needs to be selected. Image processing can be used to determine whether the image meets the detection requirements by judging the overall brightness, blur, color difference, etc., so as to choose whether to use or discard it.
[0042] Step S220: Normalize the frame image set.
[0043] It is understandable that adjusting the image to a preset size, such as 640×640, in this step improves the speed and accuracy of subsequent target recognition by unifying the image size.
[0044] Step S230: Input the normalized frame image set into the target detection model for recognition, and select the first image containing complete filter paper information based on the recognition results.
[0045] It is understandable that in this step, the target detection model Yolo v5 can be used to detect the area where the filter paper is located. If the target detection model fails to detect the filter paper, i.e., the area where the filter paper is located, then this frame of image is discarded, and another frame of image containing the filter paper is obtained from the camera.
[0046] Step S240: Based on the coordinates of the rectangular detection box of the target detection model, crop the first image to obtain the filter paper image.
[0047] It is understandable that in this step, a rectangular box with the boundary trained by the target recognition algorithm is obtained on the image of the area where the filter paper is detected. The filter paper area is then cropped out. Cropping the filter paper area can reduce the image size, avoid interference from information from other equipment in the experiment, improve detection efficiency, and improve detection accuracy.
[0048] Step S300: Preprocess the filter paper image to obtain a grayscale image, and use Hough line detection to complete the contour of the grayscale image to obtain the three-layer filter paper region.
[0049] It should be noted that step S300 includes steps S310, S320, S330, S340, S350, S360 and S370.
[0050] Step S310: Adjust the contrast of the filter paper image based on the preset adjustment coefficient to obtain the adjusted image.
[0051] It is understandable that this step involves adjusting the RGB space. First, a suitable RGB threshold is set, and then an appropriate adjustment coefficient is calculated based on this threshold to adjust the contrast. The threshold serves as the basis for contrast adjustment. When the contrast is adjusted to -1, all RGB components of the image are equal to the threshold, the image is entirely gray, and the grayscale image contains only one color, i.e., the threshold grayscale. The algorithm is implemented as follows: compare the current pixel's 3D color value with the threshold and obtain the difference; when increasing the contrast, the adjustment coefficient is used to exponentially amplify the difference; when decreasing the contrast, the adjustment coefficient is used to linearly decrease the difference; when the contrast increment is -1, the difference decreases to 0. For example: the current pixel is (50, 200, 250), and the threshold is 200; after increasing the contrast, it might become (10, 200, 255), and after decreasing the contrast, it might become (150, 200, 210).
[0052] Step S320: Convert the adjusted image to a preset color space and extract the channel image obtained by the preset channels.
[0053] It is understandable that in this step, the adjusted image in the RGB image space is converted to YCbCr, and the Y channel image is extracted.
[0054] Step S330: Binarize the channel image to obtain a grayscale image.
[0055] It is understandable that in this step, an appropriate RGB threshold is set for binarization, at which point the three layers of filter paper appear black.
[0056] Step S340: Determine the center point based on the size data of the grayscale image, and segment a circular region in the center of the grayscale image based on the center point to obtain a connected image.
[0057] Understandably, in this step, the image is cropped into the largest possible square, with the midpoint as the center, and a suitable radius is determined to filter out the influence of pixels outside the filter paper, turning the image outside the filter paper white.
[0058] Step S350: The image of the connecting line is processed to remove noise to obtain a denoised image. In the denoised image, the pixels outside the circular connecting line area are 1.
[0059] It should be noted that step S350 includes steps S351, S352, S353, S354 and S355.
[0060] Step S351: Perform density-based clustering on the pixels in the line graph and classify the pixels in the line graph according to the clustering results.
[0061] It is understandable that this step involves using the DBSAN clustering algorithm to remove noise from the image.
[0062] Step S352: Assign pixels whose distance is less than or equal to the distance of the first pixel to core point clusters.
[0063] It is understandable that the core point cluster in this step refers to the pixels within the three layers of filter paper.
[0064] Step S353: Classify pixels whose distance is greater than the distance of the first pixel and less than the distance of the second pixel into edge point clusters.
[0065] It is understandable that in this step, the edge point clusters are the pixels at the edge of the three-layer filter paper area. Step S354: Pixels with a distance greater than the second pixel point are isolated point clusters.
[0066] It is understandable that isolated point clusters in this step are image noise.
[0067] Step S355: Set the number of pixels contained in the isolated point cluster in the line graph to 1 to obtain the noise-reduced image.
[0068] It is understandable that in this step, the image outside the three layers of filter paper is turned white to remove external noise.
[0069] Step S360: Perform erosion and dilation operations on the pixels within the circular line area in the denoised image to obtain an eroded image.
[0070] It is understandable that in this step, the black part of the filter paper is expanded to turn some of the white in the black into black.
[0071] Step S370: Perform Hough line detection on the corrosion map to obtain the boundary line between the three-layer filter paper and the single-layer filter paper. Obtain the position information of the three-layer filter paper based on the boundary line and the arc part in the corrosion map.
[0072] Understandably, this step first performs edge contour detection to determine a suitable radius, filters out the arc portion, and obtains the approximate boundary line between the three-layer filter paper and the single-layer filter paper; then, Hough line detection is used to detect the straight line of the boundary line, and the boundary line is obtained. After erosion and expansion, the three-layer filter paper area is obtained, and the coordinate information is converted into coordinates in the image captured by the camera, which improves the detection accuracy.
[0073] Step S400: Based on the target detection model, identify the uploaded images of the experimental exam to obtain at least one frame of the image to be detected containing the intersection of the glass rod and the funnel, and obtain the detection result based on the three-layer filter paper area and the image to be detected.
[0074] It should be noted that step S400 includes steps S410, S420 and S430.
[0075] Step S410: Mark the bottom endpoint of the glass rod in each frame of the image to be detected to obtain the endpoint coordinates.
[0076] It is understandable that this step obtains the coordinates of the bottom endpoint of the glass rod in each frame of the image.
[0077] Step S420: Determine frame by frame whether the endpoint coordinates in the image to be detected are located within the position of the three layers of filter paper.
[0078] It is understandable that this step involves determining whether the glass rod rests on the three layers of filter paper.
[0079] Step S430: Count the number of image frames in the image to be detected whose endpoint coordinates are located within the position of the three layers of filter paper. If the number of image frames is greater than or equal to the preset frame number threshold, it indicates that the glass rod is correctly positioned.
[0080] It is understandable that this step also needs to consider the time the glass rod stays. The glass rod's endpoint coordinates need to remain stationary for 15 consecutive frames and be located in the area of the three layers of filter paper in order to conclude that the glass rod is in the correct position. Otherwise, it means that the glass rod is in the wrong position.
[0081] Example 2:
[0082] like Figure 2 As shown, this embodiment provides a detection device for the stopping position of a glass rod, the device comprising:
[0083] Module 1 is used to acquire uploaded images from experimental exams and historical experimental exam images. Uploaded images from experimental exams are continuous frame images taken from a top-down angle.
[0084] Analysis module 2 identifies the uploaded images of the experimental exam based on a preset target detection model, and obtains at least one frame of filter paper image containing the complete filter paper. The target detection model is trained using a neural network algorithm on historical experimental exam images.
[0085] Processing module 3 is used to preprocess the filter paper image to obtain a grayscale image, and then use Hough line detection to complete the contour of the grayscale image to obtain the three-layer filter paper region.
[0086] Output module 4 identifies the uploaded images of the experimental exam based on the target detection model, obtains at least one frame of the image to be detected containing the intersection of the glass rod and the funnel, and obtains the detection result based on the three-layer filter paper area and the image to be detected.
[0087] In one specific embodiment of this disclosure, the analysis module 2 includes:
[0088] The first processing unit 21 is used to perform clarity detection on each frame of the uploaded experimental exam images and filter out a set of frame images that meet the clarity requirements according to a preset clarity threshold.
[0089] The second processing unit 22 is used to normalize the frame image set.
[0090] The first recognition unit 23 is used to input the normalized frame image set into the target detection model for recognition, and to filter out the first image containing complete filter paper information based on the recognition result.
[0091] The third processing unit 24 crops the first image based on the coordinates of the rectangular detection box of the target detection model to obtain the filter paper image.
[0092] In one specific embodiment of this disclosure, processing module 3 includes:
[0093] The fourth processing unit 31 adjusts the contrast of the filter paper image based on a preset adjustment coefficient to obtain an adjusted image.
[0094] The first extraction unit 32 converts the adjusted image to a preset color space and extracts the channel image obtained by the preset channel.
[0095] The fifth processing unit 33 is used to binarize the channel image to obtain a grayscale image.
[0096] The sixth processing unit 34 is used to determine the center point based on the size data of the grayscale image, and to segment a circular region in the center of the grayscale image based on the center point to obtain a line image.
[0097] The seventh processing unit 35 is used to filter out noise from the line image to obtain a denoised image, wherein the pixels outside the circular line area in the denoised image are 1.
[0098] The eighth processing unit 36 is used to perform erosion and dilation operations on the pixels within the circular line area in the denoised image to obtain an eroded image.
[0099] The ninth processing unit 37 is used to perform Hough line detection on the corrosion map to obtain the boundary line between the three-layer filter paper and the single-layer filter paper, and to obtain the position information of the three-layer filter paper based on the boundary line and the arc part in the corrosion map.
[0100] In one specific embodiment of this disclosure, the seventh processing unit 35 includes:
[0101] The first clustering unit 351 is used to cluster the pixels in the line graph using a density-based clustering algorithm, and to classify the pixels in the line graph based on the clustering results.
[0102] The first classification unit 352 is used to classify pixels whose distance is less than or equal to the distance of the first pixel into core point clusters.
[0103] The second classification unit 353 is used to classify pixels whose distance is greater than the distance of the first pixel and less than the distance of the second pixel into edge point clusters.
[0104] The third classification unit 354 is used to classify pixels that are more than the distance to the second pixel as isolated point clusters.
[0105] The tenth processing unit 355 is used to set the pixels contained in the isolated point clusters in the line graph to 1 to obtain a denoised image.
[0106] In one specific embodiment of this disclosure, the output module 4 includes:
[0107] The eleventh processing unit 41 is used to mark the bottom endpoint of the glass rod in each frame of the image to be detected, and obtain the endpoint coordinates.
[0108] The twelfth processing unit 42 is used to determine frame by frame whether the endpoint coordinates in the image to be detected are located within the position of the three layers of filter paper.
[0109] The thirteenth processing unit 43 is used to count the number of image frames in the image to be detected whose endpoint coordinates are located within the position of the three layers of filter paper. If the number of image frames is greater than or equal to the preset frame number threshold, it indicates that the glass rod is correctly positioned.
[0110] Example 3:
[0111] Corresponding to the above method embodiments, this embodiment also provides a detection device for the stopping position of a glass rod. The detection device for the stopping position of a glass rod described below and the detection method for the stopping position of a glass rod described above can be referred to in correspondence.
[0112] Figure 3 This is a block diagram illustrating a glass rod docking position detection device 800 according to an exemplary embodiment. Figure 3 As shown, the glass rod docking position detection device 800 may include: a processor 801 and a memory 802. The glass rod docking position detection device 800 may also include one or more of the following: a multimedia component 803, an I / O interface 804, and a communication component 805.
[0113] The processor 801 controls the overall operation of the glass rod stopping position detection device 800 to complete all or part of the steps in the glass rod stopping position detection method described above. The memory 802 stores various types of data to support the operation of the glass rod stopping position detection device 800. This data may include, for example, instructions for any application or method operating on the glass rod stopping position detection device 800, as well as application-related data such as contact data, sent and received messages, images, audio, video, etc. The memory 802 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The multimedia component 803 may include a screen and an audio component. The screen may be, for example, a touchscreen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signals may be further stored in the memory 802 or transmitted via the communication component 805. The audio component also includes at least one speaker for outputting audio signals. I / O interface 804 provides an interface between processor 801 and other interface modules, such as a keyboard, mouse, buttons, etc. These buttons can be virtual or physical buttons. Communication component 805 is used for wired or wireless communication between the glass rod docking position detection device 800 and other devices. Wireless communication includes, for example, Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G, or 4G, or a combination thereof; therefore, the corresponding communication component 805 may include a Wi-Fi module, a Bluetooth module, or an NFC module.
[0114] In an exemplary embodiment, the glass rod docking position detection device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the glass rod docking position detection method described above.
[0115] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, which, when executed by a processor, implement the steps of the glass rod stopping position detection method described above. For example, the computer-readable storage medium may be the memory 802 including the program instructions described above, which may be executed by the processor 801 of the glass rod stopping position detection device 800 to complete the glass rod stopping position detection method described above.
[0116] Example 4:
[0117] Corresponding to the above method embodiments, this embodiment also provides a readable storage medium. The readable storage medium described below and the glass rod docking position detection method described above can be referred to in correspondence.
[0118] A readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the glass rod stopping position detection method described in the above method embodiments.
[0119] Specifically, the readable storage medium can be a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, or any other readable storage medium capable of storing program code.
[0120] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
[0121] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for detecting the stopping position of a glass rod, characterized in that, include: Acquire uploaded images and historical images of experimental exams, wherein the uploaded images of experimental exams are continuous frame images taken from a top-down angle; The uploaded images of the experimental exam are identified based on a preset target detection model to obtain at least one frame of filter paper image containing the complete filter paper. The target detection model is obtained by training the historical experimental exam images using a neural network algorithm. The filter paper image is preprocessed to obtain a grayscale image, and the grayscale image is then contour-completed using Hough line detection to obtain a three-layer filter paper region. The target detection model is used to identify the uploaded images of the experimental exam to obtain at least one frame of the image to be detected containing the intersection of the glass rod and the funnel, and the detection result is obtained based on the three layers of filter paper area and the image to be detected. The detection result is obtained based on the three-layer filter paper region and the image to be detected, including: Mark the bottom endpoint of the glass rod in each frame of the image to be detected to obtain the endpoint coordinates; Determine frame by frame whether the endpoint coordinates in the image to be detected are located within the area of the three layers of filter paper; The number of image frames in the image to be detected whose endpoint coordinates are located within the three layers of filter paper is counted. If the number of image frames is greater than or equal to a preset frame count threshold, it indicates that the glass rod is correctly positioned.
2. The method for detecting the stopping position of the glass rod according to claim 1, characterized in that, The uploaded images from the experimental exam are identified based on a preset target detection model to obtain at least one frame of filter paper image containing the complete filter paper, including: The image uploaded for the experimental exam is subjected to frame-by-frame clarity detection, and a set of frame images that meet the clarity requirements is obtained by filtering according to a preset clarity threshold. The frame image set is then normalized. The normalized set of frame images is input into the target detection model for recognition, and the first image containing complete filter paper information is selected based on the recognition results. The filter paper image is obtained by cropping the first image based on the coordinates of the rectangular detection box of the target detection model.
3. The method for detecting the stopping position of the glass rod according to claim 1, characterized in that, Preprocessing the filter paper image to obtain a grayscale image includes: An adjusted image is obtained by adjusting the contrast of the filter paper image based on a preset adjustment coefficient; The adjusted image is converted to a preset color space and a preset channel image is obtained by extracting the preset channels. The channel image is binarized to obtain a grayscale image.
4. A device for detecting the stopping position of a glass rod, characterized in that, include: The acquisition module is used to acquire uploaded images of experimental exams and historical experimental exam images, wherein the uploaded images of experimental exams are continuous frame images taken from a top-down angle; The analysis module identifies the uploaded experimental exam images based on a preset target detection model to obtain at least one frame of filter paper image containing the complete filter paper. The target detection model is obtained by training the historical experimental exam images using a neural network algorithm. The processing module is used to preprocess the filter paper image to obtain a grayscale image, and to perform contour completion on the grayscale image using Hough line detection to obtain a three-layer filter paper region. The output module identifies the uploaded experimental exam image based on the target detection model to obtain at least one frame of the image to be detected containing the intersection of the glass rod and the funnel, and obtains the detection result based on the three-layer filter paper area and the image to be detected. The output module includes: The eleventh processing unit is used to mark the bottom endpoint of the glass rod in each frame of the image to be detected, and obtain the endpoint coordinates. The twelfth processing unit is used to determine frame by frame whether the endpoint coordinates in the image to be detected are located within the area of the three layers of filter paper; The thirteenth processing unit is used to count the number of image frames in the image to be detected whose endpoint coordinates are located within the three layers of filter paper. If the number of image frames is greater than or equal to a preset frame count threshold, it indicates that the glass rod is correctly positioned.
5. The detection device for the stopping position of the glass rod according to claim 4, characterized in that, The analysis module includes: The first processing unit is used to perform clarity detection on each frame of the uploaded experimental examination image and filter the frame image set that meets the clarity requirements according to the preset clarity threshold. The second processing unit is used to normalize the frame image set. The first recognition unit is used to input the normalized frame image set into the target detection model for recognition, and to filter out the first image containing complete filter paper information based on the recognition result. The third processing unit crops the first image based on the coordinates of the rectangular detection box of the target detection model to obtain a filter paper image.
6. The detection device for the stopping position of the glass rod according to claim 4, characterized in that, The processing module includes: The fourth processing unit performs contrast adjustment on the filter paper image based on a preset adjustment coefficient to obtain an adjusted image; The first extraction unit converts the adjusted image to a preset color space and extracts a channel image from a preset channel. The fifth processing unit is used to binarize the channel image to obtain a grayscale image.
7. A device for detecting the stopping position of a glass rod, characterized in that, include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the steps of the method for detecting the stopping position of the glass rod as described in any one of claims 1 to 3.
8. A readable storage medium, characterized in that: The readable storage medium stores a computer program that, when executed by a processor, implements the steps of the method for detecting the stopping position of the glass rod as described in any one of claims 1 to 3.
Citation Information
Patent Citations
Chemical experiment test point analysis method and device
CN111753624A
Three-layer filter paper positioning method for crude saline water filtering experiment in physicochemical and biological intelligent evaluation
CN115239940A