CN111294500A - Image shooting method, terminal device and medium - Google Patents

Image shooting method, terminal device and medium Download PDF

Info

Publication number
CN111294500A
CN111294500A CN201811492070.8A CN201811492070A CN111294500A CN 111294500 A CN111294500 A CN 111294500A CN 201811492070 A CN201811492070 A CN 201811492070A CN 111294500 A CN111294500 A CN 111294500A
Authority
CN
China
Prior art keywords
image
video recording
camera
data
image 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.)
Granted
Application number
CN201811492070.8A
Other languages
Chinese (zh)
Other versions
CN111294500B (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.)
Ubtech Robotics Corp
Original Assignee
Ubtech Robotics Corp
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 Ubtech Robotics Corp filed Critical Ubtech Robotics Corp
Priority to CN201811492070.8A priority Critical patent/CN111294500B/en
Publication of CN111294500A publication Critical patent/CN111294500A/en
Application granted granted Critical
Publication of CN111294500B publication Critical patent/CN111294500B/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
    • H04N23/62Control of parameters via user interfaces

Landscapes

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

Abstract

The invention is suitable for the technical field of mobile terminals, and provides an image shooting method, terminal equipment and a medium, wherein the method comprises the following steps: when a camera application program is started, loading a preset image control; creating an image preview request associated with the camera application program, and binding the image preview request with the image control; reading each frame of image data shot by a camera through an image preview request bound by an image control; and if a shooting instruction sent by a user is received, calling image data read in real time by the image control, and storing the currently called image data. The invention ensures that the image data shot by the camera in real time can be read by the image control when the camera application program is switched to the background operation, so that the user can still carry out the image shooting operation under the condition that the camera application program does not start the preview interface, and the user can simultaneously carry out other non-camera services, thereby improving the interaction capability of the terminal.

Description

Image shooting method, terminal device and medium
Technical Field
The invention belongs to the technical field of mobile terminals, and particularly relates to an image shooting method, terminal equipment and a computer readable storage medium.
Background
For a terminal device running an android system, when the terminal device performs camera shooting, a foreground visible preview interface is usually started in advance on a display, so that a user can determine and capture image data required by the user according to an image rendered in real time by the preview interface.
Specifically, when the camera application on the terminal device is started, the Activity component of the android system loads the display control TextureView and binds the display control with the preview request generated by the camera application. And when the user sends a shooting confirmation instruction, the image control ImageReader is created again to bind the image control ImageReader with the shooting request generated by the camera application program, so that the image control ImageReader can obtain and store image data of each frame of the camera.
However, when the preview interface moves to the background, the camera application is closed by the system, so that the user cannot continue to perform the image capturing operation, thereby reducing the interactive capability of the camera application.
Disclosure of Invention
In view of this, embodiments of the present invention provide an image capturing method, a terminal device, and a computer-readable storage medium, so as to solve the problem that a user cannot continue to perform an image capturing operation when a preview interface moves to a background operation in an existing capturing process.
A first aspect of an embodiment of the present invention provides an image capturing method, including:
when a camera application program is started, loading a preset image control;
creating an image preview request associated with a camera application program, and binding the image preview request with the image control;
reading each frame of image data shot by a camera through the image preview request bound by the image control;
and if a shooting instruction sent by a user is received, calling the image data read in real time by the image control, and storing the currently called image data.
A second aspect of an embodiment of the present invention provides an image capturing apparatus, including:
the first loading unit is used for loading a preset image control when the camera application program is started;
the binding unit is used for creating an image preview request associated with a camera application program and binding the image preview request with the image control;
the reading unit is used for reading each frame of image data shot by a camera through the image preview request bound by the image control;
and the calling unit is used for calling the image data read by the image control in real time and storing the currently called image data if a shooting instruction sent by a user is received.
A third aspect of the embodiments of the present invention provides a terminal device, including a memory and a processor, where the memory stores a computer program operable on the processor, and the processor implements the steps of the image capturing method as described above when executing the computer program.
A fourth aspect of the embodiments of the present invention provides a computer-readable storage medium storing a computer program, which when executed by a processor implements the steps of the image capturing method as described above.
In the embodiment of the invention, the image control is loaded when the camera application program is started, instead of loading the display control in the traditional mode, and the image preview request is bound with the image control, so that the image data shot by the camera in real time can be read by the image control when the camera application program is switched to the background operation, and a user can still carry out image shooting operation under the condition that the camera application program does not start a preview interface. In the background shooting process of the image, the user can simultaneously carry out other non-camera services, so that the interaction capability of the terminal is improved. On the other hand, when the image shooting event is started, because the preview interface is not started, the CPU resource consumption of the terminal is saved, and the system performance is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments or the prior art descriptions 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 it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
FIG. 1 is a flowchart of an implementation of an image capture method provided by an embodiment of the invention;
FIG. 2 is a flowchart illustrating an implementation of an image capture method according to another embodiment of the present invention;
fig. 3 is a flowchart illustrating a specific implementation of the image capturing method S104 according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating an implementation of an image capture method according to another embodiment of the present invention;
fig. 5 is a flowchart of a specific implementation of the image capturing method S101 according to an embodiment of the present invention;
fig. 6 is a block diagram of an image capturing apparatus according to an embodiment of the present invention;
fig. 7 is a schematic diagram of a terminal device according to an embodiment of the present invention.
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 invention. It will be apparent, however, to one skilled in the art that the present invention 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 invention with unnecessary detail.
In order to explain the technical means of the present invention, the following description will be given by way of specific examples.
Fig. 1 shows an implementation flow of an image capturing method provided in an embodiment of the present invention, where the method is suitable for a terminal device running a camera application program, including but not limited to various mobile terminals carrying a camera, such as a mobile phone, a tablet, and a laptop. The method flow includes steps S101 to S104. The specific realization principle of each step is as follows:
s101: when the camera application program is started, the preset image control is loaded.
In the embodiment of the invention, the camera application program is used for starting the camera of the terminal equipment and controlling the terminal equipment to execute shooting operation according to various preset camera parameters. And starting the camera application program when a selection instruction sent by a user to the camera application program is detected. At this time, a preset image control is loaded through the activity component. The image control may specifically be of the ImageReader class, which allows the camera application to directly access the image data of the presentation surface. Wherein the Imagereader is not provided with a View display interface.
S102: an image preview request associated with a camera application is created and bound with the image control.
And after the camera application program is started, acquiring various pre-stored camera parameters and starting a camera preset in the terminal equipment. The camera parameters include width pixels, height pixels, image format, and the number of images allowed to be read, and may be read from a default configuration file of the camera application program, or may be determined according to a setting instruction issued by a user, which is not limited herein.
In the embodiment of the invention, an image preview request is created based on a currently started camera application program, so that each frame of image data obtained by real-time shooting of a camera is acquired through the image preview request. And binding the loaded image control ImageReader with the image preview request.
The camera application program can run in the foreground of the terminal device and can also run in the background, and the camera application program can be determined according to a control instruction of a user.
Preferably, under the condition of loading the image control ImageReader, if the camera application program runs in the foreground of the terminal device, only the camera parameters related to the camera application program are displayed on the display interface of the terminal device, and the preview interface is not rendered.
S103: and reading each frame of image data shot by a camera through the image preview request bound by the image control.
And importing each frame of image data obtained by the image preview request into the image control ImageReader according to the image control ImageReader bound by the image preview request.
S104: and if a shooting instruction sent by a user is received, calling the image data read in real time by the image control, and storing the currently called image data.
In the embodiment of the invention, when a user wants to perform image shooting operation on a scene at any time, shooting keys provided by the terminal equipment in advance can be clicked, wherein the shooting keys comprise a physical key, a virtual key, a gesture key and the like. The shooting instruction comprises a shooting instruction and a video recording instruction. The photographing instruction is used for capturing one frame of image data, and the video recording instruction is used for starting the recording operation of continuous multi-frame image data. Different shooting keys are preset to correspond to different shooting instructions.
For example, if it is detected that the user presses the volume up key for a long time, it is determined that the user needs to photograph a scene at the current time, and at this time, the terminal device detects that a photographing instruction is obtained.
If a photographing instruction sent by a user is received, the camera application program can access or call a frame of image data stored by the image control ImageReader at the current moment based on the associated image control ImageReader. The image photographing function is realized by storing the frame of image data.
In the embodiment of the invention, the image control is loaded when the camera application program is started, instead of loading the display control in the traditional mode, and the image preview request is bound with the image control, so that the image data shot by the camera in real time can be read by the image control when the camera application program is switched to the background operation, and a user can still carry out image shooting operation under the condition that the camera application program does not start a preview interface. In the background shooting process of the image, the user can simultaneously carry out other non-camera services, so that the interaction capability of the terminal is improved. On the other hand, when the image shooting event is started, because the preview interface is not started, the CPU resource consumption of the terminal is saved, and the system performance is improved.
If a video recording instruction sent by a user is received, as another embodiment of the present invention, as shown in fig. 2, after the step S103, the method further includes:
s105: and if a video recording instruction sent by a user is received, a video recording container is created.
In the embodiment of the invention, for the shooting key corresponding to the preset video recording event, if the user selects the shooting key, the video recording instruction sent by the user is determined to be received. At this time, a video recording container MediaRecord is created for accessing video data captured by the camera application.
S106: and generating a video recording request associated with the camera application program, and controlling an interface layer of the video recording container to bind the video recording request so as to obtain image stream data shot by the camera through the interface layer of the video recording container.
S107: and storing the image stream data in the video recording container.
And creating a video recording request based on the currently started camera application program so as to acquire video data continuously shot by the camera through the video recording request. In the embodiment of the invention, the interface layer surface of the video recording container is bound with the video recording request, so that the video data obtained by the video recording request can be stored in the Mediarecord of the video recording container.
After receiving the video recording instruction, the camera application calls the video data read by the video recording container MediaRecord during the period before receiving the video recording stop instruction. The video recording function is realized by storing the continuously obtained video data.
As another embodiment of the present invention, when a video recording instruction sent by a user is received, fig. 3 shows a specific implementation flow of the image capturing method S104 provided by the embodiment of the present invention, which is detailed as follows:
s1041: and calling the image data read in real time by the image control.
S1042: and creating an audio recording container, and loading audio Pulse Code Modulation (PCM) data associated with the image data based on the audio recording container.
S1043: and after multiplexing operation processing is carried out on the image data and the audio PCM data, encoding is carried out on a processing result so as to output and obtain video data.
S1044: and saving the video data.
In the embodiment of the invention, if a video recording instruction sent by a user is received, an audio record container is created. Among them, the audio record container AudioRecord is used to collect audio Pulse Code Modulation (PCM) data associated with image data.
Reading multi-frame image data continuously loaded by the image control ImageReader from the current moment based on the image control ImageReader associated with the camera application program. Meanwhile, the audio PCM data corresponding to each frame of image data is acquired and obtained based on the audio record container, so that the image data and the audio data shot by the camera at any moment can be synchronously acquired after the video recording operation is started.
And for each frame of image data loaded in the image control ImageReader, reading audio pcm data corresponding to the frame of image data through an audio record container Audiorecord. And multiplexing mux operation is carried out on each frame of image data and audio pcm data corresponding to the frame of image data by using a preset video-audio multiplexer, and the multiplexed file is encoded to generate a video file. The file format of the generated video file is a predetermined format, including but not limited to flv, mp4, rmvb, avi, ts, and the like. And when a video recording stopping instruction sent by a user is received, storing the currently generated video file.
In the embodiment of the invention, the audio recording container is created, and the audio PCM data related to the image data can be loaded through the audio recording container, so that the multiplexing operation processing of the image data and the audio PCM data is realized, and the video data is indirectly obtained. In the process, all shooting operations related to the camera application program, including shooting operation and video recording shooting operation, can be completed only by creating one image control ImageRecord and one image preview request, and no additional display control, shooting request, video recording request and video recording container MediaRecord need to be created, so that the resource consumption of the terminal equipment is reduced, the whole shooting process can be realized in an android service, and the shooting performance of the terminal equipment is improved.
As still another embodiment of the present invention, fig. 4 shows an implementation flow of an image capturing method provided by an embodiment of the present invention. As shown in fig. 4, after S104, the method further includes:
s108: and when the image preview event is triggered, loading a preset display control.
The user can trigger an image preview event related to the camera application program by controlling a function key or a gesture key of a display interface of the terminal, so that the camera application program which runs in a background at the current moment is switched to a foreground to run, and image data obtained by real-time reading is displayed.
In the embodiment of the invention, when the image preview event is detected to be triggered, the preset display control TextureView is loaded through the activity component.
S109: and unbinding the image preview request and the image control, and rebinding the image preview request to the display control.
For the image preview request created in S102 described above, each frame of image data captured in real time by the camera is acquired by the image preview request. And after the binding relationship between the originally loaded image control ImageReader and the image preview request is released, the image preview request and the display control TextureView are bound again.
S110: and displaying each frame of image data shot by the camera on a terminal preview interface in real time through the display control.
And accessing each frame of image data shot by the camera by the display control TextureView through the image preview request, and displaying the image data on a terminal preview picture in real time.
In the embodiment of the invention, the camera application program also creates an image control ImageReader. At the same time, a photograph request associated with the camera application is generated. And binding the display control TextureView with the photographing request generated by the camera application program. When the user takes a picture, the image data displayed by the current display control TextureView can be collected, and the frame of image data is stored.
In the embodiment of the invention, when the image preview event is triggered, the display control TextureView is loaded, and the image control ImageReader originally bound with the image preview request is replaced by the display control TextureView, so that the image data shot by the camera can be displayed in a terminal display interface in real time, a user can view the preview picture in the camera application program running in the foreground, the flexible switching of camera shooting is realized, and the interactivity of the camera application program is improved.
Fig. 5 shows a specific implementation flow of the image capturing method S101 provided by the embodiment of the present invention, which is an embodiment of the present invention, and details are as follows:
s1011: when a camera application program is started, determining an image shooting mode selected by a user; the image shooting mode comprises a foreground shooting mode and a background shooting mode.
In the embodiment of the invention, when a selection instruction sent by a user to the camera application program is detected, the camera application program is started. At the moment, prompt information is sent out on a terminal display interface to prompt a user to select an image shooting mode at the moment. The image shooting mode includes a foreground shooting mode and a background shooting mode. The foreground shooting mode is used for indicating that the camera application program runs in the foreground of the terminal and keeping a visible interface of the foreground; the background shooting mode is used for indicating that the camera application program runs in the background of the terminal and is invisible in the foreground.
And determining an image shooting mode according to a selection instruction returned by the user to the prompt message.
S1012: and if the image shooting mode is the background shooting mode, loading a preset image control.
And if the image shooting mode is the background shooting mode, loading a preset image control.
And if the image shooting mode is the foreground shooting mode, loading a preset display control TextureView through the activity component, and finishing the image shooting operation according to the image data acquisition mode in the previous embodiment.
In the embodiment of the invention, under most conditions, when the user executes the image shooting operation, the user selects the preview interface to check to determine the image view mode, so that when the camera application program is started, the image shooting mode selected by the user is determined, the image control ImageReader is loaded only when the image shooting mode is detected to be the background shooting mode, and the image shooting is executed in a mode corresponding to the image control, so that the camera application program can accurately determine the shooting requirement of the user, thereby improving the user experience and the interaction capacity of the terminal.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
Fig. 6 shows a block diagram of an image capturing apparatus according to an embodiment of the present invention, which corresponds to an image capturing method according to an embodiment of the present invention. For convenience of explanation, only the portions related to the present embodiment are shown.
Referring to fig. 6, the apparatus includes:
the first loading unit 61 is configured to load a preset image control when the camera application is started.
A binding unit 62, configured to create an image preview request associated with the camera application, and bind the image preview request with the image control.
A reading unit 63, configured to read, through the image preview request bound to the image control, each frame of image data captured by the camera.
And the calling unit 64 is configured to call the image data read by the image control in real time and store the currently called image data if a shooting instruction sent by a user is received.
Optionally, if the shooting instruction includes a video recording instruction, the invoking unit 64 includes:
and the calling subunit is used for calling the image data read by the image control in real time.
And the creating subunit is used for creating an audio recording container and loading the audio Pulse Code Modulation (PCM) data related to the image data based on the audio recording container.
And the output subunit is used for performing multiplexing operation processing on the image data and the audio PCM data, and then performing coding on a processing result to output video data.
And the storage subunit is used for storing the video data.
Optionally, the image capturing apparatus further includes:
and the creating unit is used for creating a video recording container if a video recording instruction sent by a user is received.
And the generating unit is used for generating a video recording request associated with the camera application program and controlling an interface layer of the video recording container to bind the video recording request so as to obtain image stream data shot by the camera through the interface layer of the video recording container.
And the storage unit is used for storing the image stream data in the video recording container.
Optionally, the first loading unit 61 includes:
the determining subunit is used for determining the image shooting mode selected by the user when the camera application program is started; the image shooting mode comprises a foreground shooting mode and a background shooting mode.
And the loading subunit is used for loading a preset image control if the image shooting mode is a background shooting mode.
Optionally, the image capturing apparatus further includes:
and the second loading unit is used for loading the preset display control when the image preview event is triggered.
And the unbinding unit is used for unbinding the image preview request and the image control and rebinding the image preview request to the display control.
And the display unit is used for displaying each frame of image data shot by the camera on a terminal preview interface in real time through the display control.
In the embodiment of the invention, the image control is loaded when the camera application program is started, instead of loading the display control in the traditional mode, and the image preview request is bound with the image control, so that the image data shot by the camera in real time can be read by the image control when the camera application program is switched to the background operation, and a user can still carry out image shooting operation under the condition that the camera application program does not start a preview interface. In the background shooting process of the image, the user can simultaneously carry out other non-camera services, so that the interaction capability of the terminal is improved. On the other hand, when the image shooting event is started, because the preview interface is not started, the CPU resource consumption of the terminal is saved, and the system performance is improved.
Fig. 7 is a schematic diagram of a terminal device according to an embodiment of the present invention. As shown in fig. 7, the terminal device 7 of this embodiment includes: a processor 70, a memory 71 and a computer program 72, such as an image capturing program, stored in said memory 71 and executable on said processor 70. The processor 70, when executing the computer program 72, implements the steps in the various image capture method embodiments described above, such as steps 101 to 104 shown in fig. 1. Alternatively, the processor 70, when executing the computer program 72, implements the functions of the modules/units in the above-described device embodiments, such as the functions of the units 61 to 64 shown in fig. 6.
Illustratively, the computer program 72 may be partitioned into one or more modules/units that are stored in the memory 71 and executed by the processor 70 to implement the present invention. The one or more modules/units 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 72 in the terminal device 7.
The terminal device 7 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The terminal device may include, but is not limited to, a processor 70, a memory 71. It will be appreciated by those skilled in the art that fig. 7 is merely an example of a terminal device 7 and does not constitute a limitation of the terminal device 7 and may comprise more or less components than shown, or some components may be combined, or different components, for example the terminal device may further comprise input output devices, network access devices, buses, etc.
The Processor 70 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, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 71 may be an internal storage unit of the terminal device 7, such as a hard disk or a memory of the terminal device 7. The memory 71 may also be an external storage device of the terminal device 7, 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 7. Further, the memory 71 may also include both an internal storage unit and an external storage device of the terminal device 7. The memory 71 is used for storing the computer program and other programs and data required by the terminal device. The memory 71 may also be used to temporarily store data that has been output or is to be output.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
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; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (10)

1. An image capturing method, characterized by comprising:
when a camera application program is started, loading a preset image control;
creating an image preview request associated with a camera application program, and binding the image preview request with the image control;
reading each frame of image data shot by a camera through the image preview request bound by the image control;
and if a shooting instruction sent by a user is received, calling the image data read in real time by the image control, and storing the currently called image data.
2. The image capturing method according to claim 1, wherein the capturing instruction includes a video recording instruction, and accordingly, the invoking the image control reads the image data in real time, and stores the image data that is currently invoked, including:
calling the image data read by the image control in real time;
creating an audio recording container, and loading audio Pulse Code Modulation (PCM) data associated with the image data based on the audio recording container;
after multiplexing operation processing is carried out on the image data and the audio PCM data, coding is carried out on a processing result so as to output video data;
and saving the video data.
3. The image capturing method according to claim 1, further comprising:
if a video recording instruction sent by a user is received, a video recording container is created;
generating a video recording request associated with the camera application program, and controlling an interface layer of the video recording container to bind the video recording request so as to obtain image stream data shot by the camera through the interface layer of the video recording container;
and storing the image stream data in the video recording container.
4. The image capture method of claim 1, wherein loading the preset image control when the camera application is launched comprises:
when a camera application program is started, determining an image shooting mode selected by a user; the image shooting mode comprises a foreground shooting mode and a background shooting mode;
and if the image shooting mode is the background shooting mode, loading a preset image control.
5. The image capturing method according to claim 1, further comprising:
when an image preview event is triggered, loading a preset display control;
unbinding the image preview request and the image control, and rebinding the image preview request to the display control;
and displaying each frame of image data shot by the camera on a terminal preview interface in real time through the display control.
6. An image capturing apparatus, characterized by comprising:
the first loading unit is used for loading a preset image control when the camera application program is started;
the binding unit is used for creating an image preview request associated with a camera application program and binding the image preview request with the image control;
the reading unit is used for reading each frame of image data shot by a camera through the image preview request bound by the image control;
and the calling unit is used for calling the image data read by the image control in real time and storing the currently called image data if a shooting instruction sent by a user is received.
7. The image capturing apparatus according to claim 6, wherein the capturing instruction includes a video recording instruction, and the calling unit includes:
the calling subunit is used for calling the image data read by the image control in real time;
a creating subunit, configured to create an audio recording container, and load, based on the audio recording container, audio pulse code modulation PCM data associated with the image data;
the output subunit is used for performing multiplexing operation processing on the image data and the audio PCM data, and then performing coding on a processing result to output video data;
and the storage subunit is used for storing the video data.
8. The image capturing apparatus according to claim 6, further comprising:
the creating unit is used for creating a video recording container if a video recording instruction sent by a user is received;
the generating unit is used for generating a video recording request associated with the camera application program and controlling an interface layer of the video recording container to bind the video recording request so as to obtain image stream data shot by the camera through the interface layer of the video recording container;
and the storage unit is used for storing the image stream data in the video recording container.
9. A terminal device comprising a memory and a processor, the memory storing a computer program operable on the processor, wherein the processor implements the steps of the method according to any one of claims 1 to 5 when executing the computer program.
10. 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 method according to any one of claims 1 to 5.
CN201811492070.8A 2018-12-07 2018-12-07 Image shooting method, terminal device and medium Active CN111294500B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811492070.8A CN111294500B (en) 2018-12-07 2018-12-07 Image shooting method, terminal device and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811492070.8A CN111294500B (en) 2018-12-07 2018-12-07 Image shooting method, terminal device and medium

Publications (2)

Publication Number Publication Date
CN111294500A true CN111294500A (en) 2020-06-16
CN111294500B CN111294500B (en) 2021-12-17

Family

ID=71023711

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811492070.8A Active CN111294500B (en) 2018-12-07 2018-12-07 Image shooting method, terminal device and medium

Country Status (1)

Country Link
CN (1) CN111294500B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113438419A (en) * 2021-06-28 2021-09-24 展讯通信(天津)有限公司 Camera starting method and device and electronic equipment
WO2023005908A1 (en) * 2021-07-29 2023-02-02 维沃移动通信(杭州)有限公司 Photographing method and apparatus, device, and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103257939A (en) * 2013-04-02 2013-08-21 北京小米科技有限责任公司 Method, device and equipment for acquiring images
CN104052909A (en) * 2014-06-19 2014-09-17 深圳市中兴移动通信有限公司 Shooting method and device
US20150029381A1 (en) * 2013-07-29 2015-01-29 Samsung Electronics Co., Ltd. Electronic device and method of photographing image using the same
CN104994274A (en) * 2015-06-16 2015-10-21 惠州Tcl移动通信有限公司 Rapid photographing method based on mobile terminal and mobile terminal
CN105827942A (en) * 2015-09-24 2016-08-03 维沃移动通信有限公司 Rapid photographing method and electronic device
CN106161972A (en) * 2016-09-30 2016-11-23 深圳天珑无线科技有限公司 A kind of method and device of shooting

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103257939A (en) * 2013-04-02 2013-08-21 北京小米科技有限责任公司 Method, device and equipment for acquiring images
US20150029381A1 (en) * 2013-07-29 2015-01-29 Samsung Electronics Co., Ltd. Electronic device and method of photographing image using the same
CN104052909A (en) * 2014-06-19 2014-09-17 深圳市中兴移动通信有限公司 Shooting method and device
CN104994274A (en) * 2015-06-16 2015-10-21 惠州Tcl移动通信有限公司 Rapid photographing method based on mobile terminal and mobile terminal
CN105827942A (en) * 2015-09-24 2016-08-03 维沃移动通信有限公司 Rapid photographing method and electronic device
CN106161972A (en) * 2016-09-30 2016-11-23 深圳天珑无线科技有限公司 A kind of method and device of shooting

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113438419A (en) * 2021-06-28 2021-09-24 展讯通信(天津)有限公司 Camera starting method and device and electronic equipment
WO2023005908A1 (en) * 2021-07-29 2023-02-02 维沃移动通信(杭州)有限公司 Photographing method and apparatus, device, and storage medium

Also Published As

Publication number Publication date
CN111294500B (en) 2021-12-17

Similar Documents

Publication Publication Date Title
KR101245485B1 (en) Methods, computer program products and apparatus providing improved image capturing
CN112165632B (en) Video processing method, device and equipment
US20100231735A1 (en) Methods, Apparatuses, and Computer Program Products for Facilitating Concurrent Video Recording and Still Image Capture
CN109672884B (en) Image hardware coding processing method and device
CN111447370B (en) Camera access method, camera access device, terminal equipment and readable storage medium
CN111491097B (en) Shooting method and mobile device
CN113923391B (en) Method, apparatus and storage medium for video processing
US9064349B2 (en) Computer-implemented image composition method and apparatus using the same
CN110650247A (en) Method for customizing on/off animation, intelligent terminal and storage medium
CN111444909B (en) Image data acquisition method, terminal equipment and medium
CN111294500B (en) Image shooting method, terminal device and medium
CN110968391A (en) Screenshot method, screenshot device, terminal equipment and storage medium
CN112770059B (en) Photographing method and device and electronic equipment
KR20160064036A (en) Method and apparatus for memory optimization
US8120691B2 (en) Image capturing appatatus and method for use in a mobile terminal
CN112954212B (en) Video generation method, device and equipment
US11600300B2 (en) Method and device for generating dynamic image
US9076207B1 (en) Image processing method, system and electronic device
CN110990088B (en) Data processing method and related equipment
WO2018076710A1 (en) Method and device for smart photographing and storage medium
CN109862295B (en) GIF generation method, device, computer equipment and storage medium
CN113038218B (en) Video screenshot method, device, equipment and readable storage medium
US10313625B2 (en) Method, apparatus, and storage medium for video file processing
CN116028383B (en) Cache management method and electronic equipment
CN114064129A (en) Camera starting method and device and electronic equipment

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