CN112822391A - Focusing mode control method, device, equipment and computer readable storage medium - Google Patents

Focusing mode control method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN112822391A
CN112822391A CN202010738759.5A CN202010738759A CN112822391A CN 112822391 A CN112822391 A CN 112822391A CN 202010738759 A CN202010738759 A CN 202010738759A CN 112822391 A CN112822391 A CN 112822391A
Authority
CN
China
Prior art keywords
focusing
mode
image
target
image acquisition
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
CN202010738759.5A
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202010738759.5A priority Critical patent/CN112822391A/en
Publication of CN112822391A publication Critical patent/CN112822391A/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
    • 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/70Circuitry for compensating brightness variation in the scene

Abstract

The embodiment of the application provides a method, a device, equipment and a computer readable storage medium for controlling a focusing mode, wherein the method comprises the following steps: responding to an operation instruction for image acquisition, and acquiring a current image acquisition mode, wherein the image acquisition mode at least comprises a biological characteristic image acquisition mode and a graphic identification code acquisition mode; determining a target focusing mode corresponding to the image acquisition mode; focusing is carried out based on the target focusing mode, and after focusing is finished, an image is collected; a target image is determined based on the acquired image, and the target image is output. By the method and the device, a camera can be guaranteed to acquire high-quality images in different image acquisition modes.

Description

