CN112468723A - Focusing method and payment equipment - Google Patents

Focusing method and payment equipment Download PDF

Info

Publication number
CN112468723A
CN112468723A CN202011335261.0A CN202011335261A CN112468723A CN 112468723 A CN112468723 A CN 112468723A CN 202011335261 A CN202011335261 A CN 202011335261A CN 112468723 A CN112468723 A CN 112468723A
Authority
CN
China
Prior art keywords
payment
mode
focal length
face
color camera
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011335261.0A
Other languages
Chinese (zh)
Inventor
冯上栋
郑龙
黄泽洋
刘风雷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Dongguan Ekos Technology Co Ltd
Original Assignee
Dongguan Ekos Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Dongguan Ekos Technology Co Ltd filed Critical Dongguan Ekos Technology Co Ltd
Priority to CN202011335261.0A priority Critical patent/CN112468723A/en
Publication of CN112468723A publication Critical patent/CN112468723A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/67Focus control based on electronic image sensor signals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/30Payment architectures, schemes or protocols characterised by the use of specific devices or networks
    • G06Q20/32Payment architectures, schemes or protocols characterised by the use of specific devices or networks using wireless devices
    • G06Q20/327Short range or proximity payments by means of M-devices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/401Transaction verification
    • G06Q20/4014Identity check for transactions
    • G06Q20/40145Biometric identity checks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/61Control of cameras or camera modules based on recognised objects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/61Control of cameras or camera modules based on recognised objects
    • H04N23/611Control of cameras or camera modules based on recognised objects where the recognised objects include parts of the human body
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/667Camera operation mode switching, e.g. between still and video, sport and normal or high- and low-resolution modes

Abstract

The application provides a focusing method and payment equipment, wherein the method comprises the following steps: determining a corresponding payment mode according to the current payment scene; when the payment mode is the code scanning payment mode, the color camera shooting mechanism is adjusted to be a first preset focal length in the fixed focus mode, so that the payment equipment can identify the payment code in the first identification range, wherein the color camera shooting mechanism in the first preset focal length can clearly acquire the payment code image in the first identification range; when the payment mode is the face payment mode, the color camera shooting mechanism is adjusted to be a second preset focal length in the fixed focus mode, so that the payment equipment can identify the face in the second identification range, and the color camera shooting mechanism in the second preset focal length can clearly acquire the face image in the second identification range. Therefore, efficient payment code identification can be carried out, the success rate of identification is improved, and the payment efficiency is further improved. In addition, the requirement of manufacturers on the focusing precision of the color imaging mechanism can be reduced.

Description

Focusing method and payment equipment
Technical Field
The application relates to the technical field of optics, in particular to a focusing method and payment equipment.
Background
With the outbreak of face payment and code scanning payment, many manufacturers begin to develop and produce products for face payment and code scanning payment, such as face payment and code scanning payment of pay pal, wechat, and the like. How to improve the efficiency of face payment and code scanning payment becomes one of the research directions of many manufacturers, for example, a payment recognition product is required to satisfy both short-distance code scanning recognition and long-distance face recognition. However, it is one of the prerequisites for efficient payment that the system rapidly acquires clear images (e.g., payment code images, face images, etc.).
For example, the working distance of a face payment product with a 3D (3-Dimension) structured light module is generally 30cm to 120 cm. Because the face payment products commonly used need to meet not only face payment but also two-dimensional code scanning payment. In order to meet the requirements of the two points, the face recognition is required to be clear at a long distance (for example, 50cm), and the two-dimensional code recognition is required to be clear at a short distance (for example, 10-30 cm). Generally, an RGB (Red, Green, Blue) camera in the 3D structured light module has an auto-focusing function, and can perform both long-distance and short-distance clear imaging. The lens of the RGB camera may be pushed by a motor (a device that pushes the lens to extend and retract). For focusing of the lens under the condition, the requirement that the RGB camera is in a distance of 10-120 cm is met, and automatic focusing can be clear.
Therefore, when the payment recognition products on the market meet the requirements of face payment and code scanning payment, the focusing strategy adopted in the current payment recognition products is as follows: when the human face is identified, the mode is switched to a fixed focus mode, namely a motor is fixed at a certain position, so that when the human face is in a distance of 30-120 cm, a product can obtain a clear human face image; and the code scanning mode is switched back to the automatic focusing mode. However, this method has problems: in a technical aspect, focusing of AF (Automatic focusing) needs to be adjusted in place, and it is ensured that the AF can be clearly focused when the AF is focused, and since the AF is related to the number of steps and the step length of the setting of ambient light and focusing parameters, it may be impossible to clearly Focus instantly, which may cause failure in recognizing the two-dimensional code, thereby affecting recognition efficiency. Moreover, the consistency requirement of the module is high in this way, because a version parameter needs to be called to adapt to all products.
Disclosure of Invention
An object of the embodiment of the application is to provide a focusing method and payment equipment, so that the requirement on AF focusing accuracy of an RGB module manufacturer is reduced, the recognition success rate in a code scanning mode is improved, and the payment efficiency is improved.
In order to achieve the above object, embodiments of the present application are implemented as follows:
in a first aspect, an embodiment of the present application provides a focusing method, where the method is applied to a payment device, the payment device has a face payment mode and a code scanning payment mode, the code scanning payment mode is applied to a first identification range, the face payment mode is applied to a second identification range, and the first identification range and the second identification range, when summed, cover a payment identification range of the payment device, the payment device includes a color camera mechanism, and the method includes: determining a corresponding payment mode according to the current payment scene; when the corresponding payment mode is the code scanning payment mode, adjusting the color camera mechanism to be a first preset focal length in a fixed focus mode so that the payment equipment can identify the payment code in the first identification range, wherein the color camera mechanism in the first preset focal length can clearly acquire the payment code image in the first identification range; and when the corresponding payment mode is the face payment mode, adjusting the color camera shooting mechanism to be a second preset focal length in a fixed-focus mode so as to enable the payment equipment to identify the face in the second identification range, wherein the color camera shooting mechanism in the second preset focal length can clearly acquire the face image in the second identification range.
In the embodiment of the application, a corresponding payment mode is determined through a current payment scene, so that according to different payment modes, the focal length of the color camera mechanism in the fixed focus mode is adjusted (for example, for the code scanning payment mode, the color camera mechanism is adjusted to be a first preset focal length in the fixed focus mode, and for the face payment mode, the color camera mechanism is adjusted to be a second preset focal length in the fixed focus mode), so that the payment device identifies the payment code in the first identification range (the color camera mechanism in the first preset focal length can clearly acquire the payment code image in the first identification range), or identifies the face in the second identification range (the color camera mechanism in the second preset focal length can clearly acquire the face image in the second identification range). In such a way, when a long-distance (30-120 cm) human face is identified, the human face image can be clearly obtained according to the second preset focal length in the fixed focus mode, and efficient human face identification is carried out; and when payment code discernment closely, according to the first focus of predetermineeing under the fixed focus mode, clear acquisition payment code image carries out efficient payment code discernment to can promote the success rate of discernment, further promote payment efficiency. In addition, the mode does not depend on the automatic focusing mode of the color imaging mechanism, and a manufacturer does not need to focus high-precision adaptive parameters, so that the requirement of the manufacturer on the focusing precision of the color imaging mechanism can be reduced.
With reference to the first aspect, in a first possible implementation manner of the first aspect, the payment apparatus further includes a focus motor for adjusting a focal length of the color camera, where the adjusting the color camera to a first preset focal length in a fixed focus mode includes: and generating a first signal for controlling the focusing motor to run to a preset first stroke value according to the code scanning payment mode, and controlling the focusing motor to run to the first stroke value according to the first signal, wherein when the focusing motor is located at the first stroke value, the focal length of the color camera mechanism is the first preset focal length.
In this implementation, payment equipment can generate first control signal when sweeping sign indicating number payment mode, control focusing motor and move to the first travel value of predetermineeing for the focus of color camera shooting mechanism is first predetermined focal length, thereby guarantees the clear discernment to the payment sign indicating number, promotes payment sign indicating number discernment success rate and sweeps a sign indicating number payment efficiency.
With reference to the first aspect, in a second possible implementation manner of the first aspect, the payment apparatus further includes a focus motor for adjusting a focal length of the color camera, where the adjusting the color camera to a second preset focal length in a fixed focus mode includes: and generating a second signal for controlling the focusing motor to run to a preset second stroke value according to the code scanning payment mode, and controlling the focusing motor to run to the second stroke value according to the second signal, wherein when the focusing motor is located at the second stroke value, the focal length of the color camera mechanism is the second preset focal length.
In this implementation, the payment device can generate a second control signal when sweeping the code payment mode, and control the focusing motor to run to a preset second stroke value, so that the focal length of the color camera shooting mechanism is a second preset focal length, thereby ensuring the clear recognition of the face and ensuring the face recognition success rate and the face payment efficiency.
With reference to the first aspect, in a third possible implementation manner of the first aspect, the determining a corresponding payment mode according to a current payment scenario includes: acquiring a color image of the payment scene through the color camera mechanism; and determining a payment mode corresponding to the payment scene according to the color image.
In the implementation mode, the color image of the payment scene is acquired through the color camera mechanism, so that the payment mode corresponding to the payment scene can be accurately determined, and the payment efficiency is ensured.
With reference to the third possible implementation manner of the first aspect, in a fourth possible implementation manner of the first aspect, the determining, according to the color image, a payment mode corresponding to the payment scene includes: detecting based on the color image to determine whether the color image contains a human face; when the color image contains a human face, determining that a payment mode corresponding to the payment scene is a human face payment mode; and when the color image does not contain the human face, determining that the payment mode corresponding to the payment scene is a code scanning payment mode.
In the implementation mode, the color image is used for detection, whether the face is included is determined, and when the face is included, the payment mode corresponding to the current payment scene is judged to be the face payment mode. And when the color image does not contain the human face, determining that the payment mode corresponding to the payment scene is a code scanning payment mode. By the method, the payment mode corresponding to the current payment scene can be accurately and efficiently determined, so that the payment efficiency is favorably improved.
In a second aspect, an embodiment of the present application provides a payment device, where the payment device has a face payment mode and a code scanning payment mode, the code scanning payment mode is applied to a first identification range, the face payment mode is applied to a second identification range, and the first identification range and the second identification range, when summed, cover a payment identification range of the payment device, where the payment device includes: the system comprises a color camera mechanism and a main control module, wherein the main control module is connected with the color camera mechanism, and the color camera mechanism is used for acquiring a color image of a payment scene; the main control module is configured to determine a payment mode corresponding to the payment scene according to the color image, adjust the color camera to a first preset focal length in a fixed focus mode when the corresponding payment mode is the code scanning payment mode, and adjust the color camera to a second preset focal length in the fixed focus mode when the corresponding payment mode is the face payment mode, where the color camera at the first preset focal length can clearly acquire the payment code image in the first identification range, and the color camera at the second preset focal length can clearly acquire the face image in the second identification range; the color camera shooting mechanism is used for acquiring a payment code image of the payment scene under the first preset focal length, or acquiring a face image of the payment scene under the second preset focal length; the main control module is further configured to recognize the payment code in the first recognition range based on the payment code image, or recognize the face in the second recognition range based on the face image.
With reference to the second aspect, in a first possible implementation manner of the second aspect, the main control module is further configured to: detecting based on the color image to determine whether the color image contains a human face; when the color image contains a human face, determining that a payment mode corresponding to the payment scene is a human face payment mode; and when the color image does not contain the human face, determining that the payment mode corresponding to the payment scene is a code scanning payment mode.
With reference to the second aspect, in a second possible implementation manner of the second aspect, the payment apparatus further includes: and the depth imaging mechanism is used for acquiring a depth image of the payment scene when the payment mode corresponding to the payment scene is a face payment mode so as to enable the payment equipment to carry out living body detection based on the depth image.
With reference to the second aspect, in a third possible implementation manner of the second aspect, the payment apparatus further includes a focus motor configured to adjust a focal length of a color camera, where the focus motor is configured to receive a first signal or a second signal sent by the main control module, where the first signal is generated by the main control module based on the code scanning payment mode, and the second signal is generated by the main control module based on the face payment mode; the focusing motor is further configured to operate to the first stroke value according to the first signal so as to enable the color imaging mechanism to be at the first preset focal length in a fixed focus mode, or operate to the second stroke value according to the second signal so as to enable the color imaging mechanism to be at the second preset focal length in the fixed focus mode.
With reference to the second aspect, in a fourth possible implementation manner of the second aspect, the payment identification range of the payment device is 10 to 120cm, the first identification range is 10 to 30cm, and the second identification range is 30 to 120 cm.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 is a schematic view of a payment device according to an embodiment of the present application.
Fig. 2 is a schematic diagram of a stroke interval of a focus motor according to an embodiment of the present disclosure.
Fig. 3 is a flowchart of a focusing method according to an embodiment of the present disclosure.
Fig. 4 is a schematic view of an operation logic of a focusing method according to an embodiment of the present application.
Icon: 100-a payment device; 110-a depth imaging mechanism; 111-a projector; 112-infrared camera shooting mechanism; 120-a master control module; 130-a color camera mechanism; 140-a focus motor; 150-floodlight.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
In this embodiment, the payment device is a product for performing payment recognition, such as some payment tablets (refer to a payment tablet set at a cash register by a merchant), an automatic settlement device (for example, a customer self-settlement device set in a supermarket) capable of performing code scanning payment and face payment, and the like, and is not limited herein. In the present embodiment, a payment device with a payment identification range of 10-120 cm is taken as an example for description, but should not be considered as a limitation of the present application.
Referring to fig. 1, fig. 1 is a schematic view of a payment apparatus 100 according to an embodiment of the present disclosure.
In this embodiment, the payment device 100 may include a depth imaging mechanism 110, a color (RGB) camera mechanism 130, and a host module 120. Optionally, the depth imaging mechanism 110 and the color camera mechanism 130 may form a 3D structured light module, and of course, the formed 3D structured light module may further include other components, such as a floodlight, which is not limited herein.
For example, depth imaging mechanism 110 may be used to obtain a depth image of a payment scene. For example, the depth imaging mechanism 110 may include a projector 111 and an infrared camera 112, wherein the projector 111 may cooperate with the infrared camera 112 to project a speckle pattern into a space of the payment scene, and obtain a depth image of the payment scene according to the received speckle pattern (typically, the speckle pattern reflected by a target object, such as a human body, an intelligent terminal displaying a payment code, or the like). Of course, the depth image may be obtained by other methods or modules (e.g., a depth camera, a 3D structured light module including a VCSEL, etc.), and is not limited herein. In this way, the depth image of the payment scene can be efficiently and accurately acquired.
Illustratively, the color camera mechanism 130 may acquire a color image of the payment scene.
For example, the main control module 120 may determine the payment mode corresponding to the payment scene according to the color image.
For example, the main control module 120 may perform detection based on the color image to determine whether the color image contains a human face; when the face is contained, the payment mode corresponding to the current payment scene is determined to be the face payment mode, and when the face is not contained, the payment mode corresponding to the current payment scene is determined to be the code scanning payment mode.
Of course, in order to ensure the reliability of the face payment mode, in this embodiment, the main control module 120 may also perform living body detection using the depth image to ensure that the face used for payment verification is a living body (i.e. the user himself) instead of image materials such as a photo and a video.
By the method, the safety of payment in the face payment mode can be guaranteed, and the condition of embezzlement of payment is avoided as much as possible, so that the reliability of the payment device 100 is improved.
In this embodiment, the main control module 120 may adjust the color camera 130 to a first preset focal length in the fixed focus mode when the corresponding payment mode is the code scanning payment mode; when the corresponding payment mode is the face payment mode, the color camera 130 is adjusted to a second preset focal length in the fixed focus mode. The color camera 130 at the first preset focal length can clearly acquire the payment code image (i.e., the image including the payment code) within the first recognition range (e.g., 10-30 cm, but not limited), and the color camera 130 at the second preset focal length can clearly acquire the face image (i.e., the image including the face) within the second recognition range (e.g., 30-120 cm, but not limited).
A specific manner of adjusting the color imaging mechanism 130 to the first preset focal length in the fixed focus mode or the second preset focal length in the fixed focus mode will be exemplarily described here.
In the present embodiment, the payment apparatus 100 may further include a focus motor 140 for adjusting the focal length of the color image pickup mechanism 130. The focus motor 140 can perform focus adjustment of the color imaging mechanism 130 by operating to different stroke values. For example, in an autofocus mode, the focus motor 140 may be automatically operated to bring the color camera mechanism 130 to the proper focus. In the fixed focus mode, the focus motor 140 is at a fixed stroke value, which ensures that the focal length of the color imaging mechanism 130 is relatively fixed.
For ease of understanding, the motor stroke is briefly described herein. Referring to fig. 2, a schematic diagram of a stroke interval of a focus motor 140 according to an embodiment of the present disclosure is shown.
In the present embodiment, the stroke interval of the focus motor 140 is generally between 0 to 1023 or 0 to 512 (0 to 512 in fig. 2 for example). When the focus motor 140 is operated to different stroke values, the color imaging mechanism 130 has different focal lengths. Generally, the focus motor 140 adjusts the focal length of the color image pickup mechanism 130 to have two common positions, i.e., a far focus position and a near focus position. The near focus position indicates that the color imaging mechanism 130 is clear when imaging an object at a close distance (within a payment recognition range, for example, within a range of 10 to 30cm), and the far focus position indicates that the color imaging mechanism 130 is clear when imaging an object at a far distance (within a payment recognition range, for example, within a range of 30 to 120 cm). The stroke value of the focus motor 140 corresponding to the in-focus position is usually 1023 or 512 (here, taking the forming interval of 0-512 as an example, the stroke value is 512), and at this time, the lens of the color image capturing mechanism 130 is pushed to the outermost position. The far focus position corresponds to a stroke value of the focus motor 140, which is usually 0 or an adjustment value (the offset value is determined by the difference of the focus of the module manufacturer, and if the offset value is used as the position of 0 point, it may cause that part of the module far focus lens is not retracted to the innermost side), where the stroke value 0 is used as the far focus position (i.e. the position of 0 point is always the far focus position regardless of the difference of focus).
Through the above description of the stroke value, the stroke interval, the near focus position, and the far focus position of the focus motor 140, there is a preliminary understanding about the stroke of the focus motor 140. Then, when the focusing motor 140 is close to the position of 0 point (i.e. the far focus position), the human face at a far distance (30-120 cm) is clear for the human face payment mode; when the focus motor 140 is close to 512 (i.e., a close focus position), the two-dimensional code (i.e., the pay code) at a close distance (10-30 cm) is clear for the code scanning pay mode.
In the present embodiment, in consideration of an actual payment scenario, when a customer performs code scanning payment, the application distance (i.e. the distance between the payment code and the payment device 100) is usually within 30 cm; when the customer pays for the face payment, the application distance (i.e. the distance between the payment code and the payment device 100) is usually between 30 and 120 cm. Therefore, different travel values can be set respectively for the code scanning payment mode and the face payment mode according to actual conditions. For example, a first travel value (e.g., 512) is preset for the code scanning payment mode; for the face payment mode, a second travel value (e.g., 0) may be preset.
Based on this, the main control module 120 may determine a corresponding control signal based on the payment mode corresponding to the current payment scene, and control the color camera 130 to adjust to the corresponding focal length. For example, the main control module 120 may generate a first signal for controlling the focus motor 140 to operate to a first stroke value according to the code scanning payment mode; alternatively, a second signal for controlling the focus motor 140 to be operated to a second stroke value is generated according to the face payment mode. And transmits the generated control signal to the focus motor 140 to control the focus motor 140 to operate to a corresponding stroke value (first stroke value or second stroke value).
The focus motor 140 may receive the first signal or the second signal sent by the main control module 120, and operate to a first stroke value (for example, 512) according to the first signal, so as to enable the color camera 130 to be at a first preset focal length (i.e., near focus) in the fixed focus mode, or operate to a second stroke value (for example, 0) according to the second signal, so as to enable the color camera 130 to be at a second preset focal length (i.e., far focus) in the fixed focus mode.
In this embodiment, 512 is used as the first stroke value, 0 is used as the second stroke value, which is only an example, and in actual situations, adaptive adjustment may be performed, for example, 500 is used as the first stroke value, 10 is used as the second stroke value, and the like, and the present invention is not limited thereto.
In this embodiment, the color camera 130 may acquire an image, for example, a payment code image of a payment scene may be acquired at a first preset focal length, or a face image of the payment scene may be acquired at a second preset focal length. Then, at this time, the main control module 120 may further implement recognition of the payment code in the first recognition range based on the payment code image, or implement recognition of the face in the second recognition range based on the face image.
The color camera mechanism 130 is adjusted to a first preset focal length in the fixed focus mode when the corresponding payment mode is the code scanning payment mode, and the color camera mechanism 130 is adjusted to a second preset focal length in the fixed focus mode when the corresponding payment mode is the face payment mode. Therefore, the payment code image in the first identification range can be clearly acquired when the color camera mechanism 130 is in the first preset focal length, and the face image in the second identification range can be clearly acquired when the color camera mechanism 130 is in the second preset focal length. Therefore, the process of finding clear points by automatic focusing in the middle can be reduced under the condition of a code scanning payment mode, namely a code scanning mode, and the problem of identification failure caused by influences of ambient light, the step number of focusing parameter setting, step length and the like can also be avoided. And this kind of mode is focused the time weak point, can improve the efficiency of scanning a yard payment, further promotes user experience. And, this payment apparatus 100 does not rely on the autofocus mode of the color imaging mechanism, and can reduce the focusing accuracy requirements of the color imaging mechanism from the manufacturer.
In addition, in order to ensure the imaging quality, the payment device 100 may further include a floodlight 150, which provides a sufficient light source for the payment scene to ensure the success rate of payment identification, thereby ensuring the efficiency of payment identification and improving the user experience.
Above, the payment apparatus 100 is described, and below, a focusing method provided by an embodiment of the present application will be described. The focusing method may be applied to the payment device 100 (or the main control module 120 of the payment device 100) provided in the embodiment of the present application, but is not limited thereto. For example, the payment device may be an existing payment device, and the control program thereof may be updated to cause the payment device to execute the focusing method.
Referring to fig. 3, fig. 3 is a flowchart of a focusing method according to an embodiment of the present disclosure. In the present embodiment, the focusing method may include step S10, step S20, and step S30.
When the customer makes a payment, the payment device (or the main control module) may perform step S10.
Step S10: and determining a corresponding payment mode according to the current payment scene.
In this embodiment, the payment device may determine the corresponding payment mode according to the current payment scenario.
For example, the payment device may acquire a color image of the payment scene through a color camera mechanism, and determine a payment mode corresponding to the payment scene according to the color image. The color image of the payment scene is obtained through the color camera mechanism, and the payment mode corresponding to the payment scene can be accurately determined, so that the payment efficiency is guaranteed.
For example, the payment device may perform detection based on the color image to determine whether the color image contains a human face; when the color image contains the face, determining that a payment mode corresponding to a payment scene is a face payment mode; and when the color image does not contain the human face, determining that the payment mode corresponding to the payment scene is a code scanning payment mode. By the method, the payment mode corresponding to the payment scene can be efficiently and accurately determined.
After determining the payment mode corresponding to the payment scenario, and when the corresponding payment mode is the code scanning payment mode, the payment device may execute step S20.
Step S20: when the payment mode that corresponds is for sweeping yard payment mode, adjust the first preset focus of mechanism for the focus mode with the colour to make payment equipment discern the payment code of first discernment scope, wherein, the colour that is in first preset focus is made a video recording the mechanism and can be clearly acquireed the payment code image that is in first discernment scope.
In this embodiment, when the corresponding payment mode is the code scanning payment mode, the payment device may adjust the color camera to a first preset focal length in the fixed focus mode (see the foregoing description and examples, which are not described herein again), so that the payment device identifies the payment code in the first identification range.
For example, the payment apparatus may generate a first signal for controlling the focus motor to operate to a preset first stroke value (see the foregoing description and examples, and will not be described herein again) according to the code scanning payment mode, and control the focus motor to operate to the first stroke value according to the first signal, where when the focus motor is located at the first stroke value, the focal length of the color imaging mechanism is the first preset focal length. Therefore, clear recognition of the payment code by the payment equipment can be guaranteed, and the recognition success rate of the payment code and the code scanning payment efficiency are improved.
After determining the payment mode corresponding to the payment scenario, and when the corresponding payment mode is the face payment mode, the payment device may execute step S30.
Step S30: when the corresponding payment mode is the face payment mode, the color camera shooting mechanism is adjusted to be a second preset focal length in the fixed focus mode, so that the payment equipment can identify the face in the second identification range, and the color camera shooting mechanism in the second preset focal length can clearly acquire the face image in the second identification range.
In this embodiment, when the corresponding payment mode is the face payment mode, the payment device may adjust the color camera to a second preset focal length in the fixed focus mode (see the foregoing description and examples, which are not described herein again), so that the payment device identifies the face in the second identification range.
For example, the payment device may generate a second signal for controlling the focus motor to operate to a preset second stroke value according to the code scanning payment mode, and control the focus motor to operate to the second stroke value according to the second signal (see the foregoing description and examples, and will not be described herein again), where when the focus motor is located at the second stroke value, the focal length of the color imaging mechanism is the second preset focal length. Therefore, the clear recognition of the face can be ensured, and the face recognition success rate and the face payment efficiency are ensured.
It should be noted that, in the present embodiment, step S20 and step S30 may be executed in one payment identification process (for example, step S10 and step S20 are executed, or step S10 and step S30 are executed), or may be executed in the same identification process (for example, after step S10 is executed, step S20 and step S30 are executed alternately one or more times), but generally, one of step S20 and step S30 is executed in one payment identification process, which is not limited herein.
The focusing method provided in the embodiments of the present application will be illustrated as an example. Referring to fig. 4, fig. 4 is a logic diagram illustrating an operation of a focusing method according to an embodiment of the present disclosure. Wherein Y represents YES and N represents NO.
In this embodiment, the main control module may acquire input information (color image) of a current camera (color imaging mechanism) and detect whether a human face is included therein. When the face is detected to be included in the color image, the main control module may acquire a current stroke value of the focus motor, and determine whether the stroke value of the focus motor needs to be adjusted.
For example, when a human face is included in the color image (the payment mode is determined to be the human face payment mode), the main control module may determine whether the current focus motor is in the far-focus position (i.e., the second stroke value). If the focusing motor is currently at a far focus position, the adjustment is not needed so as to facilitate the face recognition; if the focusing motor is not located at the far focus position currently, the stroke value of the focusing motor can be adjusted to the far focus position so as to perform face recognition.
For another example, when the face is not included in the color image (the payment mode is determined to be the code scanning payment mode), the main control module may determine whether the current focus motor is in the near-focus position (i.e., the first stroke value). If the focusing motor is currently in a close-focus position, adjustment is not needed so as to facilitate payment code identification; if the focusing motor is not located at the near-focus position, the stroke value of the focusing motor can be adjusted to the near-focus position so as to identify the payment code.
It should be noted that the examples are only illustrative and should not be construed as limiting the present application.
In this embodiment, a storage medium is further provided, where one or more programs are stored, and the one or more programs are executable by one or more processors to implement the focusing method in the embodiment of the present application.
In summary, the embodiments of the present application provide a focusing method and a payment device, which determine a corresponding payment mode according to a current payment scenario, thereby adjusting the focal length of the color camera in the fixed focus mode according to different payment modes (e.g., adjusting the color camera to a first preset focal length in the fixed focus mode for the code scanning payment mode, adjusting the color camera to a second preset focal length in the fixed focus mode for the face payment mode), therefore, the payment equipment can identify the payment code in the first identification range (the color camera mechanism in the first preset focal length can clearly acquire the payment code image in the first identification range), or identify the face in the second identification range (the color camera mechanism in the second preset focal length can clearly acquire the face image in the second identification range). In such a way, when a long-distance (30-120 cm) human face is identified, the human face image can be clearly obtained according to the second preset focal length in the fixed focus mode, and efficient human face identification is carried out; and when payment code discernment closely, according to the first focus of predetermineeing under the fixed focus mode, clear acquisition payment code image carries out efficient payment code discernment to can promote the success rate of discernment, further promote payment efficiency. In addition, the mode does not depend on the automatic focusing mode of the color imaging mechanism, and a manufacturer does not need to focus high-precision adaptive parameters, so that the requirement of the manufacturer on the focusing precision of the color imaging mechanism can be reduced.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The method embodiments and apparatus embodiments described above are merely illustrative.
Furthermore, the functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
The above embodiments are merely examples of the present application and are not intended to limit the scope of the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (10)

