WO2019242644A1 - Ticket checking method and apparatus based on manual ticket checking interface image, medium and electronic device - Google Patents

Ticket checking method and apparatus based on manual ticket checking interface image, medium and electronic device Download PDF

Info

Publication number
WO2019242644A1
WO2019242644A1 PCT/CN2019/091898 CN2019091898W WO2019242644A1 WO 2019242644 A1 WO2019242644 A1 WO 2019242644A1 CN 2019091898 W CN2019091898 W CN 2019091898W WO 2019242644 A1 WO2019242644 A1 WO 2019242644A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
ticket
ticket checking
area image
area
Prior art date
Application number
PCT/CN2019/091898
Other languages
French (fr)
Chinese (zh)
Inventor
郁昌存
安耀祖
Original Assignee
京东数字科技控股有限公司
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 京东数字科技控股有限公司 filed Critical 京东数字科技控股有限公司
Publication of WO2019242644A1 publication Critical patent/WO2019242644A1/en

Links

Images

Classifications

    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07BTICKET-ISSUING APPARATUS; FARE-REGISTERING APPARATUS; FRANKING APPARATUS
    • G07B11/00Apparatus for validating or cancelling issued tickets
    • G07B11/02Apparatus for validating or cancelling issued tickets for validating inserted tickets
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/22Image preprocessing by selection of a specific region containing or referencing a pattern; Locating or processing of specific regions to guide the detection or recognition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/56Extraction of image or video features relating to colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/14Image acquisition
    • G06V30/148Segmentation of character regions
    • G06V30/153Segmentation of character regions using recognition of characters or words
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/161Detection; Localisation; Normalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/172Classification, e.g. identification
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07BTICKET-ISSUING APPARATUS; FARE-REGISTERING APPARATUS; FRANKING APPARATUS
    • G07B11/00Apparatus for validating or cancelling issued tickets
    • G07B11/11Apparatus for validating or cancelling issued tickets for cancelling tickets
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition

Definitions

  • the present invention relates to the technical field of ticket gates and face recognition technology, and in particular, to a ticket checking method based on a manual ticket checking interface image and a ticket checking device based on a manual ticket checking interface image.
  • the purpose of the embodiments of the present invention is to provide a ticket checking method based on an image of a manual ticket checking interface and a ticket checking device based on an image of a manual ticket checking interface, so as to overcome at least a certain degree of difficulty in reconstruction due to limitations and defects of related technologies , High cost, and easy leakage of passenger personal information.
  • a ticket checking method based on an image of a manual ticket checking interface including:
  • Obtaining an image of a manual ticket checking interface wherein the image of the manual ticket checking interface includes at least a first area image, a second area image, and a third area image;
  • the parsing the first area image to obtain a blur value, and determining whether the first area image is a ticket picture based on the blur value including:
  • the blur value of the first area image is less than a preset threshold, it is determined that the first area image is empty.
  • the parsing the second area image to determine a dominant color of the second area image, and determining a ticket status based on the dominant color including:
  • a ticket verification result is determined.
  • determining the ticket verification result based on the dominant color of the second region image includes:
  • the dominant color of the second region image is not green, determining whether the dominant color of the second region image is red;
  • the method further includes:
  • the parsing the third region image to obtain a credential image includes:
  • the portrait image is extracted to obtain a credential image.
  • matching the credential image with a face image collected by a camera to obtain a matching result and outputting the matching result includes:
  • a ticket checking device based on an image of a manual ticket checking interface, including: an acquisition module, a first analysis module, a second analysis module, a third analysis module, and a matching module;
  • An obtaining module configured to obtain an image of a manual ticket checking interface, wherein the image of the manual ticket checking interface includes at least a first area image, a second area image, and a third area image;
  • a first analysis module configured to analyze the first area image to obtain a blur value, and determine whether the first area image is a ticket picture based on the blur value
  • a second analysis module configured to analyze the second area image, determine a dominant color of the second area image, and determine a ticket status based on the dominant color
  • a third analysis module configured to: when it is determined that the first area image is a ticket picture and the ticket status is consistent, analyze the third area image to obtain a certificate image;
  • a matching module is configured to match the document image with a face image collected by a camera to obtain a matching result, and perform a ticket check based on the matching result.
  • the first parsing module is specifically configured to:
  • the blur value of the first area image is less than a preset threshold, it is determined that the first area image is empty.
  • the second parsing module is specifically configured to:
  • a ticket verification result is determined.
  • the second parsing module is specifically configured to:
  • the dominant color of the second region image is not green, determining whether the dominant color of the second region image is red;
  • the second parsing module is specifically configured to:
  • the third parsing module is specifically configured to:
  • the portrait image is extracted to obtain a credential image.
  • the matching module is specifically configured to:
  • a computer-readable medium having stored thereon a computer program that, when executed by a processor, implements a manual ticket-based interface as described in the first aspect of the above embodiment.
  • Image checking method
  • an electronic device including: one or more processors; a storage device for storing one or more programs, and when the one or more programs are used by the one When being executed by one or more processors, the one or more processors are caused to implement the ticket checking method based on the manual ticket checking interface image as described in the first aspect of the foregoing embodiment.
  • an image of a manual ticket checking interface is obtained, wherein the image of the manual ticket checking interface includes at least a first area image, a second area image, and a third area image;
  • the area image is analyzed to obtain a blur value, and whether the first area image is a ticket picture is determined based on the blur value;
  • the second area image is analyzed to determine the dominant color of the second area image.
  • the dominant color determines the ticket status; when it is determined that the first area image is a ticket picture and the ticket status is consistent, the third area image is analyzed to obtain a credential image; the credential image and a camera
  • the collected face images are matched to obtain a matching result, and the ticket is checked based on the matching result.
  • the traditional manual ticket checking system can be transformed into a device where passengers can brush their faces and enter the station in a low-cost and non-invasive manner.
  • the coupling degree of each module in the device provided by the embodiment of the present invention is low, the gate can be reused, and the application can be migrated. , Provides a transitional solution for the implementation of later electronic tickets, greatly reducing the waste of resources.
  • FIG. 1 schematically illustrates a flowchart of a ticket checking method based on a manual ticket checking interface image according to an embodiment of the present invention
  • FIG. 2 schematically illustrates an image of a manual ticket checking interface according to an embodiment of the present invention
  • FIG. 3A schematically illustrates that the first area image is ticket information according to an embodiment of the present invention
  • 3B schematically illustrates a first region image without ticket information according to an embodiment of the present invention
  • FIG. 4 is a schematic flowchart of determining whether a first area is a ticket image according to an embodiment of the present invention
  • FIG. 5 schematically illustrates a display content of a second region image in a traffic permission state according to an embodiment of the present invention
  • FIG. 6 schematically illustrates a display content of a second region image in a non-traffic state according to an embodiment of the present invention
  • FIG. 7 schematically illustrates a flowchart of determining a color of a second image region according to an embodiment of the present invention
  • FIG. 8 schematically illustrates a block diagram of a ticket checking device based on an image of a manual ticket checking interface according to an embodiment of the present invention
  • FIG. 9 is a schematic structural diagram of a computer system suitable for implementing an electronic device according to an embodiment of the present invention.
  • FIG. 1 schematically illustrates a flowchart of a ticket checking method based on an image of a manual ticket checking interface according to an embodiment of the present invention.
  • a ticket checking method based on a manual ticket checking interface image includes the following steps:
  • Step S110 obtaining an image of the manual ticket checking interface
  • Step S120 Analyze the first area image to obtain a blur value, and determine whether the first area image is a ticket picture based on the blur value;
  • Step S130 Analyze the second area image to determine the dominant color of the second area image, and determine the ticket status based on the dominant color;
  • Step S140 When it is determined that the first area image is a ticket picture and the ticket status is consistent, analyze the third area image to obtain a credential image;
  • Step S150 Match the document image with the face image collected by the camera to obtain a matching result, and perform a ticket check based on the matching result.
  • the technical solution of the embodiment shown in FIG. 1 can transform the traditional manual ticket checking system into a device that passengers can brush their faces and enter the station in a low cost and non-invasive manner by analyzing the images of the existing manual ticket checking interface.
  • the devices provided in the embodiments have a low coupling degree, reusable gates, and application migration, which provides a transition solution for the implementation of later electronic tickets, which greatly reduces the waste of resources.
  • step S110 an image of a manual ticket checking interface is acquired.
  • the image of the manual ticket checking interface includes at least three regions: a first region image 201, a second region image 202, and a third region image 203, wherein the first region image 201 may be a passenger ticket image, and the ticket image may be obtained through a ticket collection device provided on a ticket gate, such as a scanner, a code scanning device, a camera, and the like; the second area image 202 may be a ticket verification result of a manual ticket checking system
  • the text and background color are displayed in the image of the area.
  • the text indicates the ticket verification result.
  • the background color is green, red, yellow, or orange. Generally, there is a certain correspondence between the background color and the text.
  • the third area image 203 may be the passenger's ID information, including: name, ID number, ID image and other information.
  • key information is extracted from the interface of the existing manual ticket checking system, and this information will be used to determine the passage of passengers. Basis of status.
  • step S120 the first area image is analyzed to obtain a blur value, and whether the first area image is a ticket picture is determined based on the blur value.
  • the first region image mainly has two states, as shown in FIG. 3A with ticket information, and as shown in FIG. 3B No ticket information is shown. Therefore, it is necessary to determine whether the passenger has placed the ticket on the ticket collection device of the ticket gate to remind the passenger to present the ticket and obtain the ticket information during the check.
  • FIG. 4 is a schematic flowchart of determining whether the first area is a ticket image according to an embodiment of the present invention. As shown in FIG. 4, the method includes the following steps:
  • Step S410 extracting R-channel data of the first region image, and obtaining a blur value of the first-region image based on the R-channel data;
  • the calculation of the blur value may be performed by using a Laplacian of the image, and the formula is as follows:
  • x and y represent Cartesian coordinates on the two-dimensional plane X-Y.
  • Step S420 comparing the blur value of the first region image with a preset threshold
  • Step S430 The blur value of the first area image is greater than or equal to a preset threshold, and it is determined that the first area image is a parity image;
  • step S440 if the blur value of the first region image is less than a preset threshold, it is determined that the first region image is empty.
  • step S130 the second area image is analyzed to determine the dominant color of the second area image, and the ticket status is determined based on the dominant color.
  • the second area image is a manual ticket verification result, and the verification result includes two states of allowed traffic and not allowed traffic, wherein, as shown in FIG. 5, the second area image in the allowed traffic state
  • the display content can include: (1) the text of "the ticket is unanimously approved” and a green background color 501; (2) the text of "the ticket has been checked” and the orange background color 502; (3) "on the station in front "Car” text content and yellow background color 503; as shown in Figure 6, the display content of the second area image in the above-mentioned disallowed traffic state may include: (1) the text content of "the ticket does not match” and the red background color 601 ; (2) the text of "Ticket Expired” and the red background color 602; (3) the text of "No Ticket Time” and the yellow background color 603; (4) The text of "The car does not pass this station” Content and a yellow background color 604; (5) the text content of "Need to verify ID card” and a yellow background color 605.
  • the second region image needs to be parsed to determine the ticket verification result.
  • the RGB color space of the second region image is converted to the HSV color space; wherein, the RGB color The space includes at least the superimposed data of red, green, and blue colors in the second region image.
  • the HSV color space includes at least the hue data, saturation data, and brightness data of the second region image.
  • the hue data in the HSV color space is analyzed.
  • the dominant color of the image of the second region is determined; based on the dominant color of the image of the second region, a ticket verification result is determined.
  • the color judgment is to convert the picture from the RGB space to the HSV color space by counting the pixel interval distribution of the H component in the HSV color space of the second region image.
  • the H parameter represents color information. , That is, the position of the spectral color. This parameter is expressed by an angle. Red, green, and blue are separated by 120 degrees.
  • the interval of the H component in the HSV space of each pixel in the picture is analyzed to find the corresponding color.
  • the statistical dominant color of the picture is the color of the ticket verification result we want.
  • the judgment process includes the following steps:
  • Step S701 determining a color interval of the second region image
  • Step S702 it is judged whether it is green; if it is, then the result of matching the tickets is determined S703; if not, step S704 is performed;
  • Step S704 determine whether it is red; if yes, determine the result of the ticket being invalid S705; if not, perform step S706
  • step S706 it is determined that the color of the second region image is yellow or orange, and text recognition and regular matching are performed on the second region image. If there is a match, a consistent result of the ticket is determined S707; if it does not match, the ticket verification result is determined as To be determined S708, passengers are reminded to go through the manual ticket gate.
  • step S706 the second area image whose ticket verification result is pending is subjected to binarization processing to obtain a black and white image of the text; the black and white image is horizontally and vertically projected to determine the second The text area of the area image; identify the text in the text area of the second area image.
  • step S140 when it is determined that the first area image is a ticket picture and the ticket status is consistent, the third area image is analyzed to obtain a credential image.
  • a face detection is performed on a picture by using a Dlib face recognition algorithm on an ID card area to see if a photo of the document exists, so as to determine whether the user places a document.
  • step S150 the document image is matched with the face image collected by the camera to obtain a matching result, and a ticket is checked based on the matching result.
  • a face image of the passenger document image is obtained in step S150, and the passenger's face is obtained through a camera to be compared with the photo of the passenger's face, and the gate is opened when the face comparison is passed.
  • the traditional manual ticket checking system can be retrofitted non-invasively, and it can be empowered as a self-service face brushing station.
  • FIG. 8 schematically illustrates a block diagram of a ticket checking device based on an image of a manual ticket checking interface according to an embodiment of the present invention.
  • a ticket checking device 800 based on an image of a manual ticket checking interface includes: an acquisition module 801, a first analysis module 802, a second analysis module 803, a third analysis module 804, and a matching module. 805.
  • An obtaining module 801 is configured to obtain an image of a manual ticket checking interface, where the image of the manual ticket checking interface includes at least a first area image, a second area image, and a third area image;
  • a first analysis module 802 configured to analyze the first area image to obtain a blur value, and determine whether the first area image is a ticket picture based on the blur value;
  • a second analysis module 803, configured to analyze the second area image, determine a dominant color of the second area image, and determine a ticket status based on the dominant color;
  • a third analysis module 804 configured to: when it is determined that the first area image is a ticket picture and the ticket status is consistent, analyze the third area image to obtain a credential image;
  • the matching module 805 is configured to match the document image with the face image collected by the camera to obtain a matching result, and perform ticket checking based on the matching result.
  • the first parsing module 802 is specifically configured to:
  • the blur value of the first area image is greater than or equal to a preset threshold, and it is determined that the first area image is a parity image;
  • the blur value of the first area image is less than a preset threshold, it is determined that the first area image is empty.
  • the second parsing module 803 is specifically configured to:
  • the RGB color space of the second region image Converting the RGB color space of the second region image into the HSV color space; wherein the RGB color space includes at least the superimposed data of the red, green, and blue colors in the second region image, and the HSV color space includes at least the hue data of the second region image , Saturation data and brightness data;
  • a ticket verification result is determined.
  • the second parsing module 803 is specifically configured to:
  • the dominant color of the second region image is not green, determine whether the dominant color of the second region image is red;
  • the second parsing module 803 is specifically configured to:
  • the third parsing module 804 is specifically configured to:
  • the portrait image is extracted to obtain a credential image.
  • the matching module 805 is specifically configured to:
  • the ticket checking is determined to be successful, a matching result of the ticket checking failure is generated, and a prompt message indicating that the ticket checking fails is issued.
  • each functional module of the ticket checking device based on the manual ticket checking interface image of the exemplary embodiment of the present invention corresponds to the steps of the above-mentioned example embodiment of the ticket checking method based on the manual ticket checking interface image, details that are not disclosed in the device embodiments of the present invention Please refer to the foregoing embodiment of the ticket checking method based on the manual ticket checking interface image of the present invention.
  • FIG. 9 is a schematic structural diagram of a computer system 900 suitable for implementing an electronic device according to an embodiment of the present invention.
  • the computer system 900 of the electronic device shown in FIG. 9 is only an example, and should not impose any limitation on the function and scope of use of the embodiment of the present invention.
  • the computer system 900 includes a central processing unit (CPU) 901 which can be loaded into a random access memory (RAM) 903 according to a program stored in a read-only memory (ROM) 902 or from a storage portion 1208 Instead, perform various appropriate actions and processes.
  • RAM random access memory
  • ROM read-only memory
  • various programs and data required for system operation are also stored.
  • the CPU 901, the ROM 902, and the RAM 903 are connected to each other through a bus 904.
  • An input / output (I / O) interface 905 is also connected to the bus 904.
  • the following components are connected to the I / O interface 905: an input portion 1206 including a keyboard, a mouse, and the like; an output portion 907 including a cathode ray tube (CRT), a liquid crystal display (LCD), and the speaker; a storage portion 908 including a hard disk and the like ; And a communication section 909 including a network interface card such as a LAN card, a modem, and the like.
  • the communication section 909 performs communication processing via a network such as the Internet.
  • the driver 910 is also connected to the I / O interface 905 as necessary.
  • a removable medium 99 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 910 as needed, so that a computer program read therefrom is installed into the storage section 908 as needed.
  • the process described above with reference to the flowchart may be implemented as a computer software program.
  • embodiments of the present invention include a computer program product including a computer program carried on a computer-readable medium, the computer program containing program code for performing the method shown in the flowchart.
  • the computer program may be downloaded and installed from a network through the communication portion 909, and / or installed from a removable medium 911.
  • this computer program is executed by a central processing unit (CPU) 901
  • CPU central processing unit
  • the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the foregoing.
  • the computer-readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable Programming read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the foregoing.
  • the computer-readable storage medium may be any tangible medium containing or storing a program, and the program may be used by or in combination with an instruction execution system, apparatus, or device.
  • the computer-readable signal medium may include a data signal propagated in baseband or transmitted as a part of a carrier wave, in which a computer-readable program code is carried. Such a propagated data signal may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • the computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, and the computer-readable medium may send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device.
  • Program code embodied on a computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
  • each block in the flowchart or block diagram may represent a module, program segment, or part of code, which contains one or more of the logic functions used to implement the specified logic. Executable instructions.
  • the functions labeled in the blocks may also occur in a different order than those labeled in the drawings. For example, two blocks represented one after the other may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved.
  • each block in the block diagram or flowchart, and combinations of blocks in the block diagram or flowchart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with A combination of dedicated hardware and computer instructions.
  • the units described in the embodiments of the present invention may be implemented by software or hardware.
  • the described units may also be provided in a processor.
  • the names of these units do not, in some cases, define the unit itself.
  • the present application also provides a computer-readable medium, which may be included in the electronic device described in the above embodiments; or may exist separately without being assembled into the electronic device in.
  • the computer-readable medium carries one or more programs, and when the one or more programs are executed by one of the electronic devices, the electronic device implements the screen control implementation and display method as in the above embodiment.
  • step S110 obtaining an image of a manual ticket checking interface
  • step S120 analyzing the first area image to obtain a blur value, and determining whether the first area image is based on the blur value Ticket picture
  • step S130 analyzing the second area image to determine the dominant color of the second area image, and determining the ticket status based on the dominant color
  • step S140 when determining that the first area image is a ticket image and the ticket status is consistent , Analyzing the third region image to obtain a credential image
  • step S150 matching the credential image with the face image collected by the camera to obtain a matching result, and checking the ticket based on the matching result.
  • the above electronic device can implement each step shown in FIG. 4.
  • the above electronic device can implement each step shown in FIG. 7.
  • modules or units of the device for action execution are mentioned in the detailed description above, this division is not mandatory.
  • the features and functions of two or more modules or units described above may be embodied in one module or unit.
  • the features and functions of a module or unit described above can be further divided into multiple modules or units to be embodied.
  • the technical solution according to the embodiment of the present invention may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a U disk, a mobile hard disk, etc.) or on a network It includes several instructions to enable a computing device (which may be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the embodiment of the present invention.
  • a computing device which may be a personal computer, a server, a touch terminal, or a network device, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Data Mining & Analysis (AREA)
  • Human Computer Interaction (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Health & Medical Sciences (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Image Analysis (AREA)

Abstract

A ticket checking method and apparatus based on a manual ticket checking interface image, a medium and an electronic device, said method comprising: acquiring a manual ticket checking interface image (S101); parsing a first region image (201) to obtain a blur value, and determining, on the basis of the blur value, whether the first region image (201) is a ticket picture (S102); parsing a second region image (202) to determine a ticket status (S103); if it is determined that the first region image (201) is the ticket picture and the ticket status is consistent, parsing a third region image (203) to obtain a credential image (S104); and comparing the identity certificate image with a face image captured by a camera to obtain a comparison result, and performing ticket checking on the basis of the comparison result (S105). The present invention allows a user to perform self-service face scanning to check in on the basis of a conventional manual ticket checking system in a non-intrusive manner, and achieves the following advantages: the coupling degree between various modules is low, gate machines can be reused, and the applications can be migrated, reducing the waste of resources.

Description

基于人工检票界面图像的检票方法、装置、介质及电子设备Ticket checking method, device, medium and electronic device based on manual ticket checking interface image 技术领域Technical field
本发明涉及检票闸机以及人脸识别技术领域,具体而言,涉及一种基于人工检票界面图像的检票方法及一种基于人工检票界面图像的检票装置。The present invention relates to the technical field of ticket gates and face recognition technology, and in particular, to a ticket checking method based on a manual ticket checking interface image and a ticket checking device based on a manual ticket checking interface image.
背景技术Background technique
随着互联网技术的不断发展完善,科技对铁路的影响势不可挡。“刷脸进站”刷出人们出行新体验,借助科技的力量,通过刷脸检票进站,让人们出行更便捷。但是,在为旅客提供便捷的同时,铁路方面需要大批量采购人、票、证一体机(刷脸进站设备),面临着巨大的改造成本。据悉,电子车票也会在近几年内推出,意味着当前的人票证一体机设备将面临再次改造,又会有新的改造成本继续投入。With the continuous development and improvement of Internet technology, the impact of technology on railways is unstoppable. "Brushing face into the station" brushes out people's new travel experience. With the power of technology, by brushing their faces and checking tickets to enter the station, people's travel is more convenient. However, while providing convenience to passengers, railways need to purchase a large number of all-in-one machines for ticketing, ticketing, and identification (brushing into the station equipment), and face huge transformation costs. It is reported that the electronic ticket will also be launched in recent years, which means that the current personal ticket machine equipment will face another transformation, and will continue to invest in new transformation costs.
现有技术方案:人票证一体机均是独立于现有人工检票系统,重新开发票证数据接口,将接口开放给第三方的人票证一体机设备厂商、并集成人脸识别技术与闸机设备控制,形成当前的人票证一体机。Existing technical solution: All the ticket and ticket all-in-one machines are independent of the existing manual ticket checking system, redeveloping the ticket data interface, opening the interface to third-party ticket and ticket machine manufacturers, and integrating face recognition technology and gate equipment control To form the current ticket machine.
现有技术方案的缺点:首先,独立于现有检票系统重新开无疑会增加更多的开发调试成本;其次,铁路方面要将票证接口开放给人票证一体机的第三方招标厂商,如控制不严格,还可能会产生数据安全问题;最后,伴随着电子车票的推出,现有人票证一体机设备将面临再次改造,作为一种过渡期的自主刷脸进站方案,现有技术方案改造成本极高。Disadvantages of the existing technical solution: First, reopening independently of the existing ticket checking system will undoubtedly increase more development and commissioning costs; second, the railway will open the ticket interface to the third-party bidding vendor of the all-in-one ticket machine. Strict, it may also cause data security issues; finally, with the introduction of electronic tickets, the existing ticket machine equipment will face the transformation again, as a transitional autonomous face-to-face solution, the cost of transformation of the existing technology solution is extremely high. high.
需要说明的是,在上述背景技术部分公开的信息仅用于加强对本发明的背景的理解,因此可以包括不构成对本领域普通技术人员已知的现有技术的信息。It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of the present invention, and therefore may include information that does not constitute the prior art known to those skilled in the art.
发明内容Summary of the Invention
本发明实施例的目的在于提供一种基于人工检票界面图像的检票方法及一种基于人工检票界面图像的检票装置,进而至少在一定程度上克服由于相关技术的限制和缺陷而导致的改造难度大、成本高以及旅客个人信息容易泄露等一个或者多个问题。The purpose of the embodiments of the present invention is to provide a ticket checking method based on an image of a manual ticket checking interface and a ticket checking device based on an image of a manual ticket checking interface, so as to overcome at least a certain degree of difficulty in reconstruction due to limitations and defects of related technologies , High cost, and easy leakage of passenger personal information.
本发明实施例的其他特性和优点将通过下面的详细描述变得显然,或部分地通过本发明的实践而习得。Other features and advantages of the embodiments of the present invention will become apparent from the following detailed description, or may be learned in part through the practice of the present invention.
根据本发明实施例的第一方面,提供一种基于人工检票界面图像的检票方法,包括:According to a first aspect of the embodiments of the present invention, a ticket checking method based on an image of a manual ticket checking interface is provided, including:
获取人工检票界面图像,其中,所述人工检票界面图像至少包括第一区域图像、第二区域图像和第三区域图像;Obtaining an image of a manual ticket checking interface, wherein the image of the manual ticket checking interface includes at least a first area image, a second area image, and a third area image;
对所述第一区域图像进行解析,获得模糊值,基于所述模糊值判断所述第一区域图像是否为车票图片;Analyze the first area image to obtain a blur value, and determine whether the first area image is a ticket picture based on the blur value;
对所述第二区域图像进行解析,确定出所述第二区域图像的主导颜色,基于所述主导颜色确定出票证状态;Analyze the second area image to determine a dominant color of the second area image, and determine a ticket status based on the dominant color;
当确定所述第一区域图像为车票图片并且所述票证状态为相符时,对所述述第三区域图像进行解析,获得证件图像;When it is determined that the first area image is a ticket picture and the ticket status is consistent, analyzing the third area image to obtain a certificate image;
将所述证件图像与摄像头所采集的人脸图像进行匹配,获得匹配结果,基于所述匹配结果进行检票。Match the credential image with the face image collected by the camera to obtain a matching result, and check the ticket based on the matching result.
根据本发明的一些实施例,基于前述方案,所述对所述第一区域图像进行解析,获得模糊值,基于所述模糊值判断所述第一区域图像是否为车票图片,包括:According to some embodiments of the present invention, based on the foregoing solution, the parsing the first area image to obtain a blur value, and determining whether the first area image is a ticket picture based on the blur value, including:
提取所述第一区域图像的R通道数据,并基于所述R通道数据获得所述第一区域图像的模糊值;Extracting R channel data of the first region image, and obtaining a blur value of the first region image based on the R channel data;
将所述第一区域图像的模糊值与预设的阈值对比;Comparing the blur value of the first region image with a preset threshold;
所述第一区域图像的模糊值大于等于预设的阈值,确定所述第一区域图像为票面图像;Determining that the blur value of the first area image is greater than or equal to a preset threshold, and determining that the first area image is a parity image;
所述第一区域图像的模糊值小于预设的阈值,则确定所述第一区域图像为空。If the blur value of the first area image is less than a preset threshold, it is determined that the first area image is empty.
根据本发明的一些实施例,基于前述方案,所述对所述第二区域图像进行解析,确定出所述第二区域图像的主导颜色,基于所述主导颜色确定出票证状态,包括According to some embodiments of the present invention, based on the foregoing solution, the parsing the second area image to determine a dominant color of the second area image, and determining a ticket status based on the dominant color, including:
将所述第二区域图像的RGB颜色空间转换为HSV颜色空间;其中,RGB颜色空间至少包括所述第二区域图像中红、绿、蓝颜色的叠加数据,所述HSV颜色空间中至少包括所述第二区域图像的色相数据、饱和度数据以及亮度数据;Transforming the RGB color space of the second region image into an HSV color space; wherein the RGB color space includes at least superimposed data of red, green, and blue colors in the second region image, and the HSV color space includes at least all The hue data, saturation data, and brightness data of the second area image are described;
对所述HSV颜色空间中的色相数据进行分析,确定出所述第二区域图像的主导颜色;Analyze the hue data in the HSV color space to determine the dominant color of the second region image;
基于所述第二区域图像的主导颜色,确定出票证验证结果。Based on the dominant color of the second region image, a ticket verification result is determined.
根据本发明的一些实施例,基于前述方案,所述基于所述第二区域图像的主导颜色,确定出票证验证结果,包括:According to some embodiments of the present invention, based on the foregoing solution, determining the ticket verification result based on the dominant color of the second region image includes:
判断所述第二区域图像的主导颜色是否为绿色;Determine whether the dominant color of the image in the second region is green;
如果所述第二区域图像的主导颜色是绿色,则确定所述票证验证结果为相符;If the dominant color of the second area image is green, determining that the ticket verification result is consistent;
如果所述第二区域图像的主导颜色不是绿色,则判断所述第二区域图像的主导颜色是否为红色;If the dominant color of the second region image is not green, determining whether the dominant color of the second region image is red;
如果所述第二区域图像的主导颜色是红色,则确定所述票证验证结果为无效;If the dominant color of the second area image is red, determining that the ticket verification result is invalid;
如果所述第二区域图像的主导颜色不是红色,则确定所述票证验证结果为待定。If the dominant color of the second area image is not red, it is determined that the ticket verification result is pending.
根据本发明的一些实施例,基于前述方案,所述确定所述票证验证结果为待定之后,所述方法还包括:According to some embodiments of the present invention, based on the foregoing scheme, after the determining that the ticket verification result is pending, the method further includes:
对票证验证结果为待定的第二区域图像进行二值化处理,获得文字的黑白图像;Binarize the second region image whose ticket verification result is pending to obtain a black and white image of the text;
将所述黑白图像进行水平投影和垂直投影,确定出所述第二区域图像的文字区域;Performing horizontal projection and vertical projection of the black and white image to determine a text area of the second area image;
对所述第二区域图像的文字区域中的文字进行识别,获得文本数据;Recognizing text in a text area of the second area image to obtain text data;
将所述文本数据与预设的正则表达式匹配,如匹配,则将所述第二区域图像的票证验证结果从待定转换为相符;如不匹配,则将所述第二区域图像的票证验证结果从待定转换为无效。Match the text data with a preset regular expression, and if they match, convert the ticket verification result of the second area image from pending to match; if they do not match, verify the ticket of the second area image The result is converted from pending to invalid.
根据本发明的一些实施例,基于前述方案,所述对所述第三区域图像进行解析,获得证件图像,包括:According to some embodiments of the present invention, based on the foregoing solution, the parsing the third region image to obtain a credential image includes:
通过预设的人脸检测算法,对所述第三区域图像进行检测,判断所述第三区域图像是否存在人像图像;Detecting the third region image through a preset face detection algorithm to determine whether a portrait image exists in the third region image;
当判断述第三区域图像存在人像图像时,对所述人像图像进行提取,获得证件图像。When it is determined that a portrait image exists in the third region image, the portrait image is extracted to obtain a credential image.
根据本发明的一些实施例,基于前述方案,所述将所述证件图像与摄像头所采集的人脸图像进行匹配,获得匹配结果,输出所述匹配结果,包括:According to some embodiments of the present invention, based on the foregoing solution, matching the credential image with a face image collected by a camera to obtain a matching result and outputting the matching result includes:
当所述证件图像与所述人脸图像相符合时确定检票成功,生成检票成功的匹配结果,将所述匹配结果向检票闸机发送,以控制所述检票闸机打开;Determining that the ticket checking is successful when the document image matches the face image, generating a successful matching result of the ticket checking, and sending the matching result to the ticket checking gate to control the ticket checking gate to open;
当所述证件图像与所述人脸图像不符合时确定检票成功,生成检票失败的匹配结果,并发出检票失败的提示信息。When the credential image does not match the face image, it is determined that the ticket checking is successful, a matching result of the ticket checking failure is generated, and a prompt message indicating that the ticket checking fails is issued.
根据本发明实施例的第二方面,提供一种基于人工检票界面图像的检票装置,包括:获取模块、第一解析模块、第二解析模块、第三解析模块、匹配模块;其中,According to a second aspect of the embodiments of the present invention, a ticket checking device based on an image of a manual ticket checking interface is provided, including: an acquisition module, a first analysis module, a second analysis module, a third analysis module, and a matching module;
获取模块,用于获取人工检票界面图像,其中,所述人工检票界面图像至少包括第一区域图像、第二区域图像和第三区域图像;An obtaining module, configured to obtain an image of a manual ticket checking interface, wherein the image of the manual ticket checking interface includes at least a first area image, a second area image, and a third area image;
第一解析模块,用于对所述第一区域图像进行解析,获得模糊值,基于所述模糊值判断所述第一区域图像是否为车票图片;A first analysis module, configured to analyze the first area image to obtain a blur value, and determine whether the first area image is a ticket picture based on the blur value;
第二解析模块,用于对所述第二区域图像进行解析,确定出所述第二区域图像的主导颜色,基于所述主导颜色确定出票证状态;A second analysis module, configured to analyze the second area image, determine a dominant color of the second area image, and determine a ticket status based on the dominant color;
第三解析模块,用于当确定所述第一区域图像为车票图片并且所述票证状态为相符时,对所述述第三区域图像进行解析,获得证件图像;A third analysis module, configured to: when it is determined that the first area image is a ticket picture and the ticket status is consistent, analyze the third area image to obtain a certificate image;
匹配模块,用于将所述证件图像与摄像头所采集的人脸图像进行匹配,获得匹配结果,基于所述匹配结果进行检票。A matching module is configured to match the document image with a face image collected by a camera to obtain a matching result, and perform a ticket check based on the matching result.
根据本发明的一些实施例,基于前述方案,所述第一解析模块具体用于:According to some embodiments of the present invention, based on the foregoing solution, the first parsing module is specifically configured to:
提取所述第一区域图像的R通道数据,并基于所述R通道数据获得所述第一区域图像的模糊值;Extracting R channel data of the first region image, and obtaining a blur value of the first region image based on the R channel data;
将所述第一区域图像的模糊值与预设的阈值对比;Comparing the blur value of the first region image with a preset threshold;
所述第一区域图像的模糊值大于等于预设的阈值,确定所述第一区域图像为票面图像;Determining that the blur value of the first area image is greater than or equal to a preset threshold, and determining that the first area image is a parity image;
所述第一区域图像的模糊值小于预设的阈值,则确定所述第一区域图像为空。If the blur value of the first area image is less than a preset threshold, it is determined that the first area image is empty.
根据本发明的一些实施例,基于前述方案,所述第二解析模块具体用于:According to some embodiments of the present invention, based on the foregoing solution, the second parsing module is specifically configured to:
将所述第二区域图像的RGB颜色空间转换为HSV颜色空间;其中,RGB颜色空间至少包括所述第二区域图像中红、绿、蓝颜色的叠加数据,所述HSV颜色空间中至少包括所述第二区域图像的色相数据、饱和度数据以及亮度数据;Transforming the RGB color space of the second region image into an HSV color space; wherein the RGB color space includes at least superimposed data of red, green, and blue colors in the second region image, and the HSV color space includes at least The hue data, saturation data, and brightness data of the second area image are described;
对所述HSV颜色空间中的色相数据进行分析,确定出所述第二区域图像的主导颜色;Analyze the hue data in the HSV color space to determine the dominant color of the second region image;
基于所述第二区域图像的主导颜色,确定出票证验证结果。Based on the dominant color of the second region image, a ticket verification result is determined.
根据本发明的一些实施例,基于前述方案,所述第二解析模块具体用于:According to some embodiments of the present invention, based on the foregoing solution, the second parsing module is specifically configured to:
判断所述第二区域图像的主导颜色是否为绿色;Determine whether the dominant color of the image in the second region is green;
如果所述第二区域图像的主导颜色是绿色,则确定所述票证验证结果为相符;If the dominant color of the second area image is green, determining that the ticket verification result is consistent;
如果上述第二区域图像的主导颜色不是绿色,则判断所述第二区域图像的主导颜色是否为红色;If the dominant color of the second region image is not green, determining whether the dominant color of the second region image is red;
如果所述第二区域图像的主导颜色是红色,则确定所述票证验证结果为无效;If the dominant color of the second area image is red, determining that the ticket verification result is invalid;
如果所述第二区域图像的主导颜色不是红色,则确定所述票证验证结果为待定。If the dominant color of the second area image is not red, it is determined that the ticket verification result is pending.
根据本发明的一些实施例,基于前述方案,所述第二解析模块具体用于:According to some embodiments of the present invention, based on the foregoing solution, the second parsing module is specifically configured to:
对票证验证结果为待定的第二区域图像进行二值化处理,获得文字的黑白图像;Binarize the second region image whose ticket verification result is pending to obtain a black and white image of the text;
将所述黑白图像进行水平投影和垂直投影,确定出所述第二区域图像的文字区域;Performing horizontal projection and vertical projection of the black and white image to determine a text area of the second area image;
对所述第二区域图像的文字区域中的文字进行识别,获得文本数据;Recognizing text in a text area of the second area image to obtain text data;
将所述文本数据与预设的正则表达式匹配,如匹配,则将所述第二区域图像的票证验证结果从待定转换为相符;如不匹配,则将所述第二区域图像的票证验证结果从待定转换为无效。Match the text data with a preset regular expression, and if they match, convert the ticket verification result of the second area image from pending to match; if they do not match, verify the ticket of the second area image The result is converted from pending to invalid.
根据本发明的一些实施例,基于前述方案,所述第三解析模块具体用于:According to some embodiments of the present invention, based on the foregoing solution, the third parsing module is specifically configured to:
通过预设的人脸检测算法,对所述第三区域图像进行检测,判断所述第三区域图像是否存在人像图像;Detecting the third region image through a preset face detection algorithm to determine whether a portrait image exists in the third region image;
当判断述第三区域图像存在人像图像时,对所述人像图像进行提取,获得证件图像。When it is determined that a portrait image exists in the third region image, the portrait image is extracted to obtain a credential image.
根据本发明的一些实施例,基于前述方案,所述匹配模块具体用于:According to some embodiments of the present invention, based on the foregoing solution, the matching module is specifically configured to:
当所述证件图像与所述人脸图像相符合时确定检票成功,生成检票成功的匹配结果,将所述匹配结果向检票闸机发送,以控制所述检票闸机打开;Determining that the ticket checking is successful when the document image matches the face image, generating a successful matching result of the ticket checking, and sending the matching result to the ticket checking gate to control the ticket checking gate to open;
当所述证件图像与所述人脸图像不符合时确定检票成功,生成检票失败的匹配结果,并发出检票失败的提示信息。When the credential image does not match the face image, it is determined that the ticket checking is successful, a matching result of the ticket checking failure is generated, and a prompt message indicating that the ticket checking fails is issued.
根据本发明实施例的第三方面,提供了一种计算机可读介质,其上存储有计算机程序,所述程序被处理器执行时实现如上述实施例中第一方面所述的基于人工检票界面图像的检票方法。According to a third aspect of the embodiments of the present invention, there is provided a computer-readable medium having stored thereon a computer program that, when executed by a processor, implements a manual ticket-based interface as described in the first aspect of the above embodiment. Image checking method.
根据本发明实施例的第四方面,提供了一种电子设备,包括:一个或多个处理器;存储装置,用于存储一个或多个程序,当所述一个或多个程序被所述一个或多个处理器执行时,使得所述一个或多个处理器实现如上述实施例中第一方面所述的基于人工检票界面图像的检票方法。According to a fourth aspect of the embodiments of the present invention, there is provided an electronic device including: one or more processors; a storage device for storing one or more programs, and when the one or more programs are used by the one When being executed by one or more processors, the one or more processors are caused to implement the ticket checking method based on the manual ticket checking interface image as described in the first aspect of the foregoing embodiment.
本发明实施例提供的技术方案可以包括以下有益效果:The technical solution provided by the embodiment of the present invention may include the following beneficial effects:
本发明的一些实施例所提供的技术方案中,通过获取人工检票界面图像,其中,所述人工检票界面图像至少包括第一区域图像、第二区域图像和第三区域图像;对所述第一区域图像进行解析,获得模糊值,基于所述模糊值判断所述第一区域图像是否为车票图片;对所述第二区域图像进行解析,确定出所述第二区域图像的主导颜色,基于所述主导颜色确定出票证状态;当确定所述第一区域图像为车票图片并且所述票证状态为相符时,对所述述第三区域图像进行解析,获得证件图像;将所述证件图像与摄像头所采集的人脸图像进行匹配,获得匹配结果,基于所述匹配结果进行检票,如此,可以以低成本、无侵入的方式将传统人工检票系统改造为旅客可以自助刷脸进站的设备,同时,本发明实施例所提供装置中各模块耦 合度低,闸机可复用,应用可迁移,为后期电子车票的推行提供了一种过渡方案,极大减少资源的浪费。In the technical solution provided by some embodiments of the present invention, an image of a manual ticket checking interface is obtained, wherein the image of the manual ticket checking interface includes at least a first area image, a second area image, and a third area image; The area image is analyzed to obtain a blur value, and whether the first area image is a ticket picture is determined based on the blur value; the second area image is analyzed to determine the dominant color of the second area image. The dominant color determines the ticket status; when it is determined that the first area image is a ticket picture and the ticket status is consistent, the third area image is analyzed to obtain a credential image; the credential image and a camera The collected face images are matched to obtain a matching result, and the ticket is checked based on the matching result. In this way, the traditional manual ticket checking system can be transformed into a device where passengers can brush their faces and enter the station in a low-cost and non-invasive manner. The coupling degree of each module in the device provided by the embodiment of the present invention is low, the gate can be reused, and the application can be migrated. , Provides a transitional solution for the implementation of later electronic tickets, greatly reducing the waste of resources.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本发明。It should be understood that the above general description and the following detailed description are merely exemplary and explanatory, and should not limit the present invention.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本发明的实施例,并与说明书一起用于解释本发明的原理。显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。在附图中:The drawings herein are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present invention, and together with the description serve to explain the principles of the present invention. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts. In the drawings:
图1示意性示出了根据本发明的一个实施例的基于人工检票界面图像的检票方法的流程图;FIG. 1 schematically illustrates a flowchart of a ticket checking method based on a manual ticket checking interface image according to an embodiment of the present invention;
图2示意性示出了根据本发明的一个实施例的人工检票界面图像的示意图;FIG. 2 schematically illustrates an image of a manual ticket checking interface according to an embodiment of the present invention; FIG.
图3A示意性示出了根据本发明的一个实施例的第一区域图像为车票信息的示意图;FIG. 3A schematically illustrates that the first area image is ticket information according to an embodiment of the present invention; FIG.
图3B示意性示出了根据本发明的一个实施例的第一区域图像无车票信息的示意图;3B schematically illustrates a first region image without ticket information according to an embodiment of the present invention;
图4为本发明的一个实施例判断第一区域是否为车票图像的流程示意图;4 is a schematic flowchart of determining whether a first area is a ticket image according to an embodiment of the present invention;
图5示意性示出了根据本发明的一个实施例的允许通行状态中第二区域图像的显示内容的示意图;FIG. 5 schematically illustrates a display content of a second region image in a traffic permission state according to an embodiment of the present invention; FIG.
图6示意性示出了根据本发明的一个实施例的不允许通行状态中第二区域图像的显示内容的示意图;FIG. 6 schematically illustrates a display content of a second region image in a non-traffic state according to an embodiment of the present invention; FIG.
图7示意性示出了根据本发明的一个实施例的判断第二图像区域颜色的流程图;FIG. 7 schematically illustrates a flowchart of determining a color of a second image region according to an embodiment of the present invention; FIG.
图8示意性示出了根据本发明的一个实施例的基于人工检票界面图像的检票装置的框图;8 schematically illustrates a block diagram of a ticket checking device based on an image of a manual ticket checking interface according to an embodiment of the present invention;
图9示出了适于用来实现本发明实施例的电子设备的计算机系统的结构示意图。FIG. 9 is a schematic structural diagram of a computer system suitable for implementing an electronic device according to an embodiment of the present invention.
具体实施方式detailed description
现在将参考附图更全面地描述示例实施方式。然而,示例实施方式能够以多种形式实施,且不应被理解为限于在此阐述的范例;相反,提供这些实施方式使得本发明将更加全面和完整,并将示例实施方式的构思全面地传达给本领域的技术人员。Example embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments can be implemented in various forms and should not be construed as limited to the examples set forth herein; rather, providing these embodiments makes the present invention more comprehensive and complete, and conveys the concepts of the exemplary embodiments comprehensively. To those skilled in the art.
此外,所描述的特征、结构或特性可以以任何合适的方式结合在一个或更多实施例中。在下面的描述中,提供许多具体细节从而给出对本发明的实施例的充分理解。然而,本领域技术人员将意识到,可以实践本发明的技术方案而没有特定细节中的一个或更多,或者可以采用其它的方法、组元、装置、步骤等。在其它情况下,不详细示出或描述公知方法、装置、实现或者操作以避免模糊本发明的各方面。Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a full understanding of the embodiments of the present invention. However, those skilled in the art will realize that the technical solutions of the present invention may be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other instances, well-known methods, devices, implementations or operations have not been shown or described in detail to avoid obscuring aspects of the present invention.
附图中所示的方框图仅仅是功能实体,不一定必须与物理上独立的实体相对应。即,可以采用软件形式来实现这些功能实体,或在一个或多个硬件模块或集成电路中实现这些功能实体,或在不同网络和/或处理器装置和/或微控制器装置中实现这些功能实体。The block diagrams shown in the drawings are merely functional entities and do not necessarily correspond to physically separate entities. That is, these functional entities may be implemented in the form of software, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices. entity.
附图中所示的流程图仅是示例性说明,不是必须包括所有的内容和操作/步骤,也不是必须按所描述的顺序执行。例如,有的操作/步骤还可以分解,而有的操作/步骤可以合并或部分合并,因此实际执行的顺序有可能根据实际情况改变。The flowchart shown in the accompanying drawings is only an exemplary description, and it is not necessary to include all content and operations / steps, nor does it have to be performed in the order described. For example, some operations / steps can also be decomposed, and some operations / steps can be merged or partially merged. Therefore, the actual execution order may be changed according to the actual situation.
图1示意性示出了根据本发明的一个实施例的基于人工检票界面图像的检票方法的流程图。FIG. 1 schematically illustrates a flowchart of a ticket checking method based on an image of a manual ticket checking interface according to an embodiment of the present invention.
参照图1所示,根据本发明的一个实施例的基于人工检票界面图像的检票方法,包括以下步骤:Referring to FIG. 1, a ticket checking method based on a manual ticket checking interface image according to an embodiment of the present invention includes the following steps:
步骤S110,获取人工检票界面图像;Step S110, obtaining an image of the manual ticket checking interface;
步骤S120,对第一区域图像进行解析,获得模糊值,基于模糊值判断第一区域图像是否为车票图片;Step S120: Analyze the first area image to obtain a blur value, and determine whether the first area image is a ticket picture based on the blur value;
步骤S130,对第二区域图像进行解析,确定出第二区域图像的主导颜色,基于主导颜色确定出票证状态;Step S130: Analyze the second area image to determine the dominant color of the second area image, and determine the ticket status based on the dominant color;
步骤S140,当确定第一区域图像为车票图片并且票证状态为相符时,对第三区域图像进行解析,获得证件图像;Step S140: When it is determined that the first area image is a ticket picture and the ticket status is consistent, analyze the third area image to obtain a credential image;
步骤S150,将证件图像与摄像头所采集的人脸图像进行匹配,获得匹配结果,基于匹配结果进行检票。Step S150: Match the document image with the face image collected by the camera to obtain a matching result, and perform a ticket check based on the matching result.
图1所示实施例的技术方案能够通过对现有人工检票界面图像进行分析,以低成本、无侵入的方式将传统人工检票系统改造为旅客可以自助刷脸进站的设备,同时,本发明实施例所提供装置中各模块耦合度低,闸机可复用,应用可迁移,为后期电子车票的推行提供了一种过渡方案,极大减少资源的浪费。The technical solution of the embodiment shown in FIG. 1 can transform the traditional manual ticket checking system into a device that passengers can brush their faces and enter the station in a low cost and non-invasive manner by analyzing the images of the existing manual ticket checking interface. The devices provided in the embodiments have a low coupling degree, reusable gates, and application migration, which provides a transition solution for the implementation of later electronic tickets, which greatly reduces the waste of resources.
以下对图1中所示的各个步骤的实现细节进行详细阐述:The implementation details of each step shown in FIG. 1 are described in detail below:
在步骤S110中,获取人工检票界面图像。In step S110, an image of a manual ticket checking interface is acquired.
在本发明的一个实施例中,如图2所示,人工检票界面图像至少包括有三个区域:第一区域图像201、第二区域图像202以及第三区域图像203,其中,上述第一区域图像201可以是旅客的车票图像,该车票图像可以通过检票闸机上设置的车票采集设备获取,例如:扫描仪、扫码设备、摄像头等;上述第二区域图像202可以是人工检票系统的票证验证结果,该区域图像内呈现有文字和背景颜色,其中,文字所表示的是票证验证结果,背景颜色呈现有绿色、红色、黄色或橙色,通常情况下,背景颜色与文字存在一定的对应关系;上述第三区域图像203可以是旅客的证件信息,包括:姓名、证件号、证件图像等信息。In an embodiment of the present invention, as shown in FIG. 2, the image of the manual ticket checking interface includes at least three regions: a first region image 201, a second region image 202, and a third region image 203, wherein the first region image 201 may be a passenger ticket image, and the ticket image may be obtained through a ticket collection device provided on a ticket gate, such as a scanner, a code scanning device, a camera, and the like; the second area image 202 may be a ticket verification result of a manual ticket checking system The text and background color are displayed in the image of the area. The text indicates the ticket verification result. The background color is green, red, yellow, or orange. Generally, there is a certain correspondence between the background color and the text. The third area image 203 may be the passenger's ID information, including: name, ID number, ID image and other information.
在本发明的一个实施例中,通过对上述第一区域图像、第二区域图像以及第三区域图像进行图像解析,从现有人工检票系统的界面中提取关键信息,该信息将作为判断旅客通行状态的依据。In one embodiment of the present invention, by performing image analysis on the first area image, the second area image, and the third area image, key information is extracted from the interface of the existing manual ticket checking system, and this information will be used to determine the passage of passengers. Basis of status.
在步骤S120中,对第一区域图像进行解析,获得模糊值,基于模糊值判断第一区域图像是否为车票图片。In step S120, the first area image is analyzed to obtain a blur value, and whether the first area image is a ticket picture is determined based on the blur value.
在本发明的一个实施例中,基于前述方案,在本发明的一个实施例中,基于前述方案,第一区域图像主要有两种状态,如图3A所示的有车票信息,以及如图3B所示的无车票 信息,因此,需要判断旅客是否已将车票放置在检票闸机的车票采集设备上,以提醒旅客在检票时出示车票,获取车票信息。In an embodiment of the present invention, based on the foregoing scheme, in an embodiment of the present invention, based on the foregoing scheme, the first region image mainly has two states, as shown in FIG. 3A with ticket information, and as shown in FIG. 3B No ticket information is shown. Therefore, it is necessary to determine whether the passenger has placed the ticket on the ticket collection device of the ticket gate to remind the passenger to present the ticket and obtain the ticket information during the check.
图4为本发明的一个实施例判断第一区域是否为车票图像的流程示意图,如图4所示,包括以下步骤:FIG. 4 is a schematic flowchart of determining whether the first area is a ticket image according to an embodiment of the present invention. As shown in FIG. 4, the method includes the following steps:
步骤S410,提取第一区域图像的R通道数据,并基于R通道数据获得第一区域图像的模糊值;Step S410, extracting R-channel data of the first region image, and obtaining a blur value of the first-region image based on the R-channel data;
在本发明的一个实施例中,模糊值的计算可以采用图像的拉普拉斯算子进行计算,公式如下:In one embodiment of the present invention, the calculation of the blur value may be performed by using a Laplacian of the image, and the formula is as follows:
Figure PCTCN2019091898-appb-000001
Figure PCTCN2019091898-appb-000001
其中,x与y表示二维平面X-Y上的笛卡尔坐标。Among them, x and y represent Cartesian coordinates on the two-dimensional plane X-Y.
步骤S420,将第一区域图像的模糊值与预设的阈值对比;Step S420, comparing the blur value of the first region image with a preset threshold;
步骤S430,第一区域图像的模糊值大于等于预设的阈值,确定第一区域图像为票面图像;Step S430: The blur value of the first area image is greater than or equal to a preset threshold, and it is determined that the first area image is a parity image;
步骤S440,第一区域图像的模糊值小于预设的阈值,则确定第一区域图像为空。In step S440, if the blur value of the first region image is less than a preset threshold, it is determined that the first region image is empty.
在步骤S130中,对第二区域图像进行解析,确定出第二区域图像的主导颜色,基于主导颜色确定出票证状态。In step S130, the second area image is analyzed to determine the dominant color of the second area image, and the ticket status is determined based on the dominant color.
在本发明的一个实施例中,第二区域图像为人工票证验证结果,其验证结果包括:允许通行和不允许通行两种状态,其中,如图5所示,允许通行状态中第二区域图像的显示内容可以包括:(1)“票证一致通过”的文字内容以及绿色的背景颜色501;(2)“该车票已检票”的文字内容以及橙色的背景颜色502;(3)“前方站上车”的文字内容以及黄色的背景颜色503;如图6所示,上述不允许通行状态中第二区域图像的显示内容可以包括:(1)“票证不符”的文字内容以及红色的背景颜色601;(2)“车票过期”的文字内容以及红色的背景颜色602;(3)“未到检票时间”的文字内容以及黄色的背景颜色603;(4)“该车不经过本站”的文字内容以及黄色的背景颜色604;(5)“需要核查身份证”的文字内容以及黄色的背景颜色605。In an embodiment of the present invention, the second area image is a manual ticket verification result, and the verification result includes two states of allowed traffic and not allowed traffic, wherein, as shown in FIG. 5, the second area image in the allowed traffic state The display content can include: (1) the text of "the ticket is unanimously approved" and a green background color 501; (2) the text of "the ticket has been checked" and the orange background color 502; (3) "on the station in front "Car" text content and yellow background color 503; as shown in Figure 6, the display content of the second area image in the above-mentioned disallowed traffic state may include: (1) the text content of "the ticket does not match" and the red background color 601 ; (2) the text of "Ticket Expired" and the red background color 602; (3) the text of "No Ticket Time" and the yellow background color 603; (4) The text of "The car does not pass this station" Content and a yellow background color 604; (5) the text content of "Need to verify ID card" and a yellow background color 605.
在本发明的一个实施例中,基于前述方案,需要对第二区域图像进行解析,以确定票证验证结果,具体的,将第二区域图像的RGB颜色空间转换为HSV颜色空间;其中,RGB颜色空间至少包括第二区域图像中红、绿、蓝颜色的叠加数据,HSV颜色空间中至少包括第二区域图像的色相数据、饱和度数据以及亮度数据;对HSV颜色空间中的色相数据进行分析,确定出第二区域图像的主导颜色;基于第二区域图像的主导颜色,确定出票证验证结果。In an embodiment of the present invention, based on the foregoing solution, the second region image needs to be parsed to determine the ticket verification result. Specifically, the RGB color space of the second region image is converted to the HSV color space; wherein, the RGB color The space includes at least the superimposed data of red, green, and blue colors in the second region image. The HSV color space includes at least the hue data, saturation data, and brightness data of the second region image. The hue data in the HSV color space is analyzed. The dominant color of the image of the second region is determined; based on the dominant color of the image of the second region, a ticket verification result is determined.
在本发明的一个实施例中,基于前述方案,颜色判断是通过统计第二区域图像的HSV颜色空间中H分量的像素区间分布,将图片从RGB空间转换到HSV颜色空间,H参数表示色彩信息,即所处的光谱颜色的位置,该参数用一角度量来表示,红、绿、蓝分别相隔 120度,对图片中每个像素HSV空间中H分量的区间进行分析,找到对应的颜色,并统计得出该图片的主导色,即为我们所要的票证验证结果颜色。In an embodiment of the present invention, based on the foregoing scheme, the color judgment is to convert the picture from the RGB space to the HSV color space by counting the pixel interval distribution of the H component in the HSV color space of the second region image. The H parameter represents color information. , That is, the position of the spectral color. This parameter is expressed by an angle. Red, green, and blue are separated by 120 degrees. The interval of the H component in the HSV space of each pixel in the picture is analyzed to find the corresponding color. And the statistical dominant color of the picture is the color of the ticket verification result we want.
在本发明的一个实施例中,基于前述方案,判断第二区域图像的主导颜色是否为绿色;如果第二区域图像的主导颜色是绿色,则确定票证验证结果为相符;如果上述第二区域图像的主导颜色不是绿色,则判断第二区域图像的主导颜色是否为红色;如果第二区域图像的主导颜色是红色,则确定票证验证结果为无效;如果第二区域图像的主导颜色不是红色,则确定票证验证结果为待定,以确定出票证验证结果,如图7所示,判断过程包括以下步骤:In an embodiment of the present invention, based on the foregoing scheme, it is determined whether the dominant color of the second region image is green; if the dominant color of the second region image is green, it is determined that the ticket verification result is consistent; if the second region image is If the dominant color of is not green, determine whether the dominant color of the second region image is red; if the dominant color of the second region image is red, determine that the ticket verification result is invalid; if the dominant color of the second region image is not red, then The ticket verification result is determined to be pending to determine the ticket verification result. As shown in FIG. 7, the judgment process includes the following steps:
步骤S701,判断第二区域图像的颜色区间;Step S701, determining a color interval of the second region image;
步骤S702,判断是否为绿色;如果是,则确定票证一致的结果S703;如果不是,执行步骤S704;Step S702, it is judged whether it is green; if it is, then the result of matching the tickets is determined S703; if not, step S704 is performed;
步骤S704,判断是否为红色;如果是,则确定车票无效的结果S705;如果不是,执行步骤S706Step S704, determine whether it is red; if yes, determine the result of the ticket being invalid S705; if not, perform step S706
步骤S706,确定第二区域图像的颜色为黄色或橙色,并对第二区域图像进行文字识别及正则匹配;如匹配,确定出票证一致的结果S707;如不匹配,则确定出票证验证结果为待定S708,提示旅客走人工检票通道。In step S706, it is determined that the color of the second region image is yellow or orange, and text recognition and regular matching are performed on the second region image. If there is a match, a consistent result of the ticket is determined S707; if it does not match, the ticket verification result is determined as To be determined S708, passengers are reminded to go through the manual ticket gate.
在本发明的一个实施例中,步骤S706中,对票证验证结果为待定的第二区域图像进行二值化处理,获得文字的黑白图像;将黑白图像进行水平投影和垂直投影,确定出第二区域图像的文字区域;对第二区域图像的文字区域中的文字进行识别,这里可以使用卷积循环神经网络,基于海量生成数据集(生成图片及文字标签)进行训练,得到一个较好的参数模型。使用训练好的卷积循环神经网络对图片进行文字识别,获得文本数据;将文本数据与预设的正则表达式匹配,如匹配,则将第二区域图像的票证验证结果从待定转换为相符,允许通过检票闸机;如不匹配,则将第二区域图像的票证验证结果从待定转换为无效,不允许通过检票闸机,并提示走人工检票通道。In one embodiment of the present invention, in step S706, the second area image whose ticket verification result is pending is subjected to binarization processing to obtain a black and white image of the text; the black and white image is horizontally and vertically projected to determine the second The text area of the area image; identify the text in the text area of the second area image. Here, you can use a convolutional recurrent neural network to train based on the massively generated data set (generate pictures and text labels) to get a better parameter. model. Use the trained convolutional recurrent neural network to perform text recognition on the picture to obtain text data; match the text data with a preset regular expression, and if it matches, convert the ticket verification result of the second region image from pending to match, Pass the ticket gate; if it does not match, the ticket verification result of the second area image will be converted from pending to invalid, and the ticket gate will not be allowed to pass, and a manual ticket gate will be prompted.
在步骤S140中,当确定第一区域图像为车票图片并且票证状态为相符时,对第三区域图像进行解析,获得证件图像。In step S140, when it is determined that the first area image is a ticket picture and the ticket status is consistent, the third area image is analyzed to obtain a credential image.
在本发明的一个实施例中,通过对身份证区域使用Dlib人脸识别算法对图片进行人脸检测,看是否存在证件照,以此来判断用户是否放置证件。In one embodiment of the present invention, a face detection is performed on a picture by using a Dlib face recognition algorithm on an ID card area to see if a photo of the document exists, so as to determine whether the user places a document.
在步骤S150中,将证件图像与摄像头所采集的人脸图像进行匹配,获得匹配结果,基于匹配结果进行检票。In step S150, the document image is matched with the face image collected by the camera to obtain a matching result, and a ticket is checked based on the matching result.
在本发明的一个实施例中,在步骤S150中获取旅客证件图像的人脸图像,通过摄像头获取旅客人脸与证件照人脸进行比对,人脸比对通过则控制闸机打开。如此,只需增加闸机模块与我们的图像解析及人脸识别应用,即可对传统的人工检票系统进行无侵入式改造,将其赋能为自助刷脸进站设备。In one embodiment of the present invention, a face image of the passenger document image is obtained in step S150, and the passenger's face is obtained through a camera to be compared with the photo of the passenger's face, and the gate is opened when the face comparison is passed. In this way, by simply adding a gate module and our image analysis and face recognition application, the traditional manual ticket checking system can be retrofitted non-invasively, and it can be empowered as a self-service face brushing station.
需要说明的是,上述内容,仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围。It should be noted that the foregoing is only a preferred embodiment of the present invention, and is not intended to limit the protection scope of the present invention.
以下介绍本发明的装置实施例,可以用于执行本发明上述的屏幕控制实现方法以及展示方法。The following describes the device embodiments of the present invention, which can be used to perform the above-mentioned screen control implementation method and display method of the present invention.
图8示意性示出了根据本发明的一个实施例的基于人工检票界面图像的检票装置的框图。FIG. 8 schematically illustrates a block diagram of a ticket checking device based on an image of a manual ticket checking interface according to an embodiment of the present invention.
参照图8所示,根据本发明的一个实施例的基于人工检票界面图像的检票装置800,包括:获取模块801、第一解析模块802、第二解析模块803、第三解析模块804、匹配模块805。Referring to FIG. 8, a ticket checking device 800 based on an image of a manual ticket checking interface according to an embodiment of the present invention includes: an acquisition module 801, a first analysis module 802, a second analysis module 803, a third analysis module 804, and a matching module. 805.
获取模块801,用于获取人工检票界面图像,其中,人工检票界面图像至少包括第一区域图像、第二区域图像和第三区域图像;An obtaining module 801 is configured to obtain an image of a manual ticket checking interface, where the image of the manual ticket checking interface includes at least a first area image, a second area image, and a third area image;
第一解析模块802,用于对第一区域图像进行解析,获得模糊值,基于模糊值判断第一区域图像是否为车票图片;A first analysis module 802, configured to analyze the first area image to obtain a blur value, and determine whether the first area image is a ticket picture based on the blur value;
第二解析模块803,用于对第二区域图像进行解析,确定出第二区域图像的主导颜色,基于主导颜色确定出票证状态;A second analysis module 803, configured to analyze the second area image, determine a dominant color of the second area image, and determine a ticket status based on the dominant color;
第三解析模块804,用于当确定第一区域图像为车票图片并且票证状态为相符时,对第三区域图像进行解析,获得证件图像;A third analysis module 804, configured to: when it is determined that the first area image is a ticket picture and the ticket status is consistent, analyze the third area image to obtain a credential image;
匹配模块805,用于将证件图像与摄像头所采集的人脸图像进行匹配,获得匹配结果,基于匹配结果进行检票。The matching module 805 is configured to match the document image with the face image collected by the camera to obtain a matching result, and perform ticket checking based on the matching result.
根据本发明的一些实施例,基于前述方案,第一解析模块802具体用于:According to some embodiments of the present invention, based on the foregoing solution, the first parsing module 802 is specifically configured to:
提取第一区域图像的R通道数据,并基于R通道数据获得第一区域图像的模糊值;Extracting R-channel data of the first region image, and obtaining a blur value of the first region image based on the R-channel data;
将第一区域图像的模糊值与预设的阈值对比;Comparing the blur value of the first region image with a preset threshold;
第一区域图像的模糊值大于等于预设的阈值,确定第一区域图像为票面图像;The blur value of the first area image is greater than or equal to a preset threshold, and it is determined that the first area image is a parity image;
第一区域图像的模糊值小于预设的阈值,则确定第一区域图像为空。If the blur value of the first area image is less than a preset threshold, it is determined that the first area image is empty.
根据本发明的一些实施例,基于前述方案,第二解析模块803具体用于:According to some embodiments of the present invention, based on the foregoing solution, the second parsing module 803 is specifically configured to:
将第二区域图像的RGB颜色空间转换为HSV颜色空间;其中,RGB颜色空间至少包括第二区域图像中红、绿、蓝颜色的叠加数据,HSV颜色空间中至少包括第二区域图像的色相数据、饱和度数据以及亮度数据;Converting the RGB color space of the second region image into the HSV color space; wherein the RGB color space includes at least the superimposed data of the red, green, and blue colors in the second region image, and the HSV color space includes at least the hue data of the second region image , Saturation data and brightness data;
对HSV颜色空间中的色相数据进行分析,确定出第二区域图像的主导颜色;Analyze the hue data in the HSV color space to determine the dominant color of the second region image;
基于第二区域图像的主导颜色,确定出票证验证结果。Based on the dominant color of the second region image, a ticket verification result is determined.
根据本发明的一些实施例,基于前述方案,第二解析模块803具体用于:According to some embodiments of the present invention, based on the foregoing solution, the second parsing module 803 is specifically configured to:
判断第二区域图像的主导颜色是否为绿色;Determine whether the dominant color of the image in the second region is green;
如果第二区域图像的主导颜色是绿色,则确定票证验证结果为相符;If the dominant color of the image in the second area is green, it is determined that the ticket verification result is consistent;
如果上述第二区域图像的主导颜色不是绿色,则判断第二区域图像的主导颜色是否为红色;If the dominant color of the second region image is not green, determine whether the dominant color of the second region image is red;
如果第二区域图像的主导颜色是红色,则确定票证验证结果为无效;If the dominant color of the second region image is red, it is determined that the ticket verification result is invalid;
如果第二区域图像的主导颜色不是红色,则确定票证验证结果为待定。If the dominant color of the second region image is not red, it is determined that the ticket verification result is pending.
根据本发明的一些实施例,基于前述方案,第二解析模块803具体用于:According to some embodiments of the present invention, based on the foregoing solution, the second parsing module 803 is specifically configured to:
对票证验证结果为待定的第二区域图像进行二值化处理,获得文字的黑白图像;Binarize the second region image whose ticket verification result is pending to obtain a black and white image of the text;
将黑白图像进行水平投影和垂直投影,确定出第二区域图像的文字区域;Project the black and white image horizontally and vertically to determine the text area of the second area image;
对第二区域图像的文字区域中的文字进行识别,获得文本数据;Identify the text in the text area of the second area image to obtain text data;
将文本数据与预设的正则表达式匹配,如匹配,则将第二区域图像的票证验证结果从待定转换为相符;如不匹配,则将第二区域图像的票证验证结果从待定转换为无效。Match the text data with a preset regular expression. If it matches, the ticket verification result of the second area image is converted from pending to match; if it does not match, the ticket verification result of the second area image is converted from pending to invalid. .
根据本发明的一些实施例,基于前述方案,第三解析模块804具体用于:According to some embodiments of the present invention, based on the foregoing solution, the third parsing module 804 is specifically configured to:
通过预设的人脸检测算法,对第三区域图像进行检测,判断第三区域图像是否存在人像图像;Detecting a third region image through a preset face detection algorithm to determine whether a portrait image exists in the third region image;
当判断述第三区域图像存在人像图像时,对人像图像进行提取,获得证件图像。When it is determined that a portrait image exists in the third region image, the portrait image is extracted to obtain a credential image.
根据本发明的一些实施例,基于前述方案,匹配模块805具体用于:According to some embodiments of the present invention, based on the foregoing scheme, the matching module 805 is specifically configured to:
当证件图像与人脸图像相符合时确定检票成功,生成检票成功的匹配结果,将匹配结果向检票闸机发送,以控制检票闸机打开;When the document image matches the face image, it is determined that the ticket checking is successful, and a matching result of successful ticket checking is generated, and the matching result is sent to the ticket checking gate to control the opening of the ticket checking gate;
当证件图像与人脸图像不符合时确定检票成功,生成检票失败的匹配结果,并发出检票失败的提示信息。When the document image and the face image do not match, the ticket checking is determined to be successful, a matching result of the ticket checking failure is generated, and a prompt message indicating that the ticket checking fails is issued.
由于本发明的示例实施例的基于人工检票界面图像的检票装置的各个功能模块与上述基于人工检票界面图像的检票方法的示例实施例的步骤对应,因此对于本发明装置实施例中未披露的细节,请参照本发明上述的基于人工检票界面图像的检票方法的实施例。Since each functional module of the ticket checking device based on the manual ticket checking interface image of the exemplary embodiment of the present invention corresponds to the steps of the above-mentioned example embodiment of the ticket checking method based on the manual ticket checking interface image, details that are not disclosed in the device embodiments of the present invention Please refer to the foregoing embodiment of the ticket checking method based on the manual ticket checking interface image of the present invention.
下面参考图9,其示出了适于用来实现本发明实施例的电子设备的计算机系统900的结构示意图。图9示出的电子设备的计算机系统900仅是一个示例,不应对本发明实施例的功能和使用范围带来任何限制。Reference is now made to FIG. 9, which is a schematic structural diagram of a computer system 900 suitable for implementing an electronic device according to an embodiment of the present invention. The computer system 900 of the electronic device shown in FIG. 9 is only an example, and should not impose any limitation on the function and scope of use of the embodiment of the present invention.
如图9所示,计算机系统900包括中央处理单元(CPU)901,其可以根据存储在只读存储器(ROM)902中的程序或者从存储部分1208加载到随机访问存储器(RAM)903中的程序而执行各种适当的动作和处理。在RAM 903中,还存储有系统操作所需的各种程序和数据。CPU 901、ROM 902以及RAM 903通过总线904彼此相连。输入/输出(I/O)接口905也连接至总线904。As shown in FIG. 9, the computer system 900 includes a central processing unit (CPU) 901 which can be loaded into a random access memory (RAM) 903 according to a program stored in a read-only memory (ROM) 902 or from a storage portion 1208 Instead, perform various appropriate actions and processes. In the RAM 903, various programs and data required for system operation are also stored. The CPU 901, the ROM 902, and the RAM 903 are connected to each other through a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
以下部件连接至I/O接口905:包括键盘、鼠标等的输入部分1206;包括诸如阴极射线管(CRT)、液晶显示器(LCD)等以及扬声器等的输出部分907;包括硬盘等的存储部分908;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分909。通信部分909经由诸如因特网的网络执行通信处理。驱动器910也根据需要连接至I/O接口905。可拆卸介质99,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器910上,以便于从其上读出的计算机程序根据需要被安装入存储部分908。The following components are connected to the I / O interface 905: an input portion 1206 including a keyboard, a mouse, and the like; an output portion 907 including a cathode ray tube (CRT), a liquid crystal display (LCD), and the speaker; a storage portion 908 including a hard disk and the like ; And a communication section 909 including a network interface card such as a LAN card, a modem, and the like. The communication section 909 performs communication processing via a network such as the Internet. The driver 910 is also connected to the I / O interface 905 as necessary. A removable medium 99, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 910 as needed, so that a computer program read therefrom is installed into the storage section 908 as needed.
特别地,根据本发明的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本发明的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信部分909从网络上被下载和安装,和/或从可拆卸介质911被安装。在该计算机程序被中央处理单元(CPU)901执行时,执行本申请的系统中 限定的上述功能。In particular, according to an embodiment of the present invention, the process described above with reference to the flowchart may be implemented as a computer software program. For example, embodiments of the present invention include a computer program product including a computer program carried on a computer-readable medium, the computer program containing program code for performing the method shown in the flowchart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication portion 909, and / or installed from a removable medium 911. When this computer program is executed by a central processing unit (CPU) 901, the above-mentioned functions defined in the system of the present application are executed.
需要说明的是,本发明所示的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本发明中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本发明中,计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:无线、电线、光缆、RF等等,或者上述的任意合适的组合。It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the foregoing. The computer-readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable Programming read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the foregoing. In the present invention, the computer-readable storage medium may be any tangible medium containing or storing a program, and the program may be used by or in combination with an instruction execution system, apparatus, or device. In the present invention, the computer-readable signal medium may include a data signal propagated in baseband or transmitted as a part of a carrier wave, in which a computer-readable program code is carried. Such a propagated data signal may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. The computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, and the computer-readable medium may send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. . Program code embodied on a computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
附图中的流程图和框图,图示了按照本发明各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,上述模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图或流程图中的每个方框、以及框图或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagram may represent a module, program segment, or part of code, which contains one or more of the logic functions used to implement the specified logic. Executable instructions. It should also be noted that in some alternative implementations, the functions labeled in the blocks may also occur in a different order than those labeled in the drawings. For example, two blocks represented one after the other may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram or flowchart, and combinations of blocks in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with A combination of dedicated hardware and computer instructions.
描述于本发明实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现,所描述的单元也可以设置在处理器中。其中,这些单元的名称在某种情况下并不构成对该单元本身的限定。The units described in the embodiments of the present invention may be implemented by software or hardware. The described units may also be provided in a processor. The names of these units do not, in some cases, define the unit itself.
作为另一方面,本申请还提供了一种计算机可读介质,该计算机可读介质可以是上述实施例中描述的电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被一个该电子设备执行时,使得该电子设备实现如上述实施例中的屏幕控制实现及展示方法。As another aspect, the present application also provides a computer-readable medium, which may be included in the electronic device described in the above embodiments; or may exist separately without being assembled into the electronic device in. The computer-readable medium carries one or more programs, and when the one or more programs are executed by one of the electronic devices, the electronic device implements the screen control implementation and display method as in the above embodiment.
例如,上述的电子设备可以实现如图1中所示的:步骤S110,获取人工检票界面图像;步骤S120,对第一区域图像进行解析,获得模糊值,基于模糊值判断第一区域图像是否为车票图片;步骤S130,对第二区域图像进行解析,确定出第二区域图像的主导颜色,基于主导颜色确定出票证状态;步骤S140,当确定第一区域图像为车票图片并且票证状态为相 符时,对述第三区域图像进行解析,获得证件图像;步骤S150,将证件图像与摄像头所采集的人脸图像进行匹配,获得匹配结果,基于匹配结果进行检票。For example, the above electronic device may implement as shown in FIG. 1: step S110, obtaining an image of a manual ticket checking interface; step S120, analyzing the first area image to obtain a blur value, and determining whether the first area image is based on the blur value Ticket picture; step S130, analyzing the second area image to determine the dominant color of the second area image, and determining the ticket status based on the dominant color; step S140, when determining that the first area image is a ticket image and the ticket status is consistent , Analyzing the third region image to obtain a credential image; step S150, matching the credential image with the face image collected by the camera to obtain a matching result, and checking the ticket based on the matching result.
又如,上述的电子设备可以实现如图4所示的各个步骤。As another example, the above electronic device can implement each step shown in FIG. 4.
又如,上述的电子设备可以实现如图7所示的各个步骤。As another example, the above electronic device can implement each step shown in FIG. 7.
应当注意,尽管在上文详细描述中提及了用于动作执行的设备的若干模块或者单元,但是这种划分并非强制性的。实际上,根据本发明的实施方式,上文描述的两个或更多模块或者单元的特征和功能可以在一个模块或者单元中具体化。反之,上文描述的一个模块或者单元的特征和功能可以进一步划分为由多个模块或者单元来具体化。It should be noted that although several modules or units of the device for action execution are mentioned in the detailed description above, this division is not mandatory. In fact, according to an embodiment of the present invention, the features and functions of two or more modules or units described above may be embodied in one module or unit. Conversely, the features and functions of a module or unit described above can be further divided into multiple modules or units to be embodied.
通过以上的实施方式的描述,本领域的技术人员易于理解,这里描述的示例实施方式可以通过软件实现,也可以通过软件结合必要的硬件的方式来实现。因此,根据本发明实施方式的技术方案可以以软件产品的形式体现出来,该软件产品可以存储在一个非易失性存储介质(可以是CD-ROM,U盘,移动硬盘等)中或网络上,包括若干指令以使得一台计算设备(可以是个人计算机、服务器、触控终端、或者网络设备等)执行根据本发明实施方式的方法。Through the description of the foregoing embodiments, those skilled in the art can easily understand that the example embodiments described herein can be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiment of the present invention may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a U disk, a mobile hard disk, etc.) or on a network It includes several instructions to enable a computing device (which may be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the embodiment of the present invention.
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本发明的其它实施方案。本申请旨在涵盖本发明的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本发明的一般性原理并包括本发明未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本发明的真正范围和精神由下面的权利要求指出。Those skilled in the art will readily contemplate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present invention. These variations, uses, or adaptive changes follow the general principles of the present invention and include the common general knowledge or conventional technical means in the technical field not disclosed by the present invention. . It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
应当理解的是,本发明并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本发明的范围仅由所附的权利要求来限制。It should be understood that the present invention is not limited to the precise structure that has been described above and shown in the drawings, and various modifications and changes can be made without departing from the scope thereof. The scope of the invention is only limited by the appended claims.

Claims (16)

  1. 一种基于人工检票界面图像的检票方法,其特征在于,包括:A ticket checking method based on an image of a manual ticket checking interface, which includes:
    获取人工检票界面图像,其中,所述人工检票界面图像至少包括第一区域图像、第二区域图像和第三区域图像;Obtaining an image of a manual ticket checking interface, wherein the image of the manual ticket checking interface includes at least a first area image, a second area image, and a third area image;
    对所述第一区域图像进行解析,获得模糊值,基于所述模糊值判断所述第一区域图像是否为车票图片;Analyze the first area image to obtain a blur value, and determine whether the first area image is a ticket picture based on the blur value;
    对所述第二区域图像进行解析,确定出所述第二区域图像的主导颜色,基于所述主导颜色确定出票证状态;Analyze the second area image to determine a dominant color of the second area image, and determine a ticket status based on the dominant color;
    当确定所述第一区域图像为车票图片并且所述票证状态为相符时,对所述第三区域图像进行解析,获得证件图像;When it is determined that the first area image is a ticket picture and the ticket status is consistent, analyzing the third area image to obtain a credential image;
    将所述证件图像与摄像头所采集的人脸图像进行匹配,获得匹配结果,基于所述匹配结果进行检票。Match the credential image with the face image collected by the camera to obtain a matching result, and check the ticket based on the matching result.
  2. 根据权利要求1所述的基于人工检票界面图像的检票方法,其特征在于,所述对所述第一区域图像进行解析,获得模糊值,基于所述模糊值判断所述第一区域图像是否为车票图片,包括:The ticket checking method based on an image of a manual ticket checking interface according to claim 1, wherein the parsing the first area image to obtain a blur value, and determining whether the first area image is based on the blur value Ticket pictures, including:
    提取所述第一区域图像的R通道数据,并基于所述R通道数据获得所述第一区域图像的模糊值;Extracting R channel data of the first region image, and obtaining a blur value of the first region image based on the R channel data;
    将所述第一区域图像的模糊值与预设的阈值对比;Comparing the blur value of the first region image with a preset threshold;
    所述第一区域图像的模糊值大于等于预设的阈值,确定所述第一区域图像为票面图像;Determining that the blur value of the first area image is greater than or equal to a preset threshold, and determining that the first area image is a parity image;
    所述第一区域图像的模糊值小于预设的阈值,则确定所述第一区域图像为空。If the blur value of the first area image is less than a preset threshold, it is determined that the first area image is empty.
  3. 根据权利要求1所述的基于人工检票界面图像的检票方法,其特征在于,所述对所述第二区域图像进行解析,确定出所述第二区域图像的主导颜色,基于所述主导颜色确定出票证状态,包括The ticket checking method based on a manual ticket checking interface image according to claim 1, wherein the analysis of the second area image determines a dominant color of the second area image, and determines the dominant color based on the dominant color Ticket status, including
    将所述第二区域图像的RGB颜色空间转换为HSV颜色空间;其中,RGB颜色空间至少包括所述第二区域图像中红、绿、蓝颜色的叠加数据,所述HSV颜色空间中至少包括所述第二区域图像的色相数据、饱和度数据以及亮度数据;Transforming the RGB color space of the second region image into an HSV color space; wherein the RGB color space includes at least superimposed data of red, green, and blue colors in the second region image, and the HSV color space includes at least The hue data, saturation data, and brightness data of the second area image are described;
    对所述HSV颜色空间中的色相数据进行分析,确定出所述第二区域图像的主导颜色;Analyze the hue data in the HSV color space to determine the dominant color of the second region image;
    基于所述第二区域图像的主导颜色,确定出票证验证结果。Based on the dominant color of the second region image, a ticket verification result is determined.
  4. 根据权利要求3所述的基于人工检票界面图像的检票方法,其特征在于,所述基于所述第二区域图像的主导颜色,确定出票证验证结果,包括:The ticket checking method based on an image of a manual ticket checking interface according to claim 3, wherein determining a ticket verification result based on a dominant color of the second region image comprises:
    判断所述第二区域图像的主导颜色是否为绿色;Determine whether the dominant color of the image in the second region is green;
    如果所述第二区域图像的主导颜色是绿色,则确定所述票证验证结果为相符;If the dominant color of the second area image is green, determining that the ticket verification result is consistent;
    如果所述第二区域图像的主导颜色不是绿色,则判断所述第二区域图像的主导颜色 是否为红色;If the dominant color of the second region image is not green, determining whether the dominant color of the second region image is red;
    如果所述第二区域图像的主导颜色是红色,则确定所述票证验证结果为无效;If the dominant color of the second area image is red, determining that the ticket verification result is invalid;
    如果所述第二区域图像的主导颜色不是红色,则确定所述票证验证结果为待定。If the dominant color of the second area image is not red, it is determined that the ticket verification result is pending.
  5. 根据权利要求4所述的基于人工检票界面图像的检票方法,其特征在于,所述确定所述票证验证结果为待定之后,所述方法还包括:The ticket checking method based on a manual ticket checking interface image according to claim 4, wherein after determining that the ticket verification result is pending, the method further comprises:
    对票证验证结果为待定的第二区域图像进行二值化处理,获得文字的黑白图像;Binarize the second region image whose ticket verification result is pending to obtain a black and white image of the text;
    将所述黑白图像进行水平投影和垂直投影,确定出所述第二区域图像的文字区域;Performing horizontal projection and vertical projection of the black and white image to determine a text area of the second area image;
    对所述第二区域图像的文字区域中的文字进行识别,获得文本数据;Recognizing text in a text area of the second area image to obtain text data;
    将所述文本数据与预设的正则表达式匹配,如匹配,则将所述第二区域图像的票证验证结果从待定转换为相符;如不匹配,则将所述第二区域图像的票证验证结果从待定转换为无效。Match the text data with a preset regular expression, and if they match, convert the ticket verification result of the second area image from pending to match; if they do not match, verify the ticket of the second area image The result is converted from pending to invalid.
  6. 根据权利要求1所述的基于人工检票界面图像的检票方法,其特征在于,所述对所述第三区域图像进行解析,获得证件图像,包括:The ticket checking method based on an image of a manual ticket checking interface according to claim 1, wherein the parsing the third region image to obtain a credential image comprises:
    通过预设的人脸检测算法,对所述第三区域图像进行检测,判断所述第三区域图像是否存在人像图像;Detecting the third region image through a preset face detection algorithm to determine whether a portrait image exists in the third region image;
    当判断述第三区域图像存在人像图像时,对所述人像图像进行提取,获得证件图像。When it is determined that a portrait image exists in the third region image, the portrait image is extracted to obtain a credential image.
  7. 根据权利要求1所述的基于人工检票界面图像的检票方法,其特征在于,所述将所述证件图像与摄像头所采集的人脸图像进行匹配,获得匹配结果,输出所述匹配结果,包括:The ticket checking method based on an image of a manual ticket checking interface according to claim 1, wherein the matching the document image with a face image collected by a camera to obtain a matching result and outputting the matching result comprises:
    当所述证件图像与所述人脸图像相符合时确定检票成功,生成检票成功的匹配结果,将所述匹配结果向检票闸机发送,以控制所述检票闸机打开;Determining that the ticket checking is successful when the document image matches the face image, generating a successful matching result of the ticket checking, and sending the matching result to the ticket checking gate to control the ticket checking gate to open;
    当所述证件图像与所述人脸图像不符合时确定检票成功,生成检票失败的匹配结果,并发出检票失败的提示信息。When the credential image does not match the face image, it is determined that the ticket checking is successful, a matching result of the ticket checking failure is generated, and a prompt message indicating that the ticket checking fails is issued.
  8. 一种基于人工检票界面图像的检票装置,其特征在于,包括:获取模块、第一解析模块、第二解析模块、第三解析模块、匹配模块;其中,A ticket checking device based on an image of a manual ticket checking interface, comprising: an acquisition module, a first analysis module, a second analysis module, a third analysis module, and a matching module; wherein,
    获取模块,用于获取人工检票界面图像,其中,所述人工检票界面图像至少包括第一区域图像、第二区域图像和第三区域图像;An obtaining module, configured to obtain an image of a manual ticket checking interface, wherein the image of the manual ticket checking interface includes at least a first area image, a second area image, and a third area image;
    第一解析模块,用于对所述第一区域图像进行解析,获得模糊值,基于所述模糊值判断所述第一区域图像是否为车票图片;A first analysis module, configured to analyze the first area image to obtain a blur value, and determine whether the first area image is a ticket picture based on the blur value;
    第二解析模块,用于对所述第二区域图像进行解析,确定出所述第二区域图像的主导颜色,基于所述主导颜色确定出票证状态;A second analysis module, configured to analyze the second area image, determine a dominant color of the second area image, and determine a ticket status based on the dominant color;
    第三解析模块,用于当确定所述第一区域图像为车票图片并且所述票证状态为相符时,对所述述第三区域图像进行解析,获得证件图像;A third analysis module, configured to: when it is determined that the first area image is a ticket picture and the ticket status is consistent, analyze the third area image to obtain a certificate image;
    匹配模块,用于将所述证件图像与摄像头所采集的人脸图像进行匹配,获得匹配结果,基于所述匹配结果进行检票。A matching module is configured to match the document image with a face image collected by a camera to obtain a matching result, and perform a ticket check based on the matching result.
  9. 根据权利要求8所述的基于人工检票界面图像的检票装置,其特征在于,所述第一解析模块具体用于:The ticket checking device based on an image of a manual ticket checking interface according to claim 8, wherein the first analysis module is specifically configured to:
    提取所述第一区域图像的R通道数据,并基于所述R通道数据获得所述第一区域图像的模糊值;Extracting R channel data of the first region image, and obtaining a blur value of the first region image based on the R channel data;
    将所述第一区域图像的模糊值与预设的阈值对比;Comparing the blur value of the first region image with a preset threshold;
    所述第一区域图像的模糊值大于等于预设的阈值,确定所述第一区域图像为票面图像;Determining that the blur value of the first area image is greater than or equal to a preset threshold, and determining that the first area image is a parity image;
    所述第一区域图像的模糊值小于预设的阈值,则确定所述第一区域图像为空。If the blur value of the first area image is less than a preset threshold, it is determined that the first area image is empty.
  10. 根据权利要求8所述的基于人工检票界面图像的检票装置,其特征在于,所述第二解析模块具体用于:The ticket checking device based on a manual ticket checking interface image according to claim 8, wherein the second analysis module is specifically configured to:
    将所述第二区域图像的RGB颜色空间转换为HSV颜色空间;其中,RGB颜色空间至少包括所述第二区域图像中红、绿、蓝颜色的叠加数据,所述HSV颜色空间中至少包括所述第二区域图像的色相数据、饱和度数据以及亮度数据;Transforming the RGB color space of the second region image into an HSV color space; wherein the RGB color space includes at least superimposed data of red, green, and blue colors in the second region image, and the HSV color space includes at least The hue data, saturation data, and brightness data of the second area image are described;
    对所述HSV颜色空间中的色相数据进行分析,确定出所述第二区域图像的主导颜色;Analyze the hue data in the HSV color space to determine the dominant color of the second region image;
    基于所述第二区域图像的主导颜色,确定出票证验证结果。Based on the dominant color of the second region image, a ticket verification result is determined.
  11. 根据权利要求10所述的基于人工检票界面图像的检票装置,其特征在于,所述第二解析模块具体用于:The ticket checking device based on a manual ticket checking interface image according to claim 10, wherein the second analysis module is specifically configured to:
    判断所述第二区域图像的主导颜色是否为绿色;Determine whether the dominant color of the image in the second region is green;
    如果所述第二区域图像的主导颜色是绿色,则确定所述票证验证结果为相符;If the dominant color of the second area image is green, determining that the ticket verification result is consistent;
    如果所述第二区域图像的主导颜色不是绿色,则判断所述第二区域图像的主导颜色是否为红色;If the dominant color of the second region image is not green, determining whether the dominant color of the second region image is red;
    如果所述第二区域图像的主导颜色是红色,则确定所述票证验证结果为无效;If the dominant color of the second area image is red, determining that the ticket verification result is invalid;
    如果所述第二区域图像的主导颜色不是红色,则确定所述票证验证结果为待定。If the dominant color of the second area image is not red, it is determined that the ticket verification result is pending.
  12. 根据权利要求11所述的基于人工检票界面图像的检票装置,其特征在于,所述第二解析模块具体用于:The ticket checking device based on a manual ticket checking interface image according to claim 11, wherein the second analysis module is specifically configured to:
    对票证验证结果为待定的第二区域图像进行二值化处理,获得文字的黑白图像;Binarize the second region image whose ticket verification result is pending to obtain a black and white image of the text;
    将所述黑白图像进行水平投影和垂直投影,确定出所述第二区域图像的文字区域;Performing horizontal projection and vertical projection of the black and white image to determine a text area of the second area image;
    对所述第二区域图像的文字区域中的文字进行识别,获得文本数据;Recognizing text in a text area of the second area image to obtain text data;
    将所述文本数据与预设的正则表达式匹配,如匹配,则将所述第二区域图像的票证验证结果从待定转换为相符;如不匹配,则将所述第二区域图像的票证验证结果从待定转换为无效。Match the text data with a preset regular expression, and if they match, convert the ticket verification result of the second area image from pending to match; if they do not match, verify the ticket of the second area image The result is converted from pending to invalid.
  13. 根据权利要求8所述的基于人工检票界面图像的检票装置,其特征在于,所述第三解析模块具体用于:The ticket checking device based on a manual ticket checking interface image according to claim 8, wherein the third analysis module is specifically configured to:
    通过预设的人脸检测算法,对所述第三区域图像进行检测,判断所述第三区域图像 是否存在人像图像;Detecting the third region image through a preset face detection algorithm to determine whether a portrait image exists in the third region image;
    当判断述第三区域图像存在人像图像时,对所述人像图像进行提取,获得证件图像。When it is determined that a portrait image exists in the third region image, the portrait image is extracted to obtain a credential image.
  14. 根据权利要求8所述的基于人工检票界面图像的检票装置,其特征在于,所述匹配模块具体用于:The ticket checking device based on an image of a manual ticket checking interface according to claim 8, wherein the matching module is specifically configured to:
    当所述证件图像与所述人脸图像相符合时确定检票成功,生成检票成功的匹配结果,将所述匹配结果向检票闸机发送,以控制所述检票闸机打开;Determining that the ticket checking is successful when the document image matches the face image, generating a successful matching result of the ticket checking, and sending the matching result to the ticket checking gate to control the ticket checking gate to open;
    当所述证件图像与所述人脸图像不符合时确定检票成功,生成检票失败的匹配结果,并发出检票失败的提示信息。When the credential image does not match the face image, it is determined that the ticket checking is successful, a matching result of the ticket checking failure is generated, and a prompt message indicating that the ticket checking fails is issued.
  15. 一种计算机可读介质,其上存储有计算机程序,其特征在于,所述程序被处理器执行时实现权利要求1至7中任一项所述的基于人工检票界面图像的检票方法。A computer-readable medium having stored thereon a computer program, characterized in that, when the program is executed by a processor, the ticket checking method based on a manual ticket checking interface image according to any one of claims 1 to 7 is implemented.
  16. 一种电子设备,其特征在于,包括:An electronic device, comprising:
    一个或多个处理器;One or more processors;
    存储装置,用于存储一个或多个程序,当所述一个或多个程序被所述一个或多个处理器执行时,使得所述一个或多个处理器实现权利要求1至7中任一所述的基于人工检票界面图像的检票方法。A storage device, configured to store one or more programs, and when the one or more programs are executed by the one or more processors, cause the one or more processors to implement any one of claims 1 to 7 The ticket checking method based on the image of the manual ticket checking interface.
PCT/CN2019/091898 2018-06-20 2019-06-19 Ticket checking method and apparatus based on manual ticket checking interface image, medium and electronic device WO2019242644A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810639160.9A CN108932754B (en) 2018-06-20 2018-06-20 Ticket checking method, device, medium and electronic equipment based on manual ticket checking interface image
CN201810639160.9 2018-06-20

Publications (1)

Publication Number Publication Date
WO2019242644A1 true WO2019242644A1 (en) 2019-12-26

Family

ID=64446250

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/091898 WO2019242644A1 (en) 2018-06-20 2019-06-19 Ticket checking method and apparatus based on manual ticket checking interface image, medium and electronic device

Country Status (2)

Country Link
CN (1) CN108932754B (en)
WO (1) WO2019242644A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108932754B (en) * 2018-06-20 2020-07-31 京东数字科技控股有限公司 Ticket checking method, device, medium and electronic equipment based on manual ticket checking interface image
CN109840407A (en) * 2018-12-24 2019-06-04 航天信息股份有限公司 Intelligent personnel's verification system and method
CN111126151A (en) * 2019-11-25 2020-05-08 泰康保险集团股份有限公司 Method, apparatus, device and medium for identifying field in bill image

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004104530A (en) * 2002-09-10 2004-04-02 Toshiba Corp Tickets issuing apparatus, tickets issuing method and user confirmation device, user confirmation method
CN101059885A (en) * 2006-11-03 2007-10-24 朱杰 A ticket true/false verifying system and method
CN102693555A (en) * 2011-07-13 2012-09-26 上海理工大学 Drawing-in ticket inspection system implemented by using real-name system
CN103424952A (en) * 2012-05-15 2013-12-04 深圳中兴力维技术有限公司 Focusing region self-adaptive automatic focusing method and device
CN105631941A (en) * 2015-12-25 2016-06-01 中国铁道科学研究院电子计算技术研究所 Ticket-checking and station-entering system and ticket-checking and station-entering method based on system
JP2017162211A (en) * 2016-03-09 2017-09-14 株式会社東芝 Automatic ticket examination machine, program, ticket, and ticket sheet
CN107633558A (en) * 2017-09-12 2018-01-26 浙江网新电气技术有限公司 A kind of self-service ticket checking method and equipment based on portrait Yu identity card matching identification
CN108932754A (en) * 2018-06-20 2018-12-04 北京京东金融科技控股有限公司 Ticket checking method, device, medium and electronic equipment based on artificial ticket checking interface image

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004104530A (en) * 2002-09-10 2004-04-02 Toshiba Corp Tickets issuing apparatus, tickets issuing method and user confirmation device, user confirmation method
CN101059885A (en) * 2006-11-03 2007-10-24 朱杰 A ticket true/false verifying system and method
CN102693555A (en) * 2011-07-13 2012-09-26 上海理工大学 Drawing-in ticket inspection system implemented by using real-name system
CN103424952A (en) * 2012-05-15 2013-12-04 深圳中兴力维技术有限公司 Focusing region self-adaptive automatic focusing method and device
CN105631941A (en) * 2015-12-25 2016-06-01 中国铁道科学研究院电子计算技术研究所 Ticket-checking and station-entering system and ticket-checking and station-entering method based on system
JP2017162211A (en) * 2016-03-09 2017-09-14 株式会社東芝 Automatic ticket examination machine, program, ticket, and ticket sheet
CN107633558A (en) * 2017-09-12 2018-01-26 浙江网新电气技术有限公司 A kind of self-service ticket checking method and equipment based on portrait Yu identity card matching identification
CN108932754A (en) * 2018-06-20 2018-12-04 北京京东金融科技控股有限公司 Ticket checking method, device, medium and electronic equipment based on artificial ticket checking interface image

Also Published As

Publication number Publication date
CN108932754A (en) 2018-12-04
CN108932754B (en) 2020-07-31

Similar Documents

Publication Publication Date Title
WO2019242644A1 (en) Ticket checking method and apparatus based on manual ticket checking interface image, medium and electronic device
US11151397B2 (en) Liveness testing methods and apparatuses and image processing methods and apparatuses
US9069948B2 (en) Methods, systems, and media for measuring quality of gesture-based passwords
WO2021056746A1 (en) Image model testing method and apparatus, electronic device and storage medium
WO2020042489A1 (en) Authentication method and apparatus for illegal parking case, and computer device
CN111242097B (en) Face recognition method and device, computer readable medium and electronic equipment
CN108846440B (en) Image processing method and device, computer readable medium and electronic equipment
JP2017522635A (en) User authentication method, apparatus for executing the same, and recording medium storing the same
CN110189336B (en) Image generation method, system, server and storage medium
US10410053B2 (en) Method, apparatus, system, and storage medium for detecting information card in image
CN109086834B (en) Character recognition method, character recognition device, electronic equipment and storage medium
WO2023173785A1 (en) Access permission verification method, device, and system and identity authentication terminal
WO2021212873A1 (en) Defect detection method and apparatus for four corners of certificate, and device and storage medium
CN111415336B (en) Image tampering identification method, device, server and storage medium
CN110795714A (en) Identity authentication method and device, computer equipment and storage medium
CN115186303B (en) Financial signature safety management method and system based on big data cloud platform
CN112560683A (en) Method and device for identifying copied image, computer equipment and storage medium
WO2020007191A1 (en) Method and apparatus for living body recognition and detection, and medium and electronic device
CN109670389A (en) The method and apparatus for evaluating the illumination condition in facial image
CN109614780B (en) Biological information authentication method and device, storage medium and electronic equipment
CN105184236A (en) Robot-based face identification system
CN110909568A (en) Image detection method, apparatus, electronic device, and medium for face recognition
WO2024077971A1 (en) Liveness detection method and apparatus
CN114780932B (en) Cross-block chain data interaction verification method, system and equipment for management three-mode platform
CN114401285B (en) Collaborative issuing method and system for intelligent algorithm model of electric vehicle networking

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19821782

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19821782

Country of ref document: EP

Kind code of ref document: A1