CN113283417A - Image data processing method and device, electronic equipment and medium - Google Patents

Image data processing method and device, electronic equipment and medium Download PDF

Info

Publication number
CN113283417A
CN113283417A CN202011642005.6A CN202011642005A CN113283417A CN 113283417 A CN113283417 A CN 113283417A CN 202011642005 A CN202011642005 A CN 202011642005A CN 113283417 A CN113283417 A CN 113283417A
Authority
CN
China
Prior art keywords
image data
medium
sensor
edge information
initial image
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.)
Pending
Application number
CN202011642005.6A
Other languages
Chinese (zh)
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 Times Intelligent Automation System Co ltd
Shenzhen Yihua Computer Co Ltd
Shenzhen Yihua Time Technology Co Ltd
Original Assignee
Shenzhen Yihua Times Intelligent Automation System Co ltd
Shenzhen Yihua Computer Co Ltd
Shenzhen Yihua Time 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 Shenzhen Yihua Times Intelligent Automation System Co ltd, Shenzhen Yihua Computer Co Ltd, Shenzhen Yihua Time Technology Co Ltd filed Critical Shenzhen Yihua Times Intelligent Automation System Co ltd
Priority to CN202011642005.6A priority Critical patent/CN113283417A/en
Publication of CN113283417A publication Critical patent/CN113283417A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/10Image acquisition
    • G06V10/12Details of acquisition arrangements; Constructional details thereof
    • G06V10/14Optical characteristics of the device performing the acquisition or on the illumination arrangements
    • G06V10/147Details of sensors, e.g. sensor lenses
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Vascular Medicine (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Input (AREA)

Abstract

The embodiment of the invention provides an image data processing method, an image data processing device, electronic equipment and a medium, wherein the method is applied to a scanning module, the scanning module is provided with a medium transfer channel, and a second sensor, an image sensor and a third sensor which are sequentially arranged on the medium transfer channel; the method comprises the following steps: controlling the image sensor to acquire initial image data when the medium triggers the second sensor to generate first edge information; when the initial image data meets the preset detection condition, judging whether the initial image data has edge information or not; if not, backing the medium to the position when triggering the second sensor to generate the second edge information, and transferring the medium to the image sensor; if yes, when the medium triggers the third sensor to generate the second edge information, target image data are generated based on the acquired initial image data. The embodiment of the invention can ensure the quality and the integrity of the image data obtained by scanning the medium.

Description

Image data processing method and device, electronic equipment and medium
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to an image data processing method, an image data processing apparatus, an electronic device, and a medium.
Background
In life, people can often use a scanning module to record image data of an object, and a scanner is one of the scanning modules.
The existing scanning module design is mainly that a scanning preparation sensor is arranged in front of an image sensor at an inlet, and after a medium triggers the sensor, a system starts an image scanning module to scan and collect images, so that a target image is finally generated.
Most of the existing products use the sensor triggering starting scanning method, and if the distance between a medium inlet of the product and an image sensor is short, the scanning result is easily interfered by external factors. If a user pushes the medium into the channel quickly during scanning, and the system starts a scanning function when detecting that the scanning preparation sensor is triggered, however, the transmission speed of the medium is too high due to manual pushing, and errors can occur in acquired image data.
Disclosure of Invention
In view of the above problems, embodiments of the present invention are proposed in order to provide an image data processing method and an image data processing apparatus, an electronic device, a medium that overcome or at least partially solve the above problems.
In order to solve the above problems, an embodiment of the present invention discloses an image data processing method, which is applied to a scanning module, where the scanning module is provided with a medium transmission channel, and a second sensor, an image sensor, and a third sensor that are sequentially arranged on the medium transmission channel; the method comprises the following steps:
controlling the image sensor to acquire initial image data when the medium triggers the second sensor to generate first edge information;
when the initial image data meets a preset detection condition, judging whether the initial image data has edge information or not;
if the initial image data does not have edge information, backing the medium to a position when the second sensor is triggered to generate second edge information, and transmitting the medium to the image sensor;
and if the initial image data has edge information, generating target image data based on the acquired initial image data when the medium triggers the third sensor to generate second edge information.
Optionally, the scanning module further comprises a transfer assembly, a first sensor located on the medium transfer channel; the second sensor is located between the first sensor and the image sensor; the method further comprises the following steps:
generating a transfer instruction when the medium triggers the first sensor to generate first edge information;
controlling the transfer component to transfer the medium in a first direction in response to the transfer instruction;
the first direction is a direction from the first sensor to the image sensor.
Optionally, the step of retracting the medium to a position at which the second sensor is triggered to generate the second edge information includes:
generating a backspacing instruction;
controlling the transfer component to transfer the medium in a second direction in response to the rollback instruction;
stopping responding to the rollback instruction when the medium triggers the second sensor to generate second edge information;
the second direction is opposite to the first direction.
Optionally, the step of transferring the medium to the image sensor comprises:
controlling the transfer assembly to transfer the media in the first direction;
and returning to the step of controlling the image sensor to acquire initial image data when the medium triggers the second sensor to generate the first edge information.
Optionally, the initial image comprises at least one row unit pixel information; when the initial image data meets the preset detection condition, the step of judging whether the initial image data has edge information comprises the following steps:
detecting the line number of the line-dividing unit pixel information of the initial image data in real time;
and when the line number is larger than a preset line number threshold value, judging whether the initial image data has edge information.
Optionally, the step of determining whether the initial image data has edge information includes:
generating gray scale data matched with the initial image data; the gray scale data comprises gray scale values corresponding to respective positions in the initial image data;
determining a gray scale difference value of adjacent positions in the transfer direction of the medium by using the gray scale value;
judging whether the gray level difference value larger than a preset gray level threshold value exists or not;
if the gray level difference value larger than the preset gray level threshold value exists, determining that the edge information exists in the image data;
and if the gray level difference value larger than the preset gray level threshold value does not exist, determining that the edge information does not exist in the image data.
Optionally, the step of generating target image data based on the acquired initial image data comprises:
carrying out image algorithm processing on the acquired initial image data to obtain target image data;
the image algorithmic processing includes one or more of rotation, extraction, face recognition, compression.
The embodiment of the invention also discloses an image data processing device which is applied to a scanning module, wherein the scanning module is provided with a medium transfer channel, and a second sensor, an image sensor and a second image sensor which are sequentially arranged on the medium transfer channel; the device comprises:
the initial image acquisition module is used for controlling the image sensor to acquire initial image data when the medium triggers the second sensor to generate first edge information;
the edge detection module is used for judging whether the initial image data has edge information or not when the initial image data meets a preset detection condition;
a rollback module, configured to, if edge information does not exist in the initial image data, rollback the medium to a position at which the second sensor is triggered to generate second edge information, and transfer the medium to the image sensor;
and the target image generation module is used for generating target image data based on the acquired initial image data when the medium triggers the third sensor to generate second edge information if the initial image data has edge information.
The embodiment of the invention also discloses an electronic device, which comprises: a processor, a memory and a computer program stored on the memory and executable on the processor, which computer program, when executed by the processor, carries out the steps of the image data processing method as described above.
The embodiment of the invention also discloses a computer readable storage medium, wherein a computer program is stored on the computer readable storage medium, and when the computer program is executed by a processor, the steps of the image data processing method are realized.
The embodiment of the invention has the following advantages:
when a medium triggers the second sensor to generate first edge information, controlling the image sensor to acquire initial image data, and judging whether the initial image data has the edge information or not when the initial image data meets a preset detection condition; if the initial image data does not have edge information, backing the medium to a position triggering the second sensor to generate second edge information, and transferring the medium to the image sensor so as to acquire the image data of the medium again; if the initial image data has edge information, when the medium triggers the third sensor to generate second edge information, target image data is generated based on the acquired initial image data, so that whether the medium is normally inserted into a medium transfer channel or not is judged when the image data of the medium is acquired, if the medium is abnormally inserted, the image data of the medium is acquired again, if the medium is normally inserted, corresponding target image data is generated when the image data of the medium is acquired, the problems that the image data obtained by a module is incomplete or low in quality and the like due to interference of external factors (such as manual rapid medium pushing) are avoided, the quality and the integrity of the image data obtained by scanning the medium are guaranteed, and meanwhile, the stability, the efficiency and the user experience of the medium processing equipment are improved.
Drawings
FIG. 1 is a flow chart of the steps of an embodiment of an image data processing method of the present invention;
FIG. 2 is a schematic diagram of normal initial image data according to the present invention;
FIG. 3 is a schematic illustration of an abnormal initial image data of the present invention;
FIG. 4 is a schematic view of a scan module according to the present invention;
FIG. 5 is a media scanning flow diagram of the present invention;
fig. 6 is a block diagram showing the configuration of an embodiment of an image data processing apparatus according to the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
Referring to fig. 1, a flowchart illustrating steps of an embodiment of an image data processing method according to the present invention is shown, and the embodiment of the present invention may be applied to a scanning module, where the scanning module is provided with a medium conveying channel, and a second sensor, an image sensor, and a third sensor that are sequentially arranged on the medium conveying channel.
In a specific implementation, the scanning module may be disposed in a media processing device, and the media processing device may include, but is not limited to, a scanner, an ATM (Automatic Teller Machine), a CRS (Cash Recycling System), and a VTM (Video Teller Machine).
The embodiment of the invention specifically comprises the following steps:
step 101, when a medium triggers the second sensor to generate first edge information, controlling the image sensor to acquire initial image data;
the second sensor has a sensing area, and when the medium enters the sensing area of the second sensor, the second sensor can be triggered to generate first edge information, for example: upper edge information. Similarly, when the second sensor generates the first edge information, it indicates that the medium enters the sensing region of the second sensor. Generally, the sensing area is an area corresponding to a position where the second sensor is located.
When the second sensor generates the first edge information, the image sensor is controlled to start acquiring initial image data.
The types of the second sensor and the third sensor may include, but are not limited to, at least one of a reflective sensor and a transmissive sensor.
Types of image sensors may include, but are not limited to: a Charge Coupled Device (CCD), a Complementary Metal-Oxide-Semiconductor (CMOS), etc., which is not limited in the embodiments of the present invention, and only needs the image sensor to be able to acquire corresponding image data for the medium.
The media may be paper-based media (e.g., bank notes, tickets, etc.) or card-based media (e.g., identification cards, bank cards, etc.).
In an optional embodiment of the present invention, the scan module further comprises a transfer assembly, a first sensor located on the medium transfer passage; the second sensor is located between the first sensor and the image sensor; the method further comprises the following steps: generating a transfer instruction when the medium triggers the first sensor to generate first edge information; controlling the transfer component to transfer the medium in a first direction in response to the transfer instruction; the first direction is a direction from the first sensor to the image sensor.
The transfer assembly is for transferring media over a media transfer channel. The first sensor may be disposed at an entrance position of the scanning module for detecting an insertion event of the medium.
When the medium enters the sensing area of the first sensor, the third sensor is triggered to generate first edge information. When the first edge information generated by the first sensor is detected, the medium insertion event is determined to be detected, namely the scanning module is determined to receive the medium, so that a transmission instruction is generated, the transmission instruction is used for controlling the transmission assembly to transmit the medium in the direction from the first sensor to the image sensor, and therefore when the scanning module detects the insertion of the medium, the medium can be transmitted to the image sensor in the first direction without continuously pushing the medium manually.
In one example, the transmission assembly may include a rotatable transmission member (e.g., a transmission roller) in contact with the medium, and a power member (e.g., a motor) that provides transmission power to the transmission member.
Step 102, when the initial image data meets a preset detection condition, judging whether the initial image data has edge information;
and judging whether the currently acquired initial image data meets preset detection conditions or not in real time, and if the currently acquired initial image data meets the preset detection conditions, judging whether the initial image data has edge information or not.
Because the second sensor and the image sensor are arranged along the medium transfer channel, the medium triggers the second sensor to generate first edge information, and the medium can reach the corresponding position of the image sensor after the image sensor starts to collect initial image data.
Normally, the initial image data includes a background region and a foreground region, the foreground region refers to a virtual image corresponding to the medium, and the edge information may refer to a boundary between the foreground region and the background region in the medium transfer direction.
In an alternative embodiment of the present invention, the initial image includes at least one line-divided unit pixel information; step 102 may include:
a substep S11 of detecting the number of lines of line-divided unit pixel information of the initial image data in real time;
the medium may be divided into a plurality of line units by lines in the medium conveying direction. The image acquisition sensor acquires the information of one line-dividing unit pixel each time, and generates initial image data according to the information of at least one line-dividing unit pixel. One line-division unit pixel information may include red pixel information, blue pixel information, and green pixel information for one divided line.
And a substep S12, determining whether the initial image data has edge information when the number of lines is greater than a preset number of lines threshold.
When the number of lines is greater than the preset number of lines threshold, it indicates that the initial image data contains a virtual image corresponding to the medium, and it can be determined whether edge information exists in the initial image data.
Referring to fig. 2, a schematic diagram of normal initial image data of the present invention is shown.
If the initial image data is normal initial image data, that is, after the image sensor collects the first line-dividing unit pixel information 201, the line-dividing unit pixel information matched with the medium is collected.
When the line book is larger than the preset line number threshold, the foreground area 202 and the background area 203 are determined to be contained in the initial image data. Since the first line-dividing unit pixel information is spaced from the foreground region 202 by a certain distance, there is edge information 204 between the foreground region 202 and the background region 203.
Referring to fig. 3, a schematic diagram of abnormal initial image data of the present invention is shown.
If the initial image data is abnormal initial image data, the image sensor collects the first line-dividing unit pixel information 201 and simultaneously collects line-dividing unit pixel information matched with the middle of the medium (for example, the medium is quickly pushed to the position of the image sensor), and the line-dividing unit pixel information of the medium partial area is lost.
When the line book is larger than the preset line number threshold, the foreground area 202 and the background area 203 are determined to be contained in the initial image data. Since the first line-dividing unit pixel information coincides with the foreground region 202, there is no edge information 204 between the foreground region 202 and the background region 203.
In an optional implementation example of the present invention, the step of determining whether edge information exists in the initial image data includes:
a substep S121 of generating gradation data matched with the initial image data; the gray scale data comprises gray scale values corresponding to respective positions in the initial image data;
the gray scale processing can be performed on the currently acquired initial image data to obtain gray scale data matched with the initial image data, wherein the gray scale data comprises gray scale values corresponding to all positions of the initial image data. The original image data is represented by a gray value at this time.
A substep S122, determining a gray difference value of adjacent positions in the transfer direction of the medium by using the gray value;
the gradation difference value is a difference in gradation values of adjacent positions in the transfer direction of the medium (i.e., the above-described first direction).
A substep S123 of determining whether the gray level difference value greater than a preset gray level threshold exists;
a gray threshold may be preset to determine whether there is a sudden gray value difference.
Substep S124, if there is a gray level difference greater than the preset gray level threshold, determining that the edge information exists in the image data;
and when the gray level difference value larger than the preset gray level threshold value exists, determining that the gray level data in the medium transmission direction has abrupt change difference, and further determining that the edge information exists.
In the substep S125, if there is no gray level difference greater than the preset gray level threshold, it is determined that the edge information does not exist in the image data.
When the gray scale difference value larger than the preset gray scale threshold value exists, it is determined that the abrupt change difference does not exist in the gray scale data in the medium transfer direction, that is, the edge information does not exist in the medium transfer direction.
Step 103, if the initial image data does not have edge information, backing the medium to a position where the second sensor is triggered to generate second edge information, and transferring the medium to the image sensor;
when the initial image data is determined to have no edge information, the currently acquired initial image data is determined to be abnormal image data, the medium is returned to the position where the second edge information is generated by the second sensor of the medium, and at the moment, the medium leaves the sensing area corresponding to the second sensor.
And transmitting the medium to the image sensor, so as to re-acquire the image data corresponding to the medium.
In the embodiment of the invention, the first edge information and the second edge information are opposite electric signals. If the first edge information is rising edge information, the second edge information is falling edge information; if the first edge information is falling edge information, the second edge information is rising edge information.
In an optional embodiment of the invention, the step of retracting the medium to a position at which the second sensor is triggered to generate the second edge information comprises: generating a backspacing instruction; controlling the transfer component to transfer the medium in a second direction in response to the rollback instruction; stopping responding to the rollback instruction when the medium triggers the second sensor to generate second edge information; the second direction is opposite to the first direction.
And if the initial image data does not have the edge information, generating a return instruction, wherein the return instruction is used for controlling the transmission assembly to transmit the medium according to the second direction. When the medium triggers the second sensor to generate the second edge information, the medium is determined to be far away from the image sensor, and the medium is stopped from being conveyed.
In an optional embodiment of the invention, the step of transferring the medium to the image sensor comprises:
controlling the transfer assembly to transfer the media in the first direction; and returning to the step of controlling the image sensor to acquire initial image data when the medium triggers the second sensor to generate the first edge information.
And transmitting the medium again according to the first direction, and returning to the step of controlling the image sensor to acquire the initial image data when the medium triggers the second sensor to generate the first edge information, so that the initial image data is acquired again and whether the edge information exists in the initial image data is judged, namely when the medium insertion abnormality is determined based on the initial image data, the image data acquisition is performed on the medium again.
And 104, if the initial image data has edge information, generating target image data based on the acquired initial image data when the medium triggers the third sensor to generate second edge information.
If the initial image data has edge information, determining that the medium is normally inserted into the scanning module, and continuously transmitting the medium in the first direction. When the medium triggers the third sensor to generate the second edge information, the medium is far away from the image sensor, that is, the image sensor completes image data acquisition of the medium. Target image data that can completely reveal the medium is generated based on the initial image data acquired by the image sensor.
In an optional embodiment of the present invention, step 204 may specifically include: carrying out image algorithm processing on the acquired initial image data to obtain target image data; the image algorithmic processing includes one or more of rotation, extraction, face recognition, compression.
Image algorithm processing can be performed on the acquired initial image data to obtain target image data so as to optimize the target image data.
In the embodiment of the invention, when a medium triggers the second sensor to generate first edge information, the image sensor is controlled to collect initial image data, and when the initial image data meets a preset detection condition, whether the initial image data has edge information is judged; if the initial image data does not have edge information, backing the medium to a position triggering the second sensor to generate second edge information, and transferring the medium to the image sensor so as to acquire the image data of the medium again; if the initial image data has edge information, when the medium triggers the third sensor to generate second edge information, target image data is generated based on the acquired initial image data, so that whether the medium is normally inserted into a medium transfer channel or not is judged when the image data of the medium is acquired, if the medium is abnormally inserted, the image data of the medium is acquired again, if the medium is normally inserted, corresponding target image data is generated when the image data of the medium is acquired, the problems that the image data obtained by a module is incomplete or low in quality and the like due to interference of external factors (such as manual rapid medium pushing) are avoided, the quality and the integrity of the image data obtained by scanning the medium are guaranteed, and meanwhile, the stability, the efficiency and the user experience of the medium processing equipment are improved.
The following further describes embodiments of the present invention by way of an example.
Referring to fig. 3, a schematic diagram of a scanning module structure according to the present invention is shown;
the medium transfer passage of the scanning module is sequentially provided with the following components: the scanning module is further provided with a Sensor S1 (hereinafter referred to as S1), a Sensor S2 (hereinafter referred to as S2), an Image Sensor CIS (Complementary Metal Oxide Semiconductor Image Sensor) (hereinafter referred to as CIS), a Sensor S3 (hereinafter referred to as S3), and a Sensor S4 (hereinafter referred to as S4), and the plurality of driving rollers 310.
Specifically, the driving roller: the motor provides transmission power and is responsible for transmitting scanning media such as cards. The CIS is responsible for scanning a medium transported through the passage and outputting scanned image information. S1 is an entrance sensor responsible for detecting a media insertion event. S2 is a scanning preparation sensor responsible for detecting whether the medium reaches a scanning preparation position satisfying the scanning condition. S3 is a scan end sensor for detecting whether the medium leaves the scan area, and ends the image scanning control. S4 is an end sensor responsible for detecting whether the medium has left the medium transfer passage.
The scanning module can be a first channel structure in the medium processing equipment, and the medium processing equipment can also be provided with a second channel structure matched with the first channel structure equipment, so that a medium transmission channel with two open ends is formed.
Through the scanning module, corresponding medium scanning processing can be performed.
Referring to FIG. 4, a media scanning flow diagram of the present invention is shown.
The medium scanning may comprise the steps of:
1. the device enters a self-checking state after initialization, and when a rising edge is detected after a medium is triggered by S1, a system (scanning module) starts transmission to suck the medium.
2. When the medium triggers S2, the CIS image sensor is started to acquire images after the rising edge is generated.
3. And detecting the acquisition line number (the line number of the pixel information of the line division unit) in real time, and taking the image of 200 lines for edge detection processing when the line number exceeds 200 lines. The distance of medium transmission of one step of the motor is calculated according to the distance from the S2 to the CIS image sensor in the structure and by combining other structural parameters (such as the diameter and the transmission ratio of the transmission roller) and the rotating speed of the motor, and then the number of lines acquired by one step of the motor is combined. In this example, it is assumed that the medium enters the sensor scanning area (image sensor corresponding area) after the maximum acquisition of 200 lines is finally deduced.
4. And determining whether the acquired image has complete edges (edge information) according to the processing result of the edge detection algorithm.
5. Has an edge: the medium is normally inserted, when scanning is started, the medium just reaches the position S2, the CIS collects a channel image (background), and when the medium is conveyed to the position above the CIS, an effective medium image (foreground) is collected, so that the position where the gray values of the foreground and the background are subjected to abrupt change difference can be used as an edge line, namely the medium is normally inserted, and the image scanning is normal.
6. No edge: the medium is abnormally inserted, for example, the medium is pushed rapidly by an external force, so that the medium quickly reaches the position above the CIS image sensor after being triggered S2, the CIS image sensor just starts to acquire, the acquired image is directly the image of the middle part of the medium, and the first half part of the acquired image is not acquired and lost. At this time, after 200 lines are collected, image edge detection processing is carried out, and edge lines cannot be found successfully, so that the card insertion abnormality is judged.
7. And (3) stopping medium transmission and CIS image acquisition due to abnormal card insertion, returning the medium to the descending edge of S2, starting a transmission motor to suck the medium, and entering the step 2 again.
8. When the card is normal, the card continues to scan, the medium leaves the scanning area, S3 detects the falling edge, the transmission is stopped, and the image acquisition is finished.
9. And (4) obtaining the scanned image, and performing image algorithm processing, such as rotating, extracting, identifying and compressing to generate a target image.
10. And finishing the whole control flow.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the illustrated order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments of the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Referring to fig. 6, a block diagram of an embodiment of an image data processing apparatus according to the present invention is shown, and is applied to a scanning module, where the scanning module is provided with a medium conveying channel, and a second sensor, an image sensor, and a second image sensor that are sequentially disposed on the medium conveying channel; the embodiment of the invention can specifically comprise the following modules:
an initial image acquisition module 601, configured to control the image sensor to acquire initial image data when the medium triggers the second sensor to generate first edge information;
an edge detection module 602, configured to determine whether edge information exists in the initial image data when the initial image data meets a preset detection condition;
a rollback module 603, configured to, if there is no edge information in the initial image data, rollback the medium to a position where the second sensor is triggered to generate second edge information, and transfer the medium to the image sensor;
a target image generation module 604, configured to generate target image data based on the acquired initial image data when the medium triggers the third sensor to generate second edge information if the initial image data has edge information.
In an optional embodiment of the present invention, the scan module further comprises a transfer assembly, a first sensor located on the medium transfer passage; the second sensor is located between the first sensor and the image sensor; the device further comprises:
the transmission instruction generating module is used for generating a transmission instruction when the first sensor is triggered by the medium to generate the first edge information;
a transfer instruction response module for controlling the transfer component to transfer the medium in a first direction in response to the transfer instruction;
the first direction is a direction from the first sensor to the image sensor.
In an optional embodiment of the present invention, the rollback module 603 includes:
a backspacing instruction generating submodule for generating a backspacing instruction;
a rollback instruction response submodule, configured to control the transfer assembly to transfer the medium in a second direction in response to the rollback instruction;
the backspacing instruction termination submodule is used for stopping responding to the backspacing instruction when the medium triggers the second sensor to generate second edge information;
the second direction is opposite to the first direction.
In an optional embodiment of the present invention, the rollback module 603 further includes:
a first direction retransfer submodule for controlling the transfer assembly to transfer the media in the first direction; and invoking the initial image acquisition module 601.
In an alternative embodiment of the present invention, the initial image includes at least one line-divided unit pixel information; the edge detection module 602 includes:
the line number detection submodule is used for detecting the line number of the line-dividing unit pixel information of the initial image data in real time;
and the line number judgment submodule is used for judging whether the initial image data has edge information or not when the line number is larger than a preset line number threshold value.
In an optional embodiment of the present invention, the row number determining sub-module includes:
a gradation data generation unit for generating gradation data matched with the initial image data; the gray scale data comprises gray scale values corresponding to respective positions in the initial image data;
a gray difference value generating unit for determining a gray difference value of adjacent positions in a transfer direction of the medium using the gray value;
the gray difference value comparison unit is used for judging whether the gray difference value larger than a preset gray threshold exists or not;
a first edge information determination unit, configured to determine that the edge information exists in the image data if a gray scale difference greater than the preset gray scale threshold exists;
and the second edge information judging unit is used for determining that the edge information does not exist in the image data if the gray difference value larger than the preset gray threshold does not exist.
In an optional embodiment of the present invention, the target image generating module 604 is configured to perform image algorithm processing on the acquired initial image data to obtain target image data;
the image algorithmic processing includes one or more of rotation, extraction, face recognition, compression.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
An embodiment of the present invention further provides an electronic device, including: the image data processing method comprises a processor, a memory and a computer program which is stored on the memory and can run on the processor, wherein when the computer program is executed by the processor, each process of the image data processing method embodiment is realized, the same technical effect can be achieved, and in order to avoid repetition, the description is omitted here.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when being executed by a processor, the computer program implements each process of the above-mentioned image data processing method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The image data processing method, the image data processing apparatus, the electronic device, and the medium according to the present invention are described in detail above, and specific examples are applied herein to explain the principles and embodiments of the present invention, and the descriptions of the above embodiments are only used to help understand the method and the core ideas of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. The image data processing method is characterized by being applied to a scanning module, wherein the scanning module is provided with a medium transmission channel, and a second sensor, an image sensor and a third sensor which are sequentially arranged on the medium transmission channel; the method comprises the following steps:
controlling the image sensor to acquire initial image data when the medium triggers the second sensor to generate first edge information;
when the initial image data meets a preset detection condition, judging whether the initial image data has edge information or not;
if the initial image data does not have edge information, backing the medium to a position when the second sensor is triggered to generate second edge information, and transmitting the medium to the image sensor;
and if the initial image data has edge information, generating target image data based on the acquired initial image data when the medium triggers the third sensor to generate second edge information.
2. The method of claim 1, wherein the scanning module further comprises a transfer assembly, a first sensor positioned on the media transfer path; the second sensor is located between the first sensor and the image sensor; the method further comprises the following steps:
generating a transfer instruction when the medium triggers the first sensor to generate first edge information;
controlling the transfer component to transfer the medium in a first direction in response to the transfer instruction;
the first direction is a direction from the first sensor to the image sensor.
3. The method of claim 2, wherein the step of backing the medium to a position that triggers the second sensor to generate second edge information comprises:
generating a backspacing instruction;
controlling the transfer component to transfer the medium in a second direction in response to the rollback instruction;
stopping responding to the rollback instruction when the medium triggers the second sensor to generate second edge information;
the second direction is opposite to the first direction.
4. The method of claim 3, wherein the step of transferring the media to the image sensor comprises:
controlling the transfer assembly to transfer the media in the first direction;
and returning to the step of controlling the image sensor to acquire initial image data when the medium triggers the second sensor to generate the first edge information.
5. The method of claim 1 or 2 or 3 or 4, wherein the initial image comprises at least one line-wise unit pixel information; when the initial image data meets the preset detection condition, the step of judging whether the initial image data has edge information comprises the following steps:
detecting the line number of the line-dividing unit pixel information of the initial image data in real time;
and when the line number is larger than a preset line number threshold value, judging whether the initial image data has edge information.
6. The method according to claim 1, 2, 3 or 4, wherein the step of determining whether the initial image data has edge information comprises:
generating gray scale data matched with the initial image data; the gray scale data comprises gray scale values corresponding to respective positions in the initial image data;
determining a gray scale difference value of adjacent positions in the transfer direction of the medium by using the gray scale value;
judging whether the gray level difference value larger than a preset gray level threshold value exists or not;
if the gray level difference value larger than the preset gray level threshold value exists, determining that the edge information exists in the image data;
and if the gray level difference value larger than the preset gray level threshold value does not exist, determining that the edge information does not exist in the image data.
7. The method of claim 1 or 2 or 3 or 4, wherein the step of generating target image data based on the acquired initial image data comprises:
carrying out image algorithm processing on the acquired initial image data to obtain target image data;
the image algorithmic processing includes one or more of rotation, extraction, face recognition, compression.
8. The image data processing device is characterized by being applied to a scanning module, wherein the scanning module is provided with a medium transfer channel, and a second sensor, an image sensor and a second image sensor which are sequentially arranged on the medium transfer channel; the device comprises:
the initial image acquisition module is used for controlling the image sensor to acquire initial image data when the medium triggers the second sensor to generate first edge information;
the edge detection module is used for judging whether the initial image data has edge information or not when the initial image data meets a preset detection condition;
a rollback module, configured to, if edge information does not exist in the initial image data, rollback the medium to a position at which the second sensor is triggered to generate second edge information, and transfer the medium to the image sensor;
and the target image generation module is used for generating target image data based on the acquired initial image data when the medium triggers the third sensor to generate second edge information if the initial image data has edge information.
9. An electronic device, comprising: processor, memory and a computer program stored on the memory and executable on the processor, which computer program, when being executed by the processor, carries out the steps of the image data processing method according to any one of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the image data processing method according to any one of claims 1 to 7.
CN202011642005.6A 2020-12-31 2020-12-31 Image data processing method and device, electronic equipment and medium Pending CN113283417A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011642005.6A CN113283417A (en) 2020-12-31 2020-12-31 Image data processing method and device, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011642005.6A CN113283417A (en) 2020-12-31 2020-12-31 Image data processing method and device, electronic equipment and medium

Publications (1)

Publication Number Publication Date
CN113283417A true CN113283417A (en) 2021-08-20

Family

ID=77275507

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011642005.6A Pending CN113283417A (en) 2020-12-31 2020-12-31 Image data processing method and device, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN113283417A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114339159A (en) * 2021-12-31 2022-04-12 深圳市平方科技股份有限公司 Image acquisition method and device, electronic equipment and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE3630739C1 (en) * 1986-09-10 1988-04-07 Zeiss Carl Fa Method for data pick-up by means of detector arrays and devices for carrying out the methods
US5905810A (en) * 1990-02-05 1999-05-18 Cummins-Allison Corp. Automatic currency processing system
CN1655576A (en) * 2004-01-09 2005-08-17 三星电子株式会社 Image scanning method and apparatus
US20110170147A1 (en) * 2010-01-13 2011-07-14 Seiko Epson Corporation Optical reader, control method of optical reader, and computer-readable recording medium
CN104200566A (en) * 2014-09-11 2014-12-10 广州广电运通金融电子股份有限公司 Banknote recognition method based on sorter gradation accumulation and sorter
CN109151246A (en) * 2018-09-18 2019-01-04 深圳市思乐数据技术有限公司 A kind of image scan method, device and reader
CN109416855A (en) * 2016-07-13 2019-03-01 迪堡多富公司 Deflection sub-component is removed in for make file centered alignment
US20200134795A1 (en) * 2018-04-27 2020-04-30 Boe Technology Group Co., Ltd. Image processing method, image processing system, and storage medium
CN111598085A (en) * 2020-05-14 2020-08-28 苏州精濑光电有限公司 Glass panel positioning method, device, equipment and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE3630739C1 (en) * 1986-09-10 1988-04-07 Zeiss Carl Fa Method for data pick-up by means of detector arrays and devices for carrying out the methods
US5905810A (en) * 1990-02-05 1999-05-18 Cummins-Allison Corp. Automatic currency processing system
CN1655576A (en) * 2004-01-09 2005-08-17 三星电子株式会社 Image scanning method and apparatus
US20110170147A1 (en) * 2010-01-13 2011-07-14 Seiko Epson Corporation Optical reader, control method of optical reader, and computer-readable recording medium
CN104200566A (en) * 2014-09-11 2014-12-10 广州广电运通金融电子股份有限公司 Banknote recognition method based on sorter gradation accumulation and sorter
CN109416855A (en) * 2016-07-13 2019-03-01 迪堡多富公司 Deflection sub-component is removed in for make file centered alignment
US20200134795A1 (en) * 2018-04-27 2020-04-30 Boe Technology Group Co., Ltd. Image processing method, image processing system, and storage medium
CN109151246A (en) * 2018-09-18 2019-01-04 深圳市思乐数据技术有限公司 A kind of image scan method, device and reader
CN111598085A (en) * 2020-05-14 2020-08-28 苏州精濑光电有限公司 Glass panel positioning method, device, equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李鸿, 周云飞: "基于线性CCD阵列的弹头轮廓误差测量", 长沙理工大学学报, no. 03, pages 27 - 32 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114339159A (en) * 2021-12-31 2022-04-12 深圳市平方科技股份有限公司 Image acquisition method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
EP3245613B1 (en) Process and system for video spoof detection based on liveness evaluation
EP3674973A1 (en) Method and apparatus with liveness detection and object recognition
CN104239861A (en) Curly text image preprocessing method and lottery ticket scanning recognition method
CN110532746B (en) Face checking method, device, server and readable storage medium
CN113283417A (en) Image data processing method and device, electronic equipment and medium
US10447876B2 (en) Image reading apparatus
JP7414932B2 (en) Double feed detection device, control method and control program
EP2141633A3 (en) Biometric information reading device and biometric information reading method
CA3147418A1 (en) Living body detection method and system for human face by using two long-baseline cameras
CN109729268B (en) Face shooting method, device, equipment and medium
CN114430484A (en) Method and device for determining abnormality of motor device, storage medium, and electronic device
WO2018190039A1 (en) Paper sheet identification system
KR101387858B1 (en) Apparatus for media recognition and method for media access direction estimating with the same
US20180018019A1 (en) Information processing system, electronic apparatus, information processing apparatus, information processing method, electronic apparatus processing method and non-transitory computer readable medium
CN108520586B (en) Verifying a damaged banknote
JP2020177368A (en) Authenticity determination apparatus and program
EP3267402B1 (en) Bill softness recognition method and device
CN115880511A (en) Image screening method, device and system and storage medium
US10129423B2 (en) Image sensor-based media tracking
WO2021157214A1 (en) Information processing device, method for extracting silhouette, and program
JP7329790B2 (en) Biometric detection device, biometric authentication device, computer program, and biometric detection method
CN113689585A (en) Non-inductive attendance card punching method, system and related equipment
CN112183454A (en) Image detection method and device, storage medium and terminal
JP2011113348A (en) Device and method for detecting number of bundles
CN113452869B (en) Image data generation method and device, electronic equipment and storage medium

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