CN108170481B - Camera power-on driving method and electronic terminal - Google Patents

Camera power-on driving method and electronic terminal Download PDF

Info

Publication number
CN108170481B
CN108170481B CN201711451197.0A CN201711451197A CN108170481B CN 108170481 B CN108170481 B CN 108170481B CN 201711451197 A CN201711451197 A CN 201711451197A CN 108170481 B CN108170481 B CN 108170481B
Authority
CN
China
Prior art keywords
camera
information
driving
driving information
list
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201711451197.0A
Other languages
Chinese (zh)
Other versions
CN108170481A (en
Inventor
缪威
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Chuanying Information Technology Co Ltd
Original Assignee
Shanghai Chuanying Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Chuanying Information Technology Co Ltd filed Critical Shanghai Chuanying Information Technology Co Ltd
Priority to CN201711451197.0A priority Critical patent/CN108170481B/en
Publication of CN108170481A publication Critical patent/CN108170481A/en
Application granted granted Critical
Publication of CN108170481B publication Critical patent/CN108170481B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • G06F9/4451User profiles; Roaming

Abstract

The invention provides an electric driving method on a camera and an electronic terminal, wherein the method comprises the following steps: receiving a first instruction, wherein the first instruction is used for indicating to drive a first camera to be powered on; traversing information listed behind the second driving information in the list according to the sequence in the list according to the first instruction; the list is sequentially provided with driving information of different cameras; the driving information is used for indicating a driving circuit which needs to be conducted when the corresponding camera is electrified; the driving information comprises first driving information of the first camera and second driving information of the second camera, and the second driving information is listed before the first driving information; and when the first driving information is obtained through traversal, driving the corresponding first driving circuit to be conducted according to the first driving information so as to electrify the first camera. The invention reduces the time consumption required by traversal and improves the fluency of user experience.

Description

Camera power-on driving method and electronic terminal
Technical Field
The invention relates to the field of electronic terminals, in particular to an electric driving method on a camera and an electronic terminal.
Background
An electronic terminal is understood to be a terminal having a processor and a memory, the processor reading code in the memory to run a system and software. With the development of technology, an electronic terminal may be generally configured with a camera to implement a camera function, which may be a mobile phone, a tablet computer, a camera, and the like.
In the prior art, because a system does not know the brand, model and corresponding driving mode of a camera currently configured by a terminal, the system of an electronic terminal can preset a list in which a large amount of driving information of cameras of different brands, models and driving modes are listed, a user clicks software or a control of a photographing function to trigger the process of electrifying the cameras, and in order to drive any one of the cameras to be electrified, the system needs to traverse the driving information of all the cameras in the list from the beginning of the list to acquire the corresponding driving information, so as to drive the cameras to be electrified according to the driving information.
However, when the camera is driven each time, the camera is driven from the beginning of the list, which results in overlong time of electric driving on the camera, low efficiency and influence on fluency of user experience.
Disclosure of Invention
The invention provides an electric driving method on a camera and an electronic terminal, and aims to solve the technical problems that the electric driving time on the camera is too long, the efficiency is low, and the fluency of user experience is influenced.
According to a first aspect of the present invention, there is provided an electric driving method on a camera, comprising:
receiving a first instruction, wherein the first instruction is used for indicating to drive a first camera to be powered on;
according to the first instruction, information listed after the second driving information in the list is passed through according to the sequence in the list;
the list is sequentially provided with driving information of different cameras; the driving information is used for indicating a driving circuit which needs to be conducted when the corresponding camera is electrified; the driving information comprises first driving information of the first camera and second driving information of the second camera, and the second driving information is listed before the first driving information;
and when the first driving information is obtained through traversal, driving the corresponding first driving circuit to be conducted according to the first driving information so as to electrify the first camera.
Optionally, before the driving the corresponding first driving circuit to be turned on according to the first driving information, the method further includes:
setting the potential of a first pin corresponding to the first camera as a target potential according to the first instruction;
the first driving circuit is configured to be turned on only when the potential of the first pin is the target potential.
Optionally, the method further includes: when the first driving information is obtained through traversal, stopping scanning the list, or: after the corresponding first driving circuit is driven to be conducted according to the first driving information, the method further comprises the following steps: and stopping scanning the list if an i2c communication signal sent by the first camera is received through the bus.
Optionally, traversing the information listed after the second driving information in the list according to the sequence in the list further includes:
receiving a second instruction, wherein the second instruction is used for instructing to drive the second camera to be powered on;
traversing the information in the list from the beginning of the list according to the sequence in the list according to the second instruction;
and when the second driving information is obtained through traversal, triggering the corresponding second driving circuit to be conducted according to the second driving information so as to electrify the second camera.
Optionally, before traversing the information in the list from the beginning of the list according to the sequence in the list, the method further includes:
setting the potential of a second pin corresponding to the second camera as a target potential according to the second instruction;
the second driving circuit is configured to be turned on only when the potential of the second pin is the target potential.
Optionally, the method further includes: when the second driving information is obtained through traversal, stopping scanning the list, or: after the triggering of the corresponding second driving circuit to be conducted according to the second driving information, the method further includes: and stopping scanning the list if an i2c communication signal sent by the first camera is received through the bus.
Optionally, after the traversing obtains the second driving information, the method further includes:
recording the position information of the obtained second driving information in the list;
traversing the information listed after the second driving information in the list according to the sequence in the list comprises:
according to the first instruction, traversing the information behind the position indicated by the position information in the list according to the sequence of the list.
Optionally, the second camera is a rear camera, and the first camera is a front camera; or:
the first camera is a rear camera, and the second camera is a front camera.
According to a second aspect of the present invention, there is provided an electronic terminal comprising:
the first receiving module is used for receiving a first instruction, and the first instruction is used for indicating to drive the first camera to be powered on;
the first traversal module is used for traversing the information listed behind the second driving information in the list according to the sequence in the list according to the first instruction;
the list is sequentially provided with driving information of different cameras; the driving information is used for indicating a driving circuit which needs to be conducted when the corresponding camera is electrified; the driving information comprises first driving information of the first camera and second driving information of the second camera, and the second driving information is listed before the first driving information;
and the first conduction module is used for driving the corresponding first driving circuit to be conducted according to the first driving information when the first driving information is obtained through traversal so as to electrify the first camera.
Optionally, the terminal further includes:
the second receiving module is used for receiving a second instruction, and the second instruction is used for indicating to drive the second camera to be powered on;
the second traversing module is used for traversing the information in the list from the beginning of the list according to the sequence in the list according to the second instruction;
and the second conduction module is used for triggering the corresponding second driving circuit to be conducted according to the second driving information when the second driving information is obtained through traversal so as to electrify the second camera.
Optionally, the terminal further includes:
the first potential module is used for setting the potential of a first pin corresponding to the first camera to be a target potential according to the first instruction;
the first driving circuit is configured to be turned on only when the potential of the first pin is the target potential.
Optionally, the terminal further includes:
a first stopping module, configured to stop scanning the list when the first driving information is obtained through traversal, or: and stopping scanning the list if an i2c communication signal sent by the first camera is received through the bus.
Optionally, the terminal further includes:
the second potential module is used for setting the potential of a second pin corresponding to the second camera as a target potential according to the second instruction;
the second driving circuit is configured to be turned on only when the potential of the second pin is the target potential.
Optionally, the terminal further includes:
a second stopping module, configured to stop scanning the list when the second driving information is obtained through traversal, or: and stopping scanning the list if the i2c communication signal sent by the second camera is received through the bus. .
Optionally, the terminal further includes:
the recording module is used for recording the position information of the obtained second driving information in the list;
the first traversal module is specifically configured to:
according to the first instruction, traversing the information behind the position indicated by the position information in the list according to the sequence of the list.
Optionally, the second camera is a rear camera, and the first camera is a front camera; or:
the first camera is a rear camera, and the second camera is a front camera.
According to a third aspect of the present invention, there is provided an electronic terminal comprising: memory, a processor and a computer program, the computer program being stored in the memory, the processor running the computer program to perform the first aspect and various possible methods of the first aspect.
According to a fourth aspect of the present invention, there is provided a storage medium comprising: a readable storage medium and a computer program for implementing the first aspect and various possible methods of the first aspect.
According to the camera power-on driving method and the electronic terminal, information listed behind second driving information in a list containing first driving information is traversed according to the sequence in the list; and when the first driving information is obtained through traversal, driving the corresponding first driving circuit to be conducted according to the first driving information so as to electrify the first camera. According to the invention, when the first camera is driven, traversal can be started without starting from the beginning of the list, so that the time consumption required by traversal is reduced, the power-on efficiency is improved, and the fluency of user experience is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a schematic diagram of a trigger interface of an electric drive method on a camera according to the present invention;
FIG. 2 is a first schematic diagram of an electronic terminal according to the present invention;
FIG. 3 is a first schematic flow chart of a method for driving a camera electrically according to the present invention;
FIG. 4 is a second schematic flow chart of an electric driving method for a camera according to the present invention;
FIG. 5 is a second schematic structural diagram of an electronic terminal according to the present invention;
FIG. 6 is a third schematic structural diagram of an electronic terminal according to the present invention;
fig. 7 is a schematic structural diagram of an electronic terminal according to a fourth embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are, for example, capable of operation in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The technical solution of the present invention will be described in detail below with specific examples. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments.
Fig. 1 is a schematic diagram of a trigger interface of an electric driving method on a camera according to the present invention.
Referring to fig. 1, in an interface of an electronic terminal, a "camera" icon may be set to trigger a corresponding software having a photographing function to run, and in the software running process, the photographing function may be executed to trigger an electric driving method on a camera provided in the present invention and its optional solutions. The method can be applied to a photographing application program corresponding to a camera icon, other photographing application programs such as a beauty camera application program, video application programs such as Skype and American photographing, and other application programs with photographing or video acquisition functions such as WeChat, QQ and microblog. In addition, the method can also be applied to other controls capable of achieving functions of photographing, video acquisition and the like.
It can be understood as follows: any application or function that requires the use of a camera does not depart from the present invention. Therefore, the present invention can be applied to any electronic terminal with a camera, which can be specifically enumerated as follows: cell phones, cameras, tablet computers, and the like.
Fig. 2 is a schematic structural diagram of an electronic terminal according to the present invention.
Referring to fig. 2, the electronic terminal 1 may include a processor 11, a first camera 12 and a second camera 13, wherein the first camera 12 and the second camera 13 may respectively access three power sources, which are an I/O power source (I/O-Vdd), a digital power source (D-Vdd), and an analog power source (a-Vdd), respectively. According to the common sense of the camera in the field, the relation between each power supply end and the circuit can be known. In addition, different cameras configured on the electronic terminal can correspond to different three power supply ends, and can also have partially same power supply ends.
The second camera 12 is a rear camera, and the first camera 13 is a front camera; or: the first camera 13 is a rear camera, and the second camera 12 is a front camera.
Fig. 3 is a first schematic flow chart of an electric driving method for a camera according to the present invention.
Referring to fig. 3, the present embodiment provides a method for electrically driving a camera, including:
s101: a first instruction is received.
The first instruction may be understood as an instruction for instructing to drive the first camera to power up, and may specifically include an identifier for characterizing the first camera and an action identifier for instructing to execute a power-up action; the first instruction may be in the form of any data capable of implementing the above functions in the field.
S102: and traversing the information listed after the second driving information in the list according to the sequence in the list according to the first instruction.
List, it can be understood that the driving information of different cameras are listed in sequence.
The driving information is used for indicating a driving circuit which needs to be conducted when the corresponding camera is powered on; the driving information includes first driving information of the first camera and second driving information of the second camera, and the second driving information is listed before the first driving information. The driving information can comprise an identification of a driving circuit of the camera, and the driving circuit which needs to be conducted for driving the camera to be electrified can be obtained through obtaining the driving information. The driving information can carry sequence information representing the sequence of the driving information, and the driving information is traversed according to the sequence information, so that the sequential traversal of each driving information can be realized; the driving information is used for indicating the driving circuit which needs to be conducted when the corresponding camera is electrified.
The first driving information is driving information of the first camera, and the second driving information is driving information of the second camera.
Since the traversal of the first camera starts from the position of the second camera, the method provided by the embodiment can also avoid interference between different cameras.
S103: and judging whether the first driving information is obtained by traversing.
If yes, the step S104 is executed: and driving the corresponding first driving circuit to be conducted according to the first driving information so as to electrify the first camera.
In the field, the MTK platform issues a common template for a search process from the viewpoint of universality. Namely: the software defaults to scanning the list from index 0 (representing the rear camera) in turn, and if the i2c communication is successful, representing the rear camera is powered on successfully, the rest of the list will be scanned continuously until the last one. Then the list continues to be scanned sequentially starting with index 1 (representing the front camera), if the i2c communication is successful, representing the front camera power-up is successful, and the scanning continues until the last end of the list.
From the above description, the drawbacks include: first, two cameras are stopped until the last one is scanned, the number of lists is defined as 16 by default, and if the assembled camera is located at a position closer to the front of the list, redundancy and time consumption are caused. Secondly, after the rear camera is scanned successfully, it is obvious that no other rear camera can continue to be matched, so that it is not necessary to continue scanning, and the continuous scanning still causes time redundancy. Third, for some cameras, the above scanning procedure may also cause interference between the front and back shots, affecting i2c communication.
In addition, the method can also be applied to power-on driving of more than two cameras.
According to the camera power-on driving method provided by the embodiment, information listed behind second driving information in a list containing first driving information is traversed according to the sequence in the list; and when the first driving information is obtained through traversal, driving the corresponding first driving circuit to be conducted according to the first driving information so as to electrify the first camera. When the first camera is driven, traversal from the beginning of the list can be avoided, time consumed by traversal is reduced, power-on efficiency is improved, and fluency of user experience is improved.
Fig. 4 is a second schematic flow chart of the electric driving method on the camera according to the present invention.
Referring to fig. 4, the present embodiment provides a method for electrically driving a camera, including:
s201: and receiving a second instruction and the first instruction.
The first instruction may be understood as an instruction for instructing to drive the first camera to power up, and may specifically include an identifier for characterizing the first camera and an action identifier for instructing to execute a power-up action; the first instruction may be in the form of any data capable of implementing the above functions in the field.
The second instruction may be understood as an instruction for instructing to drive the second camera to power up, and may specifically include an identifier for characterizing the second camera and an action identifier for instructing to execute a power-up action; the second instruction may be in the form of any data capable of implementing the above functions in the field.
It may be triggered by the aforementioned photographing application, video application, or by the aforementioned triggering of the photographing function of other applications with photographing or video capturing functions. In addition, in some optional embodiments, the external instruction may also be received by a communication module, and the communication module may be a wired communication module or a wireless communication module.
S202: and setting the potential of a second pin corresponding to the second camera to be a target potential according to the second instruction.
The second driving circuit is configured to be turned on only when the potential of the second pin is the target potential. The target potential may be a high level, which may be understood as pulling up a potential of a pin corresponding to the second camera. In the specific implementation process, it can be understood that steps S203 to S205 can be executed only when the pin is at the target potential.
The second pin may be understood as a pin of the processor.
The above process of setting the target potential may also be understood as determining the current index in the program as a specific flag, for example, 0 or 1.
S203: according to the first instruction, information listed after the second driving information in the list containing the first driving information is traversed according to the priority order.
List, it can be understood that the driving information of different cameras are listed in sequence.
The driving information is used for indicating a driving circuit which needs to be conducted when the corresponding camera is powered on; the driving information includes first driving information of the first camera and second driving information of the second camera, and the second driving information is listed before the first driving information. The driving information can comprise an identification of a driving circuit of the camera, and the driving circuit which needs to be conducted for driving the camera to be electrified can be obtained through obtaining the driving information. The driving information can carry sequence information representing the sequence of the driving information, and the driving information is traversed according to the sequence information, so that the sequential traversal of each driving information can be realized; the driving information is used for indicating the driving circuit which needs to be conducted when the corresponding camera is electrified.
The first driving information is driving information of the first camera, and the second driving information is driving information of the second camera.
S204: and judging whether the second driving information is obtained by traversing.
S205: and triggering the corresponding second driving circuit to be conducted according to the second driving information so as to electrify the second camera.
After step S205 is completed, the second pin of the second camera is satisfied as the target potential, and the second driving circuit is turned on, so that the second camera can be powered on to start operating. Specifically, three paths of electricity of the second camera can be driven to be conducted respectively.
S206: recording the obtained position information of the second driving information in the list.
The position information, which may be understood as information for characterizing the position of the second driving information in the list, may be characterized by the order information carried by the second driving information.
In a specific implementation process, when the second driving information is obtained through traversal, scanning of the list is stopped, or: after the triggering of the corresponding second driving circuit to be conducted according to the second driving information, the method further includes: and stopping scanning the list if an i2c communication signal sent by the first camera is received through the bus. So as to implement step S207, setting of the potential, i.e., changing of the index, is performed. In other alternative embodiments, the traversal may not be stopped, but the potential of the first pin may be changed before the subsequent traversal.
It can be understood as follows: after the user triggers the method, the assembled camera can be triggered to be powered on, and after the first camera and the second camera are assembled on the electronic terminal, the first camera and the second camera can be driven to be powered on respectively, so that: the second camera may be understood as a camera powered on in a previous drive, and the first camera may be understood as a camera powered on in a subsequent drive.
S207: and setting the potential of a first pin corresponding to the first camera as a target potential according to the first instruction.
The first driving circuit is configured to be turned on only when the potential of the first pin is the target potential. The target potential may be a high level, which may be understood as pulling up a potential of a pin corresponding to the first camera. In the specific implementation process, it can be understood that steps S208 to S210 can be executed only when the pin is at the target potential.
The first pin may be understood as a pin of the processor.
The above process of setting the target potential may also be understood as determining the current index in the program as a specific flag, for example, 0 or 1.
It may also include changing the potential of the second pin corresponding to the second camera back to a non-target potential, e.g., pulling the pin low.
S208: and traversing the information including the information listed after the second driving information in the list according to the sequence in the list according to the first instruction. In a specific implementation, it is understood that the scanning starts from i ═ COMPATIBALNUM of the list sensoll ist [ i ].
List, it can be understood that the driving information of different cameras are listed in sequence.
The list is sequentially provided with driving information of different cameras; the driving information is used for indicating a driving circuit which needs to be conducted when the corresponding camera is electrified; the driving information includes first driving information of the first camera and second driving information of the second camera, and the second driving information is listed before the first driving information. The driving information can comprise an identification of a driving circuit of the camera, and the driving circuit which needs to be conducted for driving the camera to be electrified can be obtained through obtaining the driving information. The driving information can carry sequence information representing the sequence of the driving information, and the driving information is traversed according to the sequence information, so that the sequential traversal of each driving information can be realized; the driving information is used for indicating the driving circuit which needs to be conducted when the corresponding camera is electrified.
The first driving information is driving information of the first camera, and the second driving information is driving information of the second camera.
Since the traversal of the first camera starts from the position of the second camera, the method provided by the embodiment can also avoid the interference between the front and back shots.
S209: and judging whether the first driving information is obtained by traversing.
S210: and triggering the corresponding first driving circuit to be conducted according to the first driving information so as to electrify the first camera.
The method specifically comprises the following steps: according to the first instruction, traversing the information behind the position indicated by the position information in the list according to the sequence in the list.
After step S210 is completed, the first pin of the first camera is satisfied as the target potential, and the first driving circuit is turned on, so that the first camera can be powered on, so that the first camera starts to operate. Specifically, three paths of electricity of the first camera can be driven to be conducted respectively.
In a specific implementation process, if a communication signal sent by the first camera is received through a bus, scanning of the list is stopped, or: and stopping scanning the list after the first driving information is obtained through traversal.
It can be seen that, in the method, the search process (search process) can be implemented by impSearchSensor () function, which generally starts with a rear camera, such as a second camera, and scans the list one by one; then, the scan is continued one by one for the front camera, e.g., the first camera. On this basis, in the implementation process, the rear camera can be listed as the second camera in front of the list, and then the front camera can be listed as the first camera behind, starting from the rear-scanning camera, that is: scanning backwards from the beginning of the list, scanning to a rear camera, and stopping; when the front camera is swept, the number of the rear cameras can be eliminated, the rear cameras are directly scanned backwards from corresponding positions, and the front camera is swept and stopped.
In addition, the method can also be applied to power-on driving of more than two cameras.
According to the camera power-on driving method provided by the embodiment, information listed behind second driving information in a list containing first driving information is traversed according to the sequence of the list; and when the first driving information is obtained through traversal, driving the corresponding first driving circuit to be conducted according to the first driving information so as to electrify the first camera. According to the invention, when the first camera is driven, traversal can be started without starting from the beginning of the list, so that the time consumption required by traversal is reduced, the power-on efficiency is improved, and the fluency of user experience is improved.
Fig. 5 is a schematic structural diagram of an electronic terminal according to a second embodiment of the present invention.
Referring to fig. 5, the electronic terminal includes:
the first receiving module 401 is configured to receive a first instruction, where the first instruction is used to instruct to drive the first camera to power up.
And a first traversing module 402, configured to traverse, according to the first instruction, information listed after the second driving information in the list according to a sequence in the list.
The list is sequentially provided with driving information of different cameras; the driving information is used for indicating a driving circuit which needs to be conducted when the corresponding camera is electrified; the driving information includes first driving information of the first camera and second driving information of the second camera, and the second driving information is listed before the first driving information.
A first conducting module 403, configured to drive, when the first driving information is obtained through traversal, a corresponding first driving circuit to conduct according to the first driving information, so as to power on the first camera.
In the electronic terminal provided by this embodiment, information listed after the second driving information in the list including the first driving information is traversed according to the priority order; and when the first driving information is obtained through traversal, driving the corresponding first driving circuit to be conducted according to the first driving information so as to electrify the first camera. According to the invention, when the first camera is driven, traversal can be started without starting from the beginning of the list, so that the time consumption required by traversal is reduced, the power-on efficiency is improved, and the fluency of user experience is improved.
Fig. 6 is a third schematic structural diagram of an electronic terminal according to the present invention.
Referring to fig. 6, the electronic terminal includes:
a first receiving module 506, configured to receive a first instruction, where the first instruction is used to instruct to drive the first camera to power up.
And a first traversal module 508, configured to traverse, according to the first instruction, information listed after the second driving information in the list according to a sequence in the list.
The list is sequentially provided with driving information of different cameras; the driving information is used for indicating a driving circuit which needs to be conducted when the corresponding camera is electrified; the driving information includes first driving information of the first camera and second driving information of the second camera, and the second driving information is listed before the first driving information.
A first conducting module 509, configured to drive, when the first driving information is obtained through traversal, a corresponding first driving circuit to be conducted according to the first driving information, so as to power on the first camera.
Optionally, the terminal further includes:
a second receiving module 501, configured to receive a second instruction, where the second instruction is used to instruct to drive the second camera to power up;
a second traversing module 503, configured to traverse information in the list from the beginning of the list according to the sequence in the list according to the second instruction;
and a second conducting module 504, configured to trigger a corresponding second driving circuit to conduct according to the second driving information when the second driving information is obtained through traversal, so as to power on the second camera.
Optionally, the terminal further includes:
a first potential module 507, configured to set a potential of a first pin corresponding to the first camera to a target potential according to the first instruction;
the first driving circuit is configured to be turned on only when the potential of the first pin is the target potential.
Optionally, the terminal further includes:
a first stopping module, configured to stop scanning the list when the first driving information is obtained through traversal, or: and stopping scanning the list if an i2c communication signal sent by the first camera is received through the bus.
Optionally, the terminal further includes:
a second potential module 502, configured to set a potential of a second pin corresponding to the second camera to a target potential according to the second instruction;
the second driving circuit is configured to be turned on only when the potential of the second pin is the target potential.
Optionally, the terminal further includes:
a second stopping module, configured to stop scanning the list when the second driving information is obtained through traversal, or: and stopping scanning the list if the i2c communication signal sent by the second camera is received through the bus. .
Optionally, the terminal further includes:
a recording module 505, configured to record position information of the obtained second driving information in the list;
the first traversal module 503 is specifically configured to:
according to the first instruction, traversing the information behind the position indicated by the position information in the list according to the sequence of the list.
According to the electronic terminal provided by the embodiment, information listed behind the second driving information in the list containing the first driving information is traversed according to the sequence of the list; and when the first driving information is obtained through traversal, driving the corresponding first driving circuit to be conducted according to the first driving information so as to electrify the first camera. According to the invention, when the first camera is driven, traversal can be started without starting from the beginning of the list, so that the time consumption required by traversal is reduced, the power-on efficiency is improved, and the fluency of user experience is improved.
Fig. 7 is a schematic structural diagram of an electronic terminal according to a fourth embodiment of the present invention.
Referring to fig. 7, the electronic terminal 600 includes: a processor 601, a first camera 603, a second camera 604, a touch screen 604 and a memory 606; wherein:
a memory 606 for storing a computer program, which may also be a flash (flash memory).
The processor 601 is configured to execute the execution instructions stored in the memory to implement the steps in the above method embodiments. Reference may be made in particular to the description relating to the preceding method embodiment.
The touch screen 605 may be used for receiving a first instruction and a second instruction.
In one embodiment, the first camera 603 and the second camera 604 are independent from the touch screen 605 and the memory 606, or integrated with the processor 601.
The electronic terminal 600 may further include:
a bus 602, configured to connect the processor 601 with the first camera 603, the second camera 604, the touch screen 605, and the memory 606.
The present embodiment provides a readable storage medium, in which an execution program is stored, and when at least one processor of the electronic terminal executes the execution program, the electronic terminal executes the method provided by the above method embodiment.
The present embodiment provides a program product including an execution program stored in a readable storage medium. The at least one processor of the electronic terminal may read the execution program from the readable storage medium, and the execution of the execution program by the at least one processor causes the electronic terminal to implement the method provided by the above-mentioned method embodiment.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (10)

1. An electric drive method on a camera, comprising:
receiving a first instruction, wherein the first instruction is used for indicating to drive a first camera to be powered on;
traversing information listed behind the second driving information in the list according to the sequence in the list according to the first instruction;
the list is sequentially provided with driving information of different cameras; the driving information is used for indicating a driving circuit which needs to be conducted when the corresponding camera is electrified; the driving information comprises first driving information of the first camera and second driving information of the second camera, and the second driving information is listed before the first driving information; the driving information comprises identification information of a driving circuit of the camera and sequence information representing the sequence of the driving information;
when the first driving information is obtained through traversal, driving a corresponding first driving circuit to be conducted according to the first driving information so as to electrify the first camera;
when the order information is used to represent the position information of the driving information in the list, correspondingly, traversing the information listed after the second driving information in the list according to the sequence in the list includes:
according to the first instruction, traversing the information behind the position indicated by the position information in the list according to the sequence of the list.
2. The method according to claim 1, before driving the corresponding first driving circuit to be turned on according to the first driving information, further comprising:
setting the potential of a first pin corresponding to the first camera as a target potential according to the first instruction;
the first driving circuit is configured to be turned on only when the potential of the first pin is the target potential.
3. The method of claim 1,
further comprising: when the first driving information is obtained through traversal, stopping scanning the list, or: after the corresponding first driving circuit is driven to be conducted according to the first driving information, the method further comprises the following steps: and stopping scanning the list if an i2c communication signal sent by the first camera is received through the bus.
4. The method according to any one of claims 1 to 3, wherein traversing the list according to the sequence in the list before the information listed after the second driving information further comprises:
receiving a second instruction, wherein the second instruction is used for instructing to drive the second camera to be powered on;
traversing the information in the list from the beginning of the list according to the sequence in the list according to the second instruction;
and when the second driving information is obtained through traversal, triggering the corresponding second driving circuit to be conducted according to the second driving information so as to electrify the second camera.
5. The method of claim 4, wherein before traversing the information in the list from the beginning of the list according to the precedence order in the list, further comprising:
setting the potential of a second pin corresponding to the second camera as a target potential according to the second instruction;
the second driving circuit is configured to be turned on only when the potential of the second pin is the target potential.
6. The method of claim 4, further comprising: when the second driving information is obtained through traversal, stopping scanning the list, or: after the triggering of the corresponding second driving circuit to be conducted according to the second driving information, the method further includes: and stopping scanning the list if the i2c communication signal sent by the second camera is received through the bus.
7. The method of claim 4, wherein after the traversing obtains the second driving information, further comprising:
recording the position information of the obtained second driving information in the list;
traversing the information listed after the second driving information in the list according to the sequence in the list comprises:
according to the first instruction, traversing the information behind the position indicated by the position information in the list according to the sequence of the list.
8. The method of any of claims 1 to 3, wherein the second camera is a rear camera and the first camera is a front camera; or:
the first camera is a rear camera, and the second camera is a front camera.
9. An electronic terminal, comprising:
the first receiving module is used for receiving a first instruction, and the first instruction is used for indicating to drive the first camera to be powered on;
the first traversal module is used for traversing the information listed behind the second driving information in the list according to the sequence in the list according to the first instruction;
the list is sequentially provided with driving information of different cameras; the driving information is used for indicating a driving circuit which needs to be conducted when the corresponding camera is electrified; the driving information comprises first driving information and second driving information of the first camera, the second driving information is listed before the first driving information, and the second driving information is driving information of a second camera; the driving information comprises identification information of a driving circuit of the camera and sequence information representing the sequence of the driving information;
the first conduction module is used for driving a corresponding first driving circuit to be conducted according to the first driving information when the first driving information is obtained through traversal so as to electrify the first camera;
when the order information is used to represent the position information of the driving information in the list, the corresponding first traversal module is specifically configured to traverse information after the position indicated by the position information in the list according to the sequence of the first instruction.
10. The terminal of claim 9, further comprising:
the second receiving module is used for receiving a second instruction, and the second instruction is used for indicating to drive the second camera to be powered on;
the second traversing module is used for traversing the information in the list from the beginning of the list according to the sequence in the list according to the second instruction;
and the second conduction module is used for triggering the corresponding second driving circuit to be conducted according to the second driving information when the second driving information is obtained through traversal so as to electrify the second camera.
CN201711451197.0A 2017-12-27 2017-12-27 Camera power-on driving method and electronic terminal Active CN108170481B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711451197.0A CN108170481B (en) 2017-12-27 2017-12-27 Camera power-on driving method and electronic terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711451197.0A CN108170481B (en) 2017-12-27 2017-12-27 Camera power-on driving method and electronic terminal

Publications (2)

Publication Number Publication Date
CN108170481A CN108170481A (en) 2018-06-15
CN108170481B true CN108170481B (en) 2020-12-01

Family

ID=62518893

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711451197.0A Active CN108170481B (en) 2017-12-27 2017-12-27 Camera power-on driving method and electronic terminal

Country Status (1)

Country Link
CN (1) CN108170481B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110780934B (en) * 2019-10-23 2024-03-12 深圳市商汤科技有限公司 Deployment method and device of vehicle-mounted image processing system

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1346488A (en) * 1999-03-08 2002-04-24 松下电器产业株式会社 Recording driven information on recording medium
CN1975735A (en) * 2005-11-30 2007-06-06 佳能株式会社 Sortable collection browser
CN102263904A (en) * 2011-08-17 2011-11-30 华为终端有限公司 Method and system for controlling double cameras and electronic equipment with double cameras
CN102841833A (en) * 2011-06-24 2012-12-26 鸿富锦精密工业(深圳)有限公司 PCI (peripheral component interconnect) resource traversal method and system
US9086895B1 (en) * 2013-08-07 2015-07-21 American Megatrends Inc. Controlling hardware driver selection
CN104932922A (en) * 2015-06-18 2015-09-23 浪潮电子信息产业股份有限公司 Method and device for regulating boot sequence of SAS (Serial Attached SCSI) card hard disk
CN104951342A (en) * 2015-06-18 2015-09-30 浪潮电子信息产业股份有限公司 Method and device for adjusting starting sequence
CN105376481A (en) * 2015-10-08 2016-03-02 珠海全志科技股份有限公司 Camera device driving method and camera device driving unit
CN105653367A (en) * 2015-12-24 2016-06-08 北京奇虎科技有限公司 Method and device for traversing timer
CN107395955A (en) * 2017-06-14 2017-11-24 广东小天才科技有限公司 A kind of method and user terminal for determining camera module electrifying timing sequence

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7421431B2 (en) * 2002-12-20 2008-09-02 Intel Corporation Providing access to system management information
US9766899B2 (en) * 2015-12-28 2017-09-19 Google Inc. Bootloader control via device identifier

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1346488A (en) * 1999-03-08 2002-04-24 松下电器产业株式会社 Recording driven information on recording medium
CN1975735A (en) * 2005-11-30 2007-06-06 佳能株式会社 Sortable collection browser
CN102841833A (en) * 2011-06-24 2012-12-26 鸿富锦精密工业(深圳)有限公司 PCI (peripheral component interconnect) resource traversal method and system
CN102263904A (en) * 2011-08-17 2011-11-30 华为终端有限公司 Method and system for controlling double cameras and electronic equipment with double cameras
US9086895B1 (en) * 2013-08-07 2015-07-21 American Megatrends Inc. Controlling hardware driver selection
CN104932922A (en) * 2015-06-18 2015-09-23 浪潮电子信息产业股份有限公司 Method and device for regulating boot sequence of SAS (Serial Attached SCSI) card hard disk
CN104951342A (en) * 2015-06-18 2015-09-30 浪潮电子信息产业股份有限公司 Method and device for adjusting starting sequence
CN105376481A (en) * 2015-10-08 2016-03-02 珠海全志科技股份有限公司 Camera device driving method and camera device driving unit
CN105653367A (en) * 2015-12-24 2016-06-08 北京奇虎科技有限公司 Method and device for traversing timer
CN107395955A (en) * 2017-06-14 2017-11-24 广东小天才科技有限公司 A kind of method and user terminal for determining camera module electrifying timing sequence

Also Published As

Publication number Publication date
CN108170481A (en) 2018-06-15

Similar Documents

Publication Publication Date Title
CN104951335B (en) The processing method and processing device of application program installation kit
US20130334883A1 (en) Battery charging method and electronic device
CN105488112A (en) Information pushing method and device
CN104536711A (en) Control method of terminal display
CN105187725A (en) Shooting method and apparatus
CN107329659B (en) Permission setting method and device, electronic equipment and storage medium
CN105630628A (en) Application restoration method and apparatus
CN108170211B (en) Camera power-on driving method and electronic terminal
CN112153436A (en) Screen recording method, device, equipment and storage medium
CN111488088A (en) Equipment state identification method and device and intelligent terminal
CN105116996A (en) Control method for smart watch and smart watch
CN107015626A (en) Terminal control method and terminal control mechanism
CN111373728B (en) Control method and device for camera application
CN104580705A (en) Terminal
CN108170481B (en) Camera power-on driving method and electronic terminal
CN104615546A (en) File data management method and device
CN104951184A (en) Application program downloading method and device
CN112579264A (en) Application program jumping method, terminal and computer storage medium
RU2679253C1 (en) Method, device and terminal for processing fingerprint event
CN105159434A (en) Time display method, device and terminal
CN112698772A (en) Document template processing method and device and document creating method and device
CN111338545A (en) Image processing method, assembly, electronic device and storage medium
CN111384753A (en) State machine-based charge control strategy design method, device, equipment and medium
CN108769389B (en) Picture acquisition method and device, terminal equipment and storage medium
CN112383661B (en) Mobile terminal automatic test method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant