CN107133618B - Electronic certificate identification triggering method and device - Google Patents

Electronic certificate identification triggering method and device Download PDF

Info

Publication number
CN107133618B
CN107133618B CN201710269514.0A CN201710269514A CN107133618B CN 107133618 B CN107133618 B CN 107133618B CN 201710269514 A CN201710269514 A CN 201710269514A CN 107133618 B CN107133618 B CN 107133618B
Authority
CN
China
Prior art keywords
component
difference
average
value
threshold
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710269514.0A
Other languages
Chinese (zh)
Other versions
CN107133618A (en
Inventor
黄韵棋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
BEIJING SINOSECU TECHNOLOGY Co.,Ltd.
Original Assignee
Beijing Sinosecu Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Sinosecu Technology Co ltd filed Critical Beijing Sinosecu Technology Co ltd
Priority to CN201710269514.0A priority Critical patent/CN107133618B/en
Publication of CN107133618A publication Critical patent/CN107133618A/en
Application granted granted Critical
Publication of CN107133618B publication Critical patent/CN107133618B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/10Image acquisition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/56Extraction of image or video features relating to colour

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)
  • Television Systems (AREA)

Abstract

The application provides an electronic certificate identification triggering method and device, wherein the method comprises the following steps: continuously acquiring a video image for a certificate placement area, and converting all single-frame images in the video image into initial pictures in an RGB color mode; and calculating the average gray value (and/or average color component) of the difference preset region of the initial picture, and outputting a trigger signal when the absolute value of the difference between the average gray value of the difference preset region of the initial picture of the previous frame and the average gray value of the difference preset region of the initial picture of the next frame is greater than a gray value difference threshold value. By utilizing the technical scheme provided by the embodiment of the application, a worker is not required to press the certificate or use an operation button additionally, the work efficiency of certificate identification is improved, the number of parts can be effectively reduced, the cost is reduced, and fault points are reduced.

Description

Electronic certificate identification triggering method and device
Technical Field
The invention relates to the technical field of electronic certificate identification, in particular to an electronic certificate identification triggering method and device.
Background
The main function of the electronic certificate identification equipment is to electronically photograph the certificate and then send it to a computer for identification processing. The prior electronic certificate identification equipment which is used more is characterized in that a switch button is arranged or a starting button is arranged in identification software of a computer, after a certificate is placed in a certificate placing area, the switch button is opened or the starting button in the software is clicked to start the electronic certificate identification equipment to shoot and identify the certificate, and relevant certificate information is read. In such a processing process, the certificate needs to be pressed in the certificate placing area to ensure the stability of certificate identification, so that the structure of the electronic certificate identification equipment is generally complex, and moreover, when the certificate is pressed, an operator needs to use an operation button additionally, so that the operation is not simple, time-consuming and labor-consuming.
During, the inventor has provided one kind through electronic certificate identification equipment, and it is provided with the socket, the socket is used for placing the certificate, including LED transmitting tube, LED receiver tube, trigger unit and camera, the LED transmitting tube with the LED receiver tube sets up respectively two sides about the socket, the LED transmitting tube be used for to the infrared light wave of LED receiver tube transmission, the LED receiver tube is used for receiving the infrared light wave of LED transmitting tube transmission, the trigger unit is used for the LED receiver tube can not receive the trigger signal is produced during the infrared light wave of LED transmitting tube transmission, sends for the camera, the camera is used for receiving the trigger signal that the trigger unit sent, shoots the certificate. This electronic certificate identification equipment can automatic start equipment carry out the shooting of certificate. However, in the installation process of the equipment, the requirement on the assembly precision of parts is high, particularly the cost of the LED transmitting tube and the LED receiving tube is high, and more parts also cause more fault points of the equipment and higher later maintenance cost.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The application aims to provide an electronic certificate identification triggering method and device, which do not need workers to press certificates or use operation buttons additionally, improve the work efficiency of certificate identification, and can effectively reduce the number of parts, reduce the cost and reduce fault points.
The application provides an electronic certificate identification triggering method, which comprises the following steps:
continuously acquiring a video image for a certificate placement area, and converting all single-frame images in the video image into initial pictures in an RGB color mode;
calculating the average gray value and/or the average color component of the difference value preset area of the initial picture;
correspondingly, when the absolute value of the difference between the average gray value of the difference preset area of the initial picture in the previous frame and the average gray value of the difference preset area of the initial picture in the next frame is greater than the gray value difference threshold, and/or when the absolute value of the difference between the average color component of the difference preset area of the initial picture in the previous frame and the average color component of the difference preset area of the initial picture in the next frame is greater than the color component difference threshold, outputting a trigger signal.
The application provides a pair of electronic certificate discerns trigger device, it includes: an image acquisition module, a calculation module and an output module,
the image acquisition module is used for continuously acquiring video images for the certificate placement area and converting all single-frame images in the video images into initial pictures in an RGB color mode;
the calculation module is configured to calculate an average gray value of the difference preset region of the initial picture, and/or calculate an average color component of the difference preset region of the initial picture;
the output module is configured to output a trigger signal when an absolute value of a difference between an average gray value of the difference preset region of the previous frame of the initial picture and an average gray value of the difference preset region of the next frame of the initial picture is greater than a gray value difference threshold, and/or when an absolute value of a difference between an average color component of the difference preset region of the previous frame of the initial picture and an average color component of the difference preset region of the next frame of the initial picture is greater than a color component difference threshold.
The application provides an electronic certificate identification triggering method and device, which are characterized in that a triggering signal is output when certificate characteristics are detected in a preset area of a video image of a certificate placing area, the certificate placing area is mainly adopted to continuously collect the video image, all single-frame images in the video image are converted into initial pictures of an RGB color mode, and whether a certificate is placed in the certificate placing area is judged by comparing the average gray value and the average color component of the difference value preset area of two adjacent frames of initial pictures, so that the triggering signal is output. Therefore, according to the embodiment of the application, whether the trigger signal is output or not is judged by comparing the average gray value and the average color component between the difference preset areas of the two adjacent frames of initial pictures, so that the judgment precision is high; in addition, the trigger signal is actively output by the trigger module, so that a worker does not need to press the certificate or use an operation button additionally, and the working efficiency of certificate identification is effectively improved; moreover, by using the electronic certificate identification triggering method or device, components such as an LED transmitting tube, an LED receiving tube and the like do not need to be additionally installed on the electronic certificate identification equipment, so that the cost is effectively reduced, and the fault points of the equipment are also effectively reduced.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without any creative effort.
Fig. 1 is a flow chart (block diagram) of a method of an embodiment of an electronic document identification triggering method provided by the present application.
Fig. 2 is a flow diagram (block diagram) of a method of another embodiment of an electronic document identification triggering method provided by the present application.
Fig. 3 is a flow chart (block diagram) of a method of triggering identification of an electronic document according to yet another embodiment of the present application.
Fig. 4 is a schematic structural diagram (block diagram) of an embodiment of the electronic certificate identification triggering device provided by the present application, in which a gray value is used as a determination criterion.
Fig. 5 is a schematic structural diagram (block diagram) of an embodiment of an electronic certificate identification triggering device provided by the present application, in which a red component is used as a judgment criterion.
Fig. 6 is a schematic structural diagram (block diagram) of an embodiment of an electronic certificate identification triggering device provided by the present application, in which a green component is used as a judgment criterion.
Fig. 7 is a schematic structural diagram (block diagram) of an embodiment of an electronic certificate identification triggering device provided by the present application, wherein a blue component is used as a judgment criterion.
Fig. 8 is a schematic structural diagram (block diagram) of an embodiment of an electronic certificate identification triggering device provided by the application, wherein a red component and a green component are used as judgment criteria.
Fig. 9 is a schematic structural diagram (block diagram) of an embodiment of an electronic certificate identification triggering device provided by the application, wherein the red component and the blue component are used as judgment criteria.
Fig. 10 is a schematic structural diagram (block diagram) of an embodiment of an electronic certificate identification triggering device provided by the application, wherein a green component and a blue component are used as judgment criteria.
Fig. 11 is a schematic structural diagram (block diagram) of an embodiment of an electronic document identification triggering device provided by the present application, in which a gray value, a red component and a green component are used as determination criteria.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Fig. 1 to 3 are method flowcharts of an embodiment of an electronic document identification triggering method according to the present application. Although the present application provides method steps as shown in the following examples or figures, more or fewer steps may be included in the method based on conventional or non-inventive efforts. In the step where there is no logically necessary cause-and-effect relationship, the execution sequence of the steps is not limited to the execution sequence described in the embodiment of the present application and shown in the drawings. The method can be implemented in a device or an end product in practice, sequentially or in parallel according to the embodiments or the method shown in the drawings (for example, in the environment of parallel processors or multi-thread processing, or even in the environment of distributed processing).
The application provides an electronic certificate identification triggering method and device, which are characterized in that a triggering signal is output when certificate features are detected in a preset area of a video image of a certificate placing area, the certificate placing area is mainly used for continuously collecting the video image, all single-frame images in the video image are converted into initial pictures in an RGB color mode, and changes of average gray values and average color components detected in the difference value preset area of the initial pictures are used as certificate features to judge whether certificates are placed in the certificate placing area or not, and the triggering signal is output accordingly. Therefore, according to the embodiment of the application, whether the trigger signal is output or not is judged by comparing the average gray value and the average color component between the difference preset areas of the two adjacent frames of initial pictures, so that the judgment precision is high; in addition, the trigger signal is actively output by the trigger module, so that a worker does not need to press the certificate or use an operation button additionally, and the working efficiency of certificate identification is effectively improved; moreover, by using the electronic certificate identification triggering method or device, components such as an LED transmitting tube, an LED receiving tube and the like do not need to be additionally installed on the electronic certificate identification equipment, so that the cost is effectively reduced, and the fault points of the equipment are also effectively reduced.
The RGB color scheme (also translated into "Red, Green and Blue", which is less used) is a color standard in the industry, and various colors are obtained by changing three color channels of Red (Red), Green (Green) and Blue (Blue) and superimposing the three color channels on each other, where RGB represents colors of the three channels of Red, Green and Blue, and the standard almost includes all colors that can be perceived by human vision, and is one of the most widely used color systems at present. The RGB color mode uses the RGB model to assign an intensity value in the range of 0 to 255 to the RGB components of each pixel in the image. For example: the pure red R value is 255, the G value is 0, and the B value is 0; r, G, B values for gray are equal (except 0 and 255); the white R, G, B are all 255; the black R, G, B are all 0. The RGB image uses only three colors, which can be mixed in different proportions to reproduce 16777216 colors on the screen. In the RGB mode, values from 0 (black) to 255 (white) can be used for each RGB component. For example, bright red uses an R-value 246, a G-value 20, and a B-value 50. When all three component values are equal, a gray shade is produced. When all the components have values of 255, the result is pure white; when the value is 0, the result is pure black.
Specifically, as shown in fig. 1 to 3, an electronic certificate identification triggering method provided in an embodiment of the present application may include:
step 1: continuously acquiring a video image for a certificate placement area, and converting all single-frame images in the video image into initial pictures in an RGB color mode;
and converting the single-frame picture into the initial picture in an RGB color mode, so that each pixel point in the initial picture has a red component, a green component and a blue component, and the red component, the green component and the blue component of the pixel point are facilitated to carry out the next calculation. See S101 in fig. 1, S201 in fig. 2, and S301 in fig. 3 in detail.
Step 2: calculating the average gray value and/or the average color component of the difference value preset area of the initial picture;
the average gray value and the average color component of the difference value preset area of the initial picture can be used as parameters for judging whether the certificate is placed in the certificate placing area or not.
In a specific embodiment as shown in fig. 1, selecting an average gray value of the difference preset area of the initial picture as a parameter for determining whether a certificate is placed in the certificate placing area is S102: and calculating the average gray value of the difference value preset area of the initial picture.
The average gray value of the difference preset area refers to an average value of gray values of all pixel points in the difference preset area. In step S101, we have obtained the red, green and blue components of each pixel point in the initial picture. There are various conversion formulas for calculating the gray value of the pixel point through the color component of the pixel point, and in the actual use process, the most suitable formula can be selected according to the target picture of image recognition and the recognition purpose.
Specifically, step S102 may include:
s1021: calculating the gray value of each pixel point in the difference preset region according to the red component, the green component and the blue component of each pixel point in the difference preset region;
taking any pixel point in the preset difference region as an example, the gray value of the pixel point can be calculated through the red component, the green component and the blue component of each pixel point according to the following formula:
Grey=0.299*R+0.587*G+0.114*B
in order to avoid low-speed floating-point operations, an integer algorithm may be used, for example, the integer algorithm is implemented by scaling by 1000 times, that is, the value of Grey is calculated by the following formula:
Grey=(299*R+587*G+114*B)/1000
wherein, Grey represents the gray value of the pixel point, R represents the red component of the pixel point, G represents the green component of the pixel point, and B represents the blue component of the pixel point.
S1022: and calculating the average value of the gray values of all the pixel points in the difference preset area to be used as the average gray value of the difference preset area.
In a specific embodiment as shown in fig. 2, selecting an average color component of the difference preset area of the initial picture as a parameter for determining whether a certificate is placed in the certificate placing area is S202: and calculating the average color component of the difference value preset area of the initial picture.
As is well known, color components include a red component, a green component, and a blue component. When the average color component is used as a parameter for judging whether the certificate is placed in the certificate placing area, one, two or three of a red component, a green component and a blue component can be selected, and six situations are included. According to the selected color component, the average color component of the difference preset region comprises an average red component and/or an average green component and/or an average blue component; correspondingly, calculating an average color component of a difference preset region of the initial picture, including:
calculating the average value of the red components of all the pixel points in the difference preset region as the average red component of the difference preset region, and/or
Calculating the average value of the green components of all the pixel points in the difference preset region as the average green component of the difference preset region, and/or
And calculating the average value of the blue components of all the pixel points in the difference preset region as the average blue component of the difference preset region.
In a specific embodiment as shown in fig. 3, selecting both the average gray value and the average color component of the difference preset region of the initial picture as parameters for determining whether a certificate is placed in the certificate placing region is S302: and calculating the average gray value and the average color component of the difference value preset area of the initial picture.
This case is to use both the average gray value and the average color component in the first two cases as parameters, and therefore, the calculation in this case needs to be completed with both the calculation of the average gray value and the calculation of the average color component. Since the selection of the average color component includes six cases, this case correspondingly includes six cases.
And step 3: correspondingly, when the absolute value of the difference value between the average gray value of the difference value preset area of the initial picture of the previous frame and the average gray value of the difference value preset area of the initial picture of the next frame is greater than the gray value difference threshold, and/or when the absolute value of the difference value between the average color component of the difference value preset area of the initial picture of the previous frame and the average color component of the difference value preset area of the initial picture of the next frame is greater than the color component difference threshold, outputting a trigger signal.
S103: corresponding to the first situation in S102, if as shown in fig. 1, the average gray value of the difference preset region of the initial picture is selected as a parameter for determining whether to place a certificate in the certificate placement region, that is, when the absolute value of the difference between the average gray value of the difference preset region of the initial picture of the previous frame and the average gray value of the difference preset region of the initial picture of the next frame is greater than the gray value difference threshold, it is determined that a "certificate feature" exists in the difference preset region of the initial picture, that is, a certificate exists in the certificate placement region, and at this time, a trigger signal is output.
In order to further improve the precision of outputting the trigger signal, at least one gray value preset area is further arranged in the initial picture, and when the absolute value of the difference value between the average gray value of the difference value preset area of the initial picture in the previous frame and the average gray value of the difference value preset area of the initial picture in the next frame is greater than a gray value difference threshold, and the average gray value of the at least one gray value preset area of the initial picture in the next frame is greater than a gray value threshold, the trigger signal is output.
Specifically, the initial picture includes one difference value preset region and a plurality of gray value preset regions; the gray value threshold comprises a plurality of secondary gray value thresholds; and outputting a trigger signal when the absolute value of the difference value between the average gray value of the difference value preset area of the initial picture of the previous frame and the average gray value of the difference value preset area of the initial picture of the next frame is greater than a gray value difference threshold value, and the average gray value of each gray value preset area of the initial picture of the next frame is greater than the corresponding secondary gray value threshold value.
S203: corresponding to the second case in S102, as shown in fig. 2, the average color component of the difference preset region of the initial picture is selected as a parameter for determining whether to place a certificate in the certificate placement region, that is, when an absolute value of a difference between the average color component of the difference preset region of the previous frame of the initial picture and the average color component of the difference preset region of the next frame of the initial picture is greater than a color component difference threshold, it is determined that a "certificate feature" exists in the difference preset region of the initial picture, that is, a certificate exists in the certificate placement region, and at this time, a trigger signal is output.
As can be seen from the foregoing, according to the selected color component, there are six cases, where the average color component of the difference preset region includes an average red component and/or an average green component and/or an average blue component; correspondingly, then, the color component difference threshold comprises a red component difference threshold and/or a green component difference threshold and/or a blue component difference threshold.
Therefore, in this step, the condition for outputting the trigger signal also includes the following conditions:
when the difference value between the average red component of the difference value preset region of the previous frame picture and the average red component of the difference value preset region of the next frame picture is greater than the red component difference value threshold, and/or
When the difference value between the average green component of the difference value preset area of the previous frame picture and the average green component of the difference value preset area of the next frame picture is larger than the green component difference value threshold value, and/or
And when the difference value between the average blue component of the difference value preset region of the previous frame picture and the average blue component of the difference value preset region of the next frame picture is greater than the blue component difference value threshold.
Taking the example that the average color component of the difference preset region includes a red component, in order to further improve the precision of outputting the trigger signal, at least one red component preset region is set in the initial picture, and when the difference between the average red component of the difference preset region of the previous frame picture and the average red component of the difference preset region of the next frame picture is greater than the red component difference threshold and the average red component of the at least one red component preset region of the next frame picture is greater than the red component threshold, the trigger signal is output.
Specifically, the initial picture includes one difference preset region and a plurality of red component preset regions; the red component threshold comprises a plurality of secondary red component thresholds; and outputting a trigger signal when the difference value between the average red component of the difference value preset area of the previous frame picture and the average red component of the difference value preset area of the next frame picture is greater than the red component difference value threshold, and the average red component of each red component preset area of the next frame picture is greater than the corresponding secondary red component threshold.
Taking the example that the average color component of the difference preset region includes a green component, in order to further improve the precision of outputting the trigger signal, at least one green component preset region is set in the initial picture, and when the difference between the average green component of the difference preset region of the previous frame picture and the average green component of the difference preset region of the next frame picture is greater than the green component difference threshold and the average green component of the at least one green component preset region of the next frame picture is greater than the green component threshold, the trigger signal is output.
Specifically, the initial picture includes one difference preset region and a plurality of green component preset regions; the green component threshold comprises a plurality of secondary green component thresholds; and outputting a trigger signal when the difference value between the average green component of the difference value preset area of the previous frame picture and the average green component of the difference value preset area of the next frame picture is greater than the green component difference value threshold, and the average green component of each green component preset area of the next frame picture is greater than the corresponding secondary green component threshold.
Then, taking the example that the average color component of the difference preset region includes a blue component, in order to further improve the precision of outputting the trigger signal, at least one blue component preset region is set in the initial picture, and when the difference between the average blue component of the difference preset region of the previous frame picture and the average blue component of the difference preset region of the next frame picture is greater than the blue component difference threshold and the average blue component of the at least one blue component preset region of the next frame picture is greater than the blue component threshold, the trigger signal is output.
Specifically, the initial picture includes one difference preset region and a plurality of blue component preset regions; the blue component threshold comprises a plurality of secondary blue component thresholds; and outputting a trigger signal when the difference value between the average blue component of the difference value preset area of the previous frame picture and the average blue component of the difference value preset area of the next frame picture is greater than the blue component difference value threshold, and the average blue component of each blue component preset area of the next frame picture is greater than the corresponding secondary blue component threshold.
When the average color component of the difference preset region includes two or three of the red component, the green component and the blue component, and so on, no further description is given.
S303: corresponding to the third situation in S102, as shown in fig. 3, both the average gray-scale value and the average color component of the difference preset region of the initial picture are selected as parameters for determining whether to place a certificate in the certificate placement region, and then, when an absolute value of a difference between the average gray-scale value of the difference preset region of the initial picture in the previous frame and the average gray-scale value of the difference preset region of the initial picture in the next frame is greater than the gray-scale value difference threshold, and an absolute value of a difference between the average color component of the difference preset region of the initial picture in the previous frame and the average color component of the difference preset region of the initial picture in the next frame is greater than the color component difference threshold, the trigger signal is output. Also, the criteria for outputting the trigger signal in this case includes six cases depending on the selected average color component.
Based on the same inventive concept, embodiments of the present application further provide an electronic certificate identification triggering apparatus, as described in the following embodiments. The principle of solving the problems of the electronic certificate identification triggering device is similar to that of the electronic certificate identification triggering method, so the implementation of the electronic certificate identification triggering device can refer to the implementation of the electronic certificate identification triggering method, and repeated parts are not repeated. As used hereinafter, the terms "unit," "subunit," or "module" may refer to a combination of software and/or hardware that performs a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 4 is a block diagram of an electronic certificate identification triggering device according to an embodiment of the present application. While the present application provides apparatus structures as shown in the following embodiments or figures, more or fewer modular units may be included in the apparatus based on conventional or non-inventive efforts. In the structure in which the necessary causal relationship does not logically exist, the module structures of these apparatuses are not limited to the module structures described in the embodiments of the present application and shown in the drawings. The described module structures can be implemented in a device or an end product in practice, sequentially or in parallel according to the embodiments or the module structures shown in the drawings (for example, in the environment of parallel processors or multi-thread processing, or even in the environment of distributed processing).
As shown in fig. 4 to 6 in detail, the electronic document identification triggering device provided in an embodiment of the present application may include: an image acquisition module 401, a calculation module 402 and an output module 403,
the image acquisition module 401 is configured to continuously acquire a video image in a certificate placement area, and convert all single-frame images in the video image into an initial image in an RGB color mode;
the calculating module 402 is configured to calculate an average gray value of the difference preset region of the initial picture, and/or calculate an average color component of the difference preset region of the initial picture;
the output module 403 is configured to output a trigger signal when an absolute value of a difference between an average gray value of the difference preset region of the previous frame of the initial picture and an average gray value of the difference preset region of the next frame of the initial picture is greater than a gray value difference threshold, and/or when an absolute value of a difference between an average color component of the difference preset region of the previous frame of the initial picture and an average color component of the difference preset region of the next frame of the initial picture is greater than a color component difference threshold.
In a possible embodiment, as shown in fig. 4, the average gray value of the difference preset area of the initial picture is selected as a parameter for determining whether to place a certificate in the certificate placement area. The calculation module 402 includes a gray value calculation module 4021 and an average gray value calculation module 4022;
the gray value calculating module 4021 is configured to calculate a gray value of each pixel point in the difference preset region according to the red component, the green component and the blue component of each pixel point in the difference preset region;
the average gray value calculating module 4022 is configured to calculate an average value of gray values of all pixel points in the difference preset region, and use the average value as an average gray value of the difference preset region.
In order to further improve the precision of outputting the trigger signal, the output module 403 is configured to output the trigger signal when an absolute value of a difference between an average gray-scale value of a difference preset region of the previous frame of the initial picture and an average gray-scale value of a difference preset region of the next frame of the initial picture is greater than a gray-scale value difference threshold, and when an average gray-scale value of at least one gray-scale value preset region of the next frame of the initial picture is greater than a gray-scale value threshold.
Specifically, the initial picture includes one difference value preset region and a plurality of gray value preset regions; the gray value threshold comprises a plurality of secondary gray value thresholds;
the output module 403 is configured to output a trigger signal when an absolute value of a difference between an average gray value of the difference preset region of the previous frame of the initial picture and an average gray value of the difference preset region of the next frame of the initial picture is greater than a gray value difference threshold, and when an average gray value of each gray value preset region of the next frame of the initial picture is greater than the corresponding secondary gray value threshold.
In another optional embodiment, the average color component of the difference preset area of the initial picture may be selected as a parameter for determining whether to place a certificate in the certificate placement area. As shown in fig. 5 to 10, the average color component may include an average red component and/or an average green component and/or an average blue component; correspondingly, the color component difference threshold may also include a red component difference threshold and/or a green component difference threshold and/or a blue component difference threshold; correspondingly, the calculating module 402 includes a red component calculating module 4023 and/or a green component calculating module 4024 and/or a blue component calculating module 4025; wherein the content of the first and second substances,
the red component calculating module 4023 is configured to calculate an average value of the red components of all the pixels in the difference preset region as an average red component of the difference preset region,
the green component calculating module 4024 is configured to calculate an average value of green components of all pixels in the difference preset region as an average green component of the difference preset region,
the blue component calculation module 4025 is configured to calculate an average value of blue components of all pixel points in the difference preset region as an average blue component of the difference preset region;
correspondingly, the output modules 403 include a red output module 4031 and/or a green output module 4032 and/or a blue output module 4033, wherein,
the red output module 4031 is configured to output a trigger signal when a difference value between an average red component of the difference value preset region of the previous frame of picture and an average red component of the difference value preset region of the next frame of picture is greater than the red component difference value threshold,
the green output module 4032 is configured to output a trigger signal when a difference between an average green component of the difference preset region of the previous frame of picture and an average green component of the difference preset region of the next frame of picture is greater than the green component difference threshold,
the blue output module 4033 is configured to output a trigger signal when a difference value between an average blue component of the difference value preset region of the previous frame of picture and an average blue component of the difference value preset region of the next frame of picture is greater than the blue component difference value threshold.
In order to further improve the accuracy of the output trigger signal, when the average color component includes a red component, at least one red component preset region is further provided in the initial picture. The red output module 4031 is configured to output a trigger signal when a difference value between an average red component of a difference value preset region of the previous frame of picture and an average red component of a difference value preset region of the next frame of picture is greater than the red component difference threshold and an average red component of at least one red component preset region of the next frame of the initial picture is greater than the red component threshold.
Specifically, the initial picture includes one difference preset region and a plurality of red component preset regions; the red component threshold comprises a plurality of secondary red component thresholds; the red output module 4031 is configured to output a trigger signal when a difference value between an average red component of a difference value preset region of the previous frame of picture and an average red component of a difference value preset region of the next frame of picture is greater than the red component difference threshold, and an average red component of each red component preset region of the next frame of the initial picture is greater than the corresponding secondary red component threshold.
Likewise, when the average color component includes a green component, at least one green component preset region is further provided in the initial picture. The green output module 4032 is configured to output a trigger signal when a difference between an average green component of the difference preset region of the previous frame of picture and an average green component of the difference preset region of the next frame of picture is greater than the green component difference threshold and an average green component of at least one green component preset region of the next frame of the initial picture is greater than the green component threshold.
Specifically, the initial picture includes one difference preset region and a plurality of green component preset regions; the green component threshold comprises a plurality of secondary green component thresholds; the green output module 4031 is configured to output a trigger signal when a difference between an average green component of a difference preset region of the previous frame of picture and an average green component of a difference preset region of the next frame of picture is greater than the green component difference threshold, and an average green component of each green component preset region of the next frame of the initial picture is greater than the corresponding secondary green component threshold.
Likewise, when the average color component includes a blue component, at least one blue component preset region is further provided in the initial picture. The blue output module 4033 is configured to output a trigger signal when a difference value between an average blue component of a difference value preset region of the previous frame of picture and an average blue component of a difference value preset region of the next frame of picture is greater than the blue component difference threshold and an average blue component of at least one blue component preset region of the initial picture of the next frame is greater than the blue component threshold.
Specifically, the initial picture includes one difference preset region and a plurality of blue component preset regions; the blue component threshold comprises a plurality of secondary blue component thresholds; the blue output module 4031 is configured to output a trigger signal when a difference value between an average blue component of a difference value preset area of the previous frame of picture and an average blue component of a difference value preset area of the next frame of picture is greater than the blue component difference threshold, and an average blue component of each blue component preset area of the initial picture of the next frame is greater than the corresponding secondary blue component threshold.
Taking the average gray value, the average red component and the average green component of the difference preset area of the initial picture as the parameters for judging whether the certificate is placed in the certificate placing area, how to judge whether the certificate is placed in the certificate placing area by taking the average gray value and the average color component as the parameters at the same time will be described. The initial picture comprises one difference value preset region, a plurality of gray value preset regions, a plurality of red component preset regions and a plurality of green component preset regions; the gray value threshold comprises a plurality of secondary gray value thresholds; the red component threshold comprises a plurality of secondary red component thresholds; the green component threshold comprises a plurality of secondary green component thresholds.
As shown in fig. 11, the calculating module 402 includes a gray value calculating module 4021, an average gray value calculating module 4022, a red component calculating module 4023, and a green component calculating module 4025;
the output module 403 is configured to output a trigger signal when the following three conditions are satisfied:
1. when the absolute value of the difference value between the average gray value of the difference value preset region of the previous frame of the initial picture and the average gray value of the difference value preset region of the next frame of the initial picture is greater than the gray value difference threshold, and the average gray value of each gray value preset region of the next frame of the initial picture is greater than the corresponding secondary gray value threshold;
2. the difference value between the average red component of the difference value preset region of the previous frame picture and the average red component of the difference value preset region of the next frame picture is greater than the red component difference value threshold, and the average red component of each red component preset region of the next frame picture is greater than the corresponding secondary red component threshold;
3. the difference value between the average green component of the difference value preset area of the previous frame picture and the average green component of the difference value preset area of the next frame picture is larger than the green component difference value threshold, and the average green component of each green component preset area of the next frame picture is larger than the corresponding secondary green component threshold.
The apparatuses or modules illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. For convenience of description, the above devices are described as being divided into various modules by functions, and are described separately. The functionality of the modules may be implemented in the same one or more software and/or hardware implementations of the present application. Of course, a module that implements a certain function may be implemented by a plurality of sub-modules or sub-units in combination.
From the above description of the embodiments, it is clear to those skilled in the art that the present application can be implemented by software plus necessary hardware. Based on such understanding, the technical solutions of the present application may be embodied in the form of software products or in the implementation process of data migration, which essentially or partially contributes to the prior art. All or portions of the present application are operational with numerous general purpose or special purpose computing system environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet-type devices, mobile communication terminals, multiprocessor systems, microprocessor-based systems, programmable electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like.
While the present application has been described with examples, those of ordinary skill in the art will appreciate that there are numerous variations and permutations of the present application without departing from the spirit of the application, and it is intended that the appended claims encompass such variations and permutations without departing from the spirit of the application.

Claims (17)

1. An electronic certificate recognition triggering method, the method comprising:
continuously acquiring a video image for a certificate placement area, and converting all single-frame images in the video image into initial pictures in an RGB color mode;
calculating the average gray value and/or the average color component of the difference preset area of the initial picture, and selecting the average gray value and/or the average color component of the difference preset area of the initial picture as a parameter for judging whether the certificate is placed in the certificate placing area; correspondingly, when the absolute value of the difference between the average gray value of the difference preset region of the initial picture of the previous frame and the average gray value of the difference preset region of the initial picture of the next frame is greater than the gray value difference threshold, and the average gray value of at least one gray value preset region of the initial picture of the next frame is greater than the gray value threshold, and/or,
and when the absolute value of the difference value between the average color component of the difference value preset area of the initial picture of the previous frame and the average color component of the difference value preset area of the initial picture of the next frame is greater than a color component difference value threshold, and the average red component of at least one red component preset area of the corresponding next frame of the initial picture is greater than a red component threshold and/or the average green component of at least one green component preset area is greater than a green component threshold and/or the average blue component of at least one blue component preset area is greater than a blue component threshold, outputting a trigger signal.
2. The method of claim 1, wherein calculating the average gray-scale value of the difference preset region of the initial picture comprises:
calculating the gray value of each pixel point in the difference preset region according to the red component, the green component and the blue component of each pixel point in the difference preset region;
and calculating the average value of the gray values of all the pixel points in the difference preset area to be used as the average gray value of the difference preset area.
3. The method according to claim 1 or 2, wherein the initial picture comprises one of the difference value preset regions and a plurality of the gray value preset regions; the gray value threshold comprises a plurality of secondary gray value thresholds;
when the average gray value of at least one gray value preset area of the initial picture of the next frame is greater than the gray value threshold, the method comprises the following steps:
and when the average gray value of each preset gray value area of the initial image of the next frame is greater than the corresponding secondary gray value threshold value.
4. The method of claim 1, wherein the average color component comprises an average red component and/or an average green component and/or an average blue component; correspondingly, the color component difference threshold comprises a red component difference threshold and/or a green component difference threshold and/or a blue component difference threshold;
correspondingly, calculating an average color component of a difference preset region of the initial picture, including:
calculating the average value of the red components of all the pixel points in the difference preset region as the average red component of the difference preset region, and/or
Calculating the average value of the green components of all the pixel points in the difference preset region as the average green component of the difference preset region, and/or
Calculating the average value of the blue components of all the pixel points in the difference value preset region as the average blue component of the difference value preset region;
correspondingly, when the absolute value of the difference between the average color component of the difference preset region of the initial picture of the previous frame and the average color component of the difference preset region of the initial picture of the next frame is greater than the color component difference threshold, the method includes:
when the difference value between the average red component of the difference value preset region of the previous frame picture and the average red component of the difference value preset region of the next frame picture is greater than the red component difference value threshold, and/or
When the difference value between the average green component of the difference value preset area of the previous frame picture and the average green component of the difference value preset area of the next frame picture is larger than the green component difference value threshold value, and/or
And when the difference value between the average blue component of the difference value preset region of the previous frame picture and the average blue component of the difference value preset region of the next frame picture is greater than the blue component difference value threshold.
5. The method according to claim 1, wherein the initial picture includes one of the difference preset regions and a plurality of the red component preset regions; the red component threshold comprises a plurality of secondary red component thresholds;
wherein, when the average red component of at least one red component preset area of the initial picture of the next frame is larger than the red component threshold, the method comprises the following steps:
and when the average red component of each preset red component area of the initial picture of the next frame is greater than the corresponding secondary red component threshold value.
6. The method according to claim 1, wherein the initial picture comprises one of the difference preset regions and a plurality of the green component preset regions; the green component threshold comprises a plurality of secondary green component thresholds;
wherein, when the average green component of at least one green component preset region of the initial picture of the next frame is greater than the green component threshold, the method comprises the following steps:
and when the average green component of each preset green component area of the initial picture of the next frame is greater than the corresponding secondary green component threshold value.
7. The method according to claim 1, wherein the initial picture comprises one of the difference preset regions and a plurality of the blue component preset regions; the blue component threshold comprises a plurality of secondary blue component thresholds;
when the average blue component of at least one blue component preset region of the initial picture of the next frame is greater than a blue component threshold, the method comprises the following steps:
and when the average blue component of each blue component preset area of the initial picture of the next frame is greater than the corresponding secondary blue component threshold value.
8. An electronic document identification triggering mechanism, comprising: an image acquisition module, a calculation module and an output module,
the image acquisition module is used for continuously acquiring video images for the certificate placement area and converting all single-frame images in the video images into initial pictures in an RGB color mode;
the calculation module is configured to calculate an average gray value of the difference preset region of the initial picture, and/or calculate an average color component of the difference preset region of the initial picture;
the output module is configured to select an average gray value and/or an average color component of a difference preset region of the initial picture as a parameter for determining whether a certificate is placed in the certificate placement region, an absolute value of a difference between an average gray value of the difference preset region of the previous frame of the initial picture and an average gray value of the difference preset region of the next frame of the initial picture is greater than a gray value difference threshold, and/or when an average gray value of at least one gray value preset region of the next frame of the initial picture is greater than the gray value threshold,
and when the absolute value of the difference value between the average color component of the difference value preset area of the initial picture of the previous frame and the average color component of the difference value preset area of the initial picture of the next frame is greater than a color component difference value threshold, and the average red component of at least one red component preset area of the corresponding next frame of the initial picture is greater than a red component threshold and/or the average green component of at least one green component preset area is greater than a green component threshold and/or the average blue component of at least one blue component preset area is greater than a blue component threshold, outputting a trigger signal.
9. The electronic document identification trigger device of claim 8, wherein the calculation module comprises a gray value calculation module and an average gray value calculation module;
the gray value calculation module is used for calculating the gray value of each pixel point in the difference preset region according to the red component, the green component and the blue component of each pixel point in the difference preset region;
the average gray value calculation module is used for calculating the average value of the gray values of all the pixel points in the difference preset region and taking the average value as the average gray value of the difference preset region.
10. The electronic document identification trigger device of claim 8, wherein the initial picture comprises one of the difference value preset regions and a plurality of the gray value preset regions; the gray value threshold comprises a plurality of secondary gray value thresholds;
the output module is configured to output a trigger signal when an absolute value of a difference between an average gray value of the difference preset region of the previous frame of the initial picture and an average gray value of the difference preset region of the next frame of the initial picture is greater than a gray value difference threshold, and when an average gray value of each gray value preset region of the next frame of the initial picture is greater than the corresponding secondary gray value threshold.
11. The electronic document identification trigger of claim 8, wherein the average color component comprises an average red component and/or an average green component and/or an average blue component; correspondingly, the color component difference threshold comprises a red component difference threshold and/or a green component difference threshold and/or a blue component difference threshold;
correspondingly, the calculation module comprises a red component calculation module and/or a green component calculation module and/or a blue component calculation module, wherein,
the red component calculating module is used for calculating the average value of the red components of all the pixel points in the difference value preset region as the average red component of the difference value preset region,
the green component calculating module is used for calculating the average value of the green components of all the pixel points in the difference value preset region as the average green component of the difference value preset region,
the blue component calculation module is used for calculating the average value of the blue components of all the pixel points in the difference value preset region as the average blue component of the difference value preset region;
correspondingly, the output module comprises a red output module and/or a green output module and/or a blue output module, wherein,
the red output module is used for outputting a trigger signal when the difference value between the average red component of the difference value preset area of the previous frame picture and the average red component of the difference value preset area of the next frame picture is greater than the red component difference value threshold,
the green output module is used for outputting a trigger signal when the difference value between the average green component of the difference value preset area of the previous frame picture and the average green component of the difference value preset area of the next frame picture is greater than the green component difference value threshold,
the blue output module is used for outputting a trigger signal when the difference value between the average blue component of the difference value preset area of the previous frame picture and the average blue component of the difference value preset area of the next frame picture is larger than the blue component difference value threshold.
12. The electronic certificate recognition trigger device of claim 11, wherein the red output module is configured to output a trigger signal when a difference between an average red component of a difference preset area of the previous frame of picture and an average red component of a difference preset area of the next frame of picture is greater than the red component difference threshold and an average red component of at least one red component preset area of the next frame of the initial picture is greater than a red component threshold.
13. The electronic document identification trigger device of claim 11, wherein the initial picture includes one of the difference preset regions and a plurality of the red component preset regions; the red component threshold comprises a plurality of secondary red component thresholds;
the red output module is configured to output a trigger signal when a difference value between an average red component of a difference value preset region of the previous frame of picture and an average red component of a difference value preset region of the next frame of picture is greater than the red component difference threshold and an average red component of each red component preset region of the next frame of the initial picture is greater than the corresponding secondary red component threshold.
14. The electronic certificate recognition trigger device of claim 11, wherein the green output module is configured to output a trigger signal when a difference between an average green component of a difference preset area of the previous frame of picture and an average green component of a difference preset area of the next frame of picture is greater than the green component difference threshold and an average green component of at least one green component preset area of the next frame of the initial picture is greater than a green component threshold.
15. The electronic document identification trigger device of claim 11, wherein the initial picture includes one of the difference preset regions and a plurality of the green component preset regions; the green component threshold comprises a plurality of secondary green component thresholds;
the green output module is configured to output a trigger signal when a difference value between an average green component of a difference value preset region of the previous frame of picture and an average green component of a difference value preset region of the next frame of picture is greater than the green component difference threshold and an average green component of each green component preset region of the next frame of the initial picture is greater than the corresponding secondary green component threshold.
16. The electronic certificate recognition trigger device of claim 11, wherein the blue output module is configured to output a trigger signal when a difference value between an average blue component of a difference value preset area of the previous frame of picture and an average blue component of a difference value preset area of the next frame of picture is greater than the blue component difference threshold and an average blue component of at least one blue component preset area of the next frame of the initial picture is greater than a blue component threshold.
17. The electronic document identification trigger device of claim 11, wherein the initial picture comprises one of the difference preset regions and a plurality of the blue component preset regions; the blue component threshold comprises a plurality of secondary blue component thresholds;
the blue output module is configured to output a trigger signal when a difference value between an average blue component of a difference value preset region of the previous frame of picture and an average blue component of a difference value preset region of the next frame of picture is greater than the blue component difference threshold and an average blue component of each blue component preset region of the next frame of the initial picture is greater than the corresponding secondary blue component threshold.
CN201710269514.0A 2017-04-24 2017-04-24 Electronic certificate identification triggering method and device Active CN107133618B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710269514.0A CN107133618B (en) 2017-04-24 2017-04-24 Electronic certificate identification triggering method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710269514.0A CN107133618B (en) 2017-04-24 2017-04-24 Electronic certificate identification triggering method and device

Publications (2)

Publication Number Publication Date
CN107133618A CN107133618A (en) 2017-09-05
CN107133618B true CN107133618B (en) 2021-03-19

Family

ID=59716023

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710269514.0A Active CN107133618B (en) 2017-04-24 2017-04-24 Electronic certificate identification triggering method and device

Country Status (1)

Country Link
CN (1) CN107133618B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109248378B (en) * 2018-09-09 2020-10-16 深圳硅基仿生科技有限公司 Video processing device and method of retina stimulator and retina stimulator

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101630361A (en) * 2008-12-30 2010-01-20 北京邮电大学 Plate number, body color and mark identification-based equipment and plate number, body color and mark identification-based method for identifying fake plate vehicles
CN201583967U (en) * 2009-06-06 2010-09-15 李连海 Certificate automatic shooting and recognizing recording instrument
US9202145B2 (en) * 2012-11-30 2015-12-01 Safety Management Services, Inc. System and method of determining material reaction or sensitivity using high-speed video frames
CN104182726A (en) * 2014-02-25 2014-12-03 苏凯 Real name authentication system based on face identification
CN104008360B (en) * 2014-05-16 2019-06-14 北京致胜宏达科技有限公司 A kind of automatic sensing bar code reading method and automatic sensing barcode reader
WO2016089918A1 (en) * 2014-12-01 2016-06-09 Kustom Signals, Inc. In-car digital video system with integrated alpr
CN105528604B (en) * 2016-01-31 2018-12-11 华南理工大学 A kind of bill automatic identification and processing system based on OCR
CN106326885A (en) * 2016-10-31 2017-01-11 深圳前海弘稼科技有限公司 Planting greenhouse security monitoring method and device

Also Published As

Publication number Publication date
CN107133618A (en) 2017-09-05

Similar Documents

Publication Publication Date Title
US8886054B2 (en) Information transmission system, information sending device, information receiving device, information transmission method, information sending method, information receiving method and program product
KR101619287B1 (en) Method and wireless handheld device for determining image hue
CN111368819B (en) Light spot detection method and device
KR20150120975A (en) Unevenness inspection system, unevenness inspection method, and unevenness inspection program
EP2713611A1 (en) Image display adjustment method, device and system
CN105049949A (en) Coding method of instant video and electronic equipment
CN113014803A (en) Filter adding method and device and electronic equipment
WO2020119454A1 (en) Method and apparatus for color reproduction of image
CN102088539A (en) Method and system for evaluating pre-shot picture quality
CN107133618B (en) Electronic certificate identification triggering method and device
US9098895B2 (en) Image processing method and device
US20150271416A1 (en) Information Processing Method and Electronic Device
US9374530B2 (en) Method and apparatus for displaying preview image and storage medium
CN113537092A (en) Smoke and fire detection method, device, equipment and storage medium
CN113284472A (en) Screen projection resolution conversion method, device, equipment and storage medium
KR101926748B1 (en) Status determination system
US9374568B2 (en) Image processing apparatus, imaging apparatus, and image processing method
CN113163181A (en) Projection device and projection display system using same
CN107948652B (en) Method and equipment for image conversion
CN108242178B (en) Parking space detection method and device and electronic equipment
CN104217520A (en) Oil field fire-prevention prewarning system and fire magnitude judging method thereof
CN103167183B (en) Translucent camera aperture processing method, system and mobile terminal
CN113962974A (en) Image processing method, image processing apparatus, electronic device, and medium
CN113038179A (en) Video encoding method, video decoding method, video encoding device, video decoding device and electronic equipment
CN107153834B (en) Image recognition light spot processing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20210223

Address after: 100191 room 1609, 16 / F, Yingu building, No.9, North Fourth Ring Road West, Haidian District, Beijing

Applicant after: BEIJING SINOSECU TECHNOLOGY Co.,Ltd.

Address before: 100190 room 1609, 16 / F, Yingu building, No.9, North Fourth Ring Road West, Haidian District, Beijing

Applicant before: Zhang Yan

GR01 Patent grant
GR01 Patent grant
PE01 Entry into force of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: Electronic certificate recognition triggering method and device

Effective date of registration: 20220120

Granted publication date: 20210319

Pledgee: Haidian Beijing science and technology enterprise financing Company limited by guarantee

Pledgor: BEIJING SINOSECU TECHNOLOGY CO.,LTD.

Registration number: Y2022110000013

PC01 Cancellation of the registration of the contract for pledge of patent right
PC01 Cancellation of the registration of the contract for pledge of patent right

Date of cancellation: 20230302

Granted publication date: 20210319

Pledgee: Haidian Beijing science and technology enterprise financing Company limited by guarantee

Pledgor: BEIJING SINOSECU TECHNOLOGY CO.,LTD.

Registration number: Y2022110000013