CN111447370B - Camera access method, camera access device, terminal equipment and readable storage medium - Google Patents

Camera access method, camera access device, terminal equipment and readable storage medium Download PDF

Info

Publication number
CN111447370B
CN111447370B CN202010423175.9A CN202010423175A CN111447370B CN 111447370 B CN111447370 B CN 111447370B CN 202010423175 A CN202010423175 A CN 202010423175A CN 111447370 B CN111447370 B CN 111447370B
Authority
CN
China
Prior art keywords
camera
image
photographing
program
instruction
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
CN202010423175.9A
Other languages
Chinese (zh)
Other versions
CN111447370A (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202010423175.9A priority Critical patent/CN111447370B/en
Publication of CN111447370A publication Critical patent/CN111447370A/en
Application granted granted Critical
Publication of CN111447370B publication Critical patent/CN111447370B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/76Television signal recording
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/64Computer-aided capture of images, e.g. transfer from script file into camera, check of taken image quality, advice or proposal for image composition or decision on when to take image

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Studio Devices (AREA)

Abstract

The application provides a camera access method, an access device, terminal equipment and a readable storage medium. The camera access method comprises the following steps: if an instruction for starting a camera program is received, requesting a buffer pipeline BQ from a bottom layer frame, wherein the bottom layer frame is a program frame for accessing a camera, the BQ is used for caching an image acquired by a target camera, and the target camera is a camera to be accessed; displaying a preview picture based on the image acquired by the target camera cached by the BQ; and if a photographing instruction is received, acquiring the image obtained by photographing in the image cached in the BQ at the moment corresponding to the photographing instruction. The method and the device can reduce the blocking phenomenon of the terminal equipment caused by long-time use of the camera program for photographing to a certain extent.

Description

Camera access method, camera access device, terminal equipment and readable storage medium
Technical Field
The present application belongs to the field of camera technologies, and in particular, to a camera access method, an access apparatus, a terminal device, and a computer-readable storage medium.
Background
At present, users want to take pictures (for example, taking pictures of a concert hall) for a long time by using a camera-like program in a terminal device, however, in this case, the terminal device may have a serious pause phenomenon.
Disclosure of Invention
In view of this, embodiments of the present application provide a camera access method, an access apparatus, a terminal device, and a computer-readable storage medium. The method can reduce the phenomenon of terminal equipment blocking caused by long-time use of camera programs for photographing to a certain extent.
In a first aspect, an embodiment of the present application provides a camera access method, including:
if an instruction for starting a camera program is received, requesting a buffer pipeline BQ from a bottom layer frame, wherein the bottom layer frame is a program frame for accessing a camera, the BQ is used for caching an image acquired by a target camera, and the target camera is a camera to be accessed;
displaying a preview picture based on the image acquired by the target camera cached by the BQ;
and if a photographing instruction is received, acquiring the image obtained by photographing in the image cached in the BQ at the moment corresponding to the photographing instruction.
The application provides a camera access method in a first aspect. Firstly, when an instruction for starting a camera program is received, a Buffer Queue (BQ) is requested from a bottom layer frame, and the BQ is used for storing an image acquired by a target camera; then, a preview screen is displayed based on the image stored in the BQ, for example, the image stored in the BQ can be directly displayed as a preview screen, and when a photographing instruction is received, the image obtained by photographing is acquired based on the image cached in the BQ at the time corresponding to the photographing instruction. Therefore, in the scheme provided by the application, the photographed image is also derived from the BQ, so that the BQ is used for displaying the preview picture on one hand and for photographing on the other hand.
At present, after a conventional camera program is started, 2 BQs are requested from a bottom layer frame, and both the two BQs are used for receiving images acquired by a camera, but one of the BQs is used for displaying a preview picture, and the other BQ is used for taking a picture. According to the camera access method, after the camera program is started, only 1 BQ is requested from the bottom layer framework, the BQ is used for displaying the preview picture and photographing, and therefore compared with the prior art, the technical scheme provided by the application can reduce the storage space occupation amount of the camera program during photographing to a certain extent, and further alleviate the phenomenon of terminal equipment blocking caused by long-time use of the camera program for photographing to a certain extent.
In a second aspect, an embodiment of the present application provides a camera access apparatus, including:
the device comprises a cache pipeline request module, a cache pipeline request module and a cache pipeline processing module, wherein the cache pipeline request module is used for requesting a cache pipeline BQ to a bottom layer frame if an instruction for starting a camera program is received, the bottom layer frame is a program frame for accessing a camera, the BQ is used for caching an image acquired by a target camera, and the target camera is a camera to be accessed;
the preview display module is used for displaying a preview picture based on the image acquired by the target camera cached by the BQ;
and the photographing module is used for acquiring the image obtained by photographing at the image cached in the BQ at the moment corresponding to the photographing instruction if the photographing instruction is received.
In a third aspect, an embodiment of the present application provides a terminal device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the method according to the first aspect when executing the computer program.
In a fourth aspect, the present application provides a computer-readable storage medium, which stores a computer program, and the computer program implements the steps of the method according to the first aspect when executed by a processor.
In a fifth aspect, the present application provides a computer program product, which includes a computer program that, when executed by one or more processors, implements the steps of the method according to the first aspect.
It is understood that the beneficial effects of the second aspect to the fifth aspect can be seen from the description of the first aspect, and are not described herein again.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed 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 application.
FIG. 1 is a schematic structural view of an underlying framework provided herein;
fig. 2 is a schematic flow chart illustrating an implementation process of a camera access method according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a framework for camera access;
fig. 4 is a schematic structural diagram of a camera access device according to a second embodiment of the present application;
fig. 5 is a schematic structural diagram of a terminal device according to a third embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
The camera access method provided by the embodiment of the application is applicable to terminal equipment, and the terminal equipment includes but is not limited to: smart phones, tablet computers, notebooks, desktop computers, servers, and the like.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the present application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the specification of the present application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted "as" when used in a language such as "or" upon "or" in response to a determination or "in response to a detection," depending on the context. Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted, depending on the context, to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
In addition, in the description of the present application, the terms "first", "second", and the like are used only for distinguishing the description, and are not intended to indicate or imply relative importance.
In order to facilitate understanding of the present application by those skilled in the art, an underlying framework for accessing the camera is described below by taking an Android operating system as an example. As shown in fig. 1, a camera class program accesses a camera through an underlying framework 101, and the underlying framework 101 includes an application framework layer 102, a camera service layer 103, and a hardware abstraction layer 104.
As shown in fig. 1, the Application framework layer 102 provides Application Programming Interface (API) functions (Android ware camera2.0 camera device and Android ware camera2.0 camera manager) and a binding Binder Interface (Android ware camera2.0 icamera device and Android ware camera2.0 icamera service), so that the camera class program can access the camera by calling the API functions and then calling the Binder Interface.
In addition to the Binder interface provided by the application framework layer 102, the icaramdevicallbacks and icaramservicelistener in the camera service layer 103 are also Binder interfaces, wherein the Android hardware camera2.0 icaramdeviceuser in the application framework layer 102 is an interface of an opened specific camera device, and the Android hardware camera2.0 icaramservice is an interface of a camera service. The icamera devicecallbaccks and icamera servicelistener of the camera service layer 103 are callback interfaces to the Android hardware camera2.0 camera device and Android hardware camera2.0 camera manager, respectively, of the application framework 102.
In addition, the camera service Layer 103 provides other codes for interacting with the abstract Hardware Layer 104 (HAL), and is usually located under the Android operating system file frames/av/services/camera/libcararameservice/camera service. HAL104 defines the interface functions called by camera services layer 103, and is not described herein again because it is prior art.
The bottom layer frame shown in fig. 1 is only an illustration, the bottom layer frame described in the present application is not limited to the structure described in fig. 1, and other bottom layer frames capable of implementing camera call are also within the scope of the present application.
The technical solution described in the present application is described below by specific examples.
Example one
In the following, a camera access method provided in an embodiment of the present application is described, where the camera access method is executed by a camera program, please refer to fig. 2, and the method includes:
in step S201, if an instruction to start a camera program is received, requesting a bottom layer frame for a cache pipe BQ, where the bottom layer frame is a program frame for accessing a camera, the BQ is used for caching an image acquired by a target camera, and the target camera is a camera to be accessed;
in this embodiment of the application, the instruction for starting the camera class program may be considered to be received when the user starts the camera APP, or starts a "video call" function in the instant messaging application, or may also be received when starting a "camera" function in the online shopping platform, and a scene for receiving the instruction for starting the camera class program is not limited in this application.
When the terminal equipment receives the camera program starting instruction, a cache pipeline BQ is requested from the bottom layer framework, and the cache pipeline BQ is used for caching the image collected by the camera to be accessed. The underlying frame described in this step S201 may be as shown in fig. 1.
In the prior art, when a terminal device receives an instruction to start a camera-like program, two BQs are requested from a bottom layer frame, one BQ is used for displaying a preview picture, and the other BQ is used for acquiring a photographed image. Unlike the prior art, the present application only requests a BQ from the underlying frame, which is used for both the preview screen display and the captured image acquisition.
In step S202, displaying a preview image based on the image captured by the target camera cached by the BQ;
in the embodiment of the present application, the BQ requested in step S201 is used for displaying a preview screen. In this step S202, the image captured by the target camera cached in the BQ may be directly displayed as a preview screen; or the image processing (such as processing of adding a filter, beautifying a face, and/or adding a sticker) may be performed on the image acquired by the target camera cached by the BQ to obtain an image after the image processing, and then the image after the image processing is displayed as a preview image.
In step S203, if a photographing instruction is received, acquiring a photographed image from the image cached in the BQ at a time corresponding to the photographing instruction;
in the embodiment of the present application, the photographed image is also derived from the BQ requested in step S201. Compared with the prior art, the BQ occupying the storage space is reduced, and then the pause phenomenon of the terminal equipment when the terminal equipment takes a picture for a long time can be lightened to a certain extent.
In addition, in this embodiment of the application, the step S203 may specifically include: and taking the preview picture at the moment corresponding to the photographing instruction as a photographed image.
That is, after the photographing instruction is received, the preview picture at the current moment is directly used as the image obtained by photographing, and the problem that the camera program communicates with the bottom layer framework again after the photographing instruction is received is avoided, so that the size of the camera program can be reduced on one hand, the photographing efficiency can be improved to a certain extent on the other hand, the long time consumption for obtaining the image obtained by photographing is avoided, and on the other hand, the data processing amount of the terminal equipment can be reduced, and the power consumption of the terminal equipment is reduced.
In the prior art, when a photographing instruction is received, a camera program first sends the photographing instruction to a bottom layer framework, and then a BQ for photographing acquires an image acquired by a camera and takes the image as a photographed image. In the embodiment of the application, if the preview picture is directly taken as the photographed image, on one hand, the occupied amount of the storage space is reduced due to the fact that BQ special for photographing is avoided, on the other hand, the camera program and the bottom layer frame are prevented from communicating again during photographing, and the photographing efficiency is improved.
Further, the above-mentioned "photographing instruction corresponding timing" means: and the time which is less than the preset time length away from the time point of the photographing instruction sent by the user. For example, if the user sends the photographing instruction at the time a, and the preset time is 2ms, any time that is less than 2ms away from the time a may be the "photographing instruction corresponding time".
In the embodiment of the present application, if the photographed image is a preview screen, the Exchangeable image file format (exif) information of the photographed image is determined in a manner that: and analyzing the image parameter information of the preview image corresponding to the photographed image. For example, if the photographed image is an image X and the image X is a preview screen Y, the image parameter information (for example, information such as image size) of the preview screen Y may be analyzed to obtain exif information of the image X, and the exif information may be written in a header file of the image X.
Furthermore, after the step S203, the photographed image obtained in the step S203 may be subjected to image processing, such as size modification, filter addition, face beautification and/or sticker addition, to obtain a final photographed image.
In this embodiment of the present application, the camera program may have a video recording function, and the camera access method provided in this embodiment may further include: and if a video recording instruction is received, directly integrating all preview pictures in the video recording period to generate a video file. In addition, the camera program may also provide a photographing function during recording, and step S203 may specifically include: and if a photographing instruction is received during the video recording, acquiring the image obtained by photographing at the image cached in the BQ at the moment corresponding to the photographing instruction.
Therefore, according to the camera access method provided by the embodiment of the application, only one Buffer Queue (BQ) is requested from the bottom layer frame, and the BQ is used for displaying the preview picture on one hand and for taking a picture on the other hand.
In order to make the technical solutions provided in the present application more clearly understood, a schematic diagram of a framework structure for camera access is further described below based on fig. 3. As shown in fig. 3, the camera program realizes access to the camera by calling the underlying framework, wherein the camera program includes a parameter configuration module, a camera control module, a view display control module, a video component, a file saving module, and the like. The parameter configuration module is mainly used for configuring parameters such as the display frame rate of a preview picture, the video frame rate and the like; the camera control module is used for controlling parameters such as an identifier of a camera to be opened and an identifier of a camera to be closed; the view display control module is used for controlling display controls, hidden spaces and the like on a display interface; the file storage module is used for storing video files obtained by video recording and images obtained by photographing; the video recording component is used for integrating the preview images subjected to special effect processing to obtain a video file.
Further, as shown in fig. 3, the camera program realizes the display function of the preview screen, the video recording function, and the photographing function by one BQ. However, in the prior art, the photographing function often needs to call another BQ (such as the BQ shown in the gray part in fig. 3) to the bottom layer frame, and then after a series of image processing is performed on the image stored in the BQ (such as the processing 1 ', the processing 2', and the processing N 'shown in the gray part in fig. 3, where the processing 1' may be for beautifying the portrait, the processing 2 'may be for adding a sticker, and the processing N' may be for adding a filter), the photographed image is obtained.
Obviously, when the camera program shown in fig. 3 performs camera access, only one BQ is needed to simultaneously perform photographing, recording and previewing, so that the method occupies less storage space compared with the prior art, and therefore, the problem that the camera program is stuck for photographing for a long time can be solved to a certain extent. In addition, as shown in fig. 3, the photographed image is actually a preview image, so that the process that a conventional camera program needs to communicate with the bottom layer frame again is avoided, and the problem of photographing delay can be solved to a certain extent, so that the photographed image is obtained more quickly, the data processing amount of the terminal device is reduced, and the photographing power consumption of the terminal device is reduced.
Example two
As shown in fig. 4, for convenience of description, only a part related to the second embodiment of the present application is shown in a schematic structural diagram of a camera access device provided in the second embodiment of the present application, and the camera access device 400 includes:
the cache pipeline requesting module 401 is configured to request a cache pipeline BQ from a bottom layer frame if an instruction for starting a camera program is received, where the bottom layer frame is a program frame for accessing a camera, the BQ is used for caching an image acquired by a target camera, and the target camera is a camera to be accessed;
a preview display module 402, configured to perform preview image display based on the image acquired by the target camera cached by the BQ;
and the photographing module 403 is configured to, if a photographing instruction is received, obtain a photographed image from the image cached in the BQ at a time corresponding to the photographing instruction.
Optionally, the camera program has a video recording function;
accordingly, the camera access device 400 further includes:
and the preview integration module is used for integrating all preview pictures in the video recording period to generate a video file if a video recording instruction is received.
Optionally, the camera program has a photographing function during video recording;
accordingly, the photographing module 403 includes:
and the video recording and photographing unit is used for acquiring a photographed image in the BQ cache at the moment corresponding to the photographing instruction if the photographing instruction is received during the video recording.
Optionally, the camera access device 400 further includes:
and the final photographing module is used for carrying out image processing on the image obtained by photographing to obtain a final image obtained by photographing.
Optionally, the preview display module 402 includes:
and the image processing unit is used for carrying out image processing on the image collected by the target camera cached by the BQ to obtain an image after image processing, and displaying the image after image processing as a preview picture.
Optionally, the photographing module 403 is specifically configured to:
and taking the preview picture at the moment corresponding to the photographing instruction as a photographed image.
Optionally, the exchangeable image file format exif information of the photographed image is determined by: and analyzing the image parameter information of the preview image corresponding to the photographed image.
It should be noted that, for the information interaction, the execution process, and other contents between the above-mentioned apparatuses, since the same concept is used as the first embodiment of the method of the present application, specific functions and technical effects thereof can be found in the corresponding method embodiment section, and details are not described here.
EXAMPLE III
Fig. 5 is a schematic structural diagram of a terminal device according to a third embodiment of the present application. As shown in fig. 5, the terminal device 500 of this embodiment includes: a processor 501, a memory 502 and a computer program 503 stored in the memory 502 and executable on the processor 501. The processor 501 implements the steps of the first embodiment of the method when executing the computer program 503. Alternatively, the processor 601 implements the functions of the modules in the second embodiment of the apparatus when executing the computer program 503.
Illustratively, the computer program 503 may be divided into one or more modules, and the one or more modules are stored in the memory 502 and executed by the processor 501 to complete the present application. The one or more modules may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program 503 in the terminal device 500. For example, the computer program 503 may include a cache pipeline request module, a preview display module, and a photographing module, and the specific functions of each module are as follows:
if an instruction for starting a camera program is received, requesting a buffer pipeline BQ from a bottom layer frame, wherein the bottom layer frame is a program frame for accessing a camera, the BQ is used for caching an image acquired by a target camera, and the target camera is a camera to be accessed;
displaying a preview picture based on the image acquired by the target camera cached by the BQ;
and if a photographing instruction is received, acquiring the image obtained by photographing in the image cached in the BQ at the moment corresponding to the photographing instruction.
The terminal device may include, but is not limited to, a processor 501 and a memory 502. Those skilled in the art will appreciate that fig. 5 is merely an example of a terminal device 500 and is not intended to limit the terminal device 500 and may include more or less components than those shown, or some components may be combined, or different components, for example, the terminal device may also include input and output devices, network access devices, buses, etc.
The Processor 501 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The storage 502 may be an internal storage unit of the terminal device 500, such as a hard disk or a memory of the terminal device 500. The memory 502 may also be an external storage device of the terminal device 500, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the terminal device 500. Further, the memory 502 may include both an internal storage unit and an external storage device of the terminal device 500. The memory 502 is used for storing the computer program and other programs and data required by the terminal device. The memory 502 described above may also be used to temporarily store data that has been output or is to be output.
It will be clear to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional modules is merely illustrated, and in practical applications, the above function distribution may be performed by different functional modules according to needs, that is, the internal structure of the apparatus is divided into different functional modules to perform all or part of the above described functions. Each functional module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional modules are only used for distinguishing one functional module from another, and are not used for limiting the protection scope of the application. The specific working process of the modules in the apparatus may refer to the corresponding process in the foregoing method embodiment, and is not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative modules and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The integrated module may be stored in a computer-readable storage medium if it is implemented in the form of a software functional unit and sold or used as a separate product. Based on such understanding, all or part of the processes in the above method embodiments may be implemented by a computer program, which may be stored in a computer readable storage medium and executed by a processor, so as to implement the steps of the above method embodiments. The computer program includes computer program code, and the computer program code may be in a source code form, an object code form, an executable file or some intermediate form. The computer readable medium may include: any entity or device capable of carrying the above-mentioned computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signal, telecommunication signal, software distribution medium, etc. It should be noted that the computer readable medium described above may include content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media that does not include electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
The above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (8)

1. A camera access method, comprising:
if an instruction for starting a camera program is received, requesting a buffer pipeline BQ from a bottom layer frame, wherein the bottom layer frame is a program frame for accessing a camera, the BQ is used for caching an image acquired by a target camera, and the target camera is a camera to be accessed;
displaying a preview picture based on the image acquired by the target camera cached by the BQ;
if a photographing instruction is received, acquiring a photographed image from the image cached in the BQ at the moment corresponding to the photographing instruction; the time corresponding to the photographing instruction refers to the time which is less than the preset time length away from the time point of the photographing instruction sent by the user;
if the photographed image is a preview image, the determination method of the exchangeable image file format information of the photographed image is as follows: and analyzing the image parameter information of the preview image corresponding to the photographed image.
2. The camera access method of claim 1, wherein the camera-like program has a video recording function;
correspondingly, the camera access method further comprises the following steps:
and if a video recording instruction is received, integrating all preview pictures in the video recording period to generate a video file.
3. The camera access method of claim 2, wherein the camera type program has a photographing function during video recording;
correspondingly, if a photographing instruction is received, acquiring a photographed image from the image cached in the BQ at the moment corresponding to the photographing instruction, including:
and if a photographing instruction is received during the video recording, acquiring the image obtained by photographing at the image cached in the BQ at the moment corresponding to the photographing instruction.
4. The camera access method according to claim 1, wherein after the step of obtaining the image obtained by photographing from the image cached in the BQ at the time corresponding to the photographing instruction, the method further comprises:
and carrying out image processing on the image obtained by photographing to obtain a final image obtained by photographing.
5. The camera access method according to claim 1, wherein the performing a preview screen display based on the image captured by the target camera cached by the BQ includes:
processing the image collected by the target camera cached by the BQ to obtain an image after image processing;
and displaying the image after the image processing as a preview picture.
6. A camera access device, comprising:
the device comprises a cache pipeline request module, a cache pipeline request module and a cache pipeline processing module, wherein the cache pipeline request module is used for requesting a cache pipeline BQ to a bottom layer frame if an instruction for starting a camera program is received, the bottom layer frame is a program frame for accessing a camera, the BQ is used for caching an image acquired by a target camera, and the target camera is a camera to be accessed;
the preview display module is used for displaying a preview picture based on the image acquired by the target camera cached by the BQ;
the photographing module is used for acquiring a photographed image in the BQ cache at the moment corresponding to the photographing instruction if the photographing instruction is received; the time corresponding to the photographing instruction refers to the time which is less than the preset time length away from the time point of the photographing instruction sent by the user;
if the photographed image is a preview image, the determination method of the exchangeable image file format information of the photographed image is as follows: and analyzing the image parameter information of the preview image corresponding to the photographed image.
7. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the camera access method according to any of claims 1 to 5 when executing the computer program.
8. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the camera access method according to any one of claims 1 to 5.
CN202010423175.9A 2020-05-19 2020-05-19 Camera access method, camera access device, terminal equipment and readable storage medium Active CN111447370B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010423175.9A CN111447370B (en) 2020-05-19 2020-05-19 Camera access method, camera access device, terminal equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010423175.9A CN111447370B (en) 2020-05-19 2020-05-19 Camera access method, camera access device, terminal equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN111447370A CN111447370A (en) 2020-07-24
CN111447370B true CN111447370B (en) 2021-07-27

Family

ID=71653763

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010423175.9A Active CN111447370B (en) 2020-05-19 2020-05-19 Camera access method, camera access device, terminal equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN111447370B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112312023B (en) * 2020-10-30 2022-04-08 北京小米移动软件有限公司 Camera buffer queue allocation method and device, electronic equipment and storage medium
CN115967851A (en) * 2021-10-09 2023-04-14 华为技术有限公司 Quick photographing method, electronic device and computer readable storage medium
CN114584738A (en) * 2022-05-06 2022-06-03 深圳市飞图视讯有限公司 Camera sharing method and device, terminal equipment and storage medium
CN116055857B (en) * 2022-08-24 2023-11-24 荣耀终端有限公司 Photographing method and electronic equipment
CN117149294A (en) * 2023-02-27 2023-12-01 荣耀终端有限公司 Camera application configuration method, device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9838641B1 (en) * 2015-12-30 2017-12-05 Google Llc Low power framework for processing, compressing, and transmitting images at a mobile image capture device
CN107527317A (en) * 2017-07-18 2017-12-29 西安电子科技大学 Data transmission system based on image procossing
US10178310B1 (en) * 2015-08-20 2019-01-08 Ambarella, Inc. Data unit feed synchronization to multiple pipelines
CN109672884A (en) * 2017-10-13 2019-04-23 阿里巴巴集团控股有限公司 Graphics hardware code processing method and device
CN110881104A (en) * 2019-10-17 2020-03-13 宇龙计算机通信科技(深圳)有限公司 Photographing method, photographing device, storage medium and terminal

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101952684B1 (en) * 2012-08-16 2019-02-27 엘지전자 주식회사 Mobile terminal and controlling method therof, and recording medium thereof
US20140307116A1 (en) * 2013-04-12 2014-10-16 Nvidia Corporation Method and system for managing video recording and/or picture taking in a restricted environment
CN104580888B (en) * 2014-12-17 2018-09-04 广东欧珀移动通信有限公司 A kind of image processing method and terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10178310B1 (en) * 2015-08-20 2019-01-08 Ambarella, Inc. Data unit feed synchronization to multiple pipelines
US9838641B1 (en) * 2015-12-30 2017-12-05 Google Llc Low power framework for processing, compressing, and transmitting images at a mobile image capture device
CN107527317A (en) * 2017-07-18 2017-12-29 西安电子科技大学 Data transmission system based on image procossing
CN109672884A (en) * 2017-10-13 2019-04-23 阿里巴巴集团控股有限公司 Graphics hardware code processing method and device
CN110881104A (en) * 2019-10-17 2020-03-13 宇龙计算机通信科技(深圳)有限公司 Photographing method, photographing device, storage medium and terminal

Also Published As

Publication number Publication date
CN111447370A (en) 2020-07-24

Similar Documents

Publication Publication Date Title
CN111447370B (en) Camera access method, camera access device, terminal equipment and readable storage medium
WO2021031850A1 (en) Image processing method and apparatus, electronic device and storage medium
CN109068059B (en) Method for calling camera, mobile terminal and storage medium
CN109672884B (en) Image hardware coding processing method and device
CN108496198B (en) Image processing method and device
CN106453572B (en) Method and system based on Cloud Server synchronous images
CN110958399B (en) High dynamic range image HDR realization method and related product
CN113727035A (en) Image processing method, system, electronic device and storage medium
CN110955541B (en) Data processing method, device, chip, electronic equipment and readable storage medium
EP3926988A1 (en) Third-party access of end-user device assets
KR20230133970A (en) Photography methods, devices and electronics
CN114125284A (en) Image processing method, electronic device, and storage medium
CN111314606B (en) Photographing method and device, electronic equipment and storage medium
CN113837939A (en) Image processing method and device
CN115379105B (en) Video shooting method, device, electronic equipment and storage medium
US9076207B1 (en) Image processing method, system and electronic device
CN111259441B (en) Device control method, device, storage medium and electronic device
CN111294500B (en) Image shooting method, terminal device and medium
CN110049247B (en) Image optimization method and device, electronic equipment and readable storage medium
CN116962870A (en) Vehicle-mounted shooting data management method and device, electronic equipment and readable storage medium
CN113347450B (en) Method, device and system for sharing audio and video equipment by multiple applications
CN114697555B (en) Image processing method, device, equipment and storage medium
WO2022067491A1 (en) Image processing method, cloud end server, image processing apparatus, and storage medium
CN111447439B (en) Image coding method, image coding device and mobile terminal
CN113784075A (en) Screen video reading method and system and computing device

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