Tobacco fertilizer delivery continuous image counting method and system

By identifying obstacles and using deep learning models, the problems of leaf contamination and transportation damage interference in tobacco fertilizer outbound counting were solved, achieving highly robust and automated image counting, ensuring the accuracy of tobacco fertilizer outbound counting and the reliability of supply chain management.

CN122023819APending Publication Date: 2026-05-12HUNAN TOBACCO CO SHAOYANG CO
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HUNAN TOBACCO CO SHAOYANG CO
Filing Date
2025-12-23
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Existing image counting methods for tobacco fertilizer outbound processes fail to effectively eliminate interference from leaf contamination in tobacco storage areas and dirt, wrinkles, or damage to packaging bags during transportation, resulting in a high misjudgment rate and an inability to adapt to the special characteristics of the tobacco storage environment.

Method used

An obstacle detection mechanism is adopted, which identifies and corrects tobacco leaf pollution, surface dirt and wrinkles through image segmentation, texture analysis and edge detection algorithms. The image is counted by combining a deep learning model and an adaptive filter is used to adjust the similarity threshold to adapt to environmental changes.

Benefits of technology

It significantly improves the reliability and adaptability of tobacco fertilizer outbound image counting, reduces the false counting rate, achieves high robustness and automated counting, and ensures the credibility of supply chain data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122023819A_ABST
    Figure CN122023819A_ABST
Patent Text Reader

Abstract

The invention discloses a tobacco fertilizer delivery continuous image counting method and system. The method comprises the following steps: acquiring a target image and determining first boundary data; determining a reference image of the tobacco fertilizer packaging bag, retrieving a target image or a similar threshold image in a preset size frame, and detecting an identification obstacle in a preset boundary range; according to the obstacle type, fitting and restoring to obtain third boundary data, and comparing the similarity between the third boundary data and the second boundary data in the reference image to judge the image availability; allocating identification codes through the cosine distance of the adjacent images, and storing original third boundary data for each identification code; when the number of the images with the same identification code reaches a preset verification number threshold value, collecting a verification target image and fitting, restoring and verifying third boundary data; and comparing and verifying the difference between the third boundary data and the original third boundary data. The automatic level and reliability of warehouse-out counting of different types of tobacco fertilizers are remarkably improved, and the method is suitable for intelligent management of tobacco supply chains.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of machine vision technology, specifically to a method and system for continuous image counting of tobacco fertilizer leaving the warehouse. Background Technology

[0002] In the tobacco industry's supply chain management, automated counting in the fertilizer outbound process is crucial for accurate inventory control. While traditional image counting technology is used for general object statistics, it has not been optimized for the specific characteristics of tobacco storage environments, resulting in limited applicability in complex scenarios.

[0003] The tobacco storage area contains a large number of scattered leaves, which easily adhere to the surface of fertilizer packaging bags, causing contamination. Meanwhile, the bumps and jostling during fertilizer transportation can easily cause dirt, wrinkles, or damage to the packaging bags. These factors severely interfere with image recognition, resulting in blurred boundaries and distorted features, making it difficult for existing counting methods to distinguish between valid packaging bags and interfering areas.

[0004] Current technologies lack a systematic detection mechanism for tobacco-specific obstacles, failing to effectively eliminate leaf contamination interference and struggling to identify surface anomalies caused by transportation damage. This results in a high misjudgment rate in outbound counting, necessitating a robust counting scheme specifically designed for tobacco fertilizer applications. To address these issues, this invention provides a continuous image counting method and system for tobacco fertilizer outbound processing. Summary of the Invention

[0005] To address the above problems, this invention provides a method and system for continuous image counting of tobacco fertilizer leaving the warehouse.

[0006] A first aspect of the present invention provides a method for counting continuous images of tobacco fertilizer leaving the warehouse, comprising the following steps: Acquire at least one target image and determine the first boundary data of the target image; A reference image of a tobacco fertilizer packaging bag is determined. The reference image is then searched for the existence of the target image or a similar threshold image within a preset size frame. Furthermore, the presence of identification obstacles is determined within a preset boundary range of the target image. These obstacles include contamination of the fertilizer packaging bag by tobacco leaves in the tobacco storage area, surface dirt or wrinkles caused by fertilizer transportation. Based on the type of identification obstacle, third boundary data of the similarity threshold image is fitted and restored. The similarity between the third boundary data and the second boundary data of the tobacco fertilizer packaging bag in the reference image is then compared. If the similarity is less than a preset similarity threshold, the target image is determined to be an unusable image. If the similarity is not less than a preset similarity threshold, then the target image is determined to be a usable countable image; According to the order in which the target images were acquired, the cosine distance between two adjacent target images is calculated. If the cosine distance is less than a preset spacing threshold, the two adjacent target images are assigned the same identifier code. Store the corresponding original third boundary data for each identifier code; For each target image with an identification code, the image at the next timestamp is used as the verification target image, wherein the image at the next timestamp is the next acquired image that is immediately adjacent to the target image in the time series; Based on the target image being verified, the presence of recognition obstacles is reassessed, and the third boundary data for verification is obtained by fitting and restoring the data. Compare the difference between the verified third boundary data and the original third boundary data. If the difference is not less than the verification difference threshold, adjust the preset similarity threshold and re-execute the boundary data fitting. The verification difference threshold is a preset upper limit for boundary data difference. The number of tobacco fertilizer packaging bags is determined based on the verified boundary data; Acquire multiple target images with the same identification code and the acquisition time of each target image; Based on the acquisition time of each target image, the dwell time of the tobacco fertilizer packaging bag at the image acquisition location is determined.

[0007] As a preferred approach, after comparing the difference between the verified third boundary data and the original third boundary data, if the difference is not less than the verification difference threshold, then a feedback adjustment step is performed: The difference is input into an adaptive filter to adjust the preset similarity threshold; If the difference is less than the verification difference threshold, then the original third boundary data is confirmed to be valid; If the difference is not less than the verification difference threshold, the original third boundary data is updated based on the verification third boundary data, and the updated boundary data is fed back into the training parameters of the image counting model.

[0008] As a preferred embodiment, the size of the preset size frame is adjusted based on the standard size of the tobacco fertilizer packaging bag, with the width of the preset size frame being 1.2 times the standard width and the height being 1.1 times the standard height.

[0009] As a preferred approach, the similarity between the third boundary data and the second boundary data is compared, and a normalized cross-correlation algorithm is used to calculate the similarity value of the boundary contours.

[0010] As a preferred embodiment, the reference image is a pre-stored standard image of a tobacco fertilizer packaging bag, and the second boundary data is predefined boundary contour data of the tobacco fertilizer packaging bag in the reference image.

[0011] As a preferred method, the image counting model is trained through the following steps: Acquire at least one target sample image and determine the first boundary sample data of the target sample image; A reference sample image of a tobacco fertilizer packaging bag is determined. The reference sample image is used to search for whether the target sample image or a similar threshold sample image of the target sample image exists within a preset size sample frame. The reference sample image is then used to determine whether there are any recognition obstacle samples within a preset boundary sample range of the target sample image. Based on the type of the identified obstacle sample, the third boundary sample data of the similar threshold sample image is obtained by fitting and restoring, and the similarity sample value between the third boundary sample data and the second boundary sample data of the tobacco fertilizer packaging bag in the benchmark sample image is compared. If the similarity sample value is not less than a preset similarity threshold, then the target sample image is used as the input feature, and the number of target sample objects corresponding to the at least one target sample image is used as the output feature, and input into the constructed deep learning network model to obtain the image counting model.

