CN114064129A - Camera starting method and device and electronic equipment - Google Patents

Camera starting method and device and electronic equipment Download PDF

Info

Publication number
CN114064129A
CN114064129A CN202010796736.XA CN202010796736A CN114064129A CN 114064129 A CN114064129 A CN 114064129A CN 202010796736 A CN202010796736 A CN 202010796736A CN 114064129 A CN114064129 A CN 114064129A
Authority
CN
China
Prior art keywords
camera
request
operation request
writing
configuration data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010796736.XA
Other languages
Chinese (zh)
Inventor
吉高平
杨凌远
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software 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 Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN202010796736.XA priority Critical patent/CN114064129A/en
Publication of CN114064129A publication Critical patent/CN114064129A/en
Pending legal-status Critical Current

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/4401Bootstrapping
    • G06F9/4411Configuring for operating with peripheral devices; Loading of device drivers
    • 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/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30098Register arrangements

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Studio Devices (AREA)

Abstract

The disclosure relates to a camera starting method and device and electronic equipment. The method comprises the following steps: when the camera shooting function is triggered, the first N operation requests are simultaneously written into a register, so that the camera is started and then each operation request is sequentially validated; and when the camera is started, sequentially acquiring images output by the camera and corresponding to the operation requests. In the embodiment, the configuration data of the operation request is loaded to the camera before the camera is started, so that the configuration data can be directly validated, and an effective image can be output after the camera is started; the first N operation requests can be written into the register through one-time writing operation before the camera is started, and the (N + 1) th operation request and the operation requests after the operation request can be continuously written after the camera outputs the image corresponding to the first operation request, so that the camera can continuously output the images. According to the embodiment, the delay of N frames of the camera can be avoided, the image speed of the camera during startup is improved, and the shooting experience of a user is improved.

Description

Camera starting method and device and electronic equipment
Technical Field
The present disclosure relates to the field of control technologies, and in particular, to a camera starting method and apparatus, and an electronic device.
Background
At present, most of intelligent electronic devices adopting an android (android) system are provided with a Camera shooting function, a Camera2 framework of the android system is taken as an example, a pipeline framework idea is used, and a process model of shooting images by a Camera is taken as a pipeline, namely: an operation request (input request) is issued in sequence and written into the register. After the camera starts to open the pipeline stream on, every time an operation request (input request) is received, a frame of image is shot and the image is output.
Under the architecture, since the camera cannot issue the request before starting stream on, each operation request (input request) needs to be validated after a delay time of two frames after being written into the register. Referring to fig. 1, a is the time when the camera starts stream on, the configuration data of the 1 st operation request in the register (register load) is loaded into the register, and since the configuration data needs to be not validated within two frames of time, the camera discards the first two frames of outgoing images, so that the camera outputs the third frame of image as the image corresponding to the 1 st operation request, that is, the 1 st operation request starts to validate at the third frame, thereby delaying by two frames.
Disclosure of Invention
The present disclosure provides a camera starting method and apparatus, and an electronic device, to solve the deficiencies of the related art.
According to a first aspect of the embodiments of the present disclosure, there is provided a camera starting method, the method including:
when the camera shooting function is triggered, the first N operation requests are simultaneously written into a register, so that the camera is started and then each operation request is sequentially validated;
and when the camera is started, sequentially acquiring images output by the camera and corresponding to the operation requests.
Optionally, when the image capturing function is triggered, writing the first N operation requests to the register at the same time includes:
when the camera shooting function is triggered, acquiring an operation request and a starting instruction sent by an application program, and starting a writing-in component;
initializing a camera, the initializing including loading default configuration data;
writing the operation request into a request queue;
based on the write-in component, simultaneously writing the configuration data of the first N operation requests in the request queue into a register to update the configuration data in the camera;
the write component is turned off.
Optionally, after acquiring the image corresponding to the first operation request output by the camera, the method further includes:
starting with the (N + 1) th operation request, only the configuration data of one operation request is written to the register at a time.
Optionally, N is a natural number greater than or equal to 2.
According to a second aspect of the embodiments of the present disclosure, there is provided a camera startup device, the device including:
the request writing module is used for simultaneously writing the first N operation requests into the register when the camera shooting function is triggered so as to enable the camera to take effect in each operation request in sequence after being started;
and the image output module is used for sequentially acquiring images output by the camera and corresponding to the operation requests after the camera is started.
Optionally, the request writing module includes:
the component starting unit is used for acquiring an operation request and a starting instruction sent by an application program when the camera shooting function is triggered, and starting the writing component;
an initialization unit for initializing the camera, the initialization including loading default configuration data;
a queue writing unit, configured to write the operation request into a request queue;
a request writing unit, configured to write configuration data of the first N operation requests in the request queue to a register at the same time based on the writing component, so as to update the configuration data in the camera;
and the component control unit is also used for closing the writing component.
Optionally, the apparatus further comprises:
and the request writing module is also used for writing the configuration data of only one operation request into the register at a time from the N +1 th operation request.
Optionally, N is a natural number greater than or equal to 2.
According to a third aspect of the embodiments of the present disclosure, there is provided an electronic apparatus including:
a camera;
a processor;
a memory for storing a computer program executable by the processor;
wherein the processor is configured to execute the computer program in the memory to implement the steps of the above-described method.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium, in which an executable computer program is provided, which when executed by a processor is capable of implementing the steps of the above-described method.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
it can be known from the foregoing embodiments that, in the embodiments of the present disclosure, when the image capturing function is triggered, the first N operation requests may be simultaneously written into the register, so that the camera is turned on, the configuration data of each operation request may be sequentially loaded into the camera, and the images corresponding to each operation request output by the camera are sequentially acquired. In the embodiment, the configuration data of the operation request is loaded to the camera before the camera is started, so that the configuration data can be directly validated, an effective image can be output after the camera is started, and delay is avoided; the first N operation requests can be written into the register through one-time writing operation before the camera is started, the (N + 1) th operation request and the operation requests after the operation request can be continuously written after the camera outputs the image corresponding to the first operation request, and the camera can be ensured to continuously output the images. Therefore, the embodiment can avoid the delay of N frames of the camera, improve the drawing speed of the camera when the camera is started, and is favorable for improving the shooting experience of a user.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a correspondence relationship of an operation request and a return image shown in the related art.
Fig. 2 is a flow chart illustrating a camera startup method according to an exemplary embodiment.
FIG. 3 is a schematic diagram illustrating a register data update path in accordance with an illustrative embodiment.
FIG. 4 is a flow diagram illustrating simultaneous writing of N operation requests in accordance with an exemplary embodiment.
FIG. 5 illustrates a correspondence of an operation request and a return image according to an exemplary embodiment.
Fig. 6 to 7 are block diagrams illustrating a camera booting apparatus according to an exemplary embodiment.
FIG. 8 is a block diagram illustrating an electronic device in accordance with an example embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The following exemplary described embodiments do not represent all embodiments consistent with the present disclosure. Rather, they are merely examples of devices consistent with certain aspects of the present disclosure as recited in the claims below.
In the related art, the configuration data of the operation request loaded to the camera at the time of the camera startup needs to be validated in the third place, so that a problem of two-frame delay occurs. In order to solve the above technical problem, an embodiment of the present disclosure provides a camera starting method, and fig. 2 is a flowchart illustrating a camera starting method according to an exemplary embodiment, which is suitable for an electronic device provided with a camera, where the electronic device may include a smartphone, a personal computer, or a server. Referring to fig. 2, a method for starting a camera includes steps 21 to 22:
in step 21, when the image capture function is triggered, the first N operation requests are simultaneously written into the register, so that the operation requests are validated sequentially after the camera is turned on.
In this embodiment, the electronic device may be provided with an application program of the camera, and the camera may be directly triggered at this time; alternatively, a third party application is provided and may call the camera function, i.e. indirectly trigger the camera. The user can turn on the camera function by triggering the camera application or a third party application. It is understood that turning on the camera function has substantially the same meaning as turning on the camera to take an image or take a video, with the difference that the term camera corresponds to a physical component and the term camera corresponds to an actual function.
When the user desires to turn on the camera function, an application program may be triggered (e.g., single click, double click, or shortcut key), and the application program may send a start instruction and an operation request, see fig. 3:
the application program sends a starting instruction to the camera, and the camera is powered on and initialized after the camera obtains the starting instruction. After the initialization is completed, the register in the camera currently stores default configuration data, which is stored at the time of the last shooting or randomly generated data.
After sending the start instruction, the application program starts to send an operation request to the camera, wherein the operation request comprises configuration data, such as control information of resolution, pixel format, sensor (sensor), lens, flash and the like; 3A (auto white balance, auto focus, auto exposure) mode of operation; RAW to YUV processing controls; and generation of statistical information, etc. In practical applications, the operation request may also carry a corresponding interface (surface, i.e., a pipeline stream in the Camera2 architecture) for receiving a returned image, so as to achieve the effect of controlling frame by frame.
It should be noted that the configuration data of the operation request may be set according to hardware parameters of the camera or the electronic device and actual requirements of the application program, and the corresponding solutions fall within the scope of the present disclosure.
Referring to fig. 4, an operation request sent by an application program reaches a fabric layer and a HAL layer of the android system. The HAL layer is provided with an operation request queue (i.e. a request queue), and an operation request is written into the operation request queue first. In practical application, a certain delay exists between the triggering of the camera shooting function and the starting of the camera, an application program between the triggering operation and the starting of the camera issues a plurality of operation requests, and the operation requests are all written into an operation request queue. Then, the HAL layer processes each operation request in sequence according to the first-in first-out principle, and configuration data in the operation request can be obtained. According to the principle that the image sensor outputs a frame of image and writes configuration data into the register once, after the image sensor outputs the image, the HAL layer can write the configuration data in the operation request into the register.
In the related art, after the camera is turned on (stream on), the first operation request is written into the register, which has the effect shown in path a in fig. 3, the configuration data loaded after the camera is turned on needs to be delayed by several frames (usually 2 frames) before being effective, and the timing for writing the operation request and returning the image result is shown in fig. 1. However, the next operation request is written into the register after the camera outputs an image of the operation request, and the previous 2 frames of images collected after the camera is turned on are discarded as invalid images, so that the application program cannot display the images. Therefore, in this embodiment, before the camera is turned on (stream on), the HAL layer writes the configuration data of the operation request into the register, and the effect is as shown in path B in fig. 3, so that the default configuration data of the initialization process can be overwritten. Thus, the configuration data loaded by the camera for the first time is the configuration data in the first operation request. In addition, in this embodiment, the configuration data of the N operation requests from triggering the image capturing function to turning on the camera may be simultaneously written into the register, that is, the configuration data of the N operation requests may be written into the register through one-time write operation, so that the camera may sequentially load the configuration data of each operation request and sequentially return the image corresponding to each operation request.
In this embodiment, N operation requests may be simultaneously written into the register in the following manner, and a writing component may be provided in the camera sensor, and the writing component may simultaneously write M sets of configuration parameters into the register and continuously take effect on the following M frames of images, where M is a positive integer. The present embodiment adopts the above-mentioned write module to write configuration data of N (N ═ M) operation requests simultaneously, including: upon detecting that the camera function is triggered, the electronic device may enable a preset write component. The write component may read the N operation requests from the operation request queue and write configuration data for the N operation requests to the register. Then, the write component is turned off.
In this embodiment, the writing module may be used in a manner of using the writing module for a predetermined number of times, for example, 1 time, and the writing module is activated when the image capturing function is triggered and is deactivated after the one-time operation request is written. Alternatively, the write module may be used in a time period to detect the 1 st operation request or detect that the trigger camera function is a starting time, and the ending time is earlier than or equal to the camera turn-on time, and the write module may be disabled after expiration of a set time period between the starting time and the ending time. In practical applications, it takes a certain time to write the operation request into the register, so the ending time needs to be earlier than the camera turning-on time, and the ending time may be set according to a specific scene, which is not limited herein.
It should be noted that, in practical applications, the manner of writing the configuration data of the N operation requests may also be adjusted according to a specific scenario, and in the case that simultaneous writing can be implemented, the corresponding scheme falls within the protection scope of the present disclosure.
In this embodiment, after the N operation requests are written into the register, the camera is convenient to directly use the configuration data to acquire and feed back images after being turned on, that is, the N operation requests may take effect in sequence to the first N frames of images output by the camera.
In step 22, after the camera is turned on, images corresponding to the operation requests output by the camera are sequentially acquired.
In this embodiment, with reference to fig. 3, after the camera is turned on, the camera may sequentially expose, collect and output an image according to the configuration data in the register, where the image is an image corresponding to the operation request. And the HAL layer loads the image to the operation request according to the scheme in the related technology and then returns the operation request to the application program APP. The application program APP obtains the image result in the operation request and displays the image result. The process of returning the image by the camera according to the configuration data and loading the image into the operation request by the HAL layer may refer to a scheme in the related art, and details are not described herein.
In an embodiment, since the configuration data of the N operation requests is written once, after the camera returns the image of the first operation request of the N operation requests, the second write operation may be performed, and at this time, the (N + 1) th operation request may be written into the register. It will be appreciated that during the loading of the (N + 1) th operation request into effect, the camera can still read the configuration data of the second and third … … nth operation requests of the previous N operation requests. Also, the (N + 1) th operation request and the operation requests following it may revert to the write operation request scheme in the existing Camera2 architecture, i.e., one operation request is written to the register every time a frame of image is returned. In this way, the continuity of all operation requests, or in other words, the continuity of loading configuration data by the camera and the continuity of return images can be ensured in the present embodiment.
To this end, in the embodiment of the present disclosure, when the image capturing function is triggered, the first N operation requests may be simultaneously written into N sets of registers, and the configuration data of the first operation request is loaded to the camera; then, after the camera is turned on, images corresponding to the operation requests output by the camera can be acquired in sequence. In the embodiment, the configuration data of the operation request is loaded to the camera before the camera is started, so that the configuration data can be directly validated, and an effective image can be output after the camera is started; the first N operation requests can be written into the register through one-time writing operation before the camera is started, the (N + 1) th operation request and the operation requests after the operation request can be continuously written after the camera outputs the image corresponding to the first operation request, and the camera can be ensured to continuously output the images. Therefore, the embodiment can avoid the delay of N frames of the camera, improve the drawing speed of the camera when the camera is started, and is favorable for improving the shooting experience of a user.
The steps of the above-described camera startup method are described below in connection with an electronic device provided with a delayed 2-frame camera, see fig. 4, including:
the electronic equipment can detect whether a sensor in the camera is provided with a writing component or not, and when the sensor is provided with the writing component, the electronic equipment jumps to 2. Or detecting whether the function of continuously writing 2 groups of configuration data is supported, and if the function exists, enabling the function and jumping to 2. In the absence of the above-described components or functions, the registers may be written in a manner under the existing Camera2 architecture.
And 2, after the camera receives a starting instruction, powering on and initializing.
And 3, detecting the arrived operation requests before the camera is turned on (namely, the camrea sensor stream on), wherein the arrived operation requests are temporarily stored in the operation request queue and comprise the first operation request and the second operation request. The configuration data of the first operation request and the second operation request are written to the register at the same time by using a writing component of the camera sensor to override the default configuration data written to the register at the initialization time in the step 2. At this time, the two sets of configuration data may be taken as default configuration data of the camera, and are respectively effective on the first frame image and the second frame image after the camera is turned on.
And 4, after the camera is started, returning a first frame image output by the camera sensor as a result of the first operation request, and returning a second frame image as a result of the second operation request. After the camera sensor outputs the first frame image, the configuration data of the third operation request can be updated, namely the configuration data of the third operation request is written into the register, and the configuration data is effective on the third frame image output by the camera sensor.
With continuing reference to FIG. 5, the operation requests in the registers are, in order: operation request 1, operation request 2, operation request 3, operation request 4, and operation request 5; after the camera is started, the returned results are as follows in sequence: image 1, image 2, image 3. Therefore, in the embodiment, under the condition of frame-by-frame control, each frame of image can be returned as a result of one operation request, so that the effect of displaying the image when the camera is started is achieved, and the image speed of the camera is improved.
On the basis of the above camera starting method, an embodiment of the present disclosure further provides a camera starting device, referring to fig. 6, including:
a request writing module 61, configured to write the first N operation requests into the register at the same time when the image capturing function is triggered, so that the camera turns on and then takes effect on each operation request in sequence;
and the image output module 62 is configured to, after the camera is turned on, sequentially acquire images output by the camera and corresponding to the operation requests.
In an embodiment, based on the method shown in fig. 6, referring to fig. 7, the request writing module 61 includes:
a component control unit 71, configured to, when the image capture function is triggered, acquire an operation request and a start instruction sent by an application program, and start a write component;
an initialization unit 72 for initializing the camera, the initialization including loading default configuration data;
a queue writing unit 73 for writing the operation request into a request queue;
a request writing unit 74, configured to write the configuration data of the first N operation requests in the request queue to a register at the same time based on the writing component, so as to update the configuration data in the camera;
a component control unit 71, further configured to turn off the write component.
In one embodiment, the apparatus further comprises:
and the request writing module is also used for writing the configuration data of only one operation request into the register at a time from the N +1 th operation request.
In one embodiment, N is a natural number greater than or equal to 2.
It can be understood that the apparatus provided in the embodiments of the present disclosure corresponds to the method described above, and specific contents may refer to the contents of each embodiment of the method, which are not described herein again.
FIG. 8 is a block diagram illustrating an electronic device in accordance with an example embodiment. For example, the electronic device 800 may be a smartphone, a computer, a digital broadcast terminal, a tablet device, a medical device, a fitness device, a personal digital assistant, and the like.
Referring to fig. 8, electronic device 800 may include one or more of the following components: processing component 802, memory 804, power component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor component 814, communication component 816, and image capture component 818.
The processing component 802 generally operates the entirety of the electronic device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute computer programs. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operations at the electronic device 800. Examples of such data include computer programs for any application or method operating on the electronic device 800, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power supply component 806 provides power to the various components of the electronic device 800. The power components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 800. The power supply module 806 may include a power chip, and the controller may communicate with the power chip to control the power chip to turn the switching device on or off to allow the battery to supply power to the motherboard circuitry or not.
The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the target object. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a target object. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the electronic device 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc.
The sensor assembly 814 includes one or more sensors for providing various aspects of state assessment for the electronic device 800. For example, the sensor assembly 814 may detect an open/closed state of the electronic device 800, the relative positioning of components, such as a display and keypad of the electronic device 800, the sensor assembly 814 may also detect a change in the position of the electronic device 800 or one of the components, the presence or absence of a target object in contact with the electronic device 800, orientation or acceleration/deceleration of the electronic device 800, and a change in the temperature of the electronic device 800.
The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 may access a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G, 5G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, communications component 816 further includes a Near Field Communications (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the electronic device 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors, or other electronic components.
In an exemplary embodiment, a non-transitory readable storage medium is also provided, such as the memory 804 including instructions, that includes an executable computer program that is executable by the processor. The readable storage medium may be, among others, ROM, Random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, and the like.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (10)

1. A camera startup method, characterized in that the method comprises:
when the camera shooting function is triggered, the first N operation requests are simultaneously written into a register, so that the camera is started and then each operation request is sequentially validated;
and when the camera is started, sequentially acquiring images corresponding to the operation requests output by the camera.
2. The method of claim 1, wherein writing the first N operation requests simultaneously to a register when the camera function is triggered comprises:
when the camera shooting function is triggered, acquiring an operation request and a starting instruction sent by an application program, and starting a writing-in component;
initializing a camera, the initializing including loading default configuration data;
writing the operation request into a request queue;
based on the write-in component, simultaneously writing the configuration data of the first N operation requests in the request queue into a register to update the configuration data in the camera;
the write component is turned off.
3. The method of claim 1, wherein after acquiring the image corresponding to the first operation request output by the camera, the method further comprises:
starting with the (N + 1) th operation request, only the configuration data of one operation request is written to the register at a time.
4. The method according to any one of claims 1 to 3, wherein N is a natural number of 2 or more.
5. A camera startup device, characterized in that the device comprises:
the request writing module is used for simultaneously writing the first N operation requests into the register when the camera shooting function is triggered so as to enable the camera to take effect in each operation request in sequence after being started;
and the image output module is used for sequentially acquiring images output by the camera and corresponding to the operation requests after the camera is started.
6. The apparatus of claim 5, wherein the request write module comprises:
the component control unit is used for acquiring an operation request and a starting instruction sent by an application program when the camera shooting function is triggered, and starting the writing component;
an initialization unit for initializing the camera, the initialization including loading default configuration data;
a queue writing unit, configured to write the operation request into a request queue;
a request writing unit, configured to write configuration data of the first N operation requests in the request queue to a register at the same time based on the writing component, so as to update the configuration data in the camera;
and the component control unit is also used for closing the writing component.
7. The apparatus of claim 5, further comprising:
and the request writing module is also used for writing the configuration data of only one operation request into the register at a time from the N +1 th operation request.
8. The apparatus according to any one of claims 5 to 7, wherein N is a natural number greater than or equal to 2.
9. An electronic device, comprising:
a camera;
a processor;
a memory for storing a computer program executable by the processor;
wherein the processor is configured to execute the computer program in the memory to implement the steps of the method according to any of claims 1-4.
10. A computer-readable storage medium, in which an executable computer program is stored which, when executed by a processor, is capable of carrying out the steps of the method according to any one of claims 1 to 4.
CN202010796736.XA 2020-08-10 2020-08-10 Camera starting method and device and electronic equipment Pending CN114064129A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010796736.XA CN114064129A (en) 2020-08-10 2020-08-10 Camera starting method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010796736.XA CN114064129A (en) 2020-08-10 2020-08-10 Camera starting method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN114064129A true CN114064129A (en) 2022-02-18

Family

ID=80233011

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010796736.XA Pending CN114064129A (en) 2020-08-10 2020-08-10 Camera starting method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN114064129A (en)

Similar Documents

Publication Publication Date Title
JP7506165B2 (en) Refresh rate switching method and electronic device
CN109600659B (en) Operation method, device and equipment for playing video and storage medium
CN106375604B (en) The method and apparatus of controlling terminal electricity
EP3188066B1 (en) A method and an apparatus for managing an application
CN105955765B (en) Application preloading method and device
CN111314768A (en) Screen projection method, screen projection device, electronic equipment and computer readable storage medium
CN106506448B (en) Live broadcast display method and device and terminal
EP3182716A1 (en) Method and device for video display
US10292004B2 (en) Method, device and medium for acquiring location information
CN107943347B (en) Touch screen control method and device
US11159703B2 (en) Shooting interface switching method and apparatus, and device and storage medium thereof
US20220159336A1 (en) Method and system for displaying screen
US10234924B2 (en) Method and apparatus for displaying time on mobile device
CN113032030A (en) Camera starting method and device, terminal equipment and storage medium
CN111031177A (en) Screen recording method, device and readable storage medium
CN108763104B (en) Method and device for pre-reading file page and storage medium
US11546749B2 (en) Method and device for communication processing, and storage medium
CN106792024B (en) Multimedia information sharing method and device
CN114727004A (en) Image acquisition method and device, electronic equipment and storage medium
US20190012299A1 (en) Displaying page
CN106547462B (en) Photographing control method and device and mobile terminal
CN109901886B (en) Page language switching method, system, device and computer readable storage medium
CN114064129A (en) Camera starting method and device and electronic equipment
CN114442789A (en) Dark screen control method, device, equipment and storage medium
US11681351B2 (en) Method and device for controlling screen, 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