An auxiliary positioning method of an intelligent seal

By extracting and mapping feature points from paper image sequences and rendering virtual seal circles in real time, the problems of low accuracy and low efficiency in existing intelligent seal positioning are solved, achieving precise alignment and efficient operation.

CN122510344APending Publication Date: 2026-08-04ZHEJIANG FENCE NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHEJIANG FENCE NETWORK TECH CO LTD
Filing Date
2026-05-09
Publication Date
2026-08-04

AI Technical Summary

Technical Problem

In existing intelligent stamp positioning technologies, operators need to rely on experience or external tools for estimation, resulting in low positioning accuracy and efficiency, and making it impossible to observe the precise landing position of the stamp relative to the paper in real time.

Method used

By extracting and tracking feature points from the paper image sequence, a mapping relationship between the image plane and the coordinate system of the seal landing point is established, and a virtual seal circle is rendered on the screen in real time, providing precise guidance on the seal landing point position.

Benefits of technology

It enables operators to accurately align without prior experience or cognitive shifts, eliminating information blind spots, improving positioning efficiency, and lowering the operational threshold.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122510344A_ABST
    Figure CN122510344A_ABST
Patent Text Reader

Abstract

This invention relates to an auxiliary positioning method for a smart seal. The method includes: extracting and tracking feature points from a sequence of paper images acquired before the seal is pressed down, generating a stable tracking feature point set; establishing an initial mapping relationship between the image plane and the seal landing point coordinate system based on the feature point set and the spatial geometric relationship between the camera and the seal, generating a static virtual marker position; monitoring the pressing displacement during the pressing process and combining it with the feature point displacement changes to construct a motion state vector containing the real-time distance of the seal, the pressing speed, and the overall offset of the feature points; recursively predicting the continuous movement of the seal during the period when the camera is occluded based on the occlusion detection signal and the state vector, calculating the duration of the blind zone and the lateral offset of the seal, generating a dynamic predicted offset; finally, mapping the dynamic predicted offset to the image plane and superimposing it on the static virtual marker position to generate a final virtual marker position for continuous guidance during the pressing blind zone.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent device positioning technology, and specifically to an auxiliary positioning method for an intelligent seal. Background Technology

[0002] In scenarios where the accuracy of the stamping position is strictly required, such as government documents, financial instruments, and legal documents, the accuracy of the stamping operation directly affects the validity and legal effect of the document. In the field of intelligent stamp-assisted positioning technology, to enable operators to accurately align the stamp even when their view is obstructed by the outer casing, existing technical solutions typically employ two methods: one is to engrave a center point mark on the device casing, allowing the operator to estimate the center point of the stamp inside the device based on experience and then "aim" at it; the other is to create an external frame mold, moving the frame to align the central hole of the mold with the stamping position, and then placing the stamp into the slot to complete the operation. In addition, some solutions also incorporate a laser projection module to create a positioning area at the stamping opening for operator calibration.

[0003] However, the aforementioned existing technologies all have significant limitations in practical applications. First, the "dot aiming" method, which relies on the operator's experience and prediction, requires repeated practice to develop relatively accurate estimation skills. Furthermore, the device's casing constantly obstructs the operator's view, preventing them from continuously observing the relative position of the stamp and paper during the critical downward pressure phase. This information blind spot makes it difficult to guarantee positioning accuracy. Second, while using an external frame or laser module for assisted aiming reduces reliance on experience to some extent, this step-by-step process of moving the auxiliary tool before placing the device is inefficient, and the positioning error between the external auxiliary tool and the device itself is difficult to eliminate. Moreover, both mechanical frames and laser indicators essentially provide "aiming references" externally, but cannot allow the operator to see the precise landing point of the stamp relative to the paper in real time during the downward pressure process. The operator still needs to make the cognitive transition of "aligning the aiming point with the target position," and this transition process itself is a source of error. Summary of the Invention

[0004] Based on this, the purpose of this invention is to provide an auxiliary positioning method for intelligent seals that can present the location of the seal landing point to the operator in real time and intuitively, without requiring the operator to make experiential predictions and cognitive conversions.

[0005] The objective of this invention is achieved through the following solution:

[0006] In a first aspect, the present invention provides an auxiliary positioning method for a smart seal, comprising the following steps:

[0007] S1: Extract feature points from the sequence of paper images before the stamp is pressed down, identify natural feature points on the paper, establish the correspondence between feature points in consecutive frames, and generate a stable tracking feature point set.

[0008] S2: Based on the position coordinates of the stable tracking feature point set in the image plane, the fixed projection coordinates of the seal center point in the camera coordinate system, and the spatial geometric relationship between the camera and the seal, establish the initial mapping relationship between the image plane coordinate system and the seal landing point coordinate system to generate the static virtual mark position.

[0009] S3: Convert the static virtual marker position into fixed pixel coordinates in the camera preview interface, and render a virtual stamp circle at the fixed pixel coordinates in each frame of the preview interface to generate a static virtual marker for display on the screen.

[0010] In one embodiment, S1 of the intelligent seal auxiliary positioning method provided by the present invention specifically includes the following steps:

[0011] S11: Perform multi-scale spatial transformation processing on each frame of the acquired paper image sequence, and extract candidate feature points with scale invariance at different resolution scales by constructing an image pyramid to generate a multi-scale feature point set.

[0012] S12: Based on the gray centroid method, each feature point in the multi-scale feature point set is assigned a main direction, the gray centroid offset vector in the neighborhood of the feature point is calculated, the rotation-invariant direction of the feature point is determined, and a feature point descriptor subset with orientation information is generated.

[0013] S13: Based on Hamming distance, the nearest neighbor matching process is performed on the feature point descriptor subset with directional information between consecutive frames. By setting a distance threshold, mismatched point pairs are eliminated, and a random sampling consensus algorithm is used to select stable matching points to generate a stable tracking feature point set.