[0012] In a second aspect of the invention, the system includes a data storage device and a counting device, the counting device being configured to perform the counting method of the first aspect; The data storage device is used to store the target image, the first boundary data, the second boundary data, the detection result of the obstacle, the image counting model, and the identification code; The data storage device is used to store the target image, the first boundary data, the second boundary data, the detection result of the obstacle, the image counting model, and the identification code; The counting device includes: The image acquisition module is used to acquire at least one target image; The boundary determination module is used to determine the first boundary data of the target image; An obstacle detection module is used to determine a reference image of a tobacco fertilizer packaging bag, search the reference image for the existence of a target image or a similar threshold image of the target image within a preset size frame, and determine whether there is an identification obstacle within a preset boundary range of the target image. The identification obstacle includes contamination of the fertilizer packaging bag by tobacco leaves in the tobacco storage area, surface dirt or wrinkles caused by fertilizer transportation. Based on the type of identification obstacle, the module fits and reconstructs the third boundary data of the similarity threshold image, and compares the similarity between the third boundary data and the second boundary data of the tobacco fertilizer packaging bag in the reference image. If the similarity is less than a preset similarity threshold, an unusable countable image is output; if the similarity is not less than the preset similarity threshold, an usable countable image is output. The distance detection module is used to detect, if the available count image marker is received, whether there is a vertical distance less than a vertical distance threshold among multiple vertical distances between the second boundary data and the first boundary data; The counting model module is used to input the target image into a pre-trained image counting model if there is no vertical distance less than the vertical distance threshold. The identifier allocation module is used to calculate the cosine distance between two adjacent target images according to the order in which the target images are acquired. If the cosine distance is less than a preset spacing threshold, the two adjacent target images are assigned the same identifier code. The verification execution module is used to store the corresponding original third boundary data for each identifier code; for each target image with an identifier code, the image of the target image at the next timestamp position is used as the verification target image, wherein the image at the next timestamp position is the subsequently acquired image that is immediately adjacent to the target image in the time series; the verification third boundary data is fitted and restored based on the verification target image; the difference between the verification third boundary data and the original third boundary data is compared, and if the difference is not less than the verification difference threshold, the preset similarity threshold is adjusted; The quantity determination module is used to determine the quantity of tobacco fertilizer packaging bags based on the verified boundary data. The time analysis module is used to acquire multiple target images with the same identification code and the acquisition time of each target image, and to determine the dwell time of the tobacco fertilizer packaging bag at the image acquisition location based on the acquisition time of each target image.

[0013] As a preferred embodiment, the obstacle detection module includes: The contamination identification submodule is used to identify contaminated areas on tobacco leaves through image segmentation algorithms and to perform feature matching based on the tobacco leaf feature database to exclude contamination. The dirt detection submodule is used to detect dirty areas on the surface through texture analysis; The damage identification submodule is used to identify wrinkled and damaged areas using an edge detection algorithm; If any of the pollution identification submodule, dirt detection submodule, or damage identification submodule outputs a detection result, the obstacle detection module determines that there is an identification obstacle.

[0014] Compared with the prior art, the present invention has the following advantages: This invention significantly improves the reliability and adaptability of image counting for tobacco fertilizer outbound shipments. Through an innovative obstacle detection mechanism, it accurately distinguishes between contaminated leaves and valid packaging bags in the tobacco storage area, avoiding miscounting due to leaf adhesion. Simultaneously, it achieves non-contact real-time detection of surface dirt and wrinkles / damage caused during transportation, ensuring that only intact packaging bags are counted. Third-boundary data correction based on texture features further optimizes the boundary accuracy after contamination removal, making the counting process unaffected by environmental interference. Overall, this invention achieves high robustness and automation in tobacco fertilizer outbound shipment scenarios, significantly reducing the need for manual verification, ensuring the reliability of supply chain data, and providing key technical support for refined management in the tobacco industry. Attached Figure Description

[0015] The present invention will be further described with reference to the accompanying drawings, but the embodiments in the drawings do not constitute any limitation on the present invention. For those skilled in the art, other drawings can be obtained based on the following drawings without creative effort.

[0016] Figure 1 This is a schematic diagram of the system provided in an embodiment of the present invention. Detailed Implementation

[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0018] This embodiment provides a method for counting continuous images of tobacco fertilizer leaving the warehouse. The method includes the following steps: First, at least one target image is acquired using an image acquisition device. This target image is an image of a specific area on a tobacco fertilizer packaging bag used to identify the fertilizer type. During the tobacco outbound process, when the packaging bag passes through the image acquisition area, the system automatically captures an image of the identified area on the packaging bag as the target image. After preprocessing the received raw image, the image processing unit uses an edge detection algorithm to determine the first boundary data of the target image. This first boundary data is a set of boundary contour coordinates of the identified area.

[0019] Next, the system determines a reference image of the tobacco fertilizer packaging bag from a pre-stored standard image library of tobacco fertilizer labels. This standard image library contains standard label images for various tobacco fertilizer products. The system searches the reference images for a label image that matches the target image, or a similar threshold image within a preset size frame. The size of the preset size frame is adjusted based on the standard size of the tobacco fertilizer label to ensure that the label area is completely included.

[0020] The system further determines whether there are any recognition obstacles within a preset boundary range of the target image. These obstacles include contamination of the labeling area by tobacco leaves, surface dirt caused during transportation, or wrinkles and damage to the labeling area. The system uses an image segmentation algorithm to identify contaminated areas on the tobacco leaves, which are irregular areas that match the background color features of the tobacco storage area and cover the labeling area. Texture analysis is used to detect dirty areas on the labeling surface; if the variance of the grayscale value is large or the color histogram shift is significant, it is determined to be surface dirt. An edge detection algorithm is used to identify wrinkles and damage to the labeling area; if broken edges or text / pattern deformation are detected, it is determined to be wrinkles and damage.

