Nothing Special   »   [go: up one dir, main page]

CN108932692B - Method and device for acquiring bill information - Google Patents

Method and device for acquiring bill information Download PDF

Info

Publication number
CN108932692B
CN108932692B CN201710383779.3A CN201710383779A CN108932692B CN 108932692 B CN108932692 B CN 108932692B CN 201710383779 A CN201710383779 A CN 201710383779A CN 108932692 B CN108932692 B CN 108932692B
Authority
CN
China
Prior art keywords
minimum circumscribed
information
point position
image
preset point
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
CN201710383779.3A
Other languages
Chinese (zh)
Other versions
CN108932692A (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.)
Hangzhou Hikrobot Co Ltd
Original Assignee
Hangzhou Hikrobot 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 Hangzhou Hikrobot Technology Co Ltd filed Critical Hangzhou Hikrobot Technology Co Ltd
Priority to CN201710383779.3A priority Critical patent/CN108932692B/en
Publication of CN108932692A publication Critical patent/CN108932692A/en
Application granted granted Critical
Publication of CN108932692B publication Critical patent/CN108932692B/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
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/02Affine transformations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/24Aligning, centring, orientation detection or correction of the image
    • G06V10/245Aligning, centring, orientation detection or correction of the image by locating a pattern; Special marks for positioning

Landscapes

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

Abstract

The invention discloses a method and a device for acquiring menu information, belonging to the technical field of image processing, wherein the method comprises the following steps: acquiring graphic code information of a target surface single image to be processed and surface single structure information of a reference surface single image; determining an image area where the single information in the target surface single image is located based on the graphic code information of the target surface single image and the surface single structure information of the reference surface single image; and identifying the determined image area to obtain the bill information. Because the surface single structure information of the reference surface single image is set in advance, the invention selectively determines the image area of the surface single information in the target surface single image through the graphic code information of the target surface single image and the surface single structure information of the reference surface single image, and then the surface single information required by a user can be obtained only by identifying the image area without identifying the target surface single image, thereby improving the accuracy and the efficiency of obtaining the surface single information.

Description

Method and device for acquiring bill information
Technical Field
The invention relates to the technical field of image processing, in particular to a method and a device for acquiring menu information.
Background
With the development of economy and commerce, the application of the bill is more and more extensive, for example, the bill on the express parcel and the bill on the commodity, etc., and the information related to the parcel or the commodity is usually recorded in the bill, and the information can be called the bill information. For example, the receipt on the express package records information such as recipient information, sender information, and graphic code, and the receipt on the commodity records information such as the production place and the component of the commodity. To facilitate the knowledge of such information, it is often necessary to obtain such manifest information from the manifest.
In the related art, the menu information in the menu can be manually identified, and the identified information is manually input into the menu information database. Or, a monitoring camera is installed, a bill image is obtained through the monitoring camera, then bill information in the bill image is manually identified, and the identified bill information is manually input into a bill information database. Or acquiring the bill image through the monitoring camera, and identifying the bill image through an image identification technology to obtain bill information in the bill image.
However, since the number of the face sheet images is large, the number of the face sheet images is also large, errors are prone to occur due to negligence by manually recognizing the face sheet information, and meanwhile, a large amount of time and manpower are consumed for acquiring the face sheet information by manual recognition, and the efficiency of acquiring the face sheet information is reduced. In addition, when the facial sheet image is identified by the image identification technology, since a large amount of irrelevant information may be included in the facial sheet information, interference may be caused in the process of image identification of the facial sheet image, and the accuracy and efficiency of obtaining the facial sheet information are reduced.
Disclosure of Invention
In order to improve the accuracy and efficiency of obtaining the bill information, the embodiment of the invention provides a bill information obtaining method and a bill information obtaining device. The technical scheme is as follows:
in one aspect, a method for acquiring waybill information is provided, where the method includes:
acquiring graphic code information of a target surface single image to be processed and surface single structure information of a reference surface single image;
determining an image area where the single information in the target surface single image is located based on the graphic code information of the target surface single image and the surface single structure information of the reference surface single image;
and identifying the determined image area to obtain the bill information.
Optionally, the determining, based on the graphic code information of the target surface single image and the surface single structure information of the reference surface single image, an image area where the surface single information in the target surface single image is located includes:
determining the size and the preset point position of a first minimum circumscribed graph based on the graphic code information of the target surface single image and the surface single structure information of the reference surface single image, wherein the first minimum circumscribed graph is the minimum circumscribed graph of the surface single information in the target surface single image;
and determining the area indicated by the size of the first minimum circumscribed figure and the preset point position in the target surface single image as the image area where the surface single information is located in the target surface single image.
Optionally, the plane single structure information of the reference plane single image includes a size, a direction, and a preset point position of a second minimum circumscribed graph, and a size and a preset point position of a third minimum circumscribed graph, where the second minimum circumscribed graph is a minimum circumscribed graph of a graph code in the reference plane single image, and the third minimum circumscribed graph is a minimum circumscribed graph of the plane single information in the reference plane single image;
the determining the size and the preset point position of the first minimum circumscribed figure based on the graphic code information of the target surface single image and the surface single structure information of the reference surface single image comprises:
determining the size and the preset point position of a fourth minimum circumscribed graph based on the graph code information of the target surface single image, wherein the fourth minimum circumscribed graph is the minimum circumscribed graph of the graph code in the target surface single image;
determining the size of the first minimum circumscribed graphic based on the size of the second minimum circumscribed graphic, the size of the third minimum circumscribed graphic, and the size of the fourth minimum circumscribed graphic;
determining a direction deviation between the direction of the second minimum circumscribed figure and the direction of the fourth minimum circumscribed figure, and determining the direction of the first minimum circumscribed figure based on the direction of the third minimum circumscribed figure and the direction deviation;
and determining the preset point position of the first minimum external graph through affine transformation based on the preset point position of the second minimum external graph, the preset point position of the third minimum external graph and the preset point position of the fourth minimum external graph.
Optionally, the determining the size of the first minimum circumscribed graphic based on the size of the second minimum circumscribed graphic, the size of the third minimum circumscribed graphic, and the size of the fourth minimum circumscribed graphic includes:
determining a size ratio between the size of the second minimum circumscribed figure and the size of the fourth minimum circumscribed figure;
determining the size of the first minimum circumscribed figure based on the size of the third minimum circumscribed figure and the size ratio.
Optionally, before determining the preset point position of the first minimum circumscribed graph based on the preset point position of the second minimum circumscribed graph, the preset point position of the third minimum circumscribed graph, and the preset point position of the fourth minimum circumscribed graph, the method further includes:
determining the direction of the fourth minimum circumscribed graph based on the graph code information of the target surface single image;
determining a direction deviation between the direction of the second minimum circumscribed figure and the direction of the fourth minimum circumscribed figure, and determining the direction of the first minimum circumscribed figure based on the direction of the third minimum circumscribed figure and the direction deviation;
correspondingly, the determining the preset point position of the first minimum circumscribed graph based on the preset point position of the second minimum circumscribed graph, the preset point position of the third minimum circumscribed graph and the preset point position of the fourth minimum circumscribed graph includes:
determining the position offset between the preset point position of the second minimum circumscribed figure and the preset point position of the fourth minimum circumscribed figure;
and determining the preset point position of the first minimum external graph through affine transformation based on the position offset, the direction deviation and the preset point position of the third minimum external graph.
Optionally, the determining, by affine transformation, a preset point position of the first minimum circumscribed graph based on the position offset, the direction deviation, and a preset point position of the third minimum circumscribed graph includes:
determining the preset point position of the first minimum circumscribed figure by the following affine transformation formula based on the position offset, the direction deviation and the preset point position of the third minimum circumscribed figure:
Figure BDA0001305793800000031
wherein, the xdstIs the abscissa of the preset point position of the first minimum circumscribed figure, ydstIs the firstOrdinate of the position of the preset point of the minimum circumscribed figure, xsrcIs the abscissa of the preset point position of the third minimum circumscribed figure, ysrcThe sine theta is a sine function value of the direction deviation theta, the cos theta is a cosine function value of the direction deviation theta, the Δ x is an offset in the horizontal coordinate direction in the position offset, and the Δ y is an offset in the vertical coordinate direction in the position offset.
Optionally, after the identifying processing is performed on the determined image area to obtain the bill information, the method further includes:
when the bill information comprises the number of the graphic code, identifying the graphic code in the target bill image to obtain character information;
and when the character information is the same as the number of the graphic code, determining that the bill information in the target bill image is correctly identified.
In another aspect, an apparatus for acquiring waybill information is provided, the apparatus including:
the acquisition module is used for acquiring the graphic code information of a target surface single image to be processed and the surface single structure information of a reference surface single image;
the first determining module is used for determining an image area where the single information in the target surface single image is located based on the graphic code information of the target surface single image and the surface single structure information of the reference surface single image;
and the first identification module is used for identifying the determined image area to obtain the bill information.
Optionally, the first determining module includes:
the first determining submodule is used for determining the size and the preset point position of a first minimum circumscribed graph based on the graphic code information of the target surface single image and the surface single structure information of the reference surface single image, wherein the first minimum circumscribed graph is the minimum circumscribed graph of the surface single information in the target surface single image;
and the second determining submodule is used for determining the area indicated by the size and the preset point position of the first minimum circumscribed figure in the target surface single image as the image area where the surface single information in the target surface single image is located.
Optionally, the plane single structure information of the reference plane single image includes a size and a preset point position of a second minimum circumscribed graph, and a size and a preset point position of a third minimum circumscribed graph, where the second minimum circumscribed graph is a minimum circumscribed graph of a graph code in the reference plane single image, and the third minimum circumscribed graph is a minimum circumscribed graph of the plane single information in the reference plane single image;
the first determination submodule is configured to:
determining the size and the preset point position of a fourth minimum circumscribed graph based on the graph code information of the target surface single image, wherein the fourth minimum circumscribed graph is the minimum circumscribed graph of the graph code in the target surface single image;
determining the size of the first minimum circumscribed graphic based on the size of the second minimum circumscribed graphic, the size of the third minimum circumscribed graphic, and the size of the fourth minimum circumscribed graphic;
and determining the preset point position of the first minimum external graph based on the preset point position of the second minimum external graph, the preset point position of the third minimum external graph and the preset point position of the fourth minimum external graph.
Optionally, the first determining sub-module is further configured to:
determining a size ratio between the size of the second minimum circumscribed figure and the size of the fourth minimum circumscribed figure;
determining the size of the first minimum circumscribed figure based on the size of the third minimum circumscribed figure and the size ratio.
Optionally, the first determining module further includes:
the third determining submodule is used for determining the direction of the fourth minimum external graph based on the graph code information of the target surface single image;
a fourth determination submodule configured to determine a direction deviation between the direction of the second minimum circumscribed figure and the direction of the fourth minimum circumscribed figure, and determine the direction of the first minimum circumscribed figure based on the direction of the third minimum circumscribed figure and the direction deviation;
accordingly, the first determination sub-module is further configured to:
determining the position offset between the preset point position of the second minimum circumscribed figure and the preset point position of the fourth minimum circumscribed figure;
and determining the preset point position of the first minimum external graph through affine transformation based on the position offset, the direction deviation and the preset point position of the third minimum external graph.
Optionally, the first determining module is further configured to:
determining the preset point position of the first minimum circumscribed figure by the following affine transformation formula based on the position offset, the direction deviation and the preset point position of the third minimum circumscribed figure:
Figure BDA0001305793800000051
wherein, the xdstIs the abscissa of the preset point position of the first minimum circumscribed figure, ydstIs the ordinate of the preset point position of the first minimum circumscribed figure, xsrcIs the abscissa of the preset point position of the third minimum circumscribed figure, ysrcThe sine theta is a sine function value of the direction deviation theta, the cos theta is a cosine function value of the direction deviation theta, the Δ x is an offset in the horizontal coordinate direction in the position offset, and the Δ y is an offset in the vertical coordinate direction in the position offset.
Optionally, the apparatus further comprises:
the second identification module is used for identifying the graphic code in the target menu image to obtain character information when the menu information comprises the number of the graphic code;
and the second determining module is used for determining that the bill information in the target bill image is correctly identified when the character information is the same as the number of the graphic code.
The technical scheme provided by the embodiment of the invention has the following beneficial effects: the image area where the single information of the target surface is located in the single image of the target surface is selectively determined through the graphic code information of the single image of the target surface and the single structure information of the reference surface, and then the single information of the surface required by a user can be obtained only by identifying the image area without identifying the single image of the target surface, so that the accuracy and the efficiency of obtaining the single information of the surface are improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1A is a schematic diagram of a system for acquiring menu information according to an embodiment of the present invention;
FIG. 1B is a schematic diagram of a planar structure according to an embodiment of the present invention;
fig. 2 is a flowchart of a method for acquiring policy information according to an embodiment of the present invention;
fig. 3A is a block diagram of an apparatus for acquiring menu information according to an embodiment of the present invention;
fig. 3B is a block diagram of a first determining module according to an embodiment of the present invention;
fig. 3C is a block diagram of another first determining module according to an embodiment of the present invention;
fig. 3D is a block diagram of another apparatus for acquiring waybill information according to an embodiment of the present invention;
fig. 4 is a block diagram of an image capturing device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
Before explaining the embodiments of the present invention in detail, terms, application scenarios and system architectures related to the embodiments of the present invention are explained separately.
First, terms related to embodiments of the present invention will be described.
Facial single image
The surface list image is an image obtained by image acquisition of a surface list through image acquisition equipment such as a monitoring camera and the like, and the image comprises surface list information and a graphic code.
Bill of surface information
The bill information refers to information related to the package or the commodity recorded in the bill, for example, the bill on the express package records information such as recipient information, sender information, and graphic code, and the bill on the commodity records information such as the production place and the component of the commodity.
Next, an application scenario related to the embodiment of the present invention is described.
Since the bill information records information related to the package or the commodity, taking the bill on the package as an example, in order to automatically notify the recipient to pick up the package at a certain place after the package arrives at the destination, it is usually necessary to recognize the bill image to obtain the bill information, so that the recipient is automatically notified to pick up the package through the bill information, and a large amount of manpower is not required to be consumed to dial the phone of the recipient one by one. Still alternatively, to facilitate subsequent queries for the manifest information for the package, it is often desirable to obtain the manifest information and store the obtained manifest information on a computer device. However, at present, the facial sheet information is basically recognized manually, or facial sheet images are acquired through a monitoring camera and then recognized through an image recognition technology, so that the facial sheet information in the facial sheet images is obtained. However, since the number of the face sheet images is large, the number of the face sheet images is also large, errors are prone to occur due to negligence by manually recognizing the face sheet information, and meanwhile, a large amount of time and manpower are consumed for acquiring the face sheet information by manual recognition, and the efficiency of acquiring the face sheet information is reduced. In addition, when the facial sheet image is identified by the image identification technology, since a large amount of irrelevant information may be included in the facial sheet information, interference may be caused in the process of image identification of the facial sheet image, and the accuracy and efficiency of obtaining the facial sheet information are reduced. Therefore, the embodiment of the invention provides a method for acquiring waybill information, which can determine an image area where the waybill information in a target waybill image is located by referring to waybill structure information of the waybill image, and identify the image area to obtain the waybill information, thereby improving accuracy and efficiency of acquiring the waybill information.
Finally, a system architecture according to an embodiment of the present invention is described.
Fig. 1A is a schematic diagram of an acquisition system architecture of waybill information according to an embodiment of the present invention, and referring to fig. 1A, the system architecture includes a package 1 (or a commodity) and an image capturing device 2. The processor 21 may be included in the image capturing device 2, i.e. the processor 21 is a processor operating inside the image capturing device 2. Of course, the processor 21 may also be a processor in another device independent of the image acquisition device 2. In fig. 1A of the present embodiment, a processor operating inside the image capturing apparatus 2 is illustrated as an example. The image acquisition device 2 may image the facial sheet to obtain a facial sheet image, and then may process the acquired facial sheet image through the internal processor 21 to obtain the required facial sheet information.
Further, the image capturing apparatus 2 may further include a storage medium and a communication medium. Wherein, the storage medium can be used for storing the single image and the single information; the communication medium may be used for transmission, or for distribution of a single message.
It should be noted that the image capturing device 2 may be an industrial camera or other image capturing device with high processing capability.
Therefore, in the embodiment of the present invention, the image area where the facial single information is located in the target facial single image can be determined through the graphic code information of the target facial single image and the facial single structure information of the reference facial single image, so as to identify the image area, and obtain the facial single information. The following describes an operation of setting the plane single structure information of the reference plane single image.
The image acquisition equipment can receive a plane single structure setting instruction, and the plane single structure setting instruction can carry position information of an image area where plane single information in a reference plane single image is located and position information of an image area where a graphic code is located. The position information of the image area where the graphic code is located and the position information of the image area where the face sheet information is located are determined as face sheet structure information of a reference face sheet image, and the face sheet structure information is stored in a file format such as TXT (TeXT document), XML (eXtensible Markup Language), and the like.
It should be noted that, in the embodiment of the present invention, the order information may include information such as a recipient address, a recipient phone number, a sender information, or a number of a graphic code, so that the image capture device may determine location information of image areas where all order information such as the recipient address, the recipient phone number, the sender information, the number of the graphic code is located, and may also determine location information of an image area where the recipient address is located, location information of an image area where the recipient phone number is located, location information of an image area where the sender information is located, and location information of an image area where the number of the graphic code is located, respectively. Of course, in order to improve the efficiency and accuracy of subsequently acquiring the receipt information, the location information of the image area where the address of the recipient is located, the location information of the image area where the telephone of the recipient is located, the location information of the image area where the sender information is located, and the location information of the image area where the number of the graphic code is located are usually determined respectively.
The above-described structure setting instruction is used to set structure information, and the structure setting instruction may be triggered by a user through a designation operation, such as a click operation, a slide operation, or a voice operation.
In addition, the position information of the image area in which the graphic code is included in the menu structure information may be represented by a graphic frame that can surround the image area in which the graphic code is included, and the position information of the image area in which the menu information is included in the menu structure information may be represented by a graphic frame that can surround the image area in which the menu information is included. Referring to fig. 1B, in order to improve accuracy of obtaining an image area where the menu information is located in the target image, in a general case, a graphic frame surrounding the image area where the graphic code is located is generally a minimum circumscribed graphic of the graphic code, and a graphic frame surrounding the image area where the menu information is located is a minimum circumscribed graphic of the menu information. Accordingly, the position information of the image area where the graphic code is located in the reference plane single image may be a preset point position, a size and a direction of the minimum circumscribed graph of the graphic code, or a key point position of the minimum circumscribed graph of the graphic code, or an outline (coordinate point set) of the graphic code, and the like. Similarly, the position information of the image area where the sheet information is located in the reference sheet image may be a preset point position, a size and a direction of the minimum circumscribed graph of the sheet information, or a key point position of the minimum circumscribed graph of the sheet information, or an outline (coordinate point set) of the sheet information, and so on.
It should be noted that the preset point position of the minimum circumscribed graph may be a position of any point on the minimum circumscribed graph, for example, the preset point position of the minimum circumscribed graph may be any one of key point positions of the minimum circumscribed graph, or a position of a center point of the minimum circumscribed graph, and so on.
In the embodiment of the present invention, the shape of the graphic frame may be a polygon such as a rectangle, a triangle, etc., or a figure such as a circle, an ellipse, etc., or may be other irregular figures, etc. When the shape of the graphic frame is a polygon, the minimum circumscribed graphic is a minimum circumscribed polygon, and the key point position of the minimum circumscribed polygon may be a plurality of vertex positions of the polygon, for example, when the minimum circumscribed polygon is a minimum circumscribed rectangle, the key point position of the minimum circumscribed rectangle may be four vertex positions of the rectangle, and at this time, the preset point position of the minimum circumscribed rectangle may be any one of the four vertex positions of the minimum circumscribed rectangle or a center point position of the minimum circumscribed rectangle; when the shape of the graphic frame is an ellipse, the minimum circumscribed graphic is a minimum circumscribed ellipse, the key point position of the minimum circumscribed ellipse can be 4 end point positions, and at the moment, the preset point position of the minimum circumscribed ellipse can be any one of the four end point positions of the minimum circumscribed ellipse and also can be the central point position of the minimum circumscribed ellipse; when the shape of the graphic frame is a circle, the minimum circumscribed graphic is a minimum circumscribed circle, the key point position of the minimum circumscribed circle can be any point on the center point and the circle of the circle, and the like, and at the moment, the preset point position of the minimum circumscribed circle can be the center point position of the minimum circumscribed circle or any point on the circle, and the like.
In the embodiment of the invention, the face list structure information of the reference face list image is set in advance, so that the image area where the determined face list information is located in the target face list image is convenient to follow, and the efficiency and the accuracy of obtaining the face list information are improved.
As can be seen from the above description, since the plane single structure information of the reference plane single image is set in advance, when the plane single information in the target plane single image needs to be acquired, the image area where the plane single information in the target plane single image is located can be determined directly through the plane single structure information of the reference plane single image, so as to identify the image area, and obtain the plane single information. The method for acquiring the menu information provided by the embodiment of the invention can be applied to image acquisition equipment such as an industrial camera, and the operation for acquiring the menu information is described below with reference to fig. 2, and specifically includes the following steps.
Step 201: and acquiring the graphic code information of the target surface single image to be processed and the surface single structure information of the reference surface single image.
Surface texture information for reference surface texture
As described above, the plane structure information of the reference plane single image may be stored in the image capturing apparatus in a file format such as TXT or XML, and therefore, the image capturing apparatus may acquire the plane structure information of the reference plane single image from the file format such as TXT or XML.
When the image acquisition equipment acquires the plane single structure information of the reference plane single image, the image acquisition equipment can respectively determine the position information of the image area where the address of the receiver is located, the position information of the image area where the telephone of the receiver is located, the position information of the image area where the sender information is located and the position information of the image area where the number of the graphic code is located. Therefore, the image acquisition device can selectively acquire the plane single structure information according to the requirement. For example, when the phone number of the recipient needs to be acquired, the image acquisition device may acquire the position information of the image area where the phone number of the recipient is located in the reference surface list image.
Graphic code information for a single image of an object plane
The image acquisition device may acquire the graphic code information in the target surface single image by scanning the target surface single image, and the operation of the image acquisition device acquiring the graphic code information in the target surface single image by scanning the target surface single image may refer to related technologies, which is not described in detail herein.
It should be noted that the graphic code information may include position information, character information, and the like of the graphic code of the target surface single image. The position information of the graphic code of the target surface single image may include information such as a center point position, a size, a direction, a key point position of a minimum circumscribed graphic of the graphic code, an outline (a coordinate point set) of the graphic code, and the like of the graphic code of the target surface single image.
In addition, in the embodiment of the present invention, the target plane single image may be obtained by directly shooting by an image acquisition device, and certainly, in practical application, the target plane single image may also be obtained by other ways, for example, receiving an image sent by other devices such as a smart phone, or obtaining the image by downloading from a server.
Further, in practical applications, the target menu image may not include a menu due to the influence of the shooting angle and the shooting direction when the package or the commodity is shot or other reasons, and therefore, after the image acquisition device acquires the target menu image, it may be determined whether the target menu image includes the menu. However, since the sheet is usually disposed on the outer side of the commodity or the package, the sheet includes information for explaining the sheet related to the commodity or the package, and in order to briefly explain some information related to the commodity or the package directly, a graphic code such as a bar code or a two-dimensional code is also included in the sheet. Therefore, the image acquisition equipment can judge whether the target surface single image comprises the surface single by judging whether the target surface single image comprises the graphic code or not.
It should be noted that, for different types of graphic codes, whether the target surface single image includes the graphic code may be determined in different manners. For example, when the graphic code is a two-dimensional code, it may be determined whether a positioning graph of the two-dimensional code exists in the target surface single image, and when the positioning graph of the two-dimensional code exists in the target surface single image, it is determined that the two-dimensional code exists in the target surface single image. When the graphic code is a bar code, whether the start character and the end character of the bar code exist in the target menu image can be judged, and when the start character and the end character of the bar code exist in the target menu image, the target menu image is determined to include the bar code.
In addition, since the target surface single image usually includes the surface sheet when the surface sheet image is acquired by the surface sheet image acquisition method provided by this embodiment, in order to improve the efficiency of acquiring the surface sheet image, when the image acquisition device acquires the target surface single image, it may not be determined whether the target surface single image includes the graphic code, so as to directly acquire the graphic code information from the target surface single image.
Step 202: and determining an image area where the single information in the target single image is located based on the graphic code information of the target single image and the single structure information of the reference single image.
Specifically, the image acquisition device may determine the size and the preset point position of a first minimum circumscribed graph based on the graph code information of the target surface single image and the surface single structure information of the reference surface single image, where the first minimum circumscribed graph is the minimum circumscribed graph of the surface single information in the target surface single image; and determining the area indicated by the size and the preset point position of the first minimum circumscribed figure in the target surface single image as the image area where the surface single information is located in the target surface single image.
In addition, since in a normal case, the direction of the graphic code in the target surface single image may not be consistent with the direction of the graphic code in the reference surface single image, that is, there is a directional deviation between the graphic code in the target surface single image and the graphic code in the reference surface single image. Therefore, in order to improve the accuracy of obtaining the image area where the surface sheet information in the target surface sheet image is located, the image acquisition device may further determine the direction of the first minimum circumscribed image. Specifically, the image acquisition device may determine a direction of a fourth minimum circumscribed figure based on the figure code information of the target surface single image, determine a direction deviation between the direction of the second minimum circumscribed figure and the direction of the fourth minimum circumscribed figure, and then determine the direction of the first minimum circumscribed figure based on the direction of the third minimum circumscribed figure and the direction deviation. Then, the image capture device may determine an area indicated by the size, the direction, and the preset point position of the first minimum circumscribed image in the target surface single image as an image area where the surface single information is located in the target surface single image.
When the image acquisition equipment determines the direction of the fourth minimum circumscribed figure, the direction of the graphic code can be determined in different modes for different types of graphic codes. For example, when the graphic code in the target surface single image is a bar code, a direction perpendicular to the arrangement direction of the reflection region or the absorption region of the bar code may be determined as the direction of the bar code; when the graphic code is a two-dimensional code, the direction of the two-dimensional code can be determined according to the positioning graph in the two-dimensional code.
Since the direction deviation between the second minimum circumscribed figure and the fourth minimum circumscribed figure is the same as the direction deviation between the third minimum circumscribed figure and the first minimum circumscribed figure, after the direction deviation between the second minimum circumscribed figure and the fourth minimum circumscribed figure is determined, the direction of the first minimum circumscribed figure can be determined through the direction deviation and the direction of the third minimum circumscribed figure.
It should be noted that the direction deviation may be expressed by a radian or an angle in the embodiment of the present invention.
As can be seen from the above, the plane single structure information of the reference plane single image may include the size and the preset point position of the minimum circumscribed figure (the second minimum circumscribed figure) of the graphic code in the reference plane single image, and the size and the preset point position of the minimum circumscribed figure (the third minimum circumscribed figure) of the plane single information in the reference plane single image. Therefore, the image capturing apparatus may determine the size and the preset point position of the first minimum circumscribed figure based on the figure code information of the target plane single image and the plane single structure information of the reference plane single image by the following steps.
And step A, the image acquisition equipment determines the size and the preset point position of a fourth minimum circumscribed graph based on the graph code information of the target surface single image, wherein the fourth minimum circumscribed graph is the minimum circumscribed graph of the graph code in the target surface single image.
It should be noted that, as can be seen from the foregoing step 201, the position information of the graphic code of the target surface single image may include information such as a center point position, a size, a direction of the graphic code of the target surface single image, a key point position of the minimum circumscribed graph of the graphic code, and an outline (a coordinate point set) of the graphic code, so that when the position information of the graphic code of the target surface single image includes a preset point position and a preset size of the graphic code of the target surface single image, the image acquisition device may directly determine the size and the preset point position of the fourth minimum circumscribed graph.
Since the position information may not include information such as the preset point position, the size, the direction and the like of the minimum external graph of the graph code, but includes the key point position of the minimum external graph of the graph code, at this time, the image acquisition device may determine the fourth minimum external graph according to the key point position of the minimum external graph of the graph code. And then determining the information such as the position, the size, the direction and the like of the preset points of the fourth minimum circumscribed graph. When the position information of the image code includes an outline (coordinate point set) of the graphic code, the image capturing device may determine a fourth minimum circumscribed graphic according to the outline of the graphic code, and then determine information such as a preset point position, a size, and a direction of the fourth minimum circumscribed graphic.
And step B, the image acquisition equipment determines the size of the first minimum external graph based on the size of the second minimum external graph, the size of the third minimum external graph and the size of the fourth minimum external graph.
Specifically, the image acquisition device may determine a size ratio between a size of the second minimum circumscribed figure and a size of the fourth minimum circumscribed figure; and determining the size of the first minimum circumscribed figure based on the size and the size ratio of the third minimum circumscribed figure.
The size ratio of the image acquisition equipment can be obtained by dividing the size of the second minimum external graph by the size of the fourth minimum external graph. The size ratio may also be obtained by dividing the size of the fourth minimum circumscribed pattern by the size of the second minimum circumscribed pattern. For example, the second minimum circumscribed figure is a second minimum circumscribed rectangle, the fourth minimum circumscribed figure is a fourth minimum circumscribed rectangle, when the size of the second minimum circumscribed rectangle is 4cm (cm) long and 2cm wide, the size of the fourth minimum circumscribed rectangle is 2cm long and 1cm wide, the size of the second minimum circumscribed rectangle is divided by the size of the fourth minimum circumscribed rectangle, and the obtained size ratio is: the ratio of the length dimension to the width dimension is 2: 1. If the size of the fourth minimum bounding rectangle is divided by the size of the second minimum bounding rectangle, the resulting size ratio is: the ratio of the length dimension to the width dimension is 1: 2.
Since the size ratio between the second minimum circumscribed figure and the fourth minimum circumscribed figure is the same as the size ratio between the third minimum circumscribed figure and the first minimum circumscribed figure, after the size ratio between the second minimum circumscribed figure and the fourth minimum circumscribed figure is determined, the size of the first minimum circumscribed figure can be determined by the size ratio and the size of the third minimum circumscribed figure. Specifically, when the size ratio between the second minimum circumscribed graphic and the fourth minimum circumscribed graphic is obtained by dividing the size of the second minimum circumscribed graphic by the size of the fourth minimum circumscribed graphic, at this time, the size ratio may be multiplied by the size of the third minimum circumscribed graphic to obtain the size of the first minimum circumscribed graphic. When the size ratio between the second minimum circumscribed figure and the fourth minimum circumscribed figure is obtained by dividing the size of the fourth minimum circumscribed figure by the size of the second minimum circumscribed figure, at this time, the size of the third minimum circumscribed figure may be divided by the size ratio to obtain the size of the first minimum circumscribed figure.
For example, when the first minimum circumscribed figure is a first minimum circumscribed rectangle, the second minimum circumscribed figure is a second minimum circumscribed rectangle, the third minimum circumscribed figure is a third minimum circumscribed rectangle, the fourth minimum circumscribed figure is a fourth minimum circumscribed rectangle, and when the size ratio between the second minimum circumscribed rectangle and the fourth minimum circumscribed rectangle is 2:1 in length ratio and 2:1 in width ratio, and the size of the third minimum circumscribed rectangle is 6cm in length and 4cm in width, the size of the first minimum circumscribed rectangle can be determined to be 3cm in length and 2cm in width.
And step C, the image acquisition equipment determines the preset point position of the first minimum external graph based on the preset point position of the second minimum external graph, the preset point position of the third minimum external graph and the preset point position of the fourth minimum external graph.
Therefore, the operation of determining the preset point position of the first minimum circumscribed graph based on the preset point position of the second minimum circumscribed graph, the preset point position of the third minimum circumscribed graph and the preset point position of the fourth minimum circumscribed graph by the image acquisition equipment at least comprises the following two possible implementation modes.
In one possible implementationWhen the direction deviation exists between the graphic code in the target surface single image and the graphic code in the reference surface single image, the image acquisition equipment can determine the position offset between the preset point position of the second minimum circumscribed graphic and the preset point position of the fourth minimum circumscribed graphic; and determining the preset point position of the first minimum external graph through affine transformation based on the position offset, the direction deviation and the preset point position of the third minimum external graph.
In the embodiment of the present invention, the preset point position of the second minimum circumscribed graph and the preset point position of the fourth minimum circumscribed graph may be represented by coordinates, and therefore, the position offset between the preset point position of the second minimum circumscribed graph and the preset point position of the fourth minimum circumscribed graph may be obtained by subtracting the preset point coordinate of the fourth minimum circumscribed graph from the preset point coordinate of the second minimum circumscribed graph, or may be obtained by subtracting the preset point coordinate of the second minimum circumscribed graph from the preset point coordinate of the fourth minimum circumscribed graph. Then, the terminal may determine the preset point position of the first minimum circumscribed graph through the following affine transformation formula based on the position offset, the direction deviation and the preset point position of the third minimum circumscribed graph:
Figure BDA0001305793800000151
wherein, in the above affine transformation formula (1), xdstIs the abscissa, y, of the position of the predetermined point of the first minimum circumscribed figuredstIs the ordinate, x, of the position of the predetermined point of the first minimum circumscribed figuresrcIs the abscissa, y, of the location of the predetermined point of the third minimum circumscribed figuresrcIs the ordinate of the preset point position of the third minimum circumscribed figure, sin theta is the sine function value of the direction deviation theta, cos theta is the cosine function value of the direction deviation theta, Deltax is the offset in the abscissa direction in the position offset, Deltay is the position offsetThe offset in the direction of the central ordinate.
In another possible implementation form of the method,when the direction deviation does not exist between the graphic code in the target surface single image and the graphic code in the reference surface single image, the image acquisition equipment can determine the position offset between the preset point position of the second minimum external graphic and the preset point position of the third minimum external graphic, and the preset point position of the first minimum external graphic is determined according to the position offset between the preset point position of the second minimum external graphic and the preset point position of the third minimum external graphic and the preset point position of the fourth minimum external graphic.
Because the position offset between the preset point position of the second minimum external graph and the preset point position of the third minimum external graph is the same as the position offset between the preset point position of the second minimum external graph and the preset point position of the third minimum external graph, the graph acquisition equipment can determine the preset point position of the first minimum external graph according to the position offset between the preset point position of the second minimum external graph and the preset point position of the third minimum external graph and the preset point position of the fourth minimum external graph.
It should be noted that, when there is no direction deviation between the graphic code in the target surface single image and the graphic code in the reference surface single image, the image processing apparatus may also determine the preset point position of the first minimum circumscribed graphic according to the above affine transformation formula (1). In this case, the direction deviation θ is 0 in the above affine transformation formula (1).
Step 203: and identifying the determined image area to obtain the bill information.
Therefore, when the user acquires the required bill information, the bill structure information in the reference bill image can be selected correspondingly, so that the determined image area is the image area where the bill information required by the user is located, and when the image area is identified, the identification mode can be selected correspondingly to obtain the bill information, thereby improving the accuracy and efficiency of acquiring the bill image.
For example, when the determined image area is the area where the recipient phone number is located, the recognition processing may be performed by a character recognition technique, and when the determined image area is the brand information of the express company, the recognition processing may be performed by a logo recognition technique.
Further, after the image acquisition device identifies the determined image area to obtain the bill information, if the bill information includes the number of the graphic code, the graphic code in the target bill image can be identified to obtain the character information; and when the character information is the same as the number of the graphic code, determining that the bill information in the target bill image is correctly identified.
Certainly, in practical applications, after the image acquisition device acquires the receipt information, different processing may be performed according to the acquired receipt information, for example, when the acquired receipt information is a phone number of a recipient, a call may be made to the recipient, or a voice message may be sent, or a text message may be sent, so as to notify the recipient to process a commodity or a package corresponding to the current receipt. Or after the image acquisition equipment acquires the bill information, the identified bill information can be stored.
In the embodiment of the invention, the plane single structure information of the reference plane single image is set in advance, so that when any plane single information in the target plane single image needs to be acquired, the plane single structure information of the reference plane single image can be selectively acquired, an image area where the plane single information is located in the target plane single image can be determined according to the acquired plane single structure information of the reference plane single image, and then the plane single information needed by a user can be acquired only by identifying the image area without identifying the target plane single image, so that the accuracy and the efficiency of acquiring the plane single information are improved.
Fig. 3A is a block diagram of an apparatus for acquiring menu information according to an embodiment of the present invention, and referring to fig. 3A, the video playing apparatus may be implemented by software, hardware, or a combination of the two. The device includes: an acquisition module 301, a first determination module 302, and a first identification module 303.
An obtaining module 301, configured to obtain graphics code information of a target surface single image to be processed and surface single structure information of a reference surface single image;
a first determining module 302, configured to determine, based on the graphics code information of the target surface single image and the surface single structure information of the reference surface single image, an image area where the surface single information in the target surface single image is located;
the first identifying module 303 is configured to perform identification processing on the determined image area to obtain the bill information.
Optionally, referring to fig. 3B, the first determining module 302 includes:
the first determining submodule 3021 is configured to determine, based on the graphic code information of the target surface single image and the surface single structure information of the reference surface single image, a size and a preset point position of a first minimum circumscribed graphic, where the first minimum circumscribed graphic is a minimum circumscribed graphic of the surface single information in the target surface single image;
the second determining submodule 3022 is configured to determine, as the image area where the menu information in the target menu image is located, an area indicated by the size and the preset point position of the first minimum circumscribed figure in the target menu image.
Optionally, the plane single structure information of the reference plane single image includes a size and a preset point position of a second minimum circumscribed graph, and a size and a preset point position of a third minimum circumscribed graph, where the second minimum circumscribed graph is a minimum circumscribed graph of a graph code in the reference plane single image, and the third minimum circumscribed graph is a minimum circumscribed graph of the plane single information in the reference plane single image;
the first determining submodule 3021 is further configured to:
determining the size and the preset point position of a fourth minimum circumscribed graph based on the graph code information of the target surface single image, wherein the fourth minimum circumscribed graph is the minimum circumscribed graph of the graph code in the target surface single image;
determining the size of the first minimum circumscribed graph based on the size of the second minimum circumscribed graph, the size of the third minimum circumscribed graph and the size of the fourth minimum circumscribed graph;
and determining the preset point position of the first minimum external graph based on the preset point position of the second minimum external graph, the preset point position of the third minimum external graph and the preset point position of the fourth minimum external graph.
Optionally, the first determining submodule 3021 is further configured to:
determining a size ratio between the size of the second minimum circumscribed figure and the size of the fourth minimum circumscribed figure;
the size of the first minimum circumscribed figure is determined based on the size of the third minimum circumscribed figure and the size ratio.
Optionally, referring to fig. 3C, the first determining module 302 further includes:
a third determining submodule 3023, configured to determine, based on the graphic code information of the target surface single image, a direction of a fourth minimum circumscribed graphic;
a fourth determination submodule 3024 configured to determine a direction deviation between the direction of the second minimum circumscribed graphic and the direction of the fourth minimum circumscribed graphic, and determine the direction of the first minimum circumscribed graphic based on the direction of the third minimum circumscribed graphic and the direction deviation;
accordingly, the first determining submodule 3021 is further configured to:
determining the position offset between the preset point position of the second minimum circumscribed graph and the preset point position of the fourth minimum circumscribed graph;
and determining the preset point position of the first minimum circumscribed figure through affine transformation based on the position offset, the direction deviation and the preset point position of the third minimum circumscribed figure.
Optionally, the first determining module 302 is further configured to:
based on the position offset, the direction deviation and the preset point position of the third minimum circumscribed figure, determining the preset point position of the first minimum circumscribed figure by the following affine transformation formula:
Figure BDA0001305793800000181
wherein x isdstIs the abscissa, y, of the position of the predetermined point of the first minimum circumscribed figuredstIs the ordinate, x, of the position of the predetermined point of the first minimum circumscribed figuresrcIs the abscissa, y, of the location of the predetermined point of the third minimum circumscribed figuresrcThe third minimum circumscribed figure is a vertical coordinate of a preset point position of the third minimum circumscribed figure, sin theta is a sine function value of the direction deviation theta, cos theta is a cosine function value of the direction deviation theta, Δ x is an offset in the horizontal coordinate direction in the position offset, and Δ y is an offset in the vertical coordinate direction in the position offset.
Optionally, referring to fig. 3D, the apparatus further comprises:
the second identification module 304 is configured to identify the graphic code in the target menu image to obtain character information when the menu information includes the number of the graphic code;
and a second determining module 305, configured to determine that the bill information in the target bill image is correctly identified when the character information is the same as the number of the graphic code.
In summary, in the embodiment of the present invention, since the plane single structure information of the reference plane single image is set in advance, when any plane single information in the target plane single image needs to be acquired, the plane single structure information of the reference plane single image can be selectively acquired, an image area where the plane single information is located in the target plane single image can be determined according to the acquired plane single structure information of the reference plane single image, and then the plane single information needed by the user can be acquired only by identifying the image area without identifying the target plane single image, so that the accuracy and the efficiency of acquiring the plane single information are improved.
Fig. 4 is a block diagram illustrating an image capture device 400 according to an exemplary embodiment. Referring to fig. 4, image capture device 400 may include one or more of the following components: processing components 402, memory 404, power components 406, multimedia components 408, audio components 410, input/output (I/O) interfaces 412, sensor components 414, and communication components 416.
The processing component 402 generally controls the overall operation of the image capture device 400, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 402 may include one or more processors 420 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 402 can include one or more modules that facilitate interaction between the processing component 402 and other components. For example, the processing component 402 can include a multimedia module to facilitate interaction between the multimedia component 408 and the processing component 402.
Memory 404 is configured to store various types of data to support operation at image capture device 400. Examples of such data include instructions for any application or method operating on image capture device 400, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 404 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
Power components 406 provide power to the various components of image capture device 400. Power components 406 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for image capture device 400.
The multimedia component 408 includes a screen that provides an output interface between the image capture device 400 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 408 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the image capture device 400 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 410 is configured to output and/or input audio signals. For example, the audio component 410 includes a Microphone (MIC) configured to receive an external audio signal when the image capture device 400 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 404 or transmitted via the communication component 416. In some embodiments, audio component 410 also includes a speaker for outputting audio signals.
The I/O interface 412 provides an interface between the processing component 402 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
Sensor assembly 414 includes one or more sensors for providing status assessment of various aspects of image capture device 400. For example, sensor assembly 414 may detect an open/closed state of image capturing device 400, the relative positioning of components, such as a display and keypad of image capturing device 400, sensor assembly 414 may also detect a change in position of image capturing device 400 or a component of image capturing device 400, the presence or absence of user contact with image capturing device 400, orientation or acceleration/deceleration of image capturing device 400, and a change in temperature of image capturing device 400. The sensor assembly 414 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 414 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 414 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
Communication component 416 is configured to facilitate communication between image capture device 400 and other devices in a wired or wireless manner. Image capture device 400 may access a wireless network based on a communication standard, such as WiFi, 2G, or 3G, or a combination thereof. In an exemplary embodiment, the communication component 416 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 416 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the image capture device 400 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors, or other electronic components for performing the methods provided by the embodiments illustrated in fig. 2 and described above.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 404 comprising instructions, executable by the processor 420 of the image acquisition device 400 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
A non-transitory computer readable storage medium, wherein instructions, when executed by a processor of an image capture device, enable the image capture device to perform the method provided by the embodiment of fig. 2 described above.
It should be noted that: the above-mentioned apparatus for acquiring waybill information provided in the above-mentioned embodiment is only exemplified by the division of the above-mentioned functional modules when acquiring waybill information, and in practical applications, the above-mentioned function distribution may be completed by different functional modules according to needs, that is, the internal structure of the apparatus is divided into different functional modules to complete all or part of the above-mentioned functions. In addition, the apparatus for acquiring policy information and the method for acquiring policy information provided by the above embodiments belong to the same concept, and specific implementation processes thereof are detailed in the method embodiments and are not described herein again.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (14)

1. A method for acquiring menu information is characterized by comprising the following steps:
acquiring graphic code information of a target surface single image to be processed and surface single structure information of a reference surface single image, wherein the surface single structure information of the reference surface single image comprises position information of an image area where a graphic code is located in the reference surface single image and position information of an image area where the surface single information is located;
determining an image area where the single information in the target surface single image is located based on the graphic code information of the target surface single image and the surface single structure information of the reference surface single image;
and identifying the determined image area to obtain the bill information.
2. The method of claim 1, wherein the determining the image area of the target surface single image where the surface single information is located based on the graphic code information of the target surface single image and the surface single structure information of the reference surface single image comprises:
determining the size and the preset point position of a first minimum circumscribed graph based on the graphic code information of the target surface single image and the surface single structure information of the reference surface single image, wherein the first minimum circumscribed graph is the minimum circumscribed graph of the surface single information in the target surface single image;
and determining the area indicated by the size of the first minimum circumscribed figure and the preset point position in the target surface single image as the image area where the surface single information is located in the target surface single image.
3. The method according to claim 2, wherein the plane single structure information of the reference plane single image includes a size and a preset point position of a second minimum circumscribed figure, which is a minimum circumscribed figure of the graphic code in the reference plane single image, and a size and a preset point position of a third minimum circumscribed figure, which is a minimum circumscribed figure of the plane single information in the reference plane single image;
the determining the size and the preset point position of the first minimum circumscribed figure based on the graphic code information of the target surface single image and the surface single structure information of the reference surface single image comprises:
determining the size and the preset point position of a fourth minimum circumscribed graph based on the graph code information of the target surface single image, wherein the fourth minimum circumscribed graph is the minimum circumscribed graph of the graph code in the target surface single image;
determining the size of the first minimum circumscribed graphic based on the size of the second minimum circumscribed graphic, the size of the third minimum circumscribed graphic, and the size of the fourth minimum circumscribed graphic;
and determining the preset point position of the first minimum external graph based on the preset point position of the second minimum external graph, the preset point position of the third minimum external graph and the preset point position of the fourth minimum external graph.
4. The method of claim 3, wherein determining the size of the first minimum circumscribed graphic based on the size of the second minimum circumscribed graphic, the size of the third minimum circumscribed graphic, and the size of the fourth minimum circumscribed graphic comprises:
determining a size ratio between the size of the second minimum circumscribed figure and the size of the fourth minimum circumscribed figure;
determining the size of the first minimum circumscribed figure based on the size of the third minimum circumscribed figure and the size ratio.
5. The method according to claim 3 or 4, wherein before determining the preset point position of the first minimum circumscribed graph based on the preset point position of the second minimum circumscribed graph, the preset point position of the third minimum circumscribed graph and the preset point position of the fourth minimum circumscribed graph, the method further comprises:
determining the direction of the fourth minimum circumscribed graph based on the graph code information of the target surface single image;
determining a direction deviation between the direction of the second minimum circumscribed figure and the direction of the fourth minimum circumscribed figure, and determining the direction of the first minimum circumscribed figure based on the direction of the third minimum circumscribed figure and the direction deviation;
correspondingly, the determining the preset point position of the first minimum circumscribed graph based on the preset point position of the second minimum circumscribed graph, the preset point position of the third minimum circumscribed graph and the preset point position of the fourth minimum circumscribed graph includes:
determining the position offset between the preset point position of the second minimum circumscribed figure and the preset point position of the fourth minimum circumscribed figure;
and determining the preset point position of the first minimum external graph through affine transformation based on the position offset, the direction deviation and the preset point position of the third minimum external graph.
6. The method according to claim 5, wherein the determining the preset point position of the first minimum circumscribed figure by affine transformation based on the position offset amount, the direction deviation, and the preset point position of the third minimum circumscribed figure comprises:
determining the preset point position of the first minimum circumscribed figure by the following affine transformation formula based on the position offset, the direction deviation and the preset point position of the third minimum circumscribed figure:
Figure FDA0003349840530000031
wherein, the xdstIs the abscissa of the preset point position of the first minimum circumscribed figure, ydstIs the ordinate of the preset point position of the first minimum circumscribed figure, xsrcIs the abscissa of the preset point position of the third minimum circumscribed figure, ysrcThe sine theta is a sine function value of the direction deviation theta, the cos theta is a cosine function value of the direction deviation theta, the Δ x is an offset in the horizontal coordinate direction in the position offset, and the Δ y is an offset in the vertical coordinate direction in the position offset.
7. The method as claimed in any one of claims 1-4 and 6, wherein after the identifying the determined image area to obtain the facial slip information, further comprising:
when the bill information comprises the number of the graphic code, identifying the graphic code in the target bill image to obtain character information;
and when the character information is the same as the number of the graphic code, determining that the bill information in the target bill image is correctly identified.
8. An apparatus for acquiring waybill information, the apparatus comprising:
the acquisition module is used for acquiring graphic code information of a target surface single image to be processed and surface single structure information of a reference surface single image, wherein the surface single structure information of the reference surface single image comprises position information of an image area where a graphic code is located in the reference surface single image and position information of an image area where the surface single information is located;
the first determining module is used for determining an image area where the single information in the target surface single image is located based on the graphic code information of the target surface single image and the surface single structure information of the reference surface single image;
and the first identification module is used for identifying the determined image area to obtain the bill information.
9. The apparatus of claim 8, wherein the first determining module comprises:
the first determining submodule is used for determining the size and the preset point position of a first minimum circumscribed graph based on the graphic code information of the target surface single image and the surface single structure information of the reference surface single image, wherein the first minimum circumscribed graph is the minimum circumscribed graph of the surface single information in the target surface single image;
and the second determining submodule is used for determining the area indicated by the size and the preset point position of the first minimum circumscribed figure in the target surface single image as the image area where the surface single information in the target surface single image is located.
10. The apparatus of claim 9, wherein the plane single structure information of the reference plane single image includes a size and a preset point position of a second minimum circumscribed figure that is a minimum circumscribed figure of the graphic code in the reference plane single image, and a size and a preset point position of a third minimum circumscribed figure that is a minimum circumscribed figure of the plane single information in the reference plane single image;
the first determination submodule is configured to:
determining the size and the preset point position of a fourth minimum circumscribed graph based on the graph code information of the target surface single image, wherein the fourth minimum circumscribed graph is the minimum circumscribed graph of the graph code in the target surface single image;
determining the size of the first minimum circumscribed graphic based on the size of the second minimum circumscribed graphic, the size of the third minimum circumscribed graphic, and the size of the fourth minimum circumscribed graphic;
and determining the preset point position of the first minimum external graph based on the preset point position of the second minimum external graph, the preset point position of the third minimum external graph and the preset point position of the fourth minimum external graph.
11. The apparatus of claim 10, wherein the first determination submodule is further to:
determining a size ratio between the size of the second minimum circumscribed figure and the size of the fourth minimum circumscribed figure;
determining the size of the first minimum circumscribed figure based on the size of the third minimum circumscribed figure and the size ratio.
12. The apparatus of claim 10 or 11, wherein the first determining module further comprises:
the third determining submodule is used for determining the direction of the fourth minimum external graph based on the graph code information of the target surface single image;
a fourth determination submodule configured to determine a direction deviation between the direction of the second minimum circumscribed figure and the direction of the fourth minimum circumscribed figure, and determine the direction of the first minimum circumscribed figure based on the direction of the third minimum circumscribed figure and the direction deviation;
accordingly, the first determination sub-module is further configured to:
determining the position offset between the preset point position of the second minimum circumscribed figure and the preset point position of the fourth minimum circumscribed figure;
and determining the preset point position of the first minimum external graph through affine transformation based on the position offset, the direction deviation and the preset point position of the third minimum external graph.
13. The apparatus of claim 12, wherein the first determination submodule is further to:
determining the preset point position of the first minimum circumscribed figure by the following affine transformation formula based on the position offset, the direction deviation and the preset point position of the third minimum circumscribed figure:
Figure FDA0003349840530000051
wherein, the xdstIs the abscissa of the preset point position of the first minimum circumscribed figure, ydstIs the ordinate of the preset point position of the first minimum circumscribed figure, xsrcIs the abscissa of the preset point position of the third minimum circumscribed figure, ysrcThe sine theta is a sine function value of the direction deviation theta, the cos theta is a cosine function value of the direction deviation theta, the Δ x is an offset in the horizontal coordinate direction in the position offset, and the Δ y is an offset in the vertical coordinate direction in the position offset.
14. The apparatus of any of claims 8-11 and 13, wherein the apparatus further comprises:
the second identification module is used for identifying the graphic code in the target menu image to obtain character information when the menu information comprises the number of the graphic code;
and the second determining module is used for determining that the bill information in the target bill image is correctly identified when the character information is the same as the number of the graphic code.
CN201710383779.3A 2017-05-26 2017-05-26 Method and device for acquiring bill information Active CN108932692B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710383779.3A CN108932692B (en) 2017-05-26 2017-05-26 Method and device for acquiring bill information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710383779.3A CN108932692B (en) 2017-05-26 2017-05-26 Method and device for acquiring bill information

Publications (2)

Publication Number Publication Date
CN108932692A CN108932692A (en) 2018-12-04
CN108932692B true CN108932692B (en) 2021-12-31

Family

ID=64450290

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710383779.3A Active CN108932692B (en) 2017-05-26 2017-05-26 Method and device for acquiring bill information

Country Status (1)

Country Link
CN (1) CN108932692B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110009559B (en) * 2019-03-19 2023-07-07 北京迈格威科技有限公司 Image processing method and device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6111984A (en) * 1997-06-10 2000-08-29 Fujitsu Limited Method for matching input image with reference image, apparatus for the same, and storage medium storing program for implementing the method
EP1118959B1 (en) * 2000-01-18 2006-10-25 Hitachi-Omron Terminal Solutions, Corp. Method and apparatus for determining form sheet type
CN104079730A (en) * 2013-03-28 2014-10-01 佳能株式会社 Document processing device, document processing method and multi-function printer comprising document processing device
CN104881770A (en) * 2015-06-03 2015-09-02 秦志勇 Express bill information identification system and express bill information identification method
CN106056028A (en) * 2016-06-29 2016-10-26 倪洪雷 Rapid scanning and waybill recording method and device thereof
CN106611171A (en) * 2015-10-22 2017-05-03 上海天涛智能科技有限公司 Method and device for scanning and express sheet inputting

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6111984A (en) * 1997-06-10 2000-08-29 Fujitsu Limited Method for matching input image with reference image, apparatus for the same, and storage medium storing program for implementing the method
EP1118959B1 (en) * 2000-01-18 2006-10-25 Hitachi-Omron Terminal Solutions, Corp. Method and apparatus for determining form sheet type
CN104079730A (en) * 2013-03-28 2014-10-01 佳能株式会社 Document processing device, document processing method and multi-function printer comprising document processing device
CN104881770A (en) * 2015-06-03 2015-09-02 秦志勇 Express bill information identification system and express bill information identification method
CN106611171A (en) * 2015-10-22 2017-05-03 上海天涛智能科技有限公司 Method and device for scanning and express sheet inputting
CN106056028A (en) * 2016-06-29 2016-10-26 倪洪雷 Rapid scanning and waybill recording method and device thereof

Also Published As

Publication number Publication date
CN108932692A (en) 2018-12-04

Similar Documents

Publication Publication Date Title
EP3690625B1 (en) Method and device for dynamically displaying icon according to background image
US9953506B2 (en) Alarming method and device
US10452890B2 (en) Fingerprint template input method, device and medium
EP3179711B1 (en) Method and apparatus for preventing photograph from being shielded
US8766766B2 (en) Information processing apparatus, information processing system, information processing method, and program
JP6392991B2 (en) Spatial parameter identification method, apparatus, program, recording medium, and terminal device using image
US11288531B2 (en) Image processing method and apparatus, electronic device, and storage medium
EP3226204A1 (en) Method and apparatus for intelligently capturing image
EP3147802B1 (en) Method and apparatus for processing information
EP3176999B1 (en) Method and device for processing information
CN104918107A (en) Video file identification processing method and device
CN106485660B (en) Electronic map zooming method and device
CN110442521B (en) Control unit detection method and device
US11574415B2 (en) Method and apparatus for determining an icon position
CN109992176A (en) A kind of scan method and device of message identification code
CN112508020A (en) Labeling method and device, electronic equipment and storage medium
CN105117006A (en) Information input method and apparatus
CN107219989B (en) Icon processing method and device and terminal
CN108932692B (en) Method and device for acquiring bill information
CN106527871B (en) The display methods and device of application icon
US20170154318A1 (en) Information processing method, apparatus, and storage medium
CN108182145B (en) Method and device for verifying APP interface layout and computer readable storage medium
CN113869295A (en) Object detection method and device, electronic equipment and storage medium
KR20170037862A (en) Method and device for string saving
EP3211868B1 (en) Method and device for processing information

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
CP03 Change of name, title or address

Address after: 310051 room 304, B / F, building 2, 399 Danfeng Road, Binjiang District, Hangzhou City, Zhejiang Province

Patentee after: Hangzhou Hikvision Robot Co.,Ltd.

Address before: 310051 5th floor, building 1, building 2, no.700 Dongliu Road, Binjiang District, Hangzhou City, Zhejiang Province

Patentee before: HANGZHOU HIKROBOT TECHNOLOGY Co.,Ltd.

CP03 Change of name, title or address