CN108810277B - Photographing preview method and device - Google Patents

Photographing preview method and device Download PDF

Info

Publication number
CN108810277B
CN108810277B CN201810621287.8A CN201810621287A CN108810277B CN 108810277 B CN108810277 B CN 108810277B CN 201810621287 A CN201810621287 A CN 201810621287A CN 108810277 B CN108810277 B CN 108810277B
Authority
CN
China
Prior art keywords
preview
current
window
parameter
preview window
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
CN201810621287.8A
Other languages
Chinese (zh)
Other versions
CN108810277A (en
Inventor
张弓
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201810621287.8A priority Critical patent/CN108810277B/en
Publication of CN108810277A publication Critical patent/CN108810277A/en
Application granted granted Critical
Publication of CN108810277B publication Critical patent/CN108810277B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/7243User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages
    • H04M1/72439User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages for image or video messaging
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0209Power saving arrangements in terminal devices
    • H04W52/0251Power saving arrangements in terminal devices using monitoring of local events, e.g. events related to user activity
    • H04W52/0258Power saving arrangements in terminal devices using monitoring of local events, e.g. events related to user activity controlling an operation mode according to history or models of usage information, e.g. activity schedule or time of day
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0209Power saving arrangements in terminal devices
    • H04W52/0261Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level
    • H04W52/0267Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level by controlling user interface components
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Multimedia (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • User Interface Of Digital Computer (AREA)
  • Studio Devices (AREA)

Abstract

The embodiment of the application discloses a photographing preview method and device, wherein the method comprises the following steps: acquiring an image displayed in a current preview window; determining whether a trigger instruction is detected based on the image displayed by the current preview window; when the trigger instruction is detected, adjusting a first preview parameter of the current preview window to a second preview parameter, wherein the second preview parameter is larger than the first preview parameter; and performing photographing preview based on the second preview parameter. The embodiment of the application also discloses a corresponding photographing preview device. The embodiment of the application is beneficial to reducing the power consumption of the electronic equipment and prolonging the endurance time of the electronic equipment.

Description

Photographing preview method and device
Technical Field
The application relates to the technical field of electronic equipment, in particular to a photographing preview method and device.
Background
With the rapid development and increasing popularity of intelligent electronic device (such as smart phone) technology, it has become an indispensable electronic product in the daily life of users. The art-beautifying application installed on the smart phone generally supports editing pictures, such as functions of setting stickers and the like.
Disclosure of Invention
The embodiment of the invention provides a photographing preview method and device, aiming at reducing the power consumption of electronic equipment and prolonging the endurance time of the electronic equipment.
In a first aspect, an embodiment of the present application provides a photographing preview method, including:
acquiring an image displayed in a current preview window;
determining whether a trigger instruction is detected based on the image displayed by the current preview window;
when the trigger instruction is detected, adjusting a first preview parameter of the current preview window to a second preview parameter, wherein the second preview parameter is larger than the first preview parameter;
and performing photographing preview based on the second preview parameter.
In a second aspect, an embodiment of the present application provides a photographing preview device, which is applied to an electronic device, and includes:
the acquisition unit is used for acquiring the image displayed by the current preview window;
the determining unit is used for determining whether a trigger instruction is detected or not based on the image displayed in the current preview window;
the adjusting unit is used for adjusting a first preview parameter of the current preview window to a second preview parameter when the trigger instruction is detected, wherein the second preview parameter is larger than the first preview parameter;
and the previewing unit is used for previewing the picture based on the second previewing parameter.
In a third aspect, an embodiment of the present application provides an electronic device, including a processor, a memory, a communication interface, and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the processor, and the program includes instructions for executing steps in any method in the second aspect of the embodiment of the present application.
In a fourth aspect, the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program for electronic data exchange, where the computer program makes a computer perform part or all of the steps described in any one of the methods of the first aspect of the present application.
In a fifth aspect, the present application provides a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to perform some or all of the steps as described in any one of the methods of the first aspect of the embodiments of the present application. The computer program product may be a software installation package.
It can be seen that in the photographing preview method provided by the embodiment of the application, the electronic device acquires the image displayed by the current preview window, determines whether a trigger instruction is detected based on the image displayed by the current preview window, and adjusts the first preview parameter of the current preview window to the second preview parameter when the trigger instruction is detected, wherein the second preview parameter is greater than the first preview parameter, and performs photographing preview based on the second preview parameter, thereby automatically adjusting the preview parameter of the preview window, prolonging the endurance time of the electronic device, and reducing the power consumption of the electronic device.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments 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 that other drawings can be obtained according to these drawings without creative efforts.
FIG. 1-1 is a schematic diagram of a program runtime space of a smart phone;
FIGS. 1-2 are system architecture diagrams of an android system;
fig. 2 is a schematic flowchart of a photographing preview method disclosed in an embodiment of the present application;
FIG. 2-1 is a schematic illustration of a preview window interface disclosed in an embodiment of the present application;
2-2 is another preview window interface schematic diagram disclosed in the embodiments of the present application;
fig. 3 is a schematic flowchart of another photographing preview method disclosed in the embodiment of the present application;
fig. 4 is a schematic flowchart of another photographing preview method disclosed in the embodiment of the present application;
FIG. 5-1 is a block diagram of a unit composition of a photo preview device disclosed in an embodiment of the present application;
FIG. 5-2 is a block diagram of the components of another photo preview device disclosed in the embodiments of the present application;
fig. 6 is a schematic structural diagram of an electronic device disclosed in an embodiment of the present application;
fig. 7 is a schematic structural diagram of another electronic device disclosed in the embodiment of the present application.
Detailed Description
In order to make the technical solutions of the present invention better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "first," "second," and the like in the description and claims of the present invention and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the invention. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
In order to better understand the photographing preview method and apparatus disclosed in the embodiments of the present application, the embodiments of the present application are described in detail below.
As shown in fig. 1-1, currently, electronic devices such as smart phones are generally provided with a program running space, where the program running space includes a user space and an operating system space, where the user space runs one or more application programs, the photo preview method described in this embodiment of the present application runs in the user space corresponding to a software algorithm, and the operating system space runs an operating system of the electronic device.
The electronic device can specifically run an Android system, a mobile operating system iOS developed by apple Inc., and the like, and the electronic device is not limited herein. As shown in fig. 1-2, for example, the electronic device runs an Android system, the corresponding user space includes an Application layer (Applications) in the Android system, and the operating system space may include an Application Framework layer (Application Framework) in the Android system, a system Runtime library layer (including system Runtime Libraries and Android Runtime runtimes), and a Linux Kernel layer (Linux Kernel). The application layer comprises various application programs which are directly interacted with the user or service programs which are written by Java language and run in the background. For example, programs that implement common basic functions on smartphones, such as Short Messaging Service (SMS) SMS, phone dialing, picture viewer, calendar, games, maps, World Wide Web (Web) browser, and other applications developed by developers. The application framework layer provides a series of class libraries required by Android application development, can be used for reusing components, and can also realize personalized extension through inheritance. And the system operation library layer is a support of an application program framework and provides services for each component in the Android system. The system operation library layer is composed of a system class library and Android operation. The Android runtime comprises two parts, namely a core library and a Dalvik virtual machine. The Linux kernel layer is used for realizing core functions such as hardware device driving, process and memory management, a network protocol stack, power management, wireless communication and the like.
Electronic devices may include various handheld devices, vehicle-mounted devices, wearable devices (e.g., smartwatches, smartbands, pedometers, etc.), computing devices or other processing devices connected to wireless modems, as well as various forms of User Equipment (UE), Mobile Stations (MS), terminal Equipment (terminal device), and so forth, having wireless communication capabilities. For convenience of description, the above-mentioned devices are collectively referred to as electronic devices. The following describes embodiments of the present application in detail.
Referring to fig. 2, fig. 2 is a schematic flowchart of a photo preview method according to an embodiment of the present application, and as shown in fig. 2, the photo preview method according to the embodiment of the present application includes the following steps:
s201, the electronic equipment acquires the image displayed in the current preview window.
The activation manner of the preview window may be various, for example, the activation manner is activated in an application such as a camera, or the activation manner is activated in a shooting window of an application program such as instant messaging, and the like, which is not limited herein.
The electronic device may display a plurality of preview windows on the display interface, and the current preview window is only one of the plurality of preview windows. The images displayed in the preview windows may be the same or different, and the embodiments of the present application are not limited thereto. The number, position and shape of the multiple preview windows may be various in the embodiment of the present application, for example, 2, 3 or 4.
For example, when the number of the preview windows is 4, the interface containing 4 preview windows may be in a 4-grid style as shown in fig. 2-1, wherein the first and second durations may be circular, the third and fourth durations may be rectangular, and the current preview window is only the first preview window; for another example, when the number of the preview windows is 2, the interface containing the 2 preview windows may be in a 2-grid style as shown in fig. 2-2, and the current preview window is only the first preview window.
In one embodiment, the size, position and style of each preview window can be preset, and the method is convenient and efficient, but the mode is single.
In another embodiment, the electronic device may capture the number of users existing in the current viewing interface through the camera, determine a corresponding number of preview windows according to the number of the users, determine the position of the corresponding window according to the relative position of each user in the current scene, and determine the style of the corresponding window according to the face shape of each user, such as a round face corresponding to a circle, a goose egg face corresponding to an ellipse, a long face corresponding to a rectangle, and the like.
The embodiment of the application does not only limit the specific setting process of the above-mentioned attributes of the preview window.
S202, the electronic equipment determines whether a trigger instruction is detected or not based on the image displayed in the current preview window.
Determining body actions, or facial expressions or facial actions of a user based on the images displayed in the current preview window, further detecting whether the body actions, or the facial expressions or the facial actions of the user are matched with preset body actions, or the facial expressions or the facial actions, and if so, determining that a trigger instruction is detected; if not, the trigger instruction is not detected.
The triggering instruction is used for triggering the electronic equipment to promote the preview parameters of the current preview window.
S203, when the electronic device detects the trigger instruction, adjusting the first preview parameter of the current preview window to a second preview parameter, wherein the second preview parameter is larger than the first preview parameter.
Wherein the preview parameter includes a preview resolution and/or a preview frame rate.
The resolution is the number of pixels included in a unit inch, and determines the degree of fineness of image details. Generally, the higher the resolution of an image, the more pixels are included, the sharper the image, and the better the image quality. However, in the meantime, the occupied memory resources and processor resources are also increased during the image processing. Therefore, in the image previewing process, the resolution can greatly affect the previewing effect of the single-frame picture, and if the resolution is reduced, the image seen by the user in the previewing process is blurred. Thus, when the resolution is adjusted alone, the user can still view the preview image more smoothly, but there is a loss in image detail.
The frame rate is used to measure the number of display frames per second. Therefore, the reduction of the frame rate does not affect the preview effect of the single-frame picture, but if the frame rate is low, the user may feel that the preview image viewed is delayed. That is, when the frame rate is adjusted alone, the user can still clearly view the details of the preview image, but with a delay.
When the display interface of the electronic device includes a plurality of preview windows, it is determined that the trigger instruction is detected based on the image displayed in the current preview window, and in one embodiment, the electronic device may adjust the preview parameters of the current preview window individually, while the preview parameters of the rest of the preview windows in which the trigger instruction is not detected are not adjusted.
And S204, the electronic equipment performs photographing preview based on the second preview parameter.
It can be seen that, in the photographing preview method provided by the embodiment of the application, the electronic device acquires the image displayed by the current preview window, determines whether a trigger instruction is detected based on the image displayed by the current preview window, and adjusts the first preview parameter of the current preview window to the second preview parameter when the trigger instruction is detected, wherein the second preview parameter is greater than the first preview parameter, and performs photographing preview based on the second preview parameter, thereby realizing automatic adjustment of the preview parameter of the preview window.
In one embodiment, the preview parameters include a preview resolution and/or a preview frame rate.
The user may adjust one or both of the preview resolution and the preview frame rate according to the user's own needs, such as the degree of the viewing process or the degree of image detail.
In one embodiment, after the preview taking is performed based on the second preview parameter, the method further includes:
and when a photographing instruction is detected, capturing the display content of the current preview window to obtain a photo corresponding to the current preview window.
When the electronic device detects a photographing instruction, an image displayed in a current preview window can be fixed, specifically, the image can be fixed according to a timestamp, and the timestamp can correspond to the time when the photographing instruction is detected.
In one embodiment, after the acquiring the image displayed in the current preview window, the method further includes:
setting a background sticker aiming at the image displayed by the current preview window, wherein the background sticker is a virtual decoration for decorating the image in the preview window.
The virtual decoration for decorating the image in the preview window may include, but is not limited to, the following: the sticker is used for people decoration such as glasses, hats, headwear, cat ears, peaches, beard and the like.
When the display interface of the electronic device includes a plurality of preview windows, the background stickers set in each preview window may be the same or different, and correspondingly, the facial images of the users in each preview window may be the same or different, that is, the plurality of preview windows may support a single user to perform sticker setting, or may support a plurality of users to perform sticker setting, respectively.
It is understood that the setting process of the plurality of preview windows may be individually entered and set, or may be interactively entered and set, and is not limited herein.
It can be seen that, in this example, because the preview windows include a plurality of, and there is not sticker setting constraint between the windows, also there is not facial image to type in the constraint, so electronic equipment carries out the same background sticker setting operation to every preview window to accomplish the sticker setting of every preview window, improve electronic equipment and carry out the degree of accuracy and the stability that the sticker set up to a plurality of preview windows.
In one embodiment, the setting of the background sticker for the image displayed in the current preview window includes:
obtaining a background sticker configured for the current preview window;
caching the image data of the background sticker in the texture corresponding to the current preview window, wherein the texture is a container for caching the image data;
acquiring a display area label of the current preview window, wherein the display area label is used for identifying the display area of the current preview window;
copying the image data in the texture according to the display area marked in a first texture area so as to enable the background sticker to be displayed in the display area of the current preview window, wherein the first texture area corresponds to the display area of the current preview window;
and controlling the background sticker to match the action of the facial image included in the image.
In addition, because electronic equipment can control the action that the background sticker matches facial image, realize augmented reality AR sticker function, so can improve the sticker and set up intellectuality.
It can be seen that, in this example, since the sticker is stored in the material library as an independent material, the image data of the sticker adopts an independent storage and display control logic, which can reduce the coupling between the setting process of the sticker and the setting process of the facial image of the user, and improve the stability and efficiency of image display in the preview window.
In one embodiment, the determining whether a trigger instruction is detected based on the image displayed in the current preview window includes:
extracting the expression of a facial image included in the image based on the image displayed in the current preview window; and if the extracted expression is matched with a preset expression, detecting the trigger instruction.
In one embodiment, the determining whether a trigger instruction is detected based on the image displayed in the current preview window includes:
extracting the action of a face image included in the image based on the image displayed in the current preview window; and if the extracted action is matched with a preset action, the trigger instruction is detected.
Referring to fig. 3, fig. 3 is a schematic flowchart illustrating another photo preview method according to an embodiment of the present application, consistent with the embodiment shown in fig. 2. As shown in fig. 3, the photographing preview method in the embodiment of the present application includes the following steps:
s301, the electronic equipment acquires the image displayed in the current preview window.
S302, the electronic equipment sets a background sticker aiming at the image displayed in the current preview window, wherein the background sticker is a virtual ornament for decorating the image in the preview window.
The specific implementation manner of the electronic device for setting the background sticker for the image displayed on the current preview window may be as follows:
obtaining a background sticker configured for the current preview window; caching the image data of the background sticker in the texture corresponding to the current preview window, wherein the texture is a container for caching the image data; acquiring a display area label of the current preview window, wherein the display area label is used for identifying the display area of the current preview window; copying the image data in the texture according to the display area marked in a first texture area so as to enable the background sticker to be displayed in the display area of the current preview window, wherein the first texture area corresponds to the display area of the current preview window; and controlling the background sticker to match the action of the facial image included in the image.
S303, the electronic equipment extracts the expression of the facial image included in the image based on the image displayed in the current preview window;
s304, if the extracted expression is matched with a preset expression, the electronic equipment adjusts a first preview parameter of the current preview window into a second preview parameter, wherein the second preview parameter is larger than the first preview parameter;
wherein the preview parameter includes a preview resolution and/or a preview frame rate.
S305, the electronic equipment performs photographing preview based on the second preview parameter.
S306, when the electronic equipment detects a photographing instruction, capturing the display content of the current preview window to obtain a photo corresponding to the current preview window.
It can be seen that in the photographing preview method provided in the embodiment of the application, the electronic device obtains an image displayed in a current preview window, determines whether a trigger instruction is detected based on the image displayed in the current preview window, adjusts a first preview parameter of the current preview window to a second preview parameter when the trigger instruction is detected, the second preview parameter is greater than the first preview parameter, and performs photographing preview based on the second preview parameter, so as to determine a photographing intention of a user according to an expression of the photographed user, thereby automatically adjusting the preview parameter of the preview window, prolonging a duration time of the electronic device, and reducing power consumption of the electronic device.
Referring to fig. 4, in accordance with the embodiment shown in fig. 2 or 3, fig. 4 is a schematic flowchart of another photographing preview method provided in the embodiment of the present application. As shown in fig. 4, the photographing preview method in the embodiment of the present application includes the following steps:
s401, the electronic equipment acquires the image displayed in the current preview window.
S402, the electronic equipment sets a background sticker aiming at the image displayed in the current preview window, wherein the background sticker is a virtual ornament for decorating the image in the preview window.
The specific implementation manner of the electronic device for setting the background sticker for the image displayed on the current preview window may be as follows:
obtaining a background sticker configured for the current preview window; caching the image data of the background sticker in the texture corresponding to the current preview window, wherein the texture is a container for caching the image data; acquiring a display area label of the current preview window, wherein the display area label is used for identifying the display area of the current preview window; copying the image data in the texture according to the display area marked in a first texture area so as to enable the background sticker to be displayed in the display area of the current preview window, wherein the first texture area corresponds to the display area of the current preview window; and controlling the background sticker to match the action of the facial image included in the image.
S403, the electronic device extracts an action of a face image included in the image based on the image displayed in the current preview window.
S404, if the extracted action is matched with a preset action, the electronic equipment adjusts the first preview parameter of the current preview window into a second preview parameter, and the second preview parameter is larger than the first preview parameter.
Wherein the preview parameter includes a preview resolution and/or a preview frame rate.
S405, the electronic equipment performs photographing preview based on the second preview parameter.
S406, when the electronic equipment detects a photographing instruction, capturing the display content of the current preview window to obtain a photo corresponding to the current preview window.
It can be seen that in the photographing preview method provided in the embodiment of the application, the electronic device obtains the image displayed in the current preview window, determines whether a trigger instruction is detected based on the image displayed in the current preview window, adjusts the first preview parameter of the current preview window to the second preview parameter when the trigger instruction is detected, the second preview parameter is greater than the first preview parameter, and performs photographing preview based on the second preview parameter, so as to determine the photographing intention of the user according to the action of the photographed user, thereby automatically adjusting the preview parameter of the preview window, prolonging the endurance time of the electronic device, and reducing the power consumption of the electronic device.
The above description has introduced the solution of the embodiment of the present application mainly from the perspective of the method-side implementation process. It is understood that the electronic device comprises corresponding hardware structures and/or software modules for performing the respective functions in order to realize the above functions. Those of skill in the art will readily appreciate that the present application is capable of hardware or a combination of hardware and computer software implementing the various illustrative elements and algorithm steps described in connection with the embodiments provided herein. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiment of the present application, the electronic device may be divided into the functional units according to the method example, for example, each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing 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. It should be noted that the division of the unit in the embodiment of the present application is schematic, and is only a logic function division, and there may be another division manner in actual implementation.
The following is an embodiment of the apparatus of the present invention, which is used to perform the method implemented by the embodiment of the method of the present invention. Referring to fig. 5-1, fig. 5-1 is a block diagram of a unit composition of a photo preview device disclosed in an embodiment of the present application, as shown in fig. 5-1, the photo preview device may include an obtaining unit 501, a determining unit 502, an adjusting unit 503, and a preview unit 504, where:
an obtaining unit 501, configured to obtain an image displayed in a current preview window;
a determining unit 502, configured to determine whether a trigger instruction is detected based on the image displayed in the current preview window;
an adjusting unit 503, configured to, when the trigger instruction is detected, adjust a first preview parameter of the current preview window to a second preview parameter, where the second preview parameter is greater than the first preview parameter;
a preview unit 504, configured to perform a photographing preview based on the second preview parameter.
Referring to fig. 5-2, fig. 5-2 is a block diagram of a unit composition of another photo preview device disclosed in the embodiment of the present application, and as shown in fig. 5-2, the photo preview device may include an obtaining unit 501, a determining unit 502, an adjusting unit 503, and a preview unit 504 in the photo preview device shown in fig. 5-1.
In one embodiment, the preview parameters include a preview resolution and/or a preview frame rate.
In one embodiment, the apparatus further comprises:
and the shooting unit 505 is configured to capture the display content of the current preview window when the shooting instruction is detected, so as to obtain a photo corresponding to the current preview window.
In one embodiment, the apparatus further comprises:
a setting unit 506, configured to set a background sticker for the image displayed in the current preview window, where the background sticker is a virtual decoration decorated for the image in the preview window.
In one embodiment, the setting unit 506 is specifically configured to
Obtaining a background sticker configured for the current preview window; caching the image data of the background sticker in the texture corresponding to the current preview window, wherein the texture is a container for caching the image data; acquiring a display area label of the current preview window, wherein the display area label is used for identifying the display area of the current preview window; copying the image data in the texture according to the display area marked in a first texture area so as to enable the background sticker to be displayed in the display area of the current preview window, wherein the first texture area corresponds to the display area of the current preview window; and controlling the background sticker to match the action of the facial image included in the image.
In an embodiment, the determining unit 502 is specifically configured to:
extracting the expression of a facial image included in the image based on the image displayed in the current preview window; and if the extracted expression is matched with a preset expression, detecting the trigger instruction.
In an embodiment, the determining unit 502 is specifically configured to:
extracting the action of a face image included in the image based on the image displayed in the current preview window; and if the extracted action is matched with a preset action, the trigger instruction is detected.
Specifically, the specific implementation of each unit may refer to the description of the relevant steps in the embodiments corresponding to fig. 2 to fig. 4, which is not described herein again.
It should be noted that the photo preview device described in the embodiment of the present invention is presented in the form of a functional unit. The term "unit" as used herein is to be understood in its broadest possible sense, and objects used to implement the functions described by the respective "unit" may be, for example, an integrated circuit ASIC, a single circuit, a processor (shared, dedicated, or chipset) and memory that execute one or more software or firmware programs, a combinational logic circuit, and/or other suitable components that provide the described functionality.
For example, the function of the acquiring unit 501 for acquiring the image displayed in the current preview window can be implemented by the electronic device shown in fig. 6, and specifically, the processor 601 may acquire the image displayed in the current preview window by calling the executable program code in the memory 602.
It can be seen that the preview device that shoots that this application embodiment provided acquires the image that current preview window shows, whether detect trigger command based on the image that current preview window shows is confirmed, when detecting trigger command, will the first preview parameter adjustment of current preview window is the second preview parameter, the second preview parameter is greater than first preview parameter, based on the second preview parameter, shoots the preview to realize the preview parameter of automatically regulated preview window, prolong electronic equipment's time of endurance, reduce electronic equipment's consumption.
Referring to fig. 6, fig. 6 is a schematic structural diagram of another electronic device disclosed in the embodiment of the present application. The electronic device comprises a processor 601, a memory 602, a communication interface 603 and one or more programs, wherein the one or more programs are stored in the memory 602 and configured to be executed by the processor 601, the programs comprising instructions for performing the steps of:
acquiring an image displayed in a current preview window;
determining whether a trigger instruction is detected based on the image displayed by the current preview window;
when the trigger instruction is detected, adjusting a first preview parameter of the current preview window to a second preview parameter, wherein the second preview parameter is larger than the first preview parameter;
and performing photographing preview based on the second preview parameter.
In one embodiment, the preview parameters include a preview resolution and/or a preview frame rate.
In one embodiment, the program further comprises instructions for:
and when a photographing instruction is detected, capturing the display content of the current preview window to obtain a photo corresponding to the current preview window.
In one embodiment, the program further comprises instructions for:
setting a background sticker aiming at the image displayed by the current preview window, wherein the background sticker is a virtual decoration for decorating the image in the preview window.
In one embodiment, in setting a background sticker for the image displayed in the current preview window, the instructions in the program are specifically configured to:
obtaining a background sticker configured for the current preview window;
caching the image data of the background sticker in the texture corresponding to the current preview window, wherein the texture is a container for caching the image data;
acquiring a display area label of the current preview window, wherein the display area label is used for identifying the display area of the current preview window;
copying the image data in the texture according to the display area marked in a first texture area so as to enable the background sticker to be displayed in the display area of the current preview window, wherein the first texture area corresponds to the display area of the current preview window;
and controlling the background sticker to match the action of the facial image included in the image.
In one embodiment, in determining whether a trigger instruction is detected based on the image displayed in the current preview window, the instructions in the program are specifically configured to:
extracting the expression of a facial image included in the image based on the image displayed in the current preview window;
and if the extracted expression is matched with a preset expression, detecting the trigger instruction.
In one embodiment, in determining whether a trigger instruction is detected based on the image displayed in the current preview window, the instructions in the program are specifically configured to:
extracting the action of a face image included in the image based on the image displayed in the current preview window;
and if the extracted action is matched with a preset action, the trigger instruction is detected.
The communication interface 603 includes, but is not limited to, an antenna, an Amplifier, a transceiver, a coupler, an LNA (Low Noise Amplifier), a duplexer, and the like. The memory 802 includes at least one of: random access memory, non-volatile memory, and external memory.
Specifically, the specific implementation of each unit may refer to the description of the relevant steps in the embodiments corresponding to fig. 2 to fig. 4, which is not described herein again.
It can be seen that the electronic device provided in the embodiment of the present application obtains the image displayed by the current preview window, determines whether a trigger instruction is detected based on the image displayed by the current preview window, and when the trigger instruction is detected, adjusts the first preview parameter of the current preview window to the second preview parameter, where the second preview parameter is greater than the first preview parameter, and based on the second preview parameter, performs the photographing preview, thereby automatically adjusting the preview parameter of the preview window, extending the endurance time of the electronic device, and reducing the power consumption of the electronic device.
As shown in fig. 7, the Image Processing circuit may include an Image Signal Processing (ISP) processor 740 and control logic 750. The image data captured by imaging device 710 is first processed by ISP processor 740, and ISP processor 740 analyzes the image data to capture image statistics for determining control parameters of imaging device 710. The imaging device 710 may be a camera having a lens 712 and an image sensor 714. The image sensor 714 may include an array of color filters (e.g., Bayer filters), each imaging pixel of the image sensor 714 may capture intensity and wavelength information of ambient light, and the image sensor 714 transmits raw image data to the ISP processor 740. The sensor 720 may provide raw image data to the ISP processor 740 based on a preset interface. The default interface includes a Standard Mobile Imaging Architecture (SMIA) interface, other serial or parallel camera interfaces, or a combination thereof.
ISP processor 740 processes the raw image data pixel by pixel in a variety of formats. For example, each image pixel may have a bit depth of 8, 10, 12, or 14 bits, and ISP processor 740 may perform one or more image processing operations on the raw image data, collecting statistical information about the image data. Wherein the image processing operations may be performed with the same or different bit depth precision.
ISP processor 740 may also receive pixel data from image memory 730. For example, the original pixel data is sent from the predetermined interface to the image memory 730, and the original pixel data in the image memory 730 is provided to the ISP processor 740 for processing. The image Memory 730 may be a part of a Memory space of the Memory, or a separate dedicated Memory, and the type of the Memory may be Direct Memory Access (DMA).
The ISP processor 740 may perform an image processing operation, such as a filtering process, when receiving raw image data from a preset interface or from the image memory 730. The processed image data may be sent to image memory 730 for further processing prior to display. ISP processor 740 receives processed data from image memory 730 and performs image data processing on the processed data in the raw domain and RGB and YCbCr color spaces. The processed image data may be output to a display 770 for viewing by a user and/or further Processing by a Graphics Processing Unit (GPU). Further, the output of ISP processor 740 may also be sent to image memory 730 and display 770 may read image data from image memory 730. In one embodiment, image memory 730 may be configured to implement one or more frame buffers. In addition, the output of ISP processor 740 may be sent to encoder/decoder 760 for encoding/decoding image data. The encoded image data may be saved and decompressed before being displayed on the display 770 device. The encoder/decoder 760 may be implemented by a CPU or GPU or coprocessor.
The statistical data determined by ISP processor 740 may be sent to control logic 750 unit. For example, the statistical data may include image sensor 714 statistics such as auto-exposure, auto-white balance, auto-focus, flicker detection, black level compensation, lens 712 shading correction, and the like. Control logic 750 may be a processor and/or microcontroller and one or more routines may determine control parameters of imaging device 710 based on the received statistical data. For example, the control parameters may include sensor 720 control parameters (e.g., gain, integration time for exposure control), camera flash control parameters, lens 712 control parameters (e.g., focal length for focusing or zooming), or a combination of these parameters. The ISP control parameters may include gain levels and color correction matrices for automatic white balance and color adjustment (e.g., during RGB processing), as well as lens 712 shading correction parameters.
Embodiments of the present application also provide a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute some or all of the steps of any one of the photo preview methods as described in the above method embodiments.
The embodiment of the present application further provides a computer storage medium, where the computer storage medium may store a program, and the program includes, when executed, some or all of the steps of any one of the photo preview methods described in the above method embodiments.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implementing, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention 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 memory. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a memory and includes several instructions for causing a computer device (which may be a personal computer, a server, a network device, or the like) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned memory comprises: various media capable of storing program codes, such as a usb disk, a read-only memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and the like.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable memory, which may include: a flash disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic or optical disk, and the like.
The foregoing embodiments of the present invention have been described in detail, and the principles and embodiments of the present invention are explained herein by using specific examples, which are only used to help understand the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (8)

1. A photographing preview method, comprising:
acquiring images displayed by a current preview window, wherein the number of users in the current viewing interface is captured, the preview windows with corresponding number are determined according to the number of the users, the position of the corresponding window is determined according to the relative position of each user in the current scene, and the style of the corresponding window is determined according to the face shape of each user;
determining whether a trigger instruction is detected or not based on the image displayed by the current preview window, wherein the limb action, or the facial expression or the facial action of the user is determined based on the image displayed by the current preview window, and further detecting whether the limb action, or the facial expression or the facial action of the user is matched with a preset limb action, or the facial expression or the facial action, if so, determining that the trigger instruction is detected; if not, the trigger instruction is not detected;
when the trigger instruction is detected, adjusting a first preview parameter of the current preview window to a second preview parameter, wherein the second preview parameter is larger than the first preview parameter;
and performing photographing preview based on the second preview parameter.
2. The method of claim 1, wherein the preview parameters comprise a preview resolution and/or a preview frame rate.
3. The method of claim 1 or 2, wherein after the preview for taking a picture based on the second preview parameter, the method further comprises:
and when a photographing instruction is detected, capturing the display content of the current preview window to obtain a photo corresponding to the current preview window.
4. The method of claim 1, wherein after the capturing the image displayed in the current preview window, the method further comprises:
setting a background sticker aiming at the image displayed by the current preview window, wherein the background sticker is a virtual decoration for decorating the image in the preview window.
5. The method of claim 4, wherein setting a background sticker for the image displayed by the current preview window comprises:
obtaining a background sticker configured for the current preview window;
caching the image data of the background sticker in the texture corresponding to the current preview window, wherein the texture is a container for caching the image data;
acquiring a display area label of the current preview window, wherein the display area label is used for identifying the display area of the current preview window;
copying the image data in the texture according to the display area marked in a first texture area so as to enable the background sticker to be displayed in the display area of the current preview window, wherein the first texture area corresponds to the display area of the current preview window;
and controlling the background sticker to match the action of the facial image included in the image.
6. A photographing preview device applied to an electronic device includes:
the device comprises an acquisition unit, a display unit and a display unit, wherein the acquisition unit is used for acquiring images displayed by a current preview window, capturing the number of users in a current view interface, determining the preview windows with corresponding number according to the number of the users, determining the position of the corresponding window according to the relative position of each user in a current scene, and determining the style of the corresponding window according to the face shape of each user;
the determining unit is used for determining whether a trigger instruction is detected or not based on the image displayed by the current preview window, wherein the number of users existing in the current view interface is captured, the corresponding number of preview windows are determined according to the number of the users, the position of the corresponding window is determined according to the relative position of each user in the current scene, and the style of the corresponding window is determined according to the face shape of each user;
the adjusting unit is used for adjusting a first preview parameter of the current preview window to a second preview parameter when the trigger instruction is detected, wherein the second preview parameter is larger than the first preview parameter;
and the previewing unit is used for previewing the picture based on the second previewing parameter.
7. An electronic device comprising a processor, a memory, a communication interface, and one or more programs stored in the memory and configured to be executed by the processor, the programs comprising instructions for performing the steps in the method of any of claims 1-5.
8. A computer-readable storage medium, characterized in that a computer program for electronic data exchange is stored, wherein the computer program causes a computer to perform the method according to any one of claims 1-5.
CN201810621287.8A 2018-06-15 2018-06-15 Photographing preview method and device Active CN108810277B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810621287.8A CN108810277B (en) 2018-06-15 2018-06-15 Photographing preview method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810621287.8A CN108810277B (en) 2018-06-15 2018-06-15 Photographing preview method and device

Publications (2)

Publication Number Publication Date
CN108810277A CN108810277A (en) 2018-11-13
CN108810277B true CN108810277B (en) 2021-02-26

Family

ID=64086557

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810621287.8A Active CN108810277B (en) 2018-06-15 2018-06-15 Photographing preview method and device

Country Status (1)

Country Link
CN (1) CN108810277B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109639980B (en) * 2018-12-28 2021-10-22 Tcl移动通信科技(宁波)有限公司 Mobile terminal image preview control method, storage medium and mobile terminal
CN109862276B (en) * 2019-03-31 2020-11-20 联想(北京)有限公司 Information processing method and device
CN111324763B (en) * 2020-02-07 2023-08-15 Tcl移动通信科技(宁波)有限公司 Photo preview method and system, storage medium and terminal equipment thereof
CN113568688B (en) * 2020-04-29 2023-06-06 RealMe重庆移动通信有限公司 View switching method and device, electronic equipment and storage medium
CN112019738B (en) * 2020-07-31 2022-03-01 广东小天才科技有限公司 Photographing method and terminal equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103139473A (en) * 2011-11-28 2013-06-05 三星电子株式会社 Method of eliminating a shutter-lag, camera module, and mobile device having the same
CN105068748A (en) * 2015-08-12 2015-11-18 上海影随网络科技有限公司 User interface interaction method in camera real-time picture of intelligent touch screen equipment
CN105578049A (en) * 2015-12-24 2016-05-11 深圳市金立通信设备有限公司 Camera control method and terminal
CN105975046A (en) * 2016-04-29 2016-09-28 乐视控股(北京)有限公司 Photographing preview method and device
WO2018019068A1 (en) * 2016-07-27 2018-02-01 中兴通讯股份有限公司 Photographing method and device, and mobile terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103139473A (en) * 2011-11-28 2013-06-05 三星电子株式会社 Method of eliminating a shutter-lag, camera module, and mobile device having the same
CN105068748A (en) * 2015-08-12 2015-11-18 上海影随网络科技有限公司 User interface interaction method in camera real-time picture of intelligent touch screen equipment
CN105578049A (en) * 2015-12-24 2016-05-11 深圳市金立通信设备有限公司 Camera control method and terminal
CN105975046A (en) * 2016-04-29 2016-09-28 乐视控股(北京)有限公司 Photographing preview method and device
WO2018019068A1 (en) * 2016-07-27 2018-02-01 中兴通讯股份有限公司 Photographing method and device, and mobile terminal

Also Published As

Publication number Publication date
CN108810277A (en) 2018-11-13

Similar Documents

Publication Publication Date Title
CN108810277B (en) Photographing preview method and device
CN108965692B (en) Sticker setting method and device
CN109040609B (en) Exposure control method, exposure control device, electronic equipment and computer-readable storage medium
CN108900782B (en) Exposure control method, exposure control device and electronic equipment
CN110072052B (en) Image processing method and device based on multi-frame image and electronic equipment
CN109068058B (en) Shooting control method and device in super night scene mode and electronic equipment
US9451173B2 (en) Electronic device and control method of the same
CN110191291B (en) Image processing method and device based on multi-frame images
CN110198417A (en) Image processing method, device, storage medium and electronic equipment
CN109672819B (en) Image processing method, image processing device, electronic equipment and computer readable storage medium
CN108024065B (en) Terminal shooting method, terminal and computer readable storage medium
CN109348088B (en) Image noise reduction method and device, electronic equipment and computer readable storage medium
WO2020057199A1 (en) Imaging method and device, and electronic device
CN106454077B (en) Shooting method, shooting device and terminal
CN108288044B (en) Electronic device, face recognition method and related product
CN109151333B (en) Exposure control method, exposure control device and electronic equipment
CN107704798B (en) Image blurring method and device, computer readable storage medium and computer device
CN107690804B (en) Image processing method and user terminal
CN108513069B (en) Image processing method, image processing device, storage medium and electronic equipment
EP3836532A1 (en) Control method and apparatus, electronic device, and computer readable storage medium
CN112017137A (en) Image processing method, image processing device, electronic equipment and computer readable storage medium
CN113810596A (en) Time-delay shooting method and device
CN115086567A (en) Time-delay shooting method and device
WO2017076041A1 (en) Method and device for image-stabilized photograph capturing and mobile terminal
CN108259767B (en) Image processing method, image processing device, storage medium 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