1. A focusing method applied to a payment device, wherein the payment device has a face payment mode and a code scanning payment mode, the code scanning payment mode is applied to a first recognition range, the face payment mode is applied to a second recognition range, and the first recognition range and the second recognition range, when summed, cover a payment recognition range of the payment device, the payment device comprises a color camera mechanism, and the method comprises:
determining a corresponding payment mode according to the current payment scene;
when the corresponding payment mode is the code scanning payment mode, adjusting the color camera mechanism to be a first preset focal length in a fixed focus mode so that the payment equipment can identify the payment code in the first identification range, wherein the color camera mechanism in the first preset focal length can clearly acquire the payment code image in the first identification range;
and when the corresponding payment mode is the face payment mode, adjusting the color camera shooting mechanism to be a second preset focal length in a fixed-focus mode so as to enable the payment equipment to identify the face in the second identification range, wherein the color camera shooting mechanism in the second preset focal length can clearly acquire the face image in the second identification range.
2. The focusing method according to claim 1, wherein the payment apparatus further includes a focus motor for adjusting a focal length of a color camera, and the adjusting the color camera to a first preset focal length in a fixed focus mode includes:
and generating a first signal for controlling the focusing motor to run to a preset first stroke value according to the code scanning payment mode, and controlling the focusing motor to run to the first stroke value according to the first signal, wherein when the focusing motor is located at the first stroke value, the focal length of the color camera mechanism is the first preset focal length.
3. The focusing method according to claim 1, wherein the payment apparatus further comprises a focus motor for adjusting a focal length of a color camera, and the adjusting the color camera to a second preset focal length in a fixed focus mode comprises:
and generating a second signal for controlling the focusing motor to run to a preset second stroke value according to the code scanning payment mode, and controlling the focusing motor to run to the second stroke value according to the second signal, wherein when the focusing motor is located at the second stroke value, the focal length of the color camera mechanism is the second preset focal length.
4. The focusing method of claim 1, wherein the determining the corresponding payment mode according to the current payment scenario comprises:
acquiring a color image of the payment scene through the color camera mechanism;
and determining a payment mode corresponding to the payment scene according to the color image.
5. The focusing method of claim 4, wherein the determining the payment mode corresponding to the payment scene according to the color image comprises:
detecting based on the color image to determine whether the color image contains a human face;
when the color image contains a human face, determining that a payment mode corresponding to the payment scene is a human face payment mode;
and when the color image does not contain the human face, determining that the payment mode corresponding to the payment scene is a code scanning payment mode.
6. A payment device having a face payment mode and a code scanning payment mode, the code scanning payment mode being applied to a first recognition range, the face payment mode being applied to a second recognition range, the first recognition range and the second recognition range, taken together, covering a payment recognition range of the payment device, the payment device comprising: a color camera shooting mechanism and a main control module, wherein the main control module is connected with the color camera shooting mechanism,
the color camera shooting mechanism is used for acquiring a color image of a payment scene;
the main control module is configured to determine a payment mode corresponding to the payment scene according to the color image, adjust the color camera to a first preset focal length in a fixed focus mode when the corresponding payment mode is the code scanning payment mode, and adjust the color camera to a second preset focal length in the fixed focus mode when the corresponding payment mode is the face payment mode, where the color camera at the first preset focal length can clearly acquire the payment code image in the first identification range, and the color camera at the second preset focal length can clearly acquire the face image in the second identification range;
the color camera shooting mechanism is used for acquiring a payment code image of the payment scene under the first preset focal length, or acquiring a face image of the payment scene under the second preset focal length;
the main control module is further configured to recognize the payment code in the first recognition range based on the payment code image, or recognize the face in the second recognition range based on the face image.
7. The payment device of claim 6, wherein the master module is further configured to:
detecting based on the color image to determine whether the color image contains a human face;
when the color image contains a human face, determining that a payment mode corresponding to the payment scene is a human face payment mode;
and when the color image does not contain the human face, determining that the payment mode corresponding to the payment scene is a code scanning payment mode.
8. The payment device of claim 6, further comprising:
and the depth imaging mechanism is used for acquiring a depth image of the payment scene when the payment mode corresponding to the payment scene is a face payment mode so as to enable the payment equipment to carry out living body detection based on the depth image.
9. The payment apparatus of claim 6, further comprising a focus motor for adjusting a focus of the color camera mechanism,
the focusing motor is used for receiving a first signal or a second signal sent by the main control module, wherein the first signal is generated by the main control module based on the code scanning payment mode, and the second signal is generated by the main control module based on the face payment mode;
the focusing motor is further configured to operate to a first stroke value according to the first signal so as to enable the color imaging mechanism to be at the first preset focal length in the fixed focus mode, or operate to a second stroke value according to the second signal so as to enable the color imaging mechanism to be at the second preset focal length in the fixed focus mode.
10. The payment device as recited in claim 6, wherein the payment device has a payment recognition range of 10-120 cm, the first recognition range is 10-30 cm, and the second recognition range is 30-120 cm.
CN202011335261.0A 2020-11-24 2020-11-24 Focusing method and payment equipment Pending CN112468723A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011335261.0A CN112468723A (en) 2020-11-24 2020-11-24 Focusing method and payment equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011335261.0A CN112468723A (en) 2020-11-24 2020-11-24 Focusing method and payment equipment

