Image acquisition method, device, terminal and storage medium

By acquiring the number of image frames and exposure parameters from the camera, the camera is controlled to collect a set of scanned images, solving the problem of low efficiency caused by the acquisition of location information during the scanning process in existing technologies, and achieving more efficient and accurate scan recognition.

CN116095498BActive Publication Date: 2025-11-21BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111302409.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-04
Publication Date
2025-11-21
Estimated Expiration
2041-11-04

AI Technical Summary

Technical Problem

Existing technologies require identifying the location information of the QR code during the scanning process, which increases the scanning time and reduces scanning efficiency and user experience.

Method used

By acquiring the number of image frames, initial exposure value, and convergence speed value from the camera, the system controls the camera to acquire a set of images for scanning, avoiding the acquisition of the identification code's location information and improving scanning efficiency and accuracy.

Benefits of technology

It reduces the time required to obtain the location information of the identification code, improves scanning efficiency and the probability of successful identification, and enhances the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116095498B_ABST
    Figure CN116095498B_ABST
Patent Text Reader

Abstract

The present disclosure relates to the technical field of computer, and particularly relates to an image acquisition method and device, a terminal and a storage medium. The image acquisition method comprises the following steps: if the running state of a camera is a code scanning state, acquiring an image frame number corresponding to the camera; acquiring an exposure initial value corresponding to the image frame number and a convergence speed value corresponding to the image frame number; and based on the exposure initial value and the convergence speed value, controlling the camera to acquire a code scanning image set corresponding to the image frame number. By using the present disclosure, the accuracy of image acquisition can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of computer, and particularly relates to an image acquisition method and device, a terminal and a storage medium. BACKGROUND

[0002] With the development of science and technology, the development of terminals is also increasingly rapid, and therefore improving the convenience of users using the terminals has become the focus of users. The terminal can not only shoot images, but also can automatically expose (AE). Automatic exposure is an essential function of the terminal camera. The terminal can achieve rapid adjustment of camera exposure in dark and bright environments, and achieve high imaging quality, that is, the terminal can obtain images with high quality. SUMMARY

[0003] The present disclosure provides an image acquisition method and device, a terminal and a storage medium, and the main purpose is to improve the accuracy of image acquisition. The technical solutions of the embodiments of the present disclosure are as follows:

[0004] According to an aspect of the present disclosure, the embodiments of the present disclosure provide an image acquisition method, comprising:

[0005] If the running state of the camera is a code scanning state, the image frame number corresponding to the camera is obtained;

[0006] An exposure initial value corresponding to the image frame number and a convergence speed value corresponding to the image frame number are obtained;

[0007] Based on the exposure initial value and the convergence speed value, the camera is controlled to acquire a code scanning image set corresponding to the image frame number; the code scanning image set is used to instruct the terminal to obtain a recognition code corresponding to the code scanning image set.

[0008] Optionally, the image frame number corresponding to the camera is obtained, comprising:

[0009] The camera module identifier corresponding to the camera is obtained;

[0010] The image frame number corresponding to the camera module identifier is obtained.

[0011] Optionally, the image frame number corresponding to the camera is obtained, comprising:

[0012] The currently running application program is obtained;

[0013] The image frame number corresponding to the application program is obtained, and the image frame number is determined as the image frame number corresponding to the camera.

[0014] Optionally, the image frame number corresponding to the camera is obtained, comprising:

[0015] Get the number of image frames corresponding to each application in the application set, and get the set of image frame counts;

[0016] The maximum number of image frames in the set of image frames is determined as the number of image frames corresponding to the camera.

[0017] Optionally, obtaining the initial exposure value corresponding to the number of image frames and the convergence speed value corresponding to the number of image frames includes:

[0018] Obtain an initial exposure value set and a convergence speed value set. The initial exposure value set includes the number of each image frame and the initial exposure value corresponding to each image frame. The convergence speed value set includes the number of each image frame and the convergence speed value corresponding to each image frame.

[0019] Based on the set of initial exposure values, obtain the initial exposure value corresponding to the number of image frames; based on the set of convergence speed values, obtain the convergence speed value corresponding to the number of image frames.

[0020] Optionally, controlling the camera to acquire a set of scanned images corresponding to the number of image frames, based on the initial exposure value and the convergence speed value, includes:

[0021] Based on the initial exposure value and the convergence speed value, calculate the exposure parameters corresponding to the camera;

[0022] Based on the exposure parameters, the camera is controlled to acquire a set of scanned images corresponding to the number of image frames.

[0023] Optionally, the set of scanned images for controlling the camera to acquire and the number of image frames includes:

[0024] Control the camera to capture the first scanned image;

[0025] If the first scanned image meets the image conditions, then the camera is controlled to capture a second scanned image with a preset number of frames, wherein the preset number of frames is one frame smaller than the number of image frames;

[0026] If the second scanned image with the preset number of frames is obtained, then the first scanned image and the second scanned image with the preset number of frames are added to the scanned image set.

[0027] According to one aspect of this disclosure, embodiments of this disclosure provide an image acquisition apparatus, including:

[0028] The frame acquisition unit is used to acquire the number of image frames corresponding to the camera if the camera is in scanning mode.

[0029] The speed value acquisition unit is configured to acquire an exposure initial value corresponding to the image frame number and a convergence speed value corresponding to the image frame number.

[0030] The image acquisition unit is configured to control the camera to acquire a set of code scanning images corresponding to the image frame number based on the exposure initial value and the convergence speed value, and the set of code scanning images are used to instruct the terminal to acquire a recognition code corresponding to the set of code scanning images.

[0031] Optionally, the frame number acquisition unit comprises an identifier acquisition subunit and a frame number acquisition subunit.

[0032] The identifier acquisition subunit is configured to acquire a camera module identifier corresponding to the camera.

[0033] The frame number acquisition subunit is configured to acquire an image frame number corresponding to the camera module identifier.

[0034] Optionally, the frame number acquisition unit comprises a program acquisition subunit and a frame number acquisition subunit.

[0035] The program acquisition subunit is configured to acquire a currently running application program.

[0036] The frame number acquisition subunit is configured to acquire an image frame number corresponding to the application program, and determine the image frame number as the image frame number corresponding to the camera.

[0037] Optionally, when the frame number acquisition unit is configured to acquire an image frame number corresponding to the camera, it is specifically configured to:

[0038] Acquire image frame numbers corresponding to each application program in a set of application programs to obtain a set of image frame numbers.

[0039] Determine a maximum image frame number in the set of image frame numbers as the image frame number corresponding to the camera.

[0040] Optionally, when the speed value acquisition unit is configured to acquire an exposure initial value corresponding to the image frame number and a convergence speed value corresponding to the image frame number, it is specifically configured to:

[0041] Acquire a set of exposure initial values and a set of convergence speed values, the set of exposure initial values comprising each image frame number and an exposure initial value corresponding to the each image frame number, and the set of convergence speed values comprising the each image frame number and a convergence speed value corresponding to the each image frame number.

[0042] The exposure initial value corresponding to the image frame number is obtained based on the exposure initial value set, and the convergence speed value corresponding to the image frame number is obtained based on the convergence speed value set.

[0043] Optionally, the image acquisition unit is configured to control the camera to acquire the set of code scanning images corresponding to the image frame number based on the exposure initial value and the convergence speed value, and specifically configured to:

[0044] calculate the exposure parameter corresponding to the camera based on the exposure initial value and the convergence speed value;

[0045] control the camera to acquire the set of code scanning images corresponding to the image frame number based on the exposure parameter.

[0046] Optionally, the image acquisition unit is configured to control the camera to acquire the set of code scanning images corresponding to the image frame number, and specifically configured to:

[0047] control the camera to acquire a first code scanning image;

[0048] if the first code scanning image meets the image condition, control the camera to acquire a second code scanning image of a preset frame number, wherein the preset frame number is one frame less than the image frame number;

[0049] if the second code scanning image of the preset frame number is acquired, add the first code scanning image and the second code scanning image of the preset frame number to the set of code scanning images.

[0050] According to an aspect of the present disclosure, a terminal is provided, comprising:

[0051] at least one processor; and

[0052] a memory connected to the at least one processor in communication; wherein

[0053] the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of any one of the preceding aspects.

[0054] According to an aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to perform the method of any one of the preceding aspects.

[0055] According to an aspect of the present disclosure, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the method of any one of the preceding aspects.

[0056] The technical scheme provided by some embodiments of the present disclosure has at least the following beneficial effects:

[0057] In one or more embodiments of the present disclosure, if the running state of the camera is a code scanning state, the number of image frames corresponding to the camera is obtained, the initial exposure value corresponding to the number of image frames and the convergence speed value corresponding to the number of image frames are obtained, and the camera is controlled to collect a code scanning image set corresponding to the number of image frames based on the initial exposure value and the convergence speed value. Since the code scanning image set is used to indicate that the terminal obtains an identification code corresponding to the code scanning image set, in the code scanning process, the position information of the identification code in the code scanning image does not need to be obtained, the time length for obtaining the position information of the identification code can be reduced, the efficiency of code scanning can be improved, and based on the initial exposure value and the convergence speed value, the camera is controlled to collect the code scanning image set corresponding to the number of image frames, the probability that an exposure image cannot recognize the identification code is reduced, the accuracy of image collection is improved, the probability of successful identification of the identification code is improved, and thus the user experience can be improved.

[0058] It should be understood that the content described in this part is not intended to identify key or important features of the embodiments of the present disclosure, nor is it used to limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS

[0059] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or the prior art, the drawings needed in the embodiments or the prior art description will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present disclosure, and other drawings can be obtained by those skilled in the art without creative labor.

[0060] Figure 1 A system architecture diagram of an image collection method provided by an embodiment of the present disclosure is shown;

[0061] Figure 2 A background schematic diagram of an image collection method provided by an embodiment of the present disclosure is shown;

[0062] Figure 3 A flow schematic diagram of an image collection method provided by an embodiment of the present disclosure is shown;

[0063] Figure 4 A flow schematic diagram of an image collection method provided by an embodiment of the present disclosure is shown;

[0064] Figure 5 An example schematic diagram of a code scanning image collected in a high dynamic scene provided by an embodiment of the present disclosure is shown;

[0065] Figure 6An example schematic diagram of a terminal interface provided by an embodiment of the present disclosure is shown.

[0066] Figure 7 An example schematic diagram of a convergence speed value set provided by an embodiment of the present disclosure is shown.

[0067] Figure 8 An example schematic diagram of a code scanning image provided by an embodiment of the present disclosure is shown.

[0068] Figure 9 An example schematic diagram of a code scanning image provided by an embodiment of the present disclosure is shown.

[0069] Figure 10 An example schematic diagram of an image acquisition device provided by an embodiment of the present disclosure is shown.

[0070] Figure 11 An example schematic diagram of an image acquisition device provided by an embodiment of the present disclosure is shown.

[0071] Figure 12 An example schematic diagram of an image acquisition device provided by an embodiment of the present disclosure is shown.

[0072] Figure 13 An example schematic diagram of a terminal provided by an embodiment of the present disclosure is shown.

[0073] Figure 14 An example schematic diagram of an operating system and user space provided by an embodiment of the present disclosure is shown.

[0074] Figure 15 An example schematic diagram of an Android operating system is shown. Figure 14 An example schematic diagram of an Android operating system is shown.

[0075] Figure 16 An example schematic diagram of an IOS operating system is shown. Figure 14 An example schematic diagram of an IOS operating system is shown. DETAILED DESCRIPTION

[0076] The technical solutions in the embodiments of the present disclosure will be described clearly and completely below with reference to the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of protection of the present disclosure.

[0077] In the description of the present disclosure, it needs to be understood that the terms "first", "second" and the like are only for descriptive purpose and cannot be understood as indicating or implying relative importance. In the description of the present disclosure, it needs to be explained that, unless otherwise explicitly specified and limited, "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units not listed, or optionally also includes other steps or units inherent to these processes, methods, products or devices. The specific meaning of the above terms in the present disclosure can be understood by the person skilled in the art according to the specific circumstances. In addition, in the description of the present disclosure, "a plurality of" means two or more, unless otherwise specified. The association relationship of the associated objects is described, which means that there can be three relationships, for example, A and / or B can mean that A exists alone, A and B exist together, and B exists alone. The character " / " generally represents an "or" relationship between the associated objects before and after it.

[0078] With the development of science and technology, the terminal supports more and more functions, which greatly facilitates the life of users. For example, the terminal can support image acquisition function. The acquired images include but are not limited to high dynamic range image (High-Dynamic Range, abbreviated as HDR) and ordinary image. High dynamic range image (High-Dynamic Range, abbreviated as HDR) can provide more dynamic range and image details than ordinary image. According to different exposure time LDR (Low-Dynamic Range) image, the final HDR image is synthesized by using the LDR image corresponding to the best details of each exposure time, which can better reflect the visual effect in the real environment of the user.

[0079] It is easy to understand that automatic exposure is a necessary function of the terminal camera, that is, the terminal can quickly adjust the exposure of the camera in dark and bright environments to achieve high imaging quality, that is, the terminal can obtain high-quality images.

[0080] In some embodiments, Figure 1 A system architecture diagram of an image acquisition method provided by an embodiment of the present disclosure is shown. As shown in Figure 1 As shown, the terminal 11 can obtain the two-dimensional code displayed by the terminal 13 through the network 12. When the terminal 11 is far away from the terminal 12, the proportion of the two-dimensional code image displayed by the terminal 11 is low, and the terminal 11 can receive the magnification instruction for the two-dimensional code image, so that the terminal 11 can recognize the two-dimensional code successfully.

[0081] According to some embodiments, Figure 2A background schematic diagram of an image acquisition method provided by an embodiment of the present disclosure is shown. As shown in Figure 2 In the field of automatic exposure technology, the image acquired by the terminal C can be as shown in Figure 2 When the terminal acquires an image, the exposure time and the light sensitivity of the next frame in a single code scanning process can be calculated, for example, based on the brightness information of the entire display screen. In order to improve performance and experience, the terminal camera generally uses a warm-up technology, that is, the AE information at the last time when the camera is turned off is stored and directly applied to the first frame exposure when the camera is turned on next time. In this way, when the camera is used for the second time in the same scene, an image with ideal brightness can be obtained at the moment when the camera is turned on.

