Method, device and equipment for printing and stamping integration, and medium
By acquiring paper image data for positional deviation calculation and recognition, and combining image sensor monitoring of ink drying status and three-dimensional morphology analysis, the problems of inaccurate positioning, undried ink, and insufficient quality inspection in existing printing and stamping equipment have been solved, realizing a high-precision and intelligent printing and stamping process.
Patent Information
- Application Number
- CN202611295266.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-25
- Publication Date
- 2026-11-20
AI Technical Summary
Existing printing and stamping equipment suffers from problems such as insufficient stamping positioning accuracy, inability to intelligently plan the position based on the semantic content of the document, inflexible control of ink drying time, and lack of stamp quality inspection. These issues lead to inaccurate stamping positions, ink not being dry enough causing stamping contamination, and the inclusion of defective documents.
By acquiring image data of the printed paper, calculating the physical positional deviation and identifying the document type, coordinate compensation is performed to achieve high-precision stamping positioning; an image sensor is used to monitor the optical characteristics of the stamp area to dynamically determine the ink drying status; three-dimensional morphology analysis is performed to detect the stamp quality and automatically sort out unqualified documents.
It achieves high-precision intelligent stamping positioning, dynamically adjusts ink drying time, ensures stamp quality, eliminates documents with uneven ink or defects, and improves production efficiency and document quality.
Smart Images

Figure CN123129604A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of office automation technology combined with image processing technology, and in particular to a method, apparatus, equipment and medium for integrated printing and stamping. Background Technology
[0002] With the rapid development of office automation technology, integrated printing, scanning, and stamping equipment has gradually become a key piece of equipment for improving administrative efficiency. In existing technologies, integrated printers, stampers, and scanners mainly connect the printing module, stamping component, and scanning component through a precision mechanical conveyor, realizing a streamlined document processing operation. Early automated stamping equipment mostly used fixed workstations, relying on mechanical positioning accuracy for single-sided stamping. Although some high-end equipment has introduced double-sided stamping functionality, most are still at the stage of simple physical action superposition, lacking intelligent perception and closed-loop feedback mechanisms based on image data.
[0003] Existing printing and stamping technologies still have some limitations. For example, relying solely on mechanical positioning methods cannot eliminate the cumulative errors and random offsets generated during paper feeding, resulting in insufficient stamping position accuracy. Furthermore, existing equipment lacks the ability to recognize the semantic content of documents and cannot intelligently plan the logical area for stamping based on document types such as contracts or invoices. On the other hand, existing technologies mostly adopt fixed-duration delay strategies to wait for the ink to dry, which cannot be dynamically adjusted according to the actual environmental temperature, humidity, and ink condition. This easily leads to stamping contamination due to undried ink or reduced production efficiency due to excessive delays. In addition, existing stamping processes lack automated detection methods for stamp quality, making it impossible to identify unqualified stamps such as those with uneven ink depth or incompleteness. This results in defective documents being mixed into the finished product, seriously affecting the legal validity and aesthetics of the documents. Summary of the Invention
[0004] To overcome the shortcomings of existing technical solutions, embodiments of the present invention provide a method, apparatus, device, and medium for integrated printing and stamping.
[0005] The technical solution adopted by this invention to solve its technical problem is: In a first aspect, the present invention provides a method for integrating printing and stamping, the method comprising: Obtain image data of the printed paper; The physical position deviation of the paper during the conveying process is calculated based on the image data, and the document type and logical stamp position are identified based on the semantic content of the image data. Based on the physical position deviation, coordinate compensation is performed on the logical stamping position to generate target stamping coordinates, and the stamping component is controlled to perform stamping action according to the target stamping coordinates. After stamping, the paper is transported to a temporary holding area, and the optical properties of the stamp area are monitored by an image sensor. The drying status of the stamp ink is dynamically determined based on the changes in the optical properties. When the air-drying state is determined to meet the preset conditions, a quality inspection including three-dimensional morphology analysis is performed on the paper to obtain the quality parameters of the seal. Determine whether the seal is qualified based on the aforementioned quality parameters; If the paper passes the test, it is conveyed to the scanning unit for final scanning, archiving, and paper output; if it fails the test, the sorting device is controlled to divert the paper to the waste paper area.
[0006] Secondly, the present invention provides an integrated printing and stamping processing device, the processing device comprising: The imaging module is used to acquire image data of the printed paper. The calculation module is used to calculate the physical position deviation of the paper during the conveying process based on the image data, and to identify the document type and logical stamp position based on the semantic content of the image data. The coordinate compensation module is used to perform coordinate compensation on the logical stamping position based on the physical position deviation to generate target stamping coordinates, and control the stamping component to perform stamping action according to the target stamping coordinates. The determination module is used to transport the paper to the de-stamping area after the stamping is completed, and monitor the optical characteristics of the stamp area through an image sensor, and dynamically determine the drying state of the stamp ink based on the changes in the optical characteristics. The detection module is used to perform quality inspection on the paper, including three-dimensional morphology analysis, when the air-drying state is determined to meet the preset conditions, so as to obtain the quality parameters of the stamp; determine whether the stamp is qualified according to the quality parameters; if qualified, it is sent to the scanning component for final scanning, archiving and paper output; if unqualified, it controls the sorting device to divert the paper to the waste paper area.
[0007] Thirdly, the present invention also provides a computer device, the computer device including a processor, a network interface, a memory and a communication bus, wherein the processor, the network interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; When a processor executes a program stored in a memory, it implements the steps of the integrated printing and stamping processing method described in any one of the first aspects above.
[0008] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the integrated printing and stamping processing method as described in any one of the first aspects above.
[0009] Compared with the prior art, the beneficial effects of the present invention are: By acquiring image data to calculate physical position deviation and combining semantic content to identify document type and logical stamping position, target stamping coordinates are generated through coordinate compensation, achieving high-precision intelligent positioning. Addressing the issues of delayed stamping or low efficiency caused by fixed-delay drying strategies, this method monitors changes in the optical characteristics of the stamping area using an image sensor to dynamically determine the ink drying state, achieving intelligent flow based on actual drying conditions. To address the problem of defective documents being mixed in due to a lack of quality inspection methods, this method performs three-dimensional morphological analysis to obtain quality parameters such as ink thickness and texture clarity, and automatically sorts out unqualified documents accordingly, effectively eliminating documents with uneven ink or incompleteness. Attached Figure Description
[0010] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0011] Figure 1 This is a flowchart of the steps of the integrated printing and stamping processing method according to an embodiment of the present invention; Figure 2 This is a block diagram of the integrated printing and stamping processing device according to an embodiment of the present invention; Figure 3 This is a schematic block diagram of a computer device according to an embodiment of the present invention. Detailed Implementation
[0012] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. 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.
[0013] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0014] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0015] It should also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0016] To address the technical problems in existing technologies, such as low stamping positioning accuracy, inability to intelligently plan positions based on document semantics, inflexible control of ink drying time, and lack of stamp quality inspection leading to defective products being released, this invention provides an integrated printing and stamping processing method, apparatus, equipment, and medium.
[0017] The following details the specific steps of a printing and stamping integrated processing method provided by an embodiment of the present invention, based on the appendix. Figure 1 As shown, the specific steps of this processing method include the following: In step S110, image data of the printed paper is obtained.
[0018] Specifically, a high-resolution, high-speed linear or area scan camera is employed. A linear scan camera is preferred, with a resolution of at least 300 dpi to ensure clear capture of the edges of printed text and fine positioning marks on the paper. A symmetrical array of high color rendering LEDs is positioned above the image acquisition unit, using diffuse illumination to eliminate glare on the paper surface, ensuring uniform grayscale in the acquired image data and accurately reflecting the variations in ink density. Furthermore, a photoelectric sensor or encoder is installed at the entrance of the image acquisition station to detect the paper's entry position and movement speed in real time.
[0019] When the leading edge of the paper reaches the preset shooting start line, an interrupt signal is sent to the main controller. Upon receiving the signal, the main controller immediately and synchronously starts the image acquisition unit, adjusting the camera's line frequency or exposure time according to the real-time speed of the conveyor belt to ensure strict synchronization between image acquisition and paper movement, preventing image stretching or compression distortion. Throughout the paper's passage through the image acquisition unit's field of view, the line scan camera scans the paper line by line, while the illumination system continuously provides a stable light source. The line scan camera converts the received reflected light signals into electrical signals, which are then converted into digital pixel signals by an internal converter. These digital pixel signals are transmitted in real-time to the image processing card or processor. The processor stitches and reassembles the received line-by-line pixel data according to the scanning order, forming a complete original bitmap image containing the entire paper. This image data includes not only the text, charts, and other visible content printed on the paper.
[0020] In step S120, the physical position deviation of the paper during the conveying process is calculated based on the image data, and the document type and logical stamp position are identified based on the semantic content of the image data.
[0021] Specifically, an edge detection algorithm is used to search for the physical boundaries of the paper in the preprocessed image, that is, to scan along the row and column directions of the image, accurately locking the edge pixel coordinates of the left, right, top, and bottom edges of the paper. Since the operating system has the theoretical centerline coordinates of the conveyor belt built in, the actual geometric centerline coordinates of the paper are obtained by calculating the average of the pixel coordinates of the left and right edges of the paper. The actual geometric centerline coordinates are compared with the theoretical centerline coordinates to obtain the lateral translation deviation. At the same time, the rotation angle deviation of the paper is calculated by comparing the angle between the line connecting the top edge pixels of the paper and the horizontal line. If there is an error in the longitudinal conveying distance, the longitudinal translation deviation is also calculated.
[0022] Document type recognition and logical stamping location determination based on image content: Specifically, an optical character recognition (OCR) engine can be used to scan and recognize text areas in an image to extract text information and its position coordinates within the image. The OCR engine converts the pixel matrix in the image into a computer-readable text string; subsequently, the extracted text string is matched against a pre-defined document type feature library. For example, if keywords such as "invoice code" or "invoice date" are identified in the text, the document type is determined to be "invoice"; if terms such as "Party A," "Party B," or "liability for breach of contract" are identified, the document type is determined to be a contract. Finally, based on the determined document type, the corresponding stamping rule algorithm is invoked. This algorithm is specifically based on typesetting rules and official document processing standards to find the optimal stamping area within the document's logical structure. For example, for a contract, the algorithm can search the signature area at the end of the document, using its center point or a specific signature area as the logical stamping location; for an invoice, the invoice stamp area is locked as the logical stamping location. This logical location is based on the relative coordinates of the document content.
[0023] It should be noted that before the actual calculation, the main controller first preprocesses the acquired raw image data, including image denoising, grayscale conversion, and binarization.
[0024] In step S130, coordinate compensation is performed on the logical stamp position based on the physical position deviation to generate target stamp coordinates, and the stamping component is controlled to perform the stamping action according to the target stamp coordinates.
[0025] Specifically, two coordinate systems are first established: 1. a document standard coordinate system; and 2. a machine coordinate system. The document standard coordinate system is a two-dimensional plane coordinate system with the geometric center of the printed paper or a corner point, such as the upper left corner, as the origin, and is used to describe the logical stamping position. The machine coordinate system is a coordinate system with the rotation center of the robotic arm in the stamping assembly or the zero point of the two-dimensional moving platform as the origin, and is used to describe the actual position of the stamping head in physical space. The basic mapping relationship between the two coordinate systems is obtained through calibration.
[0026] Then, the main controller receives the logical stamp position (which can be denoted as P) output from the preceding steps. logic The calculation involves adjusting the physical position deviations (including translational deviations Δx, Δy, and rotational angular deviations θ) and performing compensation operations. Specifically, first, the rotational deviation generated during paper transport is considered. The rotation matrix R(θ) is used to adjust the logical stamp position P. logic A rotational transformation is performed to simulate the ideal landing position of the paper after it tilts; the calculation formula is P. rotated =R(θ)×P logic .
[0027] Next, based on the calculated translational deviation, the coordinates after rotational transformation are corrected for displacement to compensate for the error caused by the paper deviating from the conveyor center. The calculation formula is P. compensated =P rotated +(Δx,Δy).
[0028] Finally, the document coordinate system coordinates P after deviation compensation are... compensated Based on the preset basic mapping relationship, the coordinates are transformed into the mechanical coordinate system to generate the final target stamp coordinates.
[0029] After generating the target stamp coordinates, path interpolation is performed between the current mechanical position coordinates and the target stamp coordinates to generate a smooth motion trajectory, preventing mechanical impact. The driver then moves the stamp head or the platform carrying the paper.
[0030] In step S140, after stamping is completed, the paper is transported to the deferred area, and the optical characteristics of the stamp area are monitored by an image sensor. The drying state of the stamp ink is dynamically determined based on the changes in the optical characteristics.
[0031] Specifically, a deceleration area is located downstream of the stamping assembly. This deceleration area consists of a controllable start-stop conveyor belt or a stationary paper receiving platform. Directly above the deceleration area, an image sensor and a specific auxiliary lighting source are positioned. To highlight the changes in the optical properties of the ink, the auxiliary lighting source is preferably a directional light source, whose incident angle can create a strong specular reflection on the undried ink surface. After the stamping action is completed, the conveying mechanism quickly and smoothly transports the paper to the deceleration area and then stops, bringing the paper to a standstill. Subsequently, the target stamping coordinates generated in the previous steps are retrieved, and the corresponding area, i.e., the Region of Interest (ROI), is mapped into the field of view of the image sensor. This ROI is the precise area where the stamp is located. Only the image data within this area is processed to improve processing speed and eliminate background interference.
[0032] While the paper is stationary, the image sensor continuously or periodically acquires images of the corresponding Region of Interest (ROI) mapped in the sensor's field of view according to a preset sampling frequency. Since the ink that has just been applied is liquid and has a smooth, mirror-like surface, directional light will undergo specular reflection on the surface of the liquid ink and directly enter the lens, causing the ROI to exhibit extremely high brightness or grayscale values in the image. As time goes on, the ink gradually penetrates into the paper fibers and evaporates the solvent, and the surface changes from a smooth liquid to a rough solid. At this time, the directional light becomes diffuse reflection, and the light intensity entering the lens is greatly reduced, resulting in a decrease in the brightness of the ROI.
[0033] The algorithm calculates the average grayscale value or the proportion of highlighted pixels in the Region of Interest (ROI) of the current frame image in real time, and records the curve showing the change of the average grayscale value or the proportion of highlighted pixels over time. During the ink drying process, this curve shows a clear monotonous decrease, as there is a preset drying threshold corresponding to the drying completion state. When the calculated average grayscale value drops below the drying threshold, or when the slope of the curve approaches zero and remains below the threshold, the algorithm determines that the ink drying state has reached the preset condition, that is, it is considered that the stamp no longer has stickiness and there will be no stamping phenomenon.
[0034] Therefore, the above steps enable visual monitoring of the seal drying process. Compared with the traditional timed waiting, it can automatically adjust the waiting time according to the actual differences in ambient temperature, humidity and ink usage: it can quickly release the seal in a dry environment to improve production efficiency; and it can automatically extend the time in a humid environment to ensure document quality.
[0035] It should be noted that the grayscale difference between the current frame image and the initial frame image after stamping in the ROI region, or the change in the light intensity ratio between the ROI region and the non-stamped region (such as the background), is determined by relative change rather than absolute grayscale value, thereby improving the anti-interference capability.
[0036] In step S150, when it is determined that the air-drying state has reached the preset conditions, a quality inspection including three-dimensional morphology analysis is performed on the paper to obtain the quality parameters of the seal.
[0037] Specifically, once the monitoring system in the temporary area confirms that the stamp ink has dried to a preset condition, i.e., a non-sticky state, the paper is conveyed to a quality inspection station equipped with a multi-angle light source system. Specifically, by controlling the illumination array to light up in a time-division manner, for example, projecting light onto the stamp area sequentially from different preset angles such as the left, right, and top, an image sensor simultaneously acquires images of the stamp under each beam of light. Then, a photometric stereoscopic vision algorithm can be used to process these multiple images. Based on the reflection characteristics of different light intensities at different orientations of the object's surface, the surface normal direction and relative height information of the pixels in the stamp area are deduced, thereby reconstructing the microscopic three-dimensional morphology of the stamp surface. Based on the reconstructed 3D topographic data, key quality parameters are calculated and extracted, including ink thickness, sharpness / edge sharpness, and texture integrity. Ink thickness specifically calculates the average height of the ink layer relative to the paper surface or the ink accumulation height to determine if the ink volume is sufficient. Sharpness / edge sharpness specifically analyzes the height gradient of the pixels at the edge of the stamp; a larger gradient indicates a sharper edge, used to determine if blurring or ghosting has occurred. Texture integrity specifically compares the reconstructed 3D texture features with a preset standard 3D stamp model to calculate the overlap or missing area ratio, used to determine if there are any defects or stains on the stamp.
[0038] It should be noted that at the quality inspection station, it is necessary to control the paper to be in a brief static state or adopt a synchronous triggering mechanism to ensure the geometric consistency of images collected by multi-angle light sources.
[0039] In step S160, it is determined whether the seal is qualified according to the quality parameters.
[0040] Specifically, the obtained quality parameters are compared with a preset qualified threshold range. Specifically, it is judged whether the ink thickness is within a preset ink amount interval; it is judged whether the edge sharpness is greater than the minimum definition threshold Smin; it is judged whether the texture integrity is greater than the minimum integrity percentage Pmin.
[0041] In steps S170 and S180, if the paper is qualified, it is conveyed to the scanning assembly for final scanning archiving and paper sorting output; if the paper is unqualified, the sorting device is controlled to divert the paper to the waste paper area.
[0042] Specifically, if all quality parameters meet the corresponding threshold conditions, the paper is determined to be qualified; if any parameter exceeds the threshold range, for example, too light ink indicates ink shortage, blurred edges indicate seal dragging, and low integrity indicates incompleteness, the paper is determined to be unqualified. According to the determination result, a corresponding status tag, that is, a qualified / unqualified status tag, is added to the data stream of the current paper, and flows along with the paper.
[0043] For the paper determined to be qualified, the conveyor is controlled to maintain operation in the main flow direction to smoothly convey the paper to the final scanning assembly; at this time, the scanning assembly performs high-resolution color scanning on the paper to generate a final image file for electronic archiving, and then the paper is further conveyed to the paper sorting module, where it is neatly stacked by the paper gathering enclosure and the paper pushing device, and finally output to the paper output station.
[0044] For the paper determined to be unqualified, when it is conveyed to a certain sorting process, the main controller triggers the sorting device to act. For example, by flipping to the position of the waste channel, the unqualified paper is separated from the main flow and guided to fall into the waste paper trough or waste paper collection box, and an acousto-optic alarm can be issued at the same time to prompt the operator for manual intervention.
[0045] It can be seen therefrom that the use of three-dimensional topography analysis can capture insufficient ink amount and physical defects that cannot be found by traditional two-dimensional scanning, ensuring the legality and solemnity of archived documents.
[0046] In some specific embodiments, the step is to calculate the physical position deviation of the paper during the conveying process according to the image data, which specifically includes the following steps: The edges of the image data are detected to identify the edge contour and positioning marks of the paper.
[0047] Specifically, the process begins by employing edge detection operators, such as the Canny, Sobel, or Roberts operators, to perform convolution operations on the image. During this process, the grayscale gradient intensity of each pixel in the image is calculated. By identifying local maxima of the gradient magnitude, the set of pixels in the image where grayscale values change drastically is preliminarily determined. Connectivity analysis is then performed on the preliminarily determined edge pixels, connecting discrete edge points into continuous lines, thereby extracting the four edge contours of the paper: the left edge, right edge, top edge, and bottom edge. To improve positioning accuracy, in addition to utilizing the physical edges of the paper, pre-printed positioning marks are searched in specific areas of the image, such as the four corners or header / footer areas. These positioning marks can be solid black rectangles, crosshairs, or QR code corner points. The geometric center pixel coordinates of these positioning marks can be identified using a pattern matching algorithm. The use of positioning marks effectively eliminates edge recognition interference caused by paper cutting errors or curling edges.
[0048] The translational deviation and rotational angle deviation of the current centerline of the paper relative to the theoretical centerline of the conveyor are calculated based on the edge contour and positioning marks.
[0049] Specifically, after identifying the edge contour and positioning marks, the system, in conjunction with the theoretical center line of the conveying equipment, selects a series of sampling point coordinates (x, y, y) on the left edge contour of the paper. L1 ,y),(x L2 The coordinates of the sampling points on the right edge contour (x, y) and (x, y). R1 ,y),(x R2 ,y). Calculate the actual geometric centerline coordinates (X, Y) of the paper in the current image frame. actual The formula can be understood as the average of the coordinates of the left and right edges, used to calculate the translation deviation Δx = X. actual -X center If Δx > 0, it means the paper is shifted to the right; if Δx < 0, it means the paper is shifted to the left.
[0050] The orientation of the paper is determined by extracting the edge contour or positioning marks. Preferably, the system calculates the slope of the upper edge contour of the paper and calculates the rotation angle deviation θ=arctan(k) based on the slope. Alternatively, if positioning marks are used, the system calculates the angle between the line connecting the upper left and upper right corner marks and the horizontal axis of the image as the rotation angle deviation θ. If θ>0, it indicates that the paper is deflected clockwise; if θ<0, it indicates that the paper is deflected counterclockwise.
[0051] Therefore, the above steps can accurately quantify the physical position deviation of the paper into specific translation and angle values. Compared with the existing technology that relies solely on mechanical baffle positioning, this detection method based on image edges and positioning marks can achieve sub-pixel accuracy. Even if there are burrs or damage on the paper edges, the accuracy of deviation calculation can be guaranteed, thus ensuring that subsequent coordinate compensation can completely offset the transport error and achieve high-precision stamp alignment.
[0052] In some specific embodiments, the step involves identifying the document type and logical stamp location based on the semantic content of the image data, specifically including the following steps: Text information is extracted from image data and document types are matched according to preset keyword rules.
[0053] Specifically, text extraction processing is performed on the acquired paper image data. To improve the recognition rate, the image is first converted to grayscale and binarized, and a denoising algorithm is used to remove background interference and enhance the contrast between text and background. The built-in OCR engine performs line-by-line scanning and feature matching. The OCR engine converts the pixel matrix in the image into a computer-readable text string and outputs the position coordinates of each character or text line in the image. The recognized text content is associated with its corresponding coordinate positions to form a structured text data list containing all readable text on the page and its spatial distribution information. After obtaining the structured text data, semantic analysis is performed to identify the document type. Specifically, a pre-stored keyword rule base is loaded, which stores characteristic keyword combinations for different document types. For example, keywords for invoice documents might include invoice code, invoice date, or total price including tax; keywords for contract documents might include Party A, Party B, or signing date; and keywords for official documents might include document number or issuer. The string search algorithm searches for keywords defined in the rule base in the text information extracted by the OCR engine. If a specific high-frequency keyword combination is detected, such as the simultaneous appearance of invoice code and total price and tax, the document type of the current paper is determined according to the preset weighted score or logical judgment logic, such as determining it to be a value-added tax invoice.
[0054] Based on the document type obtained after matching, the corresponding logical stamping rule is invoked to determine the logical stamping position in the document's standard coordinate system.
[0055] Specifically, once the document type is successfully identified, the corresponding logical stamping rule is invoked to calculate the stamping position. Different document types correspond to different stamping logics; for example, contract rules might specify the stamping position should be at the signature area; certificate rules might specify the stamping position should be at the lower right corner of the photo or directly below the title of the main text. Based on the invoked rule, specific anchor text is searched within the text data extracted by OCR. For instance, for a contract, the rule specifies finding the signature of the legal representative or the company seal, locating the coordinates of the anchor text, and calculating the logical stamping position based on the logical offset set by the rule, such as below the center of the anchor or right-aligned with the anchor. As another example, for an invoice, the rule might specify the stamping position as a fixed logical box within the invoice copy area; in this case, the preset coordinate range of that area in the document's standard coordinate system is directly invoked.
[0056] Ultimately, the calculated logical stamp position is based on the document itself, for example, 150mm horizontally and 250mm vertically from the top left corner of the document. This coordinate is independent of the physical position of the paper on the conveyor belt.
[0057] In this way, a transformation from mechanical fixed stamping to content-aware intelligent stamping has been achieved. It can automatically find the most suitable stamping position according to the official document specifications or business logic, improving the compliance, accuracy and intelligence level of stamping, and adapting to the needs of automated processing of various types and complex document formats.
[0058] In some specific embodiments, the step involves performing coordinate compensation on the logical stamp position based on physical position deviation to generate target stamp coordinates, specifically including the following steps: Establish a mapping relationship between the document standard coordinate system and the stamp driver coordinate system; wherein, the stamp driver is connected to the stamp component drive.
[0059] Specifically, before or during the initialization phase of the actual stamping operation, a geometric connection needs to be established between two key coordinate systems: the document standard coordinate system and the stamping driver coordinate system. The document standard coordinate system, based on the geometric characteristics of the printed paper, can be understood as a logical plane with its origin at, for example, the upper left corner or the center point. The logical stamping position determined in previous steps is defined within this coordinate system. The stamping driver coordinate system is based on the mechanical origin of the driver that controls the movement of the stamping assembly. Through a pre-calibration procedure, the physical coordinates of the document standard coordinate system origin in the stamping driver coordinate system are determined when the paper is ideally positioned (without deviation) at the center of the conveyor belt. Simultaneously, the scaling factor between pixel distance and mechanical movement distance is calculated based on the printing resolution, thereby establishing a static scaling and translation mapping relationship between the two coordinate systems.
[0060] Using an affine transformation matrix that includes translational and rotational angle deviations, the logical stamp coordinates are mapped to the stamp driver coordinate system, and compensation values are superimposed to generate the target stamp coordinates.
[0061] Specifically, after obtaining the current physical position deviation of the paper, a dynamic affine transformation matrix needs to be constructed. This affine transformation matrix is a 3×3 matrix containing rotational and translational components; where the rotational component is determined by the rotational angle deviation θ, representing the degree of deflection of the paper on the transport plane; the translational components are determined by the translational deviations Δx and Δy, representing the offset distance of the paper relative to the theoretical centerline. This affine transformation matrix accurately describes the geometric transformation relationship between the paper's current actual posture and its ideal standard posture, i.e., how much the paper is skewed and how much it has deviated.
[0062] Using the established mapping relationship and affine transformation matrix, the final coordinate synthesis operation is performed. Specifically, the logical stamp position (Px, Py) in the document standard coordinate system is initially converted into the basic mechanical coordinates in the stamp driver coordinate system based on the static mapping relationship. The basic mechanical coordinates are multiplied with the affine transformation matrix. During the operation, the rotation component in the matrix rotates the coordinates to simulate correcting paper skew; the translation component in the matrix displaces the coordinates to simulate correcting paper deviation. This process applies a transformation amount equal in magnitude and opposite in direction to the paper deviation to the logical stamp position.
[0063] After the above matrix transformation and compensation value superposition, the final target stamp coordinates are obtained. These target stamp coordinates represent the physical space point that the stamp driver needs to actually move to in order for the stamp to be accurately stamped on the logical position of the paper that is skewed or misaligned.
[0064] The above steps achieve high-precision positioning control. The static mapping relationship ensures the basic correspondence between the document content and the mechanical movement, while the dynamic affine transformation matrix eliminates random errors in the paper feeding process in real time. The driver drives the stamping component to move according to the final generated target stamping coordinates, so that no matter how the paper is fed, the stamp can be accurately placed in the predetermined position, improving the finished product qualification rate of automated stamping.
[0065] In a further embodiment, the step of establishing a mapping relationship between the document standard coordinate system and the stamp driver coordinate system specifically includes the following steps: Obtain the paper containing positioning markers with multiple coordinates.
[0066] Specifically, a dedicated calibration paper, or calibration board, is prepared, with several high-contrast positioning markers pre-printed at specific locations on the paper. These positioning markers can be a circular array, checkerboard corner points, or specific coded points. The positions of these markers in physical space are precisely measured; that is, in the document's standard coordinate system, their theoretical coordinates (Xw, Yw) in the paper's own physical plane coordinate system are known. Furthermore, these positioning markers are distributed throughout the effective printing area and its perimeter, with at least four markers in total, to provide sufficient constraints for subsequent matrix calculations.
[0067] The scanning component is controlled to acquire images of the paper and to identify the pixel coordinates of the positioning markers in the image coordinate system.
[0068] Specifically, the main controller controls the conveying mechanism to transport the calibration paper to the center of the scanning component's field of view and starts the scanning component to acquire images. Specifically, the scanning component takes a picture of the calibration paper to generate a digital image containing all the positioning markers. This digital image is based on an image coordinate system, and its coordinate unit is pixels. Then, an image processing algorithm is run to automatically identify the imaging position of each positioning marker in the image. Then, the pixel coordinates (u,v) of the center of each marker in the image are calculated, thereby obtaining a set of observation data points mapped from physical space to image space.
[0069] The homography matrix between the document standard coordinate system and the stamp driver coordinate system is calculated based on the coordinates of the positioning markers and pixel coordinates, and serves as the mapping relationship.
[0070] Specifically, the homography matrix between the document standard coordinate system and the stamp driver coordinate system is calculated based on the coordinates of the positioning marker points and pixel coordinates. Using the two sets of coordinate data obtained above (known physical coordinates and observed pixel coordinates), the transformation relationship between the two coordinate systems is solved. Specifically, considering that perspective distortion inevitably occurs during the imaging process of the camera lens, and that conventional linear transformations are difficult to achieve high-precision positioning requirements, a homography transformation model is selected for geometric correction. A system of linear equations is constructed based on the correspondence between the document standard coordinate points (Xw, Yw) and the image pixel coordinate points (u, v). This system of linear equations is used to accurately define the perspective mapping mechanism between the two coordinate systems. Since the number of positioning markers is usually more than 4 (i.e., the equation system is overdetermined), the system uses the least squares method or a similar optimization algorithm to minimize the error, thereby solving for the optimal 3×3 homography matrix. In this architecture, there is a fixed intrinsic transformation relationship between the image coordinate system and the stamp driver coordinate system, which can be predetermined through hand-eye calibration. Therefore, once the homography matrix H from the document standard coordinate system to the image coordinate system is obtained, the final transformation matrix that directly maps the document standard coordinate system to the stamp driver coordinate system can be derived by combining the hand-eye calibration parameters. The final transformation matrix is stored by the system and used as the mapping relationship for finding the target stamp coordinates in subsequent real-time operations.
[0071] It should be noted that, in this embodiment of the invention, the homography matrix from document to image needs to be calculated first, and then combined with the pre-calibrated transformation relationship from image coordinate system to stamp driver coordinate system to finally synthesize the mapping relationship from document to driver.
[0072] This step not only handles translation and rotation, but also effectively corrects non-linear perspective errors caused by camera lens distortion or slight paper warping. It ensures that no matter what form the document content takes in the image, it can be accurately converted into motion commands for the mechanical actuator, fundamentally guaranteeing the geometric accuracy of the stamp position.
[0073] In a further embodiment, the step involves using an affine transformation matrix containing translational and rotational angle deviations to map the logical stamp coordinates to the stamp driver coordinate system, and then superimposing compensation values to generate the target stamp coordinates. Specifically, this includes the following steps: Establish the current paper coordinate system with the center of the paper as the origin. The affine transformation matrix includes a rotation matrix and a translation vector. The rotation matrix is a two-dimensional rotation matrix constructed based on the rotation angle deviation, and the translation vector is a displacement vector constructed based on the translation deviation.
[0074] Specifically, in order to describe the actual pose of the paper on the conveyor plane, a dynamic current paper coordinate system is first constructed. Specifically, based on the physical position deviation calculated in the previous step, the position of the current geometric center point of the paper on the conveyor belt is determined, and this point is set as the origin (0,0) of the current paper coordinate system. The X-axis of the current paper coordinate system is defined by the conveying direction of the paper or the long side direction of the paper, and the Y-axis is defined by the direction perpendicular to the conveying direction or the short side direction of the paper. This step is to convert the pixel deviation in the image space into rigid body motion parameters in the geometric space.
[0075] Based on the detected deviation parameters, an affine transformation matrix is constructed to correct the pose. This affine transformation matrix is a linear transformation matrix that can simultaneously describe translational and rotational motions, and its form can be referenced as follows: ; The top-left 2×2 submatrix of this matrix forms a rotation matrix. Using the previously calculated rotation angle deviation θ, the values of cosθ and sinθ are calculated respectively. This rotation matrix represents the reverse rotation operation required for the logical coordinates to compensate for paper skew. The elements in the first two rows of the third column of the matrix form the translation vector [Δx, Δy]. T The vector is filled with the translation deviation calculated above. This translation vector represents the reverse displacement operation required by the logical coordinates to counteract paper misalignment.
[0076] Multiply the coordinate vectors of the logical stamp coordinates in the document's standard coordinate system with the affine transformation matrix to obtain the compensated intermediate pose.
[0077] Specifically, the pre-defined logical stamp coordinates are spatially transformed using a constructed affine transformation matrix; specifically, the logical stamp position P in the document's standard coordinate system is transformed. logic (xl, yl) is converted to a vector V in homogeneous coordinate form. logic =[xl,yl,1]T. The main controller performs vector and matrix multiplication operations as V. interim =M×V logic .
[0078] The above calculation maps the logical stamp position from the ideal document standard coordinate system to the current, biased paper coordinate system. The calculation result V interim This is the intermediate compensation pose, used to represent the theoretical relative position that the stamp head should reach relative to the center of the paper after taking into account the current rotation and deviation of the paper.
[0079] The intermediate compensated pose is added to the zero-point offset of the stamping driver to generate the target stamping coordinates.
[0080] Specifically, the intermediate compensation pose is a relative coordinate with respect to the center of the paper. To drive the mechanical device, it must be converted to absolute coordinates. Specifically, the zero-point offset stored in the register is read. This zero-point offset is the fixed distance difference between the mechanical origin of the stamping actuator, such as a robotic arm or XY-axis slide, and the reference point at the center of the conveyor belt. Specifically, it is a constant vector P calibrated and determined during equipment assembly and debugging. offset (X0, Y0). The intermediate compensated pose and the zero-point offset are vector-added to obtain P. target =P interim +P offset Finally, the calculated P target (Xm,Ym) is the final target stamping coordinate. The main controller sends the target stamping coordinate value to the servo driver to control the stamping component to move accurately to the absolute coordinate point to perform the pressing action.
[0081] In a further embodiment, after generating the target stamp coordinates, the step further includes the following steps: The cumulative positional error data of multiple consecutive sheets of paper generated during the historical stamping process is obtained; the cumulative positional error data is processed using the Kalman filter algorithm to predict the current trend positional deviation of the paper; the predicted trend positional deviation is used to perform a secondary correction on the translation vector in the affine transformation matrix to eliminate the periodic error of the conveyor belt mechanical transmission.
[0082] Specifically, during the continuous operation of this equipment, a dynamically updated error data queue is constructed and maintained. Each time a sheet of paper is processed, the actual physical position deviation detected during the paper's transport (i.e., the translational deviation Δx, Δy and rotational angle deviation θ calculated in the previous steps) is stored in the memory as a set of sample data in chronological order. This maintains the recording of error data for multiple sheets of paper processed recently, such as the last 20 sheets, forming a time series of cumulative position error data.
[0083] The Kalman filter algorithm is used to recursively process the accumulated position error data to predict the potential trend deviation of the current paper. Specifically, a state vector containing position and velocity deviations is established, and the system's state and observation equations are constructed. Based on the error states of the previous k-1 sheets, the Kalman filter predicts the state of the k-th sheet, i.e., the current sheet. Subsequently, after the image data of the k-th sheet is acquired and the preliminary measured deviation is calculated, the filter uses this measured value to correct the predicted value, thus obtaining an optimally estimated current deviation value. Because the Kalman filter can effectively filter out random high-frequency noise, such as random jitter caused by minor unevenness on the paper surface, its output better reflects the low-frequency trend and periodicity of the conveyor belt's mechanical transmission, allowing the extraction of the position component from the filter output as the current trend position deviation of the paper.
[0084] The predicted trend positional deviation, for example, is denoted as δx. trend ,δy trend As a compensation term, it is superimposed on the translation vector of the affine transformation matrix. The translation vector before correction is T=[Δx,Δy]T, which is based only on static detection of the current image; the corrected translation vector becomes T′=[Δx+δx]T. trend ,Δy+δy trend ]T.
[0085] Using the updated affine transformation matrix containing the corrected translation vector T′, the logical stamp coordinates are re-mapped and calculated. Since the mechanical transmission error of the conveyor belt often has lag or periodicity, simple real-time image detection may not be able to completely eliminate this trend of offset. Therefore, historical prediction compensation is introduced to predict and compensate for mechanical errors in advance.
[0086] In some specific embodiments, the step involves performing a quality inspection on the paper, including three-dimensional morphology analysis, to obtain the quality parameters of the seal, specifically including the following steps: Control multiple light sources to project light onto the seal area and acquire seal images under different lighting conditions. Specifically, to obtain depth information of the stamp surface, image data containing surface normal information needs to be acquired. Specifically, at the quality inspection station, an image sensor and an illumination array consisting of multiple independently controllable light sources are required. This light source array surrounds the camera lens or is distributed according to a specific geometric angle. The main controller sequentially controls the different light sources in the illumination array to illuminate at different times according to a preset timing sequence. For each illuminated light source direction, the image sensor synchronously acquires an image of the stamp area. For example, an image is acquired when the left light source is illuminated, when the top light source is illuminated, and when the right light source is illuminated. This yields a sequence of stamp images at the same location but under different lighting conditions. Because the ink surface has uneven micro-textures, different angles of light will produce different shadows and highlights on these textures, thus reflecting the surface slope information.
[0087] The seal image is processed using photometric stereo vision algorithm or structured light vision algorithm to reconstruct the three-dimensional shape of the seal surface.
[0088] Specifically, the collected multi-angle image sequence is used, and a 3D reconstruction algorithm is run to recover the three-dimensional shape of the seal. For example, a photometric stereo vision algorithm is used. This algorithm is based on the Lambertian reflection model, which assumes that the reflectivity of a point on the object's surface is fixed, and its image grayscale depends only on the angle between the surface normal vector and the light source direction. Based on the known light source direction vector and the grayscale values of the corresponding pixels in the image sequence, a system of equations about the surface normal vector is solved. By calculating the normal vector (nx, ny, nz) of each pixel and integrating the normal vector field, a 3D depth map or point cloud data of the seal surface relative to the paper plane can be reconstructed.
[0089] Alternatively, a structured light vision algorithm or a specific structured light pattern can be projected onto the stamp surface, such as using sinusoidal stripes or coded gratings. A camera can capture the phase shift or deformation of the pattern on the ink surface, and the depth coordinate Z of each pixel can be directly calculated using the triangulation principle to obtain the three-dimensional shape.
[0090] The above steps generate a digital elevation model of the stamp area, which visually displays the height and coverage of ink accumulation on the paper.
[0091] The thickness distribution, texture clarity, and edge integrity of the stamp ink are calculated based on the three-dimensional morphology and used as quality parameters.
[0092] Specifically, for the calculation of thickness distribution, by traversing the three-dimensional topography data, the difference ΔZ=Z-Z0 between the height value Z of all pixels in the stamp coverage area and the height value Z0 of the paper reference plane is calculated. This difference represents the ink thickness. Then, the average, maximum and variance of the thickness are statistically analyzed to generate a thickness distribution map. If the average thickness is too low, it indicates insufficient ink volume; if the variance is too large, it indicates uneven ink coverage.
[0093] For texture clarity calculation, the gradient change at the interface between ink and paper in the three-dimensional morphology is analyzed, and the gradient amplitude of the height map in the spatial domain is calculated. The larger the gradient amplitude and the more concentrated the change, the steeper the edge and the higher the texture clarity. If the gradient change is gentle, it means that the ink has penetrated, diffused or tailed, and the clarity does not meet the standard.
[0094] For edge integrity calculation, the edge closure rate of the reconstructed three-dimensional shape is calculated based on the preset standard three-dimensional model of the seal. By comparing the degree of overlap between the actual edge point cloud and the theoretical edge contour, the arc length ratio of the missing part is calculated to obtain the edge integrity. If there are breakpoints or the missing area exceeds the threshold, the seal is determined to be incomplete.
[0095] Through the above steps, not only can insufficient ink volume and slight blurring that are difficult to detect with the human eye be discovered, but stains can also be effectively distinguished from real seals. Based on the thickness, clarity and integrity parameters extracted from the three-dimensional morphology, objective and quantifiable evaluation criteria for seal quality are provided.
[0096] The present invention also provides a printing and stamping integrated processing device 100, which is a main controller disposed in the printing and stamping device, and is used to execute any embodiment of the aforementioned printing and stamping integrated processing method.
[0097] Specifically, the following describes in detail the specific structure of the integrated printing and stamping processing device 100 provided in the embodiments of the present invention, according to the appendix. Figure 2 As shown, the specific structure of the integrated printing and stamping processing device 100 includes the following: The imaging module 110 is used to acquire image data of the printed paper; The calculation module 120 is used to calculate the physical position deviation of the paper during the conveying process based on the image data, and to identify the document type and logical stamp position based on the semantic content of the image data. The coordinate compensation module 130 is used to perform coordinate compensation on the logical stamping position based on the physical position deviation to generate target stamping coordinates, and control the stamping component to perform stamping action according to the target stamping coordinates. The determination module 140 is used to transport the paper to the temporary area after the stamping is completed, and monitor the optical characteristics of the stamp area through an image sensor, and dynamically determine the drying state of the stamp ink based on the changes in the optical characteristics. The detection module 150 is used to perform quality detection, including three-dimensional morphology analysis, on the paper when the air-drying state is determined to meet the preset conditions, so as to obtain the quality parameters of the stamp; determine whether the stamp is qualified according to the quality parameters; if qualified, it is sent to the scanning component for final scanning, archiving and paper output; if unqualified, it controls the sorting device to divert the paper to the waste paper area.
[0098] The present invention further provides a computer device, which can be used to perform the integrated printing and stamping processing method in any of the above embodiments.
[0099] See Figure 3 The computer device 500 includes a processor 502, a memory, and a network interface 505 connected via a communication bus 501. The memory may include a storage medium 503 and internal memory 504.
[0100] The storage medium 503 may store an operating system 5031 and a computer program 5032. When the computer program 5032 is executed, it enables the processor 502 to perform an integrated printing and stamping processing method. The storage medium 503 may be a volatile storage medium or a non-volatile storage medium.
[0101] The processor 502 provides computing and control capabilities to support the operation of the entire computer device 500.
[0102] The internal memory 504 provides an environment for the operation of the computer program 5032 in the storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can perform the integrated printing and stamping processing method.
[0103] This network interface 505 is used for network communication, such as providing data transmission. Those skilled in the art will understand that... Figure 3 The structure shown is merely a block diagram of a portion of the structure related to the present invention and does not constitute a limitation on the computer device 500 to which the present invention is applied. The specific computer device 500 may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.
[0104] The processor 502 is used to run the computer program 5032 stored in the memory to implement the corresponding functions in the above-mentioned integrated printing and stamping processing method.
[0105] Those skilled in the art will understand that Figure 3 The embodiments of the computer device shown do not constitute a limitation on the specific configuration of the computer device. In other embodiments, the computer device may include more or fewer components than illustrated, or combine certain components, or have different component arrangements. For example, in some embodiments, the computer device may include only memory and a processor. In such embodiments, the structure and function of the memory and processor are different from those shown. Figure 3 The embodiments shown are consistent and will not be repeated here.
[0106] It should be understood that, in this embodiment of the invention, the processor 502 may be a Central Processing Unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0107] In another embodiment of the invention, a computer-readable storage medium is provided. This computer-readable storage medium may be volatile or non-volatile. The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps included in the above-described integrated printing and stamping processing method.
[0108] Those skilled in the art will readily understand that, for the sake of convenience and brevity, the specific working processes of the devices, apparatuses, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this invention.
[0109] In the embodiments provided by this invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Units with the same function may be grouped into one unit. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices, or units, or it may be an electrical, mechanical, or other form of connection.
[0110] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of the embodiments of the present invention, depending on actual needs.
[0111] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0112] The integrated units described above can be implemented in either hardware or software functional units.
[0113] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a computer-readable storage medium and includes several instructions to cause a computer device (which may be a personal computer, a data transmitter, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned computer-readable storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), magnetic disks, or optical disks.
[0114] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for integrating printing and stamping, characterized in that, The processing method includes: Obtain image data of the printed paper; The physical position deviation of the paper during the conveying process is calculated based on the image data, and the document type and logical stamp position are identified based on the semantic content of the image data. Based on the physical position deviation, coordinate compensation is performed on the logical stamping position to generate target stamping coordinates, and the stamping component is controlled to perform stamping action according to the target stamping coordinates. After stamping, the paper is transported to a temporary holding area, and the optical properties of the stamp area are monitored by an image sensor. The drying status of the stamp ink is dynamically determined based on the changes in the optical properties. When the air-drying state is determined to meet the preset conditions, a quality inspection including three-dimensional morphology analysis is performed on the paper to obtain the quality parameters of the seal. Determine whether the seal is qualified based on the aforementioned quality parameters; If the paper passes the test, it is conveyed to the scanning unit for final scanning, archiving, and paper output; if it fails the test, the sorting device is controlled to divert the paper to the waste paper area.
2. The integrated printing and stamping processing method according to claim 1, characterized in that, The step of calculating the physical positional deviation of the paper during the conveying process based on the image data includes: Edges of the image data are detected to identify the edge contours and positioning marks of the paper. The translational deviation and rotational angle deviation of the current centerline of the paper relative to the theoretical centerline of the conveyor are calculated based on the edge contour and positioning marks.
3. The integrated printing and stamping processing method according to claim 1, characterized in that, The step of identifying document type and logical stamp location based on the semantic content of the image data includes: Text information is extracted from the image data, and document types are matched according to preset keyword rules; Based on the document type obtained after matching, the corresponding logical stamping rule is invoked to determine the logical stamping position in the document's standard coordinate system.
4. The integrated printing and stamping processing method according to claim 1, characterized in that, The step of performing coordinate compensation on the logical stamp position based on the physical position deviation to generate target stamp coordinates includes: Establish a mapping relationship between the document standard coordinate system and the stamp driver coordinate system; wherein the stamp driver is driven and connected to the stamp component. Using an affine transformation matrix that includes translational and rotational angle deviations, the logical stamp coordinates are mapped to the stamp driver coordinate system, and compensation values are superimposed to generate the target stamp coordinates.
5. The integrated printing and stamping processing method according to claim 4, characterized in that, The process of establishing the mapping relationship between the document standard coordinate system and the stamp driver coordinate system includes: Obtain a piece of paper containing positioning markers with multiple coordinates; The scanning component is controlled to acquire an image of the paper and to identify the pixel coordinates of the positioning marker points in the image coordinate system; The homography matrix between the document standard coordinate system and the stamp driver coordinate system is calculated based on the coordinates of the positioning markers and pixel coordinates, and serves as the mapping relationship.
6. The integrated printing and stamping processing method according to claim 4, characterized in that, The step of mapping the logical stamp coordinates to the stamp driver coordinate system using an affine transformation matrix that includes translational and rotational angle deviations, and then superimposing compensation values to generate the target stamp coordinates, includes: Establish a current paper coordinate system with the center of the paper as the origin. The affine transformation matrix includes a rotation matrix and a translation vector. The rotation matrix is a two-dimensional rotation matrix constructed based on the rotation angle deviation, and the translation vector is a displacement vector constructed based on the translation deviation. Multiply the coordinate vector of the logical stamp coordinates in the document standard coordinate system with the affine transformation matrix to obtain the compensated intermediate pose. The intermediate compensated pose is added to the zero-point offset of the stamping driver to generate the target stamping coordinates.
7. The integrated printing and stamping processing method according to claim 1, characterized in that, The quality inspection performed on the paper, including three-dimensional morphology analysis, to obtain the quality parameters of the seal includes: Control multiple light sources to project light onto the seal area and collect seal images under different lighting conditions; The seal image is processed using photometric stereo vision algorithm or structured light vision algorithm to reconstruct the three-dimensional morphology of the seal surface. The thickness distribution, texture clarity, and edge integrity of the stamp ink are calculated based on the three-dimensional morphology and used as the quality parameters.
8. A processing device integrating printing and stamping, characterized in that, The processing device includes: The imaging module is used to acquire image data of the printed paper. The calculation module is used to calculate the physical position deviation of the paper during the conveying process based on the image data, and to identify the document type and logical stamp position based on the semantic content of the image data. The coordinate compensation module is used to perform coordinate compensation on the logical stamping position based on the physical position deviation to generate target stamping coordinates, and control the stamping component to perform stamping action according to the target stamping coordinates. The determination module is used to transport the paper to the de-stamping area after the stamping is completed, and monitor the optical characteristics of the stamp area through an image sensor, and dynamically determine the drying state of the stamp ink based on the changes in the optical characteristics. The detection module is used to perform quality inspection on the paper, including three-dimensional morphology analysis, when the air-drying state is determined to meet the preset conditions, so as to obtain the quality parameters of the stamp; determine whether the stamp is qualified according to the quality parameters; if qualified, it is sent to the scanning component for final scanning, archiving and paper output; if unqualified, it controls the sorting device to divert the paper to the waste paper area.
9. A computer device, characterized in that, The computer device includes a processor, a network interface, a memory, and a communication bus, wherein the processor, network interface, and memory communicate with each other through the communication bus; Memory, used to store computer programs; When a processor executes a program stored in a memory, it implements the steps of the integrated printing and stamping processing method according to any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the integrated printing and stamping processing method as described in any one of claims 1-7.
