CN111444909B - Image data acquisition method, terminal equipment and medium - Google Patents

Image data acquisition method, terminal equipment and medium Download PDF

Info

Publication number
CN111444909B
CN111444909B CN201811625542.2A CN201811625542A CN111444909B CN 111444909 B CN111444909 B CN 111444909B CN 201811625542 A CN201811625542 A CN 201811625542A CN 111444909 B CN111444909 B CN 111444909B
Authority
CN
China
Prior art keywords
image
image data
camera application
display control
object area
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
CN201811625542.2A
Other languages
Chinese (zh)
Other versions
CN111444909A (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 CN201811625542.2A priority Critical patent/CN111444909B/en
Publication of CN111444909A publication Critical patent/CN111444909A/en
Application granted granted Critical
Publication of CN111444909B publication Critical patent/CN111444909B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/10Image acquisition
    • G06V10/17Image acquisition using hand-held instruments
    • 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/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • 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)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The invention is applicable to the technical field of mobile terminals, and provides an image data acquisition method, terminal equipment and a medium, wherein the method comprises the following steps: when the camera application program is switched to background operation, creating an object area with the visibility lower than a first threshold value, and loading a display control in the object area; creating an image preview request associated with the camera application program, and binding the image preview request with the display control; displaying each frame of image data shot by the camera in the object area through displaying an image preview request bound by the control; if an image shooting instruction sent by a user is received, an image control and an image shooting request bound with the image control are created; and storing the image data called by the image control. The invention ensures that the user can control the application programs of other non-camera services on the foreground interface and can also use the image data acquisition function provided by the camera application program, thereby improving the interaction capability of the camera application program.

Description

Image data acquisition method, terminal equipment and medium
Technical Field
The present invention relates to the field of mobile terminals, and in particular, to a method for acquiring image data, a terminal device, and a computer readable storage medium.
Background
In a terminal device running an android system, if a user wants to collect external image data, a camera application program is usually started first to generate a foreground visible preview interface on a terminal display screen. By viewing the image rendered in real time by the preview interface, the user can send out a shooting confirmation instruction, so that the image data required by the user can be acquired.
However, during the image capturing process, if the user wants to control other applications in the terminal device, he can only temporarily move the camera application to the background operation. At this time, the android system temporarily closes the camera application program, so that the user cannot simultaneously perform the image data acquisition operation, and therefore, the interaction capability of the camera application program is reduced.
Disclosure of Invention
In view of the above, the embodiments of the present invention provide a method, a terminal device, and a computer readable storage medium for acquiring image data, so as to solve the problem that in the existing image data acquisition mode, the interaction capability of a camera application program is low.
A first aspect of an embodiment of the present invention provides a method for acquiring image data, including:
when the camera application program is switched to background operation, creating an object area with the visibility lower than a first threshold value, and loading a display control in the object area;
creating an image preview request associated with the camera application program, and binding the image preview request with the display control;
displaying each frame of image data shot by a camera in the object area through the image preview request bound by the display control;
if an image shooting instruction sent by a user is received, an image control and an image shooting request bound with the image control are created; the image control is used for calling the image data read by the display control in real time according to the detected image shooting request;
and storing the image data called by the image control.
A second aspect of an embodiment of the present invention provides an image data acquisition apparatus, including:
the first creating unit is used for creating an object area with the visibility lower than a first threshold value when the camera application program is switched to background operation, and loading a display control in the object area;
a second creating unit, configured to create an image preview request associated with the camera application program, and bind the image preview request with the display control;
the display unit is used for displaying each frame of image data shot by the camera in the object area through the image preview request bound by the display control;
the third creating unit is used for creating an image control and a bound image shooting request if an image shooting instruction sent by a user is received; the image control is used for calling the image data read by the display control in real time according to the detected image shooting request;
and the storage unit is used for storing the image data called by the image control.
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 executable on the processor, and the processor implements the steps of the image data acquisition 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, the processor implementing the steps of the image data acquisition method as described above when executing the computer program.
In the embodiment of the invention, when the camera application program is switched to the background operation, the object area with the visibility lower than the first threshold value is created, the display control is loaded in the object area, and the image data of each frame shot by the camera is displayed in the object area through the image preview request bound by the display control, so that the visibility of the image data of each frame is lower than the first threshold value, and the fact that the preview picture of the camera application program can still operate in the object area of the foreground under the condition that the preview picture is invisible to naked eyes is realized, therefore, the android system is prevented from automatically closing the camera application program, and the user can use the image data acquisition function provided by the camera application program while the foreground interface is also ensured to operate other application programs of non-camera services, so that the interaction capability of the camera application program is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of an implementation of an image data acquisition method provided by an embodiment of the present invention;
FIG. 2 is a flowchart of an implementation of a method for acquiring image data according to another embodiment of the present invention;
fig. 3 is a flowchart of a specific implementation of an image data acquisition method S101 according to an embodiment of the present invention;
fig. 4 is a flowchart of a specific implementation of an image data acquisition method S101 according to another embodiment of the present invention;
fig. 5 is a flowchart of a specific implementation of an image data acquisition method S101 according to still another embodiment of the present invention;
fig. 6 is a block diagram of an image data acquisition device 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 the particular system architecture, techniques, etc., in order to provide a thorough understanding of the embodiments of the present 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 illustrate the technical scheme of the invention, the following description is made by specific examples.
Fig. 1 shows an implementation flow of an image data acquisition method provided by an embodiment of the present invention, where the method is applicable to a terminal device running a camera application, including, but not limited to, a mobile phone, a tablet, and various mobile terminals carrying a camera such as a laptop. The above-described method flow includes steps S101 to S105. The specific implementation principle of each step is as follows:
s101: when the camera application is switched to background operation, an object region with visibility lower than a first threshold is created, and a display control is loaded in the object region.
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 when detecting a selection instruction sent by a user to the camera application program, starting the camera application program. At this point, the camera application is running on the foreground interface. If it is detected that the user temporarily exits the camera application or enters another application in response to an interrupt event, the camera application will switch to background operation.
For example, if the mobile terminal receives an incoming call request during the running of the camera application, the camera application will switch to background running during the incoming call answering process, and the foreground running program of the mobile terminal is the phone call program.
In the embodiment of the invention, when the camera application program is switched to the background operation, an object area with the visibility lower than the first threshold value is created. Loading a preset display control through the activity component, and displaying the display control in the object area. The display control may specifically be a control with a View display interface, such as TextureView, surfaceView and surface texture, which is used for acquiring image data of each frame shot by the camera, and performing real-time preview display on the image data. The length and width values of the display control are the same as those of the object area, so that the display control is filled into the object area.
The visibility of the object area is used to measure the clear view of the content contained in the object area by the naked human eye. The visibility of the object area may be determined according to the transparency and/or size value of the object area. The first threshold is a minimum visibility value when the human eyes can clearly watch the object area, and the minimum visibility value is determined according to a test experience value recorded by a developer.
S102: creating an image preview request associated with the camera application program, and binding the image preview request with the display control.
S103: and displaying each frame of image data shot by the camera in the object area through the image preview request bound by the display control.
When the camera application program runs (including foreground running and background running), each prestored camera parameter is acquired and a camera preset in the terminal equipment is started. The camera parameters, including the width pixels, height pixels, image format, and number of images allowed to be read, may be read from a default configuration file of the camera application, or may be determined according to a setting instruction issued by a user, which is not limited herein.
Based on the currently started camera application program, an image preview request is created to acquire each frame of image data shot by the camera in real time through the image preview request. Binding the loaded display control with the image preview request. And importing each frame of image data obtained by the image preview request into the display control according to the display control bound by the image preview request.
In the embodiment of the invention, when the display control exists in the object area and the visibility of the object area is lower than the first threshold, the preview interface related to the image data is only rendered in the display control on the display interface of the terminal equipment. At this time, the visibility of the preview interface is also lower than the first threshold. Thus, it is not possible for the end user to view the preview interface in the end interface.
S104: if an image shooting instruction sent by a user is received, an image control and an image shooting request bound with the image control are created; and the image control is used for calling the image data read by the display control in real time according to the detected image shooting request.
S105: and storing the image data called by the image control.
In the embodiment of the invention, when a user wants to perform image capturing operation on a scene at any moment, shooting keys provided in advance by the terminal equipment can be clicked, wherein the shooting keys comprise a physical key, a virtual key, a gesture key and the like. The image shooting instructions comprise shooting instructions and video recording instructions. The shooting instruction is used for capturing one frame of image data, and the video recording instruction is used for starting recording operation on 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 key for a long time, it is determined that the user needs to take a picture of the scene at the current moment, and at this time, the terminal device will detect and obtain a shooting instruction.
If a photographing instruction sent by a user is received, an image control ImageReader is created and bound with an image photographing request. At the current time, the camera application invokes a frame of image data in the display control based on its associated image control ImageReader. And storing the frame of image data to realize an image photographing function.
In the embodiment of the invention, when the camera application program is switched to the background operation, the object area with the visibility lower than the first threshold value is created, the display control is loaded in the object area, and the image data of each frame shot by the camera is displayed in the object area through the image preview request bound by the display control, so that the visibility of the image data of each frame is lower than the first threshold value, and the fact that the preview picture of the camera application program can still operate in the object area of the foreground under the condition that the preview picture is invisible to naked eyes is realized, therefore, the android system is prevented from automatically closing the camera application program, and the user can use the image data acquisition function provided by the camera application program while the foreground interface is also ensured to operate other application programs of non-camera services, so that the interaction capability of the camera application program is improved.
If a video recording instruction sent by the user is received, as another embodiment of the present invention, as shown in fig. 2, after S105, the method further includes:
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 acquire 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.
In the embodiment of the invention, for the shooting key corresponding to the video recording event preset, if the user selects the shooting key, the video recording instruction sent by the user is determined to be received. At this point, a video recording container MediaRecord, mediaRecord is created for accessing video data collected by the camera application.
Based on the currently started camera application program, a video recording request is created to acquire video data continuously shot by a 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 acquired by the video recording request can be stored in the video recording container MediaRecord.
After receiving the video recording instruction, the camera application program calls video data read by the video recording container MediaRecord in the period of time before receiving the video recording stop instruction. The video recording function is realized by storing the video data which are continuously obtained.
The embodiment of the invention ensures that the user can execute the image photographing and can use the video data recording function provided by the camera application program when the foreground interface controls the application programs of other non-camera services, thereby improving the interaction capability of the camera application program.
As an embodiment of the present invention, fig. 3 shows a specific implementation flow of the image data acquisition method S101 provided in the embodiment of the present invention, which is described in detail below:
s1011: when the camera application switches to background operation, a dialog box containing display controls is created.
S1012: and setting the length of the dialog box to be smaller than a second threshold value and the width of the dialog box to be smaller than a third threshold value respectively so that the visibility of the dialog box is lower than the first threshold value.
When the camera application is switched to run in the background, a dialog box is created on the terminal display interface, and the dialog box is used as the object area in the above embodiment. Dialog boxes include, but are not limited to, dialog controls pre-established by the android system, dialog controls customized by the developer, and the like. The display control associated with the camera application is filled in the dialog box, and the length and width of the display control are controlled to be respectively the same as the length and width of the dialog box.
In the embodiment of the invention, the length and width of the dialog box are adjusted, including: the length of the dialog box is set to be smaller than the second threshold value, and the width of the dialog box is set to be smaller than the third threshold value, so that the area occupied by the dialog box in the terminal display screen is smaller than the preset threshold value, and the display control in the dialog box can not be seen by human eyes, and therefore the dialog box can be guaranteed to have lower visibility.
The maximum length and maximum width of the dialog box are the second and third thresholds, respectively, under the precondition that the dialog box cannot be seen by the naked human eye. The second threshold and the third threshold may be determined based on empirical values of the developer during development testing. For example, the second and third thresholds may be 1px.
Preferably, as another embodiment of the present invention, as shown in fig. 4, after S1012, the method further includes:
s1013: when an image preview event is triggered, the initial size parameters of the dialog box are obtained.
S1014: the length and the width of the dialog box are respectively adjusted to the initial size parameters so that the visibility of the dialog box is greater than the first threshold.
The user can trigger an image preview event related to the camera application program by controlling a function key or a gesture key of the display interface of the terminal so as to restore the invisible image preview interface of the foreground at the current moment to a state visible to the naked eye of the user, and then display the image data read in real time in the display control.
In particular, for the above-mentioned example, if the mobile terminal receives an incoming call request during the operation of the camera application, the camera application will temporarily switch to background operation during the incoming call answering process, in addition to the user actively triggering the image preview event; when the call answering is finished, the camera application program automatically triggers an image preview event.
In the embodiment of the present invention, when the image preview event is triggered, the initial size parameter of the dialog box generated in the step S1011 is obtained, where the initial size parameter includes the initial value of the width and the initial value of the length of the dialog box. In the display interface of the terminal device, the length of the dialog box at the current moment is restored to the initial value of the length, and the width of the dialog box is restored to the initial value of the width of the dialog box, so that the visibility of the dialog box is larger than a first threshold value.
The initial size parameter may be a factory size parameter default by the terminal device or a size parameter preset by a developer, where the size parameter is provided in a state that the dialog box is viewable by naked eyes of a human.
Preferably, the initial size parameter of the dialog box is the same as the size parameter of the display interface of the terminal device, so that when a user can view the display control in the dialog box by naked eyes, the image preview data can be displayed in the display control in an image maximizing mode, thereby improving the shooting experience of the user and the visual effect of the image preview picture.
In the embodiment of the invention, because the dialogs control is a common system control, when the camera application program is switched to background operation, the creation of the object area with the visibility lower than the first threshold is realized by creating the Dialog box containing the display control and setting the length of the Dialog box smaller than the second threshold and the width of the Dialog box smaller than the third threshold respectively, so that the reliability of the acquisition method of the image data provided by the invention is enhanced and the realization difficulty is reduced; under the condition that a user has an image preview requirement, the length and the width of the dialog box are adjusted to initial size parameters by triggering an image preview event, so that the hidden image preview interface can be quickly restored, the flexible switching of the image preview interface is realized, and the interaction capability of a camera application program is improved.
As a further embodiment of the present invention, the manner of creation of the object region is further defined. Specifically, fig. 5 shows a specific implementation flow of the image data acquisition method S101 provided by the embodiment of the present invention, which is described in detail below:
s1015: when the camera application program is switched to the background operation, the display mode of the terminal screen is switched from the single-screen display mode to the multi-screen display mode, and a plurality of object areas are obtained.
The display mode of the terminal screen includes a single screen display mode and a multi-screen display mode. In the multi-screen display mode, the terminal display interface generates a dividing bar to divide the terminal display interface into two or more object regions.
In the embodiment of the invention, the image originally displayed on the full screen of the terminal display interface is reduced, and the sub-image obtained after the reduction is displayed on each object area in a full screen. For example, if the terminal display interface in the single-screen display mode is used for displaying the address book page, after the display mode of the terminal screen is switched from the single-screen display mode to the multi-screen display mode, the address book page is reduced and displayed in a plurality of object areas of the terminal display interface.
The area size of each object area is adjusted by detecting a moving instruction sent by a user through the dividing strip. In each object region, by detecting a manipulation instruction issued by a user, a response operation corresponding to the manipulation instruction is performed in the object region.
In the embodiment of the invention, if the camera application program running in the foreground is detected under the single-screen display mode, when the camera application program is switched to the background running, the display mode of the automatic control terminal screen is switched from the single-screen display mode to the multi-screen display mode so as to obtain a plurality of object areas.
S1016: and setting the area ratio of any object area to be smaller than a first threshold value, and loading a display control in the object area.
In the embodiment of the invention, the area ratio of the object area represents the ratio of the area of the object area to the area of the terminal display interface. Any one object region is selected from the plurality of object regions obtained in S1015. And changing the area occupation ratio of the object area through the position of the separation bar in the display interface of the mobile terminal, and enabling the area occupation ratio of the object area to be smaller than a first threshold value. And loading a display control associated with the camera application program in the object area with the area ratio smaller than the first threshold value.
The first threshold is the maximum area ratio when the human eyes cannot watch the object area. For example, the area ratio of the target region is made smaller than 0.001%.
In the embodiment of the invention, when the camera application program is switched to the background operation, the display mode of the terminal screen is switched from the single-screen display mode to the multi-screen display mode, a plurality of object areas are obtained, and after the area ratio of any object area is set to be smaller than the first threshold value, the display control is loaded in the object area, so that the area ratio of the display control is ensured to be smaller than the first threshold value, the operation of the non-camera application program is not blocked by the existence of the display control in the process of using other non-camera application programs by a user, and the acquisition work of image data can be executed by controlling the camera application program through various gesture instructions under the condition of no visible preview interface by the user, thereby improving the interaction capability of the camera application program.
Fig. 6 shows a block diagram of an image data acquisition device according to an embodiment of the present invention, corresponding to an image data acquisition 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 creating unit 61 is configured to create an object area with a visibility lower than a first threshold when the camera application program is switched to the background operation, and load a display control in the object area.
A second creating unit 62 is configured to create an image preview request associated with the camera application program, and bind the image preview request with the display control.
And the display unit 63 is configured to display, in the object area, each frame of image data captured by the camera according to the image preview request bound by the display control.
A third creating unit 64, configured to create an image control and an image capturing request bound thereto if an image capturing instruction sent by a user is received; and the image control is used for calling the image data read by the display control in real time according to the detected image shooting request.
And the first storage unit 65 is used for storing the image data called by the image control.
Optionally, the first creating unit 61 includes:
and the creation subunit is used for creating a dialog box containing a display control when the camera application program is switched to the background operation.
And the first setting subunit is used for setting the length of the dialog box to be smaller than the second threshold value and setting the width of the dialog box to be smaller than the third threshold value respectively so that the visibility of the dialog box is lower than the first threshold value.
Optionally, the first creating unit 61 includes:
and the switching subunit is used for switching the display mode of the terminal screen from the single-screen display mode to the multi-screen display mode when the camera application program is switched to the background operation, so as to obtain a plurality of object areas.
And the second setting subunit is used for setting the area ratio of any object area to be smaller than a first threshold value and loading display controls in the object area.
Optionally, the first creating unit 61 further includes:
and the acquisition subunit is used for acquiring the initial size parameters of the dialog box when the image preview event is triggered.
And the adjusting subunit is used for respectively adjusting the length and the width of the dialog box to the initial size parameters so that the visibility of the dialog box is larger than the first threshold value.
Optionally, the image data acquisition device further includes:
and the fourth creating unit is used for creating a video recording container if receiving a video recording instruction sent by the user.
The control 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 acquire image stream data shot by the camera through the interface layer of the video recording container.
And the second storage unit is used for storing the image stream data in the video recording container.
In the embodiment of the invention, when the camera application program is switched to the background operation, the object area with the visibility lower than the first threshold value is created, the display control is loaded in the object area, and the image data of each frame shot by the camera is displayed in the object area through the image preview request bound by the display control, so that the visibility of the image data of each frame is lower than the first threshold value, and the fact that the preview picture of the camera application program can still operate in the object area of the foreground under the condition that the preview picture is invisible to naked eyes is realized, therefore, the android system is prevented from automatically closing the camera application program, and the user can use the image data acquisition function provided by the camera application program while the foreground interface is also ensured to operate other application programs of non-camera services, so that the interaction capability of the camera application program 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 the memory 71 and executable on the processor 70. The processor 70, when executing the computer program 72, implements the steps of the above-described respective image data acquisition method embodiments, such as steps 101 to 105 shown in fig. 1. Alternatively, the processor 70, when executing the computer program 72, performs the functions of the modules/units of the apparatus embodiments described above, such as the functions of the units 61-65 shown in fig. 6.
By way of example, 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 complete the present invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions for describing the execution of the computer program 72 in the terminal device 7.
The terminal device 7 may be a computing device such as a desktop computer, a notebook computer, a palm computer, a cloud server, etc. 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 the terminal device 7 and does not constitute a limitation of the terminal device 7, and may include more or less components than illustrated, or may combine certain components, or different components, e.g., the terminal device may further include an input-output device, a network access device, a bus, etc.
The processor 70 may be a central processing unit (Central Processing Unit, CPU), or may be another general purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), an off-the-shelf programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like. 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 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) or 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 as well as other programs and data required by the terminal device. The memory 71 may also be used for temporarily storing data that has been output or is to be output.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The above embodiments are merely for illustrating the technical solution 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 scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the corresponding technical solutions.

Claims (10)

1. A method of acquiring image data, comprising:
when the camera application program is switched to background operation, creating an object area with the visibility lower than a first threshold value, and loading a display control in the object area; the first threshold is a minimum visibility value when the human naked eyes can clearly watch the object area;
creating an image preview request associated with the camera application program, and binding the image preview request with the display control;
displaying each frame of image data shot by a camera in the object area through the image preview request bound by the display control;
if an image shooting instruction sent by a user is received, an image control and an image shooting request bound with the image control are created; the image control is used for calling the image data read by the display control in real time according to the detected image shooting request;
and storing the image data called by the image control.
2. The method for capturing image data according to claim 1, wherein creating an object region having a visibility lower than a first threshold when the camera application is switched to a background operation, and loading a display control in the object region, comprises:
when the camera application program is switched to background operation, creating a dialog box containing a display control;
and setting the length of the dialog box to be smaller than a second threshold value and the width of the dialog box to be smaller than a third threshold value respectively so that the visibility of the dialog box is lower than the first threshold value.
3. The method for capturing image data according to claim 1, wherein creating an object region having a visibility lower than a first threshold when the camera application is switched to a background operation, and loading a display control in the object region, comprises:
when the camera application program is switched to background operation, the display mode of the terminal screen is switched from a single-screen display mode to a multi-screen display mode, and a plurality of object areas are obtained;
and setting the area occupied ratio of any object area to be smaller than a fourth threshold value, and loading a display control in the object area.
4. The image data acquisition method according to claim 2, further comprising, after the setting of the length of the dialog box to be smaller than a second threshold value and the setting of the width of the dialog box to be smaller than a third threshold value, respectively:
when an image preview event is triggered, acquiring initial size parameters of the dialog box;
the length and the width of the dialog box are respectively adjusted to the initial size parameters so that the visibility of the dialog box is greater than the first threshold.
5. The method for acquiring image data 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 acquire 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.
6. An image data acquisition apparatus, comprising:
the first creating unit is used for creating an object area with the visibility lower than a first threshold value when the camera application program is switched to background operation, and loading a display control in the object area; the first threshold is a minimum visibility value when the human naked eyes can clearly watch the object area;
a second creating unit, configured to create an image preview request associated with the camera application program, and bind the image preview request with the display control;
the display unit is used for displaying each frame of image data shot by the camera in the object area through the image preview request bound by the display control;
the third creating unit is used for creating an image control and a bound image shooting request if an image shooting instruction sent by a user is received; the image control is used for calling the image data read by the display control in real time according to the detected image shooting request;
and the storage unit is used for storing the image data called by the image control.
7. The image data acquisition apparatus according to claim 6, wherein the first creation unit includes:
a creation subunit, configured to create a dialog box that includes a display control when the camera application switches to background operation;
and the first setting subunit is used for setting the length of the dialog box to be smaller than the second threshold value and setting the width of the dialog box to be smaller than the third threshold value respectively so that the visibility of the dialog box is lower than the first threshold value.
8. The image data acquisition apparatus according to claim 6, wherein the first creation unit includes:
the switching subunit is used for switching the display mode of the terminal screen from a single-screen display mode to a multi-screen display mode when the camera application program is switched to background operation, so as to obtain a plurality of object areas;
and the second setting subunit is used for setting the area occupation ratio of any object area to be smaller than a fourth threshold value and loading display controls in the object area.
9. A terminal device comprising a memory and a processor, the memory storing a computer program executable on the processor, characterized in that the processor implements the steps of the method according to any one of claims 1 to 5 when the computer program is executed.
10. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the steps of the method according to any one of claims 1 to 5.
CN201811625542.2A 2018-12-28 2018-12-28 Image data acquisition method, terminal equipment and medium Active CN111444909B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811625542.2A CN111444909B (en) 2018-12-28 2018-12-28 Image data acquisition method, terminal equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811625542.2A CN111444909B (en) 2018-12-28 2018-12-28 Image data acquisition method, terminal equipment and medium

Publications (2)

Publication Number Publication Date
CN111444909A CN111444909A (en) 2020-07-24
CN111444909B true CN111444909B (en) 2023-05-26

Family

ID=71653875

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811625542.2A Active CN111444909B (en) 2018-12-28 2018-12-28 Image data acquisition method, terminal equipment and medium

Country Status (1)

Country Link
CN (1) CN111444909B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112199989B (en) * 2020-08-27 2023-11-28 浙江双友物流器械股份有限公司 Intelligent cargo binding system
CN113610836A (en) * 2021-08-20 2021-11-05 车主邦(北京)科技有限公司 Control configuration method and device, computer readable medium and electronic equipment
CN114697555B (en) * 2022-04-06 2023-10-27 深圳市兆珑科技有限公司 Image processing method, device, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102957870A (en) * 2012-10-30 2013-03-06 中兴通讯股份有限公司 Photographing method and device
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
CN107580108A (en) * 2017-08-09 2018-01-12 维沃移动通信有限公司 A kind of event starts method and mobile terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102957870A (en) * 2012-10-30 2013-03-06 中兴通讯股份有限公司 Photographing method and device
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
CN107580108A (en) * 2017-08-09 2018-01-12 维沃移动通信有限公司 A kind of event starts method and mobile terminal

Also Published As

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

Similar Documents

Publication Publication Date Title
CN111654629B (en) Camera switching method and device, electronic equipment and readable storage medium
CN111444909B (en) Image data acquisition method, terminal equipment and medium
CN109643241B (en) Display processing method, device, storage medium and electronic terminal
CN112532880B (en) Video processing method and device, terminal equipment and storage medium
EP2770725A2 (en) Apparatus and method for processing an image in device
US10834424B2 (en) Method and device for compressing image, and electronic device
WO2016095429A1 (en) Screenshot method and device for mobile terminal
US10044943B2 (en) Display control apparatus, display controlling method, and program, for enlarging and displaying part of image around focus detection area
CN107743264B (en) Video recording method and device
CN109126131B (en) Game picture display method, storage medium and terminal
CN113691737B (en) Video shooting method and device and storage medium
CN113923391B (en) Method, apparatus and storage medium for video processing
CN111447239B (en) Video stream playing control method, device and storage medium
CN111491097B (en) Shooting method and mobile device
CN112019891B (en) Multimedia content display method and device, terminal and storage medium
WO2014005512A1 (en) Computer-implemented image composition method and apparatus using the same
US8120691B2 (en) Image capturing appatatus and method for use in a mobile terminal
EP4329285A1 (en) Video photographing method and apparatus, electronic device, and storage medium
CN111294500B (en) Image shooting method, terminal device and medium
CN112954212B (en) Video generation method, device and equipment
US10313625B2 (en) Method, apparatus, and storage medium for video file processing
CN111782113B (en) Display method, display device and computer-readable storage medium
CN106293030B (en) A kind of information processing method and electronic equipment
CN105894558B (en) GIF image rendering method and device
CN115834961A (en) Picture-in-picture display method and device, electronic equipment and storage medium

Legal Events

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