[0082] Optionally, in Figure 2 , the black area is the screen displayed by the camera of the terminal C, indicating that the current scene is a night scene, and the white area is a light-emitting screen, for example, a bright screen area of another terminal acquired by the terminal C. The other terminal includes but is not limited to a mobile phone, a tablet, an underground parking lot, and a vending machine. The terminal C can increase the weight of the exposure parameters and the focusing parameters in the center area of the screen, which can not only solve the code scanning problem in a high dynamic scene, but also improve the code scanning speed in other scenes to a certain extent. However, when the two-dimensional code image is not in the center area of the screen, the code scanning success rate will be greatly reduced.

[0083] As can be easily understood, the terminal can also obtain illumination information according to the image entropy value. Based on the comparison between the image entropy value and the preset entropy value, the image is divided into a region of interest and a region of no interest, and then different weights are assigned to different regions by using a weight distribution method according to the image entropy value, and finally accurate automatic exposure is performed. However, since the position of the two-dimensional code is not fixed, the terminal needs to identify the position information of the two-dimensional code first, which will increase the code scanning time, reduce the code scanning efficiency, and reduce the user experience.

[0084] The present disclosure will be described in detail below with reference to specific embodiments.

[0085] In one embodiment, as shown in Figure 3 , Figure 3 A flowchart of an image acquisition method provided by an embodiment of the present disclosure is shown. The method can be implemented by relying on a computer program and can run on a device including an image acquisition function. The computer program can be integrated in an application or can run as a standalone tool application.

[0086] The image acquisition device can be a terminal with an image acquisition function, including but not limited to a wearable device, a handheld device, a personal computer, a tablet computer, a vehicle-mounted device, a smart phone, a computing device, or other processing devices connected to a wireless modem, etc. In different networks, the terminal can be called by different names, such as user equipment, access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication device, user agent or user device, cellular phone, cordless phone, personal digital assistant (PDA), 5th Generation Mobile Communication Technology (5G) network, 4th Generation Mobile Communication Technology (4G) network, 3rd-Generation (3G) network or terminal in future evolution network, etc.

[0087] Specifically, the image acquisition method comprises:

[0088] In S101, if the running state of the camera is a code scanning state, the image frame number corresponding to the camera is acquired.

[0089] In some embodiments, the camera is a video input device. The camera of the present disclosure is used to acquire a code scanning image when the terminal scans a code. The camera of the present disclosure is not limited to a fixed camera. For example, when the type of the camera changes, the camera also changes accordingly. The camera includes but is not limited to a digital camera and an analog camera, etc.

[0090] According to some embodiments, the running state of the camera is used to indicate the image acquired by the camera. Different running states of the camera can be used to acquire different images. For example, the photographing state of the camera is used to take an image, and no identification is required in the photographing process to acquire an identification code included in the image. For example, when the camera is in a code scanning state, the camera does not need to take an image, but needs to identify the acquired image so as to acquire an identification code in the image.

[0091] It is easy to understand that the code scanning state is used to represent the current state of the camera, and the camera is suitable for code scanning, rather than starting other functions of the camera.

[0092] Optionally, the image frame number refers to the number of frames of images captured by the camera in a code scanning process. The image frame number does not refer to a fixed number of frames. For example, when the type of the camera changes, the image frame number can also change accordingly. For example, when the time point of capturing images changes, the image frame number can also change accordingly. The image frame number can be set when the terminal is manufactured, or can be set based on the frame number setting instruction of the user.

[0093] According to some embodiments, the image frame number refers to the effective frame number of the code scanning image captured by the terminal, that is, the terminal can obtain the identification code information corresponding to the code scanning image based on the code scanning image corresponding to the image frame number.

[0094] In some embodiments, when the terminal executes the image capturing method, the terminal can obtain the running state of the camera. If the terminal determines that the running state of the camera is a code scanning state, the terminal can obtain the image frame number corresponding to the camera.

[0095] In S102, an exposure initial value corresponding to the image frame number and a convergence speed value corresponding to the image frame number are obtained.

[0096] In some embodiments, exposure refers to the amount of light entering the lens and irradiating on the photosensitive element during photography, which is controlled by the combination of aperture, shutter, and sensitivity. Exposure value (EV) represents all camera aperture and shutter combinations that can give the same exposure. The exposure initial value refers to the exposure value corresponding to the camera when the camera starts the code scanning function, that is, the exposure initial value is used to represent the exposure value corresponding to the initial code scanning state of the camera. The exposure initial value does not refer to a fixed initial value, and the exposure initial value corresponds to the image frame number. For example, when the image frame number changes, the exposure initial value also changes accordingly.

[0097] According to some embodiments, the convergence speed value is used to control the brightness difference between adjacent two frames of images. The greater the convergence speed value, the greater the brightness difference between adjacent two frames of images. The smaller the convergence speed value, the smaller the brightness difference between adjacent two frames of images. The convergence speed value does not refer to a fixed speed value, and the convergence speed value corresponds to the image frame number. For example, when the image frame number changes, the convergence speed value also changes accordingly.

[0098] As can be easily understood, when the terminal executes the image capturing method, the terminal can obtain the running state of the camera. If the terminal determines that the running state of the camera is a code scanning state, the terminal can obtain the image frame number corresponding to the camera. The terminal can obtain the exposure initial value corresponding to the image frame number and the convergence speed value corresponding to the image frame number.

[0099] S103, based on the exposure initial value and the convergence speed value, control the camera to collect a set of code scanning images corresponding to the image frame number.

[0100] According to some embodiments, a set refers to a collection of specific or abstract objects with certain specific properties. A code scanning image refers to an image that includes an identification code in the image. The code scanning image does not refer to a specific image. For example, when the identification code included in the image changes, the code scanning image also changes accordingly. The identification code includes but is not limited to a two-dimensional code, a bar code, etc.

[0101] In some embodiments, the set of code scanning images is a set of multiple frames of code scanning images collected for a certain identification code image. The set of code scanning images is used to instruct the terminal to obtain the identification code corresponding to the set of code scanning images. That is, when the terminal obtains the set of code scanning images, the terminal can identify the code scanning images included in the set of code scanning images to obtain the identification code. The identification code includes but is not limited to a two-dimensional code, a bar code, etc.

[0102] The identification code image is an image displayed by another terminal, and is not the execution subject of the embodiments of the present disclosure. The set of code scanning images does not refer to a specific fixed set of images. For example, when the image frame number included in the set of code scanning images changes, the set of code scanning images also changes accordingly. For example, when the identification code image corresponding to the set of code scanning images changes, the set of code scanning images also changes accordingly.

[0103] As can be easily understood, when the terminal executes the image collection method, the terminal can obtain the running state of the camera. If the terminal determines that the running state of the camera is a code scanning state, the terminal can obtain the image frame number corresponding to the camera. The terminal can obtain the exposure initial value corresponding to the image frame number and the convergence speed value corresponding to the image frame number. The terminal can control the camera to collect a set of code scanning images corresponding to the image frame number based on the exposure initial value and the convergence speed value.

[0104] In one or more embodiments of the present disclosure, if the running state of the camera is a code scanning state, the image frame number corresponding to the camera is obtained, the exposure initial value corresponding to the image frame number and the convergence speed value corresponding to the image frame number are obtained, and the camera is controlled to collect a set of code scanning images corresponding to the image frame number based on the exposure initial value and the convergence speed value. Since the set of code scanning images is used to instruct the terminal to obtain the identification code corresponding to the set of code scanning images, in the code scanning process, the position information of the identification code in the code scanning image does not need to be obtained, the time length for obtaining the position information of the identification code can be reduced, the efficiency of code scanning can be improved, the camera is controlled to collect a set of code scanning images corresponding to the image frame number based on the exposure initial value and the convergence speed value, the probability that the exposure image cannot identify the identification code can be reduced, the accuracy of image collection can be improved, the probability of successful identification of the identification code can be improved, and thus the user experience can be improved.

[0105] Please refer to Figure 4 , Figure 4 A flowchart of an image acquisition method provided by an embodiment of the present disclosure is shown. Specifically,

[0106] In S201, if the running state of the camera is a code scanning state, the terminal acquires the image frame number corresponding to the camera.

[0107] The specific process is described above, and will not be repeated here.

[0108] In some embodiments, the embodiments of the present disclosure can be applied to a high dynamic scene. The high dynamic scene may, for example, be a two-dimensional code recognition scene. Figure 5 An example schematic diagram of a code scanning image acquired in a high dynamic scene provided by an embodiment of the present disclosure is shown. As Figure 5 shown, the two-dimensional code image in the high dynamic scene may, for example, go through the process of a dark image to a clear image, and then to an overexposed image. Figure 5 As shown, in this image acquisition process, since overexposure occurs from the 6th frame, the first frame image is unclear, and therefore the terminal acquires 4 frames of image frame number, i.e., the terminal acquires 4 frames of valid frame number.

[0109] In some embodiments, Figure 6 An example schematic diagram of a terminal interface provided by an embodiment of the present disclosure is shown. As Figure 6 shown, the terminal B may, for example, display a two-dimensional code image. The execution subject of the embodiments of the present disclosure may, for example, be a terminal A. A two-dimensional bar code / two-dimensional code (2-dimensional bar code) is a black-and-white alternating geometric pattern that records data symbol information in a certain pattern on a plane (two-dimensional direction). The terminal A may, for example, receive a click instruction input for the “code scanning” function. The terminal A determines that the running state of the camera is a code scanning state, and the terminal A can control the camera to acquire the two-dimensional code image displayed by the terminal B.

[0110] According to some embodiments, when the terminal acquires the image frame number corresponding to the camera, the terminal can acquire the camera module identifier corresponding to the camera. When the terminal acquires the camera module identifier corresponding to the camera, the terminal can acquire the image frame number corresponding to the camera module identifier. The terminal acquires the image frame number through the camera module identifier, which can improve the matching of the image frame number and the camera, improve the accuracy of the image frame number acquisition, and thus improve the accuracy of the image acquisition.

[0111] It is easy to understand that the camera module identifier is used to uniquely identify the same type of camera. One camera corresponds to one camera module identifier. One camera module identifier corresponds to one image frame number. The camera modules with the same identifier can correspond to the same image frame number, that is, when the camera modules included in the plurality of cameras have consistent camera module identifiers, the image frame numbers corresponding to the plurality of cameras are the same.

[0112] Optionally, the image frame number corresponding to the Q camera module identifier can be 2 frames, the image frame number corresponding to the W camera module identifier can be 3 frames, and the image frame number corresponding to the E camera module identifier can be 4 frames. For example, the terminal obtains the camera module identifier corresponding to the camera, which can be the W camera module identifier, and obtains the image frame number corresponding to the W camera module identifier, which can be 3 frames, that is, the terminal obtains the image frame number corresponding to the camera, which can be 3 frames.

[0113] According to some embodiments, when the terminal obtains the image frame number corresponding to the camera, the terminal can obtain the currently running application program. The terminal can obtain the image frame number corresponding to the application program and determine the image frame number as the image frame number corresponding to the camera. Different application programs can correspond to different image frame numbers. For example, different application programs can correspond to different image frame numbers because different application programs have different requirements for image recognition. Since different application programs correspond to different image frame numbers, the terminal obtains the image frame number based on the currently running application program, which can improve the accuracy of image frame number acquisition and improve the accuracy of image acquisition.

[0114] It is easy to understand that the image frame number corresponding to the R application program can be 2 frames, the image frame number corresponding to the T application program can be 3 frames, and the image frame number corresponding to the Y application program can be 4 frames. The currently running application program obtained by the terminal can be the T application program. The terminal obtains the image frame number corresponding to the T application program, which can be 3 frames, that is, the terminal can obtain the image frame number corresponding to the camera, which is 3 frames.

[0115] According to some embodiments, when the terminal obtains the image frame number corresponding to the camera, the terminal can obtain the image frame number corresponding to each application program in the application program set and obtain a set of image frame numbers. The terminal can determine the maximum image frame number in the set of image frame numbers as the image frame number corresponding to the camera. The terminal directly determines the maximum image frame number in the set of image frame numbers as the image frame number corresponding to the camera, which can meet the requirements of multiple application programs for image frame numbers, directly obtain the image frame number, reduce the time length of image frame number acquisition, and improve the convenience of image acquisition.

[0116] It is easy to understand that the application program set includes at least one application program. The application program set does not refer to a certain application program set. For example, when the type of the application program included in the application program set changes, the application program set also changes accordingly. For example, when the number of the application program included in the application program set changes, the application program set also changes accordingly.

[0117] Optionally, the image frame number set refers to a set of image frame numbers corresponding to each application program. The image frame number set does not refer to a certain fixed frame number set. For example, when the number of the application program included in the application program set changes, the number of the image frame number included in the image frame number set also changes accordingly, and the image frame number set also changes accordingly.

[0118] In some embodiments, when the terminal obtains the image frame number corresponding to each application program, the terminal can determine the image frame number based on the historical record that each application program successfully obtains the image frame number corresponding to the identification code of the code scanning image.

[0119] In some embodiments, the application program set may, for example, include R application programs, T application programs and Y application programs, wherein the image frame number corresponding to the R application program may, for example, be 2 frames, the image frame number corresponding to the T application program may, for example, be 3 frames, and the image frame number corresponding to the Y application program may, for example, be 4 frames. The image frame number set obtained by the terminal may, for example, include 2 frames, 3 frames and 4 frames. The maximum image frame number in the image frame number set obtained by the terminal may, for example, be 4 frames, and the terminal may determine 4 frames as the image frame number corresponding to the camera.

[0120] S202, obtaining a set of exposure initial values and a set of convergence speed values;

[0121] In some embodiments, the set of exposure initial values refers to a set of corresponding relationships between image frame numbers and exposure initial values. Each image frame number and the exposure initial value corresponding to the image frame number are included in the set of exposure initial values. The set of exposure initial values does not refer to a certain fixed corresponding relationship. For example, when the terminal obtains a modification instruction for the set of exposure initial values, the terminal can modify the set of exposure initial values based on the modification instruction. Different image frame numbers can correspond to different exposure initial values. The terminal may, for example, obtain an image frame number and the exposure initial value corresponding to the image frame number in advance, and store the image frame number and the exposure initial value corresponding to the image frame number in association.

[0122] According to some embodiments, the convergence speed value set refers to a set of correspondence between image frame numbers and convergence speed values. Each image frame number and the corresponding convergence speed value are included in the convergence speed value set. The convergence speed value set does not refer to a fixed correspondence. For example, when the terminal obtains a modification instruction for the convergence speed value set, the terminal can modify the convergence speed value set based on the modification instruction. Different image frame numbers can correspond to different convergence speed values. The terminal can, for example, obtain an image frame number and the corresponding convergence speed value in advance, and store the image frame number and the corresponding convergence speed value in association. Figure 7 An example schematic diagram of a convergence speed value set provided by an embodiment of the present disclosure is shown. As shown in Figure 7 When the image frame number is 8 frames, the corresponding convergence speed value of the image frame number can be 0.6, for example.

[0123] It is easy to understand that when the terminal obtains the image frame number corresponding to the camera, the terminal can obtain the exposure initial value set and the convergence speed value set.

[0124] S203, obtaining an exposure initial value corresponding to the image frame number based on the exposure initial value set, and obtaining a convergence speed value corresponding to the image frame number based on the convergence speed value set;

[0125] In some embodiments, when the terminal obtains the exposure initial value set between the image frame number and the exposure initial value, and the convergence speed value set between the image frame number and the convergence speed value, since each image frame number and the corresponding exposure initial value are included in the exposure initial value set, and each image frame number and the corresponding convergence speed value are included in the convergence speed value set, the terminal can obtain an exposure initial value corresponding to the image frame number based on the exposure initial value set, and obtain a convergence speed value corresponding to the image frame number based on the convergence speed value set.

[0126] It is easy to understand that since the exposure initial value determines the clarity of the first frame image collected by the terminal controlling the camera, and the convergence speed value determines the effective frame number of the code scanning image collected by the terminal controlling the camera, the terminal obtaining an exposure initial value corresponding to the image frame number based on the exposure initial value set and obtaining a convergence speed value corresponding to the image frame number based on the convergence speed value set can improve the accuracy of the code scanning image acquisition.

[0127] Optionally, when the terminal obtains an exposure initial value corresponding to the image frame number based on the exposure initial value set, the terminal can also directly determine the exposure initial value based on the clarity of the first frame image collected by the camera. The exposure initial value does not refer to a fixed initial value, for example, when the clarity of the first frame image changes, the exposure initial value can also change accordingly.

[0128] It is easy to understand that after the terminal determines the exposure initial value, the terminal can obtain a set of convergence speed values between the image frame number and the convergence speed value through experimental data. The terminal obtains the image frame number when each application program successfully scans the code. The convergence speed value corresponding to the image frame number obtained by the terminal can be 0.65, for example.

[0129] In S204, based on the exposure initial value and the convergence speed value, the camera is controlled to collect a set of code scanning images corresponding to the image frame number.

[0130] The specific process is as described above, which will not be repeated here.

[0131] According to some embodiments, when the terminal controls the camera to collect a set of code scanning images corresponding to the image frame number based on the exposure initial value and the convergence speed value, the terminal can calculate the exposure parameter corresponding to the camera based on the exposure initial value and the convergence speed value. Based on the exposure parameter, the terminal can control the camera to collect a set of code scanning images corresponding to the image frame number. Based on the fact that the terminal can continuously adjust the exposure parameter during the acquisition of the code scanning image, the terminal can control the camera to collect different code scanning images, thereby improving the accuracy of the acquisition of the code scanning image.

[0132] According to some embodiments, when the terminal controls the camera to collect a set of code scanning images corresponding to the image frame number, the terminal can control the camera to collect a first code scanning image. When the terminal obtains the first code scanning image, the terminal can detect whether the first code scanning image meets the image condition. If the first code scanning image meets the image condition, the terminal can control the camera to collect a second code scanning image of a preset frame number. The preset frame number is one less than the image frame number. If the second code scanning image of the preset frame number is obtained, the terminal can add the first code scanning image and the second code scanning image of the preset frame number to the set of code scanning images. The terminal starts to obtain the second code scanning image of the preset frame number from the first code scanning image that meets the image condition, which reduces the probability of obtaining a code scanning image that cannot be recognized, and improves the accuracy of the acquisition of the code scanning image.

[0133] In some embodiments, the first code scanning image refers to an image of a certain frame that meets the image condition and is collected by the terminal. The frame number corresponding to the first code scanning image is one frame. The frame number corresponding to the second code scanning image is one frame. The first code scanning image can be the first frame code scanning image collected by the terminal when the running state of the camera is the code scanning state, or can be the second frame code scanning image. If the first frame code scanning image collected by the terminal meets the image condition, the first code scanning image can be the first frame code scanning image. If the second frame code scanning image collected by the terminal meets the image condition, the first code scanning image can be the second frame code scanning image.

[0134] It is easy to understand that the image condition refers to a condition for judging whether the code scanning image meets the image recognition requirement. The image condition does not refer to a fixed condition. The image condition includes, but is not limited to, a definition condition, a brightness condition, and the like.

[0135] Optionally, the preset frame number refers to a frame number corresponding to the second code scanning image. The preset frame number is a frame number smaller than the image frame number by one frame. The preset frame number does not refer to a fixed frame number. For example, when the image frame number changes, the preset frame number also changes accordingly.

[0136] It is easy to understand that the image frame number can be, for example, 6 frames. The preset frame number can be, for example, 5 frames. When the terminal determines that the running state of the camera is the code scanning state, the terminal can continue to collect 5 frames of images when the first frame of the code scanning image collected by the terminal meets the image condition, and add the first frame of the code scanning image and the 5 frames of images to the code scanning image set.

[0137] In some embodiments, Figure 8 An example schematic diagram of a code scanning image provided by an embodiment of the present disclosure is shown. As shown in Figure 8 The image collected by the terminal using the method provided by the embodiment of the present disclosure can be, for example, an image in an exposure state, and the terminal cannot obtain the recognition code corresponding to the image based on the image. Figure 9 An example schematic diagram of a code scanning image provided by an embodiment of the present disclosure is shown. As shown in Figure 9 The image collected by the terminal using the method provided by the embodiment of the present disclosure can be, for example, an image not in an exposure state, and the terminal can obtain the recognition code corresponding to the image based on the image.

[0138] Optionally, when the terminal obtains the code scanning image set, the terminal can obtain the recognition code corresponding to the code scanning image set based on the code scanning image set, which can improve the accuracy of recognition code acquisition, improve the convenience of recognition code acquisition, and improve the user experience.

[0139] In one or more embodiments of the present disclosure, if the running state of the camera is a code scanning state, the image frame number corresponding to the camera is obtained. The determination of the running state of the camera can improve the accuracy of the image frame number acquisition, and improve the accuracy of the code scanning image set acquisition. Secondly, the exposure initial value set and the convergence speed value set are obtained, the exposure initial value corresponding to the image frame number can be obtained based on the exposure initial value set, the convergence speed value corresponding to the image frame number can be obtained based on the convergence speed value set, which can improve the accuracy of the exposure initial value and the convergence speed value acquisition, and improve the accuracy of the code scanning image set acquisition. Finally, based on the exposure initial value and the convergence speed value, the camera is controlled to collect the code scanning image set corresponding to the image frame number, which can reduce the probability of obtaining an exposure image that cannot recognize the identification code, improve the accuracy of image collection, improve the probability of successful identification of the identification code, and thus improve the user experience.

[0140] The following is an apparatus embodiment of the present disclosure, which can be used to execute the method embodiments of the present disclosure. For details not disclosed in the apparatus embodiments of the present disclosure, please refer to the method embodiments of the present disclosure.

[0141] Please refer to Figure 10 which shows a structure diagram of a first image collection apparatus provided by an example embodiment of the present disclosure. The image collection apparatus can be realized by software, hardware or a combination of the two to become all or part of the apparatus. The image collection apparatus 1000 includes a frame number acquisition unit 1001, a speed value acquisition unit 1002 and an image collection unit 1003, wherein:

[0142] The frame number acquisition unit 1001 is configured to, if the running state of the camera is a code scanning state, obtain the image frame number corresponding to the camera.

[0143] The speed value acquisition unit 1002 is configured to obtain the exposure initial value corresponding to the image frame number and the convergence speed value corresponding to the image frame number.

[0144] The image collection unit 1003 is configured to control the camera to collect the code scanning image set corresponding to the image frame number based on the exposure initial value and the convergence speed value. The code scanning image set is used to instruct the terminal to obtain the identification code corresponding to the code scanning image set.

[0145] According to some embodiments, Figure 11 The structure diagram of an image collection apparatus provided by an embodiment of the present disclosure is shown. As Figure 11 shown, the frame number acquisition unit 1001 includes an identification acquisition sub-unit 1011 and a frame number acquisition sub-unit 1021. When the frame number acquisition unit 1001 is configured to obtain the image frame number corresponding to the camera:

[0146] The identification acquisition sub-unit 1011 is configured to obtain the camera module identification corresponding to the camera.

[0147] The frame number acquisition sub-unit 1021 is configured to acquire the image frame number corresponding to the camera module identifier.

[0148] According to some embodiments, Figure 12 A structural schematic diagram of an image acquisition device is shown according to an embodiment of the present disclosure. As shown in the figure, Figure 12 The frame number acquisition unit 1001 includes a program acquisition sub-unit 1031 and a frame number acquisition sub-unit 1021. The frame number acquisition unit 1001 is configured to acquire the image frame number corresponding to the camera when:

[0149] The program acquisition sub-unit 1031 is configured to acquire the currently running application program.

[0150] The frame number acquisition sub-unit 1021 is configured to acquire the image frame number corresponding to the application program, and determine the image frame number as the image frame number corresponding to the camera.

[0151] According to some embodiments, when the frame number acquisition unit 1001 acquires the image frame number corresponding to the camera, it is specifically configured to:

[0152] Acquire the image frame number corresponding to each application program in the application program set, and acquire the image frame number set;

[0153] Determine the maximum image frame number in the image frame number set as the image frame number corresponding to the camera.

[0154] According to some embodiments, when the speed value acquisition unit 1002 acquires the exposure initial value corresponding to the image frame number and the convergence speed value corresponding to the image frame number, it is specifically configured to:

[0155] Acquire the exposure initial value set and the convergence speed value set. The exposure initial value set includes each image frame number and the exposure initial value corresponding to each image frame number. The convergence speed value set includes each image frame number and the convergence speed value corresponding to each image frame number.

[0156] Based on the exposure initial value set and the convergence speed value set, the exposure initial value corresponding to the image frame number and the convergence speed value corresponding to the image frame number are acquired.

[0157] According to some embodiments, when the image acquisition unit 1003 controls the camera to acquire the set of code scanning images corresponding to the image frame number based on the exposure initial value and the convergence speed value, it is specifically configured to:

[0158] Based on the exposure initial value and the convergence speed value, calculate the exposure parameter corresponding to the camera.

[0159] Based on the exposure parameter, control the camera to acquire the set of code scanning images corresponding to the image frame number.

[0160] According to some embodiments, the image acquisition unit 1003 is configured to control the camera to acquire a set of code scanning images corresponding to the image frame number, specifically used for:

[0161] controlling the camera to acquire a first code scanning image;

[0162] if the first code scanning image meets the image condition, controlling the camera to acquire a preset number of second code scanning images, wherein the preset number is one less than the image frame number;

[0163] if the preset number of second code scanning images are acquired, adding the first code scanning image and the preset number of second code scanning images to the set of code scanning images.

[0164] It should be noted that the image acquisition device provided in the above embodiments is used to execute the image acquisition method, and the above-mentioned division of functional modules is only used as an example. In actual application, the above-mentioned functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the image acquisition device and the image acquisition method provided in the above embodiments belong to the same concept, and the implementation process is described in detail in the method embodiments, which will not be repeated here.

[0165] The above-mentioned sequence numbers of the embodiments of the present disclosure are only for description, and do not represent the advantages or disadvantages of the embodiments.

[0166] In one or more embodiments of the present disclosure, if the running state of the camera is a code scanning state, the frame number acquisition unit can acquire an image frame number corresponding to the camera, the speed value acquisition unit can acquire an exposure initial value corresponding to the image frame number and a convergence speed value corresponding to the image frame number, and the image acquisition unit can control the camera to acquire a set of code scanning images corresponding to the image frame number based on the exposure initial value and the convergence speed value. Since the set of code scanning images is used to indicate that the terminal acquires an identification code corresponding to the set of code scanning images, in the code scanning process, there is no need to acquire the position information of the identification code in the code scanning image, which can reduce the time length of acquiring the position information of the identification code, improve the efficiency of code scanning, and based on the exposure initial value and the convergence speed value, control the camera to acquire the set of code scanning images corresponding to the image frame number, which can reduce the probability of acquiring an exposure image that cannot recognize the identification code, improve the accuracy of image acquisition, improve the probability of successful identification of the identification code, and further improve the user experience.

[0167] The embodiments of the present disclosure also provide a computer storage medium, which can store a plurality of instructions, the instructions being adapted to be loaded and executed by a processor to implement the image acquisition method of the above-mentioned Figures 3-9 embodiments. The specific implementation process can be referred to the specific description of the above-mentioned Figures 3-9 embodiments, which will not be repeated here.

[0168] The present disclosure also provides a computer program product storing at least one instruction, which is loaded and executed by the processor to perform the image acquisition method of the above Figures 3-9 The specific execution process of the image acquisition method of the embodiment shown in the above Figures 3-9 The specific description of the embodiment shown in the above will not be repeated here.

[0169] Please refer to Figure 13 , which shows the structure block diagram of the terminal provided by one exemplary embodiment of the present disclosure. The terminal in the present disclosure can include one or more components as follows: a processor 110, a memory 120, an input device 130, an output device 140 and a bus 150. The processor 110, the memory 120, the input device 130 and the output device 140 can be connected through the bus 150. The processor loads and executes the image acquisition method of the above Figures 3-9 The specific execution process of the image acquisition method of the embodiment shown in the above Figures 3-9 The specific description of the embodiment shown in the above will not be repeated here.

[0170] The processor 110 can include one or more processing cores. The processor 110 connects various parts in the entire terminal through various interfaces and lines, performs various functions of the terminal 100 and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 120, and calling data stored in the memory 120. Optionally, the processor 110 can be realized in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), programmable logic array (PLA). The processor 110 can integrate a combination of one or several of central processing unit (CPU), graphics processing unit (GPU) and modem. Among them, the CPU mainly processes operating systems, user interfaces and application programs, etc.; the GPU is responsible for rendering and drawing display content; and the modem is used for processing wireless communication. It can be understood that the above-mentioned modem can also not be integrated into the processor 110, but be realized by a separate communication chip.

[0171] The memory 120 can include a random access memory (RAM) and can also include a read-only memory (ROM). Optionally, the memory 120 includes a non-transitory computer-readable storage medium. The memory 120 can be used to store instructions, programs, codes, code sets, or instruction sets. The memory 120 can include a program storage area and a data storage area, where the program storage area can store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing each of the following method embodiments, etc., and the operating system can be an Android system, an IOS system developed by Apple Inc., a system developed based on the Android system or the IOS system, or other systems. The data storage area can also store data created by the terminal in use, such as a phone book, audio and video data, chat record data, etc.

[0172] Referring to Figure 14 As shown, the memory 120 can be divided into an operating system space and a user space, and the operating system runs in the operating system space, and native and third-party applications run in the user space. In order to ensure that different third-party applications can achieve good running effects, the operating system allocates corresponding system resources to different third-party applications. However, there are also differences in the demand for system resources in different application scenarios in the same third-party application, for example, in the local resource loading scenario, the third-party application has a higher requirement for the disk reading speed, and in the animation rendering scenario, the third-party application has a higher requirement for the GPU performance. However, the operating system and the third-party application are independent of each other, and the operating system often cannot timely perceive the current application scenario of the third-party application, resulting in that the operating system cannot perform targeted system resource adaptation according to the specific application scenario of the third-party application.

[0173] In order to enable the operating system to distinguish the specific application scenario of the third-party application, it is necessary to open up the data communication between the third-party application and the operating system, so that the operating system can obtain the current scenario information of the third-party application at any time, and then perform targeted system resource adaptation based on the current scenario.

[0174] Taking the operating system as an Android system for example, the programs and data stored in the memory 120 are as follows Figure 15As shown, the memory 120 can store a Linux kernel layer 320, a system runtime library layer 340, an application framework layer 360, and an application layer 380, wherein the Linux kernel layer 320, the system runtime library layer 340, and the application framework layer 360 belong to an operating system space, and the application layer 380 belongs to a user space. The Linux kernel layer 320 provides underlying drivers for various hardware of the terminal, such as display drivers, audio drivers, camera drivers, Bluetooth drivers, Wi-Fi drivers, power management, and the like. The system runtime library layer 340 provides main feature support for the Android system through some C / C++ libraries. For example, an SQLite library provides database support, an OpenGL / ES library provides 3D drawing support, a Webkit library provides browser kernel support, and the like. An Android runtime is also provided in the system runtime library layer 340, which mainly provides some core libraries to allow developers to use Java language to write Android applications. The application framework layer 360 provides various APIs that can be used when building an application, and developers can also build their own applications by using these APIs, such as activity management, window management, view management, notification management, content provider, package management, call management, resource management, and location management. At least one application is running in the application layer 380, which can be native applications provided by the operating system, such as a contact program, a message program, a clock program, a camera application, and the like, or third-party applications developed by third-party developers, such as game applications, instant messaging programs, photo beautification programs, image acquisition programs, and the like.

[0175] For example, taking an IOS system as the operating system, the programs and data stored in the memory 120 can include an IOS kernel 310, an IOS runtime library 330, an application framework 350, and an application 370. Figure 16As shown, the IOS system includes: a core operating system layer 420, a core service layer 440, a media layer 460, and a Cocoa Touch layer 480. The core operating system layer 420 includes an operating system kernel, drivers, and low-level program frameworks that provide functions closer to the hardware for use by program frameworks in the core service layer 440. The core service layer 440 provides system services and / or program frameworks required by applications, such as a Foundation framework, an account framework, an advertisement framework, a data storage framework, an image acquisition framework, a geographic position framework, a motion framework, and the like. The media layer 460 provides interfaces related to audio and video for applications, such as interfaces related to graphics images, interfaces related to audio technology, interfaces related to video technology, an AirPlay interface for wireless playing of audio and video transmission technology, and the like. The Cocoa Touch layer 480 provides various commonly used interface-related frameworks for application development, and is responsible for touch interaction operations of users on the terminal. For example, a local notification service, a remote push service, an advertisement framework, a game tool framework, a message user interface (UI) framework, a user interface UIKit framework, a map framework, and the like.

[0176] In Figure 14 In the framework shown, the frameworks related to most applications include, but are not limited to, the Foundation framework in the core service layer 440 and the UIKit framework in the Cocoa Touch layer 480. The Foundation framework provides many basic object classes and data types, and provides the most basic system services for all applications, and is UI-independent. The UIKit framework provides basic UI class libraries, and is used to create touch-based user interfaces. iOS applications can provide UI based on the UIKit framework, so it provides the basic framework of the application, and is used to build user interfaces, draw, handle and respond to user interaction events, respond to gestures, and the like.

[0177] In the IOS system, the manner and principle of implementing data communication between a third-party application and an operating system can refer to the Android system, and the present disclosure will not be described here.

[0178] The input device 130 is configured to receive input instructions or data, and the input device 130 includes but is not limited to a keyboard, a mouse, a camera, a microphone, or a touch device. The output device 140 is configured to output instructions or data, and the output device 140 includes but is not limited to a display device and a speaker. In an example, the input device 130 and the output device 140 can be combined, and the input device 130 and the output device 140 are a touch display screen configured to receive a touch operation of a user using a finger, a touch pen, or any suitable object on or near the touch display screen, and display a user interface of each application. The touch display screen is usually arranged on a front panel of the terminal. The touch display screen can be designed as a full screen, a curved screen, or a special-shaped screen. The touch display screen can also be designed as a combination of a full screen and a curved screen, a combination of a special-shaped screen and a curved screen, and the present disclosure does not limit the combination.

[0179] In addition, those skilled in the art can understand that the structure of the terminal shown in the above-mentioned drawings does not constitute a limitation on the terminal, and the terminal can include more or fewer components than the drawings, or combine certain components, or different component arrangements. For example, the terminal also includes radio frequency circuitry, an input unit, a sensor, audio circuitry, a wireless fidelity (WiFi) module, a power supply, a Bluetooth module, and the like, which are not described here.

[0180] In the embodiments of the present disclosure, the execution subject of each step can be the terminal introduced above. Alternatively, the execution subject of each step is an operating system of the terminal. The operating system can be an Android system, an IOS system, or other operating systems, and the embodiments of the present disclosure do not limit the operating system.

[0181] The terminal of the embodiments of the present disclosure can also have a display device installed thereon, and the display device can be various devices capable of realizing a display function, such as a cathode ray tube display (CR), a light-emitting diode display (LED), an electronic ink screen, a liquid crystal display (LCD), a plasma display panel (PDP), and the like. A user can use the display device on the terminal 100 to view displayed text, images, video information, and the like. The terminal can be a smart phone, a tablet computer, a game device, an AR (Augmented Reality) device, a car, a data storage device, an audio playback device, a video playback device, a notebook computer, a desktop computing device, a wearable device such as an electronic watch, electronic glasses, an electronic helmet, an electronic bracelet, an electronic necklace, an electronic clothing, and the like.

[0182] Those skilled in the art can clearly understand that the technical solutions of the present disclosure can be implemented by means of software and / or hardware. The "unit" and "module" in the specification refer to software and / or hardware that can independently complete or cooperate with other components to complete a specific function, and the hardware can be, for example, a Field-Programmable Gate Array (FPGA), an Integrated Circuit (IC), and the like.

[0183] It should be noted that, for the foregoing method embodiments, in order to simply describe, they are all expressed as a combination of a series of actions, but those skilled in the art should know that the present disclosure is not limited by the order of the described actions, because according to the present disclosure, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily necessary for the present disclosure.

[0184] In the above embodiments, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.

[0185] In several embodiments provided by the present disclosure, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely schematic, and the division of the units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units or components shown or discussed can be indirect coupling or communication connection through some service interface, apparatus or unit, and can be electrical or other forms.

[0186] The units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, i.e., they can be located in one place, or can be distributed on a plurality of network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the present embodiment.

[0187] In addition, each functional unit in each embodiment of the present disclosure can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.

[0188] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable memory. Based on such understanding, the technical solutions of the present disclosure essentially or say the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a memory and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present disclosure. The aforementioned memory includes: a U disk, a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store program codes.

[0189] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be executed by a program instructing relevant hardware, and the program can be stored in a computer readable memory, which can include a flash disk, a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, etc.

[0190] The above is only exemplary embodiments of the present disclosure, which cannot limit the scope of the present disclosure. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. Other embodiments of the present disclosure will be readily apparent to those skilled in the art upon considering the specification and practicing the present disclosure. The present disclosure is intended to cover any variations, uses, or adaptive changes of the present disclosure that follow the general principles of the present disclosure and include common knowledge or conventional technical means in the technical field not recorded in the present disclosure. The specification and examples are only considered as exemplary, and the scope and spirit of the present disclosure are defined by the claims.

Claims

1. An image acquisition method, characterized in that, include: If the camera is in scanning mode, then the number of image frames corresponding to the camera is obtained. The number of image frames refers to the number of valid frames of the scanned image captured by the terminal controlling the camera. Obtain the initial exposure value corresponding to the number of image frames and the convergence speed value corresponding to the number of image frames; Based on the initial exposure value and the convergence speed value, calculate the exposure parameters corresponding to the camera; Based on the exposure parameters, the camera is controlled to acquire a set of scanned images corresponding to the number of image frames; The set of scanned images is used to instruct the terminal to obtain the identification code corresponding to the set of scanned images; The control of the camera to acquire a set of scanned images corresponding to the number of image frames includes: Control the camera to capture the first scanned image; If the first scanned image meets the image conditions, then the camera is controlled to capture a second scanned image with a preset number of frames, wherein the preset number of frames is one frame smaller than the number of image frames; If the second scanned image with the preset number of frames is obtained, then the first scanned image and the second scanned image with the preset number of frames are added to the scanned image set.

2. The method according to claim 1, characterized in that, The step of obtaining the number of image frames corresponding to the camera includes: Obtain the camera module identifier corresponding to the camera; Obtain the number of image frames corresponding to the camera module identifier.

3. The method according to claim 1, characterized in that, The step of obtaining the number of image frames corresponding to the camera includes: Get the currently running application; Obtain the number of image frames corresponding to the application, and determine the number of image frames corresponding to the camera.

4. The method according to claim 1, characterized in that, The step of obtaining the number of image frames corresponding to the camera includes: Get the number of image frames corresponding to each application in the application set, and get the set of image frame counts; The maximum number of image frames in the set of image frames is determined as the number of image frames corresponding to the camera.

5. The method according to claim 1, characterized in that, The step of obtaining the initial exposure value corresponding to the number of image frames and the convergence speed value corresponding to the number of image frames includes: Obtain an initial exposure value set and a convergence speed value set. The initial exposure value set includes the number of each image frame and the initial exposure value corresponding to each image frame. The convergence speed value set includes the number of each image frame and the convergence speed value corresponding to each image frame. Based on the set of initial exposure values, obtain the initial exposure value corresponding to the number of image frames; based on the set of convergence speed values, obtain the convergence speed value corresponding to the number of image frames.

6. An image acquisition device, characterized in that, include: The frame acquisition unit is used to acquire the number of image frames corresponding to the camera if the camera is in scanning mode. The number of image frames refers to the number of valid frames of the scanned image captured by the camera controlled by the terminal. A speed value acquisition unit is used to acquire the initial exposure value corresponding to the number of image frames and the convergence speed value corresponding to the number of image frames; An image acquisition unit is used to calculate the exposure parameters corresponding to the camera based on the initial exposure value and the convergence speed value; Based on the exposure parameters, the camera is controlled to acquire a set of scanned images corresponding to the number of image frames; the set of scanned images is used to instruct the terminal to obtain the identification code corresponding to the set of scanned images. The image acquisition unit, used to control the camera to acquire the set of scanned images corresponding to the image frame number, is specifically used for: Control the camera to capture the first scanned image; If the first scanned image meets the image conditions, then the camera is controlled to capture a second scanned image with a preset number of frames, wherein the preset number of frames is one frame smaller than the number of image frames; If the second scanned image with the preset number of frames is obtained, then the first scanned image and the second scanned image with the preset number of frames are added to the scanned image set.

7. The apparatus according to claim 6, characterized in that, The frame count acquisition unit includes an identifier acquisition subunit and a frame count acquisition subunit. The frame count acquisition unit is used to acquire the image frame count corresponding to the camera when: The identifier acquisition subunit is used to acquire the camera module identifier corresponding to the camera; The frame count acquisition subunit is used to acquire the image frame count corresponding to the camera module identifier.

8. The apparatus according to claim 6, characterized in that, The frame count acquisition unit includes a program acquisition subunit and a frame count acquisition subunit. The frame count acquisition unit is used to acquire the image frame count corresponding to the camera when: The program acquisition subunit is used to acquire the currently running application. The frame count acquisition subunit is used to acquire the number of image frames corresponding to the application and determine the number of image frames as the number of image frames corresponding to the camera.

9. The apparatus according to claim 6, characterized in that, The frame count acquisition unit, when acquiring the image frame count corresponding to the camera, is specifically used for: Get the number of image frames corresponding to each application in the application set, and get the set of image frame counts; The maximum number of image frames in the set of image frames is determined as the number of image frames corresponding to the camera.

10. The apparatus according to claim 6, characterized in that, The velocity value acquisition unit, when acquiring the initial exposure value corresponding to the number of image frames and the convergence velocity value corresponding to the number of image frames, is specifically used for: Obtain an initial exposure value set and a convergence speed value set. The initial exposure value set includes the number of each image frame and the initial exposure value corresponding to each image frame. The convergence speed value set includes the number of each image frame and the convergence speed value corresponding to each image frame. Based on the set of initial exposure values, obtain the initial exposure value corresponding to the number of image frames; based on the set of convergence speed values, obtain the convergence speed value corresponding to the number of image frames.

11. A terminal, comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-5.

12. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-5.

13. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1-5.

Citation Information

Patent Citations

  • Image processing method and device and electronic equipment

    CN113572970A

  • Adaptive optical image reader

    CN1947125A