CN115361480A - Picture correction method, device and medium for high-speed shooting instrument - Google Patents

Picture correction method, device and medium for high-speed shooting instrument Download PDF

Info

Publication number
CN115361480A
CN115361480A CN202210884453.XA CN202210884453A CN115361480A CN 115361480 A CN115361480 A CN 115361480A CN 202210884453 A CN202210884453 A CN 202210884453A CN 115361480 A CN115361480 A CN 115361480A
Authority
CN
China
Prior art keywords
picture
correction
image
license
speed
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.)
Granted
Application number
CN202210884453.XA
Other languages
Chinese (zh)
Other versions
CN115361480B (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.)
Inspur Financial Information Technology Co Ltd
Original Assignee
Inspur Financial Information 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 Inspur Financial Information Technology Co Ltd filed Critical Inspur Financial Information Technology Co Ltd
Priority to CN202210884453.XA priority Critical patent/CN115361480B/en
Publication of CN115361480A publication Critical patent/CN115361480A/en
Application granted granted Critical
Publication of CN115361480B publication Critical patent/CN115361480B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/387Composing, repositioning or otherwise geometrically modifying originals
    • H04N1/3877Image rotation
    • H04N1/3878Skew detection or correction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/04Scanning arrangements, i.e. arrangements for the displacement of active reading or reproducing elements relative to the original or reproducing medium, or vice versa
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/387Composing, repositioning or otherwise geometrically modifying originals
    • H04N1/3872Repositioning or masking
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/46Colour picture communication systems
    • H04N1/56Processing of colour picture signals
    • H04N1/60Colour correction or control

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses a picture correction method, a picture correction device and a picture correction medium for a high-speed shooting instrument, wherein the method comprises the following steps of: correcting the shooting environment of the high-speed shooting instrument; after the shooting environment of the high-speed shooting instrument is corrected, calling the high-speed shooting instrument to capture an original license picture; calling an image correction algorithm to perform position correction and chromaticity correction on the original license picture to obtain a final corrected image; the invention can automatically detect and cut the picture shot by the high-speed shooting instrument with high precision in the effective core area, avoids the waste of storage resources, also can rotationally correct and adjust the exposure of the picture shot by the high-speed shooting instrument, prevents the picture from being too bright or too dark, improves the quality of the picture shot by the high-speed shooting instrument, can support the processing of pictures obtained by simultaneously shooting a plurality of licenses at one time, improves the correction intelligence, improves the shooting efficiency to a certain extent, and finally improves the storage quality and later identifiability of the picture.

Description

Picture correction method, device and medium for high-speed shooting instrument
Technical Field
The invention relates to the technical field of self-service terminals, in particular to a picture correction method, a picture correction device and a picture correction medium for a high-speed shooting instrument, which are applied to the field of high-speed shooting instrument picture processing of self-service terminals.
Background
At present, when a bank transacts business, a user identity card, a house account book, a passport and other identification documents are usually required to be photographed and filed through a high photographing instrument; the current self-service terminal can directly store the pictures shot by the high-speed shooting instrument without any processing;
based on the above process, there are the following problems:
on the first hand, the shooting range of a high-speed shooting instrument is usually large, and the integral occupation ratio of identification cards or house notebooks and other identification cards is small, which can cause that the shot identification card pictures contain a large number of invalid areas, thereby not only reducing the identifiability of the pictures, but also wasting certain storage resources;
on the second hand, when the identity card or the account book and other certificates are placed, the identity card or the account book is inclined, and the direct storage of the shot picture can cause the image of the identity card or the image of the account book to be inclined, so that the later viewing and identification are not facilitated;
in a third aspect, the high-speed camera only adjusts the exposure of the whole photo when taking a photo, and a large area of blank area, such as white or black, affects the adjustment of the exposure, and finally the core area of the license is too dark or too bright.
Disclosure of Invention
The present invention is directed to a method, an apparatus, and a medium for correcting a picture in a high-speed camera, which solve the above-mentioned problems in the prior art.
In order to solve the technical problems, the specific technical scheme of the invention is as follows:
in one aspect, the present invention provides a picture correction method for a high-speed scanner, including the following steps:
correcting the shooting environment of the high-speed shooting instrument;
after the shooting environment of the high-speed shooting instrument is corrected, calling the high-speed shooting instrument to capture an original license picture;
and calling an image correction algorithm to perform position correction and chromaticity correction on the original license picture to obtain a final corrected image.
As an improved scheme, the image correction algorithm is as follows:
carrying out region position detection on the original license picture to obtain region data;
performing slant correction on the license region of the original license picture according to the region data to obtain a first corrected image;
and carrying out regional chromaticity adjustment on the first corrected image to obtain the final corrected image.
As an improved scheme, the performing region position detection on the original license picture to obtain region data includes:
setting an expansion direction;
setting pixel filling colors according to the edge pixels of the original license picture;
performing pixel expansion on the original license picture according to the expansion direction and the pixel filling color;
performing edge detection on the original license picture after the pixel expansion by adopting an edge detection algorithm to obtain an edge detected image;
and performing fitting calculation processing based on the edge detection image to obtain the region data.
As an improvement, the performing fitting calculation processing based on the edge-detected image to obtain the region data includes:
sequentially carrying out corrosion processing operation and expansion processing operation on the edge detected image to obtain an edge optimized image;
detecting the outer contour of the edge optimization image by adopting a contour detection algorithm;
acquiring a first vertex coordinate of the edge optimization image;
performing polygon fitting on the outer contour according to the first vertex coordinates to obtain a fitting vertex;
if the number of the fitting vertexes is four and the outer contour corresponding to the fitting vertexes is convex, calculating the area of the area corresponding to the outer contour;
setting an area value and an error interval of a license template, and judging whether the area of the area is approximate to the area value of the template or not according to the error interval; if yes, judging that a first certificate exists in the outer contour, and calculating a minimum rectangular bounding box of the outer contour; calculating second vertex coordinates of the minimum rectangular bounding box;
and sorting the second vertex coordinates as the area data.
As an improved scheme, the performing slant correction on the license area of the original license picture according to the area data to obtain a first corrected image includes:
confirming a left edge vertex and a right edge vertex according to the second vertex coordinate in the license area corresponding to the second vertex coordinate;
judging whether the left side edge vertex and the right side edge vertex meet the clipping requirement or not;
if so, performing rectangular clipping on the license region according to the second vertex coordinates, and setting an image obtained by clipping as the first correction image;
and if not, performing the inclination correction on the license region according to the left side edge vertex and the right side edge vertex.
As an improved solution, the performing the tilt correction on the license region according to the left-side edge vertex and the right-side edge vertex includes:
setting a dip angle calculation formula, substituting the left side edge vertex and the right side edge vertex into the dip angle calculation formula for calculation to obtain a dip angle of the license area;
calculating a rotation matrix about the license region according to the inclination angle;
performing rotation correction on the license area according to the rotation matrix;
acquiring a third vertex coordinate corresponding to the license area after rotation correction;
and performing rectangular cutting on the license area after rotation correction according to the third vertex coordinates, and setting an image obtained by cutting as the first correction image.
As an improved solution, the performing regional chromaticity adjustment on the first corrected image to obtain the final corrected image includes:
calculating a gray level histogram of an image region of the first corrected image;
adjusting an exposure coefficient of the high-speed shooting instrument according to a gray value concentration area in the gray level histogram;
capturing a new license picture by adopting the high-speed shooting instrument after the exposure coefficient is adjusted;
detecting the area position of the new license picture to obtain new area data;
performing slant correction on the license area of the new license picture according to the new area data to obtain a new corrected image;
and saving the new correction image as the final correction image.
As an improved solution, the correcting of the shooting environment of the high-speed shooting instrument includes:
setting a shooting position of a high-speed shooting instrument to be at a first position or a second position;
a light supplementing unit is arranged in a shooting box body of the high-speed shooting instrument;
performing anti-reflection treatment on the interior of a shooting box body of the high-speed shooting instrument;
and setting the interior of a shooting box body of the high-speed shooting instrument into a first color.
In another aspect, the present invention further provides a picture correction apparatus for a high-speed shooting apparatus, including:
the shooting environment correction unit is used for correcting the shooting environment of the high-speed shooting instrument;
the high-speed shooting instrument control unit is used for calling the high-speed shooting instrument to capture an original license picture after correcting the shooting environment of the high-speed shooting instrument;
and the image correction unit is used for calling an image correction algorithm to carry out position correction and chromaticity correction on the original license picture to obtain a final corrected image.
In another aspect, the present invention further provides a computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the steps of the picture correction method for a high-speed photographing apparatus.
The technical scheme of the invention has the beneficial effects that:
1. the picture correction method for the high-speed shooting instrument can realize high-precision automatic detection and automatic cutting of an effective core area of a picture shot by the high-speed shooting instrument, avoids waste of storage resources, can also carry out rotation correction and exposure adjustment on the picture shot by the high-speed shooting instrument, prevents the picture from being too bright or too dark, improves the quality of the picture shot by the high-speed shooting instrument, can support processing of pictures obtained by simultaneously shooting a plurality of licenses at one time, improves correction intelligence, improves shooting efficiency to a certain extent, and finally improves the storage quality of the picture and the identifiability of a later period.
2. The picture correction device for the high-speed shooting instrument can realize high-precision automatic detection and automatic cutting of an effective core area of a picture shot by the high-speed shooting instrument through the mutual cooperation of the shooting environment correction unit, the high-speed shooting instrument control unit and the image correction unit, avoids waste of storage resources, and can also perform rotation correction and exposure adjustment on the picture shot by the high-speed shooting instrument, prevent the picture from being too bright or too dark, improve the quality of the picture shot by the high-speed shooting instrument, support the processing of pictures obtained by simultaneously shooting a plurality of licenses at one time, improve correction intelligence, improve the shooting efficiency to a certain extent, and finally improve the storage quality of the picture and the identifiability of a later period.
3. The computer-readable storage medium can guide the shooting environment correction unit, the high-speed shooting instrument control unit and the image correction unit to be matched, so that high-precision automatic detection and automatic cutting of an effective core area of a picture shot by the high-speed shooting instrument are realized, waste of storage resources is avoided, the picture shot by the high-speed shooting instrument is subjected to rotation correction and exposure adjustment, the picture is prevented from being too bright or too dark, the quality of the picture shot by the high-speed shooting instrument is improved, the scheme can support processing of pictures obtained by simultaneously shooting a plurality of certificates at one time, correction intelligence is improved, the shooting efficiency is improved to a certain extent, the storage quality of the picture and the identifiability of the later period are finally improved, and the operability of the picture correction method for the high-speed shooting instrument is effectively improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic flow chart of a picture correction method for a high-speed shooting instrument according to embodiment 1 of the present invention;
FIG. 2 is a schematic diagram of an algorithm flow of the correction algorithm in a picture correction method for a high-speed shooting instrument according to embodiment 1 of the present invention;
fig. 3 is a schematic structural diagram of a picture correction device for a high-speed shooting apparatus according to embodiment 2 of the present invention.
Detailed Description
The following detailed description of the preferred embodiments of the present invention, taken in conjunction with the accompanying drawings, will make the advantages and features of the invention easier to understand by those skilled in the art, and thus will clearly and clearly define the scope of the invention.
In the description of the present invention, it should be noted that the described embodiments of the present invention are part of the embodiments of the present invention, 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 invention.
The terms "first," "second," and the like in the description and claims herein and in the above-described figures are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments herein described are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, apparatus, article, or device that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or device.
Example 1
The embodiment provides a picture correction method for a high-speed shooting instrument, as shown in fig. 1 and fig. 2, comprising the following steps:
s100, correcting a shooting environment of the high-speed shooting instrument;
s200, after the shooting environment of the high-speed shooting instrument is corrected, calling the high-speed shooting instrument to capture an original license picture;
s300, calling an image correction algorithm to perform position correction and chromaticity correction on the original license picture to obtain a final corrected image.
As an embodiment of the present invention, in step S300, the image correction algorithm is:
s310, detecting the area position of the original license picture to obtain area data; the purpose of the step is to further determine the position of the license area corresponding to the original license picture to be presented in the picture shot by the high-speed shooting instrument;
s320, performing inclination correction on the license region of the original license picture according to the region data to obtain a first corrected image; the purpose of the step is to perform slant correction on the license area confirmed by the image correction algorithm, and further perform cutting to ensure that the license area is forward, thereby ensuring subsequent high-quality image processing;
s330, performing regional chromaticity adjustment on the first corrected image to obtain a final corrected image; the purpose of this step is to adjust the luminance in the region of the certificate, prevent too dark or too bright, further guarantee the subsequent high-quality image processing.
As an embodiment of the present invention, the performing region position detection on the original license picture to obtain region data includes:
setting an expansion direction; in the embodiment, the expansion direction is set to be four directions of the upper direction, the lower direction, the left direction and the right direction of the picture, and pixel filling colors are set according to edge pixels of the original license picture; in the embodiment, the pixel filling color is the reverse color of the edge pixel of the original license picture, and if the edge pixel of the original license picture is white, the pixel filling color is black; performing pixel expansion on the original license picture according to the expansion direction and the pixel filling color; in the embodiment, the original license picture is respectively extended by 5 pixels in four directions of up, down, left and right, for example, when the edge pixels of the original license picture are white, the 5 extended pixels are all filled with black; the step can prevent the situation that the edge is lost when the original license picture is placed at the edge of the high-speed shooting instrument, and further provides a basis for subsequent high-quality image processing; performing edge detection on the original license picture after the pixel expansion by adopting an edge detection algorithm to obtain an edge detected image; the edge detection algorithm adopts a canny edge detection operator; and performing fitting calculation processing based on the edge detection image to obtain the region data.
As an embodiment of the present invention, the performing fitting calculation processing based on the edge-detected image to obtain the region data includes:
sequentially carrying out corrosion processing operation and expansion processing operation on the edge detected image to obtain an edge optimized image; in the operation process of the corrosion processing operation and the expansion processing operation, the operation kernel selects the 5*5 elliptical kernel, firstly, the corrosion processing operation is carried out, then, the expansion processing operation is carried out, further, noise and fine edge parts in the image are removed, discontinuous long edge parts are combined, and the smoothness of the image is improved; detecting and searching the outer contour of the edge optimization image by adopting a contour detection algorithm; then acquiring a first vertex coordinate of the edge optimization image; performing polygon fitting on the outer contour according to the first vertex coordinates to obtain a fitting vertex; if the number of the fitting vertexes is four and the outer contour corresponding to the fitting vertexes is convex, the contour is in accordance with the requirement, and the area of the region corresponding to the outer contour is calculated; if the number of the fitting vertexes is not four or the outer contour corresponding to the fitting vertexes is not convex, searching the contour again, and performing fitting and the judgment again; setting an area value and an error interval of a license template, wherein the area of the license template is a standard area of a certain type of license, the error interval is set according to specific requirements, and the area is set to be ninety-nine percent of the area value of the template in the embodiment; judging whether the area of the area is approximate to the area value of the template or not according to the error interval, if so, indicating that the outer contour corresponds to the certain type of license, so that a first license is judged to exist in the outer contour, the first license is the certain type of license, and the specific type is set according to requirements and comprises but not limited to an identity card, a driving license and the like; calculating a minimum rectangular bounding box of the outer contour corresponding to the first license because the licenses are usually rectangular; calculating second vertex coordinates of the minimum rectangular bounding box; the number of the second vertex coordinates is four, and the coordinates are the position coordinates of the license area of the first license; and sorting the second vertex coordinates as the area data.
As an embodiment of the present invention, the performing a tilt correction on the license region of the original license picture according to the region data to obtain a first corrected image includes:
confirming a left edge vertex and a right edge vertex according to the second vertex coordinate in the license area corresponding to the second vertex coordinate;
judging whether the left side edge vertex and the right side edge vertex meet the clipping requirement, if the left side edge vertex and the right side edge vertex both comprise two vertexes, the license area is horizontal, has no inclination and does not need to be corrected, so the clipping requirement is met; if yes, performing rectangular clipping on the license region according to the second vertex coordinates, and setting an image obtained by clipping as the first correction image; if not, the inclination correction is needed, so the inclination correction is carried out on the license region according to the left side edge vertex and the right side edge vertex.
As an embodiment of the present invention, the performing the tilt correction on the license region according to the left-side edge vertex and the right-side edge vertex includes:
setting a dip angle calculation formula, substituting the left side edge vertex and the right side edge vertex into the dip angle calculation formula for calculation to obtain a dip angle theta of the license area; in the present embodiment, the coordinates of the left edge vertex are (x) left, y left ) Let the coordinate of the right edge vertex be (x) right ,y right ) (ii) a In this embodiment, the inclination angle calculation formula is:
Figure BDA0003762728580000101
calculating a rotation matrix about the license region according to the inclination angle theta; carrying out rotation correction on the license region according to the rotation matrix; acquiring a third vertex coordinate corresponding to the license area after rotation correction; and performing rectangular cutting on the license area subjected to rotation correction according to the third vertex coordinate, setting an image obtained by cutting as the first correction image, and further determining a license image of a core effective area in a picture shot by the high-speed shooting instrument.
As an embodiment of the present invention, the performing regional chroma adjustment on the first corrected image to obtain the final corrected image includes:
calculating a gray level histogram of an image region of the first corrected image; adjusting an exposure coefficient of the high-speed shooting instrument according to a gray value concentration area in the gray level histogram; capturing a new license picture by adopting the high-speed shooting instrument after the exposure coefficient is adjusted; carrying out the region position detection on the new license picture again to obtain new region data; performing slant correction on the license area of the new license picture according to the new area data to obtain a new corrected image; the new corrected image is saved as the final corrected image, the final corrected image is stored in an independent picture form, over-brightness or over-darkness of the picture is further prevented, and finally the quality and identifiability of the picture shot by the high-speed shooting instrument are improved through the cooperation of the step S100 to the step S300; when the method is used for shooting a plurality of certificates at the same time, a certificate area corresponding to one certificate is set as a cutting area and corresponds to one first correction image, when the final area chromaticity is adjusted, each certificate image needs to be respectively cut according to each cutting area and the area chromaticity is adjusted, and a plurality of finally obtained corrected images need to be stored in an independent mode respectively.
As an embodiment of the present invention, the correcting of the shooting environment of the high-speed shooting apparatus includes:
setting a shooting position of a high-speed shooting instrument to be at a first position or a second position; the first position is the top of the box body, and the second position is the bottom of the box body; a light supplementing unit is arranged in a shooting box body of the high-speed shooting instrument; in the embodiment, the light supplementing unit adopts a light supplementing lamp to perform anti-reflection treatment on the interior of the shooting box body of the high-speed shooting instrument; will the inside first colour that sets up of shooting box of high appearance of shooing, first colour is black.
Example 2
The present embodiment provides a picture correction apparatus for a high-speed shooting instrument based on the same inventive concept as the picture correction method for a high-speed shooting instrument described in embodiment 1, as shown in fig. 3, including:
as an embodiment of the present invention, the shooting environment correction unit is used for correcting the shooting environment of the high-speed shooting instrument;
the high-speed shooting instrument control unit is used for calling the high-speed shooting instrument to capture an original license picture after correcting the shooting environment of the high-speed shooting instrument;
the image correction unit is used for calling an image correction algorithm to carry out position correction and chromaticity correction on the original license picture to obtain a final corrected image;
as an embodiment of the present invention, the image correction algorithm is: the image correction unit detects the area position of the original license picture to obtain area data; the image correction unit performs tilt correction on the license area of the original license picture according to the area data to obtain a first corrected image; the image correction unit carries out regional chromaticity adjustment on the first corrected image to obtain a final corrected image;
as an embodiment of the present invention, the image correction unit performs area position detection on the original license picture to obtain area data, and includes: the image correction unit sets an expansion direction; the image correction unit sets pixel filling color according to the edge pixels of the original license picture; the image correction unit carries out pixel expansion on the original license picture according to the expansion direction and the pixel filling color; the image correction unit adopts an edge detection algorithm to carry out edge detection on the original license picture after the pixel expansion to obtain an edge detected image; the image correction unit performs fitting calculation processing based on the edge-detected image to obtain the region data;
as an embodiment of the present invention, the image correction unit performs fitting calculation processing based on the edge-detected image to obtain the region data, and includes: the image correction unit carries out corrosion processing operation and expansion processing operation on the edge-detected image in sequence to obtain an edge-optimized image; the image correction unit detects the outer contour of the edge optimization image by adopting a contour detection algorithm; an image correction unit acquires a first vertex coordinate of the edge optimization image; the image correction unit performs polygon fitting on the outer contour according to the first vertex coordinates to obtain a fitting vertex; if the number of the fitting vertexes is four and the outer contour corresponding to the fitting vertexes is convex, the image correction unit calculates the area of the area corresponding to the outer contour; the image correction unit sets a license template area value and an error interval, and judges whether the area of the area is approximate to the template area value or not according to the error interval; if yes, the image correction unit judges that a first certificate exists in the outer contour, and calculates a minimum rectangular bounding box of the outer contour; the image correction unit calculates second vertex coordinates of the minimum rectangular bounding box; the image correction unit arranges the second vertex coordinates as the area data;
as an embodiment of the present invention, the image correction unit performs tilt correction on the license area of the original license picture according to the area data to obtain a first corrected image, and includes: the image correction unit is arranged in the license area corresponding to the second vertex coordinate, and the image correction unit confirms the left edge vertex and the right edge vertex according to the second vertex coordinate; the image correction unit judges whether the left side edge vertex and the right side edge vertex meet the clipping requirement or not; if yes, the image correction unit performs rectangular clipping on the license area according to the second vertex coordinates, and an image obtained through clipping is set as the first correction image; if not, the image correction unit performs the tilt correction on the license region according to the left edge vertex and the right edge vertex;
as an embodiment of the present invention, the image correction unit performs the tilt correction on the license region based on the left edge vertex and the right edge vertex, and includes: the image correction unit sets an inclination angle calculation formula, and substitutes the left side edge vertex and the right side edge vertex into the inclination angle calculation formula for calculation to obtain the inclination angle of the license area; the image correction unit calculates a rotation matrix about the license area according to the inclination angle; the image correction unit performs rotation correction on the license area according to the rotation matrix; the image correction unit acquires a third vertex coordinate corresponding to the license area after rotation correction; the image correction unit performs rectangular cutting on the license area after rotation correction according to the third vertex coordinates, and sets an image obtained by cutting as the first correction image;
as an embodiment of the present invention, the image correction unit performs regional chromaticity adjustment on the first corrected image to obtain the final corrected image, and includes: an image correction unit calculates a gradation histogram of an image region of the first corrected image; the image correction unit adjusts the exposure coefficient of the high-speed shooting instrument according to the gray value concentration area in the gray histogram; the image correction unit captures a new license picture by adopting the high-speed shooting instrument after the exposure coefficient is adjusted; the image correction unit detects the area position of the new license picture to obtain new area data; the image correction unit performs inclination correction on the license area of the new license picture according to the new area data to obtain a new corrected image; the image correction unit saves the new correction image as the final correction image;
as an embodiment of the present invention, the imaging environment correction unit that corrects the imaging environment of the high-speed camera includes: the shooting environment correction unit sets the shooting position of the high shooting instrument to be at a first position or a second position; the shooting environment correction unit is used for arranging a light supplement unit in a shooting box body of the high-speed shooting instrument; the shooting environment correction unit performs anti-reflection treatment on the interior of a shooting box body of the high-speed shooting instrument; the shooting environment correction unit sets the interior of a shooting box body of the high-speed shooting instrument to be a first color.
Example 3
The present embodiments provide a computer-readable storage medium comprising:
the storage medium is used for storing computer software instructions for realizing the picture correction method for the high-speed shooting instrument in the embodiment 1, and the computer software instructions comprise a program for executing the picture correction method for the high-speed shooting instrument; specifically, the executable program may be embedded in the picture correction apparatus for a high-speed image taking apparatus described in embodiment 2, so that the picture correction apparatus for a high-speed image taking apparatus may implement the picture correction method for a high-speed image taking apparatus described in embodiment 1 by executing the embedded executable program.
Furthermore, the computer-readable storage medium of this embodiment may take any combination of one or more readable storage media, where a readable storage medium includes an electronic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof.
Different from the prior art, the picture correction method, the device and the medium for the high-speed shooting instrument can automatically detect and automatically cut the picture shot by the high-speed shooting instrument with high accuracy in the effective core area, avoid the waste of storage resources, and can also carry out rotation correction and exposure adjustment on the picture shot by the high-speed shooting instrument, prevent the picture from being too bright or too dark, improve the quality of the picture shot by the high-speed shooting instrument, and the scheme can also support the processing of the picture obtained by simultaneously shooting a plurality of licenses at one time, improve the correction intelligence, improve the shooting efficiency to a certain extent, and finally improve the storage quality of the picture and the identifiability of the later stage.
It should be understood that, in various embodiments herein, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments herein.
It should also be understood that, in the embodiments herein, the term "and/or" is only one kind of association relation describing an associated object, meaning that three kinds of relations may exist. For example, a and/or B, may represent: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the technical solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present disclosure.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided herein, it should be understood that the disclosed system, apparatus, and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may also be an electric, mechanical or other form of connection.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purposes of the embodiments herein.
In addition, functional units in the embodiments herein may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solutions in the present invention substantially or partially contribute to the prior art, or all or part of the technical solutions may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the methods described in the embodiments herein. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes performed by the present specification and drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A picture correction method for a high-speed shooting instrument is characterized by comprising the following steps:
correcting the shooting environment of the high-speed shooting instrument;
after the shooting environment of the high-speed shooting instrument is corrected, calling the high-speed shooting instrument to capture an original license picture;
and calling an image correction algorithm to perform position correction and chromaticity correction on the original license picture to obtain a final corrected image.
2. The picture correction method for a high-speed image taking apparatus according to claim 1, characterized in that:
the image correction algorithm comprises the following steps:
carrying out region position detection on the original license picture to obtain region data;
performing slant correction on the license region of the original license picture according to the region data to obtain a first corrected image;
and carrying out regional chromaticity adjustment on the first corrected image to obtain the final corrected image.
3. The picture correction method for high-speed camera according to claim 2, characterized in that:
the region position detection is carried out on the original license picture to obtain region data, and the method comprises the following steps:
setting an expansion direction;
setting pixel filling colors according to the edge pixels of the original license picture;
performing pixel expansion on the original license picture according to the expansion direction and the pixel filling color;
performing edge detection on the original license picture subjected to the pixel expansion by adopting an edge detection algorithm to obtain an edge detected image;
and performing fitting calculation processing based on the edge detection image to obtain the region data.
4. A picture correction method for a high-speed camera according to claim 3, characterized in that:
performing fitting calculation processing based on the edge-detected image to obtain the region data, including:
sequentially carrying out corrosion processing operation and expansion processing operation on the edge detected image to obtain an edge optimized image;
detecting the outer contour of the edge optimization image by adopting a contour detection algorithm;
acquiring a first vertex coordinate of the edge optimization image;
performing polygon fitting on the outer contour according to the first vertex coordinates to obtain a fitting vertex;
if the number of the fitting vertexes is four and the outer contour corresponding to the fitting vertexes is convex, calculating the area of the area corresponding to the outer contour;
setting an area value and an error interval of a license template, and judging whether the area of the area is approximate to the area value of the template or not according to the error interval; if yes, judging that a first certificate exists in the outer contour, and calculating a minimum rectangular bounding box of the outer contour; calculating second vertex coordinates of the minimum rectangular bounding box;
and sorting the second vertex coordinates as the area data.
5. The picture correction method for a high-speed image taking apparatus according to claim 4, characterized in that:
the method comprises the following steps of carrying out inclination correction on the license region of the original license picture according to the region data to obtain a first corrected image, and comprises the following steps:
confirming a left edge vertex and a right edge vertex according to the second vertex coordinate in the license area corresponding to the second vertex coordinate;
judging whether the left side edge vertex and the right side edge vertex meet the clipping requirement or not;
if so, performing rectangular clipping on the license region according to the second vertex coordinates, and setting an image obtained by clipping as the first correction image;
and if not, performing the inclination correction on the license region according to the left side edge vertex and the right side edge vertex.
6. The picture correction method for a high-speed image taking apparatus according to claim 5, characterized in that:
the performing the tilt correction on the license region according to the left edge vertex and the right edge vertex includes:
setting a dip angle calculation formula, substituting the left side edge vertex and the right side edge vertex into the dip angle calculation formula for calculation to obtain the dip angle of the license area;
calculating a rotation matrix about the license region according to the inclination angle;
carrying out rotation correction on the license region according to the rotation matrix;
acquiring a third vertex coordinate corresponding to the license area after rotation correction;
and performing rectangular cutting on the license area after rotation correction according to the third vertex coordinates, and setting an image obtained by cutting as the first correction image.
7. The picture correction method for high-speed camera according to claim 6, characterized in that:
the performing regional chromaticity adjustment on the first corrected image to obtain the final corrected image includes:
calculating a gray histogram of an image region of the first corrected image;
adjusting an exposure coefficient of the high-speed shooting instrument according to a gray value concentration area in the gray level histogram;
capturing a new license picture by adopting the high-speed shooting instrument after the exposure coefficient is adjusted;
detecting the area position of the new license picture to obtain new area data;
performing slant correction on the license area of the new license picture according to the new area data to obtain a new corrected image;
and saving the new correction image as the final correction image.
8. The picture correction method for a high-speed image taking apparatus according to claim 7, characterized in that:
the correction of the shooting environment of the high-speed shooting instrument comprises the following steps:
setting a shooting position of a high-speed shooting instrument to be at a first position or a second position;
a light supplementing unit is arranged in a shooting box body of the high-speed shooting instrument;
performing anti-reflection treatment on the interior of a shooting box body of the high-speed shooting instrument;
and setting the interior of a shooting box body of the high-speed shooting instrument into a first color.
9. The picture correction apparatus for a high-speed image taking instrument based on the picture correction method for a high-speed image taking instrument according to any one of claims 1 to 8, characterized by comprising:
the shooting environment correction unit is used for correcting the shooting environment of the high-speed shooting instrument;
the high-speed shooting instrument control unit is used for calling the high-speed shooting instrument to capture an original license picture after correcting the shooting environment of the high-speed shooting instrument;
and the image correction unit is used for calling an image correction algorithm to carry out position correction and chromaticity correction on the original license picture to obtain a final corrected image.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, and when being executed by a processor, the computer program realizes the steps of any one of claims 1 to 8 of the picture correction method for a high-speed shooting apparatus.
CN202210884453.XA 2022-07-25 2022-07-25 Picture correction method, device and medium for high-speed image pickup instrument Active CN115361480B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210884453.XA CN115361480B (en) 2022-07-25 2022-07-25 Picture correction method, device and medium for high-speed image pickup instrument

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210884453.XA CN115361480B (en) 2022-07-25 2022-07-25 Picture correction method, device and medium for high-speed image pickup instrument

Publications (2)

Publication Number Publication Date
CN115361480A true CN115361480A (en) 2022-11-18
CN115361480B CN115361480B (en) 2024-07-16

Family

ID=84031460

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210884453.XA Active CN115361480B (en) 2022-07-25 2022-07-25 Picture correction method, device and medium for high-speed image pickup instrument

Country Status (1)

Country Link
CN (1) CN115361480B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105120167A (en) * 2015-08-31 2015-12-02 广州市幸福网络技术有限公司 Certificate picture camera and certificate picture photographing method
CN113516598A (en) * 2021-05-19 2021-10-19 中国工商银行股份有限公司 Image correction method and device and server
CN114244965A (en) * 2021-11-22 2022-03-25 浪潮金融信息技术有限公司 High-precision exposure regulation and control method, system and medium applied to high-speed photographing instrument
WO2022121025A1 (en) * 2020-12-10 2022-06-16 广州广电运通金融电子股份有限公司 Certificate category increase and decrease detection method and apparatus, readable storage medium, and terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105120167A (en) * 2015-08-31 2015-12-02 广州市幸福网络技术有限公司 Certificate picture camera and certificate picture photographing method
WO2022121025A1 (en) * 2020-12-10 2022-06-16 广州广电运通金融电子股份有限公司 Certificate category increase and decrease detection method and apparatus, readable storage medium, and terminal
CN113516598A (en) * 2021-05-19 2021-10-19 中国工商银行股份有限公司 Image correction method and device and server
CN114244965A (en) * 2021-11-22 2022-03-25 浪潮金融信息技术有限公司 High-precision exposure regulation and control method, system and medium applied to high-speed photographing instrument

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李龙光;苏静;韩海伦;乔海强;钱帆;: "不同光照条件下二值化技术研究及应用", 电子世界, no. 20, 23 October 2015 (2015-10-23), pages 151 - 155 *

Also Published As

Publication number Publication date
CN115361480B (en) 2024-07-16

Similar Documents

Publication Publication Date Title
US9497355B2 (en) Image processing apparatus and recording medium for correcting a captured image
US10366469B2 (en) Method and system that efficiently prepares text images for optical-character recognition
US8300141B2 (en) Portable terminal apparatus, image output apparatus, method of controlling portable terminal apparatus, and recording medium
US20050244072A1 (en) Determination of main object on image and improvement of image quality according to main object
US8655100B2 (en) Correcting an artifact in an image
JP2005310068A (en) Method for correcting white of eye, and device for executing the method
CN104683634A (en) Determining Apparatus, Mobile Terminal Apparatus, And Recording Medium
JP6426815B2 (en) Image processing apparatus and image processing method
EP3308350B1 (en) Method of correcting a captured image, method of selecting a drawing sketched on a page or on two adjacent pages of a notebook, a relative app for smartphone, a hardback notebook and a hardback agenda
US8498453B1 (en) Evaluating digital images using head points
KR20180127913A (en) Image processing apparatus, image processing method, and storage medium
CN108197624A (en) The recognition methods of certificate image rectification and device, computer storage media
CN111126191B (en) Iris image acquisition method, iris image acquisition device and storage medium
CN115361480B (en) Picture correction method, device and medium for high-speed image pickup instrument
JP3860540B2 (en) Entropy filter and region extraction method using the filter
CN109766063A (en) A kind of nail beauty machine printing calibration method, device, nail beauty machine and storage medium
JP7030425B2 (en) Image processing device, image processing method, program
US11625886B2 (en) Storage medium storing program, training method of machine learning model, and image generating apparatus
CN108805033B (en) Shot image optimization method and device based on local gradient distribution
US20100104182A1 (en) Restoring and synthesizing glint within digital image eye features
CN113596425A (en) Image processing method and device for ink screen terminal, storage medium and intelligent device
CA2648054C (en) Apparatus and method for detection and analysis of imagery
JP2009116691A (en) Image processing method, image processor, and program
CN116777768B (en) Robust and efficient scanned document image enhancement method and device
JP2006107018A (en) Method and apparatus for image analysis, method and system for image processing, and operation program therefor

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
GR01 Patent grant