CN110138999A - A kind of papers-scanning method and device for mobile terminal - Google Patents
A kind of papers-scanning method and device for mobile terminal Download PDFInfo
- Publication number
- CN110138999A CN110138999A CN201910461705.6A CN201910461705A CN110138999A CN 110138999 A CN110138999 A CN 110138999A CN 201910461705 A CN201910461705 A CN 201910461705A CN 110138999 A CN110138999 A CN 110138999A
- Authority
- CN
- China
- Prior art keywords
- angle
- card object
- finder
- view
- pattern
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 34
- 230000007704 transition Effects 0.000 claims description 7
- 238000007781 pre-processing Methods 0.000 claims description 2
- 238000004891 communication Methods 0.000 description 38
- 230000006870 function Effects 0.000 description 27
- 238000007726 management method Methods 0.000 description 15
- 238000010586 diagram Methods 0.000 description 12
- 238000010295 mobile communication Methods 0.000 description 11
- 230000008569 process Effects 0.000 description 11
- 210000000988 bone and bone Anatomy 0.000 description 10
- 238000005516 engineering process Methods 0.000 description 10
- 238000012545 processing Methods 0.000 description 9
- 238000007600 charging Methods 0.000 description 8
- 230000003287 optical effect Effects 0.000 description 8
- 230000005236 sound signal Effects 0.000 description 6
- 229920001621 AMOLED Polymers 0.000 description 4
- 238000013528 artificial neural network Methods 0.000 description 4
- 230000000694 effects Effects 0.000 description 4
- 238000000926 separation method Methods 0.000 description 4
- 230000001133 acceleration Effects 0.000 description 3
- 230000008859 change Effects 0.000 description 3
- 238000001514 detection method Methods 0.000 description 3
- 239000010985 leather Substances 0.000 description 3
- 230000003416 augmentation Effects 0.000 description 2
- 230000036772 blood pressure Effects 0.000 description 2
- 239000003990 capacitor Substances 0.000 description 2
- 230000001413 cellular effect Effects 0.000 description 2
- 230000000295 complement effect Effects 0.000 description 2
- 230000005611 electricity Effects 0.000 description 2
- 230000007613 environmental effect Effects 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 239000004973 liquid crystal related substance Substances 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 238000005457 optimization Methods 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 239000002096 quantum dot Substances 0.000 description 2
- 230000005855 radiation Effects 0.000 description 2
- 230000006641 stabilisation Effects 0.000 description 2
- 238000011105 stabilization Methods 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- BQCADISMDOOEFD-UHFFFAOYSA-N Silver Chemical compound [Ag] BQCADISMDOOEFD-UHFFFAOYSA-N 0.000 description 1
- 206010044565 Tremor Diseases 0.000 description 1
- 206010052428 Wound Diseases 0.000 description 1
- 208000027418 Wounds and injury Diseases 0.000 description 1
- 230000003321 amplification Effects 0.000 description 1
- 230000000386 athletic effect Effects 0.000 description 1
- 238000013529 biological neural network Methods 0.000 description 1
- 230000015572 biosynthetic process Effects 0.000 description 1
- 210000004556 brain Anatomy 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 210000004027 cell Anatomy 0.000 description 1
- 230000019771 cognition Effects 0.000 description 1
- 230000006835 compression Effects 0.000 description 1
- 238000007906 compression Methods 0.000 description 1
- 239000004020 conductor Substances 0.000 description 1
- 230000006837 decompression Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 235000013399 edible fruits Nutrition 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 230000004927 fusion Effects 0.000 description 1
- 230000005484 gravity Effects 0.000 description 1
- 230000036541 health Effects 0.000 description 1
- 230000007774 longterm Effects 0.000 description 1
- 230000035800 maturation Effects 0.000 description 1
- 229910044991 metal oxide Inorganic materials 0.000 description 1
- 150000004706 metal oxides Chemical class 0.000 description 1
- 238000012011 method of payment Methods 0.000 description 1
- 210000005036 nerve Anatomy 0.000 description 1
- 210000002569 neuron Anatomy 0.000 description 1
- 238000003199 nucleic acid amplification method Methods 0.000 description 1
- 230000008447 perception Effects 0.000 description 1
- 230000005622 photoelectricity Effects 0.000 description 1
- 238000003825 pressing Methods 0.000 description 1
- 230000002265 prevention Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 238000012797 qualification Methods 0.000 description 1
- 238000013139 quantization Methods 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 238000005070 sampling Methods 0.000 description 1
- 238000007650 screen-printing Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000035807 sensation Effects 0.000 description 1
- 229910052709 silver Inorganic materials 0.000 description 1
- 239000004332 silver Substances 0.000 description 1
- 230000000392 somatic effect Effects 0.000 description 1
- 238000003786 synthesis reaction Methods 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
- 238000011269 treatment regimen Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
- G06V10/22—Image preprocessing by selection of a specific region containing or referencing a pattern; Locating or processing of specific regions to guide the detection or recognition
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/60—Type of objects
- G06V20/62—Text, e.g. of license plates, overlay texts or captions on TV images
- G06V20/63—Scene text, e.g. street names
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N1/00—Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
- H04N1/04—Scanning arrangements, i.e. arrangements for the displacement of active reading or reproducing elements relative to the original or reproducing medium, or vice versa
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/63—Control of cameras or camera modules by using electronic viewfinders
- H04N23/631—Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters
- H04N23/632—Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters for displaying or modifying preview images prior to image capturing, e.g. variety of image resolutions or capturing parameters
Abstract
The embodiment of the invention discloses a kind of papers-scanning method and devices for mobile terminal, are related to intelligent terminal technical field, improving sweep efficiency while capable of simplifying user's operation.The present invention includes: from the image taken, and identification meets the pattern of pre-set image mark;According to the pattern of identification, position and the angle of the card object are obtained;View-finder is shown in shooting interface according to the position of the card object and angle, wherein the display position of the view-finder matches the position of the card object, the angle of card object described in the angle automatching of the view-finder.The present invention is suitable for papers-scanning.
Description
Technical field
The present invention relates to intelligent terminal technical field more particularly to a kind of papers-scanning method for mobile terminal and
Device.
Background technique
As on-line finance service industry enters fast-developing period, many operational program and branch's skill are derived
Art, among these, certificate, card recognition scheme based on Image Acquisition become one of the important tool of convenient terminal user.
Such as it is shown in FIG. 1, the mode of operation of current scanline identity card is mainly: application image identification technology, provided according to app or
Horizontal or perpendicular view-finder allows user to shoot using mobile phone camera alignment certificate edge, then according to view-finder by certificate from photograph
It is separated in piece background.This is current one of the most common type by way of smart phone scanned copy certificate, is widely used in major
In the APP of electric business and bank.
Although image recognition technology has been a kind of mature technology, also achieve to element each in captured image
Identification and angle calibration system to a certain extent, but " maturation " of image recognition technology not represent final scanning mode " good
With ", there is also defect and deficiency, especially users for current scheme in use, needs using taking on mobile phone screen
Scape frame is aligned this problem of certificate edge.
In practical applications, it is limited by the performance difference of different smart phones and the shooting level of different user, this
One operation is not easy in fact, and user needs to adjust mobile phone with a distance from certificate and rotation angle, it is remote it is not all right it is close not yet
Row, it is askew also not all right, if hand shaking will also result in the blurring of photos for scanning and in user's alignment procedure, even if after having carried out
The pixel alignment and tilt angle of phase are calibrated, or there is a problem of that identification mistake occurs, and therefore, most of user can be by
Certificate is placed on the table, and hands grasping mobile phone is shot.Some users can also hold a certificate card on the other hand, and one is hand-held
There is mobile phone, is shot by the continuous adjustment of two hands, also need to be shot using both hands.This undoubtedly increases
The cumbersome degree of user, and whole operation process is practical time-consuming relative to input number, and also there is no especially big
Odds for effectiveness.
Summary of the invention
The embodiment of the present invention provides a kind of papers-scanning method and device for mobile terminal, can simplify user
Improving sweep efficiency while operation.
In order to achieve the above objectives, the embodiment of the present invention adopts the following technical scheme that
From the image taken, identification meets the pattern of pre-set image mark;According to the pattern of identification, described in acquisition
The position of card object and angle;View-finder is shown in shooting interface according to the position of the card object and angle,
In, the display position of the view-finder matches the position of the card object, card object described in the angle automatching of the view-finder
The angle of body.
Wherein, the pattern according to identification obtains position and the angle of the card object, comprising: according to the card
The type of piece object, determines the contour mould of the card object, wherein includes the card object in the contour mould
The position and angle of the default shape of body and pre-set image mark in the card object;According to the pattern in institute
The position in shooting interface and angle are stated, position and angle of the pre-set image mark in the card object is compareed, obtains
Take position and the angle of the card object.
Specifically, after the pattern that identification meets pre-set image mark, further includes: according to the pattern in the bat
The position and orientation in interface are taken the photograph, the tilt angle of the pattern is obtained;The boundary point for determining the pattern utilizes the figure
The tilt angle of the boundary point of case and the pattern obtains the rectangle frame for covering the pattern.
Specifically, described show view-finder in the shooting interface according to the position and angle of the card object, packet
It includes: according to the rectangle frame of the contour mould and the covering pattern, determining the profile of the card object;According to the bat
The current profile of card object described in interface is taken the photograph, view-finder is generated;By view-finder generated, shooting circle is covered
The current profile of card object described in face.
In the present embodiment, image identification fixed on card object (such as the Unionpay on certificate is locked by image recognition
Mark), and image identification is scanned, the edge separation of picture position is found, determines that card subject image identifies tilt angle
With rectangular outer frame size, in view of the setting of image identifications certain on card object (such as: Unionpay identify) position, size and and card
Object proportionate relationship is fixed, therefore the position according to image identification, size, proportionate relationship, calculates certificate outer profile,
And then certificate is separated from scan image.Pass through the identical card object taken of view-finder active of generation, user
The process of alignment rectangle frame can be saved, the cards objects such as scanning separation bank card need to only can be completed according to process of normally taking pictures
The image of body and upload.It is not only convenient for users to operate, also improves scan efficiency.
Detailed description of the invention
It to describe the technical solutions in the embodiments of the present invention more clearly, below will be to use required in embodiment
Attached drawing be briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for
For those of ordinary skill in the art, without creative efforts, it can also be obtained according to these attached drawings other
Attached drawing.
Fig. 1 is a kind of schematic diagram of implementation in the prior art;
Fig. 2 is the schematic diagram of hardware device provided in an embodiment of the present invention;
Fig. 3 is the schematic diagram of the software environment in hardware device provided in an embodiment of the present invention;
Fig. 4 is method flow schematic diagram provided in an embodiment of the present invention;
Fig. 5 a, Fig. 5 b, Fig. 5 c, Fig. 5 d, Fig. 5 e are a kind of schematic diagram of specific example provided in an embodiment of the present invention;
Fig. 6 a, Fig. 6 b, Fig. 6 c are the schematic diagram of another specific example provided in an embodiment of the present invention;
Fig. 7 is the flow diagram of another specific example provided in an embodiment of the present invention;
Fig. 8 is apparatus structure schematic diagram provided in an embodiment of the present invention.
Specific embodiment
Referring to fig. 2, Fig. 2 is user equipment main body provided by the embodiments of the present application (such as the mobile terminals such as smart phone)
A kind of embodiment structural schematic diagram.In conjunction with Fig. 2 it is found that the user equipment main body 100 can also include processor 103,
External memory interface 104, internal storage 105, universal serial bus (universal serial bus, USB) interface
106, charge management module 107, power management module 108, battery 109, antenna 1, antenna 2, mobile communication module 110, wirelessly
Communication module 111, audio-frequency module 112, loudspeaker 113, receiver 114, microphone 115, earphone interface 116, sensor module
117, key 118, motor 119, indicator 120, camera 121 and Subscriber Identity Module (subscriber
Identification module, SIM) card interface 122 etc..Wherein sensor module 117 may include pressure sensor
1171, gyro sensor 1172, baroceptor 1173, Magnetic Sensor 1174, acceleration transducer 1175, Distance-sensing
Device 1176, close to optical sensor 1177, fingerprint sensor 1178, temperature sensor 1179, touch sensor 1180, environment light
Sensor 1181, bone conduction sensor 1182 etc..
The input unit of user equipment main body 100 shown in above-described embodiment may include: display screen 102, sensor die
Block 117, key 118, motor 119, camera 121 etc..
It will be understood by those skilled in the art that Fig. 2 shows user equipment main body structure do not constitute to the application use
The restriction of family equipment body, the user equipment main body of the application may include than illustrating more or fewer components, or combination
Certain components or different component layouts.The component of diagram can be realized with hardware, the combination of software or software and hardware.
Wherein, processor 103 may include one or more processing units, such as: processor 103 may include application
Processor (application processor, AP), modem processor, graphics processor (graphics
Processingunit, GPU), image-signal processor (image signal processor, ISP), controller, storage
Device, Video Codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or
Neural network processor (neural-network processing unit, NPU) etc..Wherein, different processing units can be with
It is independent device, also can integrate in one or more processors.Wherein, controller can be the nerve of user equipment
Maincenter and command centre.Controller can generate operating control signal according to instruction operation code and clock signal, complete fetching
The control for enabling and executing instruction.
Memory can also be set in processor 103, for storing instruction and data.In some embodiments, processor
Memory in 103 is cache memory.The memory can save the finger that processor 103 is just used or is recycled
Order or data.If processor 103 needs to reuse the instruction or data, can be called directly from the memory.It avoids
Repeated access, reduces the waiting time of processor 103, thus improve the efficiency of system.
In some embodiments, processor 103 may include one or more interfaces.Interface may include integrated circuit
(inter-integrated circuit, I2C) interface, integrated circuit built-in audio (inter-integrated
Circuitsound, I2S) interface, pulse code modulation (pulse code modulation, PCM) interface, universal asynchronous receipts
Send out transmitter (universal asynchronous receiver/transmitter, UART) interface, mobile Industry Processor
Interface (mobile industry processor interface, MIPI), universal input export (general-
Purposeinput/output, GPIO) interface, Subscriber Identity Module (subscriber identity module, SIM) connects
Mouth and/or universal serial bus (universal serial bus, USB) interface etc..
I2C interface is a kind of bi-directional synchronization universal serial bus, including serial data line (serial data line,
SDA) He Yigen serial time clock line (derail clock line, SCL).In some embodiments, processor 103 may include
Multiple groups I2C bus.Processor 103 can by different I2C bus interface distinguish coupled with touch sensors 1180, charger,
Flash lamp, camera 121 etc..Such as: processor 103 can make processor by I2C interface coupled with touch sensors 1180
103 are communicated with touch sensor 1180 by I2C bus interface, realize the touch function of user equipment.
I2S interface can be used for voice communication.In some embodiments, processor 103 may include multiple groups I 2S bus.
Processor 103 can be coupled by I2S bus with audio-frequency module 112, be realized logical between processor 103 and audio-frequency module 112
Letter.In some embodiments, audio-frequency module 112 can transmit audio signal to wireless communication module 111 by I2S interface, real
The function of now being received calls by bluetooth headset.
Pcm interface can be used for voice communication, by analog signal sampling, quantization and coding.In some embodiments,
Audio-frequency module 112 can be coupled with wireless communication module 111 by pcm bus interface.In some embodiments, audio-frequency module
112 can also transmit audio signal to wireless communication module 111 by pcm interface, what realization was received calls by bluetooth headset
Function.The I2S interface and the pcm interface may be used to voice communication.
UART interface is a kind of Universal Serial Bus, is used for asynchronous communication.The bus can be total for two-way communication
Line.The data that it will be transmitted are converted between serial communication and parallel communications.In some embodiments, UART interface is usual
It is used to connect processor 103 and wireless communication module 111.Such as: processor 103 passes through UART interface and radio communication mold
Bluetooth module communication in block 111, realizes Bluetooth function.In some embodiments, audio-frequency module 112 can be connect by UART
Mouth transmits audio signal to wireless communication module 111, realizes and passes through the function that bluetooth headset plays music.
MIPI interface can be used to connect the peripheral components such as processor 103 and display screen 102, camera 121.MIPI
Interface includes camera serial line interface (camera serial interface, CSI), display screen serial line interface
(displayserial interface, DSI) etc..In some embodiments, processor 103 and camera 121 are connect by CSI
Port communications realize the shooting function of user equipment.Processor 103 and display screen 102 realize that user sets by DSI interface communication
Standby display function.
GPIO interface can pass through software configuration.GPIO interface can be configured as control signal, may be alternatively configured as counting
It is believed that number.In some embodiments, GPIO interface can be used for connecting processor 103 and camera 121, display screen 102, nothing
Line communication module 111, audio-frequency module 112, sensor module 117 etc..GPIO interface can be additionally configured to I2C interface, I2S
Interface, UART interface, MIPI interface etc..
Usb 1 06 is the interface for meeting USB standard specification, specifically can be MiniUSB interface, and Micro USB connects
Mouthful, USB Type C interface etc..Usb 1 06 can be used for connecting charger for user equipment charging, can be used for using
Data are transmitted between family equipment and peripheral equipment.It can be used for connection earphone, audio played by earphone.The interface may be used also
For connecting other electronic equipments, such as AR equipment etc..
It is understood that the interface connection relationship of each intermodule of the present embodiment signal, only schematically illustrates, and
The structure qualification to user equipment is not constituted.In further embodiments, user equipment can also use in above-described embodiment not
The combination of same interface connection type or multiple interfaces connection type.
Charge management module 107 is used to receive charging input from charger.Wherein, charger can be wireless charger,
It is also possible to wired charger.In the embodiment of some wired chargings, charge management module 107 can pass through USB interface
106 receive the charging input of wired charger.In the embodiment of some wireless chargings, charge management module 107 can pass through
The Wireless charging coil of user equipment receives wireless charging input.While charge management module 107 is that battery 109 charges, also
It can be user equipment power supply by power management module 108.
Power management module 108 is for connecting battery 109, charge management module 107 and processor 103.Power management mould
Block 108 receives the input of battery 109 and/or charge management module 107, is processor 103, internal storage 105, outside is deposited
Reservoir, display screen 102, the power supply such as camera 121 and wireless communication module 111.Power management module 108 can be also used for supervising
Survey battery capacity, circulating battery number, the parameters such as cell health state (electric leakage, impedance).In some other embodiment, electricity
Source control module 108 also can be set in processor 103.In further embodiments, power management module 108 and charging
Management module 107 also can be set in the same device.
The wireless communication function of user equipment can pass through antenna 1, antenna 2, mobile communication module 110, radio communication mold
Block 111, modem processor and baseband processor etc. are realized.
Antenna 1 and antenna 2 electromagnetic wave signal for transmitting and receiving.Each antenna in user equipment can be used for covering
Single or multiple communication bands.Different antennas can also be multiplexed, to improve the utilization rate of antenna.Such as: it can be by antenna 1
It is multiplexed with the diversity antenna of WLAN.In other embodiments, antenna can be used in combination with tuning switch.
Mobile communication module 110 can be provided using the wireless communications such as including 2G/3G/4G/5G on a user device
Solution.Mobile communication module 110 may include at least one filter, switch, power amplifier, low-noise amplifier
(low noise amplifier, LNA) etc..Mobile communication module 110 can receive electromagnetic wave by antenna 1, and to received
Electromagnetic wave is filtered, and the processing such as amplification is sent to modem processor and is demodulated.Mobile communication module 110 can be with
The modulated signal of modulated demodulation processor is amplified, switchs to electromagenetic wave radiation through antenna 1 and goes out.In some embodiments,
At least partly functional module of mobile communication module 110 can be arranged in processor 103.In some embodiments, mobile
At least partly functional module of communication module 110 can be arranged on the same device at least partly module of processor 103
In part.
Modem processor may include modulator and demodulator.Wherein, modulator is used for low frequency base to be sent
Band signal is modulated into high frequency signal.Demodulator is used to received electromagnetic wave signal being demodulated into low frequency baseband signal.Then solution
Adjust device that the low frequency baseband signal that demodulation obtains is sent to baseband processor.Low frequency baseband signal through baseband processor at
After reason, it is delivered to application processor.Application processor passes through audio frequency apparatus (being not limited to loudspeaker 113, receiver 114 etc.)
Voice signal is exported, or image or video are shown by display screen 102.In some embodiments, modem processor can be with
It is independent device.In further embodiments, modem processor can be independently of processor 103, with mobile communication mould
Block 110 or other function module are arranged in the same device.
Wireless communication module 111 can be provided using on a user device including WLAN
(wirelesslocal area networks, WLAN) (such as Wireless Fidelity (wireless fidelity, Wi-Fi) network),
Bluetooth (bluetooth, BT), Global Navigation Satellite System (global navigation satellite system, GNSS),
Frequency modulation (frequency modulation, FM), the short distance wireless communication technology (near field communication,
NFC), the solution of the wireless communications such as infrared technique (infrared, IR).Wireless communication module 111 can be integrated into few
One or more devices of one Communications Processor Module.Wireless communication module 111 receives electromagnetic wave via antenna 2, by electromagnetic wave
Signal frequency modulation and filtering processing, by treated, signal is sent to processor 103.Wireless communication module 111 can also be from
Reason device 103 receives signal to be sent, and frequency modulation is carried out to it, amplifies, switchs to electromagenetic wave radiation through antenna 2 and go out.
In some embodiments, the antenna 1 of user equipment and mobile communication module 110 couple, antenna 2 and wireless communication
Module 111 couples, and allowing user equipment, technology is communicated with network and other equipment by wireless communication.It is described wireless
The communication technology may include global system for mobile communications (global system for mobile communications,
GSM), general packet radio service (general packet radio service, GPRS), CDMA access (code
Divisionmultiple access, CDMA), wideband code division multiple access (wideband code division multiple
Access, WCDMA), time division CDMA (time-division codedivision multiple access, TD-
SCDMA), long term evolution (long termevolution, LTE), BT, GNSS, WLAN, NFC, FM and/or IR technology etc..Institute
Stating GNSS may include GPS (global positioning system, GPS), global navigational satellite
System (globalnavigation satellite system, GLONASS), Beidou satellite navigation system (beidou
Navigationsatellite system, BDS), quasi- zenith satellite system (quasi-zenith satellite system,
) and/or satellite-based augmentation system (satellite based augmentation systems, SBAS) QZSS.
User equipment realizes display function by GPU, display screen 102 and application processor etc..GPU is image procossing
Microprocessor, connect display screen 102 and application processor.GPU is calculated for executing mathematics and geometry, is rendered for figure.
Processor 103 may include one or more GPU, execute program instructions to generate or change display information.
Display screen 102 is for showing image, video etc..Display screen 102 includes display panel.Display panel can use
Liquid crystal display (liquid crystal display, LCD), Organic Light Emitting Diode (organic light-
Emittingdiode, OLED), active matrix organic light-emitting diode or active-matrix organic light emitting diode (active-
Matrixorganic light emitting diode's, AMOLED), Flexible light-emitting diodes (flexlight-
Emittingdiode, FLED), Miniled, MicroLed, Micro-oLed, light emitting diode with quantum dots (quantum dot
Lightemitting diodes, QLED) etc..In some embodiments, user equipment may include 1 or N number of display screen
102, N be the positive integer greater than 1.
User equipment can pass through ISP, camera 121, Video Codec, GPU, display screen 102 and application processing
Device etc. realizes shooting function.
ISP is used to handle the data of the feedback of camera 121.For example, opening shutter when taking pictures, light is passed by camera lens
It is delivered on camera photosensitive element, optical signal is converted to electric signal, and the electric signal is passed to ISP by camera photosensitive element
Processing, is converted into macroscopic image.ISP can also be to the noise of image, brightness, colour of skin progress algorithm optimization.ISP is also
It can be to the exposure of photographed scene, the parameter optimizations such as colour temperature.In some embodiments, ISP can be set in camera 121.
Camera 121 is for capturing still image or video.Object generates optical imagery by camera lens and projects photosensitive member
Part.Photosensitive element can be charge-coupled device (charge coupled device, CCD) or complementary metal oxide is partly led
Body (complementary metal-oxide-semiconductor, CMOS) phototransistor.Photosensitive element is optical signal
It is converted into electric signal, electric signal is passed into ISP later and is converted into data image signal.Data image signal is output to by ISP
DSP working process.Data image signal is converted into the RGB of standard, the picture signal of the formats such as YUV by DSP.In some implementations
In example, user equipment may include 1 or N number of camera 121, and N is the positive integer greater than 1.
Digital signal processor, in addition to can handle data image signal, can also handle it for handling digital signal
His digital signal.For example, digital signal processor is used to carry out in Fu frequency point energy when user equipment is when frequency point selects
Leaf transformation etc..
Video Codec is used for compression of digital video or decompression.User equipment can support one or more views
Frequency codec.In this way, user equipment can play or record the video of a variety of coded formats, and such as: dynamic image expert group
(movingpicture experts group, MPEG) 1, MPEG2, mpeg 3, MPEG4 etc..
NPU is neural network (neural-network, NN) computation processor, by using for reference biological neural network structure,
Such as transfer mode between human brain neuron is used for reference, it, can also continuous self study to input information fast processing.Pass through NPU
The application such as intelligent cognition of user equipment may be implemented, such as: image recognition, recognition of face, speech recognition, text understanding etc..
External memory interface 104 can be used for connecting external memory card, such as MicroSD card, realize that extending user is set
Standby storage capacity.External memory card is communicated by external memory interface 104 with processor 103, realizes that data store function
Energy.Such as by music, the files such as video are stored in external memory card.
Internal storage 105 can be used for storing computer executable program code, and the executable program code includes
Instruction.Processor 103 is stored in the instruction of internal storage 105 by operation, answers thereby executing the various functions of user equipment
With and data processing.Internal storage 105 may include storing program area and storage data area.Wherein, storing program area can
Storage program area, application program (such as sound-playing function, image player function etc.) needed at least one function etc..
Storage data area can store the data (such as audio data, phone directory etc.) etc. created in user equipment use process.This
Outside, internal storage 105 may include high-speed random access memory, can also include nonvolatile memory, for example, at least
One disk memory, flush memory device, generic flash memory (universal flash storage, UFS) etc..
User equipment can pass through audio-frequency module 112, loudspeaker 113, receiver 114, microphone 115, earphone interface
Audio-frequency function is realized in 116 and application processor etc..Such as music, recording etc..
Audio-frequency module 112 is used to for digitized audio message to be converted into analog audio signal output, is also used for analogue audio frequency
Input is converted to digital audio and video signals.Audio-frequency module 112 can be also used for audio-frequency signal coding and decoding.In some implementations
In example, audio-frequency module 112 be can be set in processor 103, or the partial function module of audio-frequency module 112 is set to place
It manages in device 103.
Loudspeaker 113, also referred to as " loudspeaker ", for audio electrical signal to be converted to voice signal.User equipment can pass through
Loudspeaker 113 listens to music, or listens to hand-free call.
Receiver 114, also referred to as " earpiece ", for audio electrical signal to be converted into voice signal.When user equipment answers electricity
It, can be by the way that receiver 114 be answered voice close to human ear when words or voice messaging.
Microphone 115, also referred to as " microphone ", " microphone ", for voice signal to be converted to electric signal.When making a phone call
Or when sending voice messaging, voice signal can be input to microphone by mouth close to 115 sounding of microphone by user
115.At least one microphone 115 can be set in user equipment.In further embodiments, user equipment can be set two
Microphone 115 can also realize decrease of noise functions in addition to collected sound signal.In further embodiments, user equipment may be used also
With setting three, four or more microphone 115 is realized that collected sound signal, noise reduction can also identify sound source, is realized
Directional recording function etc..
Earphone interface 116 is for connecting wired earphone.Earphone interface 116 can be usb 1 06, be also possible to
Opening mobile electronic device platform (open mobile terminal platform, OMTP) standard interface of 3.5mm, the U.S.
Cellular telecommunication industrial association (cellular telecommunications industry association of the USA,
CTIA) standard interface.
Pressure signal can be converted into electric signal for experiencing pressure signal by pressure sensor 1171.In some implementations
In example, pressure sensor 1171 be can be set in display screen 102.There are many type of pressure sensor 1171, such as resistive pressure
Sensor, inductance pressure transducer, capacitance pressure transducer, etc..Capacitance pressure transducer, can be including at least two
A parallel-plate with conductive material.When effectively acting on pressure sensor 1171, the capacitor between electrode changes.User sets
The standby intensity that pressure is determined according to the variation of capacitor.When there is touch operation to act on display screen 102, user equipment is according to pressure
Sensor 1171 detects the touch operation intensity.User equipment can also be according to the detection signal meter of pressure sensor 1171
Calculate the position touched.In some embodiments, identical touch location, but the touch operation of different touch operation intensity are acted on,
Different operational orders can be corresponded to.Such as: when the touch operation for having touch operation intensity to be less than first pressure threshold value acts on
When short message application icon, the instruction for checking short message is executed.When have touch operation intensity be greater than or equal to first pressure threshold
When the touch operation of value acts on short message application icon, the instruction of newly-built short message is executed.
Gyro sensor 1172 is determined for the athletic posture of user equipment.In some embodiments, Ke Yitong
It crosses gyro sensor 1172 and determines that user equipment surrounds the angular speed of three axis (that is, x, y and z-axis).Gyro sensor
1172 can be used for shooting stabilization.Illustratively, when pressing shutter, gyro sensor 1172 detects user equipment shake
Angle goes out the distance that lens module needs to compensate according to angle calculation, camera lens is allowed to offset trembling for user equipment by counter motion
It is dynamic, realize stabilization.Gyro sensor 1172 can be also used for navigating, somatic sensation television game scene.
Baroceptor 1173 is for measuring air pressure.In some embodiments, user equipment passes through baroceptor 1173
The atmospheric pressure value measured calculates height above sea level, auxiliary positioning and navigation.
Magnetic Sensor 1174 includes Hall sensor.User equipment can use Magnetic Sensor 1174 and detect leather sheath 200
Folding.In some embodiments, when user equipment is liding machine, user equipment can be detected according to Magnetic Sensor 1174 and be turned over
The folding of lid.And then according to the folding condition of the leather sheath detected or the folding condition of flip lid, the spies such as setting flip lid automatic unlocking
Property.
Acceleration transducer 1175 can detect the size of user equipment (generally three axis) acceleration in all directions.
It can detect that size and the direction of gravity when user equipment is static.The posture that can be also used for identification user equipment, is applied to
Horizontal/vertical screen switching, the application such as pedometer.
Range sensor 1176, for measuring distance.User equipment can pass through infrared or laser distance measuring.One
In a little embodiments, photographed scene, user equipment can use 1176 ranging of range sensor to realize rapid focus.
It may include such as light emitting diode (LED) and photodetector, such as two pole of photoelectricity close to optical sensor 1177
Pipe.Light emitting diode can be infrared light-emitting diode.User equipment launches outward infrared light by light emitting diode.User
Equipment detects the infrared external reflection light from neighbouring object using photodiode.It, can be true when detecting sufficient reflected light
Determining user equipment nearby has object.When detecting insufficient reflected light, user equipment can determine that user equipment does not have nearby
There is object.User equipment can use to be conversed close to the detection user's hand-held consumer devices of optical sensor 1177 close to ear, so as to
Automatic distinguishing screen achievees the purpose that power saving.It can also be used for leather sheath mode, pocket pattern automatic unlocking close to optical sensor 1177
With screen locking.
Ambient light sensor 1181 is for perceiving environmental light brightness.User equipment can be according to the environmental light brightness of perception
102 brightness of automatic adjusument display screen.Automatic white balance adjustment when ambient light sensor 1181 can also be used for taking pictures.Environment light
Sensor 1181 can also cooperate with close to optical sensor 1177, user equipment be detected whether in pocket, with false-touch prevention.
Fingerprint sensor 1178 is for acquiring fingerprint.The fingerprint characteristic that user equipment can use acquisition realizes fingerprint solution
Lock accesses application lock, and fingerprint is taken pictures, fingerprint incoming call answering etc..
Temperature sensor 1179 is for detecting temperature.In some embodiments, user equipment utilizes temperature sensor 1179
The temperature of detection executes Temperature Treatment strategy.For example, when the temperature that temperature sensor 1179 reports is more than threshold value, user equipment
The performance for reducing the processor being located near temperature sensor 1179 is executed, implements Thermal protection to reduce power consumption.At other
In embodiment, when temperature is lower than another threshold value, user equipment heats battery 109, causes user equipment different to avoid low temperature
Often shutdown.In some other embodiment, when temperature is lower than another threshold value, user equipment holds the output voltage of battery 109
Row boosting, to avoid shutting down extremely caused by low temperature.
Touch sensor 1180, also referred to as " touch panel ".Touch sensor 1180 can be set in display screen 102, by touching
It touches sensor 1180 and display screen 102 forms touch screen, also referred to as " touch screen ".Touch sensor 1180 is acted on for detecting
Touch operation on or near it.The touch operation that touch sensor 1180 can will test passes to application processor, with
Determine touch event type.Visual output relevant to touch operation can be provided by display screen 102.In other implementations
In example, touch sensor 1180 also be can be set in the surface of user equipment main body 100, not with 102 location of display screen
Together.
The available vibration signal of bone conduction sensor 1182.In some embodiments, bone conduction sensor 1182 can be with
Obtain the vibration signal of human body part vibration bone block.Bone conduction sensor 1182 can also contact human pulse, receive blood pressure and jump
Dynamic signal.In some embodiments, bone conduction sensor 1182 also can be set in earphone, be combined into bone conduction earphone.Sound
Frequency module 112 can parse voice based on the vibration signal for the part vibration bone block that the bone conduction sensor 1182 obtains
Signal realizes phonetic function.The blood pressure jitter solution that application processor can be obtained based on the bone conduction sensor 1182
Heart rate information is analysed, realizes heart rate detecting function.
Key 118 includes power button (also referred to as switch key), volume key etc..Key 118 can be mechanical key, can also
To be touch-key.User equipment can receive key-press input, generate user setting and function control with user equipment
Related key signals input.
Motor 119 can produce vibration prompt.Motor 119 can be used for calling vibration prompt, can be used for touching vibration
Dynamic feedback.For example, acting on the touch operation of different application (such as taking pictures, audio broadcasting etc.), different vibrations can be corresponded to
Feedback effects.The touch operation of 102 different zones of display screen is acted on, motor 119 can also correspond to different vibrational feedback effects
Fruit.It is anti-that different application scenarios (such as: time alarm receives information, alarm clock, game etc.) can also correspond to different vibrations
Present effect.Touch vibrational feedback effect can also be supported customized.
Indicator 120 can be indicator light, can serve to indicate that charged state, electric quantity change can be used for instruction and disappear
Breath, missed call, notice etc..
SIM card interface 122 is for connecting SIM card.SIM card can connect by being inserted into SIM card interface 122, or from SIM card
Mouth 122 is extracted, and realization is contacting and separating with user equipment.User equipment can support 1 or N number of SIM card interface, N are big
In 1 positive integer.SIM card interface 122 can support Nano SIM card, Micro SIM card, SIM card etc..The same SIM card connects
Mouth 122 can be inserted into multiple cards simultaneously.The type of multiple cards may be the same or different.SIM card interface 122 can also
With the different types of SIM card of compatibility.SIM card interface 122 can also be with compatible external storage card.User equipment passes through SIM card and net
Network interaction, realizes the functions such as call and data communication.In some embodiments, user equipment uses eSIM, it may be assumed that embedded
SIM card.ESIM card can cannot separate in user equipment main body 100 with user equipment main body 100.
Specifically, input unit can be used for receiving the operation that user triggers shooting interface, the shooting of camera 121 is obtained
Image data, and send image data to processor 103.It, can be to the image after processor 103 receives image data
Data are further processed, including but not limited to: pattern, face and text etc. in identification image, and determination is identified
The region of the pattern, face and the text that arrive.
The software systems of user equipment 10 can use layer architecture, event-driven framework, micronucleus framework, micro services frame
Structure or cloud framework.The present embodiment is by taking the android system of layer architecture as an example, the software knot of exemplary illustration user equipment 10
Structure.
Fig. 3 is the software architecture diagram of user equipment provided by the embodiments of the present application.According to Fig. 3:
Software is divided into several layers by layer architecture, and each layer has clearly role and the division of labor.Pass through between layers
Software interface communication.In some embodiments, android system is divided into four layers, from top to bottom respectively application layer,
Application framework layer, (Android runtime) and system library and inner nuclear layer when Android is run.
Application layer may include a series of application packages.
As shown in figure 3, application package may include camera, and picture library, calendar, call, map, navigation, WLAN, bluetooth,
Music, video, the application programs such as short message.
Application framework layer provides Application Programming Interface for the application program of application layer
(applicationprogramming interface, API) and programming framework.Application framework layer includes some preparatory
The function of definition.
As shown in figure 3, application framework layer may include window manager, Content Provider, view system, phone
Manager, resource manager, notification manager etc..
Window manager is for managing window writing routine.The available display screen size of window manager, judges whether there is shape
State column, lock-screen, screen printing etc..
Content Provider is used to store and obtains data, and accesses these data by application program.The data
It may include video, image, audio, the phone dialed and answered, browsing history and bookmark, telephone directory etc..
View system includes visible controls, such as the control of display text, shows the control etc. of picture.View system can
For constructing application program.What display interface can be made of one or more views.E.g., including short massage notice icon
Display interface may include the view for showing text and the view for showing picture.
Telephone supervisor is for providing the communication function of user equipment 10.Such as talking state management (including connect,
It hangs up).
Resource manager provides various resources, such as localized strings, icon, picture, layout text for application program
Part, video file etc..
Notification manager allows application program to show notification information in status bar, can be used for conveying informing type
Message, can to disappear automatically after short stay, without user interaction.For example notification manager be used to inform that downloading is completed,
Prompting message etc..Notification manager, which can also be, appears in system head status bar with chart or scroll bar textual form
Notice, for example, running background application program notice, can also be occur notice on the screen in the form of dialog box.
Such as text information is prompted in status bar, issue prompt tone, vibration of electronic equipment, indicator light flashing etc..
System library may include multiple functional modules.Such as: surface manager (surface manager), media library
(Media Libraries), three-dimensional graph process library (such as: OpenGL ES), 2D graphics engine (such as: SGL) etc..Surface
Manager provides the fusion of 2D and 3D figure layer for being managed to display subsystem for multiple application programs.Media
Support a variety of common audios, video format playback and recording and static image file etc. in library.Media library can be supported more
Kind audio/video coding format, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG etc..Three-dimensional graph process library is for real
Existing 3-D graphic is drawn, image rendering, synthesis and figure layer process etc..2D graphics engine is the drawing engine that 2D draws.Kernel
Layer is the layer between hardware and software.Inner nuclear layer includes at least display driving, webcam driver, audio driven, sensor drive
It is dynamic.
Based on the structure of above-mentioned user equipment 10, the embodiment of the present application also provides a kind of certificates for mobile terminal
Scan method.The papers-scanning method can be realized in user equipment 10 provided by the above embodiment.Optionally, the certificate
The specific implementation process of scan method can refer to Fig. 4, and Fig. 4 is one kind of papers-scanning method provided by the embodiments of the present application
The flow diagram of embodiment.In conjunction with Fig. 4 it is found that the papers-scanning method can be implemented as steps described below:
S101, from the image taken, identification meets the pattern of pre-set image mark.
Wherein, pre-set image mark refers to presetting the identification informations such as pattern, portrait and text, these mark letters
Breath is recorded in the internal storage 105 of user equipment main body by way of shifting to an earlier date typing;Pre-set image mark is logged
Afterwards, cloud server can also be uploaded to by wireless network.
Specifically, many patterns are all often some specific patterns, user equipment main body can be further according to identifying
The pattern arrived determines the type of the card object.Such as: the pattern identified is Unionpay's mark, then determines card object
For bank card;Again for example: identification obtain the background patterns of card object be badge and background be blue identity card background, then
Determine that card object is identity card.
In a particular application, this reality is executed in the app in need for carrying out real-name authentication (or scanning/upload identity card)
A scheme is applied, the real-name authentication page can be specifically entered, the page that scanning uploads card object is clicked to enter, by card object
It is placed on a certain plane, keeps mobile phone parallel with the plane;Appear in card object in the view-finder for the page of taking pictures/upload, and
Without alignment, clicks focusing and start to scan.
S102 obtains position and the angle of the card object according to the pattern of identification.
S103 shows view-finder in shooting interface according to the position of the card object and angle.
Wherein, the display position of the view-finder matches the position of the card object, the angle automatching of the view-finder
The angle of the card object.
In the present embodiment, image identification fixed on card object (such as the Unionpay on certificate is locked by image recognition
Mark), and image identification is scanned, the edge separation of picture position is found, determines that card subject image identifies tilt angle
With rectangular outer frame size, in view of the setting of image identifications certain on card object (such as: Unionpay identify) position, size and and card
Object proportionate relationship is fixed, therefore the position according to image identification, size, proportionate relationship, calculates certificate outer profile,
And then certificate is separated from scan image.
By the view-finder of generation, actively the identical card object taken, user can save the mistake of alignment rectangle frame
The image of the cards objects such as scanning separation bank card and upload need to only can be completed in journey according to process of normally taking pictures.It compares existing
Mode, which scans, greatlys save the time, promotes scanning/upload certificate success rate.In practical applications, original scanning mode about needs
Want 15-20 seconds and will appear can not be aligned, the problems such as hand shaking is fuzzy in alignment procedure, success rate is low.The present embodiment then only needs 2-
It can be completed within 3 seconds, scanning/upload success rate can also be substantially improved.
In the present embodiment, step S102: the pattern according to identification obtains the position and angle of the card object
Degree, specifically may be implemented are as follows:
According to the type of the card object, the contour mould of the card object is determined.According to the pattern described
The position in interface and angle are shot, position and angle of the pre-set image mark in the card object is compareed, obtains
The position of the card object and angle.
It wherein, include that the default shape of the card object and pre-set image mark exist in the contour mould
Position and angle in the card object.Such as shown in Fig. 5 a, when mobile phone Text region detect bank card exist with it is pre-
If identifying that the image identification is positioned against when the same pattern of image identification (pattern for recognizing Unionpay).
Further, after the pattern that identification meets pre-set image mark, further includes:
According to position and orientation of the pattern in the shooting interface, the tilt angle of the pattern is obtained.Specifically
As shown in Figure 5 b, it can be positioned against according to image identification (pattern), calculate the inclination angle alpha of the image identification (pattern)
(i.e. with the angle with picture level position).Boundary point and institute after the boundary point for determining the pattern, using the pattern
The tilt angle of pattern is stated, the rectangle frame for covering the pattern is obtained.For example, finding and determining the image identification (pattern)
4, upper and lower, left and right (i.e. A, B, C, D) boundary point, as shown in Figure 5 c.It can be inclined later by 4 boundary points and text
Rake angle α determines certificate number image identification (pattern) rectangle frame M, as fig 5d.
Specifically, described show view-finder in the shooting interface according to the position and angle of the card object
Method, comprising:
According to the rectangle frame of the contour mould and the covering pattern, the profile of the card object is determined.According to institute
The current profile of card object described in shooting interface is stated, view-finder is generated.By view-finder generated, the bat is covered
Take the photograph the current profile of card object described in interface.Such as: as depicted in fig. 5e, if M a length of l, width d;If the outer rectangle of certificate
Profile is Q, if Q a length of L, width D.Later, as shown in Figure 6 a, according to pre-set image mark (Unionpay's mark) in bank card
Position and size relationship L1/L2=k1, L3/L2=k2, D1/D2=k3, D3/D2=k4 on (certificate).Under it
Side and the left side are established plane coordinate system and are set in image identification (pattern) (Unionpay's mark) rectangle frame M as reference axis X-axis, Y-axis
Heart point is O1 (x1, y1), and bank card (certificate) rectangle frame central point is O2 (x2, y2).
So as to obtain O1 coordinate x1=L2/2, y1=D2/2;Bank card (certificate) outer profile rectangle frame Q long L=k1
× L2, wide D=k3 × L2.
Bank card (certificate) rectangle frame central point O2 coordinate may further be calculated are as follows:
X2=x1-L1/2-L2/2-L3/2=L2/2-k1 × L2/2-L2/2-k2 × L2/2=- (k1+k2) × L2/2;
Y2=y1-D1/2-D2/2-D3/2=D2/2-k3 × L2/2-L2/2-k4 × L2/2=- (k3+k4) × D2/2;
Wherein, proportionality coefficient k1, k2, k3, k4 it is known that can the design standard according to disclosed in bank card, identity card etc. obtain
It takes.
Again by the long l of rectangle frame M, width d, certificate outer profile rectangle frame Q long L=k1 × l can be calculated by substituting into formula,
Wide D=k3 × d.Central point O1 coordinate are as follows: X1=- (k1+k2) × l/2, Y1=- (k3+k4) × d/2;Further calculate out square
Shape frame Q central point O2 (x2, y2) specific value.
Length and width size and the position that bank card (certificate) outer profile rectangle frame Q is determined according to above-mentioned calculating, such as Fig. 6 b institute
Show.Bank card (certificate) outer profile rectangle frame Q is isolated as view-finder from photo again, during the central point O with Q is
The heart, rotation alpha counterclockwise as fig. 6 c, until horizontal position, saves and uploads image.
For concrete example, the scanning process of system of real name certificate as shown in Figure 7:
The function is opened in the app in need for carrying out real-name authentication (or scanning/upload identity card).
1. entering the real-name authentication page, clicks to enter scanning and upload the certificate page, certificate is placed on a certain plane, is made
Mobile phone is parallel with the plane;
2. appearing in certificate in the view-finder for the page of taking pictures/upload, without alignment, clicks focusing and start to scan;
3. when mobile phone Text region detects that bank card (certificate) has the pattern the same with pre-set image mark, knowledge
The image identification is not positioned against, such as Fig. 5 a;
4. be positioned against according to image identification, calculate the image identification inclination angle alpha (i.e. with picture level position
Angle) such as Fig. 5 b;
5. 4, upper and lower, left and right (i.e. A, B, the C, D) boundary point of the image identification is found and determines, such as Fig. 5 c;
6. certificate number image identification rectangle frame M is determined, such as Fig. 5 d by 4 boundary points and text inclination angle alpha;
7. position and size relationship L1/L2=k1 on bank card (certificate) are identified according to known image,
L3/L2=k2, D1/D2=k3, D3/D2=k4;As Fig. 6 a is established flat using its following and left side as reference axis X-axis, Y-axis
Areal coordinate system sets image identification (Unionpay's mark) rectangle frame M central point as O1 (x1, y1), bank card (certificate) rectangle frame center
Point is O2 (x2, y2) such as Fig. 5 e;
It can be concluded that O1 coordinate x1=L2/2, y1=D2/2;
Bank card (certificate) outer profile rectangle frame Q long L=k1 × L2, wide D=k3 × L2;
Bank card (certificate) rectangle frame central point O2 coordinate can be calculated are as follows:
X2=x1-L1/2-L2/2-L3/2=L2/2-k1 × L2/2-L2/2-k2 × L2/2=- (k1+k2) × L2/2;
Y2=y1-D1/2-D2/2-D3/2=D2/2-k3 × L2/2-L2/2-k4 × L2/2=- (k3+k4) × D2/2.
8. by the long l of rectangle frame M, width d, certificate outer profile rectangle frame Q long L=k1 × l can be calculated by substituting into formula,
Wide D=k3 × d.Central point O1 coordinate are as follows: X1=- (k1+k2) × l/2, Y1=- (k3+k4) × d/2;Further calculate out square
Shape frame Q central point O2 (x2, y2) specific value;The length and width of bank card (certificate) outer profile rectangle frame Q are determined according to above-mentioned calculating
Size and position;
9. bank card (certificate) outer profile rectangle frame Q is separated from photo, it is inverse centered on the central point O of Q
Hour hands rotation alpha saves and uploads image, such as Fig. 6 c to horizontal position.
Using image identification fixed in the image identification identification bank card of default fixation, and then calculate the image identification
Current tilt angle α.Known inclination angle alpha is further combined by image recognition, finds out pattern identification surrounding distal-most edge wheel
Wide point tetra- points of A, B, C, D, and then lock image identifies region-rectangle frame M.According to the known image identification (such as silver
Connection mark, badge mark) position on bank card (certificate) and size relationship, it can be deduced that bank card (certificate)
The size of outer profile rectangle frame Q, position, and then separate and save upload pictures.
It in a particular application, can be there are many embodiment.Such as: in addition to the scanning certificate back side can also pass through permit identification
Part front badge pattern further locks badge pattern rectangular profile outline border and its inclination angle by identification image (red)
Degree, it is further further according to the badge rectangular outer frame profile position/proportionate relationship fixed with certificate outline border profile, it calculates current
The position of certificate outline border profile, size.Certificate direct picture is separated from background, rotates to horizontal position, save/
It uploads.
Optionally, user equipment main body can also be initial in the shooting interface after showing the shooting interface
Position shows default view-finder with initial angle.Wherein, default view-finder can be the existing form of expression, such as in bat
Take the photograph the center at interface and the sides aligned parallel relative to shooting interface, i.e., the form of existing view-finder of taking pictures.According to the shooting
The current profile of card object described in interface refreshes the angles and positions of the default view-finder, obtains covering the shooting
The view-finder of the current profile of card object described in interface.
Wherein, the angles and positions for refreshing the default view-finder, comprising: obtain position difference and angle difference.
According to the position difference and the angle difference, transition cartoon is played.In the angles and positions for refreshing the default view-finder
During, play transition cartoon.
Wherein, the position difference are as follows: the initial position and card object described in the covering shooting interface are current
Profile view-finder position between difference, the angle difference are as follows: the initial angle and cover the shooting interface
Described in the current profile of card object view-finder angle difference.The angle for being initiated with default view-finder of transition cartoon
Degree and position, the termination of transition cartoon are as follows: the view-finder of the current profile of card object described in the covering shooting interface
Position and angle.
The embodiment of the present invention also provides a kind of papers-scanning device for mobile terminal, which can pass through program
Code realizes that in software environment as shown in Figure 3, as shown in Figure 8 includes:
Image pre-processing module, for from the image taken, identification to meet the pattern of pre-set image mark;
Image manages module and obtains position and the angle of the card object for the pattern according to identification;
View-finder generation module shows in shooting interface for the position and angle according to the card object and finds a view
Frame, wherein the display position of the view-finder matches the position of the card object, described in the angle automatching of the view-finder
The angle of card object.
Described image manages module and determines the profile of the card object specifically for the type according to the card object
Template, wherein include that the default shape of the card object and the pre-set image are identified in institute in the contour mould
State the position in card object and angle;According to the pattern in the position shot in interface and angle, compare described pre-
If position and angle of the image identification in the card object, obtain position and the angle of the card object.
Described image manages module, is also used to after the pattern that identification meets pre-set image mark, is existed according to the pattern
Position and orientation in the shooting interface, obtain the tilt angle of the pattern;It determines the boundary point of the pattern, utilizes
The tilt angle of the boundary point of the pattern and the pattern obtains the rectangle frame for covering the pattern.
The view-finder generation module, specifically for the rectangle frame according to the contour mould and the covering pattern, really
The profile of the fixed card object;
According to the current profile of card object described in the shooting interface, view-finder is generated;
By view-finder generated, the current profile of card object described in the shooting interface is covered.
The view-finder generation module is also used to the current profile of the card object according to the shooting interface, brush
The angles and positions of the new default view-finder obtain covering the current profile of card object described in the shooting interface
View-finder;Wherein, it after showing the shooting interface, in the initial position shot in interface, is shown and is defaulted with initial angle
View-finder.
The view-finder generation module is specifically used for obtaining position difference and angle difference, the position difference are as follows: institute
State the difference between the position of the view-finder of the current profile of card object described in initial position and the covering shooting interface
Value, the angle difference are as follows: the initial angle profile current with card object described in the shooting interface is covered takes
The difference of the angle of scape frame;According to the position difference and the angle difference, transition cartoon is played.
In the specific implementation, the embodiment of the present application also provides a kind of computer storage mediums, wherein computer storage
Medium can be stored with program, and described program includes instruction, which may include the portion of method of payment provided by the present application when executing
Point or Overall Steps.The storage medium can for magnetic disk, CD, read-only memory (read-only memory,
) or random access memory (random access memory, RAM) etc. ROM.
It is required that those skilled in the art can be understood that the technology in the embodiment of the present application can add by software
The mode of general hardware platform realize.Based on this understanding, the technical solution in the embodiment of the present application substantially or
Say that the part that contributes to existing technology can be embodied in the form of software products, which can be with
It is stored in a storage medium, such as ROM/RAM, magnetic disk, CD, including some instructions are used so that a computer equipment (can
To be personal computer, server or wireless telecom equipment etc.) execute each embodiment of the application or embodiment certain
Method described in a little parts.
The various pieces of this specification are all made of progressive mode and are described, same and similar between each embodiment
Part may refer to each other, and what each embodiment introduced is and other embodiments difference.In addition, unless there are phase
Anti- explanation, the embodiment of the present application refer to that the ordinal numbers such as " first " and " second " for distinguishing to multiple objects, do not have to
In the sequence for limiting multiple objects.
Although the preferred embodiment of the application has been described, once a person skilled in the art knows basic wounds
The property made concept, then additional changes and modifications may be made to these embodiments.It is wrapped so the following claims are intended to be interpreted as
It includes preferred embodiment and falls into all change and modification of the application range.
Above-described the application embodiment does not constitute the restriction to the application protection scope.
Claims (12)
1. a kind of papers-scanning method for mobile terminal characterized by comprising
From the image taken, identification meets the pattern of pre-set image mark;
According to the pattern of identification, position and the angle of the card object are obtained;
View-finder is shown in shooting interface according to the position of the card object and angle, wherein the display of the view-finder
The position of card object described in location matches, the angle of card object described in the angle automatching of the view-finder.
2. the method according to claim 1, wherein the pattern according to identification, obtains the card object
Position and angle, comprising:
According to the type of the card object, the contour mould of the card object is determined, wherein include in the contour mould
The default shape of the card object and the pre-set image identify position and angle in the card object;
According to the pattern in the position shot in interface and angle, the pre-set image mark is compareed in the card object
Position and angle in body obtain position and the angle of the card object.
3. according to the method described in claim 2, it is characterized in that, being gone back after the pattern that identification meets pre-set image mark
Include:
According to position and orientation of the pattern in the shooting interface, the tilt angle of the pattern is obtained;
The boundary point for determining the pattern obtains covering institute using the boundary point of the pattern and the tilt angle of the pattern
State the rectangle frame of pattern.
4. according to the method described in claim 3, it is characterized in that, the position and angle according to the card object is in institute
It states in shooting interface and shows view-finder, comprising:
According to the rectangle frame of the contour mould and the covering pattern, the profile of the card object is determined;
According to the current profile of card object described in the shooting interface, view-finder is generated;
By view-finder generated, the current profile of card object described in the shooting interface is covered.
5. the method according to claim 1, wherein further include:
After showing the shooting interface, in the initial position shot in interface, default view-finder is shown with initial angle;
According to the current profile of card object described in the shooting interface, refresh the angles and positions of the default view-finder,
Obtain covering the view-finder of the current profile of card object described in the shooting interface.
6. according to the method described in claim 5, it is characterized in that, it is described refresh it is described default view-finder angles and positions,
Include:
Obtain position difference and angle difference, the position difference are as follows: institute in the initial position and the covering shooting interface
State the difference between the position of the view-finder of the current profile of card object, the angle difference are as follows: the initial angle with cover
Cover the difference of the angle of the view-finder of the current profile of card object described in the shooting interface;
According to the position difference and the angle difference, transition cartoon is played.
7. a kind of papers-scanning device for mobile terminal characterized by comprising
Image pre-processing module, for from the image taken, identification to meet the pattern of pre-set image mark;
Image manages module and obtains position and the angle of the card object for the pattern according to identification;
View-finder generation module, for showing view-finder in shooting interface according to the position and angle of the card object,
In, the display position of the view-finder matches the position of the card object, card object described in the angle automatching of the view-finder
The angle of body.
8. device according to claim 7, which is characterized in that described image manages module, is specifically used for according to the card
The type of object, determines the contour mould of the card object, wherein includes the card object in the contour mould
The position and angle of default shape and pre-set image mark in the card object;According to the pattern in the bat
The position in interface and angle are taken the photograph, position and angle of the pre-set image mark in the card object is compareed, obtains institute
State position and the angle of card object.
9. device according to claim 8, which is characterized in that described image manages module, is also used to meet in identification default
After the pattern of image identification, according to position and orientation of the pattern in the shooting interface, inclining for the pattern is obtained
Rake angle;The boundary point for determining the pattern obtains covering using the boundary point of the pattern and the tilt angle of the pattern
The rectangle frame of the pattern.
10. device according to claim 9, which is characterized in that the view-finder generation module is specifically used for according to
Contour mould and the rectangle frame for covering the pattern, determine the profile of the card object;
According to the current profile of card object described in the shooting interface, view-finder is generated;
By view-finder generated, the current profile of card object described in the shooting interface is covered.
11. device according to claim 7, which is characterized in that the view-finder generation module is also used to according to the bat
The current profile of card object described in interface is taken the photograph, refreshes the angles and positions of the default view-finder, obtains covering the bat
Take the photograph the view-finder of the current profile of card object described in interface;
Wherein, it after showing the shooting interface, in the initial position shot in interface, is found a view with initial angle display default
Frame.
12. device according to claim 11, which is characterized in that the view-finder generation module is specifically used for obtaining position
Set difference and angle difference, the position difference are as follows: card object described in the initial position and the covering shooting interface
Difference between the position of the view-finder of current profile, the angle difference are as follows: the initial angle and the covering shooting
The difference of the angle of the view-finder of the current profile of card object described in interface;According to the position difference and the differential seat angle
Value plays transition cartoon.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910461705.6A CN110138999B (en) | 2019-05-30 | 2019-05-30 | Certificate scanning method and device for mobile terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910461705.6A CN110138999B (en) | 2019-05-30 | 2019-05-30 | Certificate scanning method and device for mobile terminal |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110138999A true CN110138999A (en) | 2019-08-16 |
CN110138999B CN110138999B (en) | 2022-01-07 |
Family
ID=67582910
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910461705.6A Active CN110138999B (en) | 2019-05-30 | 2019-05-30 | Certificate scanning method and device for mobile terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110138999B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110647881A (en) * | 2019-09-19 | 2020-01-03 | 腾讯科技(深圳)有限公司 | Method, device, equipment and storage medium for determining card type corresponding to image |
CN112405518A (en) * | 2019-08-23 | 2021-02-26 | 深圳拓邦股份有限公司 | Robot control method, robot and automatic backtracking system of robot |
CN113411477A (en) * | 2021-06-10 | 2021-09-17 | 支付宝(杭州)信息技术有限公司 | Image acquisition method, device and equipment |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101625760A (en) * | 2009-07-28 | 2010-01-13 | 谭洪舟 | Method for correcting certificate image inclination |
CN103473541A (en) * | 2013-08-21 | 2013-12-25 | 方正国际软件有限公司 | Certificate perspective correction method and system |
JP2015191531A (en) * | 2014-03-28 | 2015-11-02 | 株式会社トッパンTdkレーベル | Determination method of spatial position of two-dimensional code, and device therefor |
CN105825243A (en) * | 2015-01-07 | 2016-08-03 | 阿里巴巴集团控股有限公司 | Method and device for certificate image detection |
CN108764344A (en) * | 2018-05-29 | 2018-11-06 | 北京物灵智能科技有限公司 | A kind of method, apparatus and storage device based on limb recognition card |
CN109034165A (en) * | 2018-07-06 | 2018-12-18 | 北京中安未来科技有限公司 | A kind of cutting method of certificate image, device, system and storage medium |
-
2019
- 2019-05-30 CN CN201910461705.6A patent/CN110138999B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101625760A (en) * | 2009-07-28 | 2010-01-13 | 谭洪舟 | Method for correcting certificate image inclination |
CN103473541A (en) * | 2013-08-21 | 2013-12-25 | 方正国际软件有限公司 | Certificate perspective correction method and system |
JP2015191531A (en) * | 2014-03-28 | 2015-11-02 | 株式会社トッパンTdkレーベル | Determination method of spatial position of two-dimensional code, and device therefor |
CN105825243A (en) * | 2015-01-07 | 2016-08-03 | 阿里巴巴集团控股有限公司 | Method and device for certificate image detection |
CN108764344A (en) * | 2018-05-29 | 2018-11-06 | 北京物灵智能科技有限公司 | A kind of method, apparatus and storage device based on limb recognition card |
CN109034165A (en) * | 2018-07-06 | 2018-12-18 | 北京中安未来科技有限公司 | A kind of cutting method of certificate image, device, system and storage medium |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112405518A (en) * | 2019-08-23 | 2021-02-26 | 深圳拓邦股份有限公司 | Robot control method, robot and automatic backtracking system of robot |
CN110647881A (en) * | 2019-09-19 | 2020-01-03 | 腾讯科技(深圳)有限公司 | Method, device, equipment and storage medium for determining card type corresponding to image |
CN110647881B (en) * | 2019-09-19 | 2023-09-05 | 腾讯科技(深圳)有限公司 | Method, device, equipment and storage medium for determining card type corresponding to image |
CN113411477A (en) * | 2021-06-10 | 2021-09-17 | 支付宝(杭州)信息技术有限公司 | Image acquisition method, device and equipment |
CN113411477B (en) * | 2021-06-10 | 2023-03-10 | 支付宝(杭州)信息技术有限公司 | Image acquisition method, device and equipment |
Also Published As
Publication number | Publication date |
---|---|
CN110138999B (en) | 2022-01-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110506416A (en) | A kind of method and terminal of terminal switching camera | |
CN110072070A (en) | A kind of multichannel kinescope method and equipment | |
CN109766043A (en) | The operating method and electronic equipment of electronic equipment | |
CN110119295A (en) | A kind of display control method and relevant apparatus | |
CN110248081A (en) | Image capture method and electronic equipment | |
WO2021036585A1 (en) | Flexible screen display method and electronic device | |
CN110231905A (en) | A kind of screenshotss method and electronic equipment | |
KR20210064330A (en) | Methods and electronic devices for displaying images during photo taking | |
CN112351156B (en) | Lens switching method and device | |
CN110401767B (en) | Information processing method and apparatus | |
CN109559270A (en) | A kind of image processing method and electronic equipment | |
CN110248037B (en) | Identity document scanning method and device | |
US11470246B2 (en) | Intelligent photographing method and system, and related apparatus | |
CN109793498A (en) | A kind of skin detecting method and electronic equipment | |
WO2020088633A1 (en) | Payment method, device, and user equipment unit | |
CN109903260A (en) | Image processing method and image processing apparatus | |
CN113542580B (en) | Method and device for removing light spots of glasses and electronic equipment | |
CN110458902A (en) | 3D illumination estimation method and electronic equipment | |
CN114615423A (en) | Method and equipment for processing callback stream | |
CN110138999A (en) | A kind of papers-scanning method and device for mobile terminal | |
CN111552451A (en) | Display control method and device, computer readable medium and terminal equipment | |
CN109842723A (en) | Terminal and its screen brightness control method and computer readable storage medium | |
CN109756614A (en) | A kind of method and relevant apparatus showing contact person | |
US11816494B2 (en) | Foreground element display method and electronic device | |
CN111249728B (en) | Image processing method, device and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP03 | Change of name, title or address |
Address after: 210042 No.1, Suning Avenue, Xuanwu District, Nanjing City, Jiangsu Province Patentee after: Shanghai Star Map Financial Services Group Co.,Ltd. Address before: 210042 No.1, Suning Avenue, Xuanwu District, Nanjing City, Jiangsu Province Patentee before: Suning Financial Services (Shanghai) Co.,Ltd. |
|
CP03 | Change of name, title or address |