High-precision global microscopic image printing document identification system

By combining the automatic microscope platform system and image linking technology, the global high-power magnification scanning system for printing documents is upgraded, which solves the problems of low efficiency, low accuracy and large system error in the existing technology, and achieves high-precision and rapid image acquisition and identification.

CN114758346BActive Publication Date: 2025-05-06张学清
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210428752.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-22
Publication Date
2025-05-06
Estimated Expiration
2042-04-22

AI Technical Summary

Technical Problem

The prior art has problems such as low efficiency, low accuracy, low collection efficiency and large system errors in the identification of printed documents, especially in terms of obtaining high-precision images and performing automatic identification.

Method used

The automatic microscope platform system is combined with image linking technology to upgrade the global high-power magnification scanning system of images. Through the upgrade of microscopic hardware structure, driver circuit board and hardware driver, the rapid and accurate acquisition and linking of images are achieved. Using a high-speed frame exposure camera and a stepper motor-driven cursor gimbal, combined with image registration technology based on smooth-flap feature association matching and scalar enhancement learning method, to achieve fast and accurate links of large-scale images.

Benefits of technology

It realizes rapid collection and linking of high-precision images, improves the efficiency and accuracy of printing documents identification, reduces system errors, and can automatically complete the identification and identification of printed documents, providing powerful auxiliary inspection tools.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114758346B_ABST
    Figure CN114758346B_ABST
Patent Text Reader

Abstract

This application combines the automatic microscope platform system with image linking. First, the global high-magnification scanning system of the image is upgraded to overcome the shortcomings of the system such as small acquisition range, low acquisition efficiency, need for manual assistance, and large system errors, to ensure the quality of the acquired image and the accuracy of system control, replace more reasonable components and update the system architecture to make the instrument more powerful and easier to use. Secondly, for the acquired local microscopic images of characters, a linking algorithm is designed according to the characteristics of the image, and a global coordinate positioning model for large-scale image linking is used to complete the image linking. Finally, the microscopic images of the same characters in the same font and size in the documents and the sample documents are extracted to analyze and classify the texture differences of the same characters printed by different printers. The auxiliary inspection module developed based on the difference in character texture helps document inspectors to efficiently and accurately perform auxiliary inspections on printed documents, thereby enhancing the efficiency and accuracy of document inspection work.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to a high-precision printed document identification system, and more particularly to a high-precision global image microscopy printed document identification system, belonging to the technical field of printed document identification. Background Art

[0002] Printed documents have gradually replaced handwritten documents and become the main medium for recording information, which is closely related to the lives of each of us. But at the same time, illegal acts related to printed documents are also increasing, mainly tampering with printed documents, illegal copying (piracy) of important documents, etc. Therefore, the problem of printed document identification is imminent. There are two application scenarios for printed document identification: one is one-to-one identification, that is, identifying whether two printed documents are printed by the same printer. The second is one-to-many retrieval, which finds the closest document to the target document in the printed document library through comparison, so as to trace the source of the printer of the printed document. Traditional document inspection relies on manual comparison, which is inefficient and has limited inspection methods and inspection objects. In addition, manual inspection is time-consuming and labor-intensive. In addition, due to the similarity of information, the efficiency and accuracy of manual inspection are very low. At present, it is urgent to use pattern recognition artificial intelligence to automatically and accurately identify printed documents, or to use computer software and hardware technology to provide powerful auxiliary means for printed document inspection.

[0003] Printed document inspection is an image processing and pattern recognition process. First, the character image is acquired through an image acquisition instrument. Second, the noise caused by image acquisition is eliminated through preprocessing. Then, the printed document image is feature extracted. Finally, the feature distance between the two printed documents is calculated to obtain the identification result. In computer printed document inspection, image acquisition is the primary priority, and the image acquisition quality will affect the image feature extraction and classification recognition. Therefore, the goal of this application is to quickly and accurately acquire images that reflect the rich details of printed document characters.

[0004] Even the images obtained by a very high-precision scanner cannot reach the clarity required for document inspection, and the identifiable features of the image cannot be effectively extracted even after software magnification. In addition, the characters of printed documents are relatively standardized. When different printers print the same content, it is almost difficult to find any difference with the naked eye or under a low-power microscope. Only under a high-power microscope can the texture features that can truly reflect the identity information of the printer be observed. However, the field of view of a high-power microscope is limited. After high-power microscopy magnification, only a partial image of a character can be seen, while the feature extraction of printed document inspection requires global information of the image. Therefore, it is necessary to further develop a mechanical transmission device that drives the lens to move smoothly, as well as the problem of stitching multiple magnified images. Moreover, the higher the magnification of the microscope, the lower the brightness of the microscope's mirror image. In order to capture images with clear details, the corresponding exposure time of an ordinary camera needs to be extended when taking pictures. The acquisition of an entire A4 paper requires tens of thousands of lenses, which will seriously reduce the acquisition efficiency. Replacing the low-speed camera with a high-speed frame exposure camera to capture the image can improve the acquisition efficiency.

[0005] In summary, there are still several problems and defects in the prior art of printed document authentication. The difficulties and problems to be solved in this application are mainly concentrated in the following aspects:

[0006] (1) The existing technology for printed document inspection mainly relies on manual comparison, which is inefficient and has limited inspection methods and inspection objects. In addition, manual inspection is time-consuming and labor-intensive. In addition, due to the similarity of information, the efficiency and accuracy of manual inspection are very low. There is a lack of automatic and accurate identification of printed documents using pattern recognition artificial intelligence, or the use of computer software and hardware technology to provide powerful auxiliary means for printed document inspection. There is a lack of methods for obtaining character images through image acquisition instruments, extracting features from printed document images, and calculating the feature distance between two printed documents to obtain identification results. In computer printed document inspection, image acquisition is the primary priority, and the quality of image acquisition will affect the feature extraction and classification recognition of the image. The existing technology cannot quickly and accurately obtain images that reflect the rich and detailed information of printed document characters, which brings great difficulty to the subsequent printed document identification.

[0007] (2) The images obtained by current high-precision scanners cannot meet the clarity required for document inspection. Even after software magnification, it is still impossible to effectively extract identifiable features from the images. When different printers print the same content, it is almost impossible to find any difference with the naked eye or a low-power microscope. Only under a high-power microscope can the texture features that can truly reflect the printer's identity information be observed. However, the field of view of a high-power microscope is limited. After high-power microscopy, only a partial image of a character can be seen. Feature extraction for printed document inspection requires global information of the image. The existing technology lacks a mechanical transmission device to drive the lens to move smoothly, and cannot solve the problem of stitching multiple magnified images. Moreover, when the magnification of the microscope is adjusted higher, the brightness of the microscope's image becomes lower, and the exposure time needs to be extended. The acquisition of an entire A4 paper requires tens of thousands of lenses, which will seriously reduce the acquisition efficiency. It is impossible to clearly, completely, quickly and accurately acquire the microscopic magnified images of various areas on the printed document. Subsequent printed document identification is difficult and cannot be promoted to practical applications.

[0008] (3) The existing technology lacks optimization of the architecture of the global high-magnification scanning system for images. The upgraded microscopic magnification hardware structure, drive circuit board, and hardware driver design of the document magnification scanning system all have major defects. There is also a lack of fast and accurate image microscopic scanning solutions and models, and a lack of precise calculation of scanning parameters, scanning stabilization platform deflection angle, and microscopic scanning process. The electric-controlled gimbal used by the system is not long enough. When the system performs a two-dimensional area scan, it cannot cover the content of an entire A4 paper. It needs to rely on manual movement of documents to assist in collection, resulting in low collection efficiency. The camera used by the system is a low-speed camera with a long exposure time and low automatic collection efficiency. In addition, the exposure difference between the images taken by the camera before and after is large, and the registration error is large or even wrong. The hardware process design is simple and rough. The key component of the system, the electric-controlled gimbal, is exposed to the air. Moisture, dust, and debris will fall onto the precision screw of the electric-controlled vernier gimbal, seriously affecting the accuracy of the electric-controlled vernier gimbal. There is a lack of necessary external packaging design.

[0009] (4) There is a lack of large-scale local microscopic image linking methods, local microscopic image registration strategies, and global linking models for coordinate positioning, and there is a lack of printed document auxiliary identification modules; the existing system cannot fully automatically scan to cover the content of an entire A4 paper, and there is no overlapping area set between adjacent images in the two-dimensional image sequence captured by the camera, which not only affects the number of images collected, but also affects the quality of the link; the existing technology has a slow acquisition speed, and the field of view of the high-power microscope is limited, so it can only capture local images of characters. It takes tens of thousands of lenses to capture a whole A4 paper. The step-and-stop camera shooting method and the long exposure time of the low-speed camera will take several days to capture a whole A4 paper, which seriously affects the efficiency of acquisition; the microscope is not clearly focused, and any small displacement change of the microscopically enlarged document may result in the inability to observe a clear image under the microscope, which cannot meet the acquisition requirements; there is a lack of fast and accurate automatic linking algorithm, and almost every image is linked to four surrounding images. The speed and accuracy of the pairwise registration of images cannot be achieved, and there is a lack of a linking algorithm that takes into account both linking speed and accuracy. Summary of the invention

[0010] This application combines the automatic microscope platform system with the image linking technology. First, the original image global high-magnification scanning system is upgraded to overcome the shortcomings of the system such as small acquisition range, low acquisition efficiency, need for manual assistance, and large system errors, to ensure the quality of the acquired image and the accuracy of the system control, as well as to select and replace more reasonable main components and update the system architecture, so that the instrument is more powerful and easier to use. Secondly, for the acquired local microscopic image of the character, the linking algorithm is selected according to the characteristics of the image, and the image linking is completed by using the coordinate positioning global model for large-scale image linking. Finally, the microscopic image of the same character with the same font size in the document and the sample document is extracted to analyze the texture differences of the same characters printed by different printers, and the texture differences are classified. The auxiliary inspection module developed based on the character texture difference helps document inspection personnel to efficiently and accurately perform auxiliary inspection on printed documents, thereby enhancing the efficiency and accuracy of document inspection work.

[0011] In order to achieve the above technical effects, the technical solutions adopted in this application are as follows:

[0012] The high-precision global microscopic printed document identification system includes: first, the global high-magnification scanning system architecture; second, the document magnification scanning system upgrade design, including: microscopic magnification hardware structure upgrade, drive control circuit board upgrade design, hardware driver design; third, the image microscopic scanning solution enhancement design, including: calculation of scanning parameters, calculation of scanning stabilization stage deflection angle, microscopic scanning process; fourth, the large-scale local microscopic image linking method, including: image local microscopic registration strategy, global linking model of coordinate positioning; fifth, the printed document auxiliary identification module design;

[0013] Firstly, the collected documents are magnified microscopically and then photographed to obtain images, and multiple local images collected are linked into a complete character image. Regional scanning is used and a global link model for coordinate positioning is designed based on this.

[0014] Secondly, the hardware structure and process were upgraded. By increasing the length of the vernier pan-tilt, the instrument was able to scan the entire A4 paper when performing two-dimensional area scanning. The scanning method was redesigned, that is, the camera captured images at equal time intervals when moving with the stepper motor. The camera used a high-speed frame exposure camera so that the camera could capture clear and still images every time during rapid movement, thereby increasing the acquisition rate and ensuring the quality of the acquired images. The overlapping areas of adjacent images were ensured to be the same size, and the subdivision number of the stepper motor subdivision driver was adjusted to more than 32 subdivisions, so that the displacement of the vernier pan-tilt during the exposure time approached 0.