[0014] In one embodiment, step S2 of the intelligent seal auxiliary positioning method provided by the present invention specifically includes the following steps:

[0015] S21: Obtain the projection distance between the camera optical center and the seal center on the horizontal plane, the vertical distance between the camera optical center and the paper surface, and the fixed projection coordinates of the seal center point in the camera coordinate system. Based on the geometric correspondence between the position coordinates of the stable tracking feature point set in the image plane and the fixed projection coordinates, fit the spatial geometric constraint equation by the least squares method, construct the camera-seal spatial geometric model, and generate the spatial mapping matrix.

[0016] S22: Based on the spatial mapping matrix and the position coordinates of the stable tracking feature point set in the image plane, a back projection transformation is performed to map the image feature point coordinates to the stamp landing point coordinate system. The homography transformation relationship between the image plane coordinate system and the stamp landing point coordinate system is established by iteratively optimizing the matching error function, and a coordinate mapping function is generated.

[0017] S23: Substitute the fixed projection coordinates of the seal center point into the coordinate mapping function to perform coordinate transformation, calculate the projection position of the seal center point in the image plane, and generate the static virtual mark position.

[0018] In one embodiment, step S3 of the intelligent seal auxiliary positioning method provided by the present invention specifically includes the following steps:

[0019] S31: Perform pixel-level coordinate integerization on the static virtual marker position, convert the floating-point coordinate value into an integer coordinate in the screen pixel coordinate system through rounding operation, and generate fixed pixel coordinates;

[0020] S32: Based on fixed pixel coordinates and pre-stored stamp diameter parameters, perform geometric analysis on the rendering parameters of the virtual stamp circle, convert the physical diameter of the stamp into the pixel radius in the image plane according to the camera projection model, and generate a set of virtual circle rendering parameters.

[0021] S33: In each frame of the camera preview interface, the virtual stamp circle is rendered frame by frame based on fixed pixel coordinates and virtual circle rendering parameter set. The center position is located according to fixed pixel coordinates and a circular mark is drawn with pixel radius to generate a static virtual mark for display on the screen.

[0022] In one embodiment, the formula for calculating the static virtual marker position of the auxiliary positioning method for a smart seal provided by the present invention is as follows:

[0023]

[0024] in, These are the pixel coordinates of the static virtual marker position. is the normalized scale factor, calculated through homogeneous coordinate normalization; K is the camera intrinsic parameter matrix, containing focal length parameters and principal point coordinates, which is pre-calibrated at the factory; R is the rotation matrix, used to describe the relative rotation relationship between the camera coordinate system and the stamp landing point coordinate system; t is the translation vector, used to describe the translation relationship between the two coordinate systems. Let be the fixed projected coordinates of the center point of the seal in the camera coordinate system, where It is calculated by subtracting the height of the stamp from the vertical distance between the optical center of the camera and the paper surface.

[0025] In one embodiment, the formula for calculating the pixel radius of the intelligent seal auxiliary positioning method provided by the present invention is as follows:

[0026]

[0027] in, The pixel radius of the virtual stamp circle. The physical diameter of the seal. and These are the focal length parameters in the camera intrinsic parameter matrix, representing the number of pixels per unit physical distance in the horizontal and vertical directions of the image, respectively. Used to select a larger value in the focal length parameter to eliminate projection distortion caused by differences in pixel aspect ratio. This is the vertical distance from the bottom of the seal to the optical center of the camera, calculated by subtracting the height of the seal from the vertical distance between the optical center of the camera and the paper.

[0028] Secondly, this application provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement any of the above-mentioned auxiliary positioning methods for smart seals.

[0029] Thirdly, this application provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements any of the above-mentioned auxiliary positioning methods for smart seals.

[0030] In summary, the intelligent seal positioning method provided in this application transmits a real-time preview interface from a camera to a screen and renders a virtual seal circle at a fixed position relative to the camera image on the interface. This eliminates information blind spots and cognitive conversion errors in traditional seal positioning in the most intuitive way. Specifically, the method first extracts and tracks feature points from the paper image sequence before pressing to establish a stable visual reference. Then, based on the fixed spatial geometric relationship between the camera and the seal, and the calibrated structural dimensions, an initial mapping relationship is established between the image plane and the seal landing point coordinate system. This allows for precise calculation of the fixed pixel coordinates of the virtual seal circle in the preview interface, without any dynamic calculations or offset predictions during the pressing process. By rendering the virtual seal circle frame by frame at these fixed pixel coordinates, the operator can observe the position of the virtual circle relative to the paper content on the screen in real time during the preparation stage before the device is pressed and throughout the entire pressing process. The position of the virtual circle is the precise landing point of the actual seal after it is pressed. Therefore, this method enables operators to achieve accurate alignment without any experience-based prediction or cognitive shift, thereby avoiding information blind spots caused by shell obstruction, and achieving the technical effects of improving positioning efficiency and reducing the operational threshold.

[0031] To better understand and implement this invention, the following detailed description is provided in conjunction with the accompanying drawings. Attached Figure Description

[0032] Figure 1 A flowchart illustrating an auxiliary positioning method for a smart seal provided in an embodiment of this application;

[0033] Figure 2 A partial schematic diagram of a smart seal provided for an embodiment of this application;

[0034] Figure 3 This is a schematic diagram of the process for generating static virtual marker positions, provided for another embodiment of this application. Detailed Implementation

[0035] To facilitate understanding of the present invention, a more complete description will be given below with reference to the accompanying drawings. Preferred embodiments of the invention are shown in the drawings. However, the invention can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided to provide a thorough and complete understanding of the disclosure of the invention.

[0036] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.

[0037] This embodiment of the intelligent seal-assisted positioning method is based on an intelligent seal device equipped with an image acquisition unit, a displacement monitoring unit, an obstacle recognition unit, a display unit, and a control unit. The image acquisition unit uses a high-definition industrial camera, fixedly installed in the middle of the inner side of the intelligent seal device, avoiding obstructions from the seal body and the device casing, ensuring complete image capture of the paper surface before pressing down, for acquiring a sequence of paper images. The displacement monitoring unit uses a high-precision laser displacement sensor, installed at the seal transmission mechanism, for real-time monitoring of the seal's downward displacement data. The obstacle recognition unit uses an infrared ranging sensor combined with an image recognition algorithm to detect whether the camera's line of sight is obstructed. The display unit is a high-definition touchscreen display, installed on the top of the intelligent seal device, for displaying the paper surface image after overlaying virtual markers. The control unit uses an embedded microprocessor to process data from each unit, execute positioning algorithms, and generate virtual markers. Each unit is electrically connected to the control unit, collaboratively completing the assisted positioning process, ensuring smooth data transmission and synchronized action execution at each stage.

[0038] In one embodiment, such as Figure 1As shown, an auxiliary positioning method for a smart seal is provided. This embodiment illustrates the application of this method to a terminal. It is understood that this method can also be applied to a server, and further to a system including both a terminal and a server, and is implemented through interaction between the terminal and the server. In this embodiment, the method includes the following steps:

[0039] S1: Extract feature points from the sequence of paper images before the stamp is pressed down, identify natural feature points on the paper, establish the correspondence between feature points in consecutive frames, and generate a stable tracking feature point set.

[0040] Specifically, such as Figure 2 As shown, the system controls the camera located on the inner wall of the rear of the intelligent stamp machine to start. After the camera starts, it begins to continuously acquire images of the paper surface before the stamp pressing action begins. During the acquisition process, the camera maintains a stable working state, continuously acquiring images of the paper surface and forming a continuous sequence of paper surface images. The system performs a preprocessing process on the acquired paper surface image sequence. The preprocessing process is used to eliminate noise interference generated during image acquisition. The system processes each frame of the paper surface image using a preset image preprocessing algorithm to remove invalid interference information in the image, ensuring the continuity and integrity of each frame of the image sequence, and providing a qualified image data foundation for the subsequent feature point extraction process. After the preprocessing is completed, the system calls the ORB algorithm to perform feature point extraction operations on each frame of the preprocessed paper surface image in sequence. During the execution of the ORB algorithm, the system first performs grayscale processing on a single frame of image, and then extracts points that can represent the characteristics of the paper surface, i.e., natural feature points, from the grayscale image through the built-in feature detection mechanism of the algorithm. Natural feature points are inherent features of the paper surface that do not require manual marking. The natural feature points extracted by the system include text edge contours, printed pattern textures, paper fiber textures, and minute creases. No additional manual marking is required from the system, avoiding interference with the overall operation process. After extracting natural feature points from a single frame image, the system records the position information of each feature point within that frame and generates a descriptor corresponding to each feature point for subsequent inter-frame feature point matching.

[0041] After extracting feature points from all single-frame images, the system calls the K-nearest neighbor matching algorithm to establish the correspondence between feature points in consecutive frames. The system sequentially extracts two adjacent frames from a continuous sequence of images, compares the feature point descriptors of the previous frame with those of the next frame, calculates the distance between each pair of descriptors, and filters out feature point pairs that meet the matching requirements according to preset matching rules. Pairs that do not meet the matching requirements are discarded, thus eliminating mismatches caused by noise or lighting variations and ensuring the accuracy of feature point matching. To improve the stability of feature point tracking, the system continuously filters the feature point matching results across multiple consecutive frames. The system selects multiple consecutive frames as samples, tracks and detects each feature point, records its matching status and displacement changes in each frame, and retains feature points that can stably match in all consecutive frames and whose inter-frame displacement meets preset standards. Feature points that cannot match stably or whose inter-frame displacement exceeds preset standards are discarded. After the above screening process, the remaining feature points form a stable tracking feature point set. The system stores this stable tracking feature point set in a designated storage unit. This stable tracking feature point set can avoid feature point offsets caused by accidental factors and provides a reliable benchmark for establishing the mapping relationship between the image plane coordinate system and the seal landing point coordinate system. The subsequent processes of the system will carry out relevant data processing operations based on this stable tracking feature point set.

[0042] S2: Based on the position coordinates of the stable tracking feature point set in the image plane, the fixed projection coordinates of the seal center point in the camera coordinate system, and the spatial geometric relationship between the camera and the seal, an initial mapping relationship between the image plane coordinate system and the seal landing point coordinate system is established to generate the static virtual mark position.

[0043] Specifically, the system calls the stable tracking feature point set stored in the storage unit, combines it with the preset smart seal device parameters, and initiates the process of establishing the initial mapping relationship between the image plane coordinate system and the seal landing point coordinate system, thereby generating the static virtual mark position. The system first clarifies the definition of each coordinate system and completes the initialization settings. The image plane coordinate system takes the upper left corner of the camera preview image as its origin, with the positive x-axis pointing horizontally to the right and the positive y-axis pointing vertically downwards, in pixels. The system defines the pixel coordinates of the camera preview image to ensure that each pixel has a unique corresponding coordinate value. The camera coordinate system takes the camera's optical center as its origin, with the optical axis pointing horizontally to the right and the positive z-axis pointing vertically downwards, parallel to the image plane, in millimeters. The system determines the direction of each axis and the origin position of the camera coordinate system based on the camera's installation position and structural parameters. The stamp landing point coordinate system uses the area to be stamped on the paper as the reference plane, with the origin set as the center point of the target to be stamped. The x-axis is parallel to the paper and extends horizontally to the right, and the y-axis is parallel to the paper and extends vertically downwards. The unit is millimeters. The system determines the origin and the direction of each axis of the stamp landing point coordinate system according to the position of the area to be stamped, ensuring that the coordinate system can accurately represent the spatial position of the area to be stamped on the paper.

[0044] After defining each coordinate system, the system begins acquiring the key parameters required to establish the mapping relationship. The system retrieves the fixed projection coordinates of the seal's center point in the camera coordinate system from the storage unit. These coordinates are determined through a standard calibration process before the device leaves the factory. In this calibration process, the system controls the camera to acquire images of a preset calibration board, calibrates the relative position of the camera and the seal using a calibration algorithm, and thus determines the fixed projection coordinates of the seal's center point on the camera's image plane. This parameter is stored in the system control unit and remains unchanged during subsequent use, requiring no further calibration. Simultaneously, the system acquires the spatial geometric relationship between the camera and the seal. This geometric relationship is fixed by the smart seal's structural design. By reading preset device structural parameters, the system obtains the relative positional relationship between the camera and the seal, ensuring that their relative positions do not shift, providing a stable spatial reference for subsequent coordinate transformations. After acquiring the parameters, the system calls a perspective transformation algorithm to begin establishing the initial mapping relationship. The system uses the pixel coordinates of a stable tracking feature point set in the image plane coordinate system and its corresponding real-space coordinates as samples. Combining camera intrinsic and extrinsic parameters, it obtains a perspective transformation matrix through an algorithm. This matrix enables coordinate transformation between the image plane coordinate system and the stamp landing point coordinate system. The system inputs the fixed projected coordinates of the stamp's center point in the camera coordinate system into the perspective transformation matrix. Through matrix operations, these coordinates are converted into coordinates in the stamp landing point coordinate system. These coordinates represent the static virtual marker position, which precisely corresponds to the actual center point of the stamp after it is pressed down. The system stores this static virtual marker position for subsequent rendering and display of virtual markers.

[0045] S3: Convert the static virtual marker position into fixed pixel coordinates in the camera preview interface, and render a virtual stamp circle at the fixed pixel coordinates in each frame of the preview interface to generate a static virtual marker for display on the screen.

[0046] Specifically, the system calls the static virtual marker position stored in the storage unit to initiate the coordinate transformation process. Through the inverse transformation of the perspective transformation matrix established in step S2, the static virtual marker position is converted from the stamp landing point coordinate system to fixed pixel coordinates in the camera preview interface. During the coordinate transformation process, the system calls the preset camera lens distortion calibration parameters to correct the converted pixel coordinates. The correction process is used to eliminate errors caused by radial and tangential distortion of the lens, ensuring the accuracy of the converted pixel coordinates and making the subsequently rendered virtual marker consistent with the actual stamp landing point. After the system completes the pixel coordinate correction, it starts the image overlay rendering process. The system first acquires each frame of the image from the camera preview interface. After each frame of the image is rendered, the system calls the image overlay rendering technology to overlay and render the virtual stamp circle onto the corrected fixed pixel coordinates. During the rendering process, the system first determines the parameters of the virtual stamp circle to ensure that the parameters of the virtual stamp circle are consistent with those of the actual stamp. The diameter of the virtual stamp circle corresponds to the diameter of the actual stamp. The system converts the diameter of the actual stamp into the corresponding pixel value according to the image scaling ratio, determines the line color and line width of the virtual stamp circle, and ensures that the virtual stamp circle can be clearly seen on paper with different background colors. The center of the virtual stamp circle is precisely aligned with the corrected fixed pixel coordinates. The system renders a semi-transparent fill color inside the virtual stamp circle, which neither obscures the details of the area to be stamped on the paper, nor obscures the range of the stamp landing point.

[0047] The system performs the aforementioned rendering operation on each frame of the camera preview interface, ensuring a stable display of the virtual stamp circle in every frame, thereby generating a static virtual marker for real-time display. The system continuously monitors the image rendering on the camera preview interface to ensure the static virtual marker's position remains fixed and does not shift with slight camera movement. After generation, the system displays the static virtual marker in real-time on the smart stamp device's screen, presenting the stamp's landing point to the operator and providing clear visual guidance for subsequent stamping alignment. Through this static virtual marker, the operator can directly observe the actual landing point of the stamp, eliminating the need for experience-based estimation and cognitive conversion, simplifying the operation process while improving the accuracy of stamp positioning. The system maintains the stable display of the static virtual marker until the stamp pressing action is completed. After the stamping action is finished, the system stops image acquisition and virtual marker rendering, ending this assisted positioning process. Throughout the entire process, the system strictly follows the preset procedures to execute various data processing operations, ensuring the stability and accuracy of each step, providing technical support for the precise positioning of the smart stamp.

[0048] In summary, the intelligent seal positioning method provided in this application transmits a real-time preview interface from a camera to a screen and renders a virtual seal circle at a fixed position relative to the camera image on the interface. This eliminates information blind spots and cognitive conversion errors in traditional seal positioning in the most intuitive way. Specifically, the method first extracts and tracks feature points from the paper image sequence before pressing to establish a stable visual reference. Then, based on the fixed spatial geometric relationship between the camera and the seal, and the calibrated structural dimensions, an initial mapping relationship is established between the image plane and the seal landing point coordinate system. This allows for precise calculation of the fixed pixel coordinates of the virtual seal circle in the preview interface, without any dynamic calculations or offset predictions during the pressing process. By rendering the virtual seal circle frame by frame at these fixed pixel coordinates, the operator can observe the position of the virtual circle relative to the paper content on the screen in real time during the preparation stage before the device is pressed and throughout the entire pressing process. The position of the virtual circle is the precise landing point of the actual seal after it is pressed. Therefore, this method enables operators to achieve accurate alignment without any experience-based prediction or cognitive shift, thereby avoiding information blind spots caused by shell obstruction, and achieving the technical effects of improving positioning efficiency and reducing the operational threshold.

[0049] In one embodiment, S1 of the intelligent seal auxiliary positioning method provided by the present invention specifically includes the following steps:

[0050] S11: Perform multi-scale spatial transformation processing on each frame of the acquired paper image sequence, and extract candidate feature points with scale invariance at different resolution scales by constructing an image pyramid to generate a multi-scale feature point set.

[0051] Specifically, the system calls the sequence of paper images stored in the storage unit and initiates a multi-scale spatial transformation process for each frame of the sequence. The system first reads a single frame of the paper image and inputs it as the base image into a preset multi-scale transformation module. This module is used to scale the image at different resolutions, thereby constructing an image pyramid. The system generates multiple sets of images at different resolutions through iterative scaling operations, forming a complete image pyramid structure. Each layer of the image pyramid is obtained by scaling the base image, and adjacent layers maintain a fixed scaling ratio. The system performs feature point extraction on each layer of the image pyramid, using a preset feature detection algorithm. This algorithm can identify scale-invariant candidate feature points at different resolution scales, ensuring that the extracted feature points are not lost or shifted due to image scaling.

[0052] After extracting candidate feature points at each layer of the image pyramid, the system records the position coordinates of each candidate feature point in the corresponding layer and marks the resolution scale information of each feature point. The system summarizes the candidate feature points extracted from all layers to form an initial candidate feature point set. This set is then preliminarily filtered to remove invalid feature points caused by image noise, retaining candidate feature points that can stably represent the features on the paper. After filtering, the system integrates the remaining candidate feature points to generate a multi-scale feature point set. This set contains feature points at different resolution scales, and each feature point has scale invariance, enabling it to adapt to image acquisition scenarios at different distances and angles.

[0053] S12: Based on the gray-scale centroid method, perform main direction assignment processing on each feature point in the multi-scale feature point set, calculate the gray-scale centroid offset vector in the neighborhood of the feature point and determine the rotation-invariant direction of the feature point, and generate a feature point descriptor subset with orientation information.

[0054] Specifically, the system calls the multi-scale feature point set stored in the storage unit and initiates the main direction allocation processing flow for each feature point, using the gray-level centroid method. The system extracts individual feature points from the multi-scale feature point set one by one, determines the position coordinates of each feature point in the corresponding image, and then delineates a neighborhood region of a preset size centered on that feature point. This neighborhood region is used for subsequent gray-level centroid calculation. The system samples gray values ​​within the delineated neighborhood region, obtains the gray value data of each pixel within the neighborhood, records the relative position coordinates of each pixel within the neighborhood, and combines the pixel's gray value with its relative position coordinates to calculate the gray-level centroid position within the neighborhood.

[0055] After calculating the gray-scale centroid position, the system constructs a gray-scale centroid offset vector, starting from the feature point and ending at the gray-scale centroid position. The direction of this offset vector determines the rotation-invariant direction of the feature point. The system uses this rotation-invariant direction as the principal direction of the feature point and associates it with the corresponding feature point, completing the principal direction assignment for a single feature point. The system performs the above operation on all feature points in the multi-scale feature point set to ensure that each feature point is assigned unique principal direction information. After the principal direction assignment is completed, the system performs rotation normalization processing on the neighborhood gray-scale information of each feature point based on its principal direction, eliminating the influence of rotation on the feature point description. Based on the normalized neighborhood gray-scale information, the system generates a descriptor corresponding to each feature point. Each descriptor contains the feature point's scale information, principal direction information, and neighborhood gray-scale feature information. All feature point descriptors with direction information are aggregated to generate a set of feature point descriptors with direction information. The system stores this set in a storage unit for subsequent inter-frame feature point matching processing.

[0056] S13: Based on Hamming distance, the nearest neighbor matching process is performed on the feature point descriptor subset with directional information between consecutive frames. By setting a distance threshold, mismatched point pairs are eliminated, and a random sampling consensus algorithm is used to select stable matching points to generate a stable tracking feature point set.

[0057] Specifically, the system calls the set of feature point descriptors with orientation information stored in the storage unit to initiate the feature point matching process between consecutive frames. The matching process is based on Hamming distance to perform nearest neighbor matching. The system sequentially extracts the set of feature point descriptors with orientation information corresponding to two adjacent frames from the paper image sequence. It compares the feature point descriptors of the previous frame with those of the next frame one by one, calculating the Hamming distance between each pair of feature point descriptors. This distance is used to characterize the similarity between the two feature point descriptors. The system judges the calculated Hamming distance according to a preset distance threshold, discarding feature point pairs whose Hamming distance exceeds the threshold and retaining feature point pairs whose Hamming distance is within the threshold range, thereby achieving the initial removal of mismatched point pairs.

[0058] After initially eliminating mismatched point pairs, the system invokes a random sampling consensus algorithm to further filter the remaining feature point pairs to obtain stable matching points. The system randomly selects a subset of feature point pairs from the initially filtered pairs as samples, solves for the transformation model parameters based on these samples, and then uses this transformation model to verify all remaining feature point pairs. It counts the interior feature point pairs that conform to the model and the exterior feature point pairs that do not, eliminating all exterior feature point pairs. The system repeats the above random sampling, model solving, and verification filtering process until the optimal transformation model and its corresponding interior feature point pairs are obtained; these interior feature point pairs are the stable matching points. The system summarizes the feature points corresponding to all stable matching points to generate a stable tracking feature point set. The feature points in this set can stably match across consecutive frames and are unaffected by factors such as scale, rotation, or slight displacement. The system stores the stable tracking feature point set in a designated storage unit, providing reliable reference data for establishing the mapping relationship between the image plane coordinate system and the stamp landing point coordinate system, ensuring the accuracy and stability of subsequent positioning processes.

