Image recognition-based ink-jet printing and packaging intelligent monitoring system
By constructing an image recognition-based intelligent monitoring system for inkjet packaging, and utilizing technologies such as conveyor displacement detection and cross-polarized illumination, the system solves the problems of position offset and trajectory confusion when the conveyor speed fluctuates, thereby improving the image stability and reliability of the system.
Patent Information
- Application Number
- CN202611521776.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-29
- Publication Date
- 2026-11-27
AI Technical Summary
Existing inkjet printing monitoring systems are prone to inkjet printing and rejection position shifts when the conveyor speed fluctuates, resulting in confusion of adjacent package trajectories, poor image stability, lack of spatial displacement constraints, and low system reliability and traceability.
The system employs a conveyor displacement detection module, an entrance detection module, a package tracking module, a coding control module, an illumination and imaging module, a coding recognition module, a position matching module, a judgment module, and a rejection control module. Combined with measuring wheel coding and counting, cross-polarized illumination, and bidirectional edge matching, it constructs spatial position constraints to ensure the stability of the coding image and the determination of the spatial ownership of the package.
It effectively solves the problem of inkjet printing and rejection position offset when the conveyor speed fluctuates, ensures the stability of inkjet printing images and accurate assessment of package trajectory, and improves the reliability and traceability of the system.
Smart Images

