A medicine material recognition system and method based on machine vision
Patent Information
- Application Number
- CN202411725078.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2026-10-16
AI Technical Summary
此外,若药材未按照规定存储在合适的温湿度环境中,容易导致药材表面衍生繁殖有昆虫,这些昆虫不仅会蛀蚀药材,还会对药材产生生物污染,从而影响药材的质量
[0064]This application provides a machine vision-based medicinal herb identification system and method. The system performs machine vision recognition on clusters of selected medicinal herbs, obtaining global color distribution and contour distribution features. This information is used to determine the presence status of abnormal and defective herbs within the clusters. Abnormal and defective herbs within the clusters are then globally and automatically located and identified, preventing omissions and misidentifications. Furthermore, based on the presence status information of abnormal and defective herbs, a distribution map of herbs to be removed from the clusters is generated. Each herb requiring removal is located and characterized, providing precise navigation guidance for subsequent removal operations. Finally, based on the distribution map and the transportation dynamics of the clusters, the removal operation is adjusted to achieve accurate and rapid removal of the corresponding herbs, improving the reliability of medicinal herb quality control operations.
Smart Images

Figure CN122922053A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of machine vision recognition, and more particularly to a machine vision-based system and method for identifying medicinal materials. Background Technology
[0002] Medicinal herbs undergo multiple processing steps from plant harvesting to the final product, each affecting their quality. Furthermore, if herbs are not stored in a suitable temperature and humidity environment, insects can easily proliferate on their surface. These insects not only bore into the herbs but also cause biological contamination, further impacting their quality. Current quality control methods primarily rely on experienced staff manually identifying and screening herbs. This approach cannot comprehensively and accurately identify and screen large quantities of herbs within a short timeframe, leading to omissions and misidentifications, thus reducing the reliability and accuracy of quality control procedures. Summary of the Invention
[0003] The purpose of this invention is to provide a machine vision-based medicinal herb identification system and method. This system performs machine vision identification on clusters of selected medicinal herbs to obtain global color distribution and contour distribution features. This information is used to determine the presence status of abnormal and defective herbs within the clusters. Abnormal and defective herbs within the clusters are then automatically located and identified globally, preventing omissions and misidentifications. Furthermore, based on the abnormal and defective herb presence information, a distribution map of herbs to be removed from the clusters is generated. Each herb within the cluster is then located and characterized, providing precise navigation guidance for subsequent herb removal operations. Finally, based on the distribution map and the dynamic transportation features of the clusters, the herb removal operation is adjusted to achieve accurate and rapid removal of the corresponding herbs, improving the reliability of medicinal herb quality control operations.
[0004] This invention is achieved through the following technical solution:
[0005] A machine vision-based medicinal herb identification system includes:
[0006] The first machine vision recognition module is used to perform first machine vision recognition on the cluster of medicinal materials to be selected, and obtain the global color distribution feature information of the cluster of medicinal materials to be selected.
[0007] An abnormal medicinal material location module is used to determine the existence status information of abnormal medicinal materials in the candidate medicinal material cluster based on the global color distribution feature information.
[0008] The second machine vision recognition module is used to perform second machine vision recognition on the candidate medicinal material cluster to obtain the global contour distribution feature information of the candidate medicinal material cluster.
[0009] The defective medicinal material location module is used to determine the existence status information of defective medicinal materials in the candidate medicinal material cluster based on the global contour distribution feature information.
[0010] The map generation module is used to generate a distribution map of the medicinal materials to be removed from the candidate medicinal material cluster based on the abnormal medicinal material existence status information and the defective medicinal material existence status information.
[0011] The herb removal operation adjustment module is used to adjust the herb removal operation on the candidate herb cluster based on the distribution map of the herbs to be removed and the transportation dynamic feature information of the candidate herb cluster.
[0012] Optionally, the first machine vision recognition module is used to perform first machine vision recognition on the cluster of medicinal materials to be selected, and obtain global color distribution feature information of the cluster of medicinal materials to be selected, including:
[0013] Based on the relative position and relative motion relationship between the candidate medicinal material cluster and the machine vision equipment, the change information of the cluster area where the candidate medicinal material cluster enters the field of view of the machine vision equipment during transportation is determined.
[0014] Based on the changes in the cluster area, the shooting parameters of the machine vision device for taking pictures of the candidate medicinal material cluster are determined, and several local images of the candidate medicinal material cluster are obtained; the first global image formed by directly stitching together all the local images is processed by a deep learning network model to obtain the global color distribution feature information of the candidate medicinal material cluster.
[0015] The abnormal medicinal material location module is used to determine the existence status information of abnormal medicinal materials in the candidate medicinal material cluster based on the global color distribution feature information, including:
[0016] The global color distribution feature information is compared with the preset benchmark color feature information to determine the color deviation degree information of each sub-region under the candidate medicinal material cluster; based on the color deviation degree information, the location of all abnormal medicinal materials in each sub-region is identified, and the location information of abnormal medicinal materials corresponding to all sub-regions is integrated into the abnormal medicinal material existence status information of the candidate medicinal material cluster.
[0017] Optionally, the operating status of the first machine vision recognition module is detected, and an alarm is triggered when an abnormality is detected in the operating status, including:
[0018] Real-time acquisition of operating parameters during the operation of the first machine vision recognition module; wherein, the operating parameters include the response time, memory utilization, and error rate of global color distribution feature information acquisition;
[0019] The response time obtained using the global color distribution feature information is compared with a preset response time threshold;
[0020] When the response time obtained from the global color distribution feature information exceeds the preset response time threshold, the operation determination coefficient is obtained by using the response time, memory utilization and error rate obtained from the global color distribution feature information.
[0021] The operation determination coefficient is obtained by the following formula:
[0022]
[0023] Where L represents the operational decision coefficient; P c P represents the error rate; n represents the total number of recognitions in the first machine vision recognition; P represents the error rate. i P represents the memory utilization rate corresponding to the i-th identification; ci P represents the error rate corresponding to the i-th recognition; wi P represents the memory utilization rate before the start of the i-th recognition; ti Let S represent the recognition delay rate corresponding to the i-th recognition; S represents the adjustment coefficient, which is obtained by the following formula:
[0024]
[0025] Where S represents the adjustment coefficient; n represents the total number of recognitions in the first machine vision recognition; P i P represents the memory utilization rate corresponding to the i-th identification; wi T represents the memory utilization rate before the start of the i-th recognition; c This indicates the preset response time reference value; T i This represents the response time for acquiring the global color distribution feature information corresponding to the i-th recognition;
[0026] The running determination coefficient is compared with a preset determination coefficient threshold;
[0027] When the operation judgment coefficient exceeds the preset judgment coefficient threshold, the first machine vision recognition module is determined to be abnormal and an abnormal alarm is triggered.
[0028] Optionally, the second machine vision recognition module is used to perform second machine vision recognition on the candidate medicinal material cluster to obtain global contour distribution feature information of the candidate medicinal material cluster, including:
[0029] Based on the ambient lighting characteristics of each local image during the shooting process, the pixel exposure state of each local image is adjusted to ensure that all local images have the same pixel contrast. Then, all local images are stitched together to form a second global image. Pixel contour recognition is performed on the second global image to obtain the global contour distribution characteristics of the second global image.
[0030] The defective medicinal material location module is used to determine the presence status information of defective medicinal materials in the candidate medicinal material cluster based on the global contour distribution feature information, including:
[0031] Structural morphology analysis is performed on the global contour distribution feature information to determine the surface bio-erosion region distribution feature information of each individual medicinal herb under the candidate medicinal herb cluster; based on the surface bio-erosion region distribution feature information, it is determined whether the individual medicinal herb belongs to defective medicinal herb, and the location information of all defective medicinal herbs is integrated into defective medicinal herb existence status information.
[0032] Optionally, the map generation module is used to generate a distribution map of medicinal materials to be removed from the candidate medicinal material cluster based on the abnormal medicinal material presence status information and the defective medicinal material presence status information, including:
[0033] The abnormal medicinal material presence status information and the defective medicinal material presence status information are mapped together to the same coordinate space to generate a distribution map of abnormal and defective medicinal materials for the candidate medicinal material cluster; the distribution map is then distinguished and identified as abnormal and defective medicinal materials, and converted to obtain a distribution map of medicinal materials to be removed.
[0034] The herb removal operation adjustment module is used to adjust the herb removal operation on the candidate herb cluster based on the distribution map of the herbs to be removed and the transportation dynamic characteristic information of the candidate herb cluster, including:
[0035] Based on the distribution map of the medicinal materials to be removed, the distribution characteristics of the medicinal materials to be removed within the candidate medicinal material cluster are determined; wherein, the distribution characteristics include the distribution location coordinates and distribution cluster density of the medicinal materials to be removed;
[0036] Based on the distribution characteristics of the medicinal materials to be removed and the transportation path and speed of the cluster of medicinal materials to be selected, the spatial range of the medicinal material removal operation and / or the parameters of the medicinal material removal grasping action are adjusted.
[0037] A machine vision-based method for identifying medicinal materials includes:
[0038] The candidate medicinal herb cluster is subjected to first machine vision recognition to obtain global color distribution feature information of the candidate medicinal herb cluster; based on the global color distribution feature information, the abnormal medicinal herb existence status information of the candidate medicinal herb cluster is determined.
[0039] The candidate medicinal herb cluster is subjected to second machine vision recognition to obtain global contour distribution feature information of the candidate medicinal herb cluster; based on the global contour distribution feature information, the existence status information of defective medicinal herbs in the candidate medicinal herb cluster is determined.
[0040] Based on the abnormal medicinal material presence status information and the defective medicinal material presence status information, a distribution map of medicinal materials to be removed from the candidate medicinal material cluster is generated; based on the distribution map of medicinal materials to be removed and the transportation dynamic characteristic information of the candidate medicinal material cluster, the medicinal material removal operation of the candidate medicinal material cluster is adjusted.
[0041] Optionally, a first machine vision recognition is performed on the cluster of medicinal materials to be selected to obtain global color distribution feature information of the cluster; based on the global color distribution feature information, the abnormal medicinal material presence status information of the cluster is determined, including:
[0042] Based on the relative position and relative motion relationship between the candidate medicinal material cluster and the machine vision equipment, the change information of the cluster area where the candidate medicinal material cluster enters the field of view of the machine vision equipment during transportation is determined.
[0043] Based on the changes in the cluster area, the shooting parameters of the machine vision device for taking pictures of the candidate medicinal material cluster are determined, and several local images of the candidate medicinal material cluster are obtained; the first global image formed by directly stitching together all the local images is processed by a deep learning network model to obtain the global color distribution feature information of the candidate medicinal material cluster.
[0044] The global color distribution feature information is compared with the preset benchmark color feature information to determine the color deviation degree information of each sub-region under the candidate medicinal material cluster; based on the color deviation degree information, the location of all abnormal medicinal materials in each sub-region is identified, and the location information of abnormal medicinal materials corresponding to all sub-regions is integrated into the abnormal medicinal material existence status information of the candidate medicinal material cluster.
[0045] Optionally, the operating status of the first machine vision recognition module is detected, and an alarm is triggered when an abnormality is detected in the operating status, including:
[0046] Real-time acquisition of operating parameters during the operation of the first machine vision recognition module; wherein, the operating parameters include the response time, memory utilization, and error rate of global color distribution feature information acquisition;
[0047] The response time obtained using the global color distribution feature information is compared with a preset response time threshold;
[0048] When the response time obtained from the global color distribution feature information exceeds the preset response time threshold, the operation determination coefficient is obtained by using the response time, memory utilization and error rate obtained from the global color distribution feature information.
[0049] The operation determination coefficient is obtained by the following formula:
[0050]
[0051] Where L represents the operational decision coefficient; P c P represents the error rate; n represents the total number of recognitions in the first machine vision recognition; P represents the error rate. i P represents the memory utilization rate corresponding to the i-th identification; ci P represents the error rate corresponding to the i-th recognition; wi P represents the memory utilization rate before the start of the i-th recognition; ti Let S represent the recognition delay rate corresponding to the i-th recognition; S represents the adjustment coefficient, which is obtained by the following formula:
[0052]
[0053] Where S represents the adjustment coefficient; n represents the total number of recognitions in the first machine vision recognition; P i P represents the memory utilization rate corresponding to the i-th identification; wi T represents the memory utilization rate before the start of the i-th recognition; c This indicates the preset response time reference value; T i This represents the response time for acquiring the global color distribution feature information corresponding to the i-th recognition;
[0054] The running determination coefficient is compared with a preset determination coefficient threshold;
[0055] When the operation judgment coefficient exceeds the preset judgment coefficient threshold, the first machine vision recognition module is determined to be abnormal and an abnormal alarm is triggered.
[0056] Optionally, a second machine vision recognition is performed on the candidate medicinal herb cluster to obtain global contour distribution feature information of the candidate medicinal herb cluster; based on the global contour distribution feature information, the presence status information of defective medicinal herbs in the candidate medicinal herb cluster is determined, including:
[0057] Based on the ambient lighting characteristics of each local image during the shooting process, the pixel exposure state of each local image is adjusted to ensure that all local images have the same pixel contrast. Then, all local images are stitched together to form a second global image. Pixel contour recognition is performed on the second global image to obtain the global contour distribution characteristics of the second global image.
[0058] Structural morphology analysis is performed on the global contour distribution feature information to determine the surface bio-erosion region distribution feature information of each individual medicinal herb under the candidate medicinal herb cluster; based on the surface bio-erosion region distribution feature information, it is determined whether the individual medicinal herb belongs to defective medicinal herb, and the location information of all defective medicinal herbs is integrated into defective medicinal herb existence status information.
[0059] Optionally, based on the presence status information of the abnormal medicinal materials and the presence status information of the defective medicinal materials, a distribution map of medicinal materials to be removed from the candidate medicinal material cluster is generated; based on the distribution map of medicinal materials to be removed and the transportation dynamic characteristic information of the candidate medicinal material cluster, the medicinal material removal operation for the candidate medicinal material cluster is adjusted, including:
[0060] The abnormal medicinal material presence status information and the defective medicinal material presence status information are mapped together to the same coordinate space to generate a distribution map of abnormal and defective medicinal materials for the candidate medicinal material cluster; the distribution map is then distinguished and identified as abnormal and defective medicinal materials, and converted to obtain a distribution map of medicinal materials to be removed.
[0061] Based on the distribution map of the medicinal materials to be removed, the distribution characteristics of the medicinal materials to be removed within the candidate medicinal material cluster are determined; wherein, the distribution characteristics include the distribution location coordinates and distribution cluster density of the medicinal materials to be removed;
[0062] Based on the distribution characteristics of the medicinal materials to be removed and the transportation path and speed of the cluster of medicinal materials to be selected, the spatial range of the medicinal material removal operation and / or the parameters of the medicinal material removal grasping action are adjusted.
[0063] Compared with the prior art, the present invention has the following beneficial effects:
[0064] This application provides a machine vision-based medicinal herb identification system and method. The system performs machine vision recognition on clusters of selected medicinal herbs, obtaining global color distribution and contour distribution features. This information is used to determine the presence status of abnormal and defective herbs within the clusters. Abnormal and defective herbs within the clusters are then globally and automatically located and identified, preventing omissions and misidentifications. Furthermore, based on the presence status information of abnormal and defective herbs, a distribution map of herbs to be removed from the clusters is generated. Each herb requiring removal is located and characterized, providing precise navigation guidance for subsequent removal operations. Finally, based on the distribution map and the transportation dynamics of the clusters, the removal operation is adjusted to achieve accurate and rapid removal of the corresponding herbs, improving the reliability of medicinal herb quality control operations. Attached Figure Description
[0065] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Wherein:
[0066] Figure 1 This is a schematic diagram of the structure of a machine vision-based medicinal herb identification system provided by the present invention.
[0067] Figure 2 This is a flowchart illustrating a machine vision-based method for identifying medicinal materials provided by the present invention. Detailed Implementation
[0068] To make the above-mentioned objectives, features, and advantages of this application more apparent and understandable, the specific embodiments of this application will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of this application. Furthermore, it should be noted that, for ease of description, only the parts relevant to this application are shown in the accompanying drawings, not the entire structure. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without inventive effort are within the scope of protection of this application.
[0069] The terms “comprising” and “having”, and any variations thereof, used in this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the steps or units listed, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to such process, method, product, or apparatus.
[0070] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0071] Please see Figure 1 As shown in the figure, an embodiment of this application provides a machine vision-based medicinal herb identification system. This machine vision-based medicinal herb identification system includes:
[0072] The first machine vision recognition module is used to perform first machine vision recognition on the cluster of medicinal materials to be selected, and obtain the global color distribution feature information of the cluster of medicinal materials to be selected.
[0073] The abnormal medicinal material location module is used to determine the existence status information of abnormal medicinal materials in the candidate medicinal material cluster based on the global color distribution feature information;
[0074] The second machine vision recognition module is used to perform second machine vision recognition on the candidate medicinal material cluster to obtain the global contour distribution feature information of the candidate medicinal material cluster.
[0075] The defective medicinal material location module is used to determine the existence status information of defective medicinal materials in the candidate medicinal material cluster based on the global contour distribution feature information;
[0076] The map generation module is used to generate a distribution map of the medicinal materials to be removed from the candidate medicinal material cluster based on the existence status information of the abnormal medicinal material and the existence status information of the defective medicinal material.
[0077] The herb removal operation adjustment module is used to adjust the herb removal operation for the candidate herb cluster based on the distribution map of the herb to be removed and the transportation dynamic characteristic information of the candidate herb cluster.
[0078] The beneficial effects of the above embodiments are as follows: This machine vision-based medicinal herb identification system performs machine vision recognition on the cluster of medicinal herbs to obtain global color distribution feature information and global contour distribution feature information of the cluster. This determines the presence status information of abnormal and defective herbs within the cluster, enabling global automated positioning and identification of abnormal and defective herbs, thus avoiding omissions and misidentifications. Furthermore, based on the presence status information of abnormal and defective herbs, a distribution map of herbs to be removed from the cluster is generated. Each herb to be removed within the cluster is located and characterized, providing precise navigation guidance for subsequent herb removal operations. Finally, based on the distribution map of herbs to be removed and the transportation dynamic feature information of the cluster, the herb removal operation is adjusted to achieve accurate and rapid screening and removal of the corresponding herbs, improving the reliability of medicinal herb quality control operations.
[0079] In another embodiment, the first machine vision recognition module is used to perform first machine vision recognition on the cluster of medicinal materials to be selected, and obtain global color distribution feature information of the cluster of medicinal materials to be selected, including:
[0080] Based on the relative position and relative motion relationship between the candidate medicinal material cluster and the machine vision equipment, the information on the changes in the cluster area of the candidate medicinal material cluster entering the field of view of the machine vision equipment during transportation is determined.
[0081] Based on the changes in the cluster area, the shooting parameters of the machine vision device for taking pictures of the candidate medicinal material cluster are determined, and several local images of the candidate medicinal material cluster are obtained; the first global image formed by directly stitching together all the local images is processed by a deep learning network model to obtain the global color distribution feature information of the candidate medicinal material cluster.
[0082] The abnormal medicinal material location module is used to determine the existence status information of abnormal medicinal materials in the candidate medicinal material cluster based on the global color distribution feature information, including:
[0083] The global color distribution feature information is compared with the preset benchmark color feature information to determine the degree of color deviation information of each sub-region under the candidate medicinal material cluster. Based on the degree of color deviation information, the location of all abnormal medicinal materials in each sub-region is identified, and the location information of abnormal medicinal materials corresponding to all sub-regions is integrated into the abnormal medicinal material existence status information of the candidate medicinal material cluster.
[0084] The beneficial effect of the above embodiments is that, in the actual medicinal material screening process, a cluster of candidate medicinal materials, consisting of a large number of individual medicinal materials, is placed on a conveyor belt and transported at a constant speed. Simultaneously, a machine vision device located above the conveyor belt performs visual recognition of the candidate medicinal material cluster. This machine vision device may include, but is not limited to, a camera and its connected image recognition and processing computer. Since the camera of the machine vision device has a limited field of view, it cannot capture the entire cluster of candidate medicinal materials on the conveyor belt simultaneously. Therefore, it can only perform global machine vision recognition of the candidate medicinal material cluster by taking time-division multiplexing images of different cluster areas on the conveyor belt, obtaining several local images corresponding to each cluster area, and then combining all the local images into a global image. To ensure the stability and uniformity of the machine vision equipment's imaging of all cluster areas, the relative distance, relative orientation, and relative speed of the candidate medicinal herb clusters during their uniform transport on the conveyor belt are analyzed. This analysis focuses on the changes in the cluster area where the candidate medicinal herb clusters enter the machine vision equipment's field of view during transport. This change in cluster area location can include, but is not limited to, the changes in the boundary position of the cluster area entering the machine vision equipment's field of view at regular intervals. Based on this cluster area location change information, the size of the cluster area within the candidate medicinal herb cluster that matches the machine vision equipment's field of view at regular intervals is determined. This determines the focal length and other parameters for the machine vision equipment to image the candidate medicinal herb clusters (especially the corresponding cluster area), thus obtaining local images corresponding to the corresponding cluster area. Finally, according to the shooting time sequence of all local images, all local images are directly stitched together to form the first global image, thereby achieving full-range image acquisition of the entire candidate medicinal herb cluster. The first global image is then processed by a deep learning network model to obtain the global color distribution feature information of the candidate medicinal herb cluster.
[0085] When medicinal herbs undergo bleaching treatments such as sulfur fumigation, their surface color becomes abnormally white, significantly different from the color of normal, unbleached herbs. This color difference is directly reflected in the color distribution. By comparing this global color distribution feature information with preset benchmark color feature information, the degree of color deviation in each sub-region of the candidate herb cluster is determined. The preset benchmark color feature information can be generated in advance through machine vision recognition of normal, unbleached herb surfaces, serving as a reference standard for judging whether the herb surface color is abnormal. When the color deviation information indicates that the color deviation value of a certain sub-region under the candidate medicinal material cluster exceeds the preset deviation threshold, it is determined that there are abnormal medicinal materials such as bleached medicinal materials in that sub-region. At this time, the color deviation of all individual medicinal materials in that sub-region is checked to identify the location of all abnormal medicinal materials in each sub-region. The location information of abnormal medicinal materials in all sub-regions is integrated into the abnormal medicinal material existence status information of the candidate medicinal material cluster. In this way, the abnormal medicinal material existence status information can comprehensively reflect the distribution location of all abnormal medicinal materials in the candidate medicinal material cluster.
[0086] In another embodiment, the operating status of the first machine vision recognition module is detected, and an alarm is triggered when an abnormality is detected in the operating status, including:
[0087] Real-time acquisition of operating parameters during the operation of the first machine vision recognition module; wherein, the operating parameters include the response time, memory utilization, and error rate of global color distribution feature information acquisition;
[0088] The response time obtained using the global color distribution feature information is compared with a preset response time threshold;
[0089] When the response time obtained from the global color distribution feature information exceeds the preset response time threshold, the operation determination coefficient is obtained by using the response time, memory utilization and error rate obtained from the global color distribution feature information.
[0090] The operation determination coefficient is obtained by the following formula:
[0091]
[0092] Where L represents the operational decision coefficient; P c P represents the error rate; n represents the total number of recognitions in the first machine vision recognition; P represents the error rate. i P represents the memory utilization rate corresponding to the i-th identification; ci P represents the error rate corresponding to the i-th recognition; wi P represents the memory utilization rate before the start of the i-th recognition; tiLet S represent the recognition delay rate corresponding to the i-th recognition; S represents the adjustment coefficient, which is obtained by the following formula:
[0093]
[0094] Where S represents the adjustment coefficient; n represents the total number of recognitions in the first machine vision recognition; P i P represents the memory utilization rate corresponding to the i-th identification; wi T represents the memory utilization rate before the start of the i-th recognition; c This indicates the preset response time reference value; T i This represents the response time for acquiring the global color distribution feature information corresponding to the i-th recognition;
[0095] The running determination coefficient is compared with a preset determination coefficient threshold;
[0096] When the operation judgment coefficient exceeds the preset judgment coefficient threshold, the first machine vision recognition module is determined to be abnormal and an abnormal alarm is triggered.
[0097] The beneficial effects of the above embodiments are that the technical solution achieves real-time monitoring of the module's operating status by collecting operating parameters of the first machine vision recognition module in real time, such as the response time, memory utilization, and error rate of global color distribution feature information acquisition. This real-time monitoring mechanism can quickly capture any abnormal changes that may affect recognition accuracy or system stability, providing timely data support for subsequent anomaly judgment and alarms. The ability to respond quickly means that the system can identify problems and take measures more quickly, reducing downtime and production losses caused by faults. In terms of operating status evaluation, this solution adopts a multi-parameter comprehensive judgment method, considering not only abnormal situations of a single parameter (such as response time) but also combining multiple dimensions such as memory utilization and error rate for comprehensive analysis. This multi-dimensional evaluation method can more comprehensively and accurately reflect the actual operating status of the machine vision recognition module, avoiding false alarms or missed alarms caused by abnormalities of a single parameter, and improving the accuracy and reliability of anomaly detection. By introducing the calculation of operating judgment coefficients and adjustment coefficients, the technical solution achieves dynamic adjustment and intelligent judgment of the operating status of the machine vision recognition module. The operational judgment coefficient comprehensively considers multiple factors, including memory utilization, error rate, memory utilization before recognition startup, and recognition latency, to more accurately reflect the module's current performance status. The introduction of an adjustment coefficient dynamically adjusts the judgment coefficient based on parameters such as the total number of recognitions, memory utilization per recognition, and response time, making the judgment results more consistent with reality and improving the intelligence level of anomaly detection. When the operational judgment coefficient exceeds a preset threshold, the technical solution immediately triggers an anomaly alarm mechanism, notifying relevant personnel for timely handling. This efficient alarm mechanism not only shortens fault response time but also helps maintenance personnel quickly find the root cause of the problem and take effective remedial measures by providing detailed anomaly information and fault location. This significantly improves system maintenance efficiency and fault recovery speed, reducing the risk of production interruptions due to faults.
[0098] In summary, this technical solution significantly improves the stability and reliability of machine vision recognition modules through real-time monitoring, multi-dimensional comprehensive evaluation, dynamic adjustment and intelligent judgment, as well as efficient alarm and fault location. This not only helps ensure the continuous and stable operation of machine vision systems in complex and ever-changing industrial environments, but also provides strong support for enterprises to achieve intelligent manufacturing, improve product quality, and increase production efficiency. Therefore, the technical effects of this solution in terms of performance indicators are significant and far-reaching, and are of great importance for promoting the widespread application and development of machine vision technology.
[0099] In another embodiment, the second machine vision recognition module is used to perform second machine vision recognition on the candidate medicinal material cluster to obtain global contour distribution feature information of the candidate medicinal material cluster, including:
[0100] Based on the ambient lighting characteristics of each local image during the shooting process, the pixel exposure state of each local image is adjusted to ensure that all local images have the same pixel contrast. Then, all local images are stitched together to form a second global image. Pixel contour recognition is performed on the second global image to obtain the global contour distribution characteristics of the second global image.
[0101] The defective medicinal material location module is used to determine the presence status information of defective medicinal materials in the candidate medicinal material cluster based on the global contour distribution feature information, including:
[0102] Structural morphology analysis is performed on the global contour distribution feature information to determine the surface bio-erosion region distribution feature information of each individual medicinal herb under the candidate medicinal herb cluster; based on the surface bio-erosion region distribution feature information, it is determined whether the individual medicinal herb belongs to a defective medicinal herb, and the location information of all defective medicinal herbs is integrated into the defective medicinal herb existence status information.
[0103] The beneficial effects of the above embodiments are that, during the capture of each local image by the machine vision device, the ambient light can affect the local image, potentially causing underexposure or overexposure. This can interfere with the image outline of the local image, making it impossible to accurately identify the image outline features. To accurately and comprehensively identify the pixel outline of the global image of the candidate medicinal herb cluster, based on the ambient light characteristics during the capture of each local image, the pixel exposure state of each local image is adjusted. For example, the pixel exposure intensity of each local image is increased or decreased, ensuring that all local images have the same pixel contrast and the same brightness contrast between the background and the target object. This ensures the uniformity and consistency of the image after all local images are stitched together to form a global image. Then, all local images are stitched together to form a second global image. Pixel outline recognition is performed on this second global image to obtain its global outline distribution feature information. When a medicinal herb within the candidate medicinal herb cluster is eaten by insects, an insect-eaten defect forms on the surface of the herb. The structural outline of this defect differs significantly from the structural outline of other uneaten areas on the surface of the herb. Therefore, by performing structural morphological analysis on the global contour distribution characteristics, the surface biological erosion area distribution characteristics of each individual medicinal herb under the candidate medicinal herb cluster are determined, thereby determining whether the surface of each individual medicinal herb has been eroded, thus identifying defective medicinal herbs. Then, the location information of all defective medicinal herbs is integrated into the defective medicinal herb existence status information, which can comprehensively reflect the distribution location of all defective medicinal herbs within the candidate medicinal herb cluster.
[0104] In another embodiment, the map generation module is used to generate a distribution map of medicinal materials to be removed from the candidate medicinal material cluster based on the presence status information of the abnormal medicinal materials and the presence status information of the defective medicinal materials, including:
[0105] The location information of all abnormal medicinal materials included in the existence status information of the abnormal medicinal materials and the location information of all defective medicinal materials included in the existence status information of the defective medicinal materials are mapped to the same coordinate space to generate a distribution map of abnormal and defective medicinal materials for the candidate medicinal material cluster; the abnormal and defective medicinal materials are distinguished and identified in the distribution map, and then converted to obtain the distribution map of medicinal materials to be removed.
[0106] The herb removal adjustment module is used to adjust the herb removal operation for the candidate herb cluster based on the distribution map of the herbs to be removed and the transportation dynamic characteristics information of the candidate herb cluster, including:
[0107] Based on the distribution map of the medicinal materials to be removed, the distribution characteristics of the medicinal materials to be removed within the candidate medicinal material cluster are determined; wherein, the distribution characteristics include the distribution location coordinates and distribution cluster density of the medicinal materials to be removed;
[0108] Based on the distribution characteristics of the medicinal materials to be removed and the transportation path and speed of the candidate medicinal material cluster, the implementation space range and / or the parameters of the medicinal material removal and grasping action for removing medicinal materials from the candidate medicinal material cluster are adjusted.
[0109] The beneficial effects of the above embodiments are that the abnormal medicinal material existence status information and the defective medicinal material existence status information respectively reflect the distribution location of abnormal medicinal materials (such as bleached medicinal materials) and defective medicinal materials (such as medicinal materials damaged by insects) within the same candidate medicinal material cluster. In order to remove abnormal medicinal materials and defective medicinal materials from the candidate medicinal material cluster simultaneously in the same subsequent screening and removal process, all abnormal medicinal material location information contained in the abnormal medicinal material existence status information and all defective medicinal material location information contained in the defective medicinal material existence status information are mapped to the same coordinate space to generate a distribution map of abnormal medicinal materials and defective medicinal materials in the candidate medicinal material cluster. Furthermore, abnormal medicinal materials and defective medicinal materials are distinguished and identified in the distribution map, and a distribution map of medicinal materials to be removed is obtained. In this way, the distribution map of medicinal materials to be removed can comprehensively reflect the location distribution of abnormal medicinal materials, defective medicinal materials, and other medicinal materials that need to be removed. Furthermore, based on the distribution map of the medicinal materials to be rejected, the coordinates and density of the medicinal materials to be rejected within the candidate medicinal material cluster are determined. This density refers to the number of medicinal materials to be rejected per unit area within the candidate medicinal material cluster. Then, based on the distribution characteristics of the medicinal materials to be rejected and the transportation path and speed of the candidate medicinal material cluster, the relative spatial relationship between the abnormal and defective medicinal materials within the candidate medicinal material cluster and the gripping robot is predicted. This allows for adjustments to the spatial range and / or the direction and speed of the gripping action of the gripping robot to ensure accurate rejection of the corresponding abnormal or defective medicinal materials in a single gripping action, thereby improving the efficiency and accuracy of medicinal material screening and rejection.
[0110] Please see Figure 2 As shown in the figure, an embodiment of this application provides a machine vision-based method for identifying medicinal materials. This machine vision-based method for identifying medicinal materials includes:
[0111] The candidate medicinal herb cluster is subjected to first machine vision recognition to obtain the global color distribution feature information of the candidate medicinal herb cluster; based on the global color distribution feature information, the abnormal medicinal herb existence status information of the candidate medicinal herb cluster is determined.
[0112] The candidate medicinal herb cluster is subjected to a second machine vision recognition to obtain the global contour distribution feature information of the candidate medicinal herb cluster; based on the global contour distribution feature information, the existence status information of defective medicinal herbs in the candidate medicinal herb cluster is determined.
[0113] Based on the presence status information of the abnormal medicinal material and the presence status information of the defective medicinal material, a distribution map of medicinal materials to be removed for the candidate medicinal material cluster is generated; based on the distribution map of medicinal materials to be removed and the transportation dynamic characteristics information of the candidate medicinal material cluster, the medicinal material removal operation for the candidate medicinal material cluster is adjusted.
[0114] The beneficial effects of the above embodiments are as follows: This machine vision-based medicinal herb identification method performs machine vision recognition on the cluster of medicinal herbs to obtain global color distribution feature information and global contour distribution feature information of the cluster. This determines the presence status information of abnormal and defective herbs within the cluster, enabling global automated positioning and identification of abnormal and defective herbs, thus avoiding omissions and misidentifications. Furthermore, based on the presence status information of abnormal and defective herbs, a distribution map of herbs to be removed from the cluster is generated. Each herb to be removed within the cluster is located and characterized, providing precise navigation guidance for subsequent herb removal operations. Finally, based on the distribution map of herbs to be removed and the transportation dynamic feature information of the cluster, the herb removal operation is adjusted to achieve accurate and rapid screening and removal of the corresponding herbs, improving the reliability of medicinal herb quality control operations.
[0115] In another embodiment, a first machine vision recognition is performed on the cluster of medicinal materials to be selected to obtain global color distribution feature information of the cluster; based on the global color distribution feature information, the abnormal medicinal material presence status information of the cluster is determined, including:
[0116] Based on the relative position and relative motion relationship between the candidate medicinal material cluster and the machine vision equipment, the information on the changes in the cluster area of the candidate medicinal material cluster entering the field of view of the machine vision equipment during transportation is determined.
[0117] Based on the changes in the cluster area, the shooting parameters of the machine vision device for taking pictures of the candidate medicinal material cluster are determined, and several local images of the candidate medicinal material cluster are obtained; the first global image formed by directly stitching together all the local images is processed by a deep learning network model to obtain the global color distribution feature information of the candidate medicinal material cluster.
[0118] The global color distribution feature information is compared with the preset benchmark color feature information to determine the degree of color deviation information of each sub-region under the candidate medicinal material cluster. Based on the degree of color deviation information, the location of all abnormal medicinal materials in each sub-region is identified, and the location information of abnormal medicinal materials corresponding to all sub-regions is integrated into the abnormal medicinal material existence status information of the candidate medicinal material cluster.
[0119] The beneficial effect of the above embodiments is that, in the actual medicinal material screening process, a cluster of candidate medicinal materials, consisting of a large number of individual medicinal materials, is placed on a conveyor belt and transported at a constant speed. Simultaneously, a machine vision device located above the conveyor belt performs visual recognition of the candidate medicinal material cluster. This machine vision device may include, but is not limited to, a camera and its connected image recognition and processing computer. Since the camera of the machine vision device has a limited field of view, it cannot capture the entire cluster of candidate medicinal materials on the conveyor belt simultaneously. Therefore, it can only perform global machine vision recognition of the candidate medicinal material cluster by taking time-division multiplexing images of different cluster areas on the conveyor belt, obtaining several local images corresponding to each cluster area, and then combining all the local images into a global image. To ensure the stability and uniformity of the machine vision equipment's imaging of all cluster areas, the relative distance, relative orientation, and relative speed of the candidate medicinal herb clusters during their uniform transport on the conveyor belt are analyzed. This analysis focuses on the changes in the cluster area where the candidate medicinal herb clusters enter the machine vision equipment's field of view during transport. This change in cluster area location can include, but is not limited to, the changes in the boundary position of the cluster area entering the machine vision equipment's field of view at regular intervals. Based on this cluster area location change information, the size of the cluster area within the candidate medicinal herb cluster that matches the machine vision equipment's field of view at regular intervals is determined. This determines the focal length and other parameters for the machine vision equipment to image the candidate medicinal herb clusters (especially the corresponding cluster area), thus obtaining local images corresponding to the corresponding cluster area. Finally, according to the shooting time sequence of all local images, all local images are directly stitched together to form the first global image, thereby achieving full-range image acquisition of the entire candidate medicinal herb cluster. The first global image is then processed by a deep learning network model to obtain the global color distribution feature information of the candidate medicinal herb cluster.
[0120] When medicinal herbs undergo bleaching treatments such as sulfur fumigation, their surface color becomes abnormally white, significantly different from the color of normal, unbleached herbs. This color difference is directly reflected in the color distribution. By comparing this global color distribution feature information with preset benchmark color feature information, the degree of color deviation in each sub-region of the candidate herb cluster is determined. The preset benchmark color feature information can be generated in advance through machine vision recognition of normal, unbleached herb surfaces, serving as a reference standard for judging whether the herb surface color is abnormal. When the color deviation information indicates that the color deviation value of a certain sub-region under the candidate medicinal material cluster exceeds the preset deviation threshold, it is determined that there are abnormal medicinal materials such as bleached medicinal materials in that sub-region. At this time, the color deviation of all individual medicinal materials in that sub-region is checked to identify the location of all abnormal medicinal materials in each sub-region. The location information of abnormal medicinal materials in all sub-regions is integrated into the abnormal medicinal material existence status information of the candidate medicinal material cluster. In this way, the abnormal medicinal material existence status information can comprehensively reflect the distribution location of all abnormal medicinal materials in the candidate medicinal material cluster.
[0121] In another embodiment, the operating status of the first machine vision recognition module is detected, and an alarm is triggered when an abnormality is detected in the operating status, including:
[0122] Real-time acquisition of operating parameters during the operation of the first machine vision recognition module; wherein, the operating parameters include the response time, memory utilization, and error rate of global color distribution feature information acquisition;
[0123] The response time obtained using the global color distribution feature information is compared with a preset response time threshold;
[0124] When the response time obtained from the global color distribution feature information exceeds the preset response time threshold, the operation determination coefficient is obtained by using the response time, memory utilization and error rate obtained from the global color distribution feature information.
[0125] The operation determination coefficient is obtained by the following formula:
[0126]
[0127] Where L represents the operational decision coefficient; P c P represents the error rate; n represents the total number of recognitions in the first machine vision recognition; P represents the error rate. i P represents the memory utilization rate corresponding to the i-th identification; ci P represents the error rate corresponding to the i-th recognition; wi P represents the memory utilization rate before the start of the i-th recognition; tiLet S represent the recognition delay rate corresponding to the i-th recognition; S represents the adjustment coefficient, which is obtained by the following formula:
[0128]
[0129] Where S represents the adjustment coefficient; n represents the total number of recognitions in the first machine vision recognition; P i P represents the memory utilization rate corresponding to the i-th identification; wi T represents the memory utilization rate before the start of the i-th recognition; c This indicates the preset response time reference value; T i This represents the response time for acquiring the global color distribution feature information corresponding to the i-th recognition;
[0130] The running determination coefficient is compared with a preset determination coefficient threshold;
[0131] When the operation judgment coefficient exceeds the preset judgment coefficient threshold, the first machine vision recognition module is determined to be abnormal and an abnormal alarm is triggered.
[0132] The beneficial effects of the above embodiments are that the technical solution achieves real-time monitoring of the module's operating status by collecting operating parameters of the first machine vision recognition module in real time, such as the response time, memory utilization, and error rate of global color distribution feature information acquisition. This real-time monitoring mechanism can quickly capture any abnormal changes that may affect recognition accuracy or system stability, providing timely data support for subsequent anomaly judgment and alarms. The ability to respond quickly means that the system can identify problems and take measures more quickly, reducing downtime and production losses caused by faults. In terms of operating status evaluation, this solution adopts a multi-parameter comprehensive judgment method, considering not only abnormal situations of a single parameter (such as response time) but also combining multiple dimensions such as memory utilization and error rate for comprehensive analysis. This multi-dimensional evaluation method can more comprehensively and accurately reflect the actual operating status of the machine vision recognition module, avoiding false alarms or missed alarms caused by abnormalities of a single parameter, and improving the accuracy and reliability of anomaly detection. By introducing the calculation of operating judgment coefficients and adjustment coefficients, the technical solution achieves dynamic adjustment and intelligent judgment of the operating status of the machine vision recognition module. The operational judgment coefficient comprehensively considers multiple factors, including memory utilization, error rate, memory utilization before recognition startup, and recognition latency, to more accurately reflect the module's current performance status. The introduction of an adjustment coefficient dynamically adjusts the judgment coefficient based on parameters such as the total number of recognitions, memory utilization per recognition, and response time, making the judgment results more consistent with reality and improving the intelligence level of anomaly detection. When the operational judgment coefficient exceeds a preset threshold, the technical solution immediately triggers an anomaly alarm mechanism, notifying relevant personnel for timely handling. This efficient alarm mechanism not only shortens fault response time but also helps maintenance personnel quickly find the root cause of the problem and take effective remedial measures by providing detailed anomaly information and fault location. This significantly improves system maintenance efficiency and fault recovery speed, reducing the risk of production interruptions due to faults.
[0133] In summary, this technical solution significantly improves the stability and reliability of machine vision recognition modules through real-time monitoring, multi-dimensional comprehensive evaluation, dynamic adjustment and intelligent judgment, as well as efficient alarm and fault location. This not only helps ensure the continuous and stable operation of machine vision systems in complex and ever-changing industrial environments, but also provides strong support for enterprises to achieve intelligent manufacturing, improve product quality, and increase production efficiency. Therefore, the technical effects of this solution in terms of performance indicators are significant and far-reaching, and are of great importance for promoting the widespread application and development of machine vision technology.
[0134] In another embodiment, the candidate medicinal herb cluster is subjected to second machine vision recognition to obtain global contour distribution feature information of the candidate medicinal herb cluster; based on the global contour distribution feature information, the presence status information of defective medicinal herbs in the candidate medicinal herb cluster is determined, including:
[0135] Based on the ambient lighting characteristics of each local image during the shooting process, the pixel exposure state of each local image is adjusted to ensure that all local images have the same pixel contrast. Then, all local images are stitched together to form a second global image. Pixel contour recognition is performed on the second global image to obtain the global contour distribution characteristics of the second global image.
[0136] Structural morphology analysis is performed on the global contour distribution feature information to determine the surface bio-erosion region distribution feature information of each individual medicinal herb under the candidate medicinal herb cluster; based on the surface bio-erosion region distribution feature information, it is determined whether the individual medicinal herb belongs to a defective medicinal herb, and the location information of all defective medicinal herbs is integrated into the defective medicinal herb existence status information.
[0137] The beneficial effects of the above embodiments are that, during the capture of each local image by the machine vision device, the ambient light can affect the local image, potentially causing underexposure or overexposure. This can interfere with the image outline of the local image, making it impossible to accurately identify the image outline features. To accurately and comprehensively identify the pixel outline of the global image of the candidate medicinal herb cluster, based on the ambient light characteristics during the capture of each local image, the pixel exposure state of each local image is adjusted. For example, the pixel exposure intensity of each local image is increased or decreased, ensuring that all local images have the same pixel contrast and the same brightness contrast between the background and the target object. This ensures the uniformity and consistency of the image after all local images are stitched together to form a global image. Then, all local images are stitched together to form a second global image. Pixel outline recognition is performed on this second global image to obtain its global outline distribution feature information. When a medicinal herb within the candidate medicinal herb cluster is eaten by insects, an insect-eaten defect forms on the surface of the herb. The structural outline of this defect differs significantly from the structural outline of other uneaten areas on the surface of the herb. Therefore, by performing structural morphological analysis on the global contour distribution characteristics, the surface biological erosion area distribution characteristics of each individual medicinal herb under the candidate medicinal herb cluster are determined, thereby determining whether the surface of each individual medicinal herb has been eroded, thus identifying defective medicinal herbs. Then, the location information of all defective medicinal herbs is integrated into the defective medicinal herb existence status information, which can comprehensively reflect the distribution location of all defective medicinal herbs within the candidate medicinal herb cluster.
[0138] In another embodiment, based on the presence status information of the abnormal medicinal material and the presence status information of the defective medicinal material, a distribution map of medicinal materials to be removed from the candidate medicinal material cluster is generated; based on the distribution map of medicinal materials to be removed and the transportation dynamic characteristic information of the candidate medicinal material cluster, the medicinal material removal operation of the candidate medicinal material cluster is adjusted, including:
[0139] The location information of all abnormal medicinal materials included in the existence status information of the abnormal medicinal materials and the location information of all defective medicinal materials included in the existence status information of the defective medicinal materials are mapped to the same coordinate space to generate a distribution map of abnormal and defective medicinal materials for the candidate medicinal material cluster; the abnormal and defective medicinal materials are distinguished and identified in the distribution map, and then converted to obtain the distribution map of medicinal materials to be removed.
[0140] Based on the distribution map of the medicinal materials to be removed, the distribution characteristics of the medicinal materials to be removed within the candidate medicinal material cluster are determined; wherein, the distribution characteristics include the distribution location coordinates and distribution cluster density of the medicinal materials to be removed;
[0141] Based on the distribution characteristics of the medicinal materials to be removed and the transportation path and speed of the candidate medicinal material cluster, the implementation space range and / or the parameters of the medicinal material removal and grasping action for removing medicinal materials from the candidate medicinal material cluster are adjusted.
[0142] The beneficial effects of the above embodiments are that the abnormal medicinal material existence status information and the defective medicinal material existence status information respectively reflect the distribution location of abnormal medicinal materials (such as bleached medicinal materials) and defective medicinal materials (such as medicinal materials damaged by insects) within the same candidate medicinal material cluster. In order to remove abnormal medicinal materials and defective medicinal materials from the candidate medicinal material cluster simultaneously in the same subsequent screening and removal process, all abnormal medicinal material location information contained in the abnormal medicinal material existence status information and all defective medicinal material location information contained in the defective medicinal material existence status information are mapped to the same coordinate space to generate a distribution map of abnormal medicinal materials and defective medicinal materials in the candidate medicinal material cluster. Furthermore, abnormal medicinal materials and defective medicinal materials are distinguished and identified in the distribution map, and a distribution map of medicinal materials to be removed is obtained. In this way, the distribution map of medicinal materials to be removed can comprehensively reflect the location distribution of abnormal medicinal materials, defective medicinal materials, and other medicinal materials that need to be removed. Furthermore, based on the distribution map of the medicinal materials to be rejected, the coordinates and density of the medicinal materials to be rejected within the candidate medicinal material cluster are determined. This density refers to the number of medicinal materials to be rejected per unit area within the candidate medicinal material cluster. Then, based on the distribution characteristics of the medicinal materials to be rejected and the transportation path and speed of the candidate medicinal material cluster, the relative spatial relationship between the abnormal and defective medicinal materials within the candidate medicinal material cluster and the gripping robot is predicted. This allows for adjustments to the spatial range and / or the direction and speed of the gripping action of the gripping robot to ensure accurate rejection of the corresponding abnormal or defective medicinal materials in a single gripping action, thereby improving the efficiency and accuracy of medicinal material screening and rejection.
[0143] In summary, this machine vision-based medicinal herb identification system and method performs machine vision recognition on clusters of selected medicinal herbs, obtaining global color distribution and contour distribution features. This information is used to determine the presence status of abnormal and defective herbs within the clusters, enabling global automated localization and identification of these herbs, thus preventing omissions and misidentifications. Furthermore, based on the presence status information of abnormal and defective herbs, a distribution map of herbs to be removed from the clusters is generated. Each herb requiring removal is located and characterized, providing precise navigation guidance for subsequent removal operations. Finally, based on the distribution map and the transportation dynamics of the clusters, the removal operations are adjusted to achieve accurate and rapid removal of the corresponding herbs, improving the reliability of medicinal herb quality control operations.
[0144] The above is only one specific embodiment of the present invention, and any improvements made based on the concept of the present invention shall be considered within the scope of protection of the present invention.
Claims
1. A machine vision-based medicinal herb identification system, characterized in that, include: The first machine vision recognition module is used to perform first machine vision recognition on the cluster of medicinal materials to be selected, and obtain the global color distribution feature information of the cluster of medicinal materials to be selected. An abnormal medicinal material location module is used to determine the existence status information of abnormal medicinal materials in the candidate medicinal material cluster based on the global color distribution feature information. The second machine vision recognition module is used to perform second machine vision recognition on the candidate medicinal material cluster to obtain the global contour distribution feature information of the candidate medicinal material cluster. The defective medicinal material location module is used to determine the existence status information of defective medicinal materials in the candidate medicinal material cluster based on the global contour distribution feature information. The map generation module is used to generate a distribution map of the medicinal materials to be removed from the candidate medicinal material cluster based on the abnormal medicinal material existence status information and the defective medicinal material existence status information. The herb removal operation adjustment module is used to adjust the herb removal operation on the candidate herb cluster based on the distribution map of the herbs to be removed and the transportation dynamic feature information of the candidate herb cluster.
2. The machine vision-based medicinal herb identification system as described in claim 1, characterized in that: The first machine vision recognition module is used to perform first machine vision recognition on the cluster of medicinal materials to be selected, and obtain the global color distribution feature information of the cluster of medicinal materials to be selected, including: Based on the relative position and relative motion relationship between the candidate medicinal material cluster and the machine vision equipment, the change information of the cluster area where the candidate medicinal material cluster enters the field of view of the machine vision equipment during transportation is determined. Based on the changes in the cluster area, the shooting parameters of the machine vision device for taking pictures of the candidate medicinal material cluster are determined, and several local images of the candidate medicinal material cluster are obtained; the first global image formed by directly stitching together all the local images is processed by a deep learning network model to obtain the global color distribution feature information of the candidate medicinal material cluster. The abnormal medicinal material location module is used to determine the existence status information of abnormal medicinal materials in the candidate medicinal material cluster based on the global color distribution feature information, including: The global color distribution feature information is compared with the preset benchmark color feature information to determine the color deviation degree information of each sub-region under the candidate medicinal material cluster; based on the color deviation degree information, the location of all abnormal medicinal materials in each sub-region is identified, and the location information of abnormal medicinal materials corresponding to all sub-regions is integrated into the abnormal medicinal material existence status information of the candidate medicinal material cluster.
3. The machine vision-based medicinal herb identification system as described in claim 1, characterized in that: The system detects the operating status of the first machine vision recognition module and issues an alarm when an abnormality is detected, including: Real-time acquisition of operating parameters during the operation of the first machine vision recognition module; wherein, the operating parameters include the response time, memory utilization, and error rate of global color distribution feature information acquisition; The response time obtained using the global color distribution feature information is compared with a preset response time threshold; When the response time obtained from the global color distribution feature information exceeds the preset response time threshold, the operation determination coefficient is obtained by using the response time, memory utilization and error rate obtained from the global color distribution feature information. The operation determination coefficient is obtained by the following formula: Where L represents the operational decision coefficient; P c P represents the error rate; n represents the total number of recognitions in the first machine vision recognition; P represents the error rate. i P represents the memory utilization rate corresponding to the i-th identification; ci P represents the error rate corresponding to the i-th recognition; wi P represents the memory utilization rate before the start of the i-th recognition; ti Let S represent the recognition delay rate corresponding to the i-th recognition; S represents the adjustment coefficient, which is obtained by the following formula: Where S represents the adjustment coefficient; n represents the total number of recognitions in the first machine vision recognition; P i P represents the memory utilization rate corresponding to the i-th identification; wi T represents the memory utilization rate before the start of the i-th recognition; c This indicates the preset response time reference value; T i This represents the response time for acquiring the global color distribution feature information corresponding to the i-th recognition; The running determination coefficient is compared with a preset determination coefficient threshold; When the operation judgment coefficient exceeds the preset judgment coefficient threshold, it is determined that there is an abnormality in the first machine vision recognition and an abnormality alarm is triggered.
4. The machine vision-based medicinal herb identification system as described in claim 2, characterized in that: The second machine vision recognition module is used to perform second machine vision recognition on the candidate medicinal material cluster to obtain the global contour distribution feature information of the candidate medicinal material cluster, including: Based on the ambient lighting characteristics of each local image during its capture, the pixel exposure of each local image is adjusted to ensure that all local images have the same pixel contrast. Then, all local images are stitched together to form a second global image. Pixel contour recognition is performed on the second global image to obtain its global contour distribution characteristics. The defective medicinal material location module is used to determine the presence status information of defective medicinal materials in the candidate medicinal material cluster based on the global contour distribution characteristics, including: Structural morphology analysis is performed on the global contour distribution feature information to determine the surface bio-erosion region distribution feature information of each individual medicinal herb under the candidate medicinal herb cluster; based on the surface bio-erosion region distribution feature information, it is determined whether the individual medicinal herb belongs to defective medicinal herb, and the location information of all defective medicinal herbs is integrated into defective medicinal herb existence status information.
5. The machine vision-based medicinal herb identification system as described in claim 1, characterized in that: The map generation module is used to generate a distribution map of medicinal materials to be removed from the candidate medicinal material cluster based on the abnormal medicinal material presence status information and the defective medicinal material presence status information, including: The abnormal medicinal material presence status information and the defective medicinal material presence status information are mapped together to the same coordinate space to generate a distribution map of abnormal and defective medicinal materials for the candidate medicinal material cluster; the distribution map is then distinguished and identified as abnormal and defective medicinal materials, and converted to obtain a distribution map of medicinal materials to be removed. The herb removal operation adjustment module is used to adjust the herb removal operation on the candidate herb cluster based on the distribution map of the herbs to be removed and the transportation dynamic characteristic information of the candidate herb cluster, including: Based on the distribution map of the medicinal materials to be removed, the distribution characteristics of the medicinal materials to be removed within the candidate medicinal material cluster are determined; wherein, the distribution characteristics include the distribution location coordinates and distribution cluster density of the medicinal materials to be removed; Based on the distribution characteristics of the medicinal materials to be removed and the transportation path and speed of the cluster of medicinal materials to be selected, the spatial range of the medicinal material removal operation and / or the parameters of the medicinal material removal grasping action are adjusted.
6. A method for identifying medicinal materials based on machine vision, characterized in that, include: The candidate medicinal herb cluster is subjected to first machine vision recognition to obtain the global color distribution feature information of the candidate medicinal herb cluster; Based on the global color distribution feature information, the abnormal medicinal material existence status information of the candidate medicinal material cluster is determined; The candidate medicinal herb cluster is subjected to a second machine vision recognition to obtain the global contour distribution feature information of the candidate medicinal herb cluster; Based on the global contour distribution feature information, the existence status information of defective medicinal materials in the candidate medicinal material cluster is determined; Based on the abnormal medicinal material presence status information and the defective medicinal material presence status information, a distribution map of medicinal materials to be removed from the candidate medicinal material cluster is generated; based on the distribution map of medicinal materials to be removed and the transportation dynamic characteristic information of the candidate medicinal material cluster, the medicinal material removal operation of the candidate medicinal material cluster is adjusted.
7. The machine vision-based medicinal herb identification method as described in claim 6, characterized in that: The candidate medicinal herb cluster is subjected to first machine vision recognition to obtain the global color distribution feature information of the candidate medicinal herb cluster; Based on the global color distribution feature information, the abnormal medicinal material presence status information of the candidate medicinal material cluster is determined, including: Based on the relative position and relative motion relationship between the candidate medicinal material cluster and the machine vision equipment, the change information of the cluster area where the candidate medicinal material cluster enters the field of view of the machine vision equipment during transportation is determined. Based on the changes in the cluster area, the shooting parameters of the machine vision device for taking pictures of the candidate medicinal material cluster are determined, and several local images of the candidate medicinal material cluster are obtained; the first global image formed by directly stitching together all the local images is processed by a deep learning network model to obtain the global color distribution feature information of the candidate medicinal material cluster. The global color distribution feature information is compared with the preset benchmark color feature information to determine the color deviation degree information of each sub-region under the candidate medicinal material cluster; based on the color deviation degree information, the location of all abnormal medicinal materials in each sub-region is identified, and the location information of abnormal medicinal materials corresponding to all sub-regions is integrated into the abnormal medicinal material existence status information of the candidate medicinal material cluster.
8. The machine vision-based medicinal herb identification system as described in claim 6, characterized in that: The system detects the operating status of the first machine vision recognition module and issues an alarm when an abnormality is detected, including: Real-time acquisition of operating parameters during the operation of the first machine vision recognition module; wherein, the operating parameters include the response time, memory utilization, and error rate of global color distribution feature information acquisition; The response time obtained using the global color distribution feature information is compared with a preset response time threshold; When the response time obtained from the global color distribution feature information exceeds the preset response time threshold, the operation determination coefficient is obtained by using the response time, memory utilization and error rate obtained from the global color distribution feature information. The operation determination coefficient is obtained by the following formula: Where L represents the operational decision coefficient; P c P represents the error rate; n represents the total number of recognitions in the first machine vision recognition; P represents the error rate. i P represents the memory utilization rate corresponding to the i-th identification; ci P represents the error rate corresponding to the i-th recognition; wi P represents the memory utilization rate before the start of the i-th recognition; ti Let S represent the recognition delay rate corresponding to the i-th recognition; S represents the adjustment coefficient, which is obtained by the following formula: Where S represents the adjustment coefficient; n represents the total number of recognitions in the first machine vision recognition; P i P represents the memory utilization rate corresponding to the i-th identification; wi T represents the memory utilization rate before the start of the i-th recognition; c This indicates the preset response time reference value; T i This represents the response time for acquiring the global color distribution feature information corresponding to the i-th recognition; The running determination coefficient is compared with a preset determination coefficient threshold; When the operation judgment coefficient exceeds the preset judgment coefficient threshold, the first machine vision recognition module is determined to be abnormal and an abnormal alarm is triggered.
9. The machine vision-based medicinal herb identification method as described in claim 6, characterized in that: The candidate medicinal herb cluster is subjected to a second machine vision recognition to obtain the global contour distribution feature information of the candidate medicinal herb cluster; Based on the global contour distribution feature information, the existence status information of defective medicinal materials in the candidate medicinal material cluster is determined, including: Based on the ambient lighting characteristics of each local image during its capture, the pixel exposure of each local image is adjusted to ensure that all local images have the same pixel contrast. All local images are then stitched together to form a second global image. Pixel contour recognition is performed on the second global image to obtain its global contour distribution characteristics. Structural morphology analysis is then performed on these global contour distribution characteristics to determine the surface bio-erosion region distribution characteristics of each individual medicinal herb within the candidate herb cluster. Based on these surface bio-erosion region distribution characteristics, it is determined whether the individual medicinal herb is a defective herb, and the location information of all defective medicinal herbs is integrated into defective herb existence status information.
10. The machine vision-based medicinal herb identification method as described in claim 6, characterized in that: Based on the information on the presence of abnormal medicinal materials and the information on the presence of defective medicinal materials, a distribution map of medicinal materials to be removed is generated for the cluster of candidate medicinal materials. Based on the distribution map of the medicinal materials to be removed and the transportation dynamic characteristics of the candidate medicinal material clusters, the medicinal material removal operation for the candidate medicinal material clusters is adjusted, including: The abnormal medicinal material presence status information and the defective medicinal material presence status information are mapped together to the same coordinate space to generate a distribution map of abnormal and defective medicinal materials for the candidate medicinal material cluster; the distribution map is then distinguished and identified as abnormal and defective medicinal materials, and converted to obtain a distribution map of medicinal materials to be removed. Based on the distribution map of the medicinal materials to be removed, the distribution characteristics of the medicinal materials to be removed within the candidate medicinal material cluster are determined; wherein, the distribution characteristics include the distribution location coordinates and distribution cluster density of the medicinal materials to be removed; Based on the distribution characteristics of the medicinal materials to be removed and the transportation path and speed of the cluster of medicinal materials to be selected, the spatial range of the medicinal material removal operation and / or the parameters of the medicinal material removal grasping action are adjusted.