CN108717708B - Method and device for calculating edge slope of regular image - Google Patents

Method and device for calculating edge slope of regular image Download PDF

Info

Publication number
CN108717708B
CN108717708B CN201810276939.9A CN201810276939A CN108717708B CN 108717708 B CN108717708 B CN 108717708B CN 201810276939 A CN201810276939 A CN 201810276939A CN 108717708 B CN108717708 B CN 108717708B
Authority
CN
China
Prior art keywords
image
edge slope
slope
light source
edge
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
CN201810276939.9A
Other languages
Chinese (zh)
Other versions
CN108717708A (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.)
Shenzhen Yihua Computer Co Ltd
Shenzhen Yihua Time Technology Co Ltd
Shenzhen Yihua Financial Intelligent Research Institute
Original Assignee
Shenzhen Yihua Computer Co Ltd
Shenzhen Yihua Time Technology Co Ltd
Shenzhen Yihua Financial Intelligent Research Institute
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 Shenzhen Yihua Computer Co Ltd, Shenzhen Yihua Time Technology Co Ltd, Shenzhen Yihua Financial Intelligent Research Institute filed Critical Shenzhen Yihua Computer Co Ltd
Priority to CN201810276939.9A priority Critical patent/CN108717708B/en
Publication of CN108717708A publication Critical patent/CN108717708A/en
Application granted granted Critical
Publication of CN108717708B publication Critical patent/CN108717708B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Geometry (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

The embodiment of the invention discloses a method for calculating the edge slope of a regular image, which comprises the following steps: acquiring a target image of a square regular image of a target object acquired by a CIS image sensor, wherein the CIS image sensor at least comprises a first light source, and the target image comprises a first image corresponding to the first light source; acquiring a first edge slope of the first image, wherein the first edge slope is a horizontal edge slope or a vertical edge slope of the first image; acquiring a transverse DPI parameter and a longitudinal DPI parameter of a first light source; and calculating a second edge slope of the first image according to a preset edge slope conversion formula and by using the transverse DPI parameter and the longitudinal DPI parameter of the first light source and the first edge slope of the first image, wherein the second edge slope is the longitudinal edge slope or the transverse edge slope of the first image. By adopting the method and the device, the calculation efficiency of the edge slope in the transverse and longitudinal directions under different transverse and longitudinal DPIs of a plurality of light sources can be improved.

Description

Method and device for calculating edge slope of regular image
Technical Field
The invention relates to the technical field of image processing, in particular to a method and a device for calculating an edge slope of a regular image.
Background
When a CIS Image Sensor (Contact Image Sensor) collects an Image of a square regular target, an included angle between an Image edge and a coordinate axis of the Image in a transverse direction and a longitudinal direction is related to a DPI (Dots Per Inch) parameter for collecting the Image.
However, generally, in order to improve the resolution of the acquired image and the accuracy of the subsequent image processing, different DPIs are used for different wavelength bands according to different image acquisition requirements, and in this case, for images under different DPIs, the image edge slope at each DPI needs to be calculated separately. This results in that, in the case that there are multiple light sources and the DPI parameter of each light source is different, the horizontal and vertical slopes need to be calculated respectively according to different light source types in the process of calculating the edge slope of the image, which is a large amount of calculation and takes a long time.
Disclosure of Invention
Therefore, in order to solve the technical problem that in the traditional technology, edge slopes in the horizontal and vertical directions need to be calculated respectively for different horizontal and vertical DPIs of a plurality of light sources in the process of acquiring a direction regular image by using a CIS, the calculation method of the edge slopes of the regular image is particularly provided.
A method of computing edge slopes of a regular image, comprising:
acquiring a target image of a target object acquired by a CIS image sensor, wherein the target image is a square regular image, the CIS image sensor at least comprises a first light source, and the target image comprises a first image corresponding to the first light source;
acquiring a first edge slope of the first image, wherein the first edge slope is a horizontal edge slope or a vertical edge slope of the first image;
acquiring a transverse DPI parameter and a longitudinal DPI parameter of the first light source; and calculating a second edge slope of the first image by taking the transverse DPI parameter and the longitudinal DPI parameter of the first light source and the first edge slope of the first image as independent variables according to a preset edge slope conversion formula, wherein the second edge slope is the longitudinal edge slope or the transverse edge slope of the first image.
Optionally, in one embodiment, the calculating a second edge slope of the first image by using the lateral DPI parameter and the longitudinal DPI parameter of the first light source and the first edge slope of the first image as arguments according to a preset edge slope conversion formula further includes:
under the condition that the first edge slope of the first image is the horizontal edge slope, according to the formula
Figure BDA0001613832350000021
Calculating the slope of the longitudinal edge of the first image;
or the like, or, alternatively,
under the condition that the first edge slope of the first image is the vertical edge slope, according to the formula
Figure BDA0001613832350000022
Calculating the slope of the edge in the transverse direction of the first image;
wherein A is1Is a transverse DPI parameter of the first light source, B1Is a longitudinal DPI parameter, k, of the first light sourceh1Is the slope of the lateral edge of the first image, kz1Is the slope of the longitudinal edge of the first image.
Optionally, in one embodiment, the CIS image sensor further includes a second light source, and a transverse DPI parameter of the first light source is the same as a transverse DPI parameter of the second light source;
the target image further comprises a second image corresponding to a second light source;
the method further comprises the following steps:
and determining the horizontal edge slope and the vertical edge slope of the second image according to the horizontal edge slope and the vertical edge slope of the first image.
Optionally, in one embodiment, the method further includes:
calculating a target rotation angle corresponding to the first image according to the horizontal edge slope and the vertical edge slope of the first image;
and rotating the target image according to the target rotation angle to obtain a rotated image corresponding to the target image.
In addition, the invention also provides a device for calculating the edge slope of the regular image.
A device for calculating edge slope of regular image, comprising:
the image acquisition module is used for acquiring a target image of a target object acquired by a CIS image sensor, wherein the target image is a square regular image, the CIS image sensor at least comprises a first light source, and the target image comprises a first image corresponding to the first light source;
a first edge slope obtaining module, configured to obtain a first edge slope of the first image, where the first edge slope is a horizontal edge slope or a vertical edge slope of the first image;
the DPI parameter acquisition module is used for acquiring the transverse DPI parameter and the longitudinal DPI parameter of the first light source; and the second edge slope calculation module is used for calculating a second edge slope of the first image by taking the transverse DPI parameter and the longitudinal DPI parameter of the first light source and the first edge slope of the first image as arguments according to a preset edge slope conversion formula, wherein the second edge slope is the longitudinal edge slope or the transverse edge slope of the first image.
Optionally, in one embodiment, the second edge slope calculating module is further configured to calculate a second edge slope of the second image according to a formula when the first edge slope of the second image is a horizontal edge slope
Figure BDA0001613832350000031
Calculating the slope of the longitudinal edge of the first image;
or the like, or, alternatively,
under the condition that the first edge slope of the first image is the vertical edge slope, according to the formula
Figure BDA0001613832350000041
Calculating the slope of the edge in the transverse direction of the first image;
wherein A is1Is a transverse DPI parameter of the first light source, B1Is a longitudinal DPI parameter, k, of the first light sourceh1Is the slope of the lateral edge of the first image, kz1Is the slope of the longitudinal edge of the first image.
Optionally, in one embodiment, the CIS image sensor further includes a second light source, and a transverse DPI parameter of the first light source is the same as a transverse DPI parameter of the second light source;
the target image further comprises a second image corresponding to a second light source;
the device also comprises a second image edge slope determining module which is used for determining the horizontal edge slope and the vertical edge slope of the second image according to the horizontal edge slope and the vertical edge slope of the first image.
Optionally, in one embodiment, the apparatus further includes an image rotation module, configured to calculate a target rotation angle corresponding to the first image according to a horizontal edge slope and a vertical edge slope of the first image; and rotating the target image according to the target rotation angle to obtain a rotated image corresponding to the target image.
The embodiment of the invention has the following beneficial effects:
after the method and the device for calculating the edge slope of the regular image are adopted, in the process of calculating the transverse edge slope and the longitudinal edge slope of a plurality of target images of a CIS image sensor comprising a plurality of light sources, only one edge slope needs to be calculated, the other edge slope can be calculated according to the DPI parameters of the transverse direction and the longitudinal direction of the light sources and the known edge slope, repeated calculation according to the edge slope calculation method in the prior art is not needed, the calculation efficiency of the edge slope can be improved, and the time for image processing and calculation is saved.
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, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Wherein:
FIG. 1 is a flow chart illustrating a method for calculating an edge slope of a regular image according to an embodiment;
FIG. 2 is a diagram of an image of a regular image in one embodiment;
FIG. 3 is a schematic diagram of an embodiment of a device for calculating the edge slope of a regular image;
fig. 4 is a schematic structural diagram of a computer device for executing the method for calculating the edge slope of the regular image in one embodiment.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a 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.
In order to solve the technical problem of large calculation amount and long time consumption caused by the fact that edge slopes in the horizontal and vertical directions need to be calculated respectively for different horizontal and vertical DPIs of a plurality of light sources in the process of acquiring a direction regular image by using a CIS, in the embodiment, a method for calculating the edge slope of the regular image is particularly provided, and the method can be realized by depending on a computer program which can run on a computer system based on a von neumann system, wherein the computer program can be an application program based on image processing of a CIS image sensor.
It should be noted that, in the present embodiment, the implementation of the method for calculating the edge slope of the regular image may be an application program based on image processing in which the CIS image sensor acquires a target image of a target object, and the target image of the target object is a square regular image, for example, a rectangular or square image, where the target object may be a regular object such as a banknote, a paper sheet, and the like. In a specific embodiment, the CIS image sensor may also be an image capture device installed in a currency detection module or a banknote identification module on a self-service financial device, and the computer system executing the method for calculating the edge slope of the regular image may be a processor on the self-service financial device.
Specifically, as shown in fig. 1, the method for calculating the edge slope of the regular image includes the following steps S102 to S108:
step S102: the method comprises the steps of obtaining a target image of a target object collected through a CIS image sensor, wherein the target image is a square regular image, the CIS image sensor at least comprises a first light source, and the target image comprises a first image corresponding to the first light source.
A CIS Image Sensor (Contact Image Sensor) may be disposed in the passageway of the self-service financial device to capture an Image of a passing medium, such as a banknote, for example, an infrared Image of the medium by infrared transmitted light. Generally, in order to satisfy multiple requirements for recognition of a bill or other target image, in the present embodiment, a plurality of light sources are included in the CIS image sensor, and each light source corresponds to a different spectrum, for example, one or more light sources of red visible light, blue visible light, green visible light, red transmitted light, infrared reflected light, and ultraviolet light.
For example, when the CIS sensor includes a first light source and a second light source, the corresponding captured images include a first image corresponding to the first light source and a second image corresponding to the second light source. When N light sources are included, the target image also includes N images, and the light sources corresponding to the target image correspond to the N light sources.
Further, in the present embodiment, the correlation between the horizontal and vertical slopes is taken into consideration when calculating the horizontal and vertical slopes, and in the present embodiment, the target image corresponding to the target object needs to be a square regular image, that is, the first image, the second image, and the like are both square regular images, that is, the horizontal and vertical sides are vertical.
Step S104: acquiring a first edge slope of the first image, wherein the first edge slope is a horizontal edge slope or a vertical edge slope of the first image;
step S106: acquiring a transverse DPI parameter and a longitudinal DPI parameter of the first light source;
step S108: and calculating a second edge slope of the first image by taking the transverse DPI parameter and the longitudinal DPI parameter of the first light source and the first edge slope of the first image as independent variables according to a preset edge slope conversion formula, wherein the second edge slope is the longitudinal edge slope or the transverse edge slope of the first image.
In this embodiment, when the horizontal direction edge slope and the vertical direction edge slope of the target image are calculated, only one of them needs to be calculated, and then the other edge slope can be calculated according to the association relationship between the two.
The first edge slope acquired in step S104 may be a horizontal edge slope or a vertical edge slope, and the second edge slope in step S108 is another edge slope. That is, when the first edge slope is a horizontal edge slope, the corresponding second edge slope is a vertical edge slope; when the first edge slope is a vertical edge slope, the corresponding second edge slope is a horizontal edge slope.
It should be noted that, in this embodiment, the correlation between the horizontal edge slope and the vertical edge slope is related to the DPI parameter (Dots Per Inch) of the image sensor for acquiring the target image in the horizontal direction and the vertical direction, that is, the corresponding relationship between the horizontal edge slope and the vertical edge slope of the target image is not a direct product of 1, but the DPI parameter of the sensor in the horizontal direction and the vertical direction needs to be considered.
Therefore, when calculating the second edge slope, it is necessary to first obtain the horizontal DPI parameter and the vertical DPI parameter corresponding to the light source corresponding to the target image, and then calculate the second edge slope by using the horizontal DPI parameter, the vertical DPI parameter, and the first edge slope as arguments according to a preset edge slope conversion formula.
As shown in fig. 2, fig. 2 shows that when the regular image is a banknote image, and DPI in the transverse and longitudinal directions of the banknote image are different, an included angle θ between the transverse direction of the image and the transverse axis of the coordinate axis and an included angle α between the longitudinal direction of the image and the longitudinal axis of the coordinate axis are different, where k ish1Is the image lateral slope, kz1Is the image vertical direction slope.
Taking the schematic diagram shown in fig. 2 as an example, an angle θ between the image horizontal direction and the horizontal axis of the coordinate axis, and an angle α between the image vertical direction and the vertical axis of the coordinate axis; the dpi is A in the transverse direction, the dpi is B in the longitudinal direction, and the proportional relation r between the transverse direction and the longitudinal direction;
Figure BDA0001613832350000081
Figure BDA0001613832350000082
the proportional relation r can be deduced:
Figure BDA0001613832350000083
knowing the lateral slope k _ h, the thrust slope k _ z is as follows:
Figure BDA0001613832350000084
conversely, knowing the longitudinal slope k _ z, the lateral slope k _ h is as follows:
k_h=r*k_z。
that is, when calculating the second edge slope of the first image corresponding to the first light source, the calculation can be performed according to the first edge slope, the horizontal DPI parameter, and the vertical DPI parameter.
Specifically, A1Is a transverse DPI parameter of the first light source, B1Is a longitudinal DPI parameter, k, of the first light sourceh1Is the slope of the lateral edge of the first image, kz1Is the vertical edge slope of the first image, and according to the formula when the first edge slope of the first image is the horizontal edge slope
Figure BDA0001613832350000085
Calculating the slope of the longitudinal edge of the first image;
or the like, or, alternatively,
under the condition that the first edge slope of the first image is the vertical edge slope, according to the formula
Figure BDA0001613832350000086
And calculating the slope of the transverse edge of the first image.
Further, in this embodiment, after the edge slope of the first image in the horizontal direction and the edge slope of the first image in the vertical direction are obtained through calculation, the included angle between the first image and the horizontal axis and the vertical axis of the coordinate, that is, the included angle α and the included angle θ, may be calculated.
In this embodiment, in the transverse DPI parameters and the longitudinal DPI parameters corresponding to the N light sources included in the CIS image sensor, the transverse DPI parameters of all the light sources are the same, for example, 100 DPI. For example, in a specific embodiment, in the case that the CIS image sensor includes 6 light sources, the longitudinal DPI parameters corresponding to the 6 light sources may be different, but all of the corresponding longitudinal DPI parameters are 100 DPI.
In addition, when the horizontal edge slope and the vertical edge slope of the second image are calculated, the calculation can be directly performed according to the horizontal edge slope and the vertical edge slope of the first image. That is, after the step S108, the method further includes: and determining the horizontal edge slope and the vertical edge slope of the second image according to the horizontal edge slope and the vertical edge slope of the first image.
In a specific embodiment, the lateral edge slope of the second image is equal to the lateral edge slope of the first image and the longitudinal edge slope of the second image is equal to the longitudinal edge slope of the first image. Therefore, the horizontal direction edge slope and the vertical direction edge slope of the N sub-images contained in the target image can be calculated, namely the vertical direction edge slope of all the light sources can be calculated.
As described above, after the edge slope of the first image in the horizontal direction and the edge slope of the first image in the vertical direction are obtained through calculation, the included angle between the first image and the horizontal axis and the vertical axis of the coordinate, that is, the included angle α and the included angle θ, can be calculated. For example, the angle α and the angle θ may be calculated by an inverse trigonometric function, so that the horizontal side and the vertical side of the target image are known as the angle with the coordinate axis.
Generally, when analyzing an image of a bill, forward and reverse images of the bill are required, and when analyzing features such as a security thread, the image of the bill should be regular and should be positive, not skewed, i.e., the skew angle is 0. Therefore, in the case where the image inclination angle of the bill is not 0, it is necessary to rotate the target image so that the inclination angle of the image after rotation is 0, which facilitates further analysis.
Specifically, after the step S108, the method further includes: calculating a target rotation angle corresponding to the first image according to the horizontal edge slope and the vertical edge slope of the first image; and rotating the target image according to the target rotation angle to obtain a rotated image corresponding to the target image.
For example, as shown in fig. 2, the angle between the banknote image and the horizontal axis of the coordinates is θ, and the target image of the corresponding banknote is rotated clockwise by θ degrees to obtain a rotated image corresponding to the target image.
In addition, in another embodiment of the invention, a device for calculating the edge slope of the regular image is also provided.
Specifically, as shown in fig. 3, the apparatus for calculating the edge slope of the regular image includes an image obtaining module 102, a first edge slope obtaining module 104, a DPI parameter obtaining module 106, and a second edge slope calculating module 108, where:
the image acquisition module 102 is configured to acquire a target image of a target object acquired by a CIS image sensor, where the target image is a square regular image, the CIS image sensor at least includes a first light source, and the target image includes a first image corresponding to the first light source;
a first edge slope obtaining module 104, configured to obtain a first edge slope of the first image, where the first edge slope is a horizontal edge slope or a vertical edge slope of the first image;
a DPI parameter acquiring module 106, configured to acquire a horizontal DPI parameter and a vertical DPI parameter of the first light source;
and a second edge slope calculation module 108, configured to calculate a second edge slope of the first image according to a preset edge slope conversion formula, with the horizontal DPI parameter and the vertical DPI parameter of the first light source and the first edge slope of the first image as arguments, where the second edge slope is a vertical edge slope or a horizontal edge slope of the first image.
Optionally, in an embodiment, the second edge slope calculation module 108 is further configured to calculate a second edge slope of the second image according to a formula when the first edge slope of the second image is a horizontal edge slope
Figure BDA0001613832350000101
Calculating the slope of the longitudinal edge of the first image;
or the like, or, alternatively,
under the condition that the first edge slope of the first image is the vertical edge slope, according to the formula
Figure BDA0001613832350000111
Calculating the slope of the edge in the transverse direction of the first image;
wherein A is1Is a transverse DPI parameter of the first light source, B1Is a longitudinal DPI parameter, k, of the first light sourceh1Is the slope of the lateral edge of the first image, kz1Is the slope of the longitudinal edge of the first image.
Optionally, in an embodiment, the CIS image sensor further includes a second light source, and a transverse DPI parameter of the first light source is the same as a transverse DPI parameter of the second light source; the target image further comprises a second image corresponding to a second light source; as shown in fig. 3, the apparatus further includes a second image edge slope determining module 110, configured to determine a lateral edge slope and a longitudinal edge slope of the second image according to the lateral edge slope and the longitudinal edge slope of the first image.
Optionally, in an embodiment, as shown in fig. 3, the apparatus further includes an image rotation module 112, configured to calculate a target rotation angle corresponding to the first image according to the horizontal edge slope and the vertical edge slope of the first image; and rotating the target image according to the target rotation angle to obtain a rotated image corresponding to the target image.
The embodiment of the invention has the following beneficial effects:
after the method and the device for calculating the edge slope of the regular image are adopted, in the process of calculating the transverse edge slope and the longitudinal edge slope of a plurality of target images of a CIS image sensor comprising a plurality of light sources, only one edge slope needs to be calculated, the other edge slope can be calculated according to the DPI parameters of the transverse direction and the longitudinal direction of the light sources and the known edge slope, repeated calculation according to the edge slope calculation method in the prior art is not needed, the calculation efficiency of the edge slope can be improved, and the time for image processing and calculation is saved.
In the above embodiments, all or part of the implementation may be realized by software, hardware, firmware, or any combination thereof. When implemented using a software program, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
In one embodiment, as shown in fig. 4, fig. 4 illustrates a terminal of a computer system based on von neumann system that executes the above-described method of calculating the edge slope of a regular image. The computer system can be terminal equipment such as a smart phone, a tablet computer, a palm computer, a notebook computer or a personal computer. Specifically, an external input interface 1001, a processor 1002, a memory 1003, and an output interface 1004 connected through a system bus may be included. The external input interface 1001 may optionally include at least a network interface 10012. Memory 1003 can include external memory 10032 (e.g., a hard disk, optical or floppy disk, etc.) and internal memory 10034. The output interface 1004 may include at least a display 10042 or the like.
In the present embodiment, the method is executed based on a computer program, the program file of which is stored in the external memory 10032 of the computer system based on the von neumann system, loaded into the internal memory 10034 at the time of execution, and then compiled into machine code and then transferred to the processor 1002 to be executed, so that each virtual module is logically formed in the computer system based on the von neumann system. In the process of executing the method for calculating the edge slope of the regular image, the input parameters are all received through the external input interface 1001, and are transferred to the memory 1003 for buffering, and then are input into the processor 1002 for processing, and the processed result data is buffered in the memory 1003 for subsequent processing, or is transferred to the output interface 1004 for outputting.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present invention, and it is therefore to be understood that the invention is not limited by the scope of the appended claims.

Claims (8)

1. A method for calculating an edge slope of a regular image, comprising:
acquiring a target image of a target object acquired by a CIS image sensor, wherein the target image is a square regular image, the CIS image sensor at least comprises a first light source, and the target image comprises a first image corresponding to the first light source;
acquiring a first edge slope of the first image, wherein the first edge slope is a horizontal edge slope or a vertical edge slope of the first image;
acquiring a transverse DPI parameter and a longitudinal DPI parameter of the first light source;
according to a preset edge slope conversion formula, taking the transverse DPI parameter and the longitudinal DPI parameter of the first light source and the first edge slope of the first image as independent variables, and under the condition that the first edge slope of the first image is the transverse edge slope, according to the formula
Figure FDA0002902936970000011
Calculating the slope of the longitudinal edge of the first image;
or the like, or, alternatively,
under the condition that the first edge slope of the first image is the vertical edge slope, according to the formula
Figure FDA0002902936970000012
Calculating the slope of the edge in the transverse direction of the first image;
wherein A is1Is a transverse DPI parameter of the first light source, B1Is a longitudinal DPI parameter, k, of the first light sourceh1Is the slope of the lateral edge of the first image, kz1Is the slope of the longitudinal edge of the first image;
and calculating a second edge slope of the first image, wherein the second edge slope is a vertical edge slope or a horizontal edge slope of the first image.
2. The method according to claim 1, wherein the CIS image sensor further comprises a second light source, wherein a transverse DPI parameter of the first light source is the same as a transverse DPI parameter of the second light source;
the target image further comprises a second image corresponding to the second light source;
the method further comprises the following steps:
and determining the horizontal edge slope and the vertical edge slope of the second image according to the horizontal edge slope and the vertical edge slope of the first image.
3. The method according to claim 1 or 2, characterized in that the method further comprises:
calculating a target rotation angle corresponding to the first image according to the horizontal edge slope and the vertical edge slope of the first image;
and rotating the target image according to the target rotation angle to obtain a rotated image corresponding to the target image.
4. An apparatus for calculating an edge slope of a regular image, comprising:
the image acquisition module is used for acquiring a target image of a target object acquired by a CIS image sensor, wherein the target image is a square regular image, the CIS image sensor at least comprises a first light source, and the target image comprises a first image corresponding to the first light source;
a first edge slope obtaining module, configured to obtain a first edge slope of the first image, where the first edge slope is a horizontal edge slope or a vertical edge slope of the first image;
the DPI parameter acquisition module is used for acquiring the transverse DPI parameter and the longitudinal DPI parameter of the first light source;
a second edge slope calculation module, configured to convert a formula according to a preset edge slope, where the transverse DPI parameter and the longitudinal DPI parameter of the first light source and the first edge slope of the first image are arguments, and when the first edge slope of the first image is the transverse edge slope, the formula is used to calculate a second edge slope of the first image according to the formula
Figure FDA0002902936970000021
Calculating the slope of the longitudinal edge of the first image;
or the like, or, alternatively,
under the condition that the first edge slope of the first image is the vertical edge slope, according to the formula
Figure FDA0002902936970000031
Calculating the slope of the edge in the transverse direction of the first image;
wherein A is1Is a transverse DPI parameter of the first light source, B1Is a longitudinal DPI parameter, k, of the first light sourceh1Is the slope of the lateral edge of the first image, kz1Is the slope of the longitudinal edge of the first image;
and calculating a second edge slope of the first image, wherein the second edge slope is a vertical edge slope or a horizontal edge slope of the first image.
5. The device of claim 4, wherein the CIS image sensor further comprises a second light source, the lateral DPI parameter of the first light source being the same as the lateral DPI parameter of the second light source;
the target image further comprises a second image corresponding to the second light source;
the device also comprises a second image edge slope determining module which is used for determining the horizontal edge slope and the vertical edge slope of the second image according to the horizontal edge slope and the vertical edge slope of the first image.
6. The apparatus according to claim 4 or 5, further comprising an image rotation module for calculating a target rotation angle corresponding to the first image according to the lateral edge slope and the longitudinal edge slope of the first image; and rotating the target image according to the target rotation angle to obtain a rotated image corresponding to the target image.
7. Financial self-service device comprising a CIS image sensor and a calculation means of the edge slope of a regular image according to claims 4-6.
8. A computer-readable storage medium comprising computer instructions which, when executed on a computer, cause the computer to perform the method of claims 1-3.
CN201810276939.9A 2018-03-30 2018-03-30 Method and device for calculating edge slope of regular image Active CN108717708B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810276939.9A CN108717708B (en) 2018-03-30 2018-03-30 Method and device for calculating edge slope of regular image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810276939.9A CN108717708B (en) 2018-03-30 2018-03-30 Method and device for calculating edge slope of regular image

Publications (2)

Publication Number Publication Date
CN108717708A CN108717708A (en) 2018-10-30
CN108717708B true CN108717708B (en) 2021-04-13

Family

ID=63898695

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810276939.9A Active CN108717708B (en) 2018-03-30 2018-03-30 Method and device for calculating edge slope of regular image

Country Status (1)

Country Link
CN (1) CN108717708B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113256550A (en) * 2020-12-18 2021-08-13 深圳市怡化时代科技有限公司 Image defect detection method, device, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE3930031A1 (en) * 1988-12-17 1990-06-28 Samsung Electronics Co Ltd LIGHT-EMITTING DEVICE
CN105957238A (en) * 2016-05-20 2016-09-21 聚龙股份有限公司 Banknote management method and system
CN106056751A (en) * 2016-05-20 2016-10-26 聚龙股份有限公司 Prefix number identification method and system
CN107331031A (en) * 2017-07-04 2017-11-07 深圳怡化电脑股份有限公司 A kind of recognition methods of note denomination, device, equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE3930031A1 (en) * 1988-12-17 1990-06-28 Samsung Electronics Co Ltd LIGHT-EMITTING DEVICE
CN105957238A (en) * 2016-05-20 2016-09-21 聚龙股份有限公司 Banknote management method and system
CN106056751A (en) * 2016-05-20 2016-10-26 聚龙股份有限公司 Prefix number identification method and system
CN107331031A (en) * 2017-07-04 2017-11-07 深圳怡化电脑股份有限公司 A kind of recognition methods of note denomination, device, equipment and storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Image Preprocessing for Improving OCR Accuracy;Wojciech Bieniecki 等;《2007 International Conference on Perspective Technologies and Methods in MEMS Design》;20070730;全文 *
纸币多光谱高分辨率图像采集系统的设计与实现;周春然;《中国优秀硕士学位论文全文数据库 信息科技辑》;20180115;第2018年卷(第01期);全文 *
纸币接触式传感器图像模糊增强与边界检测;刘习文 等;《科学技术与工程》;20131231;第13卷(第34期);全文 *

Also Published As

Publication number Publication date
CN108717708A (en) 2018-10-30

Similar Documents

Publication Publication Date Title
US11120254B2 (en) Methods and apparatuses for determining hand three-dimensional data
US10504202B2 (en) Method and device for identifying whether standard picture contains watermark
US11068691B2 (en) Fingerprint image processing method, optical fingerprint identification system and electronic device
US9275281B2 (en) Mobile image capture, processing, and electronic form generation
US9760788B2 (en) Mobile document detection and orientation based on reference object characteristics
US8189961B2 (en) Techniques in optical character recognition
US8634604B2 (en) Method and system for enhanced image alignment
WO2020082731A1 (en) Electronic device, credential recognition method and storage medium
US20180253852A1 (en) Method and device for locating image edge in natural background
CN112149583A (en) Smoke detection method, terminal device and storage medium
US10049268B2 (en) Selective, user-mediated content recognition using mobile devices
CN108156452B (en) Method, device and equipment for detecting sensor and storage medium
CN108717708B (en) Method and device for calculating edge slope of regular image
CN108665605B (en) Paper money identification method and device
CN113033561B (en) Image analysis device and image analysis method
CN117408278A (en) Image processing method and device
JPH11312243A (en) Facial region detector
US11551462B2 (en) Document scanning system
US8666159B1 (en) Real time feature extraction
CN109801300B (en) Method, device and equipment for extracting coordinates of checkerboard corner points and computer-readable storage medium
CN115829911A (en) Method, apparatus and computer storage medium for detecting imaging consistency of a system
CN113313642A (en) Image denoising method and device, storage medium and electronic equipment
US8358803B2 (en) Navigation using fourier phase technique
CN113780269A (en) Image recognition method, device, computer system and readable storage medium
CN110895698B (en) Electronic red packet identification method, electronic red packet identification device and mobile terminal

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