Publications (1)

Publication Number Publication Date
CN112468723A true CN112468723A (en) 2021-03-09

Family

ID=74798862

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011335261.0A Pending CN112468723A (en) 2020-11-24 2020-11-24 Focusing method and payment equipment

Country Status (1)

Country Link
CN (1) CN112468723A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114125244A (en) * 2021-12-03 2022-03-01 上海商米科技集团股份有限公司 Camera module, implementation method and mobile device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108156376A (en) * 2017-12-27 2018-06-12 广东欧珀移动通信有限公司 Image-pickup method, device, terminal and storage medium
CN109426747A (en) * 2017-08-23 2019-03-05 上海商米科技有限公司 Barcode scanning terminal and its barcode scanning mode switching method
CN109598515A (en) * 2018-11-29 2019-04-09 阿里巴巴集团控股有限公司 A kind of method of payment, payment mechanism and terminal device
CN110519503A (en) * 2018-05-22 2019-11-29 维沃移动通信有限公司 A kind of acquisition methods and mobile terminal of scan image
CN111064893A (en) * 2019-12-27 2020-04-24 上海摩勤智能技术有限公司 Code scanning and photographing compatible method and electronic terminal
CN210466416U (en) * 2019-08-02 2020-05-05 深圳蚂里奥技术有限公司 Information acquisition system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109426747A (en) * 2017-08-23 2019-03-05 上海商米科技有限公司 Barcode scanning terminal and its barcode scanning mode switching method
CN108156376A (en) * 2017-12-27 2018-06-12 广东欧珀移动通信有限公司 Image-pickup method, device, terminal and storage medium
CN110519503A (en) * 2018-05-22 2019-11-29 维沃移动通信有限公司 A kind of acquisition methods and mobile terminal of scan image
CN109598515A (en) * 2018-11-29 2019-04-09 阿里巴巴集团控股有限公司 A kind of method of payment, payment mechanism and terminal device
CN210466416U (en) * 2019-08-02 2020-05-05 深圳蚂里奥技术有限公司 Information acquisition system
CN111064893A (en) * 2019-12-27 2020-04-24 上海摩勤智能技术有限公司 Code scanning and photographing compatible method and electronic terminal

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114125244A (en) * 2021-12-03 2022-03-01 上海商米科技集团股份有限公司 Camera module, implementation method and mobile device