[0015] Secondly, a feature association matching method based on smooth flap is used for registration. When performing image registration, a scalar reinforcement learning method is used to find the best matching position of feature association matching. According to the spatial arrangement characteristics of the two-dimensional image sequence, a global alignment model based on linear regression is designed to quickly register large-scale images and eliminate the matching errors when registering two images. The gradual in and out method is used to fuse the images to achieve smooth transition in the overlapping areas of the images.

[0016] Finally, the printed document identification application of the global image micro-magnification system is realized. The micro-magnified images of the same characters with the same font and size in the document are extracted for texture difference comparison, and a printed document auxiliary identification module is developed based on printing differences.

[0017] Preferably, the hardware structure of the microscope magnification is upgraded, and the improvements include: the X-axis electric-controlled vernier platform is fixed with a bracket, on which a camera and a high-power microscope head are fixed, and the Y-axis electric-controlled vernier platform is fixed with a stable platform for placing documents, wherein the travel of the X-direction vernier platform exceeds the width of the A4 paper, and the travel of the Y-direction vernier platform exceeds the length of the A4 paper. After the near ends of the X- and Y-axis electric-controlled vernier platforms are reset, the upper right corner of the A4 paper is located directly below the high-power microscope head, the X-axis direction vernier platform is driven by a stepper motor to perform a lateral uniform motion, and the Y-axis direction vernier platform is driven by a stepper motor to perform a stepping motion. During the uniform motion of the X-axis vernier platform equipped with a camera, the camera captures images at equal time intervals, and each captured image is sequentially transmitted to the computer for naming and storage, and the acquisition link system algorithm links the saved image sequence to obtain a global microscopic image of a large field of view of the printed document;

[0018] The micro-magnification hardware system is divided into two parts: one is the drive control part, and the other is the image acquisition part. The drive control module controls the vernier head to make two-dimensional plane movement, including the speed and direction control of the vernier head. The computer end transmits control instructions, speed and step instructions to the control circuit, and the driver realizes speed setting, zeroing operation, direction setting, and displacement setting.

[0019] When collecting printed documents, place the printed documents on a stable table, adjust the light intensity of the LED lamp, the magnification of the microscope, set the moving speed of the horizontal cursor pan and the capture time interval, the step parameters of the vertical cursor pan, and make the image focus clear, select the character area to be collected, reset the X and Y axis motors to the starting point of the collection area, and start the collection. The X-axis cursor pan moves at a high speed with a high-speed camera. During the movement, the camera captures images at equal time intervals. The high-speed camera has a high exposure frame rate to ensure that a static image is captured each time without smearing and blurring. After the X-axis motor drives the camera to complete a line of scanning, the Y-axis stepper motor moves upward in steps, so that the next line is located below the high-power microscope head, and the X-axis motor drives the camera to move in the opposite direction to scan the image, and the cycle is repeated until the image of the specified area is collected.

[0020] Preferably, the hardware driver is designed as follows: the cursor pan-tilt is controlled by a stepper motor driver, the stepper motor driver sends and controls the level signal through the RS232 interface, and the computer inputs instructions to the driver to control the travel and image acquisition of the cursor pan-tilt;

[0021] (1) Query command

[0022] Both zero query and limit query are queried through the serial port DCD line. If the stepper motor reaches the boundary of the mechanical stroke, the limit switch is triggered to turn on, making DCD a low level. The zero point is the limit point in the negative direction of the stepper motor. The far limit query is queried through the CTS line. If the stepper motor reaches the far boundary of the mechanical stroke, the limit switch is triggered to turn on, making CTS a low level. For zero query or near limit query, the CDHolding method of the SerialPort class is used to read the level signal on the DCD line, thereby querying the zero signal; for far limit query, the CTS Holding method is used to read the level signal on the CTS line, thereby querying the limit signal.

[0023] Near-end limit (zero return) query: if (serialPort1.CDHolding(O));

[0024] Remote limit query: if(serialPort1.CTSHoldingO));

[0025] (2) Setting instructions

[0026] Speed ​​setting: The output pulse number PPS determines the speed of the stepper motor. The speed setting has two aspects:

[0027] a) String binary code: fastest speed serialPort1.Write("Ox55");

[0028] Medium speed serialPort1.Write("Ox3Ox3");

[0029] Low speed serialPort1.Write("Ox0Ox15");

[0030] b)Serial port baud rate: high baud rate serialPort1.BaudRate = br115200;

[0031] Medium baud rate serialPort1.BaudRate = br19200;

[0032] Low baud rate serialPort1.BaudRate = br9600;

[0033] Among them, Ox5 is the binary number 0101, and Ox3 is the binary number 0011. When the speed is set according to the string content, the fastest speed is twice the medium speed, and similarly, the medium speed is twice the low speed.

[0034] The moving speed of the stepper motor is divided into acquisition speed and reset speed. The camera does not shoot when the stepper motor is reset. Under the subdivision number setting of the subdivision driver, the acquisition speed and reset speed of the stepper motor can be set by setting different baud rates and sending data.

[0035] Direction setting: Send a level control signal to the Dir pin of the subdivision driver chip DMD402A through the Dtr pin of the RS232 serial port to control the running direction of the motor;

[0036] Forward displacement: serialPort1.DtrEnable(false); Reverse displacement: serialPort1.DtrEnable(true);

[0037] Zero setting: First, get the zero status by the zero query command. If the machine is not zeroed, start the zero setting and perform displacement zeroing in combination with the DCD limit signal.

[0038] Check whether it is reset to zero: if(serialPortl.CDHolding());

[0039] Zero setting: serialPort1.CDHolding(false);

[0040] while(serialPort1.CDHolding())

[0041] serialPort1.Write(byte[]buffer,intoffset,intcount);

[0042] (3) Control instructions

[0043] The image acquisition control process is as follows: 1. Initialize the camera (CameraInit(intindex)); 2. Run the camera and start capturing image data (CameraPlay); 3. Set the image resolution (CameraSetResolution); 4. Display the image (CameraShowImage); 5. Get the image and save it as a BMP file (CameraSavelmage); 6. Turn off the camera acquisition mode and data connection (CameraFree);

[0044] Displacement axis switching: Use the RTS line of the serial port to send high and low levels to the base of the transistor to achieve switching between X-axis and Y-axis displacement: X-axis displacement: serialPort1.RtsEnable(true); Y-axis displacement: serialPort1.RtsEnable(false);

[0045] Displacement control: The X-axis vernier gimbal drives the camera and high-power microscope head to move at a constant speed. The camera captures images at equal time intervals. After completing a line of scanning, the Y-axis stepper motor drives the paper stabilization stage to step once, and the X-axis motor drives the camera to scan in the opposite direction until the scanning of the specified area is completed.

[0046] Preferably, the scanning parameters are calculated as follows: the image size is 640*480, the pixel size is 3.2μm*3.2μm, the maximum frame rate is 60fps, the optical magnification is 0.5×4.5=2.25 (times), the electronic magnification is 21×25.4-=8=66.68 (times), when the vernier platform moves in the line direction, the displacement of the vernier platform within the camera capture time interval is less than 2.650mm, when the vernier platform moves in the stepping motion, the stepping amount of the vernier platform is less than 1.970mm;

[0047] The maximum frame rate of a high-speed industrial camera is 60fps, and the maximum rate of a stepper motor during line scanning cannot exceed 2.650*60=159 (mm / s);

[0048] The inherent step angle of the stepper motor is 1.8 degrees, the screw lead is 2mm, and the subdivision number of the stepper motor subdivision driver is set to 32, that is, the stepper motor needs 6400 pulses to rotate one circle. At the same time, the baud rate of the serial port is set to 19200, and the binary code sent is 0x55. The moving speed of the cursor pan / tilt is:

[0049]

[0050] The exposure time is selected as 1300us, the subdivision number of the subdivision driver is set to 32, and the displacement of the vernier gimbal during the exposure time is:

[0051] 3000μm×1300×10 -6 =3.9(μm)

[0052] Set the image overlap area size to 10%, that is, the step distance in the X and Y directions each time is 90% of the size of the corresponding area of ​​the actual image, that is:

[0053] X-direction stepping distance: Y direction step distance: 1.97mm×90%=1.80(mm);

[0054] During automatic acquisition, the serial port baud rate is set to 19200, the sent binary code is 0x55, and the calculated sending pulse frequency is 9600; the subdivision number of the subdivision driver is set to 32, that is, 6400 pulses are required for each rotation of the stepper motor or each 2mm movement of the vernier pan / tilt.

[0055] Number of pulses required for displacement in the X direction:

[0056] Number of pulses required for stepping in the Y direction:

[0057] Set the number of pulses required for the displacement of the stepper motor in the X direction within the equal time interval to 7680, that is, the interval between adjacent images is 2.40mm, set the number of stepping pulses in the Y direction to 5760, the interval between adjacent images in the vertical direction is 1.80mm, the uniform motion speed of the X-axis cursor gimbal is 3mm / s, and the camera capture time interval is 0.8s;

[0058] The size of the acquisition area is set to 180mm*270mm, and the reset point of the X-axis and Y-axis stepper motors is set at the position where the characters in the upper left corner of the paper are facing the lens. Taking this as the starting point, the acquisition area is divided into cells, with 75 cells in each row and 150 cells in each column. Image acquisition only needs to move to the starting point of the acquisition area, and then calibrate the acquisition area to achieve automatic acquisition of the calibrated acquisition area.

[0059] Preferably, the deflection angle of the scanning stabilization platform is calculated: assuming that the deflection angle is α, the width and height of the image captured by the CMOS camera are M×N, and the deflection angle of the area where adjacent images do not overlap is:

[0060]

[0061] By adjusting the installation position of the rotating CCD camera to reduce the deflection angle between the camera and the vernier head, the quantitative relationship between the image pixel and the physical length is defined as the vernier ruler, which means that each image pixel corresponds to the physical length of the actual acquisition area. The optical magnification of the high-power microscope lens is recorded as m, and the pixel size of the CMOS image sensor is x (μm). The vernier ruler under this magnification is x / m.

[0062] Assume the deflection angle is α, and the vernier scale under this multiple is f. The physical size of the acquisition area corresponding to the image is M×f in width and N×f in height. The image coordinate system and the electronically controlled vernier gimbal coordinate system are the same coordinate system. The calculation method of the deflection angle is:

[0063] Step 1: Place the document on the paper stabilization table and capture image I1;

[0064] Step 2: Drive the electronically controlled vernier gimbal to move a distance △x along the X-axis direction to collect image I2, where M×f×10%<△x<M×f×90%, so that two adjacent images have overlapping areas;

[0065] Step 3: Use the link algorithm to calculate the overlap position of the two images (x p ,y p ), angle calculation formula:

[0066]

[0067] After calculating the deflection angle, the relative positions of the high-definition camera and the electronically controlled vernier head are continuously adjusted during the mechanical installation to reduce the deflection angle to a minimum.

[0068] Preferably, microscopic scanning process: microscopic image scanning adopts a two-dimensional scanning method, the microscope is fixed on the bracket of the X-axis vernier gimbal through the lens frame, and is located above the paper stabilizing table. The vernier gimbal is equipped with a CMOS camera to perform two-dimensional plane motion to scan the document;

