WO2019237798A1 - Camera control method, mobile terminal, and computer readable storage medium - Google Patents

Camera control method, mobile terminal, and computer readable storage medium Download PDF

Info

Publication number
WO2019237798A1
WO2019237798A1 PCT/CN2019/081044 CN2019081044W WO2019237798A1 WO 2019237798 A1 WO2019237798 A1 WO 2019237798A1 CN 2019081044 W CN2019081044 W CN 2019081044W WO 2019237798 A1 WO2019237798 A1 WO 2019237798A1
Authority
WO
WIPO (PCT)
Prior art keywords
camera
code scanning
parameters
photographing
mobile terminal
Prior art date
Application number
PCT/CN2019/081044
Other languages
French (fr)
Chinese (zh)
Inventor
赵国伟
曾检生
赖哲锋
Original Assignee
百富计算机技术(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 百富计算机技术(深圳)有限公司 filed Critical 百富计算机技术(深圳)有限公司
Publication of WO2019237798A1 publication Critical patent/WO2019237798A1/en

Links

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/617Upgrading or updating of programs or applications for camera control
    • 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/62Control of parameters via user interfaces

Definitions

  • the present application belongs to the technical field of camera control, and particularly relates to a camera control method, a mobile terminal, and a computer-readable storage medium.
  • the Android platform is the name of a free and open source operating system based on the Linux platform.
  • the platform consists of an operating system, middleware, user interface, and application software.
  • the Android operating system is mainly used in mobile devices, such as mobile phones and POS machines.
  • the camera application and camera driver provided with the android system are used in the POS machine.
  • the camera application and camera driver provided with the android system are aimed at how to improve the photographic effect.
  • the problem of the identification code word If the photographing parameters in the android system are modified, the identification code word can be recognized but the photographing effect is not good. Therefore, the current mobile terminal based on the android system cannot meet the accuracy without adding hardware. Scan the code, and meet better camera effects.
  • embodiments of the present application provide a method for controlling a camera, a mobile terminal, and a computer-readable storage medium, so as to solve the current problem that mobile terminals cannot simultaneously meet the requirements of accurate code scanning and better photography without adding hardware. Question of effectiveness.
  • a first aspect of the embodiments of the present application provides a method for controlling a camera, which is applied to a mobile terminal.
  • the control method includes:
  • preset flag information is turned on, acquiring code scanning parameters, and acquiring images through the camera based on the code scanning parameters;
  • the preset flag information is not turned on, a photographing parameter is acquired, and an image is collected by the camera based on the photographing parameter.
  • a second aspect of the embodiments of the present application provides a mobile terminal, including:
  • a confirmation module configured to check whether preset flag information is turned on after receiving an instruction to start the camera of the mobile terminal
  • the code scanning module is configured to obtain code scanning parameters if preset flag information is turned on, and collect images through the camera based on the code scanning parameters;
  • a photographing module is configured to acquire photographing parameters if preset flag information is not turned on, and collect images through the camera based on the photographing parameters.
  • a third aspect of the embodiments of the present application provides a mobile terminal including a memory, a processor, and a computer program stored in the memory and executable on the processor.
  • the processor executes the computer program, Implement the steps of the method provided by the first aspect of the embodiments of the present application.
  • a fourth aspect of the embodiments of the present application provides a computer-readable storage medium.
  • the computer-readable storage medium stores a computer program, and the computer program is implemented by one or more processors to implement the first embodiment of the present application. Steps of the method provided by aspects.
  • a fifth aspect of the embodiments of the present application provides a computer program product, where the computer program product includes a computer program, and the computer program is implemented by one or more processors to implement the described in the first aspect of the embodiments of the present application. Method steps.
  • the mobile terminal after receiving an instruction to start the camera of the mobile terminal, it is checked whether preset flag information is turned on. If the preset flag information is turned on, code scanning parameters are obtained and based on the code scanning parameters. Acquiring images through the camera, and if preset logo information is not turned on, acquiring photographing parameters, and acquiring images through the camera based on the photographing parameters.
  • the preset flag information is used to determine whether the camera is currently activated by the scanning application or the camera activated by the camera application. The image is collected by the camera based on the scan code parameters, and the image is collected by the camera when the photo is taken. In this way, the mobile terminal can be controlled to meet the requirements of accurate code scanning and better photographing effects without adding any hardware.
  • FIG. 1 is a software design framework provided by an embodiment of the present application.
  • FIG. 2 is a schematic flowchart of a camera control method provided by an embodiment of the present application.
  • FIG. 3 provides a schematic diagram of enabling or disabling preset flag information according to a code scanning application according to an embodiment of the present application
  • FIG. 4 is a schematic block diagram of a mobile terminal according to an embodiment of the present application.
  • FIG. 5 is a schematic block diagram of another mobile terminal according to an embodiment of the present application.
  • the term “if” can be construed as “when” or “once” or “in response to a determination” or “in response to a detection” depending on the context .
  • the phrase “if determined” or “if [the described condition or event] is detected” may be interpreted, depending on the context, to mean “once determined” or “in response to the determination” or “once [the condition or event described ] “Or” In response to [Description of condition or event] detected ".
  • This application hopes that without adding hardware (a camera is used to scan the code and one is used to take pictures to satisfy both code scanning and photographing, but hardware needs to be added), and the interface of the native android system is not changed (the system can be upgraded without changes It can still be used afterwards), while satisfying fast code scanning and better camera effects.
  • FIG. 1 is a software design framework provided by an embodiment of the present application.
  • the photographing application and the code scanning application belong to the application layer software, and the code scanning application and the photographing application are at the same level, and both can pass through the system JNI interface
  • the camera driver is called, and the camera driver then calls the camera parameters or scan code parameters according to the set conditions. It can be seen from FIG. 1 that the code scanning application does not conflict with the photographing application in the existing system, and does not change the interface settings of the existing android system.
  • FIG. 2 is a schematic flowchart of a camera control method provided by an embodiment of the present application. As shown in the figure, the method may include the following steps:
  • Step S201 After receiving an instruction to start the camera of the mobile terminal, check whether preset flag information is turned on.
  • the instruction to start the camera of the mobile terminal may be issued by a photographing application or a code scanning application. Whether it is a photographing application or a scanning application, a system-based API interface is required, and a camera driver is called through a JNI interface, so the instruction to start the camera of the mobile terminal is the system-based API interface of the scanning application or photographing application.
  • the JNI interface calls camera-driven instructions. Since both the code scanning application and the camera application are based on the same interface and call the same camera driver, in order to ensure that the code can be quickly scanned when the camera driver is called through the code scanning application, a better result can be obtained when the camera driver is called through the camera application.
  • This logo information may be preset and may be enabled or disabled based on the code scanning application in the mobile terminal. For example, the status of the code scanning application can be monitored. If the status of the code scanning application is the foreground running state, the preset flag information is on; otherwise, the preset flag information is set to off. status.
  • the enabling or disabling the preset flag information based on the code scanning application in the mobile terminal includes:
  • the preset flag information is turned off.
  • FIG. 3 illustrates how to enable or disable the preset flag information according to the code scanning application.
  • the flag information can be controlled by a variable, and thus can also be a variable flag.
  • the code scanning application After the scanning application is opened, enter the code scanning application and turn on the variable flag at the same time.
  • the code scanning application is running in the foreground; if the code scanning application is switched from the foreground to the background, it may be a code scanning application caused by switching to a photographing application Switching from the foreground to the background, or the code scanning application caused by switching to other applications, can be switched from the foreground to the background.
  • the variable flag will be turned off. If the code scanning application is switched from the background to the foreground, The variable flag can be turned on; when exiting the scanning application, the variable flag needs to be turned off accordingly.
  • the variable flag needs to be turned off. That is, whether it is a normal exit or an abnormal exit, the variable flag needs to be turned off.
  • the preset flag information is based on the scanning code application is turned on or off, so it will not cause changes to the native android system and the original camera application, so that even the system upgrade will not cause the scanning in this application. Code application is unavailable.
  • step S202 if preset flag information is turned on, code scanning parameters are acquired, and an image is collected by the camera based on the code scanning parameters.
  • step S203 if the preset flag information is not turned on, a photographing parameter is acquired, and an image is collected by the camera based on the photographing parameter.
  • the preset flag information is a flag indicating whether the code scanning application is running in the foreground. If it is running in the foreground, it indicates that the instruction to start the camera of the mobile terminal is issued by the code scanning application. Based on the scan parameters, images are collected by the camera. If the camera is no longer running in the foreground, it indicates that the instruction to start the camera of the mobile terminal is issued by a photographing application. The camera captures images.
  • a parameter selection variable flag is set in the camera driver, and the method of making a system node is controlled by the upper-level application. Then the camera driver writes the corresponding parameters according to this parameter variable flag, so that you can open the camera application and use the camera.
  • Parameter open the code scanning application and use the code scanning parameters.
  • collecting the image by the camera based on the scan parameters is: loading the scan parameters by the camera driver, and collecting images based on the scan parameters; Collecting images by the camera with the photographing parameters is: loading the photographing parameters with the camera driver, and acquiring images based on the photographing parameters.
  • the scanning code parameters can be modified based on the photographing parameters. For example, setting variable exposure gain, image brightness, image saturation, etc., and modifying the exposure gain, image brightness, image saturation, etc. in the photographing parameters as the scanning code. parameter.
  • the setting of the photographing parameters is to obtain a better photographing effect.
  • it is to pursue the scanning speed.
  • the image collected by the camera is usually set to a grayscale image. Therefore, the saturation, brightness, and various effects of colors in the image are not pursued by scanning. If you pursue various effects of taking pictures in terms of color, Instead, the original scanned image will be distorted, so that the recognition is slow or unrecognizable during scanning.
  • the obtaining the code scanning parameters based on the photographing parameters includes:
  • the debugging operation and the delay operation of the photographing parameter are closed based on the photographing parameter.
  • the method further includes:
  • the purpose of setting the scanning code parameters is not only to obtain the scanning code image. In fact, after obtaining the scanning code image, it is necessary to perform a decoding operation on the image collected based on the scanning code parameter to obtain the scanning code. The result; and displaying the code scanning result through a display interface of the mobile terminal.
  • the preset flag information is used to determine whether the camera is currently activated by the scanning application or the camera activated by the camera application.
  • the image is collected by the camera based on the scan code parameters, and the image is collected by the camera when the photo is taken.
  • the mobile terminal can be controlled to meet the requirements of accurate code scanning and better photographing effects without adding any hardware.
  • the embodiment of the present application does not modify the photographing application and the original camera driver in the original system, even if the system is upgraded, the problem of system incompatibility will not be caused.
  • the code scanning parameters are obtained on the basis of the original photographing parameters by changing the variables. In this way, there is no need to edit another set of codes, which also saves space.
  • FIG. 4 is a schematic block diagram of a mobile terminal according to an embodiment of the present application. For ease of description, only a part related to the embodiment of the present application is shown.
  • the mobile terminal 4 may be a software unit, a hardware unit, or a combination of hardware and software, which is built into a mobile terminal such as a mobile phone, a tablet computer, or a notebook, or may be integrated into the mobile terminal such as a mobile phone, tablet, or notebook as an independent pendant. in.
  • the mobile terminal 4 includes:
  • a confirmation module 41 configured to check whether preset flag information is turned on after receiving an instruction to start the camera of the mobile terminal;
  • the code scanning module 42 is configured to obtain code scanning parameters if preset flag information is turned on, and collect images through the camera based on the code scanning parameters;
  • the photographing module 43 is configured to acquire photographing parameters if preset flag information is not turned on, and collect an image through the camera based on the photographing parameters.
  • the mobile terminal 4 further includes:
  • the flag information setting module 44 is configured to enable or disable preset flag information based on a code scanning application in the mobile terminal.
  • the flag information setting module 44 is further configured to:
  • the preset flag information is turned off.
  • the confirmation module 41 is further configured to:
  • the code scanning module 42 is further configured to:
  • the photographing module 43 is further configured to:
  • the camera parameters are loaded by the camera driver, and an image is acquired based on the camera parameters.
  • the mobile terminal 4 further includes:
  • the code scanning parameter acquisition module 45 is configured to obtain the code scanning parameters based on the photographing parameters, where the photographing parameters are parameters used when the camera of the mobile terminal takes a picture.
  • the code scanning parameter obtaining module 45 is further configured to:
  • the debugging operation and the delay operation of the photographing parameter are closed based on the photographing parameter.
  • the mobile terminal 4 further includes:
  • a decoding module 46 configured to perform a decoding operation on an image collected based on the scan parameter to obtain a scan result after the image is collected by the camera based on the scan parameter;
  • a display module 47 is configured to display the code scanning result through a display interface of the mobile terminal.
  • FIG. 5 is a schematic block diagram of a mobile terminal according to another embodiment of the present application.
  • the mobile terminal 5 of this embodiment includes: one or more processors 50, a memory 51, and a computer program 52 stored in the memory 51 and executable on the processor 50.
  • the processor 50 executes the computer program 52
  • the steps in the embodiment of the control method of each camera are implemented, for example, steps S201 to S203 shown in FIG. 2.
  • the processor 50 executes the computer program 52
  • the functions of the modules / units in the above-mentioned embodiment of the mobile terminal are implemented, for example, the functions of modules 41 to 43 shown in FIG. 4.
  • the computer program 52 may be divided into one or more modules / units, and the one or more modules / units are stored in the memory 51 and executed by the processor 50 to complete This application.
  • the one or more modules / units may be a series of computer program instruction segments capable of performing specific functions, and the instruction segments are used to describe the execution process of the computer program 52 in the mobile terminal 5.
  • the computer program 52 may be divided into a confirmation module, a code scanning module, and a photographing module.
  • the confirmation module is configured to check whether preset flag information is turned on after receiving an instruction to start the camera of the mobile terminal;
  • the code scanning module is configured to obtain code scanning parameters if preset flag information is turned on, and collect an image through the camera based on the code scanning parameters;
  • the photographing module is configured to acquire photographing parameters if preset logo information is not turned on, and collect images through the camera based on the photographing parameters.
  • the mobile terminal includes, but is not limited to, a processor 50 and a memory 51.
  • FIG. 5 is only an example of the mobile terminal 5 and does not constitute a limitation on the mobile terminal 5. It may include more or fewer components than shown in the figure, or combine some components, or different Components, for example, the mobile terminal may further include an input device, an output device, a network access device, a bus, and the like.
  • the processor 50 may be a central processing unit (Central Processing Unit (CPU), or other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (Application Specific Integrated Circuits) Specific Integrated Circuit (ASIC), off-the-shelf Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • CPU Central Processing Unit
  • DSP Digital Signal Processor
  • ASIC Application Specific Integrated Circuits
  • FPGA off-the-shelf Programmable Gate Array
  • a general-purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
  • the memory 51 may be an internal storage unit of the mobile terminal 5, such as a hard disk or a memory of the mobile terminal 5.
  • the memory 51 may also be an external storage device of the mobile terminal 5, such as a plug-in hard disk, a smart media card (SMC), and a secure digital (SD) provided on the mobile terminal 5. Flash card Card) and so on.
  • the memory 51 may also include both an internal storage unit of the mobile terminal 5 and an external storage device.
  • the memory 51 is configured to store the computer program and other programs and data required by the mobile terminal.
  • the memory 51 may also be used to temporarily store data that has been output or is to be output.
  • the disclosed mobile terminal and method may be implemented in other ways.
  • the mobile terminal embodiments described above are merely schematic.
  • the division of the modules or units is only a logical function division.
  • there may be another division manner, such as multiple units or components. Can be combined or integrated into another system, or some features can be ignored or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, which may be electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objective of the solution of this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each of the units may exist separately physically, or two or more units may be integrated into one unit.
  • the above integrated unit may be implemented in the form of hardware or in the form of software functional unit.
  • the integrated module / unit When the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the method of the above embodiment, and can also be completed by a computer program instructing related hardware.
  • the computer program can be stored in a computer-readable storage medium. When the program is executed by a processor, the steps of the foregoing method embodiments can be implemented.
  • the computer program includes computer program code, and the computer program code may be in a source code form, an object code form, an executable file, or some intermediate form.
  • the computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signals, telecommunication signals, and software distribution media.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • electric carrier signals telecommunication signals
  • software distribution media any entity or device capable of carrying the computer program code
  • a recording medium a U disk, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signals, telecommunication signals, and software distribution media.

Abstract

The present application is applicable to the technical field of camera control, and provides a camera control method, a mobile terminal, and a computer readable storage medium. The method comprises: after an instruction for starting a camera of a mobile terminal is received, viewing whether preset mark information is opened; if the preset mark information is opened, obtaining a scanning parameter, and based on the scanning parameter, acquiring an image by means of the camera; if the preset mark information is not opened, obtaining a photographing parameter, and based on the photographing parameter, acquiring the image by means of the camera. By means of the present application, accurate scanning and good photographing can be simultaneously satisfied without increasing hardware.

Description

一种相机的控制方法、移动终端及计算机可读存储介质Camera control method, mobile terminal and computer-readable storage medium 技术领域Technical field
本申请属于相机控制技术领域,尤其涉及一种相机的控制方法、移动终端及计算机可读存储介质。The present application belongs to the technical field of camera control, and particularly relates to a camera control method, a mobile terminal, and a computer-readable storage medium.
背景技术Background technique
Android平台是基于Linux平台的自由及开放源代码的操作系统的名称,该平台由操作系统、中间件、用户界面和应用软件组成。目前Android操作系统主要使用于移动设备,例如手机、POS机等。The Android platform is the name of a free and open source operating system based on the Linux platform. The platform consists of an operating system, middleware, user interface, and application software. At present, the Android operating system is mainly used in mobile devices, such as mobile phones and POS machines.
在POS机中使用的是android系统自带的相机应用和相机驱动,然而,android系统自带的相机应用和相机驱动针对的是如何提高拍照效果,在应用到扫码功能上时,经常出现无法识别码字的问题,如果将android系统中的拍照参数修改,就会造成能够识别码字但是拍照效果不好,因此,目前基于android系统的移动终端在不增加硬件的情况下,无法即满足精确扫码、又满足较好的拍照效果。The camera application and camera driver provided with the android system are used in the POS machine. However, the camera application and camera driver provided with the android system are aimed at how to improve the photographic effect. The problem of the identification code word. If the photographing parameters in the android system are modified, the identification code word can be recognized but the photographing effect is not good. Therefore, the current mobile terminal based on the android system cannot meet the accuracy without adding hardware. Scan the code, and meet better camera effects.
技术问题technical problem
有鉴于此,本申请实施例提供了一种相机的控制方法、移动终端及计算机可读存储介质,以解决目前移动终端在不增加硬件的情况下,无法同时满足精确扫码和较好的拍照效果的问题。In view of this, embodiments of the present application provide a method for controlling a camera, a mobile terminal, and a computer-readable storage medium, so as to solve the current problem that mobile terminals cannot simultaneously meet the requirements of accurate code scanning and better photography without adding hardware. Question of effectiveness.
技术解决方案Technical solutions
本申请实施例的第一方面提供了一种相机的控制方法,应用于移动终端,所述控制方法包括:A first aspect of the embodiments of the present application provides a method for controlling a camera, which is applied to a mobile terminal. The control method includes:
在接收到启动所述移动终端的相机的指令后,查看是否开启了预设的标志信息;After receiving an instruction to start the camera of the mobile terminal, check whether preset flag information is turned on;
若开启了预设的标志信息,则获取扫码参数,并基于所述扫码参数,通过所述相机采集图像;If preset flag information is turned on, acquiring code scanning parameters, and acquiring images through the camera based on the code scanning parameters;
若未开启预设的标志信息,则获取拍照参数,并基于所述拍照参数,通过所述相机采集图像。If the preset flag information is not turned on, a photographing parameter is acquired, and an image is collected by the camera based on the photographing parameter.
本申请实施例的第二方面提供了一种移动终端,包括:A second aspect of the embodiments of the present application provides a mobile terminal, including:
确认模块,用于在接收到启动所述移动终端的相机的指令后,查看是否开启了预设的标志信息;A confirmation module, configured to check whether preset flag information is turned on after receiving an instruction to start the camera of the mobile terminal;
扫码模块,用于若开启了预设的标志信息,则获取扫码参数,并基于所述扫码参数,通过所述相机采集图像;The code scanning module is configured to obtain code scanning parameters if preset flag information is turned on, and collect images through the camera based on the code scanning parameters;
拍照模块,用于若未开启预设的标志信息,则获取拍照参数,并基于所述拍照参数,通过所述相机采集图像。A photographing module is configured to acquire photographing parameters if preset flag information is not turned on, and collect images through the camera based on the photographing parameters.
本申请实施例的第三方面提供了一种移动终端,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现本申请实施例第一方面提供的所述方法的步骤。A third aspect of the embodiments of the present application provides a mobile terminal including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, Implement the steps of the method provided by the first aspect of the embodiments of the present application.
本申请实施例的第四方面提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被一个或多个处理器执行时实现本申请实施例第一方面提供的所述方法的步骤。A fourth aspect of the embodiments of the present application provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and the computer program is implemented by one or more processors to implement the first embodiment of the present application. Steps of the method provided by aspects.
本申请实施例的第五方面提供了一种计算机程序产品,所述计算机程序产品包括计算机程序,所述计算机程序被一个或多个处理器执行时实现本申请实施例第一方面提供的所述方法的步骤。A fifth aspect of the embodiments of the present application provides a computer program product, where the computer program product includes a computer program, and the computer program is implemented by one or more processors to implement the described in the first aspect of the embodiments of the present application. Method steps.
有益效果Beneficial effect
本申请实施例在接收到启动所述移动终端的相机的指令后,查看是否开启了预设的标志信息,若开启了预设的标志信息,则获取扫码参数,并基于所述扫码参数,通过所述相机采集图像,若未开启预设的标志信息,则获取拍照参数,并基于所述拍照参数,通过所述相机采集图像。由于本申请实施例设置了两套参数,分别为扫码参数和拍照参数,通过预设的标志信息判断当前是扫码应用启动的相机,还是相机应用启动的相机,就可以实现在扫码时基于扫码参数通过相机采集图像,在拍照时基于拍照参数通过相机采集图像。这样,就可以控制移动终端在不增加任何硬件的情况下,同时满足精确扫码和较好的拍照效果。In the embodiment of the present application, after receiving an instruction to start the camera of the mobile terminal, it is checked whether preset flag information is turned on. If the preset flag information is turned on, code scanning parameters are obtained and based on the code scanning parameters. Acquiring images through the camera, and if preset logo information is not turned on, acquiring photographing parameters, and acquiring images through the camera based on the photographing parameters. As the embodiment of the present application sets two sets of parameters, which are the scanning code parameter and the photographing parameter, the preset flag information is used to determine whether the camera is currently activated by the scanning application or the camera activated by the camera application. The image is collected by the camera based on the scan code parameters, and the image is collected by the camera when the photo is taken. In this way, the mobile terminal can be controlled to meet the requirements of accurate code scanning and better photographing effects without adding any hardware.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings used in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only for the present application. For some embodiments, for those of ordinary skill in the art, other drawings may be obtained based on these drawings without paying creative labor.
图1是本申请实施例提供的一种软件设计框架图;FIG. 1 is a software design framework provided by an embodiment of the present application; FIG.
图2是本申请实施例提供的一种相机的控制方法的实现流程示意图;2 is a schematic flowchart of a camera control method provided by an embodiment of the present application;
图3本申请实施例提供了一种根据扫码应用开启或关闭预设的标志信息的示意图;FIG. 3 provides a schematic diagram of enabling or disabling preset flag information according to a code scanning application according to an embodiment of the present application; FIG.
图4是本申请实施例提供的一种移动终端的示意框图;4 is a schematic block diagram of a mobile terminal according to an embodiment of the present application;
图5是本申请实施例提供的另一种移动终端的示意框图。FIG. 5 is a schematic block diagram of another mobile terminal according to an embodiment of the present application.
本发明的实施方式Embodiments of the invention
以下描述中,为了说明而不是为了限定,提出了诸如特定系统结构、技术之类的具体细节,以便透彻理解本申请实施例。然而,本领域的技术人员应当清楚,在没有这些具体细节的其它实施例中也可以实现本申请。在其它情况中,省略对众所周知的系统、装置、电路以及方法的详细说明,以免不必要的细节妨碍本申请的描述。In the following description, for the purpose of explanation rather than limitation, specific details such as a specific system structure and technology are provided in order to thoroughly understand the embodiments of the present application. However, it should be clear to a person skilled in the art that the present application can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary details.
应当理解,当在本说明书和所附权利要求书中使用时,术语“包括”指示所描述特征、整体、步骤、操作、元素和/或组件的存在,但并不排除一个或多个其它特征、整体、步骤、操作、元素、组件和/或其集合的存在或添加。It should be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude one or more other features , The whole, steps, operations, elements, components, and / or their presence or addition.
还应当理解,在此本申请说明书中所使用的术语仅仅是出于描述特定实施例的目的而并不意在限制本申请。如在本申请说明书和所附权利要求书中所使用的那样,除非上下文清楚地指明其它情况,否则单数形式的“一”、“一个”及“该”意在包括复数形式。It should also be understood that the terminology used in the description of this application is for the purpose of describing particular embodiments only and is not intended to limit the application. As used in this specification and the appended claims, the singular forms "a", "an" and "the" are intended to include the plural forms unless the context clearly indicates otherwise.
还应当进一步理解,在本申请说明书和所附权利要求书中使用的术语“和/或”是指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。It should be further understood that the term "and / or" used in the specification of the application and the appended claims refers to any combination of one or more of the listed items and all possible combinations, and includes these combinations .
如在本说明书和所附权利要求书中所使用的那样,术语“如果”可以依据上下文被解释为“当...时”或“一旦”或“响应于确定”或“响应于检测到”。类似地,短语“如果确定”或“如果检测到[所描述条件或事件]”可以依据上下文被解释为意指“一旦确定”或“响应于确定”或“一旦检测到[所描述条件或事件]”或“响应于检测到[所描述条件或事件]”。As used in this specification and the appended claims, the term "if" can be construed as "when" or "once" or "in response to a determination" or "in response to a detection" depending on the context . Similarly, the phrase "if determined" or "if [the described condition or event] is detected" may be interpreted, depending on the context, to mean "once determined" or "in response to the determination" or "once [the condition or event described ] "Or" In response to [Description of condition or event] detected ".
为了说明本申请所述的技术方案,首先描述本申请中的架构,大部分移动终端都是基于android系统的,而android系统只有拍照功能,没有扫码功能,针对拍照功能设置的参数用在扫码支付上时,经常会出现采集的图像不符合要求,扫码的过程会很慢,或者无法扫码成功的问题。导致一直停留在扫码页面,反复进行采集识别的过程。In order to explain the technical solution described in this application, the architecture in this application is first described. Most mobile terminals are based on the android system, and the android system only has a camera function and no code scanning function. The parameters set for the camera function are used for scanning. When the code is paid, it often occurs that the collected images do not meet the requirements, the process of scanning the code is slow, or the problem that the code cannot be scanned successfully. As a result, the code scanning page has been kept, and the process of collecting and identifying is repeated.
本申请是希望在不增加硬件(一个摄像头用来扫码一个用来拍照可满足扫码和拍照兼顾,然而需要增加硬件),且不对原生的android系统的接口改动(不改动就可以在系统升级之后仍可使用)的前提下,同时满足快速扫码且较好的拍照效果。This application hopes that without adding hardware (a camera is used to scan the code and one is used to take pictures to satisfy both code scanning and photographing, but hardware needs to be added), and the interface of the native android system is not changed (the system can be upgraded without changes It can still be used afterwards), while satisfying fast code scanning and better camera effects.
图1是本申请实施例提供的一种软件设计框架图,如图所示,拍照应用和扫码应用同属于应用层软件,扫码应用和拍照应用处于同一级别,均可通过系统的JNI接口调用相机驱动,相机驱动再根据设置的条件,调用拍照参数或者调用扫码参数。通过图1可以看出,扫码应用与现有的系统中的拍照应用不会冲突,且不会改变现有的android系统的接口设置。FIG. 1 is a software design framework provided by an embodiment of the present application. As shown in the figure, the photographing application and the code scanning application belong to the application layer software, and the code scanning application and the photographing application are at the same level, and both can pass through the system JNI interface The camera driver is called, and the camera driver then calls the camera parameters or scan code parameters according to the set conditions. It can be seen from FIG. 1 that the code scanning application does not conflict with the photographing application in the existing system, and does not change the interface settings of the existing android system.
下面通过具体实施例来进行说明。The following description is made through specific embodiments.
图2是本申请实施例提供的一种相机的控制方法的实现流程示意图,如图所示该方法可以包括以下步骤:FIG. 2 is a schematic flowchart of a camera control method provided by an embodiment of the present application. As shown in the figure, the method may include the following steps:
步骤S201,在接收到启动所述移动终端的相机的指令后,查看是否开启了预设的标志信息。Step S201: After receiving an instruction to start the camera of the mobile terminal, check whether preset flag information is turned on.
在本申请实施例中,启动所述移动终端的相机的指令,可以是通过拍照应用发出的,也可以是扫码应用发出的。无论是拍照应用还是扫码应用,均需要基于系统的API接口,通过JNI接口调用相机驱动,所以启动所述移动终端的相机的指令是所述扫码应用或拍照应用基于系统的API接口,通过JNI接口调用相机驱动的指令。由于不管是扫码应用还是拍照应用是基于相同的接口、调用的也是相同的相机驱动,为了保证通过扫码应用调用相机驱动时能够快速扫码,在通过拍照应用调用相机驱动时能够获得较好的拍照效果,所以我们可以不改变系统默认的拍照参数,但是重新设置一套扫码参数,并同时设置一个标志信息用来区分是加载扫码参数还是加载系统默认的拍照参数。这个标志信息可以预设设置,且可以基于所述移动终端中的扫码应用,开启或关闭预设的标志信息。例如,可以监测所述扫码应用的状态,若扫码应用的状态为前台运行状态,则所述预设的标志信息为开启的状态,否则,就将所述预设的标志信息设置为关闭状态。In the embodiment of the present application, the instruction to start the camera of the mobile terminal may be issued by a photographing application or a code scanning application. Whether it is a photographing application or a scanning application, a system-based API interface is required, and a camera driver is called through a JNI interface, so the instruction to start the camera of the mobile terminal is the system-based API interface of the scanning application or photographing application. The JNI interface calls camera-driven instructions. Since both the code scanning application and the camera application are based on the same interface and call the same camera driver, in order to ensure that the code can be quickly scanned when the camera driver is called through the code scanning application, a better result can be obtained when the camera driver is called through the camera application. Photo effects, so we can not change the system's default camera parameters, but set a new set of code scanning parameters, and set a flag information at the same time to distinguish whether to load code scanning parameters or system default camera parameters. This logo information may be preset and may be enabled or disabled based on the code scanning application in the mobile terminal. For example, the status of the code scanning application can be monitored. If the status of the code scanning application is the foreground running state, the preset flag information is on; otherwise, the preset flag information is set to off. status.
作为本申请又一实施例,所述基于所述移动终端中的扫码应用,开启或关闭预设的标志信息包括:As another embodiment of the present application, the enabling or disabling the preset flag information based on the code scanning application in the mobile terminal includes:
在获取到所述扫码应用启动的信息后,开启所述预设的标志信息;After obtaining the information of the code scanning application activation, opening the preset flag information;
在获取到所述扫码应用由前台切换到后台的信息后,关闭所述预设的标志信息;After obtaining the information that the code scanning application is switched from the foreground to the background, closing the preset flag information;
在获取到所述扫码应用由后台切换到前台的信息后,开启所述预设的标志信息;After obtaining the information that the code scanning application is switched from the background to the foreground, turn on the preset flag information;
在接收到所述扫码应用退出的信息后,关闭所述预设的标志信息。After receiving the information that the code scanning application exits, the preset flag information is turned off.
在本申请实施例中,图3描述了如何根据扫码应用,开启或关闭预设的标志信息,标志信息可以通过一个变量控制,因此也可以成为变量标志。In the embodiment of the present application, FIG. 3 illustrates how to enable or disable the preset flag information according to the code scanning application. The flag information can be controlled by a variable, and thus can also be a variable flag.
在扫描应用开启之后,进入扫码应用,同时开启变量标志,这时扫码应用在前台运行;若所述扫码应用由前台切换到后台运行,可以是由于切换到拍照应用导致的扫码应用由前台切换到后台,也可以是由于切换到其它应用导致的扫码应用由前台切换到后台,在扫码应用进入后台运行的时候,会关闭变量标志;若扫码应用由后台切换到前台,可以开启变量标志;在退出扫码应用时,相应的也需要关闭变量标志。当然,还会存在一种意外的情况,例如扫码应用在前台运行的状态下,由于一些原因导致崩溃退出了,这时也需要关闭变量标志。即不管是正常退出还是非正常退出,均需要关闭变量标志。After the scanning application is opened, enter the code scanning application and turn on the variable flag at the same time. At this time, the code scanning application is running in the foreground; if the code scanning application is switched from the foreground to the background, it may be a code scanning application caused by switching to a photographing application Switching from the foreground to the background, or the code scanning application caused by switching to other applications, can be switched from the foreground to the background. When the code scanning application enters the background, the variable flag will be turned off. If the code scanning application is switched from the background to the foreground, The variable flag can be turned on; when exiting the scanning application, the variable flag needs to be turned off accordingly. Of course, there will be an unexpected situation. For example, when the code scanning application is running in the foreground, it crashes and exits due to some reasons. At this time, the variable flag needs to be turned off. That is, whether it is a normal exit or an abnormal exit, the variable flag needs to be turned off.
通过上述分析可以发现,预设的标志信息基于扫码应用开启或者关闭的,因此不会对原生的android系统以及原有的相机应用造成改变,这样即使系统升级也不会导致本申请中的扫码应用无法使用。Through the above analysis, it can be found that the preset flag information is based on the scanning code application is turned on or off, so it will not cause changes to the native android system and the original camera application, so that even the system upgrade will not cause the scanning in this application. Code application is unavailable.
步骤S202,若开启了预设的标志信息,则获取扫码参数,并基于所述扫码参数,通过所述相机采集图像。In step S202, if preset flag information is turned on, code scanning parameters are acquired, and an image is collected by the camera based on the code scanning parameters.
步骤S203,若未开启预设的标志信息,则获取拍照参数,并基于所述拍照参数,通过所述相机采集图像。In step S203, if the preset flag information is not turned on, a photographing parameter is acquired, and an image is collected by the camera based on the photographing parameter.
在本申请实施例中,预设的标志信息是表示扫码应用是否在前台运行的标志,如果在前台运行,表示发出启动所述移动终端的相机的指令为扫码应用发出的,那么就需要基于所述扫码参数,通过所述相机采集图像,如果不再前台运行,就表示发出启动所述移动终端的相机的指令为拍照应用发出的,那么就需要基于所述拍照参数,通过所述相机采集图像。In the embodiment of the present application, the preset flag information is a flag indicating whether the code scanning application is running in the foreground. If it is running in the foreground, it indicates that the instruction to start the camera of the mobile terminal is issued by the code scanning application. Based on the scan parameters, images are collected by the camera. If the camera is no longer running in the foreground, it indicates that the instruction to start the camera of the mobile terminal is issued by a photographing application. The camera captures images.
实际应用中,编写两个不同的驱动模块,当要拍照时加载拍照参数的驱动模块,当要扫码时加载扫码参数的驱动模块,当然这可以解决这样的问题,但是这样做必须要在应用中设置,这就要求当打开扫码应用时去加载扫码参数的驱动模块,同时打开相机应用时去加载拍照参数的驱动模块,但是问题是如果这样设计我们就修改了系统的拍照应用的原始设计,而且这样会造成代码的重复和冗余,同时还会导致以后版本的Android系统无法兼容我们这里的拍照程序,本申请实时的方案只加载一个驱动模块,里面就包含了拍照参数和扫码参数这两种参数。相机驱动程序里设置一个参数选择变量标志,做成系统节点的方式由上层应用去控制,然后相机驱动程序再根据这个参数变量标志来写入对应的参数,这样就可以做到打开拍照应用使用拍照参数,打开扫码应用使用扫码参数。从上面的描述可以看出,所述基于所述扫码参数,通过所述相机采集图像为:通过所述相机驱动加载所述扫码参数,并基于所述扫码参数采集图像;所述基于所述拍照参数,通过所述相机采集图像为:通过所述相机驱动加载所述拍照参数,并基于所述拍照参数采集图像。In actual application, write two different driver modules, load the driver module of the camera parameters when you want to take a picture, and load the driver module of the scan parameter when you want to scan the code. Of course, this can solve such problems, but you must do so in It is set in the application, which requires that the driver module of the scan parameter is loaded when the code scan application is opened, and the driver module of the camera parameter is loaded when the camera application is opened, but the problem is that if we design this way, we modify the camera application of the system. The original design, and this will cause code duplication and redundancy, and will also cause future versions of the Android system to be incompatible with our camera program. The real-time solution of this application only loads a driver module, which contains camera parameters and scans. These two parameters are code parameters. A parameter selection variable flag is set in the camera driver, and the method of making a system node is controlled by the upper-level application. Then the camera driver writes the corresponding parameters according to this parameter variable flag, so that you can open the camera application and use the camera. Parameter, open the code scanning application and use the code scanning parameters. As can be seen from the above description, collecting the image by the camera based on the scan parameters is: loading the scan parameters by the camera driver, and collecting images based on the scan parameters; Collecting images by the camera with the photographing parameters is: loading the photographing parameters with the camera driver, and acquiring images based on the photographing parameters.
在实际应用中,操作系统的相机应用中实际上是有一组参数的,这就是系统默认的相机的参数,是在安装扫码应用之前,通过相机拍照时使用的参数。由于这组参数是基于相机的拍照效果设置的参数,所以我们将系统中默认的相机的参数称为拍照参数。本申请实施例设置的为在安装扫码应用之后,通过相机拍照时仍然使用系统默认的这套拍照参数。实际上扫码参数是可以在拍照参数的基础上修改的,例如,设置变量曝光增益、图像亮度、图像饱和度等,将拍照参数中的曝光增益、图像亮度、图像饱和度等修改作为扫码参数。In practical applications, there is actually a set of parameters in the camera application of the operating system. This is the default camera parameter of the system. It is the parameter used when taking pictures with the camera before the code scanning application is installed. Since this set of parameters is a parameter set based on the camera's photographic effect, we will refer to the parameters of the default camera in the system as photographic parameters. In the embodiment of the present application, after the code scanning application is installed, when the camera is used to take a picture, the system default set of photographing parameters is still used. In fact, the scanning code parameters can be modified based on the photographing parameters. For example, setting variable exposure gain, image brightness, image saturation, etc., and modifying the exposure gain, image brightness, image saturation, etc. in the photographing parameters as the scanning code. parameter.
拍照参数的设置是为了获得较好的拍照效果,在设置扫码参数时是为了追求扫码速度。进行解码时,通常是会将相机采集的图像设置为灰度图像,因此图像中色彩的饱和度、亮度、各种效果并不是扫码所追求的,如果在色彩方面追求拍照的各种效果,反而会使得原本扫码的图像失真,因此,导致扫码时识别的比较慢或者识别不出来。The setting of the photographing parameters is to obtain a better photographing effect. When setting the scanning parameters, it is to pursue the scanning speed. When decoding, the image collected by the camera is usually set to a grayscale image. Therefore, the saturation, brightness, and various effects of colors in the image are not pursued by scanning. If you pursue various effects of taking pictures in terms of color, Instead, the original scanned image will be distorted, so that the recognition is slow or unrecognizable during scanning.
本申请实施例对于扫码方面我们还可以优化其扫码速度,对于静止的码字需要在一秒内能成功地解码,这里的一秒钟时间指的是从打开摄像头到关闭摄像头,最后解码库成功解出对应的码字所用的时间,对于动态的码字需要达到二十转每分种以下速度可以成功地解码。无论是在静止还是动态扫码,我们都还要保证在不同的角度和方向都能很快地识别出对应的码字,以此为目的我们提出了优化的原理:In the embodiment of the present application, we can also optimize the scanning speed in terms of code scanning. For a static codeword, it needs to be successfully decoded within one second. The one-second time here refers to the time from turning on the camera to closing the camera, and finally decoding. The time it takes for the library to successfully resolve the corresponding codeword. For dynamic codewords, it needs to reach a speed of less than twenty revolutions per minute to successfully decode. Regardless of whether the code is stationary or in dynamic scanning, we must also ensure that the corresponding codeword can be quickly identified at different angles and directions. To this end, we propose an optimization principle:
对于静止扫码,也就是所扫的码字和我们的扫码机器都是静止不动的这种情况,我们可以通过增加曝光增益来达到图像所需的信息,这也是从解码库的角度方面去考虑的,这样做可以获取到更多码字里面的信息,这样解码库就能很快找到想要的信息,识别速度能大大提高;For stationary scanning, which means that the scanned codeword and our scanning machine are stationary, we can increase the exposure gain to achieve the information required by the image, which is also from the perspective of the decoding library. To think about it, this way you can get more information in the codeword, so that the decoding library can quickly find the desired information, and the recognition speed can be greatly improved;
对于动态的码字,也就是所扫的码字在不停地移动,或者是我们的扫码机器在不停移动,又或者是两者都在不停移动的这些情况,我们可以通过降低图像的亮度达到快速识别动态码字的效果,还可以通过降低图像的色彩的饱和度来达到快速扫码的目的,这样做主要是因为可以减少我们曝光时使用的时间,同时,还因为我们解码库的原理中对于所扫的码字图像,它最后会转化成灰度图像再进行进一步的处理的,所以其实我们拍出的图像不管是黑白还是彩色最后还是会转化为灰度图像,因此其实拍出的图像的亮度和色彩对扫码效果其实并不重要,但是实际上,图像高亮度、高色彩饱和是要花费摄像头更多的曝光时间,从整体上影响到扫码的实际速度。For dynamic codewords, that is, the scanned codewords are constantly moving, or our code scanning machine is constantly moving, or both are constantly moving, we can reduce the image by The brightness can achieve the effect of quickly identifying dynamic codewords. You can also reduce the color saturation of the image to achieve the purpose of fast code scanning. This is mainly because it can reduce the time used for our exposure, and also because our decoding library In the principle of the scanned codeword image, it will eventually be converted into a grayscale image for further processing, so in fact, the image we took, whether it is black and white or color, will eventually be converted into a grayscale image. The brightness and color of the output image are actually not important to the scanning effect, but in fact, high brightness and high color saturation of the image will take more exposure time of the camera, which affects the actual speed of scanning the code as a whole.
最后为了可以减少扫码时所使用的时间,还可以通过关闭相关的调试信息和延迟来进一步优化。Finally, in order to reduce the time used for code scanning, you can further optimize by turning off related debugging information and delay.
综上所述,所述基于所述拍照参数获得所述扫码参数包括:In summary, the obtaining the code scanning parameters based on the photographing parameters includes:
在所述拍照参数中曝光增益的基础上增加第一预设值作为所述扫码参数的曝光增益;Adding a first preset value as the exposure gain of the scanning parameter based on the exposure gain in the photographing parameter;
在所述拍照参数中图像亮度的基础上降低第二预设值作为所述扫码参数的图像亮度;Reducing a second preset value as the image brightness of the code scanning parameter based on the image brightness in the photographing parameters;
在所述拍照参数中图像饱和度的基础上降低第三预设值作为所述扫码参数的图像饱和度;Reducing a third preset value as the image saturation of the code scanning parameter based on the image saturation in the photographing parameters;
在所述拍照参数的基础上关闭所述拍照参数的调试操作和延迟操作。The debugging operation and the delay operation of the photographing parameter are closed based on the photographing parameter.
作为本申请另一实施例,在基于所述扫码参数,通过所述相机采集图像之后,还包括:As another embodiment of the present application, after acquiring an image through the camera based on the scanning parameters, the method further includes:
对基于所述扫码参数采集的图像进行解码操作,获得扫码结果;Performing a decoding operation on an image collected based on the code scanning parameters to obtain a code scanning result;
将所述扫码结果通过所述移动终端的显示界面进行显示。Displaying the code scanning result through a display interface of the mobile terminal.
在本申请实施例中,设置扫码参数的目的并不仅仅只是获取扫码图像,实际上在获得扫码图像后,还需要对基于所述扫码参数采集的图像进行解码操作,获得扫码结果;并将所述扫码结果通过所述移动终端的显示界面进行显示。In the embodiment of the present application, the purpose of setting the scanning code parameters is not only to obtain the scanning code image. In fact, after obtaining the scanning code image, it is necessary to perform a decoding operation on the image collected based on the scanning code parameter to obtain the scanning code. The result; and displaying the code scanning result through a display interface of the mobile terminal.
由于本申请实施例设置了两套参数,分别为扫码参数和拍照参数,通过预设的标志信息判断当前是扫码应用启动的相机,还是相机应用启动的相机,就可以实现在扫码时基于扫码参数通过相机采集图像,在拍照时基于拍照参数通过相机采集图像。这样,就可以控制移动终端在不增加任何硬件的情况下,同时满足精确扫码和较好的拍照效果。并且,由于本申请实施例并未对原有的系统中的拍照应用和原来的相机驱动等作出修改,因此,即使系统升级也不会造成系统不兼容的问题。且通过改变变量的方式在原来拍照参数的基础上获得扫码参数,这样,无需另外重新编辑一套代码,也节省了空间。As the embodiment of the present application sets two sets of parameters, which are the scanning code parameter and the photographing parameter, the preset flag information is used to determine whether the camera is currently activated by the scanning application or the camera activated by the camera application. The image is collected by the camera based on the scan code parameters, and the image is collected by the camera when the photo is taken. In this way, the mobile terminal can be controlled to meet the requirements of accurate code scanning and better photographing effects without adding any hardware. In addition, since the embodiment of the present application does not modify the photographing application and the original camera driver in the original system, even if the system is upgraded, the problem of system incompatibility will not be caused. And the code scanning parameters are obtained on the basis of the original photographing parameters by changing the variables. In this way, there is no need to edit another set of codes, which also saves space.
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should be understood that the size of the sequence numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
图4是本申请一实施例提供的移动终端的示意框图,为了便于说明,仅示出与本申请实施例相关的部分。FIG. 4 is a schematic block diagram of a mobile terminal according to an embodiment of the present application. For ease of description, only a part related to the embodiment of the present application is shown.
该移动终端4可以是内置于手机、平板电脑、笔记本等移动终端内的软件单元、硬件单元或者软硬结合的单元,也可以作为独立的挂件集成到所述手机、平板电脑、笔记本等移动终端中。The mobile terminal 4 may be a software unit, a hardware unit, or a combination of hardware and software, which is built into a mobile terminal such as a mobile phone, a tablet computer, or a notebook, or may be integrated into the mobile terminal such as a mobile phone, tablet, or notebook as an independent pendant. in.
所述移动终端4包括:The mobile terminal 4 includes:
确认模块41,用于在接收到启动所述移动终端的相机的指令后,查看是否开启了预设的标志信息;A confirmation module 41, configured to check whether preset flag information is turned on after receiving an instruction to start the camera of the mobile terminal;
扫码模块42,用于若开启了预设的标志信息,则获取扫码参数,并基于所述扫码参数,通过所述相机采集图像;The code scanning module 42 is configured to obtain code scanning parameters if preset flag information is turned on, and collect images through the camera based on the code scanning parameters;
拍照模块43,用于若未开启预设的标志信息,则获取拍照参数,并基于所述拍照参数,通过所述相机采集图像。The photographing module 43 is configured to acquire photographing parameters if preset flag information is not turned on, and collect an image through the camera based on the photographing parameters.
可选的,所述移动终端4还包括:Optionally, the mobile terminal 4 further includes:
标志信息设置模块44,用于基于所述移动终端中的扫码应用,开启或关闭预设的标志信息。The flag information setting module 44 is configured to enable or disable preset flag information based on a code scanning application in the mobile terminal.
可选的,所述标志信息设置模块44还用于:Optionally, the flag information setting module 44 is further configured to:
在获取到所述扫码应用启动的信息后,开启所述预设的标志信息;After obtaining the information of the code scanning application activation, opening the preset flag information;
在获取到所述扫码应用由前台切换到后台的信息后,关闭所述预设的标志信息;After obtaining the information that the code scanning application is switched from the foreground to the background, closing the preset flag information;
在获取到所述扫码应用由后台切换到前台的信息后,开启所述预设的标志信息;After obtaining the information that the code scanning application is switched from the background to the foreground, turn on the preset flag information;
在接收到所述扫码应用退出的信息后,关闭所述预设的标志信息。After receiving the information that the code scanning application exits, the preset flag information is turned off.
可选的,所述确认模块41还用于:Optionally, the confirmation module 41 is further configured to:
在接收到所述扫码应用或拍照应用基于系统的API接口,通过JNI接口调用相机驱动的指令后,查看是否开启了预设的标志信息,其中,所述扫码应用和所述拍照应用均基于系统的API接口,通过JNI接口调用相机驱动;After receiving the system-based API interface of the code scanning application or photographing application, and calling the camera-driven instruction through the JNI interface, check whether preset flag information is enabled, where both the code scanning application and the photographing application are Based on system API interface, call camera driver through JNI interface;
相应的,所述扫码模块42还用于:Correspondingly, the code scanning module 42 is further configured to:
通过所述相机驱动加载所述扫码参数,并基于所述扫码参数采集图像;Loading the code scanning parameters through the camera driver, and acquiring an image based on the code scanning parameters;
相应的,所述拍照模块43还用于:Accordingly, the photographing module 43 is further configured to:
通过所述相机驱动加载所述拍照参数,并基于所述拍照参数采集图像。The camera parameters are loaded by the camera driver, and an image is acquired based on the camera parameters.
可选的,所述移动终端4还包括:Optionally, the mobile terminal 4 further includes:
扫码参数获取模块45,用于基于所述拍照参数获得所述扫码参数,所述拍照参数为所述移动终端的相机拍照时使用的参数。The code scanning parameter acquisition module 45 is configured to obtain the code scanning parameters based on the photographing parameters, where the photographing parameters are parameters used when the camera of the mobile terminal takes a picture.
可选的,所述扫码参数获取模块45还用于:Optionally, the code scanning parameter obtaining module 45 is further configured to:
在所述拍照参数中曝光增益的基础上增加第一预设值作为所述扫码参数的曝光增益;Adding a first preset value as the exposure gain of the scanning parameter based on the exposure gain in the photographing parameter;
在所述拍照参数中图像亮度的基础上降低第二预设值作为所述扫码参数的图像亮度;Reducing a second preset value as the image brightness of the code scanning parameter based on the image brightness in the photographing parameters;
在所述拍照参数中图像饱和度的基础上降低第三预设值作为所述扫码参数的图像饱和度;Reducing a third preset value as the image saturation of the code scanning parameter based on the image saturation in the photographing parameters;
在所述拍照参数的基础上关闭所述拍照参数的调试操作和延迟操作。The debugging operation and the delay operation of the photographing parameter are closed based on the photographing parameter.
可选的,所述移动终端4还包括:Optionally, the mobile terminal 4 further includes:
解码模块46,用于在基于所述扫码参数,通过所述相机采集图像之后,对基于所述扫码参数采集的图像进行解码操作,获得扫码结果;A decoding module 46, configured to perform a decoding operation on an image collected based on the scan parameter to obtain a scan result after the image is collected by the camera based on the scan parameter;
显示模块47,用于将所述扫码结果通过所述移动终端的显示界面进行显示。A display module 47 is configured to display the code scanning result through a display interface of the mobile terminal.
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述移动终端的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。实施例中的各功能单元、模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中,上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。另外,各功能单元、模块的具体名称也只是为了便于相互区分,并不用于限制本申请的保护范围。上述装置中单元、模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of the description, only the above-mentioned division of functional units and modules is used as an example. In practical applications, the above functions can be assigned by different functional units, Module completion, that is, dividing the internal structure of the mobile terminal into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment may be integrated into one processing unit, or each unit may exist separately physically, or two or more units may be integrated into one unit, and the integrated unit may use hardware. It can be implemented in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the present application. For specific working processes of the units and modules in the foregoing device, reference may be made to corresponding processes in the foregoing method embodiments, and details are not described herein again.
图5是本申请又一实施例提供的移动终端的示意框图。如图5所示,该实施例的移动终端5包括:一个或多个处理器50、存储器51以及存储在所述存储器51中并可在所述处理器50上运行的计算机程序52。所述处理器50执行所述计算机程序52时实现上述各个相机的控制方法实施例中的步骤,例如图2所示的步骤S201至S203。或者,所述处理器50执行所述计算机程序52时实现上述移动终端实施例中各模块/单元的功能,例如图4所示模块41至43的功能。FIG. 5 is a schematic block diagram of a mobile terminal according to another embodiment of the present application. As shown in FIG. 5, the mobile terminal 5 of this embodiment includes: one or more processors 50, a memory 51, and a computer program 52 stored in the memory 51 and executable on the processor 50. When the processor 50 executes the computer program 52, the steps in the embodiment of the control method of each camera are implemented, for example, steps S201 to S203 shown in FIG. 2. Alternatively, when the processor 50 executes the computer program 52, the functions of the modules / units in the above-mentioned embodiment of the mobile terminal are implemented, for example, the functions of modules 41 to 43 shown in FIG. 4.
示例性的,所述计算机程序52可以被分割成一个或多个模块/单元,所述一个或者多个模块/单元被存储在所述存储器51中,并由所述处理器50执行,以完成本申请。所述一个或多个模块/单元可以是能够完成特定功能的一系列计算机程序指令段,该指令段用于描述所述计算机程序52在所述移动终端5中的执行过程。例如,所述计算机程序52可以被分割成确认模块、扫码模块、拍照模块。Exemplarily, the computer program 52 may be divided into one or more modules / units, and the one or more modules / units are stored in the memory 51 and executed by the processor 50 to complete This application. The one or more modules / units may be a series of computer program instruction segments capable of performing specific functions, and the instruction segments are used to describe the execution process of the computer program 52 in the mobile terminal 5. For example, the computer program 52 may be divided into a confirmation module, a code scanning module, and a photographing module.
所述确认模块,用于在接收到启动所述移动终端的相机的指令后,查看是否开启了预设的标志信息;The confirmation module is configured to check whether preset flag information is turned on after receiving an instruction to start the camera of the mobile terminal;
所述扫码模块,用于若开启了预设的标志信息,则获取扫码参数,并基于所述扫码参数,通过所述相机采集图像;The code scanning module is configured to obtain code scanning parameters if preset flag information is turned on, and collect an image through the camera based on the code scanning parameters;
所述拍照模块,用于若未开启预设的标志信息,则获取拍照参数,并基于所述拍照参数,通过所述相机采集图像。The photographing module is configured to acquire photographing parameters if preset logo information is not turned on, and collect images through the camera based on the photographing parameters.
其它模块或者单元可参照图4所示的实施例中的描述,在此不再赘述。For other modules or units, reference may be made to the description in the embodiment shown in FIG. 4, and details are not described herein again.
所述移动终端包括但不仅限于处理器50、存储器51。本领域技术人员可以理解,图5仅仅是移动终端5的一个示例,并不构成对移动终端5的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如所述移动终端还可以包括输入设备、输出设备、网络接入设备、总线等。The mobile terminal includes, but is not limited to, a processor 50 and a memory 51. Those skilled in the art can understand that FIG. 5 is only an example of the mobile terminal 5 and does not constitute a limitation on the mobile terminal 5. It may include more or fewer components than shown in the figure, or combine some components, or different Components, for example, the mobile terminal may further include an input device, an output device, a network access device, a bus, and the like.
所述处理器50可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器 (Digital Signal Processor,DSP)、专用集成电路 (Application Specific Integrated Circuit,ASIC)、现成可编程门阵列 (Field-Programmable Gate Array,FPGA) 或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。The processor 50 may be a central processing unit (Central Processing Unit (CPU), or other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (Application Specific Integrated Circuits) Specific Integrated Circuit (ASIC), off-the-shelf Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
所述存储器51可以是所述移动终端5的内部存储单元,例如移动终端5的硬盘或内存。所述存储器51也可以是所述移动终端5的外部存储设备,例如所述移动终端5上配备的插接式硬盘,智能存储卡(Smart Media Card, SMC),安全数字(Secure Digital, SD)卡,闪存卡(Flash Card)等。进一步地,所述存储器51还可以既包括所述移动终端5的内部存储单元也包括外部存储设备。所述存储器51用于存储所述计算机程序以及所述移动终端所需的其他程序和数据。所述存储器51还可以用于暂时地存储已经输出或者将要输出的数据。The memory 51 may be an internal storage unit of the mobile terminal 5, such as a hard disk or a memory of the mobile terminal 5. The memory 51 may also be an external storage device of the mobile terminal 5, such as a plug-in hard disk, a smart media card (SMC), and a secure digital (SD) provided on the mobile terminal 5. Flash card Card) and so on. Further, the memory 51 may also include both an internal storage unit of the mobile terminal 5 and an external storage device. The memory 51 is configured to store the computer program and other programs and data required by the mobile terminal. The memory 51 may also be used to temporarily store data that has been output or is to be output.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述或记载的部分,可以参见其它实施例的相关描述。In the foregoing embodiments, the description of each embodiment has its own emphasis. For a part that is not detailed or recorded in an embodiment, reference may be made to related descriptions of other embodiments.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art may realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. A professional technician can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
在本申请所提供的实施例中,应该理解到,所揭露的移动终端和方法,可以通过其它的方式实现。例如,以上所描述的移动终端实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通讯连接可以是通过一些接口,装置或单元的间接耦合或通讯连接,可以是电性,机械或其它的形式。In the embodiments provided in this application, it should be understood that the disclosed mobile terminal and method may be implemented in other ways. For example, the mobile terminal embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be another division manner, such as multiple units or components. Can be combined or integrated into another system, or some features can be ignored or not implemented. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, which may be electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objective of the solution of this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each of the units may exist separately physically, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of software functional unit.
所述集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实现上述实施例方法中的全部或部分流程,也可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一计算机可读存储介质中,该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。其中,所述计算机程序包括计算机程序代码,所述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质等。需要说明的是,所述计算机可读介质包含的内容可以根据司法管辖区内立法和专利实践的要求进行适当的增减,例如在某些司法管辖区,根据立法和专利实践,计算机可读介质不包括是电载波信号和电信信号。When the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the method of the above embodiment, and can also be completed by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium. When the program is executed by a processor, the steps of the foregoing method embodiments can be implemented. The computer program includes computer program code, and the computer program code may be in a source code form, an object code form, an executable file, or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signals, telecommunication signals, and software distribution media. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdictions. For example, in some jurisdictions, the computer-readable medium Excludes electric carrier signals and telecommunication signals.
以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。The above-mentioned embodiments are only used to describe the technical solution of the present application, but not limited thereto. Although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still implement the foregoing implementations. The technical solutions described in the examples are modified, or some of the technical features are equivalently replaced; and these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the application, and should be included Within the scope of this application.

Claims (10)

  1. 一种相机的控制方法,其特征在于,应用于移动终端,所述控制方法包括:A camera control method is characterized in that it is applied to a mobile terminal, and the control method includes:
    在接收到启动所述移动终端的相机的指令后,查看是否开启了预设的标志信息;After receiving an instruction to start the camera of the mobile terminal, check whether preset flag information is turned on;
    若开启了预设的标志信息,则获取扫码参数,并基于所述扫码参数,通过所述相机采集图像;If preset flag information is turned on, acquiring code scanning parameters, and acquiring images through the camera based on the code scanning parameters;
    若未开启预设的标志信息,则获取拍照参数,并基于所述拍照参数,通过所述相机采集图像。If the preset flag information is not turned on, a photographing parameter is acquired, and an image is collected by the camera based on the photographing parameter.
  2. 如权利要求1所述的相机的控制方法,其特征在于,还包括:The method for controlling a camera according to claim 1, further comprising:
    基于所述移动终端中的扫码应用,开启或关闭预设的标志信息。Based on the code scanning application in the mobile terminal, preset flag information is turned on or off.
  3. 如权利要求2所述的相机的控制方法,其特征在于,所述基于所述移动终端中的扫码应用,开启或关闭预设的标志信息包括:The method for controlling a camera according to claim 2, wherein the enabling or disabling of preset flag information based on a code scanning application in the mobile terminal comprises:
    在获取到所述扫码应用启动的信息后,开启所述预设的标志信息;After obtaining the information of the code scanning application activation, opening the preset flag information;
    在获取到所述扫码应用由前台切换到后台的信息后,关闭所述预设的标志信息;After obtaining the information that the code scanning application is switched from the foreground to the background, closing the preset flag information;
    在获取到所述扫码应用由后台切换到前台的信息后,开启所述预设的标志信息;After obtaining the information that the code scanning application is switched from the background to the foreground, turn on the preset flag information;
    在接收到所述扫码应用退出的信息后,关闭所述预设的标志信息。After receiving the information that the code scanning application exits, the preset flag information is turned off.
  4. 如权利要求1所述的相机的控制方法,其特征在于,所述在接收到启动所述移动终端的相机的指令后,查看是否开启了预设的标志信息包括:The method for controlling a camera according to claim 1, wherein after receiving an instruction to start the camera of the mobile terminal, checking whether the preset flag information is turned on comprises:
    在接收到所述扫码应用或拍照应用基于系统的API接口,通过JNI接口调用相机驱动的指令后,查看是否开启了预设的标志信息,其中,所述扫码应用和所述拍照应用均基于系统的API接口,通过JNI接口调用相机驱动;After receiving the system-based API interface of the code scanning application or photographing application, and calling the camera-driven instruction through the JNI interface, check whether preset flag information is enabled, where both the code scanning application and the photographing application are Based on system API interface, call camera driver through JNI interface;
    相应的,所述基于所述扫码参数,通过所述相机采集图像包括:Correspondingly, the acquiring images by the camera based on the code scanning parameters includes:
    通过所述相机驱动加载所述扫码参数,并基于所述扫码参数采集图像;Loading the code scanning parameters through the camera driver, and acquiring an image based on the code scanning parameters;
    所述基于所述拍照参数,通过所述相机采集图像包括:The acquiring images by the camera based on the photographing parameters includes:
    通过所述相机驱动加载所述拍照参数,并基于所述拍照参数采集图像。The camera parameters are loaded by the camera driver, and an image is acquired based on the camera parameters.
  5. 如权利要求1所述的相机的控制方法,其特征在于,在获取扫码参数,并基于所述扫码参数,通过所述相机采集图像之前,还包括:The method for controlling a camera according to claim 1, further comprising: before acquiring code scanning parameters and acquiring images by the camera based on the code scanning parameters, further comprising:
    基于所述拍照参数获得所述扫码参数,所述拍照参数为所述移动终端的相机拍照时使用的参数。The scan code parameter is obtained based on the photographing parameter, and the photographing parameter is a parameter used when the camera of the mobile terminal takes a picture.
  6. 如权利要求5所述的相机的控制方法,其特征在于,所述基于所述拍照参数获得所述扫码参数包括:The method for controlling a camera according to claim 5, wherein the obtaining the scan code parameter based on the photographing parameter comprises:
    在所述拍照参数中曝光增益的基础上增加第一预设值作为所述扫码参数的曝光增益;Adding a first preset value as the exposure gain of the scanning parameter based on the exposure gain in the photographing parameter;
    在所述拍照参数中图像亮度的基础上降低第二预设值作为所述扫码参数的图像亮度;Reducing a second preset value as the image brightness of the code scanning parameter based on the image brightness in the photographing parameters;
    在所述拍照参数中图像饱和度的基础上降低第三预设值作为所述扫码参数的图像饱和度;Reducing a third preset value as the image saturation of the code scanning parameter based on the image saturation in the photographing parameters;
    在所述拍照参数的基础上关闭所述拍照参数的调试操作和延迟操作。The debugging operation and the delay operation of the photographing parameter are closed based on the photographing parameter.
  7. 如权利要求1所述的相机的控制方法,其特征在于,在基于所述扫码参数,通过所述相机采集图像之后,还包括:The method for controlling a camera according to claim 1, further comprising: after acquiring an image through the camera based on the scan parameter, further comprising:
    对基于所述扫码参数采集的图像进行解码操作,获得扫码结果;Performing a decoding operation on an image collected based on the code scanning parameters to obtain a code scanning result;
    将所述扫码结果通过所述移动终端的显示界面进行显示。Displaying the code scanning result through a display interface of the mobile terminal.
  8. 一种移动终端,其特征在于,包括:A mobile terminal, comprising:
    确认模块,用于在接收到启动所述移动终端的相机的指令后,查看是否开启了预设的标志信息;A confirmation module, configured to check whether preset flag information is turned on after receiving an instruction to start the camera of the mobile terminal;
    扫码模块,用于若开启了预设的标志信息,则获取扫码参数,并基于所述扫码参数,通过所述相机采集图像;The code scanning module is configured to obtain code scanning parameters if preset flag information is turned on, and collect images through the camera based on the code scanning parameters;
    拍照模块,用于若未开启预设的标志信息,则获取拍照参数,并基于所述拍照参数,通过所述相机采集图像。A photographing module is configured to acquire photographing parameters if preset flag information is not turned on, and collect images through the camera based on the photographing parameters.
  9. 一种移动终端,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现如权利要求1至7任一项所述方法的步骤。A mobile terminal includes a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, when the processor executes the computer program, the implementation of claims 1 to Steps of the method of any of 7.
  10. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机程序,所述计算机程序被一个或多个处理器执行时实现如权利要求1至7任一项所述方法的步骤。A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program, and when the computer program is executed by one or more processors, the method according to any one of claims 1 to 7 is implemented A step of.
PCT/CN2019/081044 2018-06-11 2019-04-02 Camera control method, mobile terminal, and computer readable storage medium WO2019237798A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810593396.3 2018-06-11
CN201810593396.3A CN108632533B (en) 2018-06-11 2018-06-11 Camera control method, mobile terminal and computer readable storage medium

Publications (1)

Publication Number Publication Date
WO2019237798A1 true WO2019237798A1 (en) 2019-12-19

Family

ID=63691489

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/081044 WO2019237798A1 (en) 2018-06-11 2019-04-02 Camera control method, mobile terminal, and computer readable storage medium

Country Status (2)

Country Link
CN (1) CN108632533B (en)
WO (1) WO2019237798A1 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108632533B (en) * 2018-06-11 2020-07-28 百富计算机技术(深圳)有限公司 Camera control method, mobile terminal and computer readable storage medium
CN111064893A (en) * 2019-12-27 2020-04-24 上海摩勤智能技术有限公司 Code scanning and photographing compatible method and electronic terminal
CN112153289A (en) * 2020-09-27 2020-12-29 广东小天才科技有限公司 Photographing control method and system, smart watch and storage medium
CN112463245A (en) * 2020-11-11 2021-03-09 上海龙旗科技股份有限公司 Method and equipment for loading camera calibration parameters
CN112597083A (en) * 2020-12-21 2021-04-02 上海商米科技集团股份有限公司 Camera code scanning system and method based on Android device
CN116929306B (en) * 2023-07-20 2024-04-19 深圳赛尔智控科技有限公司 Data acquisition method, device, equipment and computer readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103279383A (en) * 2013-05-31 2013-09-04 北京小米科技有限责任公司 Photographing method with two-dimensional bar code scanning function and photographing system with two-dimensional bar code scanning function
CN105227844A (en) * 2015-10-22 2016-01-06 上海斐讯数据通信技术有限公司 image acquiring method and device, mobile terminal
CN107395976A (en) * 2017-08-11 2017-11-24 维沃移动通信有限公司 A kind of acquisition parameters method to set up and mobile terminal
CN108632533A (en) * 2018-06-11 2018-10-09 百富计算机技术(深圳)有限公司 A kind of control method of camera, mobile terminal and computer readable storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7525586B2 (en) * 2003-05-12 2009-04-28 Altasens, Inc. Image sensor and method with multiple scanning modes
CN105488447A (en) * 2016-01-24 2016-04-13 苏州摩比力特电子科技有限公司 Mobile bar code scanning device based on hand-held terminal with shooting function
CN107153533A (en) * 2016-03-04 2017-09-12 深圳市深信服电子科技有限公司 Application call method and system based on Android virtual system
CN105959530A (en) * 2016-04-26 2016-09-21 乐视控股(北京)有限公司 Method and system for invoking a camera function according to an individualized property of an application
CN106446745B (en) * 2016-10-18 2019-05-28 珠海市魅族科技有限公司 Starting method, starter and the terminal of image scanning function
CN108038405A (en) * 2017-12-22 2018-05-15 努比亚技术有限公司 Barcode scanning light compensation method, mobile terminal and computer-readable recording medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103279383A (en) * 2013-05-31 2013-09-04 北京小米科技有限责任公司 Photographing method with two-dimensional bar code scanning function and photographing system with two-dimensional bar code scanning function
CN105227844A (en) * 2015-10-22 2016-01-06 上海斐讯数据通信技术有限公司 image acquiring method and device, mobile terminal
CN107395976A (en) * 2017-08-11 2017-11-24 维沃移动通信有限公司 A kind of acquisition parameters method to set up and mobile terminal
CN108632533A (en) * 2018-06-11 2018-10-09 百富计算机技术(深圳)有限公司 A kind of control method of camera, mobile terminal and computer readable storage medium

Also Published As

Publication number Publication date
CN108632533B (en) 2020-07-28
CN108632533A (en) 2018-10-09

Similar Documents

Publication Publication Date Title
WO2019237798A1 (en) Camera control method, mobile terminal, and computer readable storage medium
US10958850B2 (en) Electronic device and method for capturing image by using display
US11151700B2 (en) Image processing method, terminal, and non-transitory computer-readable storage medium
US10270988B2 (en) Method for generating high-dynamic range image, camera device, terminal and imaging method
US11196935B2 (en) Method and apparatus for accelerating AEC convergence, and terminal device
JP5888535B2 (en) Imaging processing method and terminal device
TW201019216A (en) Apparatus and methods for controlling image sensors and computer-readable medium thereof
CN111324378B (en) Configuration method, device and equipment for video monitoring application software
EP3822758A1 (en) Method and apparatus for setting background of ui control
CN112925718B (en) Call stack backtracking method, device, equipment and medium
CN110650247A (en) Method for customizing on/off animation, intelligent terminal and storage medium
CN104954699A (en) Shooting parameter setting method and user terminal
US7391438B2 (en) Camera device and method and program for starting the camera device
US10587802B2 (en) Electronic device and control method thereof
CN110618852B (en) View processing method, view processing device and terminal equipment
CN111182223B (en) Image processing method, image processing device, storage medium and electronic equipment
CN116700601B (en) Memory optimization method, equipment and storage medium
CN110502296B (en) Method, equipment and storage medium for displaying firmware upgrading command
WO2019011182A1 (en) Mobile terminal and adjusting method thereof, and computer readable storage medium
CN111131707B (en) Shooting method and device based on raspberry pie
KR100673999B1 (en) Method for booting of mobile
CN116528043B (en) Object marking method and electronic equipment
CN116048349B (en) Picture display method and device and terminal equipment
WO2024046260A1 (en) Hotfix method and related apparatus
CN110830736B (en) Method for video synthesis, electronic device and computer-readable storage medium

Legal Events

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

Ref document number: 19819035

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19819035

Country of ref document: EP

Kind code of ref document: A1