Similar Documents

Publication Publication Date Title
US7733412B2 (en) Image pickup apparatus and image pickup method
US10163222B2 (en) Image capturing apparatus, tracking device, control method, and storage medium
JP5171468B2 (en) IMAGING DEVICE AND IMAGING DEVICE CONTROL METHOD
JP6464281B2 (en) Information processing apparatus, information processing method, and program
JP2012042833A (en) Imaging apparatus and imaging apparatus control method
JP2017040726A (en) Imaging device and control method of the same
US8878964B2 (en) Image capture apparatus
CN112468723A (en) Focusing method and payment equipment
JP2024003037A (en) Electronic apparatus, method for controlling electronic apparatus, program, and storage medium
JP2016114830A (en) Focus control device, optical device and focus control method
JP4996568B2 (en) IMAGING DEVICE AND IMAGING DEVICE CONTROL METHOD
JPWO2017134880A1 (en) Information processing apparatus, information processing method, and program
JP6534456B2 (en) INFORMATION PROCESSING APPARATUS, INFORMATION PROCESSING METHOD, AND PROGRAM
US10498969B2 (en) Image pickup apparatus, control apparatus, and exposure control method
JP6534457B2 (en) INFORMATION PROCESSING APPARATUS, INFORMATION PROCESSING METHOD, AND PROGRAM
US20230281859A1 (en) Image processing apparatus, control method thereof, image capturing apparatus, and storage medium
JP2019197295A (en) Image processing device, image processing method, and program
JP2012203206A (en) Imaging apparatus
US11930266B2 (en) Line-of-sight detection apparatus, imaging apparatus, line-of-sight detection method, and non-transitory computer-readable storage medium
US11570352B2 (en) Image processing apparatus and control method thereof, imaging apparatus, and storage medium
JP2005091432A (en) Camera
US20230070780A1 (en) Display device, control method therefor, and imaging device
CN110095078B (en) Imaging method and device based on TOF system and computer readable storage medium
US10530985B2 (en) Image capturing apparatus, image capturing system, method of controlling image capturing apparatus, and non-transitory computer-readable storage medium
US9866755B2 (en) Image capture apparatus and method for controlling the same

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20210309

RJ01 Rejection of invention patent application after publication