Figure CN123170244A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of industrial automation and machine vision, specifically to an intelligent monitoring system for inkjet printing and packaging based on image recognition. Background Technology
[0002] In the field of packaging production line monitoring, image recognition-based inkjet printing detection systems have gradually become the mainstream method to ensure the quality of inkjet printing on packaging due to their automated identification and rejection capabilities.
[0003] Currently, inkjet printing monitoring systems generally use photoelectric sensor triggering combined with a fixed time delay for processing. If the system needs to support image recognition of the inkjet printing content, it is necessary to acquire images through single-sided light source illumination and directly complete the allocation and release of packages based on the recognized content.
[0004] However, the above-mentioned method for controlling inkjet printing triggering and rejection relies on a constant conveyor speed. This causes changes in the conveyor belt's displacement when it starts or stops or when its speed fluctuates, which can easily lead to offsets in the inkjet printing and rejection positions. Furthermore, it cannot accurately distinguish between adjacent packages when they are close together, resulting in issues such as confusion of adjacent package trajectories and content mismatch. Simultaneously, this image processing method is susceptible to the effects of reflective packaging materials or wet ink, and relying solely on content recognition lacks spatial displacement constraints, leading to poor image stability and a tendency to incorrectly release packages. Moreover, it lacks an effective fault tolerance mechanism for rejection feedback, measurement slippage, or communication interruptions, making it difficult to interrupt erroneous processes under abnormal conditions, resulting in low overall system reliability and traceability. Summary of the Invention
[0005] The purpose of this invention is to provide an intelligent monitoring system for inkjet packaging based on image recognition, which solves the problems of inkjet and rejection position offset, confusion of adjacent package trajectories, content mismatch, poor image stability, lack of spatial displacement corresponding constraints, and low system reliability and traceability in the prior art.
[0006] The objective of this invention can be achieved through the following technical solutions:
[0007] The image recognition-based intelligent monitoring system for inkjet printing and packaging includes:
[0008] The conveyor displacement detection module acquires the cumulative conveyor displacement and conveyor speed of the package along the conveying direction;
[0009] The entrance detection module detects the front and rear edges and left and right lateral edges of the package, forming entrance contour data that includes the displacement of the front and rear edges and the position of the lateral edges;
[0010] The packaging tracking module establishes a conveying trajectory based on the cumulative conveying displacement and entrance contour data, including markings, front and rear edge detection displacements, lateral edge positions, predicted positions, and trajectory status.
[0011] The coding control module controls the coding at the inkjet terminal according to the conveying trajectory and records the coding trigger displacement; the illumination and shooting module includes a main recognition camera, which captures images containing the coding and the edge of the packaging, records the camera's observed displacement during exposure and extracts the outline of the packaging image.
[0012] The inkjet printing recognition module outputs the recognition result containing the inkjet printing content, the content recognition reliability value, and the image stability value based on the image, and compares it with the preset format to obtain the content verification result;
[0013] The position matching module outputs position matching values based on the camera observation displacement, the inkjet trigger displacement, and the calibrated distance from the inkjet terminal to the main recognition camera.
[0014] The judgment module obtains the contour matching value between the entrance contour data and the packaging image contour, and determines the judgment result based on the content verification result, content recognition reliability value, position matching value, contour matching value and image stability value.
[0015] When a rejection control module determines that a device is to be rejected, it outputs a rejection control signal and receives a rejection feedback signal based on the displacement observed by the camera and the calibrated distance from the main recognition camera to the rejection mechanism.
[0016] The local control and storage module saves the transport trajectory, recognition results, image contours, judgment results, and rejection feedback signals.
[0017] In some possible implementations, the conveyor displacement detection module includes a measuring wheel, an incremental encoder, and a displacement calculation unit. The measuring wheel is in contact with the surface of the conveyor belt, and the incremental encoder uses A and B phase quadrature outputs and performs quadrature frequency counting.
[0018] The displacement calculation unit determines the direction of the encoder pulses and eliminates abnormal pulses. It calculates the cumulative transport displacement based on the cumulative effective count and the unit count displacement, and calculates the transport speed based on the difference in cumulative transport displacement within adjacent periods at a preset time period. The transport speed of multiple consecutive speed calculation periods is filtered to obtain the filtered transport speed.
[0019] In some possible implementations, the entry detection module records the front and rear edge detection displacements under the same conveying displacement coordinate, determines the length of the package conveying direction based on the difference between the rear edge detection displacement and the front edge detection displacement, and determines the lateral width of the package based on the left and right lateral edges.
[0020] The coding control module determines the coding window based on the leading edge detection displacement, the calibrated distance from the position of the front edge of the package detected by the entry detection module to the preset coding position, and the upstream and downstream allowable deviations along the conveying direction. The coding is triggered when the cumulative conveying displacement enters the coding window.
[0021] In some possible implementations, the main recognition camera is a global shutter camera; the illumination and shooting module also includes a linear polarizer set in front of the lens of the main recognition camera, light source polarizers set in front of the left diffuse bar light source and the right diffuse bar light source respectively, a strobe controller and a hardware triggering unit;
[0022] The polarization direction of the light source polarizer intersects with that of the linear polarizer. The strobe controller controls the left and right diffuse strip light sources to light up respectively, and triggers the main recognition camera to acquire the corresponding left and right illumination images respectively. The field of view of the main recognition camera covers the inkjet printing and the edge of the packaging.
[0023] In some possible implementations, the inkjet printing recognition module determines the inkjet printing candidate area in the image based on the inkjet printing trigger displacement, the camera observation displacement, the calibration distance from the inkjet printer to the main recognition camera, and the pre-calibrated main recognition camera displacement-pixel mapping relationship.
[0024] The inkjet printing recognition module extracts the edge set of the inkjet printing candidate region in the left illumination image and the right illumination image respectively, matches the edge pixels according to the preset neighborhood radius in the same image coordinate system, and determines the stability of the inkjet printing edge based on the consistency of the matched edges.
[0025] The inkjet printing recognition module determines the saturation threshold based on the camera's grayscale bit depth, determines the saturation pixel ratio based on the ratio of the number of pixels reaching the saturation threshold to the total number of pixels in the region, and determines the image stability value based on the inkjet printing edge stability and the saturation pixel ratio. When the edge set does not meet the preset visibility conditions, the inkjet printing is determined to be invisible and the image stability value is set to zero.
[0026] In some possible implementations, the position matching module determines the displacement deviation based on the camera observation displacement, the inkjet trigger displacement, and the calibration distance from the inkjet terminal to the main recognition camera; determines the allowable displacement deviation based on the pre-calibrated basic allowable error, the filtered conveying speed, the preset reference conveying speed, and the preset speed deviation compensation coefficient; and determines the position matching value based on the ratio between the displacement deviation and the allowable displacement deviation.
[0027] In some possible implementations, the determination module transforms the entrance contour data to the main recognition camera coordinate system according to the cumulative transport displacement, and determines the contour matching value based on the degree of overlap between the entrance contour data and the contour of the package image;
[0028] The determination module determines a comprehensive determination value based on the content recognition reliability value, the contour matching value, the position matching value, the image stability value, and a preset weight, and determines the determination result in combination with the content verification result. The preset weight is a non-negative weight and the sum of each weight is 1.
[0029] The determination module first checks whether the image stability value meets the preset stability condition. If it does not meet the condition, the image is determined to be unacceptable.
[0030] When the image stability value meets the preset stability conditions, when the comprehensive judgment value reaches the preset pass threshold, the position matching value is greater than zero, and the content verification result is that the inkjet content conforms to the preset format, the recognition is determined to be successful; when the comprehensive judgment value reaches the preset pass threshold, the content verification result is that the inkjet content conforms to the preset format, and the position matching value is zero, a suspected mismatch is determined.
[0031] When the content verification result is that the inkjet content does not conform to the preset format or the comprehensive judgment value does not reach the preset pass threshold, the inkjet is determined to be abnormal, and the corresponding package is set to the state of pending re-inspection or pending rejection according to the status of the re-inspection channel.
[0032] For the same identification result, calculate the comprehensive judgment value of the identification result and the two adjacent conveying trajectories along the conveying direction. When the difference between the two comprehensive judgment values is less than the preset matching difference threshold, do not establish the association between the identification result and any conveying trajectory, and set the two adjacent conveying trajectories to be re-inspected or to be eliminated.
[0033] In some possible implementations, the rejection control module combines the camera observation displacement with the calibrated distance from the main recognition camera to the rejection mechanism to determine the target rejection displacement; it determines the response compensation distance based on the pre-calibrated response time of the rejection mechanism and the filtered conveying speed; when the cumulative conveying displacement reaches the difference between the target rejection displacement and the response compensation distance, the rejection control module outputs a rejection control signal to the rejection mechanism.
[0034] In some possible implementations, the package tracking module updates the transport trajectory based on the cumulative transport displacement and advances the trajectory status based on the displacement triggered by inkjet printing, the recognition result, the judgment result, and the rejection feedback signal;
[0035] The trajectory status includes pending coding, coded, pending image confirmation, recognition passed, suspected mismatch, image unconfirmable, coding abnormal, pending re-inspection, pending rejection, rejected, completed, and abnormal termination. Among them, packages that have passed recognition and have not been rejected enter the completed state after leaving the monitoring area, and enter the rejected state after the rejection feedback signal is confirmed.
[0036] The local control storage module is also used to perform cyclic redundancy verification on the saved conveyor trajectory; the system obtains the reference displacement through the conveyor belt drive shaft encoder, which is independent of the conveyor displacement detection module, and compares the reference displacement with the cumulative conveyor displacement to detect slippage of the measuring wheel or loss of encoder pulse signal;
[0037] When a continuous When at least one of the following preset abnormal events occurs: the image stability value of a package is lower than a preset stability threshold, the main recognition camera loses communication with the local control storage module, the local control storage module loses communication with the preset upper-level production system, adjacent packages cannot be separated, the trajectory buffer capacity is insufficient, or the rejection feedback signal is not confirmed, at least one of the following automatic coding, automatic release, and automatic rejection is suspended, and at least one of the following abnormal bypass collection control signal, mechanical stop control signal, and re-inspection control signal is output: It is a preset positive integer.
[0038] The beneficial effects of this invention are:
[0039] This invention, by adopting the above-mentioned technical solution, establishes the trajectory of the package and triggers the coding based on the measuring wheel coding count, the entrance contour detection, and the displacement window control. It effectively solves the problems of coding and rejection position offset when the conveying speed fluctuates and the confusion of the trajectories of adjacent packages when they are close together. By using cross-polarized illumination, bidirectional edge matching, and the correspondence of conveying displacement to construct spatial position constraints, it ensures the accurate evaluation of the stability of the coding image and the strict judgment of the spatial ownership of the package. Attached Figure Description
[0040] Other features, objects, and advantages of the invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings:
[0041] Figure 1 This is a schematic diagram of the structure of the image recognition-based inkjet packaging intelligent monitoring system in the embodiments of this application. Detailed Implementation
[0042] 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.
[0043] Please see Figure 1 An image recognition-based intelligent monitoring system for inkjet printing and packaging includes:
[0044] The conveyor displacement detection module acquires the cumulative conveyor displacement and conveyor speed of the package along the conveying direction;
[0045] The entrance detection module detects the front and rear edges and left and right lateral edges of the package, forming entrance contour data that includes the displacement of the front and rear edges and the position of the lateral edges;
[0046] The packaging tracking module establishes a conveying trajectory based on the cumulative conveying displacement and entrance contour data, including markings, front and rear edge detection displacements, lateral edge positions, predicted positions, and trajectory status.
[0047] The inkjet printing control module controls the inkjet printing terminal to print ink according to the conveying trajectory and records the inkjet printing trigger displacement;
[0048] The illumination and shooting module includes a main recognition camera, which captures images containing inkjet printing and the edges of the packaging. During exposure, it records the camera's observed displacement and extracts the outline of the packaging image.
[0049] The inkjet printing recognition module outputs the recognition result containing the inkjet printing content, the content recognition reliability value, and the image stability value based on the image, and compares it with the preset format to obtain the content verification result;
[0050] The position matching module outputs position matching values based on the camera observation displacement, the inkjet trigger displacement, and the calibrated distance from the inkjet terminal to the main recognition camera.
[0051] The judgment module obtains the contour matching value between the entrance contour data and the packaging image contour, and determines the judgment result based on the content verification result, content recognition reliability value, position matching value, contour matching value and image stability value.
[0052] When a rejection control module determines that a device is to be rejected, it outputs a rejection control signal and receives a rejection feedback signal based on the displacement observed by the camera and the calibrated distance from the main recognition camera to the rejection mechanism.
[0053] The local control and storage module saves the transport trajectory, recognition results, image contours, judgment results, and rejection feedback signals.
[0054] In some possible implementations, the conveyor displacement detection module includes a measuring wheel, an incremental encoder, and a displacement calculation unit. The measuring wheel is in contact with the surface of the conveyor belt, and the incremental encoder uses A and B phase quadrature outputs and performs quadrature frequency counting.
[0055] The displacement calculation unit determines the direction of the encoder pulses and eliminates abnormal pulses. It calculates the cumulative transport displacement based on the cumulative effective count and the unit count displacement, and calculates the transport speed based on the difference in cumulative transport displacement within adjacent periods at a preset time period. The transport speed of multiple consecutive speed calculation periods is filtered to obtain the filtered transport speed.
[0056] The inlet detection module records the front and rear edge detection displacements under the same conveying displacement coordinate. It determines the length of the package conveying direction based on the difference between the rear edge detection displacement and the front edge detection displacement, and determines the lateral width of the package based on the left and right lateral edges.
[0057] The coding control module determines the coding window based on the leading edge detection displacement, the calibrated distance from the position of the front edge of the package detected by the entry detection module to the preset coding position, and the upstream and downstream allowable deviations along the conveying direction. The coding is triggered when the cumulative conveying displacement enters the coding window.
[0058] The conveying displacement detection module outputs the cumulative conveying displacement of the package along the conveying direction; the inlet detection module outputs the front edge, rear edge, and lateral edges of the package; the package tracking module uses the above data to establish the package conveying trajectory corresponding to a single package; the inkjet control module determines the inkjet window according to the conveying displacement corresponding to the front edge of the package; the illumination and imaging module collects images of the inkjet area and the edge of the package; the position matching module uses the relationship between the inkjet trigger displacement and the camera observation displacement to confirm the spatial correspondence of the inkjet content; the judgment module outputs the package judgment result; the rejection control module performs rejection according to the judgment result; and the local control storage module saves the process record.
[0059] The measuring wheel in the conveyor displacement detection module is pressed against the surface of the conveyor belt through an elastic floating bracket. The surface of the measuring wheel is covered with a high-friction polyurethane layer. The rotation of the measuring wheel is converted into A-phase pulses and B-phase pulses by an incremental encoder. There is a phase difference between A-phase and B-phase. The displacement calculation unit determines the conveying direction according to the order of the two-phase pulses and counts the rising and falling edges in a quadruple frequency manner.
[0060] Determine the unit count displacement Unit count displacement According to the formula:
[0061]
[0062] in, This indicates the diameter of the measuring wheel, which reflects the theoretical length of conveyor belt movement per revolution of the measuring wheel. This indicates the number of pulses output per revolution of the encoder, reflecting the encoder's original counting resolution; This represents the orthogonal counting coefficient, which is 4 in the fourth-harmonic counting mode. It reflects the effective count quantity after the A and B phase pulses are expanded and counted. For conveyor mechanisms where the measuring wheel diameter, encoder resolution, and frequency doubling mode are already determined... It represents the conveyor belt displacement corresponding to each valid count;
[0063] During parameter calibration, the conveyor belt is moved a known calibration distance under both no-load and rated-load conditions. The corresponding effective counts are recorded. The parameter set is determined based on the deviation between the theoretical unit count displacement and the calibrated measured displacement meeting the first preset accuracy threshold and satisfying the allowable error under both load conditions. , and The corresponding valid counting relationship;
[0064] When the measuring wheel has measurable compressive deformation or installation eccentricity, the ratio of the calibrated measured displacement to the effective count is used as the control unit count displacement. And recalibrate after replacing the measuring wheel, encoder, or conveyor belt;
[0065] Cumulative transport displacement Based on the initial cumulative transport displacement The update is performed based on the baseline, and the update formula is as follows:
[0066]
[0067] in, This is the initial value for the cumulative transported displacement; This is the initial count value; For the current moment The cumulative valid count, The current time variable is used; the displacement calculation unit determines the direction of the encoder input pulse and excludes abnormal pulses that do not meet the logic relationship between phases A and B, so as to avoid electrical interference being mistakenly counted as the transport displacement of the package.
[0068] The conveying speed is calculated by dividing the cumulative conveying displacement difference at the end of the cycle between adjacent speeds by the cycle length of that speed. Determine; Let the first The period length of each speed calculation cycle is , and Let each be the cumulative conveying displacement at the end of the cycle for adjacent speeds, then the original conveying speed for that cycle is... The calculation formula is:
[0069]
[0070] Filter the raw conveying speeds from multiple consecutive speed calculation cycles; for example, the median filter of three consecutive speed calculation cycles can be used, and the median value of the three raw conveying speeds can be taken as the filtered conveying speed after sorting the three raw conveying speeds according to their values.
[0071] The filtered conveyor speed is used to calculate the allowable range of position deviation and to calculate the lead time; the window length of the three-point median filter is three speed calculation cycles, which is used to suppress speed spikes within a single cycle;
[0072] When abnormal speeds occur in multiple consecutive cycles, instead of simply deleting the abnormal data, the conveyor displacement detection module is marked as unstable for subsequent anomaly handling.
[0073] Speed calculation cycle Based on the conveyor belt control cycle and encoder pulse frequency, the system ensures that the effective count within a cycle is greater than the set count value and can be updated before changes in the coding window and rejection lead time.
[0074] When the effective count within a cycle is lower than the preset minimum count, the previous effective speed is retained and the current speed data is marked as low confidence. This data is not used alone to expand the inkjet window or to remove the lead amount.
[0075] The inlet detection module detects the leading and trailing edges of the package under the same conveying displacement coordinate; when the leading edge of the package enters the inlet detection range, the leading edge detection displacement is recorded. When the rear edge of the package leaves the entrance detection range, record the rear edge detection displacement. ;in, The sequence number indicating the transport trajectory of the package. and These represent the cumulative conveying displacement corresponding to the leading and trailing edges of the same package, respectively; and the length of the package along the conveying direction. The calculation formula is:
[0076]
[0077] The entry detection module also determines the position of the left lateral edge of the package. and the right horizontal edge position Horizontal width of the packaging According to the formula Determined; among them, the lateral edge position is used to reflect the range occupied by the package in the transverse direction of the conveyor belt. For example, when the packaging bag shifts laterally, the left lateral edge position and the right lateral edge position will change synchronously.
[0078] The package tracking module establishes the package conveying trajectory based on the leading edge detection displacement, trailing edge detection displacement, lateral edge position, and current cumulative conveying displacement; the trajectory identifier is generated by the local controller to distinguish different packages being conveyed continuously; the leading edge detection displacement and trailing edge detection displacement are used to determine the range of the package along the conveying direction;
[0079] The lateral edge position is used to determine the lateral range of the package; the current predicted position is used to update the package's position on the conveyor line based on subsequent cumulative conveying displacement; let the absolute physical reference coordinates of the inlet detection module be... Then the coordinates of the current predicted position According to the formula:
[0080]
[0081] The trajectory status is used to record whether the package is ready for coding, has been coded, or awaits image confirmation; the coding control module determines the coding window based on the displacement detected at the leading edge of the package; the calibrated distance from the leading edge detection position of the entry detection module to the preset coding position is set to... The upstream allowable deviation is The downstream allowable deviation is Let the lower limit of the inkjet printing window be... The upper limit is The lower limit of the inkjet printing window is determined by the formula:
[0082]
[0083] The upper limit of the inkjet printing window is determined by the formula:
[0084]
[0085] in, Used to convert the entrance detection position into a preset inkjet printing position. and These are respectively used to compensate for entry edge detection errors, conveyor displacement counting resolution, and allowable inkjet printing deviation of packaging;
[0086] When the current cumulative conveying displacement enters the above-mentioned inkjet window and the package conveying trajectory is in the inkjet-ready state, the inkjet control module outputs an inkjet trigger signal to the inkjet terminal and records the inkjet trigger displacement corresponding to the trigger moment. and Based on the repetition error of the entrance edge detection and the unit count displacement The corresponding quantization error, inkjet terminal response delay, and allowable inkjet area on the packaging are all used to determine the value.
[0087] The upstream and downstream allowable deviations cover the maximum error in their respective directions, and neither must exceed the minimum safe displacement between adjacent packages that can be used to distinguish them. For packages of fixed specifications, multiple normal transport samples are used to obtain the deviation range between the leading edge detection position and the actual inkjet printing position. The inkjet printing response error and counting resolution are then superimposed on this range to form a... , After changing the packaging specifications or the spray nozzle installation location, the location will be re-determined. , and .
[0088] In some possible implementations, the main recognition camera is a global shutter camera; the illumination and shooting module also includes a linear polarizer disposed in front of the lens of the main recognition camera, light source polarizers disposed in front of the left diffuse bar light source and the right diffuse bar light source respectively, a strobe controller and a hardware triggering unit;
[0089] The polarization direction of the light source polarizer intersects with the polarization direction of the linear polarizer. The strobe controller controls the left diffuse strip light source and the right diffuse strip light source to light up respectively, and triggers the main recognition camera to collect the corresponding left illumination image and right illumination image respectively. The field of view of the main recognition camera covers the inkjet code and the edge of the packaging.
[0090] The inkjet printing recognition module determines the inkjet printing candidate area in the image based on the inkjet printing trigger displacement, the camera observation displacement, the calibration distance from the inkjet printer to the main recognition camera, and the pre-calibrated main recognition camera displacement-pixel mapping relationship.
[0091] The inkjet printing recognition module extracts the edge set of the inkjet printing candidate region in the left illumination image and the right illumination image respectively, matches the edge pixels according to the preset neighborhood radius in the same image coordinate system, and determines the stability of the inkjet printing edge based on the consistency of the matched edges.
[0092] The inkjet printing recognition module determines the saturation threshold based on the camera's grayscale bit depth, determines the saturation pixel ratio based on the ratio of the number of pixels reaching the saturation threshold to the total number of pixels in the area, and determines the image stability value based on the inkjet printing edge stability and the saturation pixel ratio.
[0093] When the edge set does not meet the preset visibility condition, the inkjet code is determined to be invisible and the image stability value is set to zero;
[0094] The position matching module observes the displacement from the camera. Inkjet printing trigger displacement Calibration distance from the spray nozzle to the main identification camera Determine displacement deviation The downstream direction along the conveying direction is considered the positive direction; basic allowable error The larger of the pre-calibrated camera calibration error and the inkjet triggering error, and The allowable displacement deviation is:
[0095]
[0096] in, , The filtered delivery speed. The preset reference conveying speed, The preset velocity deviation compensation coefficient has the dimension of length; the position matching value is... .
[0097] The lighting and shooting module uses a global shutter camera, employing two sets of diffused strip light sources on the left and right for alternating illumination, and recording the camera's observation displacement during exposure. The inkjet printing recognition module determines the displacement based on the inkjet printing trigger. The camera observes displacement to determine candidate areas for inkjet printing. Edge sets are extracted from the left and right illumination images. Neighborhood matching under the same image coordinates determines the stability of the inkjet printing edges. The image stability value is then obtained by combining the saturation pixel ratio. The position matching module determines the position matching value based on the displacement difference in the conveying direction. ;
[0098] The main recognition camera adopts a global shutter structure to ensure that the edges of the packaging and the coding area in the same image have the same exposure time; a linear polarizer is set in front of the camera lens, and light source polarizers are set in front of the left diffuse bar light source and the right diffuse bar light source, respectively, and the polarization direction of the light source polarizers intersects the polarization direction of the linear polarizer.
[0099] The strobe controller controls the left and right diffuse strip light sources to light up according to a preset lighting cycle, and triggers the main recognition camera to capture the corresponding lighting images through the hardware trigger unit;
[0100] The main recognition camera's field of view simultaneously covers the coding area and the packaging edge; the coding area is used to extract coding characters, barcode modules, or QR code modules, while the packaging edge is used to determine the packaging image contour and provide a reference for matching the inlet contour data with the downstream packaging image contour; when the main recognition camera exposes, the transport displacement detection module reads the current cumulative transport displacement and records this displacement as the camera's observed displacement. ;
[0101] The candidate coding region is determined based on the coding trigger displacement, camera observation displacement, calibration distance from the inkjet pad to the main recognition camera's observation position, and the main recognition camera's displacement-pixel mapping relationship; let the calibration distance from the inkjet pad to the main recognition camera's observation position be... Then the theoretical observed displacement corresponding to the current inkjet trigger record is the inkjet trigger displacement. and The sum of the displacements; the displacement-pixel mapping relationship of the main recognition camera is used to convert the displacement in the transport direction into pixel offsets in the image;
[0102] The inkjet printing recognition module is based on actual observed displacement. The difference between the observed displacement and the theoretical displacement is used to determine the corrected pixel offset in the conveying direction. Then, the inkjet printing candidate area is determined based on the designed inkjet printing area and the pixel offset. The outline of the package image is extracted based on the edge of the package.
[0103] The displacement-pixel mapping relationship is achieved by placing calibration marks with known spacing on the conveyor belt, recording the pixel coordinates of each mark in the conveying direction in the camera image, and determining the pixel ratio in the conveying direction by the actual displacement interval of the calibration marks and the corresponding pixel interval; when the perspective change within the field of view is greater than the perspective change threshold, the marks near the near end and far end of the field of view are calibrated separately, and piecewise linear mapping is used.
[0104] The conveying direction boundary of the inkjet printing candidate area covers the nominal boundary of the designed inkjet printing area and the allowable error of the inkjet printing position, and the lateral boundary covers the allowable offset of the lateral edge of the packaging; when the corrected candidate area exceeds the effective field of view of the main recognition camera, the current image is marked as unconfirmable;
[0105] Within the candidate area for inkjet printing, the inkjet printing recognition module extracts the edge set from the left illumination image. and the edge set of the right-side illuminated image Each edge pixel in the edge set has image coordinates.
[0106] The physical displacement between images is calculated based on the time interval between the illumination of the left and right diffuse bar lights and the current filtered transmission speed. Combined with the displacement-pixel mapping relationship of the main recognition camera, the pixel compensation offset between images is obtained. For the edge set... After applying pixel compensation offset to all pixel coordinates along the transport direction for motion alignment;
[0107] for Edge pixels in Find the preset neighborhood radius Edge pixels within; when the image distance between two edge pixels does not exceed When this is the case, it is determined as the matching edge pixel; neighborhood radius A preset pixel deviation tolerance is used to compensate for the difference between the left and right illumination images. Its value can be set according to the camera calibration error, for example, it can be a value within the range of one to several pixels.
[0108] Edge stability According to the formula:
[0109]
[0110] in, Indicates the number of pixels matching the edges. Indicates the number of edge unions. The preset non-zero protection amount is indicated; the number of matching edge pixels is used to reflect the portion of the inkjet edge that still exists under changes in left and right lighting; the number of edge unions is used to reflect the entire edge range within the inkjet candidate area.
[0111] If the number of edges in both the left and right illumination images is lower than the preset minimum edge threshold, or if the edge set does not meet the preset visibility conditions, the inkjet code will be determined as invisible and the image stability value will be set to zero. The preset visibility conditions include at least the following: the number of edge pixels in the left and right illumination images reaches the corresponding minimum edge threshold, the edge pixels in the inkjet candidate area form continuous edge segments in both the transport direction and the lateral direction, and the proportion of matching edge pixels to the edge union reaches the minimum stable proportion.
[0112] The minimum edge threshold is determined based on the minimum number of valid edges of the inkjet characters, barcode modules, or QR code modules in the calibration image. The minimum stability ratio is determined based on the lower limit of the common edge ratio in the normal inkjet image and is recalibrated after changes in camera resolution, lens focal length, or inkjet format. When the number of edge unions is zero, the inkjet is directly determined to be invisible, and a non-zero protection quantity is not used to generate a valid stability determination.
[0113] The inkjet printing recognition module determines the saturation threshold based on the camera's grayscale bit depth. ,in, The grayscale threshold used to achieve saturation determination; for b-bit grayscale images, b is the grayscale bit depth of the camera output image, and the saturation threshold can be preset according to the effective grayscale range of the camera; in 8-bit grayscale images, the saturation threshold value is 250, and in 12-bit grayscale images, the saturation threshold value is 4000.
[0114] Let the number of pixels reaching the saturation threshold within the inkjet printing candidate region be... The total number of pixels in the region is Then the saturation pixel ratio According to the formula:
[0115]
[0116] in, Used to reflect the degree to which the candidate area for inkjet printing is affected by excessively bright reflections; image stability value is based on edge stability. and saturation pixel ratio Determined; when Not lower than the high stability threshold and When the image stability value is not higher than the low saturation ratio threshold, it can be determined as a high stability value; when Below the low stability threshold or When the image stability value is higher than the high saturation ratio threshold, it can be determined as a low stability value.
[0117] When the value falls between the two, the image stability value can be defined as a value between the high stability value and the low stability value; the high stability threshold, low stability threshold, low saturation ratio threshold, and high saturation ratio threshold are all calibrated using normal inkjet printing samples, reflective wet ink samples, and inkjet printing defect samples.
[0118] The high stability threshold and low stability threshold are determined according to the edge stability distribution of normal inkjet printing images and images that are invisible or have reflectivity greater than the reflectivity threshold, and the high stability threshold is greater than the low stability threshold; the low saturation ratio threshold and high saturation ratio threshold are determined according to the saturation pixel ratio distribution of normal inkjet printing images and images with reflectivity greater than the reflectivity threshold, and the low saturation ratio threshold is less than the high saturation ratio threshold.
[0119] For segmented determination of image stability values, first determine whether the high stability condition is met, then determine whether the low stability condition is met. If neither condition is met, an intermediate stability value is used to avoid the same image entering different branches simultaneously; saturation threshold. The grayscale range is determined based on the upper limit of the camera's effective grayscale range and the grayscale range that does not affect character edge extraction in normal inkjet printing images, and is recalibrated after changing the camera bit depth or image gain settings.
[0120] The inkjet printing content recognition employs a template-matching-based character recognition algorithm, specifically including: extracting connected components within the inkjet printing candidate region, and normalizing each connected component to... A pixel-dimensional binarization matrix ensures that all standard character mask matrices pre-stored in the local control storage module have the same characteristics. Pixel dimension;
[0121] Calculate the pixel-wise logical AND operation result matrix between the binarized matrix and each standard character mask matrix, and sum all elements of this result matrix to obtain the number of matching pixels. Output the number of matching pixels and the result matrix. The standard character with the largest ratio is used as the identified inkjet code content;
[0122] The inkjet printing recognition module outputs a content recognition reliability value and compares the recognized inkjet printing content with a preset inkjet printing format. The preset inkjet printing format may include the number of characters, character type, date format, batch number format, serial number rules, check digit or code system verification rules. The content recognition reliability value indicates the degree of conformity between the recognized content and the inkjet printing features in the image, and the inkjet printing content verification result indicates whether the recognized content meets production requirements. Specifically, the content recognition reliability value... The calculation formula is:
[0123]
[0124] in, This refers to the total number of pixels whose binary character edge pixels extracted by the inkjet printing recognition module coincide with the edge of a preset standard character template. This represents the total number of edge pixels for the preset standard character template.
[0125] The position matching module observes the displacement from the camera. Inkjet printing trigger displacement and calibration distance Displacement deviation The calculation formula is:
[0126]
[0127] Among them, the downstream direction along the conveying direction is the positive direction, and the displacement deviation is... This indicates the deviation between the displacement difference between the calibrated inkjet trigger position and the camera observation position and the calibrated distance;
[0128] Basic allowable error The larger of the camera calibration error and the inkjet triggering error, and Based on the impact of speed variations on package slippage, coding triggering, and image acquisition timing, allowable displacement deviations are specified. Determined according to preset rules, and through Limit the upper limit of allowable displacement deviation; in setting Calculate the allowable displacement deviation under the condition that the reference velocity is greater than zero; Based on the camera observation displacement recording error, the inkjet trigger displacement recording error, and... Determining the maximum combined effect of calibration errors;
[0129] Take the middle reference value within the normal production speed range. Determined based on the minimum separable displacement between adjacent packages, so that the allowable displacement deviation does not cover the judgment area of adjacent packages; According to the deviation of the conveying speed The calibration change of the actual position deviation is determined, and the allowable displacement deviation increases with the increase of the velocity deviation, but does not exceed [a certain value]. ;when When the displacement detection module is near zero or marked as unstable, instead of using speed compensation to expand the allowable displacement deviation, the position matching result is marked as unconfirmable and transferred to anomaly handling.
[0130] Location matching value According to positional deviation With respect to allowable displacement deviation The relationship between them is determined; when When the value is zero, the position matching value is 1, indicating that the inkjet trigger position and the camera observation position conform to the calibration relationship; when... Reaching or exceeding When the position deviation is between zero and ε, the position matching value is 0, indicating that the current inkjet printing result does not meet the position correspondence condition; when the position deviation is between zero and ε, the position matching value decreases as the position deviation increases.
[0131] In some possible implementations, the determination module transforms the entrance contour data to the main recognition camera coordinate system according to the cumulative transport displacement, and determines the contour matching value based on the degree of overlap between the entrance contour data and the contour of the package image.
[0132] The judgment module determines a comprehensive judgment value based on the content recognition reliability value, contour matching value, position matching value, image stability value, and preset weights, and determines the judgment result in combination with the content verification result. The preset weights are non-negative weights and the sum of each weight is 1.
[0133] The determination module first checks whether the image stability value meets the preset stability condition. If it does not meet the condition, the image is determined to be unacceptable.
[0134] When the image stability value meets the preset stability conditions, if the comprehensive judgment value reaches the preset passing threshold, the position matching value is greater than zero, and the content verification result is that the inkjet content conforms to the preset format, the recognition is determined to be successful; if the comprehensive judgment value reaches the preset passing threshold, the content verification result is that the inkjet content conforms to the preset format, and the position matching value is zero, a suspected mismatch is determined.
[0135] When the content verification result is that the inkjet content does not conform to the preset format or the comprehensive judgment value does not reach the preset pass threshold, the inkjet is determined to be abnormal, and the corresponding package is set to the state of pending re-inspection or pending rejection according to the status of the re-inspection channel.
[0136] For the same identification result, calculate the comprehensive judgment value of the identification result and the two adjacent conveying trajectories along the conveying direction. When the difference between the two comprehensive judgment values is less than the preset matching difference threshold, do not establish the association between the identification result and any conveying trajectory, and set the two adjacent conveying trajectories to be re-inspected or to be eliminated.
[0137] The rejection control module records the calibrated distance from the main recognition camera to the rejection mechanism as... And the target removal displacement is determined as The rejection mechanism's response time is a pre-calibrated time from the output of the trigger signal to the rejection mechanism reaching its operating position. The response compensation distance is ,in The filtered delivery speed;
[0138] When the cumulative transport displacement reaches At that time, the rejection control module outputs a rejection control signal to the rejection mechanism;
[0139] After the rejection action is completed, a rejection feedback signal is obtained. If the rejection feedback signal is not confirmed, a rejection failure event is generated, an alarm signal is output, and at least one of the downstream blocking control signal and abnormal collection control signal is output according to the preset fault handling strategy.
[0140] The packaging tracking module updates the conveying trajectory based on the cumulative conveying displacement, and advances the trajectory status based on the displacement triggered by inkjet printing, recognition results, judgment results, and rejection feedback signals. The trajectory status includes pending inkjet printing, inkjet printed, pending image confirmation, recognition passed, suspected mismatch, image unconfirmable, inkjet printing abnormal, pending re-inspection, pending rejection, rejected, completed, and abnormal termination. Among them, packaging that has passed recognition and has not been rejected enters the completed state after leaving the monitoring area, and enters the rejected state after the rejection feedback signal is confirmed.
[0141] The local control storage module is also used to perform cyclic redundancy verification on the saved conveyor trajectory; the system obtains the reference displacement through the conveyor belt drive shaft encoder, which is independent of the conveyor displacement detection module, and compares the reference displacement with the cumulative conveyor displacement to detect slippage of the measuring wheel or loss of encoder pulse signal;
[0142] When a continuous When at least one of the following preset abnormal events occurs: the image stability value of a package is lower than a preset stability threshold, the main recognition camera loses communication with the local control storage module, the local control storage module loses communication with the preset upper-level production system, adjacent packages cannot be separated, the trajectory buffer capacity is insufficient, or the rejection feedback signal is not confirmed, at least one of the following automatic coding, automatic release, and automatic rejection is suspended, and at least one of the following abnormal bypass collection control signal, mechanical stop control signal, and re-inspection control signal is output: It is a preset positive integer.
[0143] The judgment module converts the package outline obtained from the entrance detection to the coordinate system of the main recognition camera according to the cumulative transport displacement, and compares it with the package image outline obtained by the main recognition camera; for images whose image stability value meets the preset stability conditions, the judgment module outputs a comprehensive judgment value by combining the content recognition reliability value, outline matching value, position matching value and image stability value.
[0144] For situations where the image is unstable, the position cannot be matched, or adjacent packages cannot be distinguished, the judgment module does not directly release the package, but outputs results such as suspected mismatch, image unconfirmable, pending re-inspection, or pending rejection; the rejection control module outputs rejection control signals in advance based on the transport displacement of the target package, and confirms the rejection results based on the feedback signals; the local control storage module saves the trajectory and judgment data, and controls the automatic process to pause or switch to bypass, stop, and re-inspection processing in abnormal situations;
[0145] The determination module converts the entrance contour data into the expected contour in the coordinate system of the main recognition camera. During the conversion process, the current predicted position of the package, the camera observation displacement, and the pre-determined camera displacement-pixel mapping relationship are used to convert the conveying direction position in the entrance contour into the corresponding position in the camera image. The lateral edge position of the package is converted into the lateral coordinate of the image according to the camera lateral calibration relationship. Thus, the expected image contour corresponding to the entrance contour is formed.
[0146] The main recognition camera extracts the packaging image contour from an image containing the coding area and the packaging edge; the judgment module compares the degree of overlap between the predicted image contour and the packaging image contour to obtain a contour matching value. The contour matching value indicates whether the package detected at the entrance has the same length range, lateral width, and edge shape as the package currently observed by the main recognition camera. For bags, contour matching allows for certain variations in length and width to accommodate wrinkles and slight deformations in flexible packaging. For rigid cardboard boxes, the allowable error threshold can be reduced accordingly. The calculation formula is:
[0147]
[0148] in, The length of the package along the conveying direction obtained from the inlet inspection. The length of the package outline extracted from the image is calculated from the calibrated pixels along the transport direction. The horizontal width of the package. Calculate the width of the horizontal pixels of the extracted image contour; and These are the preset length overlap weights and width overlap weights, and they satisfy... ;
[0149] When any item is significantly less than the corresponding minimum allowable value, it will not be directly judged as a match just because the matching value of other items is greater than the set weight threshold. This avoids incorrect association when the overall overlap is high but there is local misalignment or the lateral position of adjacent packages overlaps. The minimum allowable value of each item is determined according to the type of package, the entry detection repeatability error and the resolution of the main recognition camera. Flexible packaging adopts a larger deformation tolerance, while rigid packaging adopts a smaller deformation tolerance.
[0150] The judgment module determines a comprehensive judgment value based on four types of input; the content recognition reliability value is denoted as... The position matching value is denoted as The contour matching value is denoted as The image stability value is denoted as The corresponding weights are , , and Let the comprehensive judgment value be... Comprehensive judgment value The calculation formula is:
[0151]
[0152] in, Used to indicate the reliability of the inkjet printing content being correctly identified; Used to indicate the degree of correspondence between the inkjet printing trigger position and the camera observation position in terms of transport displacement; Used to indicate the degree of correspondence between the outline of the inlet package and the outline of the downstream package image; Used to indicate whether the current inkjet image has sufficient stability; , , and The weights are non-negative and the sum of all weights is 1.
[0153] Weights are used to dynamically balance the roles of content, position, outline, and image stability in the current packaging determination; for example, a rigid cardboard box of fixed size can increase the weight corresponding to the outline matching value; a QR code or serial number with strict verification bits can increase the weight corresponding to the content recognition reliability value.
[0154] When the conveying speed exceeds the preset speed deviation threshold, the weight corresponding to the position matching value is not completely canceled. Instead, the position constraint remains effective through conveying displacement detection and calibration of allowable displacement deviation. An example of the weight value could be... , , and However, the specific value is determined based on the type of packaging and the on-site sample;
[0155] The preset threshold is determined based on the lower limit of the comprehensive judgment value of normal inkjet-printed packaging and the upper limit of the comprehensive judgment value of abnormal packaging. When determining the threshold, three independent conditions must be met simultaneously: the position matching value is greater than zero, the image stability value meets the stability condition, and the inkjet content verification passes. If the comprehensive judgment value reaches the threshold but any of the independent conditions are not met, it is uncertain whether the recognition is passed.
[0156] The determination module first judges whether the image stability value meets the preset stability condition; when the image stability value is lower than the low stability threshold, or the inkjet edge set does not meet the preset visibility condition, the determination module determines the current result as the image is unconfirmable and directly determines to release it without using the content recognition reliability value.
[0157] After the image stability value meets the preset stability condition, the comprehensive judgment value, position matching value, and inkjet content format are then judged. Only when the comprehensive judgment value reaches the preset pass threshold, the position matching value is greater than zero, and the inkjet content conforms to the preset inkjet format, is the package determined to be recognized as passed.
[0158] When the inkjet printing content conforms to the preset inkjet printing format but the position matching value is zero, the judgment module determines the current result as a suspected mismatch. This result indicates that the content itself may be correct, but there is no corresponding relationship between the inkjet printing content and the current package displacement. When the inkjet printing content does not conform to the preset inkjet printing format, or the comprehensive judgment value does not reach the preset pass threshold, the judgment module determines the package as an inkjet printing abnormality and sets the package to a state to be re-inspected or a state to be rejected according to the status of the re-inspection channel.
[0159] For the same inkjet printing recognition result, the judgment module calculates its comprehensive judgment value along with the conveying trajectory of the preceding and following packages adjacent to each other along the conveying direction; let the two comprehensive judgment values be respectively... and The preset matching difference threshold is When the absolute difference between two comprehensive judgment values is less than At that time, the judgment module does not forcibly associate the inkjet recognition result with any package conveying trajectory, but sets the two adjacent package conveying trajectories to a state of pending re-inspection or a state of pending rejection;
[0160] The matching difference threshold is used to indicate that the difference between the two candidate packages is insufficient to support a deterministic assignment; an example value is 0.10. The determination is based on the difference distribution of the two candidate comprehensive judgment values in the case of mismatch between adjacent packages and the minimum judgment difference in the case of normal single-piece matching.
[0161] When only one of the two candidate trajectories meets the minimum allowable value for the contour component or the position matching value is greater than zero, the trajectory that does not meet the independent constraints can be directly excluded, and the difference in the comprehensive judgment value should not replace the contour or position constraints; when both trajectories meet the independent constraints and the difference in the judgment value is less than zero, the trajectory that does not meet the independent constraints can be directly excluded, and the difference in the comprehensive judgment value should not replace the contour or position constraints. Only when the time is right will unrelated processing be performed;
[0162] For packages to be rejected, the rejection control module records the calibrated distance from the observation position of the main recognition camera to the action position of the rejection mechanism as... Target removal displacement The calculation formula is:
[0163]
[0164] in, To eliminate displacement for the target, The camera observation displacement recorded during the exposure of the main recognition camera. The calibration distance from the main recognition camera to the rejection mechanism;
[0165] Let the response time of the rejection mechanism from receiving the trigger signal to reaching the action position be... The rejection control module obtains the original conveying speed from the latest speed calculation cycle before the output rejection control signal as the instantaneous speed. Remove response compensation distance The calculation formula is:
[0166]
[0167] in, In response to the compensation distance, the distance the package continues to move during the rejection mechanism's response is converted into the lead time for rejection control; The instantaneous speed of the latest speed calculation cycle before the output rejection control signal is used to reflect the current conveying speed of the package; To eliminate the response time of the elimination mechanism, the response period obtained by calibrating the elimination action is used to reflect the action delay of the elimination mechanism itself.
[0168] When the cumulative transported displacement reaches the position of the target rejection displacement minus the response compensation distance, the rejection control module outputs a rejection control signal to the rejection mechanism;
[0169] The rejection mechanism can be an air blower, a swing arm, a push rod, a lane divider fork, or a controllable material drop baffle. After the rejection action is completed, the rejection control module reads the rejection feedback signal. When the feedback signal confirms that the rejection action is valid, the corresponding trajectory is advanced to the rejected state. When the feedback signal is not confirmed, a rejection failure event is generated and an alarm signal is output. At the same time, at least one of the downstream stop control signal and the abnormal collection control signal is output according to the fault handling strategy.
[0170] The rejection mechanism is set with a single-action latching rule; only one rejection control signal is allowed to be triggered on the same package conveying trajectory. The rejection mechanism will not receive a new rejection instruction until the reset confirmation is completed. The next rejection action is only allowed after the rejection mechanism reset signal is valid. This rule is used to avoid the same package being rejected repeatedly due to communication retransmission, repeated trajectory processing, or repeated scanning by the controller.
[0171] The packaging tracking module updates the packaging transport trajectory according to the cumulative transport displacement, and advances the trajectory status based on the inkjet trigger record, inkjet recognition result, packaging judgment result and rejection feedback signal; the trajectory status includes pending inkjet, inkjet, pending image confirmation, recognition passed, suspected mismatch, image unconfirmable, inkjet abnormal, pending re-inspection, pending rejection, rejected, completed and abnormal termination;
[0172] The trajectory status advances forward in the conveying direction and does not regress due to data retransmission or repeated instructions from the preset upper-level production system; packages that have passed identification and have not been rejected enter the completed state after leaving the monitoring area; packages that have been rejected enter the rejected state after confirmation by the rejection feedback signal; packages that cannot be processed due to encoder malfunction, camera disconnection, inseparability of the package, or abnormal trajectory data enter the abnormal termination state.
[0173] The local control storage module sequentially saves the package conveying trajectory, inkjet trigger displacement, camera observation displacement, inkjet recognition result, package image outline, package judgment result, rejection feedback signal and fault code; for each trajectory record, a cyclic redundancy check value is calculated based on the data to be written, and the check value is saved along with the trajectory record;
[0174] When reading a record, the checksum is recalculated and compared; if the two are inconsistent, the record is marked as a storage error to prevent corrupted records from being used as normal traceability results; the trajectory cache can save a preset number of package records in continuous production, and triggers exception handling when the cache capacity is insufficient;
[0175] The system obtains a reference displacement through an encoder on the conveyor belt drive shaft, which is independent of the conveyor displacement detection module, and compares the reference displacement with the cumulative conveyor displacement generated by the measuring wheel. When the difference between the two displacements continues to exceed the preset deviation condition, it is determined that the measuring wheel may be slipping.
[0176] When the inlet detection module detects that a package is passing through but the cumulative conveying displacement does not increase in the preset conveying direction, it determines that there may be a loss of encoder pulse signal; the preset deviation condition is determined based on the resolution error of the drive shaft encoder and the measuring wheel encoder, the allowable elastic expansion and contraction of the conveyor belt, and the allowable slippage between the measuring wheel and the conveyor belt;
[0177] Within the continuous displacement comparison cycle, only when the displacement difference exceeds the condition and continues to reach the preset confirmation cycle will it be judged as a continuous abnormality, so as to eliminate the quantization error of a single counting cycle; when the above situation occurs, the system will pause new automatic coding or automatic rejection, and set the unfinished trajectory to the state of pending re-inspection, pending rejection or abnormal termination.
[0178] When continuous When the image stability value of a package is lower than a preset stability threshold, the system determines that the image quality is continuously abnormal. The preset positive integer; Used to distinguish occasional low-quality images and persistent abnormalities in lighting, camera or packaging material conditions of a single package; values range from 5 to 20.
[0179] The preset stability threshold is taken as the boundary value between the low stability threshold and the high stability threshold, and is determined based on the distribution of stable values in normal and abnormal images; The timing is determined based on packaging intervals, lighting control cycles, and permissible duration of anomalies, ensuring that a single, occasional anomaly will not trigger a shutdown, while consecutive anomalies will reach a certain threshold. When a package is received, the corresponding exception handling is triggered.
[0180] In addition, when the main identification camera loses communication with the local control storage module, the local control storage module loses communication with the preset upper production system, adjacent packages cannot be separated, the trajectory buffer capacity is insufficient, or the rejection feedback signal is not confirmed, the system will suspend at least one of automatic coding, automatic release, and automatic rejection according to the type of abnormality, and output at least one of abnormal bypass collection control signal, mechanical stop control signal, and re-inspection control signal.
[0181] In response to different abnormal events, the system selects control actions according to the pre-set correlation: when the camera disconnects or the image is continuously unstable, the automatic release is paused and a re-inspection control signal is output; when adjacent packages cannot be separated or the reference displacement is abnormal, the automatic coding and automatic rejection are paused and a mechanical stop or abnormal bypass collection control signal is output.
[0182] When the trajectory buffer capacity is insufficient or the storage verification is abnormal, automatic release is paused and an abnormal collection control signal is output; when the rejection feedback is not confirmed, subsequent automatic rejection is paused and a downstream blocking control signal is output.
[0183] When network communication is interrupted, the local control storage module continues to save the trajectory and judgment records. The on-site coding, image confirmation and rejection control does not take the preset communication status of the upper production system as the only execution condition. After the network is restored, the records are retransmitted according to the trajectory identification and cumulative transport displacement order, and the integrity of the records is confirmed according to the cyclic redundancy check results. When the main identification camera is disconnected, the established package transport trajectory is not deleted. Packages that pass through the identification range but cannot obtain a valid image are marked as abnormal and processed according to the abnormal bypass collection or manual re-inspection process.
[0184] The aforementioned image recognition-based inkjet packaging intelligent monitoring system is deployed on a continuous packaging production line; the conveyor displacement detection module is installed on the side of the driven roller of the conveyor belt at a set assembly position, the measuring wheel keeps in contact with the surface of the conveyor belt, and the incremental encoder outputs two-phase orthogonal pulses A and B to the local controller;
[0185] The entrance detection module is located upstream of the inkjet printer to acquire the front, rear, and lateral edges of the package; the inkjet printer is located downstream of the entrance detection position; the main recognition camera is located downstream of the inkjet printer, with a field of view covering the inkjet printing area and the edge of the package; the rejection mechanism is located downstream of the observation position of the main recognition camera and is equipped with a rejection feedback sensor.
[0186] During production, the conveying displacement detection module continuously outputs the cumulative conveying displacement and the filtered conveying speed; when the inlet detection module detects the leading edge of the package, it establishes the corresponding package conveying trajectory; when it detects the trailing edge of the package, it supplements the trailing edge detection displacement, conveying direction length, and lateral width; the inkjet control module calculates the inkjet window based on the leading edge detection displacement and the calibrated inkjet distance; after the cumulative conveying displacement enters the inkjet window, inkjet printing is triggered, and the actual inkjet trigger displacement is written into the package conveying trajectory.
[0187] When the packaged item is transported to the observation range of the main recognition camera, the strobe controller illuminates the left diffuse strip light source and the right diffuse strip light source respectively according to the illumination cycle. The hardware triggering unit triggers the main recognition camera to acquire two illumination images respectively. When the main recognition camera is exposed, it records the camera observation displacement. The inkjet recognition module determines the inkjet candidate area according to the displacement-pixel mapping relationship, extracts the edge set in the two images and determines the image stability value. At the same time, it recognizes the inkjet content and completes the preset inkjet format verification.
[0188] The judgment module converts the entrance contour to the coordinate system of the main recognition camera, matches it with the contour of the package image, and determines the judgment result of the package based on the content recognition reliability value, position matching value, contour matching value and image stability value; packages that pass the recognition enter the completed state after leaving the monitoring range; packages suspected of mismatch, unconfirmable images or abnormal coding enter the pending re-inspection or pending rejection state according to the status of the re-inspection channel.
[0189] For packages to be rejected, the rejection control module determines the target rejection displacement based on the displacement observed by the camera and the calibrated distance, and then determines the response compensation distance based on the filtered conveying speed and the response cycle of the rejection mechanism; when the cumulative conveying displacement reaches the advance trigger position, a rejection control signal is output to the rejection mechanism.
[0190] After the rejection mechanism completes its action, the rejection feedback sensor outputs a feedback signal. The local controller advances the package trajectory to the rejected state based on the feedback result, or generates a rejection failure event and outputs an alarm, downstream stop, or abnormal collection control signal.
[0191] Newly generated inlet contour data, cumulative conveying displacement, inkjet trigger record, camera observation displacement, inkjet recognition result, package image contour, package judgment result, and rejection feedback signal are continuously written to the local control storage module; the preset upper production system can read the production record according to the trajectory identifier and cumulative conveying displacement; when communication is interrupted, the field control and recording continue to be completed by the local controller, and after communication is restored, the records confirmed by cyclic redundancy check are retransmitted according to the trajectory order;
[0192] When the difference between the independent reference displacement and the cumulative transport displacement exceeds the preset condition, or when the image stability value of multiple consecutive packages is lower than the preset stability threshold, the system will suspend the corresponding automatic coding, automatic release or automatic rejection functions, and guide the packages to the abnormal bypass collection, re-inspection channel or mechanical stop position according to the abnormality type.
Claims
1. An intelligent monitoring system for inkjet printing and packaging based on image recognition, characterized in that, include: The conveyor displacement detection module acquires the cumulative conveyor displacement and conveyor speed of the package along the conveying direction; The entrance detection module detects the front and rear edges and left and right lateral edges of the package, forming entrance contour data that includes the displacement of the front and rear edges and the position of the lateral edges; The packaging tracking module establishes a conveying trajectory based on the cumulative conveying displacement and entrance contour data, including markings, front and rear edge detection displacements, lateral edge positions, predicted positions, and trajectory status. The inkjet printing control module controls the inkjet printing terminal to print ink according to the conveying trajectory and records the inkjet printing trigger displacement; The illumination and shooting module includes a main recognition camera, which captures images containing inkjet printing and the edges of the packaging. During exposure, it records the camera's observed displacement and extracts the outline of the packaging image. The inkjet printing recognition module outputs the recognition result containing the inkjet printing content, the content recognition reliability value, and the image stability value based on the image, and compares it with the preset format to obtain the content verification result; The position matching module outputs position matching values based on the camera observation displacement, the inkjet trigger displacement, and the calibrated distance from the inkjet terminal to the main recognition camera. The determination module obtains the contour matching value between the entrance contour data and the packaging image contour, and determines the determination result based on the content verification result, the content recognition reliability value, the position matching value, the contour matching value, and the image stability value. When a rejection control module determines that a device is to be rejected, it outputs a rejection control signal and receives a rejection feedback signal based on the displacement observed by the camera and the calibrated distance from the main recognition camera to the rejection mechanism. The local control and storage module saves the transport trajectory, recognition results, image contours, judgment results, and rejection feedback signals.
2. The image recognition-based intelligent monitoring system for inkjet printing and packaging according to claim 1, characterized in that, The conveyor displacement detection module includes a measuring wheel, an incremental encoder, and a displacement calculation unit. The measuring wheel is in contact with the surface of the conveyor belt, and the incremental encoder uses A and B phases orthogonal output and performs quadruple frequency counting. The displacement calculation unit determines the direction of the encoder pulses and excludes abnormal pulses. It calculates the cumulative transport displacement based on the cumulative effective count and the unit count displacement, and calculates the transport speed based on the difference in cumulative transport displacement within adjacent periods at a preset time period. The transport speed of multiple consecutive speed calculation periods is filtered to obtain the filtered transport speed.
3. The image recognition-based intelligent monitoring system for inkjet printing and packaging according to claim 1, characterized in that, The inlet detection module records the front and rear edge detection displacements under the same conveying displacement coordinate. It determines the length of the package conveying direction based on the difference between the rear edge detection displacement and the front edge detection displacement, and determines the lateral width of the package based on the left and right lateral edges. The coding control module determines the coding window based on the leading edge detection displacement in the leading and trailing edge detection displacements, the calibrated distance from the position of the front edge of the package detected by the entry detection module to the preset coding position, and the upstream and downstream allowable deviations along the conveying direction, and triggers coding when the cumulative conveying displacement enters the coding window.
4. The image recognition-based intelligent monitoring system for inkjet printing and packaging according to claim 1, characterized in that, The main recognition camera is a global shutter camera; the lighting and shooting module also includes a linear polarizer set in front of the lens of the main recognition camera, light source polarizers set in front of the left diffuse bar light source and the right diffuse bar light source respectively, a strobe controller and a hardware triggering unit; The polarization direction of the light source polarizer intersects with the polarization direction of the linear polarizer. The strobe controller controls the left diffuse strip light source and the right diffuse strip light source to light up respectively, and triggers the main recognition camera to collect the corresponding left illumination image and right illumination image respectively. The field of view of the main recognition camera covers the inkjet printing and the edge of the packaging.
5. The image recognition-based intelligent monitoring system for inkjet printing and packaging according to claim 4, characterized in that, The inkjet printing recognition module determines the inkjet printing candidate area in the image based on the inkjet printing trigger displacement, the camera observation displacement, the calibration distance from the inkjet printer to the main recognition camera, and the pre-calibrated main recognition camera displacement-pixel mapping relationship. The inkjet printing recognition module extracts the edge set of the inkjet printing candidate region in the left illumination image and the right illumination image respectively, matches the edge pixels according to the preset neighborhood radius in the same image coordinate system, and determines the stability of the inkjet printing edge based on the consistency of the matched edges. The inkjet printing recognition module determines the saturation threshold based on the camera's grayscale bit depth, determines the saturation pixel ratio based on the ratio of the number of pixels reaching the saturation threshold to the total number of pixels in the region, and determines the image stability value based on the inkjet printing edge stability and the saturation pixel ratio. When the edge set does not meet the preset visibility conditions, the inkjet printing is determined to be invisible and the image stability value is set to zero.
6. The image recognition-based intelligent monitoring system for inkjet printing and packaging according to claim 2, characterized in that, The position matching module determines the displacement deviation based on the camera observation displacement, the inkjet trigger displacement, and the calibrated distance from the inkjet terminal to the main recognition camera; it determines the allowable displacement deviation based on the pre-calibrated basic allowable error, the filtered conveying speed, the preset reference conveying speed, and the preset speed deviation compensation coefficient; and it determines the position matching value based on the ratio between the displacement deviation and the allowable displacement deviation.
7. The image recognition-based intelligent monitoring system for inkjet printing and packaging according to claim 1, characterized in that, The determination module converts the entrance contour data to the main recognition camera coordinate system according to the cumulative transport displacement, and determines the contour matching value based on the degree of overlap between the entrance contour data and the contour of the package image. The determination module determines a comprehensive determination value based on the content recognition reliability value, contour matching value, position matching value, image stability value, and preset weights, and determines the determination result in combination with the content verification result. The preset weights are non-negative weights and the sum of each weight is 1. The determination module first determines whether the image stability value meets the preset stability condition; if it does not meet the condition, the image is determined to be unacceptable. When the image stability value meets the preset stability conditions, when the comprehensive judgment value reaches the preset passing threshold, the position matching value is greater than zero, and the content verification result is that the inkjet content conforms to the preset format, the recognition is determined to be successful; when the comprehensive judgment value reaches the preset passing threshold, the content verification result is that the inkjet content conforms to the preset format, and the position matching value is zero, a suspected mismatch is determined. When the content verification result is that the inkjet content does not conform to the preset format or the comprehensive judgment value does not reach the preset pass threshold, the inkjet is determined to be abnormal, and the corresponding package is set to the state of pending re-inspection or the state of pending rejection according to the status of the re-inspection channel. For the same identification result, calculate the comprehensive judgment value of the identification result and two adjacent conveying trajectories along the conveying direction. When the difference between the two comprehensive judgment values is less than the preset matching difference threshold, do not establish the association between the identification result and any conveying trajectory, and set the two adjacent conveying trajectories to be re-inspected or to be eliminated.
8. The image recognition-based intelligent monitoring system for inkjet printing and packaging according to claim 6, characterized in that, The rejection control module combines the camera observation displacement with the calibrated distance from the main recognition camera to the rejection mechanism to determine the target rejection displacement; it determines the response compensation distance based on the pre-calibrated response time of the rejection mechanism and the filtered conveying speed; when the cumulative conveying displacement reaches the difference between the target rejection displacement and the response compensation distance, the rejection control module outputs a rejection control signal to the rejection mechanism.
9. The image recognition-based intelligent monitoring system for inkjet printing and packaging according to claim 2, characterized in that, The packaging tracking module updates the delivery trajectory based on the cumulative delivery displacement, and advances the trajectory status based on the displacement triggered by inkjet printing, the recognition result, the judgment result, and the rejection feedback signal. The trajectory status includes pending coding, coded, pending image confirmation, recognition passed, suspected mismatch, image unconfirmable, coding abnormal, pending re-inspection, pending rejection, rejected, completed, and abnormal termination. Among them, packages that have passed recognition and have not been rejected enter the completed state after leaving the monitoring area, and enter the rejected state after the rejection feedback signal is confirmed. The local control storage module is also used to perform cyclic redundancy verification on the saved conveyor trajectory; the system obtains the reference displacement through the conveyor belt drive shaft encoder, which is independent of the conveyor displacement detection module, and compares the reference displacement with the cumulative conveyor displacement to detect slippage of the measuring wheel or loss of encoder pulse signal; When a continuous When at least one of the following preset abnormal events occurs: the image stability value of a package is lower than a preset stability threshold, the main recognition camera loses communication with the local control storage module, the local control storage module loses communication with the preset upper-level production system, adjacent packages cannot be separated, the trajectory buffer capacity is insufficient, or the rejection feedback signal is not confirmed, at least one of the following automatic coding, automatic release, and automatic rejection is suspended, and at least one of the following abnormal bypass collection control signal, mechanical stop control signal, and re-inspection control signal is output: It is a preset positive integer.