[0021] When an obstacle is detected, the system fits and reconstructs the third boundary data of a similar threshold image based on the obstacle type. For tobacco leaf contamination, the system performs feature matching between the target image and the tobacco leaf feature database, marks the matching area as a contaminated area and excludes it, and then performs boundary fitting based on the image area after excluding the contaminated area; for surface dirt, the system uses a denoising algorithm to process the dirty area and combines it with an edge enhancement algorithm for boundary fitting; for wrinkles and damage in the marked area, the system extracts the texture feature key points of the damaged area and uses a curve fitting method for boundary fitting.

[0022] Subsequently, the system compares the similarity between the third boundary data and the second boundary data of the tobacco fertilizer identifier in the reference image, and uses a normalized cross-correlation algorithm to calculate the similarity value of the boundary contours. If the similarity is less than a preset similarity threshold, the target image is determined to be an unusable counting image; if the similarity is not less than the preset similarity threshold, the target image is determined to be a usable counting image, that is, the fertilizer type has been successfully identified.

[0023] For available countable images, the system calculates the cosine distance between two adjacent target images according to the order of acquisition. The system calculates the cosine distance between the feature vectors of consecutively captured fertilizer identification images of the same type. If the cosine distance value is less than a preset spacing threshold, the system assigns the same identification code to two adjacent target images, indicating that they belong to consecutive images of the same bag of fertilizer.

[0024] The system stores the corresponding original third boundary data for each identification code. This data is the third boundary data obtained by fitting the first target image when assigning the identification code. Specifically, for each target image with an identification code, the system directly uses the image at the next timestamp as the verification target image; the next timestamp is defined as the immediately following acquisition time in the time series. This design stems from the physical characteristics of tobacco fertilizer transportation: the packaging bags move at a constant speed on the conveyor belt, the time interval between adjacent images is fixed, and the image at the next position necessarily reflects the immediate continuation of the identified packaging bag's state, such as the gradual process of wrinkles developing from slight to significant. Therefore, this embodiment does not need to wait for the accumulation of multiple images, but triggers the verification process in the next frame after acquisition: re-execute the obstacle detection and boundary fitting process to obtain the verification third boundary data.

[0025] The system compares the difference between the verified third boundary data and the original third boundary data. If the difference is not less than the verification difference threshold, the preset similarity threshold is adjusted and the boundary data fitting is re-executed. The verification difference threshold is a preset upper limit for the allowable difference of boundary data (actually set at 15%, exceeding this value indicates a risk of misidentification).

[0026] Once the boundary data verification is successful, the system determines the number of tobacco fertilizer packaging bags based on the verified boundary data. The system also acquires multiple target images with the same identification code and their acquisition times, calculating the time difference from the first image to the last image as the dwell time of the tobacco fertilizer packaging bag at the image acquisition location. In this way, the system can accurately count and track different types of tobacco fertilizer.

[0027] The application and feedback adjustment process of the verification difference threshold are further explained in detail. In this embodiment, after the system compares the verification third boundary data with the original third boundary data, if the difference is not less than the verification difference threshold, the following feedback adjustment steps are executed: The system inputs the difference value into an adaptive filter to adjust the preset similarity threshold. Based on the magnitude of the difference value and historical adjustment trends, the adaptive filter calculates the adjustment range of the preset similarity threshold, enabling the system to adapt to image morphological changes in tobacco fertilizer labels caused by physical changes during the outbound process. Since the time interval between the verified target image and the target image is extremely short, the differences mainly stem from continuous changes during transportation, such as slight displacement of the packaging bag or gradual increase in dirt, rather than sudden interference. Therefore, when the difference value is within the range of 5% to 15%, the system determines it as a valid physical change and only fine-tunes the similarity threshold; if the difference value is ≥15%, it is determined that there is a fundamental error in the identification, such as misidentifying background noise as packaging bag. In this case, the third boundary data is verified to update the original third boundary data.

[0028] If the difference is less than the verification difference threshold, the system confirms the original third boundary data as valid, and no parameter adjustment is needed. If the difference is not less than the verification difference threshold, the system updates the original third boundary data based on the verification third boundary data and feeds the updated boundary data back into the training parameters of the image counting model. Specifically, the system uses the similarity sample values ​​between the verification third boundary data and the second boundary data of the benchmark image as new samples, adds them to the model training dataset, and uses them for subsequent model iteration and optimization.

[0029] In practical applications, the feedback adjustment mechanism of this embodiment can effectively address the image morphology changes caused by variations in the physical properties of fertilizer labels during the tobacco outbound process. For example, when tobacco leaves partially obscure the label area, or when the label area becomes soiled during transportation, by adjusting the preset similarity threshold and updating boundary data, the system can maintain high recognition accuracy under different environmental conditions, ensuring accurate counting of different types of tobacco fertilizers.

[0030] This embodiment provides a tobacco fertilizer outbound image counting system. For example... Figure 1 As shown, the system includes a data storage device and a counting device.

[0031] The data storage device adopts a distributed storage architecture, including a cache area and a persistent storage area. The cache area is used for temporary storage of target images, first boundary data, second boundary data, and detection results of obstacles; the persistent storage area is used for long-term storage of the tobacco fertilizer labeling standard image library, image counting model, and key identification code data.

[0032] The counting device includes the following functional modules: Image acquisition module: Composed of a high-resolution image acquisition device and an image preprocessing unit. The image acquisition device takes directional photos of the marked area on the tobacco fertilizer packaging bag to ensure that the marked area is clearly visible. The image preprocessing unit performs noise reduction, contrast enhancement, and color correction operations, with special optimization processing for the marked area.

[0033] Boundary Determination Module: Employs an edge detection algorithm to quickly detect the boundaries of the identified area. This module outputs the first boundary data as a sequence of coordinate points of the identified area, used to define the area of ​​the identification to be defined.

[0034] The obstacle detection module further includes: Pollution identification submodule: It uses image segmentation algorithms to identify regions, specifically detecting tobacco leaf pollution covering the marked areas, and performs feature matching based on the tobacco leaf feature database.

[0035] The dirt detection submodule performs texture analysis to specifically detect surface dirt in the marked areas. If high-frequency noise points or low-contrast areas are detected in the marked areas, they are determined to be surface dirt.

[0036] Damage Recognition Submodule: Employs an edge detection algorithm to specifically identify wrinkles and damage in the marking area. When a break or deformation exceeding a set range is detected at the edge of the marking text / pattern, it is determined to be wrinkle damage.

[0037] In this embodiment, if any of the pollution identification submodule, dirt detection submodule, or damage identification submodule detects an obstacle that affects the identification of the mark, the obstacle detection module determines that there is an identification obstacle and outputs an unusable count image mark; otherwise, it outputs an usable count image mark.

[0038] Distance detection module: Calculates multiple vertical distances between the boundary of the marked area and the preset reference boundary, and determines whether there are vertical distances less than the vertical distance threshold, which is used to verify the integrity of the marked area.

[0039] The counting model module integrates a deep learning model. The input is a pre-processed image of the labeled region, and the output is the identified fertilizer type and quantity. The model can distinguish between different types of tobacco fertilizer labels.

[0040] Identifier allocation module: Calculates the cosine distance between the feature vectors of consecutively captured identification images of the same type of fertilizer. If the distance is less than a preset spacing threshold, the same identification code is assigned to track consecutive images of the same bag of fertilizer.

[0041] Verification execution module: Stores the corresponding original third boundary data for each identifier code; for each target image with an identifier code, the system automatically uses the image at the next timestamp position as the verification target image, where the next timestamp position is strictly defined as the immediately following acquisition time in the time series and is set as the fixed frame interval of the image acquisition device; restores the verification third boundary data based on fitting; compares the difference between the verification third boundary data and the original third boundary data, and if the difference is not less than the verification difference threshold, adjusts the preset similarity threshold; Quantity determination module: Determines the quantity of tobacco fertilizer packaging bags based on the verified boundary data, and classifies and counts them according to fertilizer type.

[0042] Time analysis module: Records the first and last image timestamps of each identification code and calculates the dwell time to analyze the outbound efficiency of different types of fertilizers.