[0069] After freely selecting the acquisition area, the vernier pan / tilt automatically runs to acquire images. Assuming that the number of images acquired in a certain acquisition area is (m+1)*(n+1), it means that m+1 rows of images are acquired, and each row has n+1 columns. The electric-controlled vernier pan / tilt first moves horizontally from the starting point of the acquisition area, and the CMOS camera captures the image. It moves from left to right to acquire n+1 images in sequence, completing the scan of the first row of the designated acquisition area. The Y-axis motor steps upward, and the electric-controlled vernier pan / tilt continues to scan the second row in the opposite direction. The acquisition route is in the shape of a "Z" until the image acquisition of the designated area is completed. The image number represents the acquisition order. Numbering the images in the acquisition order facilitates subsequent image processing.

[0070] Preferably, the local microscopic registration strategy of the image is: the image registration is performed by using the method of positioning the coordinates of the collected two-dimensional sequence images in the same coordinate system, the coordinates of the upper left corner pixel point of the positioning image are selected, and a registration strategy is adopted for each row of images. The image registration is all in the same coordinate system. First, the registration algorithm is used to perform pairwise registration on the first row of images. The coordinates of the upper left corner pixel point of each image in the coordinate system are calculated based on the smooth flap registration algorithm, and the spacing between the upper left corner pixel points of the image and the equation of the straight line where the upper left corner pixel point of the first row of images is located are calculated. Then, the first column of images is registered pairwise by the global link algorithm for coordinate positioning. The registration algorithm calculates the coordinates of the upper left pixel of each image in the coordinate system, and calculates the spacing of the upper left pixel of the image in the vertical direction and the equation of the straight line where the upper left pixel of the first column of the image is located. Then, the coordinates of the upper left pixel of each row of the image in the first column are used as reference points to calculate the equation of the straight line where the upper left pixel of each row of the image is located. The coordinates of the upper left pixel of each row of the image in the coordinate system are calculated according to the spacing of the upper left pixel of the row image. At this point, the position of the upper left pixel of each image in the two-dimensional image sequence collected in the coordinate system is determined. After the image registration is completed, the overlapping area is fused by the image fusion method to obtain an image with a smooth transition in the overlapping area.

[0071] The registration strategy is based on the fact that the overlapping areas of adjacent images in the horizontal direction and the vertical direction are the same in size and position. The method of calculating the equation of the straight line where the pixel point in the upper left corner of the image is located and performing linear regression on the coordinates of the pixel point in the upper left corner of the image is used to eliminate the cumulative error generated at the closed part of the image sequence when the images are registered pairwise.

[0072] Preferably, the global link model of coordinate positioning: the images adjacent to each other in the first row and the first column are registered by feature association matching based on smooth flaps, and the scalar reinforcement learning method is used to find the best matching position of feature association matching when performing image registration;

[0073] In the acquisition area, the number of images in the first row and the first column is not large, and the calculation amount of the feature association matching method is not large. The position of the upper left corner pixel of the first row and the first column in the coordinate system can be accurately calculated, and then the spacing of the upper left corner pixel points of the row and column directions and the straight line equation of the upper left corner pixel points of the row and column directions can be calculated. By taking the coordinates of the upper left corner pixel point of the first image in each row as the reference point, the straight line equation of the upper left corner pixel point of each row of images can be calculated. The equation is estimated by the univariate linear regression method based on the least squares method.

[0074] Assume that the univariate linear regression function is Y=aX+b, where Y and X are random variables, a and b are parameters to be estimated, and the least squares method is used to estimate the values ​​of parameters a and b. Let:

[0075] y i =ax i +b+ε i

[0076] In the formula, parameters a and b are independent of each other, ε i is the random error, and square the above terms to get:

[0077]

[0078] When the above formula takes the minimum value, i +b has the smallest error, constructor:

[0079]

[0080] n is the corresponding parameter, let P(a,b) take the minimum value, that is, take the partial derivatives of P with respect to parameters a and b and make them zero:

[0081]

[0082] The equation system is:

[0083]

[0084] x i Not exactly the same, the coefficient determinant of the above equations is:

[0085]

[0086]

[0087] Therefore, the system of equations (3.12) has a unique set of solutions, and the estimated values ​​of the model parameters a and b are obtained as follows:

[0088]

[0089] In the formula

[0090] For a given x value, take a*x+b* as the estimated value of the regression function Y=aX+b, get the estimated value of the model parameter y*, perform global coordinate positioning on the image, take the upper left corner pixel of the first image as the coordinate origin, and establish a coordinate system with the upper boundary of the image as the X axis and the left boundary as the Y axis;

[0091] The coordinates of the upper left corner pixel point of the first row of images are located and the line equation of the upper left corner pixel point is estimated. The first row of images are registered pairwise using the feature association matching method to obtain the coordinates of the upper left corner pixel point of the row of images (x1 j ,yl j ), where j indicates that the image is located in the jth column of the row, and (x1 j ,yl j ) as the document value, and the least square method is used to estimate the parameters of the univariate linear regression function, and the equation of the pixel point line in the upper left corner of the row image is obtained as follows:

[0092] y * 1 i =a * 1x1 j +b * 1

[0093] where a * 1. b * 1 is the parameter value obtained after estimation, y * 1 j To estimate the ordinate value based on the line equation of the upper left pixel point of the row image, take the upper left pixel point of the first image of each row as the origin of the coordinates, and link them horizontally based on the line equation of the upper left pixel point of the row image;

[0094] The coordinates of the upper left corner pixel of the first column image are located and the equation of the upper left corner pixel of the column image is estimated. The first column image is registered by feature association matching method, and the coordinates of the upper left corner pixel of the column image (x2 i ,y2 i ), where i means the image is located in the i-th row of the column. According to the vertical feature of the upper left corner pixel line of the row image and the upper left corner pixel line of the column image, the slope of the upper left corner pixel line of the column image is:

[0095] a *2=1 / a * 1

[0096] Substitute the coordinate value of the pixel point in the upper left corner of the first row of the column into the line regression equation of the pixel point in the upper left corner of the column image to obtain:

[0097] b * 2=y21-a * 2x2j

[0098] The equation of the pixel line at the upper left corner of the column image is:

[0099] y * 2 i =a * 2x2 i +b * 2

[0100] When the upper left pixel of the first image in each column is taken as the origin of coordinates, the vertical links are made according to the line equation of the upper left pixel of the column image. After determining the position of the first column image, the links of each row of images are based on the first image of the row. The position of each image in the row is determined according to the line equation of the upper left pixel of the row image, and the coordinates of the upper left pixel of each image based on the global alignment coordinate system are determined:

[0101] (x2 i +x1 i ,y*2 i +y * 1 j )

[0102] The above formula is the coordinate of the pixel point in the upper left corner of the image.

[0103] At this point, the global alignment model based on linear regression is constructed, and accurate image linking is performed according to the position of the upper left corner pixel of all images in the global alignment coordinate system.

[0104] After the image registration is completed, the pixel point in the upper left corner of the two-dimensional sequence image is fixed in the coordinate system. In order to complete the image link, the image fusion is performed next, that is, the smooth flap value of the overlapping part of the image is corrected to make the overlapping part of the image transition smoothly, and the image fusion method of gradual in and gradual out is used for the fusion after registration.

[0105] Preferably, the printed document auxiliary identification module is designed: the auxiliary inspection features available for identification include: excess splashing on character edges, splashing in blank spaces, roughness of stroke edges, local stroke morphology, toner stacking density, stability of printed document features, and global character morphology; another way of auxiliary identification is: extracting the same character of the same font and size in the sample and the document application respectively, and using the printed document auxiliary identification module to contour, rotate, adjust the color, drag and compare, and adjust the transparency of the character image to compare the texture differences of the character image.

[0106] Compared with the prior art, the innovations and advantages of this application are:

[0107] (1) The present application places a microscope on a stepper motor vernier gimbal and combines it with a high-speed industrial camera to develop an automatic microscopic scanning digital microscope. First, the character image is acquired through an image acquisition instrument. Second, the noise caused by the image acquisition is eliminated through preprocessing. Then, the printed document image is extracted for features. Finally, the feature distance between the two printed documents is calculated to obtain the identification result. The image acquisition quality will affect the image feature extraction and classification recognition. The present application can quickly and accurately acquire images that reflect the rich detail information of the printed document characters. Under the control of computer software, the camera shoots images as the stepper motor vernier gimbal moves and can display the video images in real time on the video window of the computer software, thereby greatly reducing the intensity of the acquisition work and avoiding acquisition errors caused by manual acquisition. The large-scale image sequence with overlapping areas between adjacent images collected is then linked through a linking algorithm to obtain a microscopic magnified image with a large field of view, which can be used to extract complete character features in subsequent computer printed document inspection. The image global microscopic magnification acquisition instrument of the present application can clearly, completely, quickly and accurately collect microscopic magnified images of various areas on the printed document, so that rich print detail features can be clearly captured and directly used for printed document identification, which has great practical significance and broad application prospects.

[0108] (2) This application combines the automatic microscope platform system with the image linking technology. First, the original image global high-magnification scanning system is upgraded to overcome the shortcomings of the system such as small acquisition range, low acquisition efficiency, need for manual assistance, and large system errors, to ensure the quality of the acquired image and the accuracy of the system control, as well as to select and replace more reasonable main components and update the system architecture, so that the instrument is more powerful and easier to use. Secondly, for the acquired local microscopic image of the characters, the linking algorithm is selected according to the characteristics of the image, and the global alignment model for large-scale image linking is used to complete the image linking. Finally, the microscopic image of the same character with the same font size in the document and the sample document is extracted to analyze the texture differences of the same characters printed by different printers, and the texture differences are classified. Based on the difference in character texture, an auxiliary inspection module is developed to help document inspectors to efficiently and accurately perform auxiliary inspections on printed documents, thereby enhancing the efficiency and accuracy of document inspection work.

[0109] (3) In view of the defects of the existing system, such as slow acquisition rate, large image exposure difference and large system error, the hardware structure and process of the existing system were upgraded. By increasing the length of the vernier gimbal, the instrument can scan the entire A4 paper when performing two-dimensional area scanning. In view of the problems of slow acquisition rate and large image exposure difference, the scanning method was redesigned, that is, the camera captures images at equal time intervals when moving with the stepper motor. The camera uses a high-speed frame exposure camera so that the camera can capture clear and still images every time during rapid movement, which not only improves the acquisition rate but also ensures the quality of the acquired images. In order to reduce the system error and ensure that the overlapping areas of adjacent images are of the same size, the subdivision number of the stepper motor subdivision driver is adjusted to more than 32 subdivisions, so that the movement displacement of the vernier gimbal during the exposure time approaches 0, effectively reducing the system error. The acquisition system control software was designed and the practicability of the acquisition scheme was verified through experiments. It has a high acquisition speed and the microscope has clear focus.

[0110] (4) The feature association matching method is used for registration. According to the spatial arrangement characteristics of the two-dimensional image sequence, a global alignment model based on linear regression is designed to quickly register large-scale images and effectively eliminate the matching errors when the images are registered pairwise. The pairwise registration of images has high speed and accuracy. A linking algorithm that takes into account both linking speed and accuracy is proposed. Finally, the image is fused using the gradual in and out method to achieve a smooth transition in the overlapping area of ​​the image. The application of the image global microscopic magnification system is to realize the auxiliary inspection of printed documents. Based on the printing difference, an auxiliary inspection software module is developed to provide functions such as image rotation, contouring, color adjustment, transparency, drag comparison, etc. The auxiliary inspection software module has the characteristics of scientificity, ease of use, and acceptability. It is a powerful auxiliary tool for document inspection personnel to complete manual verification quickly and professionally. BRIEF DESCRIPTION OF THE DRAWINGS

