Glass support raw material warehousing automatic identification and counting method based on machine vision
By combining machine vision equipment and the Sobel algorithm, the automatic identification and counting of glass support materials has been achieved, solving the problems of low efficiency and poor accuracy of manual identification and improving the identification and counting accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-20
- Publication Date
- 2026-04-14
AI Technical Summary
In the current technology, manual identification and counting during the warehousing process of glass support raw materials is inefficient and inaccurate, and cannot achieve automatic identification of different types of raw materials. Furthermore, the existing photoelectric sensing equipment has poor adaptability.
Machine vision equipment is used for real-time image acquisition. Edge contours are extracted through grayscale processing and Sobel algorithm. Combined with image comparison and verification at adjacent time points, the raw materials can be automatically identified and counted.
It improves the accuracy of raw material identification and counting, solves the identification confusion and counting errors caused by material similarity, and has strong adaptability, adapting to the dynamic changes in the raw material transportation process.
Smart Images

Figure CN121861331A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of machine vision technology, specifically to a machine vision-based method for automatic identification and counting of glass support raw materials entering the warehouse. Background Technology
[0002] In the glass support frame manufacturing industry, the raw material warehousing stage is a crucial preliminary step to ensure the smooth operation of subsequent production processes. Its core requirement lies in the rapid classification, identification, and accurate quantity counting of raw materials for glass supports (such as silica, alumina, calcium oxide, and magnesium oxide). Currently, most companies in the industry still rely on the traditional manual warehousing model, where operators visually inspect the appearance of the raw materials, manually record their type and quantity, and then enter the data into the warehouse management system. However, this model has many unavoidable drawbacks in practical application.
[0003] On the one hand, manual identification and counting are inefficient and cannot meet the needs of large-volume, high-frequency raw material warehousing in modern production. Glass support raw materials are mostly transported continuously via conveyor belts, requiring manual monitoring of the transport line in real time. This not only easily leads to fatigue and distraction, but also necessitates completing classification and counting within a short period, greatly limiting the overall speed of the warehousing process. Especially during peak production seasons, this can easily cause raw material accumulation, affecting production progress.
[0004] On the other hand, the accuracy of manual operation is difficult to guarantee. The materials of glass brackets are similar in appearance (such as oxide materials with different ratios), and it is easy to make mistakes by visually distinguishing them. At the same time, problems such as omissions and double counting are easy to occur during manual counting, resulting in discrepancies between the data entering the warehouse and the actual quantity of raw materials, which in turn leads to chaos in inventory management and increases the difficulty of subsequent production scheduling.
[0005] To address these issues, some companies have attempted to introduce simple photoelectric sensor counting devices. However, these devices can only count the quantity of raw materials of a single specification and cannot automatically identify different types of raw materials. Furthermore, the counting error increases significantly when raw materials are stuck together, overlapping, or their transport posture changes, resulting in poor adaptability. With the development of intelligent manufacturing technology, machine vision technology, with its advantages of non-contact operation, high precision, and high efficiency, is gradually becoming an important tool in the field of industrial inspection and identification.
[0006] Therefore, developing an automatic identification and counting method for glass bracket raw materials entering the warehouse based on machine vision to replace the traditional manual mode and solve the problems of low identification efficiency, poor counting accuracy and weak scene adaptability in the existing technology has become a technical direction that the industry urgently needs to break through. Summary of the Invention
[0007] To address the shortcomings of existing technologies, this invention provides a machine vision-based method for automatic identification and counting of glass bracket raw materials upon warehousing, which solves the problem that it can only count the quantity of raw materials of a single specification and cannot automatically identify different types of raw materials.
[0008] To achieve the above objectives, the present invention provides the following technical solution: an automatic identification and counting method for glass support raw materials entering the warehouse based on machine vision, comprising the following steps: Step 1: Use machine vision equipment to collect images of glass support raw materials in real time during transportation, and perform grayscale confirmation on different frames of images in the acquisition process. Then, mark the edge contours associated with different individuals from the confirmed grayscale images to generate the corresponding processed images associated with the acquisition process. Step 2: Based on the processed image associated with the current time, confirm the total number of glass support materials associated with the current time, and then confirm the processed image associated with the next time. Compare and verify the processed images associated with adjacent times to confirm the number of materials added in the next time. Based on the real-time confirmation process, output the total number of confirmed materials in real time.
[0009] Preferably, in step one, the specific method for grayscale confirmation of the glass support material image is as follows: Machine vision equipment is used to acquire images of glass support raw materials during transportation in real time. The acquired images are then converted to grayscale to identify the associated grayscale images. The acquired images of the glass support raw materials are recorded as the master image. The RGB values associated with different pixels within the master image are confirmed, and the grayscale value is calculated as follows: Grayscale value = R i ×0.299+G i ×0.587+B i ×0.114, confirm the grayscale value associated with the corresponding pixel, where i represents different pixels; Based on the different gray values associated with different pixels, a grayscale image associated with the corresponding image is generated.
[0010] Preferably, in step one, the specific method for generating the processed image is as follows: The Sobel algorithm is used to confirm the vertical and horizontal gradients associated with different pixels in the grayscale image. Confirm the comprehensive gradient associated with the corresponding pixel, and mark the pixel that satisfies: comprehensive gradient ≥ Y1 as gradient pixel, otherwise do not perform any marking process, where Y1 is a preset value; Adjacent gradient pixels are connected to identify the gradient contour associated with several gradient pixels. The edge contour that forms a closed state is recorded as the feature contour and simultaneously marked in the grayscale image. The processed grayscale image is recorded as the processed image associated with the corresponding acquisition time.
[0011] Preferably, in step two, the specific method for confirming the total number of glass support materials associated with the current moment is as follows: Based on the processed image associated with the current time, identify the marked feature contours within the processed image, and record the total number of feature contours, denoted as ZS. k , where k represents different times, and here it represents the current time; In the total number ZS k Once determined, the image features associated with the currently processed image are confirmed: each set of feature contours is combined with a set of two-dimensional coordinate systems, the two-dimensional coordinates associated with different contour points within the feature contours in the two-dimensional coordinate system are determined, the two-dimensional coordinates associated with different contour points within the feature contours are determined sequentially, and the mean value of several sets of determined two-dimensional coordinates is processed, the mean coordinates are confirmed, the position of the mean coordinates in the two-dimensional coordinate system is confirmed, and they are simultaneously marked within the feature contours and recorded as feature points of the feature contours. Based on the different feature points identified within different feature contours, adjacent feature points are connected in pairs to identify the feature lines associated with several groups of adjacent feature points. The process stops when the feature lines of several groups of feature points have been determined. The feature polygons associated with several groups of feature lines are recorded as the image features associated with the currently processed image.
[0012] Preferably, in step two, the specific method for comparing and verifying images processed at adjacent time points is as follows: The image features associated with the image processed at the previous moment are confirmed by adopting the same confirmation method. The image features associated with the image processed at the next moment are confirmed. The two sets of confirmed image features are compared and verified. The image features at the previous moment are recorded as the reference features, and the image features at the next moment are recorded as the undetermined features. The image contours associated with two sets of processed images at adjacent time points are made to overlap. After the overlap is completed, the feature to be determined and the reference feature are moved horizontally towards each other. During the movement, the overlapping area between the feature to be determined and the reference feature is identified, and the area ratio of the overlapping area is recorded. The movement stops when the area ratio rises to the maximum value and the current movement state remains unchanged. The non-overlapping area within the feature to be determined is recorded as the area to be analyzed. The associated feature contours within the analysis area are confirmed to identify their existence. If they exist, they are counted, and the total count is added to ZS. kWithin the current time frame, a total count associated with the current time frame is generated. If no feature contour exists, no counting processing is required. The processed images associated with subsequent adjacent time frames are continuously compared and verified to complete the real-time counting process.
[0013] Preferably, the area ratio = overlapping area ÷ total area of the reference feature area.
[0014] This invention provides a machine vision-based method for automatic identification and counting of glass support raw materials entering a warehouse. Compared with existing technologies, it has the following advantages: In terms of recognition accuracy, by combining grayscale processing with the Sobel algorithm to extract the edge contour of the glass support material, and using the threshold judgment of the comprehensive gradient pixels to generate feature contours, the morphological features of the material can be accurately captured, effectively distinguishing different materials such as silicon dioxide and alumina, reducing recognition confusion caused by material similarity, and laying a reliable foundation for subsequent counting. In terms of counting accuracy, an innovative comparison and verification mechanism for images processed at adjacent time points is adopted. By constructing image features through feature points and analyzing overlapping areas and areas to be analyzed, new raw materials are accurately captured and the total number is updated. This not only avoids missed or false detections that may occur in a single shot, but also solves the problem of repeated counting of raw materials in continuous transportation scenarios, significantly improving the accuracy of counting during dynamic transportation. Attached Figure Description
[0015] Figure 1 This is a schematic diagram of the method flow of the present invention. Detailed Implementation
[0016] 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 embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0017] First Embodiment Please see Figure 1 This application provides a machine vision-based method for automatic identification and counting of glass support raw materials entering the warehouse, including the following steps: Step 1: Use machine vision equipment to acquire images of glass support raw materials in real time during transportation, and perform grayscale confirmation on different frames of images during the acquisition process. Then, mark the edge contours associated with different individuals from the confirmed grayscale images to generate the corresponding processed images associated with the acquisition process. Specifically, the glass support raw materials are transported by a corresponding conveyor belt, and are generally silicon dioxide, aluminum oxide, calcium oxide, and magnesium oxide. When transported on the corresponding conveyor belt, the machine vision equipment monitors the conveyor belt in real time according to the settings, generates and processes the images associated with the conveyor belt surface, confirms the grayscale contours associated with the corresponding images, and completes the process of distinguishing between different raw materials. Step 2: Based on the processed image associated with the current time, confirm the total number of glass support materials associated with the current time, and then confirm the processed image associated with the next time. Compare and verify the processed images associated with adjacent times to confirm the number of materials added in the next time. Based on the real-time confirmation process, output the total number of confirmed materials in real time. Specifically, the processed image at the previous moment contains a corresponding internal contour, which can effectively determine the comprehensive internal features associated with the processed image. This allows for the comprehensive determination of the total number of the corresponding stent material. Subsequently, for the processed image associated with the next moment, the same processing method is used to confirm the quantity of the material. Based on the comparison and overlap verification process between the two adjacent moments, the total quantity of the corresponding material is quickly determined and output.
[0018] As a second embodiment of this application, based on the first embodiment, it mainly includes a confirmation process for processed images. In step one, the specific method for generating the processed image is as follows: Machine vision equipment is used to acquire images of glass support raw materials during transportation in real time. The acquired images are then converted to grayscale to identify the associated grayscale images. The acquired images of the glass support raw materials are recorded as the master image. The RGB values associated with different pixels within the master image are confirmed, and the grayscale value is calculated as follows: Grayscale value = R i ×0.299+G i ×0.587+B i ×0.114, confirm the grayscale value associated with the corresponding pixel, where i represents different pixels; Based on the different gray values associated with different pixels, a grayscale image associated with the corresponding image is generated. The Sobel algorithm is used to identify the vertical and horizontal gradients associated with different pixels in a grayscale image. According to the Sobel algorithm, the grayscale values associated with a corresponding pixel and its surrounding pixels can be determined. Different grayscale values are associated with different weight factors. After convolution and summation, the vertical and horizontal gradients associated with the corresponding pixel can be determined. Confirm the comprehensive gradient associated with the corresponding pixel, and mark the pixel that satisfies the condition that the comprehensive gradient is ≥ Y1 as the gradient pixel. Otherwise, no marking process is performed. Y1 is a preset value, and its specific value is determined by the operator based on experience. Connect adjacent gradient pixels to identify the gradient contour associated with several gradient pixels, and record the closed edge contour as the feature contour, and mark it synchronously in the grayscale image. Record the processed grayscale image as the processed image associated with the corresponding acquisition time. Specifically, the images associated with different times are the specific images associated with different frame times. After the corresponding images are processed into grayscale, the associated grayscale images are obtained. Then, the Sobel algorithm is used to confirm the grayscale values associated with different pixels in the grayscale images, and then the comprehensive gradient associated with different pixels is confirmed. Based on the different comprehensive gradients associated with different pixels, it is possible to effectively determine whether the corresponding pixel belongs to the gradient pixel and complete the gradient contour calibration process.
[0019] As a third embodiment of this application, based on the first embodiment, it mainly includes the detailed processing steps of step two: In step two, the specific method for confirming the total number of glass support materials associated with the current moment is as follows: Based on the processed image associated with the current time, identify the marked feature contours within the processed image, and record the total number of feature contours, denoted as ZS. k , where k represents different times, and here it represents the current time; In the total number ZS k Once determined, the image features associated with the currently processed image are confirmed: each set of feature contours is combined with a set of two-dimensional coordinate systems, and the two-dimensional coordinates associated with different contour points within the feature contours in the two-dimensional coordinate system are determined. The two-dimensional coordinates associated with different contour points within the feature contours are determined sequentially, and the determined sets of two-dimensional coordinates are averaged to confirm the mean coordinates. Then, the position of the mean coordinates in the two-dimensional coordinate system is confirmed and simultaneously marked within the feature contours, recorded as feature points of the feature contours (that is, the center points associated with the corresponding feature contours). Based on the different feature points identified within different feature contours, adjacent feature points are connected in pairs to identify the feature lines associated with several groups of adjacent feature points. The process stops when the feature lines of several groups of feature points have been determined. The feature polygons associated with several groups of feature lines are recorded as the image features associated with the currently processed image.
[0020] In step two, the specific method for comparing and verifying the processed images associated with adjacent time points is as follows: The image features associated with the image processed at the previous moment are confirmed by adopting the same confirmation method. The image features associated with the image processed at the next moment are confirmed. The two sets of confirmed image features are compared and verified. The image features at the previous moment are recorded as the reference features, and the image features at the next moment are recorded as the undetermined features. The image contours associated with two sets of processed images at adjacent time points are made to overlap. After the overlap is completed, the feature to be determined and the reference feature are moved horizontally towards each other. During the movement, the overlapping area between the feature to be determined and the reference feature is identified, and the area ratio of the overlapping area is recorded. The area ratio = the area of the overlapping area ÷ the total area of the reference feature. The movement stops when the area ratio rises to the maximum value and the current movement state remains unchanged. The non-overlapping area within the feature to be determined is recorded as the area to be analyzed. The associated feature contours within the analysis area are confirmed to identify their existence. If they exist, they are counted, and the total count is added to ZS. k Within the current time, generate the total count associated with the current time. If it does not exist, no counting processing is required. Continue to compare and verify the processed images associated with subsequent adjacent time times to complete the real-time counting process. Specifically, the two adjacent time sets are associated with different processed images. Under normal circumstances, the time interval between adjacent time sets is only 1 second. There is an overlapping area between the image 1 second ago and the image 1 second later. By connecting feature points and determining the feature area, the overlapping area and the non-overlapping area can be effectively identified. The non-overlapping area is the newly generated area. This part of the area needs to be counted to complete the corresponding total count process and output.
[0021] Some of the data in the above formulas are numerical calculations with dimensions removed, and the contents not described in detail in this specification are all prior art known to those skilled in the art.
[0022] The above embodiments are only used to illustrate the technical methods of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical methods of the present invention without departing from the spirit and scope of the technical methods of the present invention.
Claims
1. A machine vision-based method for automatic identification and counting of glass support raw materials entering the warehouse, characterized in that, Includes the following steps: Step 1: Use machine vision equipment to collect images of glass support raw materials in real time during transportation, and perform grayscale confirmation on different frames of images in the acquisition process. Then, mark the edge contours associated with different individuals from the confirmed grayscale images to generate the corresponding processed images associated with the acquisition process. Step 2: Based on the processed image associated with the current time, confirm the total number of glass support materials associated with the current time, and then confirm the processed image associated with the next time. Compare and verify the processed images associated with adjacent times to confirm the number of materials added in the next time. Based on the real-time confirmation process, output the total number of confirmed materials in real time.
2. The automatic identification and counting method for glass bracket raw materials entering the warehouse based on machine vision according to claim 1, characterized in that, In step one, the specific method for grayscale confirmation of the glass support material image is as follows: Machine vision equipment is used to acquire images of glass support raw materials during transportation in real time. The acquired images are then converted to grayscale to identify the associated grayscale images. The acquired images of the glass support raw materials are recorded as the master image. The RGB values associated with different pixels within the master image are confirmed, and the grayscale value is calculated as follows: Grayscale value = R i ×0.299+G i ×0.587+B i ×0.114, confirm the grayscale value associated with the corresponding pixel, where i represents different pixels; Based on the different gray values associated with different pixels, a grayscale image associated with the corresponding image is generated.
3. The automatic identification and counting method for glass bracket raw materials entering the warehouse based on machine vision according to claim 2, characterized in that, In step one, the specific method for generating the processed image is as follows: The Sobel algorithm is used to confirm the vertical and horizontal gradients associated with different pixels in the grayscale image. Confirm the comprehensive gradient associated with the corresponding pixel, and mark the pixel that satisfies: comprehensive gradient ≥ Y1 as gradient pixel, otherwise do not perform any marking process, where Y1 is a preset value; Adjacent gradient pixels are connected to identify the gradient contour associated with several gradient pixels. The closed edge contour is recorded as the feature contour and simultaneously marked in the grayscale image. The processed grayscale image is recorded as the processed image associated with the corresponding acquisition time.
4. The automatic identification and counting method for glass bracket raw materials entering the warehouse based on machine vision according to claim 1, characterized in that, In step two, the specific method for confirming the total number of glass support materials associated with the current moment is as follows: Based on the processed image associated with the current time, identify the marked feature contours within the processed image, and record the total number of feature contours, denoted as ZS. k , where k represents different times, and here represents the current time; In the total number ZS k Once determined, the image features associated with the currently processed image are confirmed: each set of feature contours is combined with a set of two-dimensional coordinate systems, the two-dimensional coordinates associated with different contour points within the feature contours in the two-dimensional coordinate system are determined, the two-dimensional coordinates associated with different contour points within the feature contours are determined sequentially, and the mean value of several sets of determined two-dimensional coordinates is processed, the mean coordinates are confirmed, the position of the mean coordinates in the two-dimensional coordinate system is confirmed, and they are simultaneously marked within the feature contours and recorded as feature points of the feature contours. Based on the different feature points identified within different feature contours, adjacent feature points are connected in pairs to identify the feature lines associated with several groups of adjacent feature points. The process stops when the feature lines of several groups of feature points have been determined. The feature polygons associated with several groups of feature lines are recorded as the image features associated with the currently processed image.
5. The automatic identification and counting method for glass bracket raw materials entering the warehouse based on machine vision according to claim 4, characterized in that, In step two, the specific method for comparing and verifying images processed at adjacent time points is as follows: The image features associated with the image processed at the previous moment are confirmed by adopting the same confirmation method. The image features associated with the image processed at the next moment are confirmed. The two sets of confirmed image features are compared and verified. The image features at the previous moment are recorded as the reference features, and the image features at the next moment are recorded as the undetermined features. The image contours associated with two sets of processed images at adjacent time points are made to overlap. After the overlap is completed, the feature to be determined and the reference feature are moved horizontally towards each other. During the movement, the overlapping area between the feature to be determined and the reference feature is identified, and the area ratio of the overlapping area is recorded. The movement stops when the area ratio rises to the maximum value and the current movement state remains unchanged. The non-overlapping area within the feature to be determined is recorded as the area to be analyzed. The associated feature contours within the analysis area are confirmed to identify their existence. If they exist, they are counted, and the total count is added to ZS. k Within, generate the total count associated with the current time.
6. The automatic identification and counting method for glass bracket raw materials entering the warehouse based on machine vision according to claim 5, characterized in that, If no feature contour exists, no counting processing is required. Instead, the processed images associated with subsequent adjacent time steps are continuously compared and verified to complete the real-time counting process.
7. The automatic identification and counting method for glass bracket raw materials entering the warehouse based on machine vision according to claim 5, characterized in that, The area ratio is calculated as: overlapping area ÷ total area of the baseline feature region.