[0043] The foregoing description and accompanying drawings fully illustrate embodiments of this disclosure to enable those skilled in the art to practice them. Other embodiments may include structural, logical, electrical, procedural, and other changes. The embodiments represent only possible variations. Individual components and functions are optional unless explicitly required, and the order of operations may vary. Parts and features of some embodiments may be included in or replace parts and features of other embodiments. Moreover, the terminology used in this application is for describing embodiments only and is not intended to limit the claims. As used in the description of embodiments and claims, the singular forms “a,” “an,” and “the” are intended to equally include the plural forms unless the context clearly indicates otherwise. Similarly, the term “and / or” as used in this application means including one or more of the associated listed items and all possible combinations thereof. Additionally, when used in this application, the term "comprise" and its variations "comprises" and / or "comprising" refer to the presence of stated features, integrals, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or groups thereof. Without further limitations, an element defined by the phrase "comprising a..." does not exclude the presence of other identical elements in the process, method, or apparatus that includes said element. In this document, each embodiment may focus on the differences from other embodiments, and similar or identical parts between embodiments can be referred to mutually. For methods or products disclosed in the embodiments, if they correspond to the method section disclosed in the embodiments, the relevant parts can be referred to the description of the method section.

[0044] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented using electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods for each specific application to achieve the described functions, but such implementation should not be considered beyond the scope of the embodiments of this disclosure. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the described devices, apparatuses, and units can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0045] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, function, and operation of possible implementations of apparatus, methods, and computer program products according to embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. In the descriptions corresponding to the flowcharts and block diagrams in the accompanying drawings, the operations or steps corresponding to different blocks may also occur in a different order than those disclosed in the description; sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. Each block in a block diagram and / or flowchart, and combinations of blocks in a block diagram and / or flowchart, can be implemented using a dedicated hardware-based device that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

Claims

1. A method for counting continuous images of tobacco fertilizer leaving the warehouse, characterized in that, Includes the following steps: Acquire at least one target image and determine the first boundary data of the target image; A reference image of a tobacco fertilizer packaging bag is determined. The reference image is then searched for the existence of the target image or a similar threshold image within a preset size frame. Furthermore, the presence of identification obstacles is determined within a preset boundary range of the target image. These obstacles include contamination of the fertilizer packaging bag by tobacco leaves in the tobacco storage area, surface dirt or wrinkles caused by fertilizer transportation. Based on the type of identification obstacle, third boundary data of the similarity threshold image is fitted and restored. The similarity between the third boundary data and the second boundary data of the tobacco fertilizer packaging bag in the reference image is then compared. If the similarity is less than a preset similarity threshold, the target image is determined to be an unusable image. If the similarity is not less than a preset similarity threshold, then the target image is determined to be a usable countable image; According to the order in which the target images were acquired, the cosine distance between two adjacent target images is calculated. If the cosine distance is less than a preset spacing threshold, the two adjacent target images are assigned the same identifier code. Store the corresponding original third boundary data for each identifier code; For each target image with an identification code, the image at the next timestamp is used as the verification target image, wherein the image at the next timestamp is the next acquired image that is immediately adjacent to the target image in the time series; Based on the target image being verified, the presence of recognition obstacles is reassessed, and the third boundary data for verification is obtained by fitting and restoring the data. Compare the difference between the verified third boundary data and the original third boundary data. If the difference is not less than the verification difference threshold, adjust the preset similarity threshold and re-execute the boundary data fitting. The verification difference threshold is a preset upper limit for boundary data difference. The number of tobacco fertilizer packaging bags is determined based on the verified boundary data; Acquire multiple target images with the same identification code and the acquisition time of each target image; Based on the acquisition time of each target image, the dwell time of the tobacco fertilizer packaging bag at the image acquisition location is determined.

2. The continuous image counting method for tobacco fertilizer outbound according to claim 1, characterized in that, After comparing the difference between the verified third boundary data and the original third boundary data, if the difference is not less than the verification difference threshold, then a feedback adjustment step is executed: The difference is input into an adaptive filter to adjust the preset similarity threshold; If the difference is less than the verification difference threshold, then the original third boundary data is confirmed to be valid; If the difference is not less than the verification difference threshold, the original third boundary data is updated based on the verification third boundary data, and the updated boundary data is fed back into the training parameters of the image counting model.

3. The continuous image counting method for tobacco fertilizer outbound according to claim 1, characterized in that, The size of the preset size frame is adjusted based on the standard size of the tobacco fertilizer packaging bag. The width of the preset size frame is 1.2 times the standard width, and the height is 1.1 times the standard height.

4. The continuous image counting method for tobacco fertilizer outbound according to claim 1, characterized in that, The similarity between the third boundary data and the second boundary data is compared, and the similarity value of the boundary contour is calculated using a normalized cross-correlation algorithm.

5. The continuous image counting method for tobacco fertilizer outbound according to claim 1, characterized in that, The reference image is a pre-stored standard image of a tobacco fertilizer packaging bag, and the second boundary data is the predefined boundary contour data of the tobacco fertilizer packaging bag in the reference image.

6. The continuous image counting method for tobacco fertilizer outbound according to claim 1, characterized in that, The image counting model is trained through the following steps: Acquire at least one target sample image and determine the first boundary sample data of the target sample image; A reference sample image of a tobacco fertilizer packaging bag is determined. The reference sample image is used to search for whether the target sample image or a similar threshold sample image of the target sample image exists within a preset size sample frame. The reference sample image is then used to determine whether there are any recognition obstacle samples within a preset boundary sample range of the target sample image. Based on the type of the identified obstacle sample, the third boundary sample data of the similar threshold sample image is obtained by fitting and restoring, and the similarity sample value between the third boundary sample data and the second boundary sample data of the tobacco fertilizer packaging bag in the benchmark sample image is compared. If the similarity sample value is not less than a preset similarity threshold, then the target sample image is used as the input feature, and the number of target sample objects corresponding to the at least one target sample image is used as the output feature, and input into the constructed deep learning network model to obtain the image counting model.

7. A tobacco fertilizer outbound image counting system, characterized in that, The system includes a data storage device and a counting device, the counting device being configured to perform the counting method according to any one of claims 1 to 6; The data storage device is used to store the target image, the first boundary data, the second boundary data, the detection result of the obstacle, the image counting model, and the identification code; The counting device includes: The image acquisition module is used to acquire at least one target image; The boundary determination module is used to determine the first boundary data of the target image; An obstacle detection module is used to determine a reference image of a tobacco fertilizer packaging bag, search the reference image for the existence of a target image or a similar threshold image of the target image within a preset size frame, and determine whether there is an identification obstacle within a preset boundary range of the target image. The identification obstacle includes contamination of the fertilizer packaging bag by tobacco leaves in the tobacco storage area, surface dirt or wrinkles caused by fertilizer transportation. Based on the type of identification obstacle, the module fits and reconstructs the third boundary data of the similarity threshold image, and compares the similarity between the third boundary data and the second boundary data of the tobacco fertilizer packaging bag in the reference image. If the similarity is less than a preset similarity threshold, an unusable countable image is output; if the similarity is not less than the preset similarity threshold, an usable countable image is output. The distance detection module is used to detect, if the available count image marker is received, whether there is a vertical distance less than a vertical distance threshold among multiple vertical distances between the second boundary data and the first boundary data; The counting model module is used to input the target image into a pre-trained image counting model if there is no vertical distance less than the vertical distance threshold. The identifier allocation module is used to calculate the cosine distance between two adjacent target images according to the order in which the target images are acquired. If the cosine distance is less than a preset spacing threshold, the two adjacent target images are assigned the same identifier code. The verification execution module is used to store the corresponding original third boundary data for each identifier code; for each target image with an identifier code, the image of the target image at the next timestamp position is used as the verification target image, wherein the image at the next timestamp position is the subsequently acquired image that is immediately adjacent to the target image in the time series; the verification third boundary data is fitted and restored based on the verification target image; the difference between the verification third boundary data and the original third boundary data is compared, and if the difference is not less than the verification difference threshold, the preset similarity threshold is adjusted; The quantity determination module is used to determine the quantity of tobacco fertilizer packaging bags based on the verified boundary data. The time analysis module is used to acquire multiple target images with the same identification code and the acquisition time of each target image, and to determine the dwell time of the tobacco fertilizer packaging bag at the image acquisition location based on the acquisition time of each target image.

8. The counting system according to claim 7, characterized in that, The obstacle detection module includes: The contamination identification submodule is used to identify contaminated areas on tobacco leaves through image segmentation algorithms and to perform feature matching based on the tobacco leaf feature database to exclude contamination. The dirt detection submodule is used to detect dirty areas on the surface through texture analysis; The damage identification submodule is used to identify wrinkled and damaged areas using an edge detection algorithm; If any of the pollution identification submodule, dirt detection submodule, or damage identification submodule outputs a detection result, the obstacle detection module determines that there is an identification obstacle.