[0111] Figure 1 It is the wiring diagram of the drive control circuit designed for the upgrade of the drive control circuit board.

[0112] Figure 2 It is a schematic diagram of the process of calculating the deflection angle of the scanning stabilization platform.

[0113] Figure 3 It is a schematic diagram of calculating the scanning image when the deflection angle of the scanning stabilization platform is too large.

[0114] Figure 4 It is a schematic diagram of the automatic scanning process of the enhanced design of the image microscopy scanning solution.

[0115] Figure 5 It is an automatic scanning roadmap for enhanced design of image microscopy scanning solutions.

[0116] Figure 6 This is an example of a document collected in the image acquisition experiment.

[0117] Figure 7 It is a schematic diagram of the local microscopic registration strategy of images.

[0118] Figure 8 It is a schematic diagram of the equation for estimating the pixel point in the upper left corner of the row image.

[0119] Fig. 9 It is a schematic diagram of the construction of the global alignment model based on linear regression.

[0120] Fig.10 This is the image registration time diagram when the sampling intervals are 1, 2, 4, 6, and 8 in the experiment.

[0121] Fig.11 It is a sequence diagram of local images to be registered in the microscopic image linking experiment.

[0122] Fig.12 This is a schematic diagram of the local registration results when the link model sampling interval is 4.

[0123] Fig.13 This is a schematic diagram of the image fusion results using the gradual in and gradual out method.

[0124] Fig.14 It is a schematic diagram of the auxiliary inspection function module structure and interface design. Specific implementation methods

[0125] The technical solution of the high-precision global microscopic image printed document identification system provided by the present application is further described below in conjunction with the accompanying drawings, so that those skilled in the art can better understand the present application and implement it.

[0126] To obtain images that meet the requirements of document inspection, the scanner resolution is too low to truly show the details of the printed document. The rich details of the image can only be shown under a high-power microscope. Therefore, it is necessary to magnify the characters in the printed document and then take a photo. However, the field of view of the microscope is very limited. Only a part of a character is shown under a high-power microscope. The collection of a small range of documents requires a lot of lenses. If the collection method is to move the lens manually, it is very time-consuming, and the obtained partial character image cannot be directly used for printed document identification. The partial image must be linked into a complete character image to extract the complete character features. Due to the differences in the electronic systems, key components, toners, etc. of different printers, these differences are reflected in the output print graphics. By extracting the microscopic images of the same character in the same font and size in the document and the sample document and comparing the texture differences, visual auxiliary inspection can be performed.

[0127] Firstly, the collected documents are magnified microscopically and then photographed to obtain images, and then the multiple collected partial images are linked into a complete character image. The regional scanning design is adopted and a linking algorithm is designed based on this.

[0128] Secondly, in view of the defects of the existing system, such as small acquisition range, slow acquisition rate, large image exposure difference and large system error, the hardware structure and process of the existing system were upgraded. By increasing the length of the vernier pan-tilt, the instrument can scan the entire A4 paper when performing two-dimensional area scanning; in view of the problems of slow acquisition rate and large image exposure difference, the scanning method was redesigned, that is, the camera captures images at equal time intervals when moving with the stepper motor. The camera uses a high-speed frame exposure camera so that the camera can capture clear and still images every time during rapid movement, which not only improves the acquisition rate but also ensures the quality of the acquired images; in order to reduce the system error and ensure that the overlapping areas of adjacent images are of the same size, the subdivision number of the stepper motor subdivision driver is adjusted to more than 32 subdivisions, so that the movement displacement of the vernier pan-tilt during the exposure time approaches 0, effectively reducing the system error, and the acquisition system control software is designed to verify the practicality of the acquisition scheme through experiments.

[0129] Thirdly, the feature association matching method is used for registration. According to the spatial arrangement characteristics of the two-dimensional image sequence, a global alignment model based on linear regression is designed to quickly register large-scale images and effectively eliminate the matching errors when registering two images. Finally, the gradual in and out method is used to fuse the images, so that the overlapping areas of the images can achieve smooth transition. The new registration method and fusion method are applied to the images collected by the existing system and also achieve good linking effects.

[0130] Finally, the application of the global microscopic magnification system for images, namely the auxiliary inspection of printed documents, is realized. Microscopic magnified images of the same characters with the same font size in the documents and the specimen documents are extracted for texture difference comparison to achieve visual auxiliary inspection. An auxiliary inspection software module is developed based on printing differences to provide efficient auxiliary tools for document inspection work.

[0131] The image global microscopic magnification acquisition system upgraded and developed in this application has a reasonable structure, can select an acquisition area of ​​any size on A4 paper, and reset the stepper motor driven by the acquisition system control software to locate the starting point of the acquisition area and realize fast and accurate image acquisition of the characters in the selected acquisition area, which well meets the large-scale microscopic image acquisition and linking needs of printed documents. In addition, the developed auxiliary inspection software module has good identification ability when the same characters with the same font and size exist in the document and the sample document.

[0132] 1. Global high-magnification image scanning system architecture

[0133] The printed or printed documents are scanned at a high magnification around the entire body, including a high-power microscope lens, a high-definition camera, a vernier head and a stabilizing platform. The stabilizing platform is placed under the vernier head fixed with a support rod. A high-definition camera nested with the high-power microscope lens is installed on the rod, and a ring light source is placed around the high-power microscope lens. The vernier head is moved horizontally or vertically, and the high-definition camera takes microscopic images during stepping movement, and the images are transmitted to the computer for storage. The image linking algorithm then links the local images into regional document images, taking into account the integrity of the microscopic and character images of the printing details.

[0134] The document image acquisition control process is: place the document on a stable table, cover it with glass, open the high-definition camera preview, observe the image clarity, adjust the focus knob on the camera connecting rod to make the image reach maximum clarity, move the document to locate the character image, and select the image acquisition plan. The image acquisition plan includes automatic acquisition and single-step acquisition. Automatic acquisition is to pre-set the horizontal and vertical movement steps of the vernier gimbal, and the camera shoots images at the set speed and equal intervals; single-step acquisition is to capture a single image, set the control vernier gimbal to run in single steps in the four directions of front, back, left and right, and the camera captures a single image in single steps. Multiple images are linked to obtain a global microscopic magnified image.

[0135] However, the above system still has many shortcomings and can be further improved. These include: the electric control vernier gimbal used in the system is not long enough, and when the system performs two-dimensional area scanning, it cannot cover the content of the entire A4 paper, and needs to rely on manual movement of documents to assist in collection, resulting in low collection efficiency; the camera used in the system is a low-speed camera with a long exposure time, low automatic collection efficiency, and a large difference in exposure between the images taken by the camera before and after, resulting in large registration errors or even errors; the hardware process design is simple and rough, and the key component of the system, the electric control vernier gimbal, is exposed to the air, and moisture, dust, and debris will fall on the precision screw of the electric control vernier gimbal, seriously affecting the accuracy of the electric control vernier gimbal, and lacks the necessary external packaging design.

[0136] 2. Document magnification and scanning system upgrade design

[0137] (1) Ensure that the fully automatic scanning can cover the entire A4 paper content. In addition, there needs to be an overlapping area between adjacent images in the two-dimensional image sequence captured by the camera. The overlapping area is for the next image link. The setting of the overlapping area not only affects the number of images collected, but also affects the quality of the link. (2) It has a high acquisition speed. When scanning documents, the magnification of the high-power microscope lens needs to be adjusted to the maximum (the magnification of the adapter lens of this system is 0.5X, and the magnification of the objective lens is adjusted to a maximum of 4.5X). Due to the limited field of view of the high-power microscope, only partial images of the characters can be captured. It takes tens of thousands of lenses to capture a whole A4 paper. The step-by-step pause camera shooting method and the long exposure time of the low-speed camera will take several days to capture a whole A4 paper, which seriously affects the efficiency of the acquisition. In order to overcome the problem of slow acquisition rate, the electric control vernier gimbal is set to move at a higher speed with the camera, and a high-speed industrial camera is used to capture images. The frame rate of the high-speed industrial camera is very high, and each captured image is a still image. (3) The microscope has clear focus. If there is a small displacement change in the microscope magnification document, it may cause the image to be unclear under the microscope, which cannot meet the acquisition requirements. Therefore, the electronically controlled vernier head supporting the microscope must be very parallel, the stable platform supporting the document must be very flat, and the glass surface covering the document must be very flat. (4) The automatic linking algorithm is fast and accurate. Since the collected images are two-dimensional sequence images, almost every image is linked to the four surrounding images. The pairwise registration of the images requires very high speed and accuracy, and a linking algorithm that takes into account both linking speed and accuracy is required.

[0138] Based on the above performance requirements, an upgrade plan for the magnification scanning system is designed.

[0139] (I) Microscope magnification hardware structure upgrade

[0140] The improvements include: the X-axis electric-controlled vernier stage is fixed with a bracket, a camera and a high-power microscope lens are fixed on the bracket, and a stable platform is fixed on the Y-axis electric-controlled vernier stage for placing documents, wherein the stroke of the X-direction vernier stage exceeds the width of A4 paper, and the stroke of the Y-direction vernier stage exceeds the length of A4 paper. After the near ends of the X- and Y-axis electric-controlled vernier stages are reset, the upper right corner of the A4 paper is located directly below the high-power microscope lens, so the scan can cover the entire A4 paper. The X-axis direction vernier stage moves horizontally at a uniform speed driven by a stepper motor, and the Y-axis direction vernier stage moves in steps driven by a stepper motor. During the uniform motion of the X-axis vernier stage equipped with a camera, the camera captures images at equal time intervals. Each image taken is sequentially transmitted to a computer for naming and storage. The acquisition link system algorithm links the saved image sequence to obtain a large-field global microscopic image of the printed document.

[0141] The working principle of the microscope magnification hardware system is divided into two parts: one is the drive control part, and the other is the image acquisition part. The drive control module controls the vernier gimbal to perform two-dimensional plane movement, including the speed and direction control of the vernier gimbal. The computer end transmits control instructions, speed and step instructions to the control circuit, and the driver program realizes speed setting, zeroing operation, direction setting, and displacement setting.

[0142] When collecting printed documents, place the printed documents on a stable table, adjust the light intensity of the LED lamp, the magnification of the microscope, set the moving speed of the horizontal cursor pan and the capture time interval, the step parameters of the vertical cursor pan, and make the image focus clear, select the character area to be collected, reset the X and Y axis motors to the starting point of the collection area, and start the collection. The X-axis cursor pan moves at a high speed with a high-speed camera. During the movement, the camera captures images at equal time intervals. The high-speed camera has a high exposure frame rate to ensure that a static image is captured each time without smearing and blurring. After the X-axis motor drives the camera to complete a line of scanning, the Y-axis stepper motor moves upward in steps, so that the next line is located below the high-power microscope head, and the X-axis motor drives the camera to move in the opposite direction to scan the image, and the cycle is repeated until the image of the specified area is collected.

[0143] (II) Drive control circuit board upgrade design

[0144] The electric-controlled vernier gimbal is driven by a stepper motor to rotate the precision screw to drive the slider to move along the guide rail. Pulses of a certain frequency are sent to the stepper motor to control the movement speed of the stepper motor. The speed and displacement of the vernier gimbal are controlled by the stepper motor. In addition, the stepper motor provides a subdivision drive mode to drive the motor operation. By setting the number of subdivision drives, precise control of the stepper motor can be achieved.

[0145] The subdivision driver chip uses DMD402A, where A+, A-, B+, and B- are the input currents of the bidirectional four-wire stepper motor. The electrical characteristics of the RS232 serial port are utilized, and the DCD line is used to detect the proximal limit signal of the stepper motor to realize the zero return and proximal limit control of the stepper motor. The CTS line is used to detect the far-end limit signal of the stepper motor to realize the far-end limit control of the stepper motor. DTR is used to control the movement direction of the stepper motor, RTS is used to control the X / Y-axis motor switching, and TXD is used to send digital pulses to the stepper motor subdivision driver chip DMD402A.

[0146] During the acquisition work, the X-axis and Y-axis motors move independently in time-sharing. Only one driver chip is needed for the two axial motors. Electromagnetic relays are used to switch between the X and Y axes to complete the transmission of different axial drive currents. The control system uses the MJE13007 NPN triode. The control system requires three input voltages, namely 0V, 5V and 24V provided by the switching power supply. The wiring diagram of the drive control circuit is shown in the figure. Figure 1 .

[0147] (III) Hardware driver design

[0148] The vernier pan / tilt is controlled by a stepper motor driver, which sends and controls level signals through the RS232 interface. The computer inputs instructions to the driver to control the travel and image acquisition of the vernier pan / tilt.

[0149] (1) Query command

[0150] Both zero query and limit query are queried through the serial port DCD line. If the stepper motor reaches the boundary of the mechanical stroke, the limit switch is triggered to turn on, making DCD a low level. The zero point is the limit point in the negative direction of the stepper motor. The far limit query is queried through the CTS line. If the stepper motor reaches the far boundary of the mechanical stroke, the limit switch is triggered to turn on, making CTS a low level. For zero query or near limit query, the CDHolding method of the SerialPort class is used to read the level signal on the DCD line, thereby querying the zero signal; for far limit query, the CTS Holding method is used to read the level signal on the CTS line, thereby querying the limit signal.

[0151] Near-end limit (zero return) query: if (serialPort1.CDHolding(O));

[0152] Remote limit query: if(serialPort1.CTSHoldingO));

[0153] (2) Setting instructions

[0154] Speed ​​setting: The output pulse number PPS determines the speed of the stepper motor. The speed setting has two aspects:

[0155] a) String binary code: fastest speed serialPort1.Write("Ox55"); medium speed serialPort1.Write("Ox3Ox3"); slow speed serialPort1.Write("Ox0Ox15");

[0156] b) Serial port baud rate: high baud rate serialPort1.BaudRate = br115200; medium baud rate serialPort1.BaudRate = br19200; low baud rate serialPort1.BaudRate = br9600;

[0157] Among them, Ox5 is the binary number 0101, and Ox3 is the binary number 0011. When the speed is set according to the string content, the fastest speed is twice the medium speed, and similarly, the medium speed is twice the low speed.

[0158] The moving speed of the stepper motor is divided into acquisition speed and reset speed. The camera does not shoot when the stepper motor is reset. Under the subdivision number setting of the subdivision driver, the acquisition speed and reset speed of the stepper motor can be set by setting different baud rates and sending data.

[0159] Direction setting: Send a level control signal to the Dir pin of the subdivision driver chip DMD402A through the Dtr pin of the RS232 serial port to control the running direction of the motor;

[0160] Forward displacement: serialPort1.DtrEnable(false); Reverse displacement: serialPort1.DtrEnable(true);

[0161] Zero setting: First, get the zero status by the zero query command. If the machine is not zeroed, start the zero setting and perform displacement zeroing in combination with the DCD limit signal.

[0162] Check whether it is reset to zero: if(serialPortl.CDHolding());

[0163] Zero setting: serialPort1.CDHolding(false);

[0164] while(serialPort1.CDHolding())

[0165] serialPort1.Write(byte[]buffer,intoffset,intcount).

[0166] (3) Control instructions

[0167] The image acquisition control process is:

[0168] 1. Initialize the camera (CameraInit(intindex)); 2. Run the camera and start capturing image data (CameraPlay); 3. Set the image resolution (CameraSetResolution); 4. Display the image (CameraShowImage); 5. Get the image and save it as a BMP file (CameraSavelmage); 6. Turn off the camera acquisition mode and data connection (CameraFree);

[0169] Displacement axis switching: Use the RTS line of the serial port to send high and low levels to the base of the transistor to achieve switching between X-axis and Y-axis displacement: X-axis displacement: serialPort1.RtsEnable(true); Y-axis displacement: serialPort1.RtsEnable(false);

[0170] Displacement control: The X-axis vernier gimbal drives the camera and high-power microscope head to move at a constant speed. The camera captures images at equal time intervals. After completing a line of scanning, the Y-axis stepper motor drives the paper stabilization stage to step once, and the X-axis motor drives the camera to scan in the opposite direction until the scanning of the specified area is completed.

[0171] 3. Enhanced design of imaging microscopy solutions

[0172] (I) Calculation of scanning parameters

[0173] The image size is 640*480, the optical size of the camera CMOS image sensor is 1 / 2", the pixel size is 3.2μm*3.2μm, and the maximum frame rate is 60fps.

[0174] Optical magnification = 0.5 × 4.5 = 2.25 (times), electronic magnification = 21 × 25.4- = 8 = 66.68 (times), when the vernier head moves in the direction, the displacement of the vernier head within the camera capture time interval is less than 2.650mm, and when the vernier head moves in the stepping motion, the stepping amount of the vernier head is less than 1.970mm.

[0175] From the parameters of high-speed industrial cameras, we know that the maximum frame rate of the camera is 60fps. To ensure that the high-speed industrial camera can capture still images during fast motion without blurring or smearing, the maximum speed of the stepper motor during line scanning cannot exceed 2.650*60=159 (mm / s), otherwise a clear still image cannot be captured.

[0176] The inherent step angle of the stepper motor is 1.8 degrees, and the lead of the screw is 2mm. In order to achieve high-precision displacement control of the stepper motor, the subdivision number of the stepper motor subdivision driver is set to 32, that is, 6400 pulses are required for the stepper motor to rotate one circle. At the same time, the baud rate of the serial port is set to 19200, and the binary code sent is 0x55. The moving speed of the cursor pan / tilt is:

[0177]

[0178] The exposure time is selected as 1300us, the subdivision number of the subdivision driver is set to 32, and the displacement of the vernier gimbal during the exposure time is:

[0179] 3000μm×1300×10 -6 =3.9(μm)

[0180] Set the image overlap area size to 10%, that is, the step distance in the X and Y directions each time is 90% of the size of the corresponding area of ​​the actual image, that is:

[0181] X-direction stepping distance: Y direction step distance: 1.97mm×90%=1.80(mm);

[0182] During automatic acquisition, the serial port baud rate is set to 19200, the sent binary code is 0x55, and the calculated sending pulse frequency is 9600; the subdivision number of the subdivision driver is set to 32, that is, 6400 pulses are required for each rotation of the stepper motor or each 2mm movement of the vernier pan / tilt.

[0183] Number of pulses required for displacement in the X direction:

[0184] Number of pulses required for stepping in the Y direction:

[0185] The number of pulses required for the displacement within the time interval of the stepper motor in the X direction is set to 7680, that is, the interval between adjacent images is 2.40mm, the number of stepping pulses in the Y direction is set to 5760, the interval between adjacent images in the vertical direction is 1.80mm, the uniform motion speed of the X-axis cursor gimbal is 3mm / s, and the camera capture time interval is 0.8s.

[0186] The size of the acquisition area is set to 180mm*270mm, and the reset point of the X-axis and Y-axis stepper motors is set at the position where the characters in the upper left corner of the paper are facing the lens. Taking this as the starting point, the acquisition area is divided into cells, with 75 cells in each row and 150 cells in each column. Image acquisition only needs to move to the starting point of the acquisition area, and then calibrate the acquisition area to achieve automatic acquisition of the calibrated acquisition area.

[0187] (II) Calculation of the deflection angle of the scanning stabilization platform

[0188] When collecting images, the CMOS camera is mounted on the high-power microscope head, and the light from the ring-shaped LED light source is vertically irradiated to the surface of the document on the stabilizing table. After optical magnification, the image is photographed by the CMOS camera. The CMOS camera photographs different areas of the document as the X-axis vernier gimbal moves. This rectangular area is used as the collection area. Mechanical errors in the installation of the document stabilizing table, vernier gimbal and CMOS camera are inevitable, resulting in the boundary of the rectangular image area photographed by the CMOS camera and the movement direction of the vernier gimbal not being completely parallel, resulting in the calculation of the scanning stabilizing table deflection. Figure 2(a) When the deflection angle between the boundary of the rectangular image area and the vernier gimbal is greater than 0, the overlapping images will be misaligned, which will cause blanks in the collection document during the overlay scanning process, thereby losing necessary image information; when there is no deflection angle (deflection angle = 0), such as Figure 2 (b) There will be no misalignment between the scanned overlapping images, and more images will be collected, and the necessary image information will be retained, which is not conducive to image linking. During the installation process, if the mechanical error is too large, the scanned images will not have overlapping areas and a large amount of image information will be lost, that is, the deflection angle is too large, such as Figure 2 .

[0189] Assume that the deflection angle is α, and the width and height of the image captured by the CMOS camera is M×N. Figure 3 The deflection angle of the non-overlapping area of ​​adjacent images is:

[0190]

[0191] The deflection angle between the camera and the vernier gimbal can be reduced by adjusting the installation position of the rotating CCD camera, but the deflection angle cannot be avoided. How to eliminate the deflection angle effect is considered in the automatic link algorithm.

[0192] There is a quantitative relationship between the pixel size of the image captured by the CMOS camera through the microscope magnification lens and the physical length of the actual document collection area. This application defines the quantitative relationship between the image pixel and the physical length as a vernier ruler, which means that each image pixel corresponds to the physical length of the actual collection area. The optical magnification of the high-power microscope lens is recorded as m, and the pixel size of the CMOS image sensor is x (μm). The vernier ruler under this magnification is x / m.

[0193] Assume the deflection angle is α, and the vernier scale under this multiple is f. The physical size of the acquisition area corresponding to the image is M×f in width and N×f in height. The image coordinate system and the electronically controlled vernier gimbal coordinate system are the same coordinate system. The calculation method of the deflection angle is:

[0194] Step 1: Place the document on the paper stabilization table and capture image I1;

[0195] Step 2: Drive the electronically controlled vernier gimbal to move a distance △x along the X-axis direction to collect image I2, where M×f×10%<△x<M×f×90%, so that two adjacent images have overlapping areas;

[0196] Step 3: Use the link algorithm to calculate the overlap position of the two images (x p ,y p ), angle calculation formula:

[0197]

[0198] After calculating the deflection angle, the relative positions of the high-definition camera and the electronically controlled vernier head are continuously adjusted during the mechanical installation to reduce the deflection angle to a minimum.

[0199] (III) Microscopic scanning process

[0200] Microscopic image scanning adopts two-dimensional scanning method. The microscope is fixed on the bracket of the X-axis vernier stage through the lens frame, which is located above the paper stabilization table. The vernier stage is equipped with a CMOS camera to scan the document in two-dimensional plane motion. Figure 4 It is an automatic scanning process.