Focusing mode control method, device, equipment and computer readable storage medium
Technical Field
The embodiment of the application relates to the technical field of internet, and relates to but is not limited to a method, a device and equipment for controlling a focusing mode and a computer readable storage medium.
Background
With the development of internet technology and intelligent terminals, people's work and life have changed from the world to the earth. For example, face-brushing payment and code-scanning payment become commonly used payment modes when one mobile phone walks down the sky; for example, internet ticket buying can get into railway station, airport etc. through the electron ticket two-dimensional code or brush face and also be popularized gradually, like this to the equipment of brushing face or sweeping the sign indicating number, through needing to gather different images, for example people's face image, two-dimensional code image etc. because the requirement is different when gathering different images, consequently same equipment often adopts the mode of compromising just with different demands, hardly guarantees to satisfy different image acquisition requirements simultaneously.
Disclosure of Invention
The embodiment of the application provides a method, a device and equipment for controlling focusing modes and a computer readable storage medium, wherein different image acquisition modes correspond to different focusing modes, so that high-quality images can be acquired by using the same camera in different image acquisition modes.
The technical scheme of the embodiment of the application is realized as follows:
the embodiment of the application provides a control method of a focusing mode, which is applied to image acquisition equipment, wherein the image acquisition equipment comprises a camera, and the method comprises the following steps:
responding to an operation instruction for image acquisition, and acquiring a current image acquisition mode, wherein the image acquisition mode at least comprises a biological characteristic image acquisition mode and a graphic identification code acquisition mode;
determining a target focusing mode corresponding to the image acquisition mode;
focusing is carried out based on the target focusing mode, and after focusing is finished, an image is collected;
a target image is determined based on the acquired image, and the target image is output.
An embodiment of the present application provides a control device for a focus mode, including:
the first acquisition module is used for responding to an operation instruction for image acquisition and acquiring a current image acquisition mode, wherein the image acquisition mode at least comprises a biological characteristic image acquisition mode and a figure identification code acquisition mode;
the first determining module is used for determining a target focusing mode corresponding to the image acquisition mode;
the image acquisition module is used for focusing based on the target focusing mode and acquiring an image after focusing is finished;
and the first output module is used for determining a target image based on the acquired image and outputting the target image.
In some embodiments, the first determining module is further configured to:
when the image acquisition mode is a biological characteristic image acquisition mode, determining that the target focusing mode is a first fixed focusing mode;
correspondingly, the first focusing module is further configured to:
acquiring a first focusing parameter corresponding to the first fixed focusing mode;
and performing fixed focusing based on the first focusing parameter.
In some embodiments, the first determining module is further configured to:
when the image acquisition mode is the image identification code acquisition mode, determining that the target focusing mode is a first automatic focusing mode;
correspondingly, the first focusing module is further configured to:
acquiring a second focusing parameter and a third focusing parameter corresponding to the first automatic focusing mode, wherein the second focusing parameter is smaller than the third focusing parameter, and an object distance corresponding to the third focusing parameter is smaller than or equal to a first distance threshold;
and controlling automatic focusing between the second focusing parameter and the third focusing parameter.
In some embodiments, the first determining module is further configured to:
when the image acquisition mode is a biological characteristic image acquisition mode, determining that the target focusing mode is a second automatic focusing mode;
correspondingly, the first focusing module is further configured to:
acquiring a fourth focusing parameter and a fifth focusing parameter corresponding to the second automatic focusing mode, wherein the fourth focusing parameter is smaller than the fifth focusing parameter, and an object distance corresponding to the fourth focusing parameter is larger than a first distance threshold;
and controlling automatic focusing between the fourth focusing parameter and the fifth focusing parameter.
In some embodiments, the first determining module is further configured to:
when the image acquisition mode is the graphic identification code acquisition mode, determining that the target focusing mode is a second fixed focusing mode;
correspondingly, the first focusing module is further configured to:
acquiring a sixth focusing parameter corresponding to the second fixed focusing mode;
and performing fixed focusing based on the sixth focusing parameter.
In some embodiments, the apparatus further comprises:
the second acquisition module is used for acquiring the current exposure and the current environment brightness;
a second determining module for determining a target exposure based on the current exposure and the current ambient brightness;
a third determining module for determining a difference between the target exposure amount and the current exposure amount as an adjustment step value;
and the first adjusting module is used for adjusting the exposure amount to the target exposure amount based on the adjusting stepping value.
In some embodiments, the apparatus further comprises:
the third acquisition module is used for acquiring the current exposure and the current environment brightness;
a fourth determining module for determining a target exposure based on the current exposure and the current ambient brightness;
and the second adjusting module is used for adjusting the exposure amount to the target exposure amount according to a preset stepping value.
In some embodiments, the apparatus further comprises:
and the second output module is used for outputting prompt information when the focusing fails, wherein the prompt information is used for prompting the adjustment of the distance between the shooting object and the second output module.
In some embodiments, the first output module is further configured to:
acquiring the original resolution of the acquired image;
acquiring a first preset resolution corresponding to the image acquisition mode;
and when the original resolution is greater than the first preset resolution, downsampling the acquired image to obtain a target image.
In some embodiments, the apparatus further comprises:
the receiving module is used for receiving a switching instruction of switching an image acquisition mode by a user;
a fifth determining module, configured to determine, in response to the switching instruction, a switched image acquisition mode based on the current image acquisition mode;
and the sixth determining module is used for responding to an operation instruction for image acquisition and determining a target focusing mode corresponding to the switched image acquisition mode.
An embodiment of the present application provides an image capturing apparatus, including:
a memory for storing executable instructions; a processor for implementing the above method when executing the executable instructions stored in the memory;
and the camera is used for collecting images after focusing is finished.
Embodiments of the present application provide a computer-readable storage medium storing executable instructions for causing a processor to implement the above-mentioned method when executed.
The embodiment of the application has the following beneficial effects:
when an operation instruction for image acquisition is received, responding to the operation instruction, firstly acquiring a current image acquisition mode, wherein the image acquisition mode is a biological characteristic image acquisition mode or a figure identification code acquisition mode, then determining a target focusing mode corresponding to the image acquisition mode, further carrying out focusing based on the target focusing mode, acquiring an image after the focusing is finished, finally determining a target image based on the acquired image, and outputting the target image. That is to say, the biological characteristic image acquisition mode and the figure identification code have different focusing modes, so that the same image acquisition device can acquire high-quality images in different image acquisition modes, and the low cost and the simple manufacture can be ensured.
Drawings
Fig. 1A is a schematic network architecture of a focus mode control system according to an embodiment of the present disclosure;
fig. 1B is a schematic diagram of another network architecture of a focus mode control system according to an embodiment of the present disclosure;
fig. 2 is a schematic structural diagram of an image capturing apparatus 300-1 according to an embodiment of the present disclosure;
fig. 3 is a schematic flow chart illustrating an implementation of a method for controlling a focus mode according to an embodiment of the present application;
fig. 4 is a schematic flowchart illustrating another implementation of a method for controlling a focus mode according to an embodiment of the present application;
fig. 5 is a schematic flowchart illustrating a further implementation of the method for controlling a focus mode according to an embodiment of the present application;
fig. 6 is a schematic flowchart of another implementation of the method for controlling a focus mode according to the embodiment of the present application;
fig. 7 is a schematic diagram of images acquired at different resolutions according to an embodiment of the present application;
fig. 8 is a schematic diagram of an implementation process of outputting an image in different modes of a camera according to an embodiment of the present application;
FIG. 9 is an image acquired when the two-dimensional code moves under normal exposure time;
fig. 10 is a schematic view of the exposure principle.
Detailed Description
In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be described in further detail with reference to the attached drawings, the described embodiments should not be considered as limiting the present application, and all other embodiments obtained by a person of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
In the following description, reference is made to "some embodiments" which describe a subset of all possible embodiments, but it is understood that "some embodiments" may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict. Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the embodiments of the present application belong. The terminology used in the embodiments of the present application is for the purpose of describing the embodiments of the present application only and is not intended to be limiting of the present application.
1) The Auto Focus (AF) uses the principle of object light reflection to receive the reflected light by a sensor CCD on a camera, and drives an electric focusing device to carry out focusing by computer processing;
2) automatic Exposure (AE), which automatically adjusts the Exposure according to the intensity of light to prevent overexposure or underexposure;
in order to better understand the control method of the focusing mode provided in the embodiment of the present application, a description will be first made of a focusing method and determination of existence of the focusing method, which are required by different image capturing modes for the same image capturing apparatus in the related art:
in the related art, there are three implementation manners for the focusing method with different image acquisition mode requirements for the same image acquisition device:
the first implementation mode comprises the following steps: a balance point is selected between different image capture modes (e.g., swipe and swipe modes) using a fixed focal length lens to support different modes of image capture (e.g., swipe and swipe) simultaneously.
The disadvantages are as follows: by using the fixed focal length lens, only the aperture and the balance focusing distance can be sacrificed, and a balance point can be selected among different image acquisition modes, so that all the image acquisition modes can reach a barely feasible definition, but the effect is not good in different modes.
The second implementation mode comprises the following steps: the auto-focus lens is used to simultaneously support image capture (code swiping and face swiping) in different modes by auto-focusing in different image capture modes (face swiping mode and code swiping mode).
The disadvantages are as follows: with the automatic focusing lens, a clear effect can be achieved for acquiring a graphic code (code scanning mode), but the image is blurred during face recognition occasionally due to automatic focusing in a face acquisition (face brushing) mode.
The third implementation mode comprises the following steps: two camera modules are used, one near focus is used for scanning the codes, and one far focus is used for brushing the face, so that the code scanning and the face brushing are simultaneously supported.
The disadvantages are as follows: although this implementation can support simultaneously to sweep the sign indicating number and brush the face and realize that the clear sign indicating number of sweeping is swept and clear effect of brushing the face, two camera module cost and consumption are too high, are more unfavorable for the camera miniaturization.
Based on this, the embodiment of the application provides a control method for focusing modes, which adopts different focusing modes in different image acquisition modes, achieves the effect of using one camera to simultaneously realize that clear images can be acquired in different image acquisition modes, and simultaneously keeps the advantages of low cost, low power consumption and contribution to miniaturization.
An exemplary application of the image capturing apparatus provided by the embodiment of the present application is explained below.
Referring to fig. 1A, fig. 1A is a schematic diagram of a network architecture of a focus mode control system according to an embodiment of the present disclosure. As shown in fig. 1A, the control system of the focusing mode includes a user terminal 100, a payment system 200, a merchant acquiring system 300 and a code sending platform 400. The user terminal 100 can be a smart phone, a tablet computer, a wearable smart device (smart bracelet), and the like, a payment Application program (App) capable of paying by scanning codes can be installed in the user terminal 100, and a user can generate payment two-dimensional codes through the apps, so that a merchant collects money by scanning the codes.
The merchant order receiving system 300 may include an image collecting device 300-1 and an order receiving device 300-2, wherein the image collecting device 300-1 determines a corresponding target focusing mode according to the image collecting mode, and performs image collection on a payment two-dimensional code presented when a user pays after focusing is performed based on the target focusing mode, or acquires a face image to acquire payment information and transmits the payment information to the order receiving device 300-2, the order receiving device 300-2 generates order information based on the payment information and transmits the order information to the payment system 200, and the payment system 200 may be considered as a settlement center of a merchant; the payment system 200 sends the order information to the code platform 400 to inform the code platform 400 to deduct money. After receiving the order information, the code sending platform 400 verifies the identity information and the two-dimensional code information of the user based on the user identifier in the order information, and deducts money after the verification is passed.
Referring to fig. 1B, fig. 1B is a schematic diagram of another network architecture of a focus mode control system according to an embodiment of the present disclosure. As shown in fig. 1B, the control system of the focus mode includes a gate system 300 and a verification background 200. The gate system 300 may include an image acquisition device 300-1 and a gate device 300-2, where the image acquisition device 300-1 determines a corresponding target focusing mode according to the image acquisition mode, performs image acquisition on a two-dimensional code shown by a user after focusing based on the target focusing mode, or performs face image acquisition, and sends the acquired image to the verification background 200. In the network architecture, the image acquisition device 300-1 sends the acquired face image to the verification background 200, the verification background 200 performs identity verification on the received image through a reference image in a stored identity verification image library, and sends a notification message that the verification is passed to the gate system 300 after the verification is passed, and at this time, the gate device in the gate system 300 is turned on, so that the user passes through the notification message.
Referring to fig. 2, fig. 2 is a schematic structural diagram of an image capturing apparatus 300-1 according to an embodiment of the present application, where the image capturing apparatus 300-1 shown in fig. 2 includes: at least one processor 310, memory 350, at least one network interface 320, and a user interface 330. The various components in image capture device 300-1 are coupled together by a bus system 340. It will be appreciated that the bus system 340 is used to enable communications among the components connected. The bus system 340 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity of illustration, however, the various buses are labeled as bus system 340 in fig. 2.
The Processor 310 may be an integrated circuit chip having Signal processing capabilities, such as a general purpose Processor, a Digital Signal Processor (DSP), or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like, wherein the general purpose Processor may be a microprocessor or any conventional Processor, or the like.
The user interface 330 includes one or more output devices 331, including one or more speakers and/or one or more visual display screens, that enable presentation of media content. The user interface 330 also includes one or more input devices 332, including user interface components to facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.
The memory 350 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid state memory, hard disk drives, optical disk drives, and the like. Memory 350 optionally includes one or more storage devices physically located remote from processor 310. The memory 350 may include either volatile memory or nonvolatile memory, and may also include both volatile and nonvolatile memory. The nonvolatile Memory may be a Read Only Memory (ROM), and the volatile Memory may be a Random Access Memory (RAM). The memory 350 described in embodiments herein is intended to comprise any suitable type of memory. In some embodiments, memory 350 is capable of storing data, examples of which include programs, modules, and data structures, or subsets or supersets thereof, as exemplified below, to support various operations.
An operating system 351 including system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks;
a network communication module 352 for communicating to other computing devices via one or more (wired or wireless) network interfaces 320, exemplary network interfaces 320 including: bluetooth, wireless compatibility authentication (WiFi), and Universal Serial Bus (USB), etc.;
an input processing module 353 for detecting one or more user inputs or interactions from one of the one or more input devices 332 and translating the detected inputs or interactions.
In some embodiments, the apparatus provided by the embodiments of the present application can be implemented in software, and fig. 3 shows a control device 354 of a focusing mode stored in the memory 350, where the control device 354 of the focusing mode can be a control device of a focusing mode in the image capturing apparatus 300-1, which can be software in the form of programs and plug-ins, and the like, and includes the following software modules: the first obtaining module 3541, the first determining module 3542, the first focusing module 3543, and the first output module 3544, which are logical and thus may be arbitrarily combined or further separated depending on the functionality implemented. The functions of the respective modules will be explained below.
In other embodiments, the apparatus provided in the embodiments of the present Application may be implemented in hardware, and for example, the apparatus provided in the embodiments of the present Application may be a processor in the form of a hardware decoding processor, which is programmed to execute the control method of the focus mode provided in the embodiments of the present Application, for example, the processor in the form of the hardware decoding processor may be implemented by one or more Application Specific Integrated Circuits (ASICs), DSPs, Programmable Logic Devices (PLDs), Complex Programmable Logic Devices (CPLDs), Field Programmable Gate Arrays (FPGAs), or other electronic components.
The following describes a method for controlling a focus mode according to an embodiment of the present application, in conjunction with an exemplary application and implementation of the image capturing apparatus 300-1 according to an embodiment of the present application. Referring to fig. 3, fig. 3 is an alternative flowchart of a method for controlling a focus mode according to an embodiment of the present application, which will be described with reference to the steps shown in fig. 3.
Step S101, the image acquisition equipment responds to an operation instruction for image acquisition, and acquires a current image acquisition mode.
Here, the image capturing device may be a payment device capable of paying by swiping face or by scanning code, or may be a pass verification device connected to an entry/exit gate machine and capable of passing through the gate machine by swiping face or scanning code, and the image capturing device includes only one camera. The image acquisition mode is a biological characteristic image acquisition mode or a figure identification code acquisition mode. In the biometric image acquisition mode, the image acquisition device may acquire a biometric image, such as a face image or an iris image. In the figure identification code acquisition mode, the image acquisition equipment acquires a figure identification code image, such as a two-dimensional code and a bar code.
Step S102, the image acquisition equipment determines a target focusing mode corresponding to the image acquisition mode.
Here, different image capturing modes have different image capturing requirements, for example, in the biometric image capturing mode, the image may be required to be clear within a distance range of 30 to 100 centimeters, and in the graphic identification code capturing mode, the image may be required to be clear within a distance range of 3 to 30 centimeters, so in the embodiment of the present application, different image capturing modes correspond to different focusing modes. For example, in the biometric image acquisition mode, the focus mode may be a fixed focus, e.g., the focal length may be fixed at 60 centimeters; the pattern identification code acquisition mode may be auto-focus, and the auto-focus may be a close range auto-focus.
Step S103, the image capturing device focuses based on the target focusing mode, and captures an image after focusing is completed.
Here, when the step S103 is implemented, first, focal length information corresponding to the target focusing mode is obtained, so as to determine a motion parameter of the voice coil motor according to the corresponding focal length information, and the voice coil motor is controlled to move according to the motion parameter, thereby completing focusing. After focusing is completed, the image capture device captures an image through its own image capture sensor (sensor).
In step S104, the image capturing apparatus determines a target image based on the captured image and outputs the target image.
Here, in different image capturing modes, the resolution of the image captured by the image capturing sensor is the same, and the resolution of the finally output image may be different. Because the scanning identification distance can be increased by acquiring a high-resolution image in the pattern identification code acquisition mode, in the embodiment of the application, the image acquisition can be performed by using a high-resolution image acquisition sensor, and when the resolution of an image required to be output in a certain image acquisition mode is lower than that of the acquired image, the acquired image can be subjected to down-sampling processing to obtain a target image and output the target image.
In an embodiment of the present application, the image capturing device may include a display screen, and outputting the target image may be outputting on the display screen of the image capturing device; in some embodiments, the image capture device may not have a display screen, and outputting the target image may be sending the target image to a verification device for verification of the target image.
When an operation instruction for image acquisition is received, responding to the operation instruction, firstly acquiring a current image acquisition mode, wherein the image acquisition mode is a biological characteristic image acquisition mode or a figure identification code acquisition mode, then determining a target focusing mode corresponding to the image acquisition mode, further carrying out focusing based on the target focusing mode, acquiring an image after the focusing is finished, finally determining a target image based on the acquired image, and outputting the target image. That is to say, the biological characteristic image acquisition mode and the figure identification code have different focusing modes, thereby ensuring that the same camera can acquire high-quality images in different image acquisition modes, and ensuring low cost and simple manufacture.
In some embodiments, when the image capturing mode is the biometric image capturing mode, the step S102 "determining the target focusing mode corresponding to the image capturing mode" can be implemented in two ways:
the first implementation mode comprises the following steps: determining the target focusing mode as a first fixed focusing mode.
Correspondingly, "focus based on the target focus mode" in step S103 may be realized by:
in step S1031A, a first focus parameter corresponding to the first fixed focus mode is acquired.
Here, the first focus parameter may be preset, may be a focus distance, and may be a motor step distance parameter. Since the image capturing sensors in different image capturing devices are different in batches and models, before the image capturing device is shipped, the calibration board may be placed at a preset distance (for example, 60 (CM) from the image capturing device for calibration, the corresponding motor step parameter is recorded, and the motor step parameter is determined as the first focus parameter, and in some embodiments, the calibration board may be placed at a preset distance (for example, 60CM) from the image capturing device for calibration, the corresponding focus distance is recorded, and the focus distance is determined as the first focus parameter.
In the embodiment of the present application, the object distance corresponding to the first focus parameter is in a range of 30 to 100 cm, and may be, for example, 50 cm, 60cm, or the like.
In step S1032A, fixed focusing is performed based on the first focusing parameter.
Here, when the first focus parameter is the first motor step parameter, then step S1032A when implemented, may adjust the voice coil motor to the first position corresponding to the first motor step parameter to implement the fixed focus; when the first focus parameter is the first focus distance, a first motor step parameter may be determined according to the first focus distance, and the voice coil motor may be adjusted to a first position corresponding to the first motor step parameter, so as to achieve fixed focus.
The second implementation mode comprises the following steps: determining the target focusing mode as a second automatic focusing mode.
It should be noted that, if the image capturing device only captures a color image, when the image capturing mode is the biometric image capturing mode, the target focusing mode of the image capturing mode is determined, which can be implemented by using the second implementation manner or the first implementation manner; when the image acquisition equipment needs to acquire a color image, a depth image and an infrared image, the color image, the depth image and the infrared image are completely aligned, and at the moment, when the target focusing mode of the image acquisition mode is determined, the target focusing mode can be realized only by using the first implementation mode.
When step S102 is implemented by the second implementation manner, correspondingly, "focusing based on the target focusing mode" in step S103 can be implemented by the following steps:
step S1031B, obtaining a fourth focusing parameter and a fifth focusing parameter corresponding to the second automatic focusing mode.
Here, the object distance corresponding to the fourth focusing parameter is smaller than the object distance corresponding to the fifth focusing parameter, and the object distance corresponding to the fourth focusing parameter is larger than the first distance threshold. The fourth focusing parameter may be a focal length or a motor step parameter, and correspondingly, the fifth focusing parameter may also be a focal length or a motor step parameter.
When the biometric image is acquired, taking the acquisition of a face image as an example, the distance between a general face and the image acquisition device is between 30 and 100 centimeters, so in the biometric image acquisition mode, even if the automatic focusing mode is adopted, in order to shorten the focusing time, the automatic focusing can be set to be performed only within a certain range, that is, the fourth focusing parameter and the fifth focusing parameter are preset.
In step S1032B, autofocus is performed based on the fourth focus parameter and the fifth focus parameter.
Here, similarly to step S1032B, when the fourth focus parameter is the fourth motor step parameter and the fifth focus parameter is the fifth motor step parameter, then step S1032B, when implemented, may control the voice coil motor to move between the fourth position corresponding to the fourth motor step parameter and the fifth position corresponding to the fifth motor step parameter for auto-focusing; when the fourth focusing parameter is the fourth focal length and the fifth focusing parameter is the fifth focal length, the fourth motor stepping parameter and the fifth motor stepping parameter can be respectively determined according to the fourth focal length and the fifth focal length, and the voice coil motor is controlled to move between the fourth position corresponding to the fourth motor stepping parameter and the fifth position corresponding to the fifth motor stepping parameter, so as to perform automatic focusing.
When the image acquisition mode is the biological characteristic image acquisition mode, whether focusing is carried out in a first mode or a second mode, the automatic exposure process can be realized through the following steps:
in step S201A, the current exposure amount and the current ambient brightness are acquired.
Step S202A, a target exposure amount is determined based on the current exposure amount and the current ambient brightness.
In step S203A, the exposure amount is adjusted to the target exposure amount by a preset step value.
That is to say, under the biological characteristic image acquisition mode, after determining the target exposure according to the current exposure and the current environment brightness, when carrying out automatic exposure adjustment, according to the preset step value, gradually adjusting the exposure from the current exposure to the target exposure, so that the convergence process of the whole automatic exposure is smooth, thereby avoiding causing the feeling of overlarge brightness jump.
In some embodiments, when the image capturing mode is the image identification code capturing mode, the step S102 "determining the target focusing mode corresponding to the image capturing mode" may be implemented in two ways:
the first implementation mode comprises the following steps: determining the target focusing mode as a first automatic focusing mode.
Correspondingly, "focus based on the target focus mode" in step S103 may be realized by:
step S1031C, obtaining a second focusing parameter and a third focusing parameter corresponding to the first automatic focusing mode.
Here, the second focusing parameter may be a focal length or a motor step parameter, and correspondingly, the third focusing parameter may also be a focal length or a motor step parameter.
When the graphic identification code is collected, for example, the two-dimensional code is collected, and the two-dimensional code is often displayed on a display screen of the user terminal, a user needs to bring the display screen displaying the two-dimensional code close to the image collecting device, so that the distance between the display screen of the user terminal and the image collecting device is approximately 3 to 30 centimeters at this moment. Therefore, in the pattern identification code acquisition mode, even if the automatic focusing mode is adopted, in order to shorten the focusing time, automatic focusing can be set only within a certain range, namely, the second focusing parameter and the third focusing parameter are preset. The object distance corresponding to the second focusing parameter is smaller than the object distance corresponding to the third focusing parameter, and the object distance corresponding to the third focusing parameter is smaller than or equal to a first distance threshold, which is preset, and may be, for example, 30 centimeters or 40 centimeters.
In step S1032C, autofocus is performed based on the second focus parameter and the third focus parameter.
Here, when the second focus parameter is the second motor step parameter and the third focus parameter is the third motor step parameter, then step S1032C may be implemented to control the voice coil motor to move between the second position corresponding to the second motor step parameter and the third position corresponding to the third motor step parameter for auto-focusing; when the second focus parameter is the second focus distance and the third focus parameter is the third focus distance, the second motor step parameter and the third motor step parameter can be respectively determined according to the second focus distance and the third focus distance, and the voice coil motor is controlled to move between the second position corresponding to the second motor step parameter and the third position corresponding to the third motor step parameter, so as to perform automatic focusing.
The second implementation mode comprises the following steps: determining the target focusing mode as a second fixed focusing mode.
Correspondingly, "focus based on the target focus mode" in step S103 may be realized by:
in step S1031D, the sixth focusing parameter corresponding to the second fixed focusing mode is acquired.
In the embodiment of the present application, the sixth focusing parameter may be preset, may be a focal length, and may also be a motor step parameter. Since the batches and models of the image capturing sensors in different image capturing devices are different, before the image capturing device is shipped, the calibration board may be placed at a preset distance (for example, 10CM) from the image capturing device for calibration, the corresponding motor step parameter is recorded, the motor step parameter is determined as the sixth focusing parameter, and in some embodiments, the calibration board may be placed at a preset distance (for example, 10CM) from the image capturing device for calibration, the corresponding focal distance is recorded, and the focal distance is determined as the sixth focusing parameter.
In the embodiment of the present application, the object distance corresponding to the first focus parameter is in a range of 3 to 30 cm, and may be, for example, 10cm, 15 cm, or the like.
In step S1032D, fixed focusing is performed based on the sixth focusing parameter.
Here, when the sixth focusing parameter is the sixth motor step parameter, then step S1032D may be implemented to adjust the voice coil motor to a sixth position corresponding to the sixth motor step parameter to implement the fixed focusing; when the sixth focusing parameter is the sixth focal length, a sixth motor stepping parameter may be determined according to the sixth focal length, and the voice coil motor may be adjusted to a sixth position corresponding to the sixth motor stepping parameter, so as to achieve fixed focusing.
In some embodiments, when the image acquisition mode is the graphic identification code acquisition mode, the automatic exposure process may be further implemented by:
in step S201B, the current exposure amount and the current ambient brightness are acquired.
Step S202B, a target exposure amount is determined based on the current exposure amount and the current ambient brightness.
In step S203B, the difference between the target exposure amount and the current exposure amount is determined as an adjustment step value.
In step S204B, the exposure amount is adjusted to the target exposure amount based on the adjustment step value.
In the pattern identifier code acquisition mode, after the target exposure amount is determined according to the current exposure amount and the current ambient brightness through the steps S201B to S204B, when automatic exposure adjustment is performed, the difference value between the target exposure amount and the current exposure amount is determined as an adjustment step value, and the target exposure amount is directly adjusted from the current exposure amount, so that disruptive exposure is realized, and the exposure time is reduced.
In some embodiments, when the focusing fails, prompt information for prompting the adjustment of the distance between the shooting object and the shooting object is output. In some embodiments, the prompt information may further include a recommended distance, where in the biometric image acquisition mode, the recommended distance may be 50 centimeters, and in the graphic identification code mode, the recommended distance may be 10 centimeters, so that the distance between the photographic object and the image acquisition device may be adjusted according to the prompt information, and the image acquisition efficiency is improved.
In some embodiments, the step S104 "determining the target image based on the acquired image" can be implemented by:
step S1041, acquiring an original resolution of the acquired image.
Here, the original resolution may be a resolution of an image pickup sensor in the image pickup apparatus.
Step S1042, a first preset resolution corresponding to the image acquisition mode is obtained.
Here, different image acquisition modes may correspond to different preset resolutions, and the scanning distance may be increased by using a higher resolution in the image identification code acquisition mode, so that the preset resolution corresponding to the image identification code acquisition mode may be higher than the preset resolution corresponding to the biometric image acquisition mode.
Step S1043, determining whether the original resolution is greater than the first predetermined resolution.
Here, when the original resolution is greater than the first preset resolution, go to step S1044; when the original resolution is equal to or less than the first preset resolution, the process proceeds to step S1045.
And step S1044, carrying out down-sampling on the acquired image to obtain a target image.
Here, when the step S1044 is implemented, a sampling rate for performing downsampling may be determined according to the original resolution and the first preset resolution, and the acquired image may be downsampled according to the sampling rate to obtain the target image.
In step S1045, it is determined whether the original resolution is equal to the first predetermined resolution.
Here, if the original resolution is equal to the first preset resolution, go to step S1046; if the original resolution is smaller than the first predetermined resolution, the process proceeds to step S1047.
In step S1046, the acquired image is determined as a target image.
And step S1047, performing up-sampling on the acquired image to obtain a target image.
Here, when the step S1047 is implemented, a sampling rate for performing upsampling may be determined according to the original resolution and the first preset resolution, and the acquired image may be downsampled according to the sampling rate to obtain the target image.
In some embodiments, as shown in fig. 4, after step S104, the following steps may also be performed:
step S105, receiving a switching instruction for switching the image capturing mode.
Here, the switching instruction may be triggered by a user pressing or touching a switching button (or button control) provided by the image capturing device, or may also be triggered by the user making a preset gesture or voice for switching the image capturing mode, and in some embodiments, the switching instruction may also be triggered by analyzing the captured image to determine that the switching timing is reached.
And step S106, responding to the switching instruction, and determining the switched image acquisition mode based on the current image acquisition mode.
Here, when the image capturing mode is two, the switched image capturing mode is another image capturing mode except the current image capturing mode; when the image acquisition modes are more than two, the switched image acquisition modes can be determined according to the current image acquisition mode and the switching sequence of the image acquisition modes.
And step S107, determining a target focusing mode corresponding to the switched image acquisition mode.
Here, the implementation process of step S107 is similar to the implementation process of step S102 described above, and reference may be made to the implementation process of step S102.
In the embodiment of the present application, after step S107, step S103 to step S104 are subsequently performed to realize focusing and acquire and output a target image.
Through the steps S105 to S107, the user can switch the image acquisition mode according to the needs of the user, and can correspondingly switch the focusing mode after switching the image acquisition mode, so that the image acquisition quality and the image acquisition rate can be ensured in different image acquisition modes.
Based on the foregoing embodiments, an embodiment of the present application further provides a method for controlling a focus mode, which is applied to the network architecture shown in fig. 1B, and fig. 5 is a schematic diagram illustrating an implementation process of the method for controlling a focus mode provided in the embodiment of the present application, as shown in fig. 5, the process includes:
in step S501, the image capturing device receives an operation instruction for image capturing.
Here, the operation instruction may be automatically triggered when the image capturing device senses that an object is approaching, or may be triggered by a user clicking or touching a button control for starting image capturing.
In some embodiments, the image capture device starts the camera after receiving the operation instruction.
In step S502, the image capturing apparatus acquires a current image capturing mode in response to the operation instruction.
Here, the image capturing mode is a biometric image capturing mode or a graphic identification code capturing mode, and in the embodiment of the present application, the image capturing mode is a biometric image capturing mode (face brushing mode) as an example.
In step S503, the image capturing apparatus determines a target focusing mode corresponding to the image capturing mode.
In the biometric image capture mode, the corresponding target focus mode may be the first fixed focus mode or may be the second autofocus mode. The object distance corresponding to the first focusing parameter in the first fixed focusing mode may be a preset value, which conforms to the habit of most users when brushing face, for example, may be 50 cm. The second automatic focusing mode is automatic focusing within a certain range, and full-distance automatic focusing is not performed, so that the focusing speed can be improved.
In step S504, the image capturing device focuses based on the target focusing mode, and captures an image after focusing is completed.
In step S505, the image capturing apparatus determines a target image based on the captured image, and outputs the target image.
Here, after the image capturing device captures an image by using its own image capturing sensor, the image capturing device may perform image processing (for example, down sampling, up sampling, or the like) on the captured image according to a preset resolution corresponding to the target focusing mode and an original resolution of the captured image to obtain a target image, and output the target image.
The image acquisition equipment comprises a display screen, and the output target image can be the output target image in the display screen when being realized. In some embodiments, outputting the target image may also be outputting the target image for a preset time period, for example, the preset time period may be 5 seconds or 3 seconds, and after the preset time period is exceeded, the target image is not output.
Step S506, the image acquisition equipment sends a verification request carrying the target image to a verification background so as to request to verify the target image.
And step S507, after the verification background acquires the target image, verifying the target image based on the identity verification image library stored in the verification background.
And after receiving the verification request, the verification background analyzes the verification request to acquire the target image. The authentication background stores an authentication image library, the authentication image library comprises a plurality of reference images, and the reference images can be shot and uploaded by a user, or can be acquired from other databases, such as an identity card image acquired from a public security system.
After the verification background acquires the target image, the target image can be matched with the reference images in the identity verification image library to obtain the similarity between the target image and each reference image, so that the verification result is determined according to each similarity.
In step S508, the verification background determines whether the target image passes the verification.
When a reference image with the similarity larger than the similarity threshold exists in the identity verification image library, determining that the target image passes the verification, and then entering step S509; when there is no reference image in the authentication image library whose similarity with the target image is greater than the similarity threshold, it is determined that the target image fails in authentication, and then the process proceeds to step S512.
In step S509, the verification background sends a notification message that the verification is passed to the image capturing device.
Step S510, the image capturing device outputs a notification message that the verification is passed, and sends a control instruction for opening the channel to the gate device.
Step S511, the gate device opens the channel.
And step S512, the verification background sends a notification message that the verification fails to pass to the image acquisition equipment.
In step S513, the image capture device outputs a notification message indicating that the authentication has failed.
In the method for controlling a focusing mode provided in the embodiment of the present application, when receiving an operation instruction for image capture, an image capture device, in response to the operation instruction, first obtains a current image capture mode, where the image capture mode is a biometric image capture mode or a graphic identification code capture mode, determines a target focusing mode corresponding to the image capture mode, further performs focusing based on the target focusing mode, captures an image after the focusing is completed, and finally determines a target image based on the captured image and outputs the target image. After the image acquisition equipment obtains the target image, the target image is sent to a verification background for verification, and a channel is opened after the verification is passed. The biological characteristic image acquisition mode and the graphic identification code have different focusing modes, so that the same image acquisition device can acquire high-quality images in different image acquisition modes, and the passing efficiency can be improved.
Next, an exemplary application of the embodiment of the present application in a practical application scenario will be described. In the embodiment of the present application, an image capturing device that needs to scan a code or brush a face is taken as an example to describe the method for controlling the focusing mode provided in the embodiment of the present application.
In the embodiment of the application, different focusing modes are provided for the two image acquisition modes of code scanning and face brushing, and the code scanning and face brushing are simultaneously supported through the switching of the focusing modes, so that the clear code scanning and the clear face brushing can be simultaneously supported by one camera module, and the advantages of low cost, low power consumption and miniaturization are further realized.
Fig. 6 is a schematic flowchart of another implementation process of the method for controlling a focus mode according to the embodiment of the present application, as shown in fig. 6, the process includes:
step S601, in the code scanning mode, an automatic focusing mode is used, and the traditional processes such as AF/AE and the like are improved to achieve a better code scanning effect.
Step S602, in the face brushing mode, a fixed focusing mode is used, and the problem that the voice coil motor cannot be accurately focused is solved by using factory calibration.
Here, in a factory, a preset distance (for example, 60CM) is calibrated by a calibration board before each camera is shipped, a corresponding motor step is recorded, and the motor step is used as a fixed step for fixed focusing of the camera.
The following describes an improvement of the AF/AE process in the scan mode. The improvements made in the embodiments of the present application include the following aspects:
first, AF optimization.
In the embodiment of the present application, autofocus in only the near focus range is used. Because code scanning only occurs in a suburban range, compared with full-distance automatic focusing, automatic focusing only in a range of a close-focus distance can greatly shorten focusing time and optimize code scanning speed.
Second, AE optimization.
In the present embodiment, a disruptive exposure adjustment is used. The traditional AE convergence process needs to take care of the visual perception of human eyes, and the whole AE convergence process is smooth by using a step pitch concept, so that the brightness jitter of a human is not felt. The method can directly puncture the brightness to be adjusted in the code scanning scene without considering the feeling of human eyes. Compared with the traditional AE process, the time of AE can be greatly shortened by using disruptive exposure adjustment, and the code scanning speed is optimized.
Thirdly, the code scanning distance is optimized.
In the embodiment of the application, high-resolution code scanning is used to improve the code scanning distance. It was found that increasing the resolution from 640 x 480 to 960x720 increased the code scan distance from 25CM to 40 CM.
Fig. 7 is a schematic diagram of images acquired at different resolutions according to an embodiment of the present application, where 701 is an image acquired when code scanning is performed at 640 × 480 resolution, 702 is an image acquired when code scanning is performed at 960 × 720 resolution, and 703 is an image acquired when code scanning is performed at 1080 × 960 resolution, and it can be seen by comparing 701 to 703 that the sharpness of an image acquired by resolution enhancement is also correspondingly improved.
In the embodiment of the present application, the code scanning resolution is increased to 960 × 720, so that the code scanning distance can be increased without affecting the speed of switching from the code scanning mode to the face brushing mode. Fig. 8 is a schematic view of an implementation process of an output image of a camera in different modes according to an embodiment of the present application, and as shown in fig. 8, the implementation process includes:
in step S801, a sensor (sensor) of the code scanning mode camera and the face brushing mode camera uniformly outputs a 960 × 720 resolution color map.
Thus, the time consumption for switching the resolution of the USB Video Class (UVC) protocol/bottom layer can be saved.
In step S802, in the code scanning mode, the camera Software Development Kit (SDK) directly outputs 960 × 720 images, and sets the AE mode.
Here, the code sweep distance is increased with a high resolution (960 × 720). The AE mode is set to the disruptive exposure in this step, so that the AE convergence speed can be increased, and the maximum exposure time can be reduced. And the code scanning in the moving process can be realized by reducing the maximum exposure time, and the code scanning failure rate caused by handheld jitter is optimized.
Fig. 9 is an image captured when the two-dimensional code moves under a normal exposure time, and as shown in fig. 9, the image may be blurred due to motion/jitter due to a long exposure time.
Fig. 10 is a schematic view of an exposure principle, and as shown in fig. 10, in a line exposure mode, if a photographic subject moves rapidly and an exposure time is short, a photographed image 1001 is clear but the photographic subject is tilted; if the subject moves quickly and the exposure time is long, then there is smear blur in the captured image 1002. In the global exposure mode, if the photographic subject moves rapidly and the exposure time is short, the photographed image 1003 is clear and the photographic subject is not tilted; if the subject moves rapidly and the exposure time is long, the captured image 1004 has smear blur.
In step S803, in the face brushing mode, the camera SDK down-samples 960 × 720 to 640 × 480. The AE mode is set at the same time.
In step S803, the AE mode is set to perform exposure adjustment at a preset step value.
In this application embodiment, adopt the auto focus of closely within range under sweeping yard mode, adopt fixed focusing under the mode of brushing face to reach and use a camera to realize clearly sweeping yard and clear effect of brushing face simultaneously, and can keep with low costs, the consumption is little, simple manufacture just does benefit to miniaturized advantage.
Continuing with the exemplary structure of the control device 354 of the focusing mode provided in the embodiments of the present application implemented as a software module, in some embodiments, as shown in fig. 2, the software module stored in the control device 354 of the focusing mode in the memory 350 may be a control device of the focusing mode in the image capturing apparatus 300-1, including:
a first obtaining module 3541, configured to obtain, in response to an operation instruction for image acquisition, a current image acquisition mode, where the image acquisition mode at least includes a biometric image acquisition mode and a graphic identification code acquisition mode;
a first determining module 3542, configured to determine a target focusing mode corresponding to the image capturing mode;
a first focusing module 3543, configured to perform focusing based on the target focusing mode, and after the focusing is completed, the first determining module acquires an image;
a first output module 3544 configured to determine a target image based on the captured image and output the target image.
In some embodiments, the first determining module is further configured to:
when the image acquisition mode is a biological characteristic image acquisition mode, determining that the target focusing mode is a first fixed focusing mode;
correspondingly, the first focusing module is further configured to:
acquiring a first focusing parameter corresponding to the first fixed focusing mode;
and performing fixed focusing based on the first focusing parameter.
In some embodiments, the first determining module is further configured to:
when the image acquisition mode is the image identification code acquisition mode, determining that the target focusing mode is a first automatic focusing mode;
correspondingly, the first focusing module is further configured to:
acquiring a second focusing parameter and a third focusing parameter corresponding to the first automatic focusing mode, wherein the second focusing parameter is smaller than the third focusing parameter, and an object distance corresponding to the third focusing parameter is smaller than or equal to a first distance threshold;
and controlling automatic focusing between the second focusing parameter and the third focusing parameter.
In some embodiments, the first determining module is further configured to:
when the image acquisition mode is a biological characteristic image acquisition mode, determining that the target focusing mode is a second automatic focusing mode;
correspondingly, the first focusing module is further configured to:
acquiring a fourth focusing parameter and a fifth focusing parameter corresponding to the second automatic focusing mode, wherein the fourth focusing parameter is smaller than the fifth focusing parameter, and an object distance corresponding to the fourth focusing parameter is larger than a first distance threshold;
and controlling automatic focusing between the fourth focusing parameter and the fifth focusing parameter.
In some embodiments, the first determining module is further configured to:
when the image acquisition mode is the graphic identification code acquisition mode, determining that the target focusing mode is a second fixed focusing mode;
correspondingly, the first focusing module is further configured to:
acquiring a second fixed focal length corresponding to the second fixed focusing mode;
and performing fixed focusing based on the second focusing parameter.
In some embodiments, the apparatus further comprises:
the second acquisition module is used for acquiring the current exposure and the current environment brightness;
a second determining module for determining a target exposure based on the current exposure and the current ambient brightness;
a third determining module for determining a difference between the target exposure amount and the current exposure amount as an adjustment step value;
and the first adjusting module is used for adjusting the exposure amount to the target exposure amount based on the adjusting stepping value.
In some embodiments, the apparatus further comprises:
the third acquisition module is used for acquiring the current exposure and the current environment brightness;
a fourth determining module for determining a target exposure based on the current exposure and the current ambient brightness;
and the second adjusting module is used for adjusting the exposure amount to the target exposure amount according to a preset stepping value.
In some embodiments, the apparatus further comprises:
and the second output module is used for outputting prompt information when the focusing fails, wherein the prompt information is used for prompting the adjustment of the distance between the shooting object and the second output module.
In some embodiments, the first output module is further configured to:
acquiring the original resolution of the acquired image;
acquiring a first preset resolution corresponding to the image acquisition mode;
and when the original resolution is greater than the first preset resolution, downsampling the acquired image to obtain a target image.
In some embodiments, the apparatus further comprises:
the receiving module is used for receiving a switching instruction of switching an image acquisition mode by a user;
a fifth determining module, configured to determine, in response to the switching instruction, a switched image acquisition mode based on the current image acquisition mode;
and the sixth determining module is used for responding to an operation instruction for image acquisition and determining a target focusing mode corresponding to the switched image acquisition mode.
It should be noted that the description of the apparatus in the embodiment of the present application is similar to the description of the method embodiment, and has similar beneficial effects to the method embodiment, and therefore, the description is not repeated. For technical details not disclosed in the embodiments of the apparatus, reference is made to the description of the embodiments of the method of the present application for understanding.
Embodiments of the present application provide a storage medium storing executable instructions, which when executed by a processor, will cause the processor to perform the methods provided by embodiments of the present application, for example, the methods as shown in fig. 3, fig. 4, fig. 5, and fig. 6.
In some embodiments, the storage medium may be a computer-readable storage medium, such as a Ferroelectric Random Access Memory (FRAM), a Read Only Memory (ROM), a Programmable Read Only Memory (PROM), an Erasable Programmable Read Only Memory (EPROM), a charged Erasable Programmable Read Only Memory (EEPROM), a flash Memory, a magnetic surface Memory, an optical disc, or a Compact disc Read Only Memory (CD-ROM), and the like; or may be various devices including one or any combination of the above memories.
In some embodiments, executable instructions may be written in any form of programming language (including compiled or interpreted languages), in the form of programs, software modules, scripts or code, and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.
By way of example, executable instructions may correspond, but do not necessarily have to correspond, to files in a file system, and may be stored in a portion of a file that holds other programs or data, such as in one or more scripts in a hypertext Markup Language (H TML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files that store one or more modules, sub-programs, or portions of code). By way of example, executable instructions may be deployed to be executed on one computing device or on multiple computing devices at one site or distributed across multiple sites and interconnected by a communication network.
The above description is only an example of the present application, and is not intended to limit the scope of the present application. Any modification, equivalent replacement, and improvement made within the spirit and scope of the present application are included in the protection scope of the present application.

Claims (13)

1. A method for controlling a focusing mode is applied to an image acquisition device, wherein the image acquisition device comprises a camera, and the method comprises the following steps:
responding to an operation instruction for image acquisition, and acquiring a current image acquisition mode, wherein the image acquisition mode is a biological characteristic image acquisition mode or a figure identification code acquisition mode;
determining a target focusing mode corresponding to the image acquisition mode;
focusing is carried out based on the target focusing mode, and after focusing is finished, an image is collected;
determining a target image based on the acquired image, and outputting the target image.
2. The method of claim 1, wherein the determining the target focus mode corresponding to the image capture mode comprises:
when the image acquisition mode is a biological characteristic image acquisition mode, determining that the target focusing mode is a first fixed focusing mode;
correspondingly, the focusing based on the target focusing mode includes:
acquiring a first focusing parameter corresponding to the first fixed focusing mode;
and performing fixed focusing based on the first focusing parameter.
3. The method of claim 1, wherein the determining the target focus mode corresponding to the image capture mode comprises:
when the image acquisition mode is the image identification code acquisition mode, determining that the target focusing mode is a first automatic focusing mode;
correspondingly, focusing based on the target focusing mode comprises the following steps:
acquiring a second focusing parameter and a third focusing parameter corresponding to the first automatic focusing mode, wherein the second focusing parameter is smaller than the third focusing parameter, and an object distance corresponding to the third focusing parameter is smaller than or equal to a first distance threshold;
and carrying out automatic focusing based on the second focusing parameter and the third focusing parameter.
4. The method of claim 1, wherein the determining the target focus mode corresponding to the image capture mode comprises:
when the image acquisition mode is a biological characteristic image acquisition mode, determining that the target focusing mode is a second automatic focusing mode;
correspondingly, the focusing based on the target focusing mode includes:
acquiring a fourth focusing parameter and a fifth focusing parameter corresponding to the second automatic focusing mode, wherein the fourth focusing parameter is smaller than the fifth focusing parameter, and an object distance corresponding to the fourth focusing parameter is larger than a first distance threshold;
and controlling automatic focusing between the fourth focusing parameter and the fifth focusing parameter.
5. The method of claim 1, wherein the determining the target focus mode corresponding to the image capture mode comprises:
when the image acquisition mode is the graphic identification code acquisition mode, determining that the target focusing mode is a second fixed focusing mode;
correspondingly, the focusing based on the target focusing mode includes:
acquiring a sixth focusing parameter corresponding to the second fixed focusing mode;
and carrying out fixed focusing based on the sixth focusing parameter.
6. The method according to claim 3 or 5, characterized in that the method further comprises:
acquiring the current exposure and the current environment brightness;
determining a target exposure based on the current exposure and the current ambient brightness;
determining a difference between the target exposure amount and the current exposure amount as an adjustment step value;
adjusting the exposure amount to the target exposure amount based on the adjusted step value.
7. The method according to claim 2 or 4, characterized in that the method further comprises:
acquiring the current exposure and the current environment brightness;
determining a target exposure based on the current exposure and the current ambient brightness;
and adjusting the exposure amount to the target exposure amount according to a preset step value.
8. The method according to any one of claims 1 to 5, further comprising:
and when the focusing fails, outputting prompt information, wherein the prompt information is used for prompting the adjustment of the distance between the shooting object and the shooting object.
9. The method of any of claims 1 to 5, wherein determining the target image based on the acquired image comprises:
acquiring the original resolution of the acquired image;
acquiring a first preset resolution corresponding to the image acquisition mode;
and when the original resolution is larger than the first preset resolution, downsampling the acquired image to obtain a target image.
10. The method of any of claims 1 to 5, further comprising:
receiving a switching instruction for switching an image acquisition mode;
responding to the switching instruction, and determining a switched image acquisition mode based on the current image acquisition mode;
and responding to an operation instruction for image acquisition, and determining a target focusing mode corresponding to the switched image acquisition mode.
11. A control device for a focus mode, comprising:
the first acquisition module is used for responding to an operation instruction for image acquisition and acquiring a current image acquisition mode, wherein the image acquisition mode at least comprises a biological characteristic image acquisition mode and a graphic identification code acquisition mode;
the first determining module is used for determining a target focusing mode corresponding to the image acquisition mode;
the first focusing module is used for focusing based on the target focusing mode and acquiring an image after the focusing is finished;
the first output module is used for determining a target image based on the acquired image and outputting the target image.
12. An image acquisition apparatus, characterized by comprising:
a memory for storing executable instructions; a processor for implementing the method of any one of claims 1 to 10 when executing executable instructions stored in the memory;
and the camera is used for collecting images after focusing is finished.
13. A computer-readable storage medium having stored thereon executable instructions for causing a processor, when executing, to implement the method of any one of claims 1 to 10.
CN202010738759.5A 2020-07-28 2020-07-28 Focusing mode control method, device, equipment and computer readable storage medium Pending CN112822391A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010738759.5A CN112822391A (en) 2020-07-28 2020-07-28 Focusing mode control method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010738759.5A CN112822391A (en) 2020-07-28 2020-07-28 Focusing mode control method, device, equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN112822391A true CN112822391A (en) 2021-05-18

Family

ID=75853165

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010738759.5A Pending CN112822391A (en) 2020-07-28 2020-07-28 Focusing mode control method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN112822391A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113364982A (en) * 2021-06-04 2021-09-07 巽腾(广东)科技有限公司 Image generation method, device, equipment and storage medium based on LCD liquid crystal device
CN113627923A (en) * 2021-07-02 2021-11-09 支付宝(杭州)信息技术有限公司 Offline payment method, device and equipment
CN114125244A (en) * 2021-12-03 2022-03-01 上海商米科技集团股份有限公司 Camera module, implementation method and mobile device
CN115297256A (en) * 2022-07-15 2022-11-04 浙江大华技术股份有限公司 Image data processing method, device, equipment and storage medium
WO2023193607A1 (en) * 2022-04-08 2023-10-12 广州视源电子科技股份有限公司 Camera-based text recognition method and apparatus, and device and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN206075285U (en) * 2016-06-07 2017-04-05 广州众码电子科技有限公司 A kind of barcode scanner of employing twin-lens technology
CN109145667A (en) * 2018-08-30 2019-01-04 深圳大势智能科技有限公司 Quick identification bar code method, system, equipment and storage medium based on code reader
CN109598515A (en) * 2018-11-29 2019-04-09 阿里巴巴集团控股有限公司 A kind of method of payment, payment mechanism and terminal device
CN109636405A (en) * 2019-03-01 2019-04-16 北京意锐新创科技有限公司 Barcode scanning method of payment and device based on face identification functions
CN110517033A (en) * 2019-08-28 2019-11-29 腾讯科技(深圳)有限公司 A kind of quickly scanning method of payment and device
CN110533015A (en) * 2019-08-30 2019-12-03 Oppo广东移动通信有限公司 Verification method and verifying device, electronic equipment, computer readable storage medium
CN111064893A (en) * 2019-12-27 2020-04-24 上海摩勤智能技术有限公司 Code scanning and photographing compatible method and electronic terminal
CN111327888A (en) * 2020-03-04 2020-06-23 广州腾讯科技有限公司 Camera control method and device, computer equipment and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN206075285U (en) * 2016-06-07 2017-04-05 广州众码电子科技有限公司 A kind of barcode scanner of employing twin-lens technology
CN109145667A (en) * 2018-08-30 2019-01-04 深圳大势智能科技有限公司 Quick identification bar code method, system, equipment and storage medium based on code reader
CN109598515A (en) * 2018-11-29 2019-04-09 阿里巴巴集团控股有限公司 A kind of method of payment, payment mechanism and terminal device
CN109636405A (en) * 2019-03-01 2019-04-16 北京意锐新创科技有限公司 Barcode scanning method of payment and device based on face identification functions
CN110517033A (en) * 2019-08-28 2019-11-29 腾讯科技(深圳)有限公司 A kind of quickly scanning method of payment and device
CN110533015A (en) * 2019-08-30 2019-12-03 Oppo广东移动通信有限公司 Verification method and verifying device, electronic equipment, computer readable storage medium
CN111064893A (en) * 2019-12-27 2020-04-24 上海摩勤智能技术有限公司 Code scanning and photographing compatible method and electronic terminal
CN111327888A (en) * 2020-03-04 2020-06-23 广州腾讯科技有限公司 Camera control method and device, computer equipment and storage medium

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113364982A (en) * 2021-06-04 2021-09-07 巽腾(广东)科技有限公司 Image generation method, device, equipment and storage medium based on LCD liquid crystal device
WO2022253299A1 (en) * 2021-06-04 2022-12-08 简伟明 Image generation method, apparatus and device based on lcd apparatus, and storage medium
CN113627923A (en) * 2021-07-02 2021-11-09 支付宝(杭州)信息技术有限公司 Offline payment method, device and equipment
CN114125244A (en) * 2021-12-03 2022-03-01 上海商米科技集团股份有限公司 Camera module, implementation method and mobile device
WO2023193607A1 (en) * 2022-04-08 2023-10-12 广州视源电子科技股份有限公司 Camera-based text recognition method and apparatus, and device and storage medium
CN115297256A (en) * 2022-07-15 2022-11-04 浙江大华技术股份有限公司 Image data processing method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN112822391A (en) Focusing mode control method, device, equipment and computer readable storage medium
JP4724890B2 (en) Image reproduction apparatus, image reproduction method, image reproduction program, and imaging apparatus
KR101411910B1 (en) Digital photographing apparatus and method for controlling the same
JP4288612B2 (en) Image processing apparatus and method, and program
KR20200019728A (en) Shooting mobile terminal
JP5793111B2 (en) Imaging apparatus and control method
KR102336447B1 (en) Image capturing apparatus and method for the same
CN103841324A (en) Shooting processing method and device and terminal device
US8384798B2 (en) Imaging apparatus and image capturing method
CN102883104A (en) Automatic image capture
KR20120122677A (en) A digital photographing apparatus, a method for controlling the same, and a computer-readable storage medium for performing the method
US9928399B2 (en) Non-contact palmprint authentication method, device and mobile terminal
US20130188090A1 (en) Image capture apparatus and control method of image capture apparatus
JP2006025238A (en) Imaging device
KR20100134329A (en) A digital photographing apparatus, a method for controlling the same, and a computer-readable storage medium to executing the method
US11233949B2 (en) Image capturing apparatus, control method for image capturing apparatus, and control program for image capturing apparatus
CN111200708B (en) Long exposure shooting control method, system, equipment and computer storage medium
JP5451259B2 (en) Imaging apparatus, control method thereof, and program
KR101979017B1 (en) Terminal Operating Method for Close-up And Electronic Device supporting the same
JP2018152787A (en) Imaging device, external device, imaging system, imaging method, operation method, and program
JP2009055432A (en) Photographing apparatus, photographing method and program
JP2014103643A (en) Imaging device and subject recognition method
JP6270578B2 (en) IMAGING DEVICE, IMAGING DEVICE CONTROL METHOD, AND PROGRAM
KR20140031690A (en) Photographing apparatus and method for photographing image thereof
CN106791321B (en) Image processing method based on front camera and mobile terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40043919

Country of ref document: HK

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination