Bank counter seal management method and system
Technical Field
The invention relates to the technical field of seal management, in particular to a bank counter seal management method and system.
Background
The seal is a mark printed on a document to show authentication or signing, and is widely applied to various government and government documents, commercial documents and commercial bills, and the document with the seal shows that the document is approved by a sealing organization unit. The existing seal is usually stamped on a document by using a seal, the traditional seal is kept by a specially-assigned person, and a seal keeper stamps according to an authorized stamping application procedure by a seal applicant. The method ensures the safe and standard use of the seal according to the seal use management system and the grade and morality of related workers.
However, the existing seal management and control method cannot completely prevent the situation that the seal is abused, which often causes great loss to stamping units. Once the seal is abused, it is very inconvenient and indirect to trace back the seal usage record and the stamp supervision record, and the workload of tracing back is very large. Therefore, the existing seal control system is not beneficial to improving the seal use efficiency, and the safe use of the seal cannot be ensured.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provides a bank counter seal management method and system, which can realize intelligent management of seals through relevant algorithms by carrying out object detection on people and seals on images shot by a monitoring camera.
The purpose of the invention is realized by the following technical scheme:
a bank counter stamp management method comprises the following steps:
the method comprises the following steps: acquiring a monitoring image of a bank counter in real time through monitoring equipment, preprocessing the acquired monitoring image, sending the preprocessed image into a target detection model, and acquiring position frames of workers and different seals in the monitoring image;
step two: calculating the center point of the seal according to the position frame of each seal in the monitoring image, calculating the center point of a worker by adopting the same calculation mode as the seal center point, and then calculating the Euclidean distance between the center point of each seal and the center points of all the workers in the monitoring image;
step three: setting corresponding proportional threshold values through the width and height sizes of the monitoring images, respectively calculating threshold values of the seal central point and the worker central point, comparing the proportional threshold values with the threshold values between the calculated seal central point and the worker central point, if the threshold value of the worker central point is larger than the proportional threshold value, considering that bank counter personnel leave, and otherwise, considering that related personnel are still in the scene; if the Euclidean distance between the center point of one seal and the center points of all the workers is larger than the proportional threshold, the seal is judged not to be accommodated.
Specifically, the preprocessing process of the acquired monitoring image in the first step specifically includes:
(1) the process of the adaptive picture scaling of the input image specifically comprises the following steps: firstly, the scaling coefficients of the length and the width are calculated according to the length and the width of the input model. And then selecting the smaller scaling coefficient as the overall scaling coefficient, and multiplying the original length and width by the scaling coefficient to obtain the scaled size. The width of the original image is larger than the height, black edge filling is carried out on the height, the model needs to be sampled by 32 times, so that the size of the picture width is filled to be a multiple of 32, and the difference between the size of the picture broadband after filling and the size of the picture broadband after scaling is minimum. And after calculating the difference value, performing black edge supplement on the upper part and the lower part of the picture.
(2) And after the picture pixel points are divided by 255 for normalization, exchanging channels to obtain the characteristic value of the input model.
Specifically, the pretreatment process of the first step further includes: if the whole monitoring image has no staff image and only has a seal image, alarming each seal; if only the image of the staff exists in the whole image and no seal image exists, no alarm is given.
A bank counter seal management system comprises an image preprocessing module, a target detection module, a central computing module, a comparison module and an alarm module;
the image preprocessing module is used for acquiring and acquiring a monitoring image of a bank counter in real time and preprocessing the acquired monitoring image;
the target detection module is used for reasoning and analyzing the preprocessed monitoring image and outputting position frames of the working personnel and different seals in the monitoring image;
the central calculation module is used for calculating the Euclidean distance between the central point of each seal in the monitoring image and the central points of all the workers in the monitoring image;
the comparison module is used for setting a corresponding proportional threshold according to the width and height sizes of the monitored images, comparing the proportional threshold with the calculated threshold between the seal central point and the worker central point, and finally outputting a comparison result;
the alarm module is used for carrying out seal management alarm according to the comparison result, and simultaneously, when no staff image exists in the whole monitoring image and only a seal image exists, alarm can be carried out on each seal.
The invention has the beneficial effects that: the system model of the invention has simple structure, and is beneficial to being transplanted to various edge devices for operation; the training data required by the model is collected and manufactured simply, the model training time is saved, and the model training efficiency is improved.
Drawings
FIG. 1 is a flow chart of the method of the present invention.
Fig. 2 is a schematic diagram of a stamp pattern recognition process according to an embodiment of the present invention.
Fig. 3 is a schematic structural diagram of a target detection model according to an embodiment of the present invention.
Detailed Description
In order to more clearly understand the technical features, objects, and effects of the present invention, embodiments of the present invention will now be described with reference to the accompanying drawings.
In this embodiment, as shown in fig. 1, a method for managing a stamp on a bank counter includes the following steps:
the method comprises the following steps: acquiring a monitoring image of a bank counter in real time through monitoring equipment, preprocessing the acquired monitoring image, sending the preprocessed image into a target detection model, and acquiring position frames of workers and different seals in the monitoring image;
step two: calculating the center point of the seal according to the position frame of each seal in the monitoring image, calculating the center point of a worker by adopting the same calculation mode as the seal center point, and then calculating the Euclidean distance between the center point of each seal and the center points of all the workers in the monitoring image;
step three: setting corresponding proportional threshold values through the width and height sizes of the monitoring images, respectively calculating threshold values of the seal central point and the worker central point, comparing the proportional threshold values with the threshold values between the calculated seal central point and the worker central point, if the threshold value of the worker central point is larger than the proportional threshold value, considering that bank counter personnel leave, and otherwise, considering that related personnel are still in the scene; if the Euclidean distance between the center point of one seal and the center points of all the workers is larger than the proportional threshold, the seal is judged not to be accommodated.
Specifically, the preprocessing process of the acquired monitoring image in the first step specifically includes: (1) the process of the adaptive picture scaling of the input image specifically comprises the following steps: firstly, the scaling coefficients of the length and the width are calculated according to the length and the width of the input model. And then selecting the smaller scaling coefficient as the overall scaling coefficient, and multiplying the original length and width by the scaling coefficient to obtain the scaled size. The width of the original image is larger than the height, black edge filling is carried out on the height, the model needs to be sampled by 32 times, so that the size of the picture width is filled to be a multiple of 32, and the difference between the size of the picture broadband after filling and the size of the picture broadband after scaling is minimum. And after calculating the difference value, performing black edge supplement on the upper part and the lower part of the picture.
(2) And after the picture pixel points are divided by 255 for normalization, exchanging channels to obtain the characteristic value of the input model.
Specifically, the pretreatment process of the first step further includes: if the whole monitoring image has no staff image and only has a seal image, alarming each seal; if only the image of the staff exists in the whole image and no seal image exists, no alarm is given.
A bank counter seal management system comprises an image preprocessing module, a target detection module, a central computing module, a comparison module and an alarm module;
the image preprocessing module is used for acquiring and acquiring a monitoring image of a bank counter in real time and preprocessing the acquired monitoring image;
the target detection module is used for reasoning and analyzing the preprocessed monitoring image and outputting position frames of the working personnel and different seals in the monitoring image;
the central calculation module is used for calculating the Euclidean distance between the central point of each seal in the monitoring image and the central points of all the workers in the monitoring image;
the comparison module is used for setting a corresponding proportional threshold according to the width and height sizes of the monitored images, comparing the proportional threshold with the calculated threshold between the seal central point and the worker central point, and finally outputting a comparison result;
the alarm module is used for carrying out seal management alarm according to the comparison result, and simultaneously, when no staff image exists in the whole monitoring image and only a seal image exists, alarm can be carried out on each seal.
In the embodiment of the invention, the whole process of identifying the seal is shown in fig. 2, the solution firstly carries out preprocessing on an input image, and the preprocessed image is sent into a model for target detection to obtain position frames of people and different seals.
And calculating the central point of the seal according to the position frame of each seal, and obtaining the central point of the person in the same way. And calculating the Euclidean distance between the central point of each seal and the central point of all people in the image.
And setting a corresponding proportional threshold according to the width and height of the image, and calculating the thresholds of the two central points. And comparing the threshold value with the calculated values of the seal and the person center point, if the threshold value is larger than the threshold value, considering that the bank counter person leaves, and otherwise, considering that the related person is still in the scene. If the Euclidean distance between the center point of one seal and all people is larger than the threshold value, the system outputs a warning that the seal is not stored.
In addition, if no person exists in the whole image and only a stamp exists, each stamp can be alarmed. If only people exist in the whole image and no seal exists, no alarm is given.
The foregoing shows and describes the general principles, essential features, and advantages of the invention. It will be understood by those skilled in the art that the present invention is not limited to the embodiments described above, which are described in the specification and illustrated only to illustrate the principle of the present invention, but that various changes and modifications may be made therein without departing from the spirit and scope of the present invention, which fall within the scope of the invention as claimed. The scope of the invention is defined by the appended claims and equivalents thereof.