[0201] After freely selecting the acquisition area, the cursor gimbal automatically runs to acquire images. Assuming that the number of images acquired in a certain acquisition area is (m+1)*(n+1), it means that m+1 rows of images are acquired, and each row has n+1 columns. Figure 5 (a) is the process of automatic scanning. The electric-controlled vernier gimbal first moves horizontally from the starting point of the acquisition area. The CMOS camera captures the image and moves from left to right to collect n+1 images in sequence. After completing the scanning of the first row of the designated acquisition area, the Y-axis motor moves upward one step, and the electric-controlled vernier gimbal continues to scan the second row in the opposite direction. The acquisition route is in the shape of a "Z". Figure 5 (b) until the image acquisition of the specified area is completed. The image number represents the acquisition order. Numbering the images in the acquisition order facilitates subsequent image processing.

[0202] When this scanning scheme is used to collect images, two adjacent images in each row have the same size of overlapping areas, and two adjacent images in each column also have the same size of overlapping areas. This not only ensures the overlapping areas required for image linking, but also facilitates the establishment of a mathematical model for large-scale image linking, thereby further improving the linking speed.

[0203] (IV) Image acquisition experiment

[0204] After designing the system hardware structure, driver program and setting scanning parameters, the feasibility of the acquisition scheme was verified through experiments. A collection experiment was conducted. The range of the documents collected in the collection experiment is 5 rows and 8 columns, such as Figure 6 .

[0205] From the results of the first image acquisition, it was found that the content of the captured images was not exactly aligned. The character strokes were obviously not in a straight line in the vertical direction, and the acquisition results could not meet the acquisition requirements. Further analysis showed that the upper and lower strokes of the character content could not be aligned. When the CMOS camera took pictures within the exposure time, the electric control vernier pan-tilt moved to the limit switch during this period and stopped. The original plan believed that the electric control vernier pan-tilt and the CMOS camera stopped at the same time when they touched the limit switch. When scanning the next line, the vernier pan-tilt and the CMOS camera started at the same time to acquire the image of the next line. This would cause the camera to start shooting the next line within the last exposure time of the camera in the previous line, that is, the horizontal displacement of the vernier pan-tilt movement was not an integer multiple of the width of a single image. Therefore, the images of the upper and lower adjacent lines shot were not aligned in content, and no image was captured at the stop point of the vernier pan-tilt. The captured characters had serious misalignment images, resulting in large errors or even registration failures during image registration, and the loss of the captured images. The acquisition plan needs to coordinate the camera's capture timing with the movement status of the electronically controlled vernier gimbal.

[0206] Therefore, the present application improves the acquisition scheme, and after selecting the acquisition area, also determines the horizontal movement distance, divides the distance by the image length and rounds it up and adds 1, so that the stepper motor and the camera are started at the same time, and the stepper motor stops running after the camera exposure is completed, so that the camera capture timing is coordinated with the movement state of the electric control vernier gimbal, and the captured image is aligned in the horizontal and vertical directions.

[0207] From the acquisition experiment results, it can be concluded that the image brightness is very high and the image display is very clear when the high-speed camera is used to capture images at equal time intervals. Compared with the step-by-step moving method, it can take into account both the acquisition rate and the acquisition quality, and the strokes of each row of images are neatly aligned in the horizontal direction, and the strokes of each column of images are also neatly aligned in the vertical direction. The images taken are aligned in content, which basically eliminates the influence of the deflection angle, which is very beneficial to the subsequent image linking. The image acquisition results meet the design requirements.

[0208] 4. Large-scale local microscopic image linking method

[0209] Each image acquired by the system has an overlapping area with the surrounding images in the horizontal or vertical direction. Any image can be linked in any direction. Due to the large image resolution and the large number of images to be linked, if the two images are registered, not only will the linking efficiency be seriously reduced, but also serious matching accumulation errors will be generated at the closed part of the image sequence. These accumulated errors will lead to subsequent image registration errors. Therefore, this application designs a linking model that takes into account both linking effect and linking efficiency.

[0210] 1. Local microscopic registration strategy

[0211] Image registration is performed by locating the coordinates of the acquired two-dimensional sequence images in the same coordinate system. The coordinates of the upper left corner pixel of the image are selected and a registration strategy is adopted for each row of images. The registration strategy diagram is shown in Figure 7 As shown. The image registration is in the same coordinate system. First, the registration algorithm is used to register the first row of images in pairs. The smooth flap registration algorithm is used to calculate the coordinates of the upper left corner pixel of each image in the coordinate system, and the spacing of the upper left corner pixels of the image and the equation of the line where the upper left corner pixel of the first row of images are located are calculated. Then, the first column of images is registered in pairs by the global link algorithm of coordinate positioning. The coordinates of the upper left corner pixel of each image in the coordinate system are calculated by the registration algorithm, and the spacing of the upper left corner pixels of the image in the vertical direction and the equation of the line where the upper left corner pixel of the first column of images are located are calculated. Then, the coordinates of the upper left corner pixel of each row of images in the first column are used as reference points to calculate the equation of the line where the upper left corner pixel of each row of images is located. The coordinates of the upper left corner pixel of each row of images in the coordinate system are calculated according to the spacing of the upper left corner pixels of the row-wise images. At this point, the position of the upper left corner pixel of each image in the two-dimensional image sequence collected in the coordinate system is determined. After the image registration is completed, the overlapping area is fused by the image fusion method to obtain an image with a smooth transition in the overlapping area.

[0212] The registration strategy is based on the fact that the overlapping areas of adjacent images in the horizontal direction and the vertical direction of the images collected by the system are the same in size and position. The method of calculating the equation of the straight line where the pixel point in the upper left corner of the image is located and performing linear regression on the coordinates of the pixel point in the upper left corner of the image is adopted to eliminate the cumulative error generated at the closed part of the image sequence when the images are registered one by one. The displacement of the vernier gimbal in this application is almost 0 within the capture time interval, the vernier gimbal has high accuracy, and the coordinate error of the pixel point in the upper left corner of the image is very small, which effectively improves the speed and accuracy of image registration.

[0213] 2. Global Link Model for Coordinate Positioning

[0214] According to the characteristics of the collected images, there are fixed-size overlapping areas between images in the horizontal and vertical directions, and there is only horizontal or vertical translation transformation between the images. In addition, the images acquired by the high-speed frame exposure camera have high brightness and small exposure differences. Therefore, in order to make full use of the global information of the image and improve the matching accuracy, this application uses feature association matching based on smooth lobes to align the adjacent images in the first row and the first column. When performing image registration, scalar reinforcement learning method is used to find the best matching position of feature association matching.

[0215] In the acquisition area, the number of images in the first row and the first column is not large, and the calculation amount of the feature association matching method is not large. The position of the upper left corner pixel of the first row and the first column in the coordinate system can be accurately calculated, and then the spacing of the upper left corner pixel points of the row and column directions and the straight line equation of the upper left corner pixel points of the row and column directions can be calculated. By taking the coordinates of the upper left corner pixel point of the first image in each row as the reference point, the straight line equation of the upper left corner pixel point of each row of images can be calculated. The equation is estimated by the univariate linear regression method based on the least squares method.

[0216] Assume that the univariate linear regression function is Y=aX+b, where Y and X are random variables, a and b are parameters to be estimated, and the least squares method is used to estimate the values ​​of parameters a and b. Let:

[0217] y i =ax i +b+ε i

[0218] In the formula, parameters a and b are independent of each other, and ε i is the random error, and square the above terms to get:

[0219]

[0220] When the above formula takes the minimum value, i +b has the smallest error, constructor:

[0221]

[0222] n is the corresponding parameter, let P(a,b) take the minimum value, that is, take the partial derivatives of P with respect to parameters a and b and make them zero:

[0223]

[0224] The equation system is:

[0225]

[0226] x i Not exactly the same, the coefficient determinant of the above equations is:

[0227]

[0228]

[0229] Therefore, the system of equations (3.12) has a unique set of solutions, and the estimated values ​​of the model parameters a and b are obtained as follows:

[0230]

[0231] In the formula

[0232] For a given value of x, take a * x+b * As the estimated value of the regression function Y = aX + b, the estimated value of the model parameter y* is obtained, and the global coordinate positioning of the image is performed. The coordinate system is established with the upper left corner pixel of the first image as the coordinate origin, the upper boundary of the image as the X-axis, and the left boundary as the Y-axis.

[0233] The coordinates of the upper left corner pixel point of the first row of images are located and the line equation of the upper left corner pixel point is estimated. The first row of images are registered pairwise using the feature association matching method to obtain the coordinates of the upper left corner pixel point of the row of images (x1 j ,yl j ), where j indicates that the image is located in the jth column of the row, and (x1 j ,yl j ) as the document value, and the least square method is used to estimate the parameters of the univariate linear regression function, and the equation of the pixel point line in the upper left corner of the row image is obtained as follows:

[0234] y * 1 j =a * 1x1 j +b * 1

[0235] where a * 1. b * 1 is the parameter value obtained after estimation, y * 1 j In order to estimate the vertical coordinate value based on the line equation of the upper left pixel point in the row image, when the upper left pixel point of the first image in each row is taken as the coordinate origin, the horizontal links are made based on the line equation of the upper left pixel point in the row image. Figure 8 Schematic diagram of the equation for estimating the pixel point in the upper left corner of the row image.

[0236] The coordinates of the upper left corner pixel of the first column image are located and the equation of the upper left corner pixel of the column image is estimated. The first column image is registered by feature association matching method, and the coordinates of the upper left corner pixel of the column image (x2 i ,y2 i ), where i means the image is located in the i-th row of the column. According to the vertical feature of the upper left corner pixel line of the row image and the upper left corner pixel line of the column image, the slope of the upper left corner pixel line of the column image is:

[0237] a * 2 = 1 / a * 1

[0238] Substitute the coordinate value of the pixel point in the upper left corner of the first row of the column into the line regression equation of the pixel point in the upper left corner of the column image to obtain:

[0239] b * 2=y21-a * 2x2 j

[0240] The equation of the pixel line at the upper left corner of the column image is:

[0241] y * 2 i =a * 22x2 i +b * 2

[0242] When the upper left pixel of the first image in each column is taken as the origin of coordinates, the vertical links are made according to the line equation of the upper left pixel of the column image. After determining the position of the first column image, the links of each row of images are based on the first image of the row. The position of each image in the row is determined according to the line equation of the upper left pixel of the row image, and the coordinates of the upper left pixel of each image based on the global alignment coordinate system are determined:

[0243] (x2 i +x1 j ,y * 2 i +y * 1 j )

[0244] The above formula is the coordinate of the pixel point in the upper left corner of the image.

[0245] At this point, the global alignment model based on linear regression is constructed. Fig. 9 According to the position of the upper left corner pixel of all images in the global alignment coordinate system, accurate image linking is performed.

[0246] After the image registration is completed, the pixel point in the upper left corner of the two-dimensional sequence image is fixed in the coordinate system. In order to complete the image link, the image fusion is performed next, that is, the smoothing flap value of the overlapping part of the image is corrected to make the overlapping part of the image transition smoothly, and the image fusion method of gradual in and gradual out is used for the fusion after registration.

[0247] (III) Microscopic image linking experiment

[0248] In order to verify the registration scheme proposed in this application, a large-scale image sequence of 17 rows and 17 columns was collected for registration experiments.

[0249] The size of all original images to be registered is 640*480, and the image overlap area is 10% of the size of the entire image. According to the linear regression global alignment model, when performing feature association matching on the first row and the first column of images, if all the pixels in the overlapping area are involved in the operation, the large amount of calculation will affect the real-time performance of the system. Therefore, block sampling is performed on the overlapping area, and the pixel values ​​are extracted every few pixels. The relevant matching coefficient of the sampling matrix is ​​calculated, and then the registration position of the original image is calculated based on the sampling interval. In order to study whether the link quality can be taken into account under the registration speed, the image registration time when the sampling interval is 1, 2, 4, 6, and 8 is statistically analyzed. Fig.10 shown.

[0250] When the sampling interval is 1, the registration time exceeds 50s, and when the sampling interval is 4, 6, and 8, the registration time is about 5s. The registration time is relatively short and can meet the real-time requirements of the system. Moreover, the registration time difference between them is very small, but the difference with the former registration time is very large. Therefore, the global registration results and local registration results of the images when the sampling interval is 4 and 8 and the sampling interval is 1 are compared respectively to determine whether the registration quality can be guaranteed under the condition of shortening the registration time, and to select an optimal sampling interval. The image sequence to be registered selected in this application, the local image sequence to be registered is as follows: Fig.11 shown.

[0251] The global and local registration results of the image are tested when the sampling interval is 1. It can be observed that each character in the global and local registration results can be fully linked, there is no misalignment of strokes, and the texture detail information of the character image is completely preserved.

[0252] The global and local image registration results were tested when the sampling interval was 8. When the sampling interval was 8, the thickness of the character strokes in the global registration results changed, and the internal texture information was redundant or lost, that is, the registration results could not retain the complete and accurate texture information of the characters and could not be used for feature extraction during identification. Similarly, the local registration results also showed character stroke misalignment.

[0253] Based on the above analysis, the optimal sampling interval is set to 4 pixels. Under this sampling interval, the image registration time and registration quality are guaranteed, which is very practical. At the same time, the link model of this application (sampling interval is 4) is applied to the image acquired by the global high-magnification scanning system. The local registration results are as follows: Fig.12 shown.

[0254] Since the existing system uses a low-speed camera to take images with very different brightness, the link model of this application is applied to the image sequence obtained by the existing system through experiments, and good registration results are achieved. After completing the image registration of the new system, image fusion is then performed to complete the image link. The image fusion is performed using the gradual in and out method, such as Fig.13 As shown, the new system uses a high-speed frame exposure camera to take pictures, and the lighting at the image acquisition site is stable and uniform, the exposure difference between images is small, the fusion effect is very good, and the link traces have been eliminated.

[0255] Through the microscopic image linking experiment, the large-scale image linking model of this application can well register the images collected by the new system, and well fuse the registered images through the gradual in and out method, which has very good practicality.

[0256] 5. Design of Printed Document Assisted Identification Module

[0257] The results of computer-printed documents assisted in identification can provide clues for related cases, such as Fig.14 An auxiliary inspection function module has been developed to manually verify the computer identification conclusion to ensure accuracy. The features that can be identified by auxiliary inspection in this application include: excess splashing on the edges of characters, splashing in blank spaces, roughness of stroke edges, local stroke morphology, toner stacking density, stability of printed document features, and global character morphology. Another way of auxiliary identification is to extract the same characters of the same font size in the sample and the document application respectively, and use the printed document auxiliary identification module to contour, rotate, adjust the color, drag and compare the character images, and adjust the transparency to compare the texture differences of the character images. The auxiliary inspection software module has the characteristics of scientificity, ease of use, and acceptability, and has become a powerful auxiliary tool for document inspectors to complete manual verification quickly and professionally.

Claims

1. A high-precision global microscopic printed document identification system, characterized by: The first is the global high-magnification scanning system architecture of the image; The second is the upgrade design of the document magnification and scanning system, including: upgrade of the microscopic magnification hardware structure, upgrade design of the drive control circuit board, and hardware driver design; the third is the enhanced design of the image microscopic scanning solution, including: calculation of scanning parameters, calculation of the scanning stable platform deflection angle, and microscopic scanning process; the fourth is the large-scale local microscopic image linking method, including: image local microscopic registration strategy, and global linking model of coordinate positioning; the fifth is the design of the printed document auxiliary identification module; Firstly, the collected documents are magnified microscopically and then photographed to obtain images, and multiple local images collected are linked into a complete character image. Regional scanning is used and a global link model for coordinate positioning is designed based on this. Secondly, the hardware structure and process were upgraded. By increasing the length of the vernier pan-tilt, the instrument was able to scan the entire A4 paper when performing two-dimensional area scanning. The scanning method was redesigned, that is, the camera captured images at equal time intervals when moving with the stepper motor. The camera used a high-speed frame exposure camera so that the camera could capture clear and still images every time during rapid movement, thereby increasing the acquisition rate and ensuring the quality of the acquired images. The overlapping areas of adjacent images were ensured to be the same size, and the subdivision number of the stepper motor subdivision driver was adjusted to more than 32 subdivisions, so that the displacement of the vernier pan-tilt during the exposure time approached 0. Secondly, a feature association matching method based on smooth flap is used for registration. When performing image registration, a scalar reinforcement learning method is used to find the best matching position of feature association matching. According to the spatial arrangement characteristics of the two-dimensional image sequence, a global alignment model based on linear regression is designed to quickly register large-scale images and eliminate the matching errors when registering two images. The gradual in and out method is used to fuse the images to achieve smooth transition in the overlapping areas of the images. Finally, the printed document identification application of the global image micro-magnification system was realized. The micro-magnification images of the same characters with the same font size in the document were extracted to compare the texture differences, and a printed document auxiliary identification module was developed based on the printing differences. The hardware structure of the microscope magnification has been upgraded, and the improvements include: the X-axis electric-controlled vernier stage is fixed with a bracket, on which a camera and a high-power microscope lens are fixed; the Y-axis electric-controlled vernier stage is fixed with a stable platform for placing documents, wherein the travel of the X-direction vernier stage exceeds the width of A4 paper, and the travel of the Y-direction vernier stage exceeds the length of A4 paper. After the near ends of the X- and Y-axis electric-controlled vernier stages are reset, the upper right corner of the A4 paper is directly below the high-power microscope lens. The X-axis vernier stage moves at a uniform speed horizontally driven by a stepper motor, and the Y-axis vernier stage moves at a stepping speed driven by a stepper motor. During the uniform movement of the X-axis vernier stage, the camera captures images at equal time intervals. Each captured image is sequentially transmitted to the computer for naming and storage. The acquisition link system algorithm links the saved image sequence to obtain a global microscopic image of a large field of view of the printed document. The micro-magnification hardware system is divided into two parts: one is the drive control part, and the other is the image acquisition part. The drive control module controls the vernier head to make two-dimensional plane movement, including the speed and direction control of the vernier head. The computer end transmits control instructions, speed and step instructions to the control circuit, and the driver realizes speed setting, zeroing operation, direction setting, and displacement setting. When collecting printed documents, place the printed documents on a stable table, adjust the light intensity of the LED lamp, the magnification of the microscope, set the moving speed of the horizontal cursor pan and the capture time interval, the step parameters of the vertical cursor pan, and make the image focus clearly, select the character area to be collected, reset the X and Y axis motors to the starting point of the collection area, and start the collection. The X-axis cursor pan moves at a constant speed with a high-speed camera. During the movement, the camera captures images at equal time intervals. After the X-axis motor drives the camera to complete a line of scanning, the Y-axis stepper motor moves upward in steps, so that the next line is located below the high-power microscope lens, and the X-axis motor drives the camera to move in the opposite direction to scan the image, and the cycle is repeated until the image of the specified area is collected.

2. The high-precision global microscopic printed document identification system according to claim 1, characterized in that: Hardware driver design: The cursor PTZ is controlled by a stepper motor driver. The stepper motor driver sends and controls the level signal through the RS232 interface. The computer inputs instructions to the driver to control the travel and image acquisition of the cursor PTZ. (1) Query command Both zero query and limit query are queried through the serial port DCD line. If the stepper motor reaches the boundary of the mechanical stroke, the limit switch is triggered to turn on, making DCD a low level. The zero point is the limit point in the negative direction of the stepper motor. The far limit query is queried through the CTS line. If the stepper motor reaches the far boundary of the mechanical stroke, the limit switch is triggered to turn on, making CTS a low level. For zero query or near limit query, the CDHolding method of the SerialPort class is used to read the level signal on the DCD line, thereby querying the zero signal; for far limit query, the CTS Holding method is used to read the level signal on the CTS line, thereby querying the limit signal. Near-end limit (zero return) query: if (serialPort1.CDHolding(O)); Remote limit query: if(serialPort1.CTSHoldingO)); (2) Setting instructions Speed ​​setting: The output pulse number PPS determines the speed of the stepper motor. The speed setting has two aspects: a) String binary code: fastest speed serialPort1.Write("Ox55"); Medium speed serialPort1.Write("Ox3Ox3"); Low speed serialPort1.Write("Ox0Ox15"); b)Serial port baud rate: high baud rate serialPort1.BaudRate = br115200; Medium baud rate serialPort1.BaudRate = br19200; Low baud rate serialPort1.BaudRate = br9600; Among them, Ox5 is the binary number 0101, and Ox3 is the binary number 0011. When setting the speed according to the string content, the fastest speed is twice the medium speed, and similarly the medium speed is twice the slow speed. The moving speed of the stepper motor is divided into acquisition speed and reset speed. The camera does not shoot when the stepper motor is reset. Under the subdivision number setting of the subdivision driver, the acquisition speed and reset speed of the stepper motor can be set by setting different baud rates and sending data. Direction setting: Send a level control signal to the Dir pin of the subdivision driver chip DMD402A through the Dtr pin of the RS232 serial port to control the running direction of the motor; Forward displacement: serialPort1.DtrEnable(false); Reverse displacement: serialPort1.DtrEnable(true); Zero setting: First, get the zero status by the zero query command. If the machine is not zeroed, start the zero setting and perform displacement zeroing in combination with the DCD limit signal. Check whether it is reset to zero: if(serialPortl.CDHolding()); Zero setting: serialPort1.CDHolding(false); while(serialPort1.CDHolding()) serialPort1.Write(byte[]buffer,intoffset,intcount); (3) Control instructions The image acquisition control process is:

1. Initialize the camera (CameraInit(intindex)) 2. Run the camera and start capturing image data (CameraPlay) 3. Set the image resolution (CameraSetResolution) 4. Display image (CameraShowImage) 5. Get the image and save it as BMP file (CameraSavelmage) 6. Turn off the camera acquisition mode and data connection (CameraFree); Displacement axis switching: Use the RTS line of the serial port to send high and low levels to the base of the transistor to achieve switching between X-axis and Y-axis displacement: X-axis displacement: serialPort1.RtsEnable(true); Y-axis displacement: serialPort1.RtsEnable(false); Displacement control: The X-axis vernier gimbal drives the camera and high-power microscope head to move at a constant speed. The camera captures images at equal time intervals. After completing a line of scanning, the Y-axis stepper motor drives the paper stabilization stage to step once, and the X-axis motor drives the camera to scan in the opposite direction until the scanning of the specified area is completed.

3. The high-precision global microscopic printed document identification system according to claim 1, characterized in that: Calculate scanning parameters: the image size is 640*480, the pixel size is 3.2μm*3.2μm, the maximum frame rate is 60fps, the optical magnification is 0.5×4.5=2.25 (times), the electronic magnification is 21×25.4 / 8=66.68 (times), when the vernier head moves in the direction, the displacement of the vernier head within the camera capture time interval is less than 2.650mm, when the vernier head moves in the stepping direction, the stepping amount of the vernier head is less than 1.970mm; The maximum frame rate of a high-speed industrial camera is 60fps, and the maximum rate of a stepper motor during line scanning cannot exceed 2.650*60=159 (mm / s); The inherent step angle of the stepper motor is 1.8 degrees, the screw lead is 2mm, and the subdivision number of the stepper motor subdivision driver is set to 32, that is, the stepper motor needs 6400 pulses to rotate one circle. At the same time, the baud rate of the serial port is set to 19200, and the binary code sent is 0x55. The moving speed of the cursor pan / tilt is: The exposure time is selected as 1300μs, the subdivision number of the subdivision driver is set to 32, and the displacement of the vernier gimbal during the exposure time is: 3000μm×1300×10 -6 =3.9(μm) Set the image overlap area size to 10%, that is, the step distance in the X and Y directions each time is 90% of the size of the corresponding area of ​​the actual image, that is: X-direction stepping distance: Y direction step distance: 1.97mm×90%=1.80(mm); During automatic acquisition, the serial port baud rate is set to 19200, the sent binary code is 0x55, and the calculated sending pulse frequency is 9600; the subdivision number of the subdivision driver is set to 32, that is, 6400 pulses are required for each rotation of the stepper motor or each movement of the vernier pan / tilt head by 2mm; Number of pulses required for displacement in the X direction: Number of pulses required for stepping in the Y direction: Set the number of pulses required for the displacement of the stepper motor in the X direction within the equal time interval to 7680, that is, the interval between adjacent images is 2.40mm, set the number of stepping pulses in the Y direction to 5760, the interval between adjacent images in the vertical direction is 1.80mm, the uniform motion speed of the X-axis cursor gimbal is 3mm / s, and the camera capture time interval is 0.8s; The size of the acquisition area is set to 180mm*270mm, and the reset point of the X-axis and Y-axis stepper motors is set at the position where the characters in the upper left corner of the paper are facing the lens. Taking this as the starting point, the acquisition area is divided into cells, with 75 cells in each row and 150 cells in each column. Image acquisition only needs to move to the starting point of the acquisition area, and then calibrate the acquisition area to achieve automatic acquisition of the calibrated acquisition area.

4. The high-precision global microscopic printed document identification system according to claim 1, characterized in that: Calculate the deflection angle of the scanning stabilization platform: Assume the deflection angle is α, the width and height of the image collected by the CMOS camera is M×N, and the deflection angle of the adjacent images without overlapping areas is: By adjusting the installation position of the rotating CCD camera to reduce the deflection angle between the camera and the vernier head, the quantitative relationship between the image pixel and the physical length is defined as the vernier ruler, which means that each image pixel corresponds to the physical length of the actual acquisition area. The optical magnification of the high-power microscope lens is recorded as m, and the pixel size of the CMOS image sensor is x (μm). The vernier ruler under this magnification is x / m. Assume the deflection angle is α, and the vernier scale under this multiple is f. The physical size of the acquisition area corresponding to the image is M×f in width and N×f in height. The image coordinate system and the electronically controlled vernier gimbal coordinate system are the same coordinate system. The calculation method of the deflection angle is: Step 1: Place the document on the paper stabilization table and capture image I1; Step 2: drive the electric control vernier gimbal to move a distance △x along the X-axis direction to collect image I2, where M×f×10%<△x<M×f×90%, so that two adjacent images have overlapping areas; Step 3: Use the link algorithm to calculate the overlap position of the two images (x p ,y p ), angle calculation formula: After calculating the deflection angle, the relative positions of the high-definition camera and the electronically controlled vernier head are continuously adjusted during the mechanical installation to reduce the deflection angle to a minimum.

5. The high-precision global microscopic printed document identification system according to claim 1, characterized in that: Microscopic scanning process: Microscopic image scanning adopts two-dimensional scanning method. The microscope is fixed on the bracket of the X-axis vernier stage through the lens frame, which is located above the paper stabilization table. The vernier stage is equipped with a CMOS camera to perform two-dimensional plane motion scanning of documents. After freely selecting the acquisition area, the vernier pan / tilt automatically runs to acquire images. Assuming that the number of images acquired in a certain acquisition area is (m+1)*(n+1), it means that m+1 rows of images are acquired, and each row has n+1 columns. The electric-controlled vernier pan / tilt first moves horizontally from the starting point of the acquisition area, and the CMOS camera captures the image. It moves from left to right to acquire n+1 images in sequence, completing the scan of the first row of the designated acquisition area. The Y-axis motor steps upward, and the electric-controlled vernier pan / tilt continues to scan the second row in the opposite direction. The acquisition route is in the shape of a "Z" until the image acquisition of the designated area is completed. The image number represents the acquisition order. Numbering the images in the acquisition order facilitates subsequent image processing.

6. The high-precision global microscopic printed document identification system according to claim 1, characterized in that: Image local microscopic registration strategy: Image registration is performed by positioning the coordinates of the acquired two-dimensional sequence images in the same coordinate system. The coordinates of the upper left corner pixel point of the positioning image are selected, and a row-by-row registration strategy is adopted for each row of images. The image registration is all in the same coordinate system. First, the registration algorithm is used to perform pairwise registration on the first row of images. The coordinates of the upper left corner pixel point of each image in the coordinate system are calculated based on the smooth flap registration algorithm. The spacing between the upper left corner pixel points of the image and the equation of the straight line where the upper left corner pixel points of the first row of images are located are calculated. Then, the first column of images is registered pairwise using the global link algorithm for coordinate positioning. The algorithm calculates the coordinates of the upper left pixel of each image in the coordinate system, and calculates the spacing of the upper left pixel of the image in the vertical direction and the equation of the straight line where the upper left pixel of the first column of the image is located. Then, the coordinates of the upper left pixel of each row of the image in the first column are used as reference points to calculate the equation of the straight line where the upper left pixel of each row of the image is located. The coordinates of the upper left pixel of each row of the image in the coordinate system are calculated according to the spacing of the upper left pixel of the row image. At this point, the position of the upper left pixel of each image in the two-dimensional image sequence collected in the coordinate system is determined. After the image registration is completed, the overlapping area is fused by the image fusion method to obtain an image with a smooth transition in the overlapping area. The registration strategy is based on the fact that the overlapping areas of adjacent images in the horizontal direction and the vertical direction are the same in size and position. The method of calculating the equation of the straight line where the pixel point in the upper left corner of the image is located and performing linear regression on the coordinates of the pixel point in the upper left corner of the image is used to eliminate the cumulative error generated at the closed part of the image sequence when the images are registered pairwise.

7. The high-precision global microscopic printed document identification system according to claim 1, characterized in that: Global link model for coordinate positioning: The smooth flap-based feature association matching is used to register the adjacent images in the first row and the first column. When performing image registration, the scalar reinforcement learning method is used to find the best matching position of feature association matching. In the acquisition area, the number of images in the first row and the first column is not large, and the calculation amount of the feature association matching method is not large. The position of the upper left corner pixel of the first row and the first column in the coordinate system can be accurately calculated, and then the spacing of the upper left corner pixel points of the row and column directions and the straight line equation of the upper left corner pixel points of the row and column directions can be calculated. By taking the coordinates of the upper left corner pixel point of the first image in each row as the reference point, the straight line equation of the upper left corner pixel point of each row of images can be calculated. The equation is estimated by the univariate linear regression method based on the least squares method. Assume that the univariate linear regression function is Y=aX+b, where Y and X are random variables, a and b are parameters to be estimated, and the least squares method is used to estimate the values ​​of parameters a and b. Let: y i =ax i +b+ε i In the formula, parameters a and b are independent of each other, and ε i is the random error, and square the above terms to get: When the above formula takes the minimum value, i +b has the smallest error, constructor: n is the corresponding parameter, let P(a,b) take the minimum value, that is, take the partial derivatives of P with respect to parameters a and b and make them zero: The equation system is: x i Not exactly the same, the coefficient determinant of the above equations is: Therefore, the system of equations (3.12) has a unique set of solutions, and the estimated values ​​of the model parameters a and b are obtained as follows: In the formula For a given value of x, take a * x+b * As the estimated value of the regression function Y = aX + b, the estimated value of the model parameter y is obtained * , perform global coordinate positioning on the image, take the upper left corner pixel of the first image as the coordinate origin, take the upper boundary of the image as the X-axis, and the left boundary as the Y-axis to establish a coordinate system; The coordinates of the upper left corner pixel point of the first row of images are located and the line equation of the upper left corner pixel point is estimated. The first row of images are registered pairwise using the feature association matching method to obtain the coordinates of the upper left corner pixel point of the row of images (x1 j ,yl j ), where j indicates that the image is located in the jth column of the row, and (x1 j ,yl j ) as the document value, and the least square method is used to estimate the parameters of the univariate linear regression function, and the equation of the pixel point line in the upper left corner of the row image is obtained as follows: y * 1 j =a * 1x1+b * 1 where a * 1. b * 1 is the parameter value obtained after estimation, y * 1 j To estimate the ordinate value based on the line equation of the upper left pixel point of the row image, take the upper left pixel point of the first image of each row as the origin of the coordinates, and link them horizontally based on the line equation of the upper left pixel point of the row image; The coordinates of the upper left corner pixel of the first column image are located and the equation of the upper left corner pixel of the column image is estimated. The first column image is registered by feature association matching method, and the coordinates of the upper left corner pixel of the column image (x2 i ,y2 i ), where i means the image is located in the i-th row of the column. According to the vertical feature of the upper left corner pixel line of the row image and the upper left corner pixel line of the column image, the slope of the upper left corner pixel line of the column image is: a * 2=1 / a * 1 Substitute the coordinate value of the pixel point in the upper left corner of the first row of the column into the line regression equation of the pixel point in the upper left corner of the column image to obtain: b * 2=y21-a * The equation of the pixel line at the upper left corner of the 2x21 column image is: and * 2 i =a * 2x2 i +b * 2 When the upper left pixel of the first image in each column is taken as the origin of coordinates, the vertical links are made according to the line equation of the upper left pixel of the column image. After determining the position of the first column image, the links of each row of images are based on the first image of the row. The position of each image in the row is determined according to the line equation of the upper left pixel of the row image, and the coordinates of the upper left pixel of each image based on the global alignment coordinate system are determined: (x2 i +x1 j ,and * 2 i +y * 1 j ) The above formula is the coordinate of the pixel point in the upper left corner of the image; At this point, the global alignment model based on linear regression is constructed, and accurate image linking is performed according to the position of the upper left corner pixel of all images in the global alignment coordinate system; After the image registration is completed, the pixel point in the upper left corner of the two-dimensional sequence image is fixed in the coordinate system. In order to complete the image link, the image fusion is performed next, that is, the smoothing flap value of the overlapping part of the image is corrected to make the overlapping part of the image transition smoothly, and the image fusion method of gradual in and gradual out is used for the fusion after registration.

8. The high-precision global microscopic printed document identification system according to claim 1, characterized in that: Design of auxiliary identification module for printed documents: The features that can be identified by auxiliary inspection include: excess splashing on the edges of characters, splashing in blank spaces, roughness of stroke edges, local stroke morphology, toner accumulation density, stability of printed document features, and global character morphology; another way of auxiliary identification is to extract the same characters of the same font and size from the specimen and the document application respectively, and use the auxiliary identification module for printed documents to contour, rotate, adjust the color, drag for comparison, and adjust the transparency to compare the texture differences of the character images.

Citation Information

Patent Citations

  • Quick splicing and fusing method for digital microscope images

    CN112164001A

  • Integral high-power image amplifying and scanning system

    CN201388247Y