[0059] In one embodiment, step S2 of the intelligent seal auxiliary positioning method provided by the present invention specifically includes the following steps:

[0060] S21: Obtain the projected distance between the camera optical center and the seal center on the horizontal plane, the vertical distance between the camera optical center and the paper surface, and the fixed projected coordinates of the seal center point in the camera coordinate system. Based on the geometric correspondence between the position coordinates of the stable tracking feature point set in the image plane and the fixed projected coordinates, fit the spatial geometric constraint equations using the least squares method, construct the camera-seal spatial geometric model, and generate the spatial mapping matrix.

[0061] Specifically, the system initiates a parameter acquisition process, reads preset device structural parameters, and obtains the projected distance between the camera's optical center and the stamp's center on the horizontal plane, as well as the perpendicular distance between the camera's optical center and the paper surface. Both distance parameters are fixed by the device's structural design and are directly retrieved from the storage unit. Simultaneously, the system reads the fixed projected coordinates of the stamp's center point in the camera coordinate system. These coordinates are determined through a standard calibration process before the device leaves the factory and are stored in the system's storage unit after calibration. No further calibration is required during subsequent use; the system directly retrieves this coordinate data. After parameter acquisition, the system retrieves the stable tracking feature point set stored in the storage unit, extracts the position coordinates of all feature points in this set in the image plane, and establishes a geometric correspondence between these position coordinates and the fixed projected coordinates of the stamp's center point in the camera coordinate system.

[0062] Based on the established geometric correspondence, the system constructs spatial geometric constraint equations, fits these equations using the least squares method, solves for the unknown parameters, and then constructs a camera-stamp spatial geometric model. The spatial geometric constraint equations satisfy:

[0063]

[0064] in, To stably track the pixel coordinate vector of the feature point in the image plane, z is the depth value of the feature point in the camera coordinate system, and K is the camera intrinsic parameter matrix. Let be the rotation matrix between the camera coordinate system and the seal coordinate system, and t be the translation vector between the camera coordinate system and the seal coordinate system. To stably track the spatial coordinate vectors of feature points in the seal coordinate system, the system fits and solves the unknown parameters in the equation to obtain the specific values ​​of the rotation matrix R and the translation vector t. Combined with the camera intrinsic parameter matrix K, a complete camera-seal spatial geometric model is constructed. Based on this model, the system generates a spatial mapping matrix that integrates the spatial geometric relationship between the camera and the seal, enabling a preliminary transformation between image planar coordinates and seal spatial coordinates.

[0065] S22: Based on the spatial mapping matrix and the position coordinates of the stable tracking feature point set in the image plane, a back projection transformation is performed to map the image feature point coordinates to the stamp landing point coordinate system. The homography transformation relationship between the image plane coordinate system and the stamp landing point coordinate system is established by iteratively optimizing the matching error function, and a coordinate mapping function is generated.

[0066] Specifically, the system calls the spatial mapping matrix stored in the storage unit, and simultaneously extracts the position coordinates of the stable tracking feature point set in the image plane, initiating the back projection transformation process. The system substitutes the feature point coordinates in the image plane into the spatial mapping matrix, performs back projection transformation through matrix operations, and maps the image feature point coordinates from the image plane coordinate system to the stamp landing point coordinate system, obtaining the spatial coordinates of each feature point in the stamp landing point coordinate system. The system records the mapped feature point spatial coordinates while retaining their original coordinates in the image plane coordinate system, establishing a correspondence between the two, and providing a data foundation for establishing subsequent homography transformation relationships.

[0067] Based on the mapped coordinate correspondence, the system constructs a matching error function, which characterizes the mapping error between the image plane coordinates and the seal landing point coordinates. The expression for the error function is as follows:

[0068]

[0069] Where e is the matching error value, and n is the number of stably tracked feature points. Let be the coordinates of the i-th feature point in the image plane coordinate system. Let H be the coordinates of the i-th feature point in the stamp landing point coordinate system, and let H be the homography transformation matrix. The system initiates an iterative optimization process, continuously adjusting the parameters of the homography transformation matrix H to minimize the value of the matching error function e until the error value stabilizes within a preset range. After the iterative optimization is completed, the system determines the final homography transformation matrix H, establishes the homography transformation relationship between the image plane coordinate system and the stamp landing point coordinate system based on this matrix, and then generates a coordinate mapping function. This function can achieve accurate coordinate transformation between the two coordinate systems. The system stores the coordinate mapping function in a storage unit for subsequent calculation of the static virtual marker position.

[0070] S23: Substitute the fixed projection coordinates of the seal center point into the coordinate mapping function to perform coordinate transformation, calculate the projection position of the seal center point in the image plane, and generate the static virtual mark position.

[0071] Specifically, the system calls the coordinate mapping function stored in the storage unit, and simultaneously extracts the fixed projection coordinates of the seal's center point in the camera coordinate system, initiating the coordinate transformation process. The system uses the fixed projection coordinates of the seal's center point as input parameters, substitutes them into the coordinate mapping function, and performs a coordinate transformation through function operations, converting the fixed projection coordinates from the camera coordinate system to the image plane coordinate system. The system then calculates the projection position of the seal's center point in the image plane, which is the static virtual marker position. The formula for calculating the static virtual marker position is:

[0072]

[0073] in, These are the pixel coordinates of the static virtual marker position. is the normalized scale factor, calculated through homogeneous coordinate normalization; K is the camera intrinsic parameter matrix, containing focal length parameters and principal point coordinates, which is pre-calibrated at the factory; R is the rotation matrix, used to describe the relative rotation relationship between the camera coordinate system and the stamp landing point coordinate system; t is the translation vector, used to describe the translation relationship between the two coordinate systems. Let be the fixed projected coordinates of the center point of the seal in the camera coordinate system, where It is calculated by subtracting the height of the stamp from the vertical distance between the optical center of the camera and the paper surface. Let be the fixed projected coordinates of the center point of the seal in the camera coordinate system, where The height of the stamp is calculated by subtracting the vertical distance between the camera's optical center and the paper surface. After the system completes the formula calculation, it obtains the pixel coordinates of the static virtual mark position and stores these coordinates in a designated storage unit. This provides data support for the subsequent rendering and display of the virtual mark, ensuring that the virtual mark accurately corresponds to the actual landing point of the stamp.

[0074] In one embodiment, step S3 of the intelligent seal auxiliary positioning method provided by the present invention specifically includes the following steps:

[0075] S31: Perform pixel-level coordinate integerization on the static virtual marker position, convert the floating-point coordinate value into an integer coordinate in the screen pixel coordinate system through rounding operation, and generate fixed pixel coordinates.

[0076] Specifically, the system accesses the static virtual marker position stored in the storage unit. This position exists in the form of floating-point coordinate values, which cannot be directly used for rendering operations in the screen pixel coordinate system. Therefore, the system initiates a pixel-level coordinate integer quantization process. The system first extracts the floating-point coordinate value of the static virtual marker position, which corresponds to the position in the image plane coordinate system. The system uses this coordinate value as input data and passes it into the preset coordinate integer quantization process. The core of the coordinate integer quantization process is to convert the floating-point coordinate value into integer coordinates. The conversion process uses rounding operations to ensure that the converted integer coordinates can accurately correspond to the specific pixel point in the screen pixel coordinate system.

[0077] When the system performs rounding operations, it follows preset rounding rules and performs calculations on the floating-point coordinates of the x-axis and y-axis of the static virtual marker position. The calculation formulas are as follows:

[0078]

[0079]

[0080] in, and These are the x-axis and y-axis floating-point coordinates of the static virtual marker position, respectively. `round` is a rounding function used to convert floating-point values ​​to the nearest integer value. and These are the converted integer coordinate values ​​for the x and y axes, respectively. After the system performs the rounding operation, it integrates the resulting integer coordinate values ​​to generate fixed pixel coordinates. These fixed pixel coordinates correspond to a specific position in the screen pixel coordinate system. The system stores these fixed pixel coordinates in a designated storage unit to ensure that subsequent rendering processes can directly access this coordinate data.

[0081] S32: Based on fixed pixel coordinates and pre-stored stamp diameter parameters, perform geometric analysis on the rendering parameters of the virtual stamp circle, convert the physical diameter of the stamp into the pixel radius in the image plane according to the camera projection model, and generate a set of virtual circle rendering parameters.

[0082] Specifically, the system calls the fixed pixel coordinates stored in the storage unit and simultaneously reads the pre-stored stamp diameter parameter. This parameter is the physical diameter of the stamp, pre-stored in the system storage unit, and is entered at the factory, remaining unchanged during subsequent use. The system initiates the geometric analysis processing flow for the virtual stamp circle rendering parameters. The analysis process is based on the fixed pixel coordinates and stamp diameter parameter, combined with the camera projection model, to convert the physical diameter of the stamp into a pixel radius in the image plane, thereby generating a complete set of virtual circle rendering parameters.

[0083] The system constructs the conversion relationship between physical size and pixel size based on the camera projection model. The pixel radius is calculated according to a preset formula, which is:

[0084]

[0085] in, The pixel radius of the virtual stamp circle. The physical diameter of the seal. and These are the focal length parameters in the camera intrinsic parameter matrix, representing the number of pixels per unit physical distance in the horizontal and vertical directions of the image, respectively. Used to select a larger value in the focal length parameter to eliminate projection distortion caused by differences in pixel aspect ratio. The vertical distance from the bottom of the stamp to the center of the camera's optical axis is calculated by subtracting the stamp's height from the vertical distance between the camera's optical axis and the paper surface. After calculating the pixel radius, the system uses fixed pixel coordinates to determine the center position of the virtual stamp circle, line width, and other rendering parameters. All rendering parameters are then integrated to generate a virtual circle rendering parameter set, which is stored in the storage unit to provide data support for subsequent overlay rendering processing.

[0086] S33: In each frame of the camera preview interface, the virtual stamp circle is rendered frame by frame based on fixed pixel coordinates and virtual circle rendering parameter set. The center position is located according to fixed pixel coordinates and a circular mark is drawn with pixel radius to generate a static virtual mark for display on the screen.

[0087] Specifically, the system calls the fixed pixel coordinates and virtual circle rendering parameter set stored in the storage unit to initiate the frame-by-frame overlay rendering process of the camera preview interface. The system first acquires each frame of the preview interface image captured by the camera, and then sequentially inputs each frame into the rendering process to ensure that the rendering operation covers all frames of the preview interface, achieving continuous and stable display of the virtual stamp circle. During the rendering process, the system uses the fixed pixel coordinates as a reference to locate the center position of the virtual stamp circle, ensuring that the center precisely coincides with the fixed pixel coordinates.

[0088] The system uses the pixel radius from the virtual circle rendering parameter set and draws a circular marker at the center position according to preset circle drawing rules. The circle drawing follows the circle equation:

[0089]

[0090] Where x and y are the coordinates of any point on the circle in the screen pixel coordinate system. and These are fixed pixel coordinates, i.e., the coordinates of the center of the circle. This represents the pixel radius of the virtual stamp circle. The system performs the above overlay rendering operation on each frame of the image. After rendering is complete, the rendered image is output to the screen of the smart stamp device in real time. Through frame-by-frame rendering, the system generates a stable static virtual marker in the camera preview interface, which can intuitively show the stamp's landing position. The system continuously monitors the rendering effect to ensure that the virtual stamp circle can be stably displayed in each frame of the image without any positional shift, until the stamp pressing action is completed, at which point the rendering process terminates.

[0091] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0092] Based on the same inventive concept, this application also provides an auxiliary positioning system for smart seals to implement the auxiliary positioning method for smart seals described above. The solution provided by this system is similar to the implementation described in the above method; therefore, the specific limitations of one or more auxiliary positioning system embodiments for smart seals provided below can be found in the limitations of the auxiliary positioning method for smart seals described above, and will not be repeated here.

[0093] In one embodiment, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the above-described auxiliary positioning method for a smart seal.

[0094] In one embodiment, this application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the above-described auxiliary positioning method for a smart seal.

[0095] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of those different embodiments or examples.

[0096] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The components described as separate parts may or may not be physically separate, and 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 modules can be selected to achieve the purpose of this disclosure according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0097] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various variations or substitutions within the technical scope disclosed in this application, and these should all be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for auxiliary positioning of an intelligent seal, characterized in that, Includes the following steps: S1: Extract feature points from the sequence of paper images before the stamp is pressed down, identify natural feature points on the paper, establish the correspondence between feature points in consecutive frames, and generate a stable tracking feature point set. S2: Based on the position coordinates of the stable tracking feature point set in the image plane, the fixed projection coordinates of the seal center point in the camera coordinate system, and the spatial geometric relationship between the camera and the seal, establish the initial mapping relationship between the image plane coordinate system and the seal landing point coordinate system, and generate the static virtual mark position. S3: Convert the position of the static virtual marker into fixed pixel coordinates in the camera preview interface, and render a virtual stamp circle at the fixed pixel coordinates in each frame of the preview interface to generate a static virtual marker for display on the screen.

2. The method according to claim 1, characterized in that, S1 includes: S11: Perform multi-scale spatial transformation processing on each frame of the acquired paper image sequence, and extract candidate feature points with scale invariance at different resolution scales by constructing an image pyramid to generate a multi-scale feature point set. S12: Based on the gray centroid method, perform main direction assignment processing on each feature point in the multi-scale feature point set, calculate the gray centroid offset vector in the neighborhood of the feature point and determine the rotation-invariant direction of the feature point, and generate a feature point descriptor subset with orientation information. S13: Based on Hamming distance, the feature point descriptor set with directional information between consecutive frames is subjected to nearest neighbor matching processing. By setting a distance threshold, mismatched point pairs are eliminated and stable matching points are selected using a random sampling consensus algorithm to generate a stable tracking feature point set.

3. The method according to claim 1, characterized in that, S2 includes: S21: Obtain the projection distance between the camera optical center and the seal center on the horizontal plane, the vertical distance between the camera optical center and the paper surface, and the fixed projection coordinates of the seal center point in the camera coordinate system. Based on the geometric correspondence between the position coordinates of the stable tracking feature point set in the image plane and the fixed projection coordinates, fit the spatial geometric constraint equations by the least squares method, construct the camera-seal spatial geometric model, and generate the spatial mapping matrix. S22: Based on the spatial mapping matrix and the position coordinates of the stable tracking feature point set in the image plane, perform a back projection transformation to map the image feature point coordinates to the stamp landing point coordinate system. Establish the homography transformation relationship between the image plane coordinate system and the stamp landing point coordinate system by iteratively optimizing the matching error function, and generate a coordinate mapping function. S23: Substitute the fixed projection coordinates of the seal center point into the coordinate mapping function to perform coordinate transformation processing, calculate the projection position of the seal center point in the image plane, and generate a static virtual mark position.

4. The method according to claim 1, characterized in that, S3 includes: S31: Perform pixel-level coordinate integerization processing on the static virtual marker position, and convert the floating-point coordinate value into an integer coordinate in the screen pixel coordinate system through rounding operation to generate fixed pixel coordinates; S32: Based on the fixed pixel coordinates and the pre-stored stamp diameter parameters, perform geometric analysis processing on the rendering parameters of the virtual stamp circle, convert the physical diameter of the stamp into the pixel radius in the image plane according to the camera projection model, and generate a set of virtual circle rendering parameters. S33: In each frame of the camera preview interface, the virtual stamp circle is rendered frame by frame based on the fixed pixel coordinates and the virtual circle rendering parameter set. The center position is located according to the fixed pixel coordinates and a circular mark is drawn with the pixel radius to generate a static virtual mark for display on the screen.

5. The method according to claim 3, characterized in that, The formula for calculating the position of the static virtual marker is: in, The pixel coordinates of the static virtual marker position. is the normalized scale factor, calculated through homogeneous coordinate normalization; K is the camera intrinsic parameter matrix, containing focal length parameters and principal point coordinates, which is pre-calibrated at the factory; R is the rotation matrix, used to describe the relative rotation relationship between the camera coordinate system and the stamp landing point coordinate system; t is the translation vector, used to describe the translation relationship between the two coordinate systems. Let be the fixed projected coordinates of the center point of the seal in the camera coordinate system, where The height of the seal is calculated by subtracting the vertical distance between the optical center of the camera and the paper surface.

6. The method according to claim 4, characterized in that, The formula for calculating the pixel radius is: in, The pixel radius of the virtual stamp circle. The physical diameter of the seal. and These are the focal length parameters in the camera intrinsic parameter matrix, representing the number of pixels per unit physical distance in the horizontal and vertical directions of the image, respectively. Used to select a larger value in the focal length parameter to eliminate projection distortion caused by differences in pixel aspect ratio. The vertical distance from the bottom of the seal to the optical center of the camera is calculated by subtracting the height of the seal from the vertical distance between the optical center of the camera and the paper surface.

7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the method of any one of claims 1 to 6.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 6.