WO2021238740A1 - 一种截屏方法及电子设备 - Google Patents

一种截屏方法及电子设备 Download PDF

Info

Publication number
WO2021238740A1
WO2021238740A1 PCT/CN2021/094619 CN2021094619W WO2021238740A1 WO 2021238740 A1 WO2021238740 A1 WO 2021238740A1 CN 2021094619 W CN2021094619 W CN 2021094619W WO 2021238740 A1 WO2021238740 A1 WO 2021238740A1
Authority
WO
WIPO (PCT)
Prior art keywords
screenshot
electronic device
picture
area
time period
Prior art date
Application number
PCT/CN2021/094619
Other languages
English (en)
French (fr)
Inventor
熊刘冬
郭乃荣
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2021238740A1 publication Critical patent/WO2021238740A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04845Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range for image manipulation, e.g. dragging, rotation, expansion or change of colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration using two or more images, e.g. averaging or subtraction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/77Retouching; Inpainting; Scratch removal
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/433Content storage operation, e.g. storage operation in response to a pause request, caching operations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/433Content storage operation, e.g. storage operation in response to a pause request, caching operations
    • H04N21/4334Recording operations

Definitions

  • This application relates to the field of terminals and communication technologies, and in particular to a screenshot method and electronic equipment.
  • This application provides a screen capture method and electronic device, which avoids the background being blocked by the characters when the video screen is captured, so that the screen capture pictures display more information.
  • the present application provides a screenshot method.
  • the method includes: in response to a user's screenshot operation, the electronic device performs N screenshots of the video in the first time period to obtain N first screenshot pictures, where the N Is a positive integer not less than 2; the electronic device performs target detection on the first screenshot picture to determine the area of the target to be processed in the first screenshot picture, and the target to be processed is the target detected by the target; the electronic device will The area of the target to be processed in the first screenshot is processed as a transparent area, and M second screenshots are obtained, where M is a positive integer less than or equal to N; the electronic device superimposes the M second screenshots , Get the third screenshot picture; when the M is equal to 2, the third screenshot picture displays the information of the non-transparent area of the second screenshot picture superimposed on the top layer and the transparency of the second screenshot picture superimposed on the top layer The information of the first area corresponding to the area; the first area is the area whose position on the second screenshot picture of the next layer corresponds to the transparent area
  • the electronic device can take multiple screenshots of the video.
  • Target detection is performed on each of the first screenshot pictures obtained from multiple screenshots, and the area where the person as the target to be processed is located is detected, processed as a transparent area, and multiple second screenshot pictures are obtained. Since the target to be processed moves during multiple screenshots, the position of the target to be processed is different relative to the background (such as a blackboard) in the video, and the information in the background that the target to be processed occludes and exposes is also different.
  • the electronic device superimposes multiple second screenshot pictures containing different information. After the pictures are superimposed, the transparent area of the upper-layer picture can display the information of the corresponding area in the lower-layer picture.
  • the third screenshot picture that is finally superimposed can also display the second picture on the lower layer superimposed on the transparent area of the second screenshot picture on the top layer.
  • Information about the corresponding area on the screenshot picture It is understandable that if the corresponding area on the second screenshot picture in the lower layer is a transparent area, the transparent area can display the information of the corresponding area on the second screenshot picture in the lower layer. Therefore, the third screenshot can display more information than each second screenshot and each first screenshot. It avoids the occlusion of the background by the characters during the video screenshot, so that the screenshot image shows more information.
  • the electronic device in response to the user's screenshot operation, performs N screenshots of the video in the first time period to obtain N first screenshot pictures, which specifically includes: responding to the user's screenshot In operation, the electronic device determines the start time of the first time period and the stop time of the first time period; the electronic device takes N screenshots of the video in the first time period to obtain N first screenshot pictures.
  • the electronic device can determine the start time and the stop time of the first time period according to the user's screenshot operation, and the user controls the start and end time of the screenshot, which can make the finally obtained third screenshot more in line with the user's expectation.
  • determining the start and end moments of the first time period may be based on different user operations:
  • the screenshot operation includes a first operation and a second operation that are not continuously completed; in response to the user’s screenshot operation, the electronic device determines the start of the first time period
  • the start time and the stop time specifically include: in response to the first operation of the user, the electronic device determines the start time of the first time period; in response to the second operation of the user, the electronic device determines the first time period The moment of stopping.
  • the start and end times are respectively determined by different discontinuous operations, so that the determination process of the first time period is more concise.
  • the screenshot operation includes a series of continuously completed operations; in response to the user's screenshot operation, the electronic device determines the start time and the stop time of the first time period , Specifically including: in response to the user triggering the screen capture operation, the electronic device displays the time period selection control; in response to the user's operation on the time period selection control, the electronic device determines the start time and the stop time of the first time period .
  • the user determines the start and end time from the time selection control through a series of continuous operations, so that the determination of the first time period is more accurate.
  • the electronic device to take N screenshots of the video in the first time period:
  • the electronic device takes N screenshots of the video during the first time period to obtain N first screenshots, which specifically includes: the electronic device according to a preset The time period takes N screenshots of the video within the first time period, and N first screenshots are obtained.
  • the electronic device takes screenshots in the first time period according to a preset time period, which guarantees the time interval between obtaining different screenshot pictures, and improves the probability of obtaining more information in the third screenshot picture.
  • the electronic device takes N screenshots of the video during the first time period to obtain N first screenshots, which specifically includes: the electronic device is in the first time period. Perform target detection on the video within a period of time; whenever it is determined that the position change of the target to be processed in the video exceeds the preset distance threshold, take a screenshot to generate a first screenshot until the N first screenshots are obtained picture.
  • the electronic device takes a screenshot when the moving position of the target to be processed exceeds the preset distance threshold according to the target detection result, so that more information in the background can be exposed in the obtained first screenshot, so that the third screenshot More information can be displayed in.
  • the method further includes: the electronic device deleting the first screenshot pictures that do not meet the image quality requirements for target detection among the N first screenshot pictures.
  • the order of superimposing the second screenshot picture can be obtained in multiple ways:
  • the electronic device superimposes the M second screenshot pictures to obtain the third screenshot picture, which specifically includes: the electronic device performs the M according to the preset default order.
  • the second screenshot image is superimposed to obtain the third screenshot image.
  • the preset default order is the order in which pictures with a later playing time are superimposed on the video.
  • the second screenshot pictures are superimposed in a preset default order, so that the superimposing process is faster.
  • the superimposition is performed in the order in which the pictures with the later playing time in the video are superimposed according to the preset default order, so that the information displayed in the finally obtained third screenshot picture is the latest information.
  • the electronic device superimposes the M second screenshot pictures to obtain the third screenshot picture, which specifically includes: the electronic device displays the M second screenshot pictures The order of stacking;
  • the electronic device In response to the user's operation of adjusting the superimposition sequence, the electronic device superimposes the M second screenshot pictures according to the user-adjusted superimposition sequence to obtain the third screenshot picture.
  • the superimposing sequence can be independently adjusted by the user, so that the third screenshot image obtained by superimposing is more in line with the user's needs.
  • the method further includes: the electronic device uses the background color in the third screenshot picture to fill the transparent area in the third screenshot picture.
  • the transparent area can be filled with the background color to improve the aesthetics of the third screenshot picture.
  • the method further includes: the electronic device uses an intelligent repair technology to fill and complete the transparent area in the third screenshot picture.
  • smart repair technology can be used to fill and complete the transparent areas in the third screenshot picture to improve the aesthetics of the third screenshot picture.
  • the method further includes: the electronic device translucent the area of the target to be processed in the first screenshot image corresponding to the second screenshot image superimposed on the top layer Processing to obtain a translucent target to be processed; the electronic device superimposes the translucent target to be processed on the third screenshot picture to obtain a fourth screenshot picture.
  • the translucent target to be processed is superimposed on the third screenshot picture, so that while more information in the background can be obtained, the action and posture of the target to be processed can be seen. Further increase the amount of information obtained.
  • the video is a teaching video
  • the target to be processed is a teacher
  • an embodiment of the present application provides an electronic device, the electronic device includes: one or more processors and a memory; the memory is coupled with the one or more processors, and the memory is used to store computer program codes,
  • the computer program code includes computer instructions, and the one or more processors call the computer instructions to make the electronic device execute: in response to the user’s screen capture operation, take N screenshots of the video in the first time period to obtain the Nth A screenshot picture, where N is a positive integer not less than 2; target detection is performed on the first screenshot picture to determine the area of the target to be processed in the first screenshot picture, and the target to be processed is the target detected by the target;
  • the electronic device processes the area where the target to be processed is located in the first screenshot picture as a transparent area to obtain M second screenshot pictures, where M is a positive integer less than or equal to N; perform the M second screenshot pictures Superimpose to obtain the third screenshot picture; when the M is equal to 2, the third screenshot picture displays the information of the non-transparent area of the second screenshot picture superimposed on the upper
  • the electronic device can take multiple screenshots of the video.
  • Target detection is performed on each of the first screenshot pictures obtained from multiple screenshots, and the area where the person as the target to be processed is located is detected, processed as a transparent area, and multiple second screenshot pictures are obtained. Since the target to be processed moves during multiple screenshots, the position of the target to be processed is different relative to the background (such as a blackboard) in the video, and the information in the background occluded and exposed by the target to be processed is also different.
  • the electronic device superimposes multiple second screenshot pictures containing different information. After the pictures are superimposed, the transparent area of the upper-layer picture can display the information of the corresponding area in the lower-layer picture.
  • the third screenshot picture that is finally superimposed can also display the second picture on the lower layer superimposed on the transparent area of the second screenshot picture on the top layer.
  • Information about the corresponding area on the screenshot picture It is understandable that if the corresponding area on the second screenshot picture in the lower layer is a transparent area, the transparent area can display the information of the corresponding area on the second screenshot picture in the lower layer. Therefore, the third screenshot can display more information than each second screenshot and each first screenshot. It avoids the occlusion of the background by the characters during the video screenshot, so that the screenshot image shows more information.
  • the one or more processors are specifically configured to invoke the computer instructions to cause the electronic device to execute: in response to the user's screen capture operation, determine the start time and the start time of the first time period Stop moment of the first time period; take N screenshots of the video in the first time period to obtain N first screenshot pictures.
  • the electronic device can determine the start time and the stop time of the first time period according to the user's screenshot operation, and the user controls the start and end time of the screenshot, which can make the finally obtained third screenshot more in line with the user's expectation.
  • determining the start and end moments of the first time period may be based on different user operations:
  • the screenshot operation includes a first operation and a second operation that are not continuously completed; the one or more processors are specifically configured to call the computer instructions to make the electronic
  • the device executes: in response to the first operation of the user, the start time of the first time period is determined; in response to the second operation of the user, the stop time of the first time period is determined.
  • the start and end times are determined by discontinuous different operations, so that the determination process of the first time period is more concise.
  • the screenshot operation includes a series of consecutively completed operations; the one or more processors are specifically configured to invoke the computer instructions to make the electronic device execute: in response to The user triggers the screen capture operation to display the time period selection control; in response to the user's operation on the time period selection control, the start time and the stop time of the first time period are determined.
  • the user determines the start and end time from the time selection control through a series of continuous operations, so that the determination of the first time period is more accurate.
  • the electronic device to take N screenshots of the video in the first time period:
  • the one or more processors are specifically configured to call the computer instructions to make the electronic device execute: Take N screenshots of the video and get N first screenshots.
  • the electronic device takes screenshots in the first time period according to a preset time period, which guarantees the time interval between obtaining different screenshot pictures, and improves the probability of obtaining more information in the third screenshot picture.
  • the one or more processors are specifically configured to invoke the computer instructions to make the electronic device execute: perform target detection on the video in the first time period ; Whenever it is determined that the position change of the target to be processed in the video exceeds the preset distance threshold, a screenshot is taken to generate a first screenshot until the N first screenshots are obtained.
  • the electronic device takes a screenshot when the moving position of the target to be processed exceeds the preset distance threshold according to the target detection result, so that more information in the background can be exposed in the obtained first screenshot, so that the third screenshot More information can be displayed in.
  • the one or more processors are also used to call the computer instructions to make the electronic device execute: delete the N first screenshot pictures that do not meet the target The first screenshot of the detected image quality requirements.
  • the order of superimposing the second screenshot picture can be obtained in multiple ways:
  • the one or more processors are specifically configured to invoke the computer instructions to make the electronic device execute: according to a preset default order, the M second screenshots The pictures are superimposed to obtain the third screenshot picture.
  • the preset default order is the order in which pictures with a later playing time are superimposed on the video.
  • the second screenshot pictures are superimposed in a preset default order, so that the superimposing process is faster.
  • the superimposition is performed in the order in which the pictures with the later playing time in the video are superimposed according to the preset default order, so that the information displayed in the finally obtained third screenshot picture is the latest information.
  • the one or more processors are specifically configured to invoke the computer instructions to make the electronic device execute: display the superimposition sequence of the M second screenshot pictures; In response to the user's operation of adjusting the superimposition sequence, the M second screenshot pictures are superimposed according to the user-adjusted superimposition sequence to obtain the third screenshot picture.
  • the superimposing sequence can be independently adjusted by the user, so that the third screenshot image obtained by superimposing is more in line with the user's needs.
  • the one or more processors are further configured to call the computer instructions to make the electronic device execute: fill the first screenshot with the background color in the third screenshot picture Three transparent areas in the screenshot picture.
  • the transparent area can be filled with the background color to improve the aesthetics of the third screenshot picture.
  • the one or more processors are also used to call the computer instructions to make the electronic device execute: use smart repair technology to transparently display the third screenshot picture The area is filled and completed.
  • smart repair technology can be used to fill and complete the transparent areas in the third screenshot picture to improve the aesthetics of the third screenshot picture.
  • the one or more processors are also used to call the computer instructions to make the electronic device execute: Translucent processing is performed on an area where the target to be processed is located in a screenshot picture to obtain a translucent target to be processed; the translucent target to be processed is superimposed on the third screenshot picture to obtain a fourth screenshot picture.
  • the translucent target to be processed is superimposed on the third screenshot picture, so that while more information in the background can be obtained, the action and posture of the target to be processed can be seen. Further increase the amount of information obtained.
  • the video is a teaching video
  • the target to be processed is a teacher
  • embodiments of the present application provide a chip system that is applied to an electronic device.
  • the chip system includes one or more processors for invoking computer instructions to make the electronic device execute the first Aspect and the method described in any possible implementation of the first aspect.
  • the chip system may include one processor 110 in the electronic device 100 as shown in FIG. 3, or may include multiple processors 110 in the electronic device 100 as shown in FIG.
  • the chip system may also include one or more other chips.
  • it may include the image signal processing chip in the camera 193 in the electronic device 100 as shown in FIG. 5, and may also include the image display chip in the display screen 194. Etc., it is not limited here.
  • the embodiments of the present application provide a computer program product containing instructions.
  • the computer program product When the computer program product is run on an electronic device, the electronic device executes the first aspect and any possible implementation manner in the first aspect. Described method.
  • an embodiment of the present application provides a computer-readable storage medium, including instructions, when the instructions are executed on an electronic device, the electronic device is caused to execute the first aspect and any possible implementation manner in the first aspect Described method.
  • the electronic equipment provided in the second aspect, the chip system provided in the third aspect, the computer program product provided in the fourth aspect, and the computer storage medium provided in the fifth aspect are all used to implement the methods provided in the embodiments of the present application. . Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method, which will not be repeated here.
  • Fig. 1 is a schematic diagram of the effect of screenshots obtained by taking screenshots of teaching videos in the prior art
  • FIG. 2 is a schematic diagram of the effect of screenshots obtained from screenshots of teaching videos in an embodiment of the present application
  • Figure 3 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • FIG. 4 is a block diagram of the software structure of an electronic device provided by an embodiment of the present application.
  • FIG. 5 is a schematic flowchart of a screenshot method in an embodiment of the present application.
  • FIG. 6 is a schematic diagram of a set of interface screen capture operations provided by an embodiment of the present application.
  • FIG. 7 is a schematic diagram of another set of screenshot operations interface provided by an embodiment of the present application.
  • FIG. 8 is a schematic diagram of an exemplary scenario for determining the area where the target to be processed is located in an embodiment of the present application
  • FIG. 9 is a schematic diagram of an exemplary scene of a transparent area in an embodiment of the present application.
  • FIG. 10 is a schematic diagram of a set of interfaces provided in an embodiment of the present application.
  • FIG. 11 is an exemplary schematic diagram of the processing process of a screenshot method in an embodiment of the present application.
  • FIG. 12 is an exemplary schematic diagram of a process of superimposing a second screenshot picture in an embodiment of the present application.
  • FIG. 13 is a schematic diagram of another set of interfaces provided in an embodiment of the present application.
  • FIG. 14 is a schematic diagram of another set of interfaces provided in an embodiment of the present application.
  • FIG. 15 is an exemplary schematic diagram of superimposing a translucent target to be processed on a third screenshot picture in an embodiment of the present application.
  • first and second are only used for descriptive purposes, and cannot be understood as implying or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, the features defined with “first” and “second” may explicitly or implicitly include one or more of these features. In the description of the embodiments of the present application, unless otherwise specified, “multiple” The meaning is two or more.
  • Target detection algorithm based on deep learning (1) Target detection algorithm based on deep learning:
  • Deep learning is to make machine learn the internal laws and representation levels of sample data.
  • the information obtained in the learning process is of great help to the interpretation of data such as text, images and sounds. It allows machines to have the ability to analyze and learn like humans, and can recognize data such as text, images, and sounds.
  • Target detection algorithms based on deep learning can enable electronic devices to automatically find targets in images and determine their positions and sizes.
  • the target detected by the target detection algorithm is determined by the labeled samples used in training. For example, in this embodiment of the present application, a series of images tagged with a person can be used to train the target detection algorithm. This allows the target detection algorithm to recognize the person in the image and determine the person's position and body area in the image.
  • the persons in the embodiments of the present application may include only persons, or persons and objects related to persons, such as objects in contact with persons, which are not limited here.
  • the samples labeled on the target it is only necessary to use the samples labeled on the target to be identified as the training set to train the corresponding target detection algorithm.
  • the characters in the training set may be the teacher and the objects in contact with the teacher.
  • the target detected by the target is referred to as the target to be processed.
  • the target detection algorithm in the embodiment of the present application may be preset at the factory, or may be trained by the user using his own training set, which is not limited here.
  • FIG. 1 it is a schematic diagram of the effect of screenshots obtained by taking screenshots of teaching videos in the prior art.
  • Fig. 1 it is a schematic diagram of the effect of screenshots obtained by taking screenshots of teaching videos in the prior art.
  • the electronic device will automatically take multiple screenshots of the teaching video. As the characters in the instructional video move, the previously blocked area will be exposed. The electronic device puzzles the areas exposed due to movement in the screenshot pictures obtained by taking multiple screenshots to obtain the final screenshot pictures, so that more information can be displayed in the final screenshot pictures. As shown in FIG. 2, it is a schematic diagram of the effect of the screenshot picture obtained by taking the screenshot of the teaching video in the embodiment of this application.
  • FIG. 3 is a schematic structural diagram of an electronic device 100 provided by an embodiment of the present application.
  • the electronic device 100 may have more or fewer components than shown in the figure, may combine two or more components, or may have different component configurations.
  • the various components shown in the figure may be implemented in hardware, software, or a combination of hardware and software including one or more signal processing and/or application specific integrated circuits.
  • the electronic device 100 may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2.
  • Mobile communication module 150 wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone jack 170D, sensor module 180, buttons 190, motor 191, indicator 192, camera 193, display screen 194 and Subscriber identification module (subscriber identification module, SIM) card interface 195, etc.
  • SIM Subscriber identification module
  • the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and ambient light Sensor 180L, bone conduction sensor 180M, etc.
  • the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100.
  • the electronic device 100 may include more or fewer components than shown, or combine certain components, or split certain components, or arrange different components.
  • the illustrated components can be implemented in hardware, software, or a combination of software and hardware.
  • the processor 110 may include one or more processing units.
  • the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), and an image signal processor. (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU) Wait.
  • AP application processor
  • modem processor modem processor
  • GPU graphics processing unit
  • image signal processor image signal processor
  • ISP image signal processor
  • controller memory
  • video codec digital signal processor
  • DSP digital signal processor
  • NPU neural-network processing unit
  • the different processing units may be independent devices or integrated in one or more processors.
  • the controller may be the nerve center and command center of the electronic device 100.
  • the controller can generate operation control signals according to the instruction operation code and timing signals to complete the control of fetching and executing instructions.
  • a memory may also be provided in the processor 110 to store instructions and data.
  • the memory in the processor 110 is a cache memory.
  • the memory can store instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. Repeated accesses are avoided, the waiting time of the processor 110 is reduced, and the efficiency of the system is improved.
  • the processor 110 may include one or more interfaces.
  • the interface can include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, and a universal asynchronous transmitter (universal asynchronous transmitter) interface.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • PCM pulse code modulation
  • UART universal asynchronous transmitter
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM subscriber identity module
  • USB Universal Serial Bus
  • the I2C interface is a bidirectional synchronous serial bus, which includes a serial data line (SDA) and a serial clock line (SCL).
  • the processor 110 may include multiple sets of I2C buses.
  • the processor 110 may couple the touch sensor 180K, charger, flash, camera 193, etc., respectively through different I2C bus interfaces.
  • the processor 110 may couple the touch sensor 180K through an I2C interface, so that the processor 110 and the touch sensor 180K communicate through the I2C bus interface to implement the touch function of the electronic device 100.
  • the I2S interface can be used for audio communication.
  • the processor 110 may include multiple sets of I2S buses.
  • the processor 110 may be coupled with the audio module 170 through an I2S bus to implement communication between the processor 110 and the audio module 170.
  • the audio module 170 may transmit audio signals to the wireless communication module 160 through an I2S interface, so as to realize the function of answering calls through a Bluetooth headset.
  • the PCM interface can also be used for audio communication to sample, quantize and encode analog signals.
  • the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface.
  • the audio module 170 may also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to realize the function of answering calls through the Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
  • the UART interface is a universal serial data bus used for asynchronous communication.
  • the bus can be a two-way communication bus. It converts the data to be transmitted between serial communication and parallel communication.
  • the UART interface is generally used to connect the processor 110 and the wireless communication module 160.
  • the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to realize the Bluetooth function.
  • the audio module 170 may transmit audio signals to the wireless communication module 160 through a UART interface, so as to realize the function of playing music through a Bluetooth headset.
  • the MIPI interface can be used to connect the processor 110 with the display screen 194, the camera 193 and other peripheral devices.
  • MIPI interfaces include camera serial interface (camera serial interface, CSI), display serial interface (display serial interface, DSI), etc.
  • the processor 110 and the camera 193 communicate through a CSI interface to implement the shooting function of the electronic device 100.
  • the processor 110 and the display screen 194 communicate through a DSI interface to realize the display function of the electronic device 100.
  • the GPIO interface can be configured through software.
  • the GPIO interface can be configured as a control signal or as a data signal.
  • the GPIO interface can be used to connect the processor 110 with the camera 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, and so on.
  • the GPIO interface can also be configured as an I2C interface, I2S interface, UART interface, MIPI interface, etc.
  • the SIM interface can be used to communicate with the SIM card interface 195 to realize the function of transmitting data to the SIM card or reading data in the SIM card.
  • the USB interface 130 is an interface that complies with the USB standard specification, and specifically may be a Mini USB interface, a Micro USB interface, a USB Type C interface, and so on.
  • the USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transfer data between the electronic device 100 and peripheral devices. It can also be used to connect earphones and play audio through earphones.
  • the interface can also be used to connect other electronic devices, such as AR devices.
  • the interface connection relationship between the modules illustrated in the embodiment of the present invention is merely a schematic description, and does not constitute a structural limitation of the electronic device 100.
  • the electronic device 100 may also adopt different interface connection modes in the foregoing embodiments, or a combination of multiple interface connection modes.
  • the charging management module 140 is used to receive charging input from the charger.
  • the charger can be a wireless charger or a wired charger.
  • the power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110.
  • the power management module 141 receives input from the battery 142 and/or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160.
  • the wireless communication function of the electronic device 100 can be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor.
  • the antenna 1 and the antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in the electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
  • antenna 1 can be multiplexed as a diversity antenna of a wireless local area network.
  • the antenna can be used in combination with a tuning switch.
  • the mobile communication module 150 may provide a wireless communication solution including 2G/3G/4G/5G and the like applied to the electronic device 100.
  • the mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), and the like.
  • the mobile communication module 150 can receive electromagnetic waves by the antenna 1, and perform processing such as filtering, amplifying and transmitting the received electromagnetic waves to the modem processor for demodulation.
  • the mobile communication module 150 can also amplify the signal modulated by the modem processor, and convert it into electromagnetic wave radiation via the antenna 1.
  • at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110.
  • at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be provided in the same device.
  • the modem processor may include a modulator and a demodulator.
  • the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal.
  • the demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing.
  • the low-frequency baseband signal is processed by the baseband processor and then passed to the application processor.
  • the application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.), or displays an image or video through the display screen 194.
  • the modem processor may be an independent device.
  • the modem processor may be independent of the processor 110 and be provided in the same device as the mobile communication module 150 or other functional modules.
  • the wireless communication module 160 can provide applications on the electronic device 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), and global navigation satellites.
  • WLAN wireless local area networks
  • BT wireless fidelity
  • GNSS global navigation satellite system
  • FM frequency modulation
  • NFC near field communication technology
  • infrared technology infrared, IR
  • the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110.
  • the wireless communication module 160 may also receive a signal to be sent from the processor 110, perform frequency modulation, amplify it, and convert it into electromagnetic waves to radiate through the antenna 2.
  • the antenna 1 of the electronic device 100 is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology.
  • the wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband Code division multiple access (wideband code division multiple access, WCDMA), time-division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC , FM, and/or IR technology, etc.
  • the GNSS may include the global positioning system (GPS), the global navigation satellite system (GLONASS), the Beidou navigation satellite system (BDS), and the quasi-zenith satellite system (quasi). -zenith satellite system, QZSS) and/or satellite-based augmentation systems (SBAS).
  • GPS global positioning system
  • GLONASS global navigation satellite system
  • BDS Beidou navigation satellite system
  • QZSS quasi-zenith satellite system
  • SBAS satellite-based augmentation systems
  • the electronic device 100 implements a display function through a GPU, a display screen 194, an application processor, and the like.
  • the GPU is a microprocessor for image processing, connected to the display 194 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations and is used for graphics rendering.
  • the processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
  • the display screen 194 is used to display images, videos, and the like.
  • the display screen 194 includes a display panel.
  • the display panel can adopt liquid crystal display (LCD), organic light-emitting diode (OLED), active-matrix organic light-emitting diode or active-matrix organic light-emitting diode (active-matrix organic light-emitting diode).
  • LCD liquid crystal display
  • OLED organic light-emitting diode
  • active-matrix organic light-emitting diode active-matrix organic light-emitting diode
  • emitting diode AMOLED
  • flexible light-emitting diode flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light emitting diode (QLED), etc.
  • the electronic device 100 may include one or N display screens 194, and N is a positive integer greater than one.
  • the electronic device 100 can realize a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.
  • the ISP is used to process the data fed back from the camera 193. For example, when taking a picture, the shutter is opened, the light is transmitted to the photosensitive element of the camera through the lens, the light signal is converted into an electrical signal, and the photosensitive element of the camera transfers the electrical signal to the ISP for processing and is converted into an image visible to the naked eye.
  • ISP can also optimize the image noise, brightness, and skin color. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene.
  • the ISP may be provided in the camera 193.
  • the camera 193 is used to capture still images or videos.
  • the object generates an optical image through the lens and is projected to the photosensitive element.
  • the photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CMOS complementary metal-oxide-semiconductor
  • the photosensitive element converts the optical signal into an electrical signal, and then transfers the electrical signal to the ISP to convert it into a digital image signal.
  • ISP outputs digital image signals to DSP for processing.
  • DSP converts digital image signals into standard RGB, YUV and other formats of image signals.
  • the electronic device 100 may include one or N cameras 193, and N is a positive integer greater than one.
  • Digital signal processors are used to process digital signals. In addition to digital image signals, they can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the energy of the frequency point.
  • Video codecs are used to compress or decompress digital video.
  • the electronic device 100 may support one or more video codecs. In this way, the electronic device 100 can play or record videos in multiple encoding formats, such as: moving picture experts group (MPEG) 1, MPEG2, MPEG3, MPEG4, and so on.
  • MPEG moving picture experts group
  • MPEG2 MPEG2, MPEG3, MPEG4, and so on.
  • NPU is a neural-network (NN) computing processor.
  • NN neural-network
  • the NPU can realize applications such as intelligent cognition of the electronic device 100, such as image recognition, face recognition, voice recognition, text understanding, and so on.
  • the external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100.
  • the external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example, save music, video and other files in an external memory card.
  • the internal memory 121 may be used to store computer executable program code, where the executable program code includes instructions.
  • the processor 110 executes various functional applications and data processing of the electronic device 100 by running instructions stored in the internal memory 121.
  • the internal memory 121 may include a storage program area and a storage data area.
  • the storage program area can store an operating system, at least one application required by a function (such as a face recognition function, a fingerprint recognition function, a mobile payment function, etc.) and so on.
  • the storage data area can store data created during the use of the electronic device 100 (such as face information template data, fingerprint information template, etc.) and the like.
  • the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), and the like.
  • UFS universal flash storage
  • the electronic device 100 can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor. For example, music playback, recording, etc.
  • the audio module 170 is used to convert digital audio information into an analog audio signal for output, and is also used to convert an analog audio input into a digital audio signal.
  • the audio module 170 can also be used to encode and decode audio signals.
  • the audio module 170 may be provided in the processor 110, or part of the functional modules of the audio module 170 may be provided in the processor 110.
  • the speaker 170A also called “speaker” is used to convert audio electrical signals into sound signals.
  • the electronic device 100 can listen to music through the speaker 170A, or listen to a hands-free call.
  • the receiver 170B also called a "handset" is used to convert audio electrical signals into sound signals.
  • the electronic device 100 answers a call or voice message, it can receive the voice by bringing the receiver 170B close to the human ear.
  • the microphone 170C also called “microphone”, “microphone”, is used to convert sound signals into electrical signals.
  • the user can make a sound by approaching the microphone 170C through the human mouth, and input the sound signal to the microphone 170C.
  • the electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C, which can implement noise reduction functions in addition to collecting sound signals. In other embodiments, the electronic device 100 may also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and realize directional recording functions.
  • the earphone interface 170D is used to connect wired earphones.
  • the earphone interface 170D may be a USB interface 130, or a 3.5mm open mobile terminal platform (OMTP) standard interface, or a cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
  • OMTP open mobile terminal platform
  • CTIA cellular telecommunications industry association
  • the pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal.
  • the pressure sensor 180A may be provided on the display screen 194.
  • the capacitive pressure sensor may include at least two parallel plates with conductive materials.
  • the electronic device 100 determines the intensity of the pressure according to the change in capacitance.
  • the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A.
  • the electronic device 100 may also calculate the touched position according to the detection signal of the pressure sensor 180A.
  • touch operations that act on the same touch position but have different touch operation intensities can correspond to different operation instructions. For example: when a touch operation whose intensity is less than the first pressure threshold is applied to the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.
  • the gyro sensor 180B may be used to determine the movement posture of the electronic device 100.
  • the angular velocity of the electronic device 100 around three axes ie, x, y, and z axes
  • the gyro sensor 180B can be used for image stabilization.
  • the gyro sensor 180B detects the shake angle of the electronic device 100, calculates the distance that the lens module needs to compensate according to the angle, and allows the lens to counteract the shake of the electronic device 100 through reverse movement to achieve anti-shake.
  • the gyro sensor 180B can also be used for navigation and somatosensory game scenes.
  • the air pressure sensor 180C is used to measure air pressure.
  • the electronic device 100 calculates the altitude based on the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.
  • the magnetic sensor 180D includes a Hall sensor.
  • the electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip holster.
  • the electronic device 100 can detect the opening and closing of the flip according to the magnetic sensor 180D. Then, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, features such as automatic unlocking of the flip cover are set.
  • the acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of electronic devices, and be used in applications such as horizontal and vertical screen switching, pedometers and so on.
  • the electronic device 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 may use the distance sensor 180F to measure the distance to achieve fast focusing.
  • the proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector such as a photodiode.
  • the light emitting diode may be an infrared light emitting diode.
  • the electronic device 100 emits infrared light to the outside through the light emitting diode.
  • the electronic device 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that there is no object near the electronic device 100.
  • the electronic device 100 can use the proximity light sensor 180G to detect that the user holds the electronic device 100 close to the ear to talk, so as to automatically turn off the screen to save power.
  • the proximity light sensor 180G can also be used in leather case mode, and the pocket mode will automatically unlock and lock the screen.
  • the ambient light sensor 180L is used to sense the brightness of the ambient light.
  • the electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived brightness of the ambient light.
  • the ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures.
  • the ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in the pocket to prevent accidental touch.
  • the fingerprint sensor 180H is used to collect fingerprints.
  • the electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photographs, fingerprint answering calls, and so on.
  • the temperature sensor 180J is used to detect temperature.
  • the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold value, the electronic device 100 reduces the performance of the processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection.
  • the electronic device 100 when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to avoid abnormal shutdown of the electronic device 100 due to low temperature.
  • the electronic device 100 boosts the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
  • Touch sensor 180K also called “touch panel”.
  • the touch sensor 180K may be provided on the display screen 194, and the touch screen is composed of the touch sensor 180K and the display screen 194, which is also called a “touch screen”.
  • the touch sensor 180K is used to detect touch operations acting on or near it.
  • the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
  • the visual output related to the touch operation can be provided through the display screen 194.
  • the touch sensor 180K may also be disposed on the surface of the electronic device 100, which is different from the position of the display screen 194.
  • the button 190 includes a power-on button, a volume button, and so on.
  • the button 190 may be a mechanical button. It can also be a touch button.
  • the electronic device 100 may receive key input, and generate key signal input related to user settings and function control of the electronic device 100.
  • the motor 191 can generate vibration prompts.
  • the motor 191 can be used for incoming call vibration notification, and can also be used for touch vibration feedback.
  • touch operations that act on different applications can correspond to different vibration feedback effects.
  • Acting on touch operations in different areas of the display screen 194, the motor 191 can also correspond to different vibration feedback effects.
  • Different application scenarios for example: time reminding, receiving information, alarm clock, games, etc.
  • the touch vibration feedback effect can also support customization.
  • the indicator 192 may be an indicator light, which may be used to indicate the charging status, power change, or to indicate messages, missed calls, notifications, and so on.
  • the SIM card interface 195 is used to connect to the SIM card.
  • the SIM card can be inserted into the SIM card interface 195 or pulled out from the SIM card interface 195 to achieve contact and separation with the electronic device 100.
  • the electronic device 100 may support 1 or N SIM card interfaces, and N is a positive integer greater than 1.
  • the SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, etc.
  • the same SIM card interface 195 can insert multiple cards at the same time. The types of the multiple cards can be the same or different.
  • the SIM card interface 195 can also be compatible with different types of SIM cards.
  • the SIM card interface 195 can also be compatible with external memory cards.
  • the electronic device 100 interacts with the network through the SIM card to implement functions such as call and data communication.
  • FIG. 4 is a block diagram of the software structure of the electronic device 100 according to an embodiment of the present invention.
  • the layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Communication between layers through software interface.
  • the system is divided into four layers, from top to bottom, the application layer, the application framework layer, the runtime and system libraries, and the kernel layer.
  • the application layer can include a series of application packages.
  • the application package may include a screenshot module, camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and other applications (also called applications).
  • the screenshot module may be used to support the electronic device to execute the screenshot method in the embodiment of the present application.
  • the application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer.
  • the application framework layer includes some predefined functions.
  • the application framework layer can include a window manager, a content provider, a view system, a phone manager, a resource manager, and a notification manager.
  • the window manager is used to manage window programs.
  • the window manager can obtain the size of the display screen, determine whether there is a status bar, lock the screen, take a screenshot, etc.
  • the content provider is used to store and retrieve data and make these data accessible to applications.
  • the data may include video, image, audio, phone calls made and received, browsing history and bookmarks, phone book, etc.
  • the view system includes visual controls, such as controls that display text, controls that display pictures, and so on.
  • the view system can be used to build applications.
  • the display interface can be composed of one or more views.
  • a display interface that includes a short message notification icon may include a view that displays text and a view that displays pictures.
  • the phone manager is used to provide the communication function of the electronic device 100. For example, the management of the call status (including connecting, hanging up, etc.).
  • the resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and so on.
  • the notification manager enables the application to display notification information in the status bar, which can be used to convey notification-type messages, and it can automatically disappear after a short stay without user interaction.
  • the notification manager is used to notify download completion, message reminders, and so on.
  • the notification manager can also be a notification that appears in the status bar at the top of the system in the form of a chart or a scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialogue interface.
  • prompt text information in the status bar sound a prompt sound, electronic device vibration, flashing indicator light, etc.
  • the runtime includes core libraries and virtual machines. Responsible for system scheduling and management at runtime.
  • the core library consists of two parts: one part is the function function that the java language needs to call, and the other part is the core library of the system.
  • the application layer and the application framework layer run in a virtual machine.
  • the virtual machine executes the java files of the application layer and the application framework layer as binary files.
  • the virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
  • the system library can include multiple functional modules. For example: surface manager (surface manager), media library (Media Libraries), three-dimensional graphics processing library (for example: OpenGL ES), two-dimensional graphics engine (for example: SGL), etc.
  • the surface manager is used to manage the display subsystem, and provides a combination of two-dimensional (2-Dimensional, 2D) and three-dimensional (3-Dimensional, 3D) layers for multiple applications.
  • the media library supports playback and recording of a variety of commonly used audio and video formats, as well as still image files.
  • the media library can support multiple audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
  • the 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis, and layer processing.
  • the two-dimensional graphics engine is a graphics engine for 2D drawing.
  • the kernel layer is the layer between hardware and software.
  • the kernel layer contains at least display driver, camera driver, audio driver, sensor driver, and virtual card driver.
  • the corresponding hardware interrupt is sent to the kernel layer.
  • the kernel layer processes the touch operation into the original input event (including touch coordinates, time stamp of the touch operation, etc.).
  • the original input events are stored in the kernel layer.
  • the application framework layer obtains the original input event from the kernel layer and identifies the control corresponding to the input event. Taking the touch operation as a touch click operation, and the control corresponding to the click operation is the control of the camera application icon as an example, the camera application calls the interface of the application framework layer to start the camera application, and then starts the camera driver by calling the kernel layer.
  • the camera 193 captures still images or videos.
  • FIG. 5 is a schematic flowchart of a screenshot method in an embodiment of the present application:
  • the electronic device performs N screenshots of the video in the first time period to obtain N first screenshot pictures;
  • N is a positive integer not less than 2.
  • start and end moments of the first time period are determined according to the user's screen capture operation.
  • the method for determining the first time period may also be different, which is not limited here.
  • the user's screen capture operation may include the first operation and the second operation that are not continuously completed.
  • the electronic device may determine the starting time of the first time period.
  • the electronic device may determine the stop moment of the first time period. It is understandable that, when the electronic device determines the start of the first time period, S501 and subsequent steps can be started. It is not limited to the execution of S501 and subsequent steps only when the stop time of the first time period is determined.
  • FIG. 6 a set of interface schematic diagrams of screenshot operations provided by an embodiment of this application.
  • FIG. 6 is an exemplary schematic diagram of the user interface 61 when the instructional video is played on the display screen 194 of the electronic device.
  • FIG. 6(b) it is an exemplary schematic diagram of the user interface 62 after the user triggers the screenshot function.
  • the user interface 62 may display the screenshot mode option indicator 601, which may include multiple screenshot mode selection controls: for example, the normal screenshot control 601A, the long image screenshot control 601B, and the first mode screenshot control 601C , The second mode screenshot control 601D and so on.
  • the ordinary screenshot control 601A is used to provide ordinary screenshot function after receiving the user's click operation
  • the long picture screenshot control 601B is used to provide the long picture screenshot function after receiving the user's click operation
  • the first mode screenshot control 601C is used to provide a video screenshot function after receiving a user's click operation, and determine the moment of the click operation as the start time of the first time period;
  • the second solution screenshot control 602C is used to provide a video screenshot function after receiving a user's click operation, and provide a time period selection control for the user to select the first time period.
  • the screen capture mode option may or may be displayed in the user interface 62 in other ways.
  • FIG. 6(c) it is an exemplary schematic diagram of the user clicking the first mode screenshot control 601C.
  • the electronic device can display the user interface 63 as shown in (d) of FIG. 6 on the display screen 194.
  • the user triggering the screenshot function operation shown in Figure 6 (b) and the user clicking the first method screenshot control 601C shown in Figure 6 (c) belong to the above user’s screenshot operation.
  • the first operation may also be a single operation.
  • a certain combination of keys can be set, or a touch action can be preset, which can directly trigger the function of the screenshot control in the first mode.
  • the user interface 61 shown in (a) of FIG. 6 is displayed on the display screen 194 of the electronic device, when the teaching video is played, in response to the first operation of the user, the electronic device may display on the display screen 194
  • the user interface 63 is shown in (d) in FIG. 6. There is no limitation here.
  • FIG. 6 it is an exemplary schematic diagram of the user interface 63 in a screenshot state.
  • the user interface 63 may display a screenshot status indicator 602, a cancel control 603, and a stop control 604.
  • the screenshot status indicator 602 displays text: in the screenshot, it is used to indicate that the screenshot is currently in the video screenshot state;
  • the cancel control 603 is used to cancel the screenshot operation after receiving the user's click operation
  • the stop control 604 is used to determine that the click time is the stop time of the first time period after receiving the user's click operation, and complete the video screen capture function.
  • the display screen 194 of the electronic device may display the user interface 64 as shown in (f) in FIG. .
  • a screenshot status indicator 605 may be displayed in the user interface 64.
  • the screen capture status indicator 605 displays the text: Screen capture is successful, which is used to indicate that the video screen capture has been successful.
  • both the first operation and the second operation shown in FIG. 6 are merely exemplary implementations.
  • the first operation and the second operation can be implemented in many other ways, as long as the first operation can determine the start time of the first time period, and the second operation can determine the stop time of the first time period , There is no limitation here.
  • the user's screen capture operation may also be completed continuously at one time.
  • the electronic device may provide a time period selection control for the user to select the start and end moments of the first time period. After the user chooses to determine the start and end time of the first time period, S501 and subsequent steps can be continued.
  • FIG. 7 it is a schematic diagram of another set of screen capture operations provided by an embodiment of this application.
  • the display screen 194 of the electronic device may display the user as shown in (d) in FIG. Interface 73.
  • the user interface 73 may include a time selection control 701, a start time flag 702, a stop time flag 703, a confirm control 704 and a cancel control 705.
  • the time selection control 701 is used to display the timeline of the video.
  • the start time flag 702 is used to determine the start time of the first time period according to the drag of the user;
  • the stop time flag 703 is used to determine the stop time of the first time period according to the drag of the user
  • the determination control 704 is used to determine the start and end times of the first time period according to the positions of the start time flag 702 and the stop time flag 703 on the time selection control 701 after receiving the user's click operation, and complete the video screenshot Function;
  • the cancel control 705 is used to cancel the screenshot operation after receiving the user's click operation.
  • the user can drag the start time flag 702 and the stop time flag 703 to determine the start time and the stop time of the first time period.
  • the user can click the OK control 704 to determine the start and end time of the first time period.
  • the electronic device will continue to complete the video screen capture function, and display the user interface 74 as shown in (f) in FIG. 7.
  • a screenshot status indicator 706 may be displayed in the user interface 74.
  • the screen capture status indicator 706 displays the text: Screen capture is successful, which is used to indicate that the video screen capture has been successful.
  • Figure 7 is only an example of a continuous screenshot operation. In actual applications, there can be many other ways of screenshot operations, as long as it can determine the start and end of the first time period. There is no limitation here.
  • the electronic device may take a screenshot in the first time period according to a preset time period. For example, assuming that the preset time period is 2 seconds, the electronic device may take a screenshot of the video every 2 seconds within the first time period to generate a first screenshot picture.
  • the electronic device may also perform real-time target detection on the video in the first time period, and whenever it is determined that the position of the detected target to be processed in the video changes beyond the preset distance threshold , Take a screenshot and generate a first screenshot picture.
  • a screenshot can be taken every time the user receives a user click in the first time period, resulting in a first time period.
  • a screenshot, etc. are not limited here.
  • step S501 multiple first screenshot pictures will be continuously generated in the first time period.
  • the electronic device does not need to wait for all the N screenshots in the first time period to be generated before performing subsequent steps. After the first screenshot is generated, the subsequent steps can be executed at the same time, which is not limited here.
  • S502 The electronic device performs target detection on the first screenshot picture, and determines the area where the target to be processed is located.
  • the electronic device After the electronic device obtains the first screenshot picture, it will perform target detection on the first screenshot picture, and the target detection can automatically identify the target to be processed in the first screenshot picture, thereby determining the area where the target to be processed is located in the picture.
  • the target detection algorithm used by the electronic device 100 for target detection may be preset by the manufacturer and stored in the internal memory 121 of the electronic device 100, or it may be downloaded from the cloud server when the electronic device 100 needs to use the target detection algorithm. , It can be stored in the internal memory 121 after the processor 110 of the electronic device 100 is trained through the training set selected by the user, or it can be obtained from the server of another third-party service provider, etc., which is not limited here. .
  • FIG. 8 it is a schematic diagram of an exemplary scenario for determining the area where the target to be processed is located.
  • A) in Figure 8 is a first screenshot obtained by taking a screenshot of the video in the first time period, where the teacher is standing in front of the background. The electronic device performs target detection on the first screenshot picture, and the target detection algorithm used is the teacher to be processed, and the area where the teacher is located in the first screenshot picture can be determined.
  • the area shown by the dashed frame is the area where the teacher is determined by target detection, that is, the area where the target to be processed is located.
  • the electronic device will obtain N first screenshots within the first time period. During the target detection process for the N first screenshots, if a certain first screenshot is due to a screenshot quality problem, If the image quality requirement for target detection is not met, the electronic device can delete this first screenshot and continue to process the subsequent first screenshot.
  • the electronic device processes the area where the target to be processed is located in the first screenshot picture as a transparent area to obtain M second screenshot pictures;
  • the electronic device After the electronic device determines the area where the target to be processed is located in the first screenshot picture, it can process the area as a transparent area to obtain M second screenshot pictures.
  • M is a positive integer less than or equal to N.
  • M is less than N. If the electronic device does not delete the first screenshot picture, M is equal to N.
  • the area of the target to be processed in the first screenshot is treated as a transparent area
  • the second screenshot can be passed through Second, the transparent area on the screenshot picture, see the content located in the transparent area on the picture below the second screenshot picture.
  • FIG. 9 it is a schematic diagram of an exemplary scene of the transparent area.
  • FIG. 9 it is a second screenshot picture displayed on the display screen 194 of the electronic device 100, in which the area enclosed by the dashed frame is a transparent area.
  • FIG. 9 it is a schematic diagram of an exemplary scene of the transparent area.
  • FIG. 9 it is a second screenshot picture displayed on the display screen 194 of the electronic device 100, in which the area enclosed by the dashed frame is a transparent area.
  • FIG. 9(b) it is another picture A, in which there are text information EF and 1234 in the part corresponding to the transparent area of the second screenshot picture, and there are some text information in other parts.
  • the second screenshot picture shown in (a) in FIG. 9 on the top and picture A shown in (b) in FIG. Picture B as shown in (c) in Figure 9 will be displayed.
  • the picture B not only the content on the second screenshot picture, but also the content in the position corresponding to the transparent area of the second screenshot picture in the picture A is included.
  • the electronic device After the electronic device obtains two or more second screenshot pictures, it can start to superimpose the second screenshot pictures. After the electronic device has superimposed all the obtained M second screenshot pictures, the third screenshot picture is obtained. More information is displayed in the third screenshot picture than in the first screenshot pictures. The information refers to the information displayed in the background and does not include the target to be processed.
  • the third screenshot picture displays the information of the non-transparent area of the second screenshot picture superimposed on the uppermost layer and the information of the first area corresponding to the transparent area of the second screenshot picture superimposed on the uppermost layer.
  • Information is the area corresponding to the transparent area of the second screenshot picture in the next layer and the position on the second screenshot picture in the next layer; the information of the first area includes the non-transparent area in the first area information;
  • the information of the first area also includes the information of the second area corresponding to the transparent area of the first area; the second area is the position and the second area on the second screenshot of the next layer.
  • the second screenshot is the second screenshot superimposed on the bottom layer.
  • the order in which the M second screenshot pictures are superimposed is not limited here. You can start superimposing after two second screenshot pictures are generated, and then superimpose the newly obtained second screenshot picture with the superimposed screenshot picture; or you can superimpose all the second screenshot pictures together; also It is possible to superimpose part of the obtained second screenshot pictures separately, and then superimpose the pictures obtained after superimposing separately, which is not limited here.
  • the electronic device when the electronic device superimposes the M second screenshot pictures, there may be different superimposition sequences according to different situations.
  • the display screen 194 of the electronic device may display the user interface 101 as shown in FIG. 10(a).
  • the user interface 101 is a screenshot setting interface, which may include a screenshot function switch control 1001, a video screenshot superimposition sequence selection control 1002, and a screenshot shortcut gesture selection control 1003.
  • the screen capture function switch control 1001 is used to determine whether to activate the screen capture function according to the user's selection
  • the video screenshot superimposing order selection control 1002 is used to display the video screenshot superimposing order selection interface after receiving the user's click operation;
  • the screenshot shortcut gesture control 1003 is used to display the selection interface of the screenshot shortcut gesture after receiving the user's click operation.
  • the display 194 of the electronic device can display the user interface as shown in (b) in FIG. 10 102.
  • the user interface 102 is an interface for selecting the sequence of superimposing video screenshots.
  • the user interface 102 may include a manual adjustment switch control 1004, and a default order selection control 1005.
  • a manual adjustment switch control 1004 and a default order selection control 1005.
  • the manual adjustment switch control 1004 is used to turn on and off the manual adjustment function according to user operations.
  • step S504 is executed.
  • the manual adjustment of the order of the N first screenshot pictures by the user can indicate that the user superimposes the M second screenshot pictures Order adjustment.
  • the option sub-control 1005A on the picture after the playback time is used to set the second screenshot picture to be superimposed after the user's click operation is received, in the order in which the pictures after the playback time are superimposed on top .
  • the manual adjustment function is turned on, when displaying the N first screenshot pictures obtained from the screenshot, or displaying the M second screenshot pictures obtained from the processing, they are displayed in the order in which the pictures after the playback time are superimposed on it;
  • the option sub-control 1005B on the picture with the first playing time is used to set when the second screenshot picture is superimposed after receiving the user's click operation, the superimposition will be performed in the order in which the picture with the first playing time is superimposed on it .
  • the manual adjustment function is turned on, when displaying the N first screenshot pictures obtained by taking screenshots, or displaying the M second screenshot pictures obtained by processing, they are displayed in the order in which the pictures with the first playing time are superimposed on it.
  • the default sequence selection control 1005 is the option that the picture after the playback time is on the top
  • the child control 1005A is selected.
  • the electronic device will by default superimpose the M second screenshot pictures in the order in which the pictures with the later playing time are on top to obtain the third screenshot pictures.
  • FIG. 10 is only an exemplary illustration of the screenshot setting interface and the video screenshot superimposing sequence selection interface.
  • the screenshot setting interface may have more or fewer options than those shown in (a) in FIG. 10.
  • the video screenshot superimposing order selection interface may or may not exist. If there is a video screenshot superimposing sequence selection interface, there may also be more or less options than those shown in (b) in FIG. 10, which are not limited here.
  • FIG. 11 is an exemplary schematic diagram of the processing process of the screenshot method in an embodiment of the application.
  • the electronic device takes a screenshot and obtains three first screenshot pictures, which are picture 1, picture 2, and picture 3 in the order of the playing time of the pictures in the video from front to back.
  • the electronic device can identify the area where the teacher is in picture 1, picture 2 and picture 3 through target detection, and process these areas as transparent areas to obtain 3 second screenshot pictures, respectively: pictures 1A, picture 2A and picture 3A.
  • step S504 Since the video screenshot superimposing sequence interface selects the option sub-control 1005A on the picture with the later playing time, when step S504 is performed, the electronic device will superimpose the pictures obtained after the playing time on it in turn. The second screenshot image is superimposed.
  • the play time of the picture 2 corresponding to the picture 2A is located behind the picture A corresponding to the picture 1A in the video. Therefore, when the electronic device superimposes the picture 2A and the picture 1A, it superimposes the picture 2A on the top and the picture 1A on the bottom to obtain the picture 4 as shown in FIG. 10.
  • the ABCDE and FGHIJK strings can be displayed completely, and for the 123456 string, it can display more content than the picture 1 and the picture 2 alone, only 3 in the 123456 string It is blocked by the teacher in picture 1 and picture 2, but cannot be displayed in picture 4.
  • FIG. 12 it is a schematic diagram of the process of superimposing picture 1A and picture 2A to generate picture 4.
  • Picture 1A has transparent area 1 and picture 2A has transparent area 2.
  • Picture 2A is on the top, and picture 1A is superimposed on the bottom to get picture 4. Therefore, not only the entire content in the image 2A is displayed in the image 4, but also the content corresponding to the transparent area in the image 1A can be displayed through the transparent area 2 in the image 2A.
  • the overlapping part of the transparent area 2 in the picture 2A and the transparent area 1 in the picture 1A is still a transparent area, and becomes the transparent area 3 in the picture 4.
  • the playback time of the picture 3 corresponding to the picture 3A is located behind the picture 2 corresponding to the picture 2A in the video. Therefore, when the electronic device superimposes the picture 3A and the picture 4, it superimposes the picture 3A on the top and the picture 4 on the bottom to obtain the picture 5 as shown in FIG. 11.
  • the character strings ABCDE, FGHIJK, 789 and 123456 can be displayed completely. Compared with Picture 1, Picture 2 and Picture 3, it shows more content.
  • the three obtained second screenshot pictures have all been superimposed, and the obtained picture 5 is the third screenshot picture.
  • step S501 the user sets the state of the manual adjustment switch control 1004 to activated in the video screenshot superimposition sequence selection interface, and the electronic device defaults to the first screenshot picture for the user to select the superimposition sequence.
  • step S501 the user performs a screenshot operation, and the display screen 194 of the electronic device displays (a), (b), (c), (d), (e) in Figure 6 or (e) in Figure 7
  • the display of the electronic device may also display a user interface 141 as shown in (a) of FIG. 14. In the user interface 141, the electronic device pops up a stacking sequence selection window 1401.
  • the superimposition sequence selection window 1401 may contain a text identifier: superimposition sequence selection (from top to bottom), which is used to indicate to the user that this window can be used to adjust the superimposition sequence of the video screenshot pictures, and the pictures are superimposed from top to bottom. Shown below.
  • the default sequence selection control 1005 has the following picture on the option sub-control 1005A in the selected state, therefore, the display order of the four first screenshot pictures for adjusting the order shown in Fig. 14 These are: the first screenshot taken at 1 hour and 20 minutes of the video, the first screenshot taken at the first hour and 16 minutes of the video, the first screenshot taken at the first hour and 13 minutes of the video, and the first screenshot taken at the first hour and 13 minutes of the video. The first screenshot taken in 1 hour and 8 minutes.
  • the superimposition order selection window 1401 may also include a confirm control 1402 for determining the superimposition order adjusted by the user; and a cancel control 1403 for canceling the superimposition order adjusted by the user and directly use the default order.
  • the electronic device may display the user as shown in (f) in FIG. 6 or (f) in FIG. 7 on the display screen. interface.
  • the electronic device superimposes the M second screenshot pictures, and after obtaining the third screenshot picture, the third screenshot picture may be stored in the internal memory 121 of the electronic device as the screenshot finally obtained by the screenshot operation. It is also possible to output the third screenshot picture to the display screen 194 of the electronic device as the screenshot finally obtained by the screenshot operation. There is no limitation here.
  • the electronic device can use the background color of the picture to fill the transparent area, or use the picture intelligent restoration technology.
  • the filling and completion of the transparent area is not limited here.
  • the electronic device may also superimpose the location of the target to be processed in the first screenshot picture corresponding to the second screenshot picture superimposed on the uppermost layer Translucent processing is performed on the area to obtain a semi-transparent object to be processed; then the semi-transparent object to be processed is superimposed on the third screenshot image to obtain a fourth screenshot image, and the fourth screenshot image is stored.
  • the degree of translucency when translucent processing is performed on the area where the target to be processed is located can be set according to presets, can be manually adjusted by the user in real time, or can be intelligently adjusted by the electronic device according to the third screenshot picture and the content of the area where the target to be processed is located In order not to affect the display of the content on the third screenshot, there is no limitation here.
  • the translucent target to be processed When the translucent target to be processed is superimposed on the third screenshot picture, it can be superimposed on the same position of the target to be processed corresponding to the translucent target to be processed on the first screenshot picture, or it can be superimposed on the third screenshot picture by the user
  • the specified location is not limited here.
  • the second screenshot image 3A superimposed on the uppermost layer corresponds to the first screenshot image 3.
  • the electronic device can perform translucent processing on the area where the target to be processed in the first screenshot image 3 is located to obtain the translucent target to be processed. Then the translucent target to be processed is superimposed on the third screenshot picture 5 to obtain picture 6, which is the fourth screenshot picture.
  • the fourth screenshot not only can all the character strings on the background be displayed completely, but also the posture of the translucent teacher can be seen.
  • the term “when” can be interpreted as meaning “if" or “after” or “in response to determining" or “in response to detecting".
  • the phrase “when determining" or “if detected (statement or event)” can be interpreted as meaning “if determined" or “in response to determining" or “when detected (Condition or event stated)” or “in response to detection of (condition or event stated)”.
  • the computer may be implemented in whole or in part by software, hardware, firmware, or any combination thereof.
  • software it can be implemented in the form of a computer program product in whole or in part.
  • the computer program product includes one or more computer instructions.
  • the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
  • the computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium.
  • the computer instructions may be transmitted from a website, computer, server, or data center.
  • the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or a data center integrated with one or more available media.
  • the usable medium may be a magnetic medium, (for example, a floppy disk, a hard disk, and a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state hard disk).
  • the process can be completed by a computer program instructing relevant hardware.
  • the program can be stored in a computer readable storage medium. , May include the processes of the foregoing method embodiments.
  • the aforementioned storage media include: ROM or random storage RAM, magnetic disks or optical discs and other media that can store program codes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

一种截屏方法和电子设备。在该方法中,响应于用户的截屏操作,电子设备在一个时间段内对视频进行多次截屏,智能检测出该多次截屏中的待处理目标并处理为透明区域,将处理后的截屏图片进行叠加,得到最终截屏图片。在对视频截屏时可以避免人物对背景的遮挡,使得截屏图片显示更多的信息。

Description

一种截屏方法及电子设备
本申请要求于2020年5月26日提交中国专利局、申请号为202010455200.1、申请名称为“一种截屏方法及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及终端及通信技术领域,尤其涉及一种截屏方法及电子设备。
背景技术
随着网络技术的发展,越来越多的用户开始通过网课进行学习。这样不仅可以有效的利用碎片化的时间,而且网课的视频可以反复观看,用户可以针对自己学习的弱项进行强化训练。
在观看网课视频的过程中,对于重要内容,用户可以截屏保存,以便于后续快速的回顾和做笔记。然而,目前网课视频中,老师讲课时一般会将黑板或展示屏幕遮挡一部分。导致截屏出来的图片上黑板中的部分内容会被老师遮挡,使得截屏图片显示出的信息较少。
发明内容
本申请提供了一种截屏方法及电子设备,对视频截屏时避免人物对背景的遮挡,使得截屏图片显示更多的信息。
第一方面,本申请提供了一种截屏方法,该方法包括:响应于用户的截屏操作,电子设备对第一时间段内的视频进行N次截屏,得到N个第一截屏图片,其中该N为不小于2的正整数;该电子设备对该第一截屏图片进行目标检测,确定该第一截屏图片中待处理目标所在的区域,该待处理目标为该目标检测的目标;该电子设备将该第一截屏图片中待处理目标所在的区域处理为透明区域,得到M个第二截屏图片,其中,该M为小于等于N的正整数;该电子设备将该M个第二截屏图片进行叠加,得到第三截屏图片;当该M等于2时,该第三截屏图片中显示有叠加在最上层的第二截屏图片的非透明区域的信息以及该叠加在最上层的第二截屏图片的透明区域对应的第一区域的信息;该第一区域为在下一层的第二截屏图片上的位置与该最上层的第二截屏图片的透明区域相应的区域;该第一区域的信息包括该第一区域中非透明区域的信息;当该M大于2时,该第一区域的信息还包括该第一区域的透明区域对应的第二区域的信息;该第二区域为在再下一层的第二截屏图片上的位置与该第一区域的透明区域相应的区域;该第二区域的信息包括该第二区域的非透明区域的信息;依此类推,直到该第三截屏图片中没有透明区域,或再下一层的第二截屏图片为叠加在最下层的第二截屏图片。
在上述实施例中,在用户进行截屏操作后,电子设备能对视频进行多次截屏。并对多次截屏得到的各第一截屏图片进行目标检测,将其中作为待处理目标的人物所在的区域检测出来,处理为透明区域,得到多个第二截屏图片。由于多次截屏期间,该待处理目标会移动,相对于视频中的背景(例如黑板),该待处理目标的位置不同,该待处理目标遮挡和 暴露的背景中信息也不同。电子设备将含有不同信息的多个第二截屏图片叠加。由于图片叠加后,上层图片的透明区域能够显示出下层图片中相应区域的信息。因此,最终叠加得到的第三截屏图片中除了可以显示有叠加在最上层的第二截屏图片中的信息,还显示有叠加在最上层的第二截屏图片的透明区域中显示的下层的第二截屏图片上相应区域的信息。可以理解的是,若下层的第二截屏图片上相应区域为透明区域,则该透明区域可以显示出再下层的第二截屏图片上相应区域的信息。因此,第三截屏图片上可以显示有比各第二截屏图片和各第一截屏图片更多的信息。避免了视频截屏时人物对背景的遮挡,使得截屏图片显示出了更多的信息。
结合第一方面,在一些实施例中,该响应于用户的截屏操作,电子设备对第一时间段内的视频进行N次截屏,得到N个第一截屏图片,具体包括:响应于用户的截屏操作,该电子设备确定第一时间段的起始时刻和第一时间段的停止时刻;该电子设备在该第一时间段内对该视频进行N次截屏,得到N个第一截屏图片。
本申请实施例中,电子设备可以根据用户的截屏操作来确定该第一时间段的起始时刻和停止时刻,由用户控制截屏起止时间,可使得最终得到的第三截屏图片更符合用户期望。
可选的,确定第一时间段的起止时刻可以基于不同的用户操作:
结合第一方面的一些实施例,在一些实施例中,该截屏操作包括不连续完成的第一操作和第二操作;该响应于用户的截屏操作,该电子设备确定该第一时间段的起始时刻和停止时刻,具体包括:响应于用户的该第一操作,该电子设备确定该第一时间段的起始时刻;响应于用户的该第二操作,该电子设备确定该第一时间段的停止时刻。
本申请实施例中,由不连续的不同操作来分别确定起止时刻,使得第一时间段的确定过程更简洁。
结合第一方面的一些实施例,在一些实施例中,该截屏操作包括一系列连续完成的操作;该响应于用户的截屏操作,该电子设备确定该第一时间段的起始时刻和停止时刻,具体包括:响应于用户触发截屏的操作,该电子设备显示时间段选择控件;响应于用户在该时间段选择控件上的操作,该电子设备确定该第一时间段的起始时刻和停止时刻。
本申请实施例中,由用户通过一系列连续的操作从时间选择控件中确定起止时刻,使得第一时间段的确定更准确。
可选的,电子设备在该第一时间段内对该视频进行N次截屏的方式有很多:
结合第一方面的一些实施例,在一些实施例中,该电子设备在该第一时间段内对该视频进行N次截屏,得到N个第一截屏图片,具体包括:该电子设备按照预设时间周期在该第一时间段内对该视频进行N次截屏,得到N个第一截屏图片。
本申请实施例中,电子设备按照预设时间周期在该第一时间段内进行截屏,保障了得到不同截屏图片之间的时间间隔,提升了第三截屏图片中得到更多信息的概率。
结合第一方面的一些实施例,在一些实施例中,该电子设备在该第一时间段内对该视频进行N次截屏,得到N个第一截屏图片,具体包括:该电子设备在该第一时间段内对该视频进行目标检测;每当确定该待处理目标在视频中的位置变化超出预设距离阈值时,进行一次截屏,产生一个第一截屏图片,直到得到该N个第一截屏图片。
本申请实施例中,电子设备根据目标检测结果,在待处理目标移动位置超出预设距离 阈值时截屏,使得得到的第一截屏图片中能暴露出背景中更多的信息,使得第三截屏图片中能显示出更多信息。
结合第一方面的一些实施例,在一些实施例中,该方法还包括:该电子设备删除该N个第一截屏图片中不符合进行目标检测的图片质量需求的第一截屏图片。
可选的,对第二截屏图片进行叠加的顺序可以由多种方式得到:
结合第一方面的一些实施例,在一些实施例中,该电子设备将该M个第二截屏图片进行叠加,得到第三截屏图片,具体包括:该电子设备按照预设默认顺序,将该M个第二截屏图片进行叠加,得到第三截屏图片。
结合第一方面的一些实施例,在一些实施例中,该预设默认顺序为在该视频中播放时间在后的图片叠加在上的顺序。
上述实施例中,按照预设默认顺序叠加第二截屏图片,使得叠加处理过程更加快速。按照预设默认顺序为在该视频中播放时间在后的图片叠加在上的顺序进行叠加,使得最终得到的第三截屏图片中显示的信息为最新的信息。
结合第一方面的一些实施例,在一些实施例中,该电子设备将该M个第二截屏图片进行叠加,得到第三截屏图片,具体包括:该电子设备显示对该M个第二截屏图片的叠加顺序;
响应于用户调整叠加顺序的操作,该电子设备根据用户调整的叠加顺序,对该M个第二截屏图片进行叠加,得到第三截屏图片。
本申请实施例中,叠加顺序可以由用户自主调整,使得叠加得到的第三截屏图片更符合用户需求。
结合第一方面的一些实施例,在一些实施例中,该方法还包括:该电子设备使用该第三截屏图片中的背景色填充该第三截屏图片中的透明区域。
本申请实施例中,如果第三截屏图片中还有透明区域,可以使用背景色填充该透明区域,提升该第三截屏图片显示的美观性。
结合第一方面的一些实施例,在一些实施例中,该方法还包括:该电子设备使用智能修复技术对该第三截屏图片中的透明区域进行填充补全。
本申请实施例中,如果第三截屏图片中还有透明区域,可以使用智能修复技术对该第三截屏图片中的透明区域进行填充补全,提升该第三截屏图片显示的美观性。
结合第一方面的一些实施例,在一些实施例中,该方法还包括:该电子设备将叠加在最上层的第二截屏图片对应的第一截屏图片中的待处理目标所在的区域进行半透明处理,得到半透明待处理目标;该电子设备将该半透明待处理目标叠加在该第三截屏图片上,得到第四截屏图片。
本申请实施例中,将半透明待处理目标叠加在第三截屏图片上,使得可以得到更多背景中信息的同时,还能看到待处理目标的动作和姿态。进一步提升得到的信息量。
结合第一方面的一些实施例,在一些实施例中,该视频为教学视频,该待处理目标为老师。
第二方面,本申请实施例提供了一种电子设备,该电子设备包括:一个或多个处理器 和存储器;该存储器与该一个或多个处理器耦合,该存储器用于存储计算机程序代码,该计算机程序代码包括计算机指令,该一个或多个处理器调用该计算机指令以使得该电子设备执行:响应于用户的截屏操作,对第一时间段内的视频进行N次截屏,得到N个第一截屏图片,其中该N为不小于2的正整数;对该第一截屏图片进行目标检测,确定该第一截屏图片中待处理目标所在的区域,该待处理目标为该目标检测的目标;该电子设备将该第一截屏图片中待处理目标所在的区域处理为透明区域,得到M个第二截屏图片,其中,该M为小于等于N的正整数;将该M个第二截屏图片进行叠加,得到第三截屏图片;当该M等于2时,该第三截屏图片中显示有叠加在最上层的第二截屏图片的非透明区域的信息以及该叠加在最上层的第二截屏图片的透明区域对应的第一区域的信息;该第一区域为在下一层的第二截屏图片上的位置与该最上层的第二截屏图片的透明区域相应的区域;该第一区域的信息包括该第一区域中非透明区域的信息;当该M大于2时,该第一区域的信息还包括该第一区域的透明区域对应的第二区域的信息;该第二区域为在再下一层的第二截屏图片上的位置与该第一区域的透明区域相应的区域;该第二区域的信息包括该第二区域的非透明区域的信息;依此类推,直到该第三截屏图片中没有透明区域,或再下一层的第二截屏图片为叠加在最下层的第二截屏图片。
在上述实施例中,在用户进行截屏操作后,电子设备能对视频进行多次截屏。并对多次截屏得到的各第一截屏图片进行目标检测,将其中作为待处理目标的人物所在的区域检测出来,处理为透明区域,得到多个第二截屏图片。由于多次截屏期间,该待处理目标会移动,相对于视频中的背景(例如黑板),该待处理目标的位置不同,该待处理目标遮挡和暴露的背景中信息也不同。电子设备将含有不同信息的多个第二截屏图片叠加。由于图片叠加后,上层图片的透明区域能够显示出下层图片中相应区域的信息。因此,最终叠加得到的第三截屏图片中除了可以显示有叠加在最上层的第二截屏图片中的信息,还显示有叠加在最上层的第二截屏图片的透明区域中显示的下层的第二截屏图片上相应区域的信息。可以理解的是,若下层的第二截屏图片上相应区域为透明区域,则该透明区域可以显示出再下层的第二截屏图片上相应区域的信息。因此,第三截屏图片上可以显示有比各第二截屏图片和各第一截屏图片更多的信息。避免了视频截屏时人物对背景的遮挡,使得截屏图片显示出了更多的信息。
结合第二方面,在一些实施例中,该一个或多个处理器,具体用于调用该计算机指令以使得该电子设备执行:响应于用户的截屏操作,确定第一时间段的起始时刻和第一时间段的停止时刻;在该第一时间段内对该视频进行N次截屏,得到N个第一截屏图片。
本申请实施例中,电子设备可以根据用户的截屏操作来确定该第一时间段的起始时刻和停止时刻,由用户控制截屏起止时间,可使得最终得到的第三截屏图片更符合用户期望。
可选的,确定第一时间段的起止时刻可以基于不同的用户操作:
结合第二方面的一些实施例,在一些实施例中,该截屏操作包括不连续完成的第一操作和第二操作;该一个或多个处理器,具体用于调用该计算机指令以使得该电子设备执行:响应于用户的该第一操作,确定该第一时间段的起始时刻;响应于用户的该第二操作,确定该第一时间段的停止时刻。
本申请实施例中,由不连续的不同操作来分别确定起止时刻,使得第一时间段的确定 过程更简洁。
结合第二方面的一些实施例,在一些实施例中,该截屏操作包括一系列连续完成的操作;该一个或多个处理器,具体用于调用该计算机指令以使得该电子设备执行:响应于用户触发截屏的操作,显示时间段选择控件;响应于用户在该时间段选择控件上的操作,确定该第一时间段的起始时刻和停止时刻。
本申请实施例中,由用户通过一系列连续的操作从时间选择控件中确定起止时刻,使得第一时间段的确定更准确。
可选的,电子设备在该第一时间段内对该视频进行N次截屏的方式有很多:
结合第二方面的一些实施例,在一些实施例中,该一个或多个处理器,具体用于调用该计算机指令以使得该电子设备执行:按照预设时间周期在该第一时间段内对该视频进行N次截屏,得到N个第一截屏图片。
本申请实施例中,电子设备按照预设时间周期在该第一时间段内进行截屏,保障了得到不同截屏图片之间的时间间隔,提升了第三截屏图片中得到更多信息的概率。
结合第二方面的一些实施例,在一些实施例中,该一个或多个处理器,具体用于调用该计算机指令以使得该电子设备执行:在该第一时间段内对该视频进行目标检测;每当确定该待处理目标在视频中的位置变化超出预设距离阈值时,进行一次截屏,产生一个第一截屏图片,直到得到该N个第一截屏图片。
本申请实施例中,电子设备根据目标检测结果,在待处理目标移动位置超出预设距离阈值时截屏,使得得到的第一截屏图片中能暴露出背景中更多的信息,使得第三截屏图片中能显示出更多信息。
结合第二方面的一些实施例,在一些实施例中,该一个或多个处理器,还用于调用该计算机指令以使得该电子设备执行:删除该N个第一截屏图片中不符合进行目标检测的图片质量需求的第一截屏图片。
可选的,对第二截屏图片进行叠加的顺序可以由多种方式得到:
结合第二方面的一些实施例,在一些实施例中,该一个或多个处理器,具体用于调用该计算机指令以使得该电子设备执行:按照预设默认顺序,将该M个第二截屏图片进行叠加,得到第三截屏图片。
结合第二方面的一些实施例,在一些实施例中,该预设默认顺序为在该视频中播放时间在后的图片叠加在上的顺序。
上述实施例中,按照预设默认顺序叠加第二截屏图片,使得叠加处理过程更加快速。按照预设默认顺序为在该视频中播放时间在后的图片叠加在上的顺序进行叠加,使得最终得到的第三截屏图片中显示的信息为最新的信息。
结合第二方面的一些实施例,在一些实施例中,该一个或多个处理器,具体用于调用该计算机指令以使得该电子设备执行:显示对该M个第二截屏图片的叠加顺序;响应于用户调整叠加顺序的操作,根据用户调整的叠加顺序,对该M个第二截屏图片进行叠加,得到第三截屏图片。
本申请实施例中,叠加顺序可以由用户自主调整,使得叠加得到的第三截屏图片更符合用户需求。
结合第二方面的一些实施例,在一些实施例中,该一个或多个处理器,还用于调用该计算机指令以使得该电子设备执行:使用该第三截屏图片中的背景色填充该第三截屏图片中的透明区域。
本申请实施例中,如果第三截屏图片中还有透明区域,可以使用背景色填充该透明区域,提升该第三截屏图片显示的美观性。
结合第二方面的一些实施例,在一些实施例中,该一个或多个处理器,还用于调用该计算机指令以使得该电子设备执行:使用智能修复技术对该第三截屏图片中的透明区域进行填充补全。
本申请实施例中,如果第三截屏图片中还有透明区域,可以使用智能修复技术对该第三截屏图片中的透明区域进行填充补全,提升该第三截屏图片显示的美观性。
结合第二方面的一些实施例,在一些实施例中,该一个或多个处理器,还用于调用该计算机指令以使得该电子设备执行:将叠加在最上层的第二截屏图片对应的第一截屏图片中的待处理目标所在的区域进行半透明处理,得到半透明待处理目标;将该半透明待处理目标叠加在该第三截屏图片上,得到第四截屏图片。
本申请实施例中,将半透明待处理目标叠加在第三截屏图片上,使得可以得到更多背景中信息的同时,还能看到待处理目标的动作和姿态。进一步提升得到的信息量。
结合第二方面的一些实施例,在一些实施例中,该视频为教学视频,该待处理目标为老师。
第三方面,本申请实施例提供了一种芯片系统,该芯片系统应用于电子设备,该芯片系统包括一个或多个处理器,该处理器用于调用计算机指令以使得该电子设备执行如第一方面以及第一方面中任一可能的实现方式描述的方法。
可以理解的是,该芯片系统可以包含一个如图3所示的电子设备100中的处理器110,也可以包含多个如图3所示的电子设备100中的处理器110。该芯片系统中还可以包含有其他的一个或多个芯片,例如可以包含如图5所示的电子设备100中的摄像头193中的图像信号处理芯片,还可以包含显示屏194中的图像显示芯片等,此处不作限定。
第四方面,本申请实施例提供一种包含指令的计算机程序产品,当上述计算机程序产品在电子设备上运行时,使得上述电子设备执行如第一方面以及第一方面中任一可能的实现方式描述的方法。
第五方面,本申请实施例提供一种计算机可读存储介质,包括指令,当上述指令在电子设备上运行时,使得上述电子设备执行如第一方面以及第一方面中任一可能的实现方式描述的方法。
可以理解地,上述第二方面提供的电子设备、第三方面提供的芯片系统、第四方面提供的计算机程序产品和第五方面提供的计算机存储介质均用于执行本申请实施例所提供的方法。因此,其所能达到的有益效果可参考对应方法中的有益效果,此处不再赘述。
附图说明
图1是现有技术中对教学视频截屏得到的截屏图片的一个效果示意图;
图2是本申请实施例中对教学视频截屏得到的截屏图片的一个效果示意图;
图3是本申请实施例提供的电子设备的结构示意图;
图4是本申请实施例提供的电子设备的软件结构框图;
图5是本申请实施例中截屏方法的一个流程示意图;
图6是本申请实施例提供的一组截屏操作的界面示意图;
图7是本申请实施例提供的另一组截屏操作的界面示意图;
图8是本申请实施例中确定待处理目标所在区域的一个示例性场景示意图;
图9是本申请实施例中透明区域的一个示例性场景示意图;
图10是本申请实施例中提供的一组界面示意图;
图11是本申请实施例中一个截屏方法的处理过程的示例性示意图;
图12是本申请实施例中第二截屏图片进行叠加的处理过程的示例性示意图;
图13是本申请实施例中提供的另一组界面示意图;
图14是本申请实施例中提供的另一组界面示意图;
图15是本申请实施例中在第三截屏图片上叠加半透明待处理目标的一个示例性示意图。
具体实施方式
本申请以下实施例中所使用的术语只是为了描述特定实施例的目的,而并非旨在作为对本申请的限制。如在本申请的说明书和所附权利要求书中所使用的那样,单数表达形式“一个”、“一种”、“所述”、“上述”、“该”和“这一”旨在也包括复数表达形式,除非其上下文中明确地有相反指示。还应当理解,本申请中使用的术语“和/或”是指并包含一个或多个所列出项目的任何或所有可能组合。
以下,术语“第一”、“第二”仅用于描述目的,而不能理解为暗示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征,在本申请实施例的描述中,除非另有说明,“多个”的含义是两个或两个以上。
由于本申请实施例涉及图像处理技术的应用,为了便于理解,下面先对本申请实施例涉及的相关术语及概念进行介绍。
(1)基于深度学习的目标检测算法:
深度学习是使机器学习样本数据的内在规律和表示层次,这些学习过程中获得的信息对诸如文字,图像和声音等数据的解释有很大的帮助。它可以让机器能够像人一样具有分析学习能力,能够识别文字、图像和声音等数据。
基于深度学习的目标检测算法可以使得电子设备能自动找出图像中的目标,确定它们的位置和大小。
可以理解的是,使用基于深度学习的目标检测算法去进行目标检测,需要先使用打标签的样本作为训练集去训练它,得到一个符合自己需求的目标检测算法。
目标检测算法检测的目标由训练使用的打标签的样本来决定。例如,本申请实施例中,可以使用在人物上打了标签的一系列图像去训练该目标检测算法。使得该目标检测算法能 识别出图像中的人物,并确定人物在图像中的位置和身体区域。
根据目标检测使用场景需求的不同,本申请实施例中的人物可以仅包括人,也可以包括人以及与人相关的物,例如与人身体接触的物品等,此处不作限定。对于不同的目标需求情况,只需要使用在需要识别的目标上打了标签的样本作为训练集训练出相应的目标检测算法即可。
例如,本申请实施例中,训练集中的人物可以为老师以及与老师身体接触的物品。本申请实施例中,将目标检测的目标称为待处理目标。
本申请实施例中的目标检测算法,可以为出厂预设,也可以由用户使用自己的训练集进行训练,此处不作限定。
如图1所示,为现有技术中对教学视频截屏得到的截屏图片的一个效果示意图。在对教学视频进行截屏时,总有老师遮挡住背景,使得截屏图片显示出的信息较少。
本申请实施例中,用户进行截屏操作后,电子设备会自动对教学视频进行多次截屏。由于教学视频中人物移动时,会暴露出之前遮挡的区域。电子设备将多次截屏得到的截屏图片中因为移动而暴露的区域拼图得到最终截屏图片,从而使得最终截屏图片中可以显示出更多的信息。如图2所示,为本申请实施例中对教学视频截屏得到的截屏图片的一个效果示意图。
下面首先介绍本申请实施例提供的示例性电子设备100。
图3是本申请实施例提供的电子设备100的结构示意图。
下面以电子设备100为例对实施例进行具体说明。应该理解的是,电子设备100可以具有比图中所示的更多的或者更少的部件,可以组合两个或多个的部件,或者可以具有不同的部件配置。图中所示出的各种部件可以在包括一个或多个信号处理和/或专用集成电路在内的硬件、软件、或硬件和软件的组合中实现。
电子设备100可以包括:处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。
可以理解的是,本发明实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器 (application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
其中,控制器可以是电子设备100的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口分别耦合触摸传感器180K,充电器,闪光灯,摄像头193等。例如:处理器110可以通过I2C接口耦合触摸传感器180K,使处理器110与触摸传感器180K通过I2C总线接口通信,实现电子设备100的触摸功能。
I2S接口可以用于音频通信。在一些实施例中,处理器110可以包含多组I2S总线。处理器110可以通过I2S总线与音频模块170耦合,实现处理器110与音频模块170之间的通信。在一些实施例中,音频模块170可以通过I2S接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块170与无线通信模块160可以通过PCM总线接口耦合。在一些实施例中,音频模块170也可以通过PCM接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。所述I2S接口和所述PCM接口都可以用于音频通信。
UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器110与无线通信模块160。例如:处理器110通过UART接口与无线通信模块160中的蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频模块170可以通过UART接口向无线通信模块160传递音频信号,实现通过蓝牙耳机播放音乐的功能。
MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(display serial  interface,DSI)等。在一些实施例中,处理器110和摄像头193通过CSI接口通信,实现电子设备100的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现电子设备100的显示功能。
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器110与摄像头193,显示屏194,无线通信模块160,音频模块170,传感器模块180等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。
SIM接口可以被用于与SIM卡接口195通信,实现传送数据到SIM卡或读取SIM卡中数据的功能。
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为电子设备100充电,也可以用于电子设备100与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。
可以理解的是,本发明实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在本申请另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,外部存储器,显示屏194,摄像头193,和无线通信模块160等供电。
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。
天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等) 输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。
在一些实施例中,电子设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备100可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。
电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。
电子设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备100可以包括1个或N个摄像头193,N为大于1的正整数。
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。
视频编解码器用于对数字视频压缩或解压缩。电子设备100可以支持一种或多种视频编解码器。这样,电子设备100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备100的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,从而执行电子设备100的各种功能应用以及数据处理。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用(比如人脸识别功能,指纹识别功能、移动支付功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如人脸信息模板数据,指纹信息模板等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。
电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备100可以通过扬声器170A收听音乐,或收听免提通话。
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当电子设备100接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或 发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。电子设备100可以设置至少一个麦克风170C。在另一些实施例中,电子设备100可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,电子设备100还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。
耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。电子设备100根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,电子设备100根据压力传感器180A检测所述触摸操作强度。电子设备100也可以根据压力传感器180A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触摸操作强度大于或等于第一压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。
陀螺仪传感器180B可以用于确定电子设备100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定电子设备100围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器180B可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器180B检测电子设备100抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消电子设备100的抖动,实现防抖。陀螺仪传感器180B还可以用于导航,体感游戏场景。
气压传感器180C用于测量气压。在一些实施例中,电子设备100通过气压传感器180C测得的气压值计算海拔高度,辅助定位和导航。
磁传感器180D包括霍尔传感器。电子设备100可以利用磁传感器180D检测翻盖皮套的开合。在一些实施例中,当电子设备100是翻盖机时,电子设备100可以根据磁传感器180D检测翻盖的开合。进而根据检测到的皮套的开合状态或翻盖的开合状态,设置翻盖自动解锁等特性。
加速度传感器180E可检测电子设备100在各个方向上(一般为三轴)加速度的大小。当电子设备100静止时可检测出重力的大小及方向。还可以用于识别电子设备姿态,应用于横竖屏切换,计步器等应用。
距离传感器180F,用于测量距离。电子设备100可以通过红外或激光测量距离。在一些实施例中,拍摄场景,电子设备100可以利用距离传感器180F测距以实现快速对焦。
接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。电子设备100通过发光二极管向外发射红外光。电子设备100使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以 确定电子设备100附近有物体。当检测到不充分的反射光时,电子设备100可以确定电子设备100附近没有物体。电子设备100可以利用接近光传感器180G检测用户手持电子设备100贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器180G也可用于皮套模式,口袋模式自动解锁与锁屏。
环境光传感器180L用于感知环境光亮度。电子设备100可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测电子设备100是否在口袋里,以防误触。
指纹传感器180H用于采集指纹。电子设备100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。
温度传感器180J用于检测温度。在一些实施例中,电子设备100利用温度传感器180J检测的温度,执行温度处理策略。例如,当温度传感器180J上报的温度超过阈值,电子设备100执行降低位于温度传感器180J附近的处理器的性能,以便降低功耗实施热保护。在另一些实施例中,当温度低于另一阈值时,电子设备100对电池142加热,以避免低温导致电子设备100异常关机。在其他一些实施例中,当温度低于又一阈值时,电子设备100对电池142的输出电压执行升压,以避免低温导致的异常关机。
触摸传感器180K,也称“触控面板”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备100的表面,与显示屏194所处的位置不同。
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备100可以接收按键输入,产生与电子设备100的用户设置以及功能控制有关的键信号输入。
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。
SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和电子设备100的接触和分离。电子设备100可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口195可以支持Nano SIM卡,Micro SIM卡,SIM卡等。同一个SIM卡接口195可以同时插入多张卡。所述多张卡的类型可以相同,也可以不同。SIM卡接口195也可以兼容不同类型的SIM卡。SIM卡接口195也可以兼容外部存储卡。电子设备100通过SIM卡和网络交互,实现通话以及数据通信等功能。
图4是本发明实施例的电子设备100的软件结构框图。
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将系统分为四层,从上至下分别为应用程序层,应用程序框架层,运行时和系统库,以及内核层。
应用程序层可以包括一系列应用程序包。
如图4所示,应用程序包可以包括截屏模块,相机,图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,短信息等应用程序(也可以称为应用)。
其中,截屏模块可以用于支持电子设备执行本申请实施例中的截屏方法。
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。
如图4所示,应用程序框架层可以包括窗口管理器,内容提供器,视图系统,电话管理器,资源管理器,通知管理器等。
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。
电话管理器用于提供电子设备100的通信功能。例如通话状态的管理(包括接通,挂断等)。
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话界面形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。
运行时包括核心库和虚拟机。运行时负责系统的调度和管理。
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是系统的核心库。
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。
系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),二维图形引擎(例如:SGL)等。
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了二维(2-Dimensional,2D)和三维(3-Dimensional,3D)图层的融合。
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可 以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。
三维图形处理库用于实现3D图形绘图,图像渲染,合成,和图层处理等。
二维图形引擎是2D绘图的绘图引擎。
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动,虚拟卡驱动。
下面结合捕获拍照场景,示例性说明电子设备100软件以及硬件的工作流程。
当触摸传感器180K接收到触摸操作,相应的硬件中断被发给内核层。内核层将触摸操作加工成原始输入事件(包括触摸坐标,触摸操作的时间戳等信息)。原始输入事件被存储在内核层。应用程序框架层从内核层获取原始输入事件,识别该输入事件所对应的控件。以该触摸操作是触摸单击操作,该单击操作所对应的控件为相机应用图标的控件为例,相机应用调用应用框架层的接口,启动相机应用,进而通过调用内核层启动摄像头驱动,通过摄像头193捕获静态图像或视频。
下面结合上述示例性电子设备100的软硬件结构,对本申请实施例中的截屏方法进行具体描述。图5是本申请实施例中截屏方法一个流程示意图:
S501、响应于用户的截屏操作,电子设备对第一时间段内的视频进行N次截屏,得到N个第一截屏图片;
其中,N为不小于2的正整数。
可以理解的是,该第一时间段的起止时刻根据用户的截屏操作而确定。根据用户的截屏操作的不同,该第一时间段的确定方式也可以不同,此处不作限定。
下面对根据用户的截屏操作确定第一时间段的方式进行示例性描述:
示例性的,用户的截屏操作可以包括不连续完成的第一操作和第二操作。响应于用户的第一操作,电子设备可以确定该第一时间段的起始时刻。响应于用户的第二操作,电子设备可以确定该第一时间段的停止时刻。可以理解的是,在电子设备确定该第一时间段的起始时刻开始,即可以开始执行S501以及后续步骤。并不限定为一定要在确定了该第一时间段的停止时刻才开始执行S501以及后续步骤。
如图6所示,为本申请实施例提供的一组截屏操作的界面示意图。
图6中的(a)为电子设备的显示屏194上播放教学视频时的用户界面61的示例性示意图。
如图6中的(b)所示,为用户触发截图功能后的用户界面62的示例性示意图。当用户触发截屏功能时,用户界面62中可以显示出截屏方式选项指示符601,其下可以包括多个截屏方式选择控件:例如普通截屏控件601A、长图截屏控件601B、第一方式截屏控件601C、第二方式截屏控件601D等。
用户触发截屏功能的操作方式可以有很多,例如可以通过触发组合按键的方式,或通过触发预设触摸动作的方式,或通过触发预设敲击屏幕次数的方式等等,此处不作限定。
其中,普通截屏控件601A,用于在接收到用户点击操作后,提供普通截屏功能;
长图截屏控件601B,用于在接收到用户点击操作后,提供长图截屏功能;
第一方式截屏控件601C,用于在接收到用户点击操作后,提供视频截屏功能,并将点 击操作的时刻确定为第一时间段的起始时刻;
第二方案截屏控件602C,用于在接收到用户点击操作后,提供视频截屏功能,并提供时间段选择控件供用户选择该第一时间段。
可以理解的是,此处仅仅是截屏方式选项的一个示意性示例。在实际应用中,截屏方式选项可以也可以以其他方式在用户界面62中进行显示。截屏方式选项下可供选择的不同的截屏方式也可以更多或更少,此处不作限定。
如图6中的(c)所示,为用户点击第一方式截屏控件601C的示例性示意图。当用户在用户界面62中点击第一方式截屏控件601C后,电子设备可以在显示屏194上显示如图6中的(d)所示的用户界面63。
可以理解的是,图6中的(b)所示的用户触发截屏功能的操作,以及图6中的(c)所示的用户点击第一方式截屏控件601C一起属于上述用户的截屏操作中的第一操作的一种实现方式。在实际应用中,该第一操作也可以为单个操作。例如,可以设置某种组合键,或预设触摸动作,可以直接触发该第一方式截屏控件的功能。则,当电子设备的显示屏194上显示如图6中的(a)所示的用户界面61,在播放教学视频时,响应于用户的该第一操作,电子设备可以在显示屏194上显示如图6中的(d)所示的用户界面63。此处不作限定。
如图6中的(d)所示,为截屏状态中的用户界面63的一个示例性示意图。该用户界面63中可以显示有截屏状态指示符602,取消控件603和停止控件604。
该截屏状态指示符602中显示有文字:截屏中,用于指示当前处于视频截屏状态;
该取消控件603,用于在接收到用户点击操作后,取消截屏操作;
该停止控件604,用于在接收到用户点击操作后,确定点击时刻为该第一时间段的停止时刻,并完成视频截屏功能。
如图6中的(e)所示,当接收到用户点击用户界面63中的停止控件604的操作后,电子设备的显示屏194可以显示如图6中的(f)所示的用户界面64。
可以理解的是,该点击停止控件604的操作,即为上述用户的截屏操作中的第二操作的一种实现方式。
如图6中的(f)所示,在用户界面64中可以显示有截屏状态指示符605。该截屏状态指示符605中显示有文字:截屏成功,用于指示视频截屏已经成功。
可以理解的是,图6中展示的第一操作和第二操作都仅仅是一种示意性的实现方式。在实际应用中,该第一操作和第二操作可以有很多种其他的实现方式,只要该第一操作能确定第一时间段的起始时刻,第二操作能确定第一时间段的停止时刻,此处不作限定。
示例性的,用户的截屏操作也可以是一次性连续完成的。响应于用户的截屏操作,电子设备可以提供时间段选择控件供用户选择该第一时间段的起止时刻。在用户选择确定该第一时间段的起止时刻后,可以继续执行S501以及后续步骤。
如图7所示,为本申请实施例提供的另一组截屏操作的界面示意图。
图7中的(a)与(b)和图6中的(a)与(b)类似,此处不作赘述。
如图7中的(c)所示,当接收到用户点击用户界面62中的第二方式截屏控件601D后,电子设备的显示屏194上可以显示如图7中的(d)所示的用户界面73。
在该用户界面73中,可以包括时间选择控件701,起始时刻标志位702,停止时刻标志位703,确定控件704和取消控件705。
其中,时间选择控件701,用于展示该视频的时间线。
起始时刻标志位702,用于根据用户的拖动,确定第一时间段的起始时刻;
停止时刻标志位703,用于根据用户的拖动,确定第一时间段的停止时刻;
确定控件704,用于在接收到用户点击操作后,根据起始时刻标志位702和停止时刻标志位703在时间选择控件701上的位置,确定该第一时间段的起止时刻,并完成视频截屏功能;
取消控件705,用于在接收到用户点击操作后,取消截屏操作。
如图7中的(d)所示,用户可以拖动起始时刻标志位702和停止时刻标志位703来确定该第一时间段的起始时刻和停止时刻。
如图7中的(e)所示,用户拖动了起始时刻标志位702和停止时刻标志位703的位置后,可以点击确定控件704,确定该第一时间段的起止时刻。此时电子设备会继续完成视频截屏功能,并显示如图7中的(f)所示的用户界面74。
如图7中的(f)所示,在用户界面74中可以显示有截屏状态指示符706。该截屏状态指示符706中显示有文字:截屏成功,用于指示视频截屏已经成功。
可以理解的是,图7仅仅为截屏操作为一个连续的截屏操作的示例,在实际应用中,还可以有很多其他方式的截屏操作,只要其能确定出第一时间段的起止时刻即可,此处不作限定。
电子设备对第一时间段内的视频进行N次截屏的可选方式也有很多:
示例性的,电子设备可以按照预设时间周期在该第一时间段内进行截屏。例如,假设预设时间周期为2秒,则,电子设备可以在该第一时间段内每2秒对视频进行一次截屏,产生一个第一截屏图片。
示例性的,在截屏功能启动后,电子设备也可以对该第一时间段内的视频进行实时的目标检测,每当确定检测出的待处理目标在视频中的位置变化超出预设距离阈值时,进行一次截屏,产生一个第一截屏图片。
可以理解的是,还可以有很多的对该第一时间段内的视频进行N次截屏的方式,例如可以在该第一时间段内用户每接收到一次用户点击时进行一次截屏,产生一个第一截屏图片等等,此处不作限定。
可以理解的是,在步骤S501中,会在第一时间段内持续产生多个第一截屏图片。电子设备并不需要等待第一时间段内的N个截屏图片全部产生完成后,才去执行后续步骤。可以在产生第一个第一截屏图片后,就同时开始执行后续步骤,此处不作限定。
S502、该电子设备对第一截屏图片进行目标检测,确定待处理目标所在的区域;
该电子设备得到第一截屏图片后,会对该第一截屏图片进行目标检测,目标检测能自动识别出第一截屏图片中的待处理目标,从而确定待处理目标在图片中所在的区域。
电子设备100进行目标检测所使用的目标检测算法,可以是由厂商预设的存储在电子设备100的内部存储器121中的,可以是电子设备100在需要使用目标检测算法时,从云端服务器下载的,可以是电子设备100的处理器110通过用户选定的训练集训练出来后存储在该内部存储器121中的,还可以是从其他第三方服务商的服务器中获取的等等,此处不作限定。
示例性的,如图8所示,为确定待处理目标所在区域的一个示例性场景示意图。如图8中的(a)为在该第一时间段内对视频进行截屏得到的一个第一截屏图片,其中,老师站在背景前。电子设备对该第一截屏图片进行目标检测,使用的目标检测算法的待处理目标为老师,即可确定老师在该第一截屏图片中所在的区域。如图8中的(b)所示,其中虚线框所示的区域为通过目标检测确定的老师所在的区域,即待处理目标所在的区域。
可选的,电子设备在该第一时间段内会得到N个第一截屏图片,在对该N个第一截屏图片进行目标检测的过程中,若某个第一截屏图片由于截屏质量问题,不符合进行目标检测的图片质量需求,则电子设备可以删除这个第一截屏图片,继续对后续的第一截屏图片进行处理。
S503、电子设备将第一截屏图片中该待处理目标所在的区域处理为透明区域,得到M个第二截屏图片;
电子设备确定第一截屏图片中待处理目标所在的区域后,可以将该区域处理为透明区域,得到M个第二截屏图片。其中,M为小于等于N的正整数。
可以理解的是,若电子设备进行目标检测时,删除了不符合进行目标检测的图片质量需求的第一截屏图片,则M小于N。若电子设备没有删除第一截屏图片,则M等于N。
需要说明的是,将第一截屏图片中待处理目标所在的区域处理为透明区域,得到一个第二截屏图片后,若将该第二截屏图片叠加在某个图片上,则可以透过该第二截屏图片上的透明区域,看到在该第二截屏图片下面的图片上位于该透明区域位置的内容。如图9所示,为透明区域的一个示例性场景示意图。如图9中的(a)所示,为在电子设备100的显示屏194上显示的一个第二截屏图片,其中虚线框包围的区域为透明区域。如图9中的(b)所示,为另一个图片A,其中在对应于第二截屏图片的透明区域的位置部分,有文字信息EF和1234,在其他部分也有一些文字信息。将图9中的(a)所示的第二截屏图片在上,图9中的(b)所示的图片A在下,对这两张图片进行叠加,则会电子设备100的显示屏194上会显示出如图9中的(c)所示的图片B。在该图片B中,不仅包含了第二截屏图片上的内容,而且还包含了图片A中与第二截屏图片的透明区域相应位置的内容。
S504、将所述M个第二截屏图片进行叠加,得到第三截屏图片;
电子设备得到两个及以上的第二截屏图片后,就可以开始对第二截屏图片进行叠加。当电子设备将得到的M个第二截屏图片都叠加完成后,就得到了第三截屏图片。该第三截屏图片中会显示有比各第一截屏图片中更多的信息,该信息指背景中显示的信息,而不包括该待处理目标。
当该M等于2时,该第三截屏图片中显示有叠加在最上层的第二截屏图片的非透明区 域的信息以及该叠加在最上层的第二截屏图片的透明区域对应的第一区域的信息;该第一区域为在下一层的第二截屏图片上的位置与该最上层的第二截屏图片的透明区域相应的区域;该第一区域的信息包括该第一区域中非透明区域的信息;
当该M大于2时,该第一区域的信息还包括该第一区域的透明区域对应的第二区域的信息;该第二区域为在再下一层的第二截屏图片上的位置与该第一区域的透明区域相应的区域;该第二区域的信息包括该第二区域的非透明区域的信息;依此类推,直到该第三截屏图片中没有透明区域,或再下一层的第二截屏图片为叠加在最下层的第二截屏图片。
可以理解的是,对于M个第二截屏图片叠加的顺序,此处并不限定。可以当产生两个第二截屏图片后,就开始叠加,然后将新得到的第二截屏图片与叠加得到的截屏图片再进行叠加;也可以在得到所有的第二截屏图片后一起进行叠加;还可以分别将得到的部分第二截屏图片进行叠加,再将分别叠加后得到的图片再进行叠加,此处不作限定。
可选的,电子设备将该M个第二截屏图片进行叠加时,根据不同的情况,可以有不同的叠加顺序。
示例性的,当用户在电子设备的设置选项中点击截屏设置控件后,电子设备的显示屏194可以显示出如图10中(a)所示的用户界面101。该用户界面101为一个截屏设置界面,其中可以包括截屏功能开关控件1001、视频截屏叠加顺序选择控件1002和截屏快捷手势选择控件1003。
其中,截屏功能开关控件1001,用于根据用户选择,确定是否启动截屏功能;
视频截屏叠加顺序选择控件1002,用于接收到用户的点击操作后,展示视频截屏叠加顺序选择界面;
截屏快捷手势控件1003,用于接收到用户的点击操作后,展示截屏快捷手势的选择界面。
如图10中的(a)所示,当接收到用户点击视频截屏叠加顺序选择控件1002的操作后,电子设备的显示屏194上可以显示出如图10中的(b)所示的用户界面102。该用户界面102为一个视频截屏叠加顺序选择界面。
该用户界面102中可以包括手动调整开关控件1004,默认顺序选择控件1005。该默认顺序选择控件1005中有两个选项子控件,包括播放时间在后的图片在上的选项子控件1005A和播放时间在前的图片在上的选项子控件1005B。
其中,手动调整开关控件1004,用于根据用户操作,开启和关闭手动调整功能。
当手动调整功能关闭时,电子设备在S504中将M个第二截屏图片叠加时,直接按照默认顺序选择控件1005中被选择的子控件表示的顺序,进行第二截屏图片的叠加。
当手动调整功能开启时,电子设备在得到N个第一截屏图片后,会按默认顺序选择控件1005中被选择的子控件表示的顺序,展示截屏得到的N个第一截屏图片,或展示处理得到的M个第二截屏图片。待用户手动调整顺序并确定后,才执行步骤S504。
需要说明的是,电子设备展示截屏得到的N个第一截屏图片供用户手动调整顺序时,并不影响电子设备继续执行步骤S502和S503,此处不作限定。
可以理解的是,因为M个第二截屏图片是由N个第一截屏图片处理得到的,因此,用 户对N个第一截屏图片顺序的手动调整,可以表示用户对M个第二截屏图片叠加顺序的调整。
播放时间在后的图片在上的选项子控件1005A,用于在接收到用户的点击操作后,设置在对第二截屏图片进行叠加时,按照播放时间在后的图片叠加在上的顺序进行叠加。且在手动调整功能开启状态下,展示截屏得到的N个第一截屏图片,或展示处理得到的M个第二截屏图片时,按照播放时间在后的图片叠加在上的顺序进行展示;
播放时间在前的图片在上的选项子控件1005B,用于在接收到用户的点击操作后,设置在对第二截屏图片进行叠加时,按照播放时间在前的图片叠加在上的顺序进行叠加。且在手动调整功能开启状态下,展示截屏得到的N个第一截屏图片,或展示处理得到的M个第二截屏图片时,按照播放时间在前的图片叠加在上的顺序进行展示。
如图10中的(b)所示,若在该视频截屏叠加顺序选择界面中,用户选择了手动调整开关控件1004为关闭状态,默认顺序选择控件1005的播放时间在后的图片在上的选项子控件1005A被选中。则在执行步骤S504时,电子设备会默认按照播放时间在后的图片在上的顺序,依次将该M个第二截屏图片进行叠加,得到第三截屏图片。
可以理解的是,图10仅仅是截屏设置界面和视频截屏叠加顺序选择界面的一个示例性示意。在实际应用中,截屏设置界面可以有比图10中的(a)所示的更多或更少的选项。同理,视频截屏叠加顺序选择界面可以有,也可以没有。若有视频截屏叠加顺序选择界面,其中也可以有比图10中的(b)所示的更多或更少的选项,此处不作限定。
下面以电子设备中截屏设置界面如图10中的(a)所示,视频截屏叠加顺序选择界面如图10中的(b)所示,且步骤S503中得到了3个第二截屏图片为例,对步骤S504中将这3个第二截屏图片进行叠加,得到第三截屏图片的过程进行示例性描述:
图11为本申请实施例中截屏方法的处理过程的示例性示意图。在步骤S501中,在第一时间段内电子设备截屏得到了3个第一截屏图片,按照图片在视频中播放时间从前到后的顺序分别为图片1、图片2和图片3。
在图片1中,黑板上有两个字符串,分别为ABCDE和123456,但是老师的身体遮挡住了字符串123456中的123部分,因此图片1中无法看到这两个字符串的完整内容。
在图片2中,黑板上增加了一个字符串:FGHIJK。老师移动了位置,图片中可以完整的显示出黑板上的ABCDE和FGHIJK字符串,但是老师的身体遮挡住了123456字符串中的3456部分。因此,图片2中无法看到目前的3个字符串的完整内容。
在图片3中,黑板上又增加了一个新的字符串:789。老师又移动了位置,图片中可以完整的显示出黑板上的ABCDE和789字符串,但是老师的身体遮挡住了123456字符串中的1部分,和FGHIJK字符串中的JK部分。因此,图片3中无法看到目前的4个字符串的完整内容。
根据步骤S502和S503,电子设备可以通过目标检测,识别出图片1、图片2和图片3中老师所在的区域,并将这些区域处理为透明区域,得到3个第二截屏图片,分别为:图片1A、图片2A和图片3A。
由于视频截屏叠加顺序界面中选择了播放时间在后的图片在上的选项子控件1005A, 因此,执行步骤S504时,电子设备会按照播放时间在后的图片叠加在上的方式,依次对得到的第二截屏图片进行叠加处理。
如图11所示,在得到第二截屏图片1A和第二截屏图片2A后,由于图片2A对应的图片2的播放时间在视频中位于图片1A对应的图片A的后面。因此,电子设备对图片2A和图片1A进行叠加时,按照图片2A在上,图片1A在下的方式进行叠加,得到如图10中的图片4。叠加后得到的图片4中,可以完整的显示出ABCDE和FGHIJK字符串,并且对于123456字符串,能够显示出比图片1和图片2单独显示更多的内容,仅有123456字符串中的3由于在图片1和图片2中均被老师遮挡,而在图片4中无法显示。
如图12所示,为将图片1A和图片2A进行叠加生成图片4的过程示意图。图片1A中具有透明区域1,图片2A中具有透明区域2。图片2A在上,图片1A在下叠加得到图片4。因此,图片4中不仅显示有图片2A中的全部内容,而且透过图片2A中的透明区域2,还能显示与图片1A中与该透明区域相应位置的内容。而图片2A中透明区域2和图片1A中透明区域1重叠的部分,还是透明区域,成为图片4中的透明区域3。
如图11所示,在得到第二截屏图片3A后,由于图片3A对应的图片3的播放时间在视频中位于图片2A对应的图片2的后面。因此,电子设备对图片3A和图片4进行叠加时,按照图片3A在上,图片4在下的方式进行叠加,得到如图11中的图片5。叠加得到的图片5中,可以完整的显示出ABCDE、FGHIJK、789和123456字符串。相比于图片1、图片2和图片3均显示出了更多的内容。此时对得到的3张第二截屏图片均已叠加完成,得到的图片5即为第三截屏图片。
示例性的,如图13所示,若用户在视频截屏叠加顺序选择界面中将手动调整开关控件1004的状态设置为启动,且电子设备默认供用户选择叠加顺序的是第一截屏图片。则在步骤S501中,用户进行截屏操作,电子设备的显示屏194中显示如图6中的(a)、(b)、(c)、(d)、(e)或如图7中的(a)、(b)、(c)、(d)、(e)所示的用户界面后,在显示如图6中的(f)或如图7中的(f)之前,电子设的显示屏194中还可以显示如图14中的(a)所示的用户界面141。在该用户界面141中,电子设备弹出叠加顺序选择窗口1401。
该叠加顺序选择窗口1401中可以包含有文字标识符:叠加顺序选择(从上到下),用于指示用户此窗口可用来调整对视频截屏图片的叠加顺序,并且图片是按照叠加顺序从上到下显示的。由于如图13所示,默认顺序选择控件1005的播放时间在后的图片在上的选项子控件1005A为选中状态,因此,图14中显示的4个供调整顺序的第一截屏图片的显示顺序为:在视频的1小时20分截取的第一截屏图片、在视频的第1小时16分截取的第一截屏图片,在视频的第1小时13分截取的第一截屏图片和在视频的第1小时8分截取的第一截屏图片。
叠加顺序选择窗口1401中还可以包括有确定控件1402,用于确定使用用户调整的叠加顺序;以及取消控件1403,用于取消使用用户调整的叠加顺序,直接使用默认顺序。
如图14中的(a)所示,响应于用户将在视频的1小时20分截取的第一截屏图片与在视频的第1小时8分截取的第一截屏图片拖动互换的操作,电子设备的显示屏194上会显 示出如图14中(b)所示的用户界面141。此时,这两个第一截屏图片的顺序已经更换,在步骤S504中进行第二截屏图片叠加处理时,电子设备会按照用户调整的该顺序,对相应的第二截屏图片进行叠加。
如图14中的(b)所示,响应于用户点击确定控件1402的操作,电子设备可以在显示屏上显示如图6中的(f)或如图7中的(f)所示的用户界面。
可以理解的是,还可以有其他的确定对M个第二截屏图片进行叠加时使用的顺序的方式,此处不作限定。
可选的,电子设备将M个第二截屏图片叠加完成,得到第三截屏图片后,可以存储该第三截屏图片到电子设备的内部存储器121,作为截屏操作最终得到的截屏图片。也可以输出该第三截屏图片到电子设备的显示屏194,作为截屏操作最终得到的截屏图片。此处不作限定。
可选的,存储或输出该第三截屏图片之前,若得到的第三截屏图片中还存在透明区域,则电子设备可以使用图片的背景色填充该透明区域,也可以使用图片智能修复技术,对该透明区域的进行填充补全等,此处不作限定。
可选的,存储或输出该第三截屏图片之前或存储或输出该第三截屏图片之后,电子设备还可以将叠加在最上层的第二截屏图片对应的第一截屏图片中的待处理目标所在区域进行半透明处理,得到半透明待处理目标;然后将该半透明待处理目标叠加在该第三截屏图片上,得到第四截屏图片,存储该第四截屏图片。
其中,对待处理目标所在区域进行半透明处理时的半透明程度,可以按照预设设置,可以由用户实时手动调整,还可以由电子设备根据第三截屏图片和待处理目标所在区域的内容智能调整为不影响显示第三截屏图片上内容的程度,此处不作限定。
将半透明待处理目标叠加在第三截屏图片上时,可以叠加在该半透明待处理目标对应的待处理目标在第一截屏图片上的相同位置,也可以叠加在用户在第三截屏图片上指定的位置,此处不作限定。
结合如图11所示的示例性示意图,如图15所示,为本申请实施例中在第三截屏图片上叠加半透明待处理目标的一个示例性示意图。叠加在最上层的第二截屏图片3A对应的是第一截屏图片3,电子设备可以将第一截屏图片3中的待处理目标所在区域进行半透明处理,得到半透明待处理目标。然后将该半透明待处理目标叠加在第三截屏图片5上,得到图片6,即第四截屏图片。在该第四截屏图片中,不仅可以完整显示出背景上的全部字符串,而且还能看到半透明的老师的姿态。
以上所述,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。
上述实施例中所用,根据上下文,术语“当…时”可以被解释为意思是“如果…”或“在…后”或“响应于确定…”或“响应于检测到…”。类似地,根据上下文,短语“在确 定…时”或“如果检测到(所陈述的条件或事件)”可以被解释为意思是“如果确定…”或“响应于确定…”或“在检测到(所陈述的条件或事件)时”或“响应于检测到(所陈述的条件或事件)”。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如DVD)、或者半导体介质(例如固态硬盘)等。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,该流程可以由计算机程序来指令相关的硬件完成,该程序可存储于计算机可读取存储介质中,该程序在执行时,可包括如上述各方法实施例的流程。而前述的存储介质包括:ROM或随机存储记忆体RAM、磁碟或者光盘等各种可存储程序代码的介质。

Claims (29)

  1. 一种截屏方法,其特征在于,包括:
    响应于用户的截屏操作,电子设备对第一时间段内的视频进行N次截屏,得到N个第一截屏图片,其中所述N为不小于2的正整数;
    所述电子设备对所述第一截屏图片进行目标检测,确定所述第一截屏图片中待处理目标所在的区域,所述待处理目标为所述目标检测的目标;
    所述电子设备将所述第一截屏图片中待处理目标所在的区域处理为透明区域,得到M个第二截屏图片,其中,所述M为小于等于N的正整数;
    所述电子设备将所述M个第二截屏图片进行叠加,得到第三截屏图片;
    当所述M等于2时,所述第三截屏图片中显示有叠加在最上层的第二截屏图片的非透明区域的信息以及所述叠加在最上层的第二截屏图片的透明区域对应的第一区域的信息;所述第一区域为在下一层的第二截屏图片上的位置与所述最上层的第二截屏图片的透明区域相应的区域;所述第一区域的信息包括所述第一区域中非透明区域的信息;
    当所述M大于2时,所述第一区域的信息还包括所述第一区域的透明区域对应的第二区域的信息;所述第二区域为在再下一层的第二截屏图片上的位置与所述第一区域的透明区域相应的区域;所述第二区域的信息包括所述第二区域的非透明区域的信息;依此类推,直到所述第三截屏图片中没有透明区域,或再下一层的第二截屏图片为叠加在最下层的第二截屏图片。
  2. 根据权利要求1所述的方法,其特征在于,所述响应于用户的截屏操作,电子设备对第一时间段内的视频进行N次截屏,得到N个第一截屏图片,具体包括:
    响应于用户的截屏操作,所述电子设备确定第一时间段的起始时刻和第一时间段的停止时刻;
    所述电子设备在所述第一时间段内对所述视频进行N次截屏,得到N个第一截屏图片。
  3. 根据权利要求2所述的方法,其特征在于,所述截屏操作包括不连续完成的第一操作和第二操作;
    所述响应于用户的截屏操作,所述电子设备确定所述第一时间段的起始时刻和停止时刻,具体包括:
    响应于用户的所述第一操作,所述电子设备确定所述第一时间段的起始时刻;
    响应于用户的所述第二操作,所述电子设备确定所述第一时间段的停止时刻。
  4. 根据权利要求2或3所述的方法,其特征在于,所述截屏操作包括一系列连续完成的操作;
    所述响应于用户的截屏操作,所述电子设备确定所述第一时间段的起始时刻和停止时刻,具体包括:
    响应于用户触发截屏的操作,所述电子设备显示时间段选择控件;
    响应于用户在所述时间段选择控件上的操作,所述电子设备确定所述第一时间段的起始时刻和停止时刻。
  5. 根据权利要求2至4中任一项所述的方法,其特征在于,所述电子设备在所述第一 时间段内对所述视频进行N次截屏,得到N个第一截屏图片,具体包括:
    所述电子设备按照预设时间周期在所述第一时间段内对所述视频进行N次截屏,得到N个第一截屏图片。
  6. 根据权利要求2至4中任一项所述的方法,其特征在于,所述电子设备在所述第一时间段内对所述视频进行N次截屏,得到N个第一截屏图片,具体包括:
    所述电子设备在所述第一时间段内对所述视频进行目标检测;
    每当确定所述待处理目标在视频中的位置变化超出预设距离阈值时,进行一次截屏,产生一个第一截屏图片,直到得到所述N个第一截屏图片。
  7. 根据权利要求1至6中任一项所述的方法,其特征在于,所述方法还包括:
    所述电子设备删除所述N个第一截屏图片中不符合进行目标检测的图片质量需求的第一截屏图片。
  8. 根据权利要求1至7中任一项所述的方法,其特征在于,所述电子设备将所述M个第二截屏图片进行叠加,得到第三截屏图片,具体包括:
    所述电子设备按照预设默认顺序,将所述M个第二截屏图片进行叠加,得到第三截屏图片。
  9. 根据权利要求8所述的方法,其特征在于,所述预设默认顺序为在所述视频中播放时间在后的图片叠加在上的顺序。
  10. 根据权利要求1至7中任一项所述的方法,其特征在于,所述电子设备将所述M个第二截屏图片进行叠加,得到第三截屏图片,具体包括:
    所述电子设备显示对所述M个第二截屏图片的叠加顺序;
    响应于用户调整叠加顺序的操作,所述电子设备根据用户调整的叠加顺序,对所述M个第二截屏图片进行叠加,得到第三截屏图片。
  11. 根据权利要求1至10中任一项所述的方法,其特征在于,所述方法还包括:
    所述电子设备使用所述第三截屏图片中的背景色填充所述第三截屏图片中的透明区域。
  12. 根据权利要求1至10中任一项所述的方法,其特征在于,所述方法还包括:
    所述电子设备使用智能修复技术对所述第三截屏图片中的透明区域进行填充补全。
  13. 根据权利要求1至12中任一项所述的方法,其特征在于,所述方法还包括:
    所述电子设备将叠加在最上层的第二截屏图片对应的第一截屏图片中的待处理目标所在的区域进行半透明处理,得到半透明待处理目标;
    所述电子设备将所述半透明待处理目标叠加在所述第三截屏图片上,得到第四截屏图片。
  14. 一种电子设备,其特征在于,所述电子设备包括:一个或多个处理器和存储器;
    所述存储器与所述一个或多个处理器耦合,所述存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令,所述一个或多个处理器调用所述计算机指令以使得所述电子设备执行:
    响应于用户的截屏操作,对第一时间段内的视频进行N次截屏,得到N个第一截屏图 片,其中所述N为不小于2的正整数;
    对所述第一截屏图片进行目标检测,确定所述第一截屏图片中待处理目标所在的区域,所述待处理目标为所述目标检测的目标;
    将所述第一截屏图片中待处理目标所在的区域处理为透明区域,得到M个第二截屏图片,其中,所述M为小于等于N的正整数;
    将所述M个第二截屏图片进行叠加,得到第三截屏图片;
    当所述M等于2时,所述第三截屏图片中显示有叠加在最上层的第二截屏图片的非透明区域的信息以及所述叠加在最上层的第二截屏图片的透明区域对应的第一区域的信息;所述第一区域为在下一层的第二截屏图片上的位置与所述最上层的第二截屏图片的透明区域相应的区域;所述第一区域的信息包括所述第一区域中非透明区域的信息;
    当所述M大于2时,所述第一区域的信息还包括所述第一区域的透明区域对应的第二区域的信息;所述第二区域为在再下一层的第二截屏图片上的位置与所述第一区域的透明区域相应的区域;所述第二区域的信息包括所述第二区域的非透明区域的信息;依此类推,直到所述第三截屏图片中没有透明区域,或再下一层的第二截屏图片为叠加在最下层的第二截屏图片。
  15. 根据权利要求14所述的电子设备,其特征在于,所述一个或多个处理器,具体用于调用所述计算机指令以使得所述电子设备执行:
    响应于用户的截屏操作,确定第一时间段的起始时刻和第一时间段的停止时刻;
    在所述第一时间段内对所述视频进行N次截屏,得到N个第一截屏图片。
  16. 根据权利要求15所述的电子设备,其特征在于,所述截屏操作包括不连续完成的第一操作和第二操作;
    所述一个或多个处理器,具体用于调用所述计算机指令以使得所述电子设备执行:
    响应于用户的所述第一操作,确定所述第一时间段的起始时刻;
    响应于用户的所述第二操作,确定所述第一时间段的停止时刻。
  17. 根据权利要求15或16所述的电子设备,其特征在于,所述截屏操作包括一系列连续完成的操作;
    所述一个或多个处理器,具体用于调用所述计算机指令以使得所述电子设备执行:
    响应于用户触发截屏的操作,显示时间段选择控件;
    响应于用户在所述时间段选择控件上的操作,确定所述第一时间段的起始时刻和停止时刻。
  18. 根据权利要求15至17中任一项所述的电子设备,其特征在于,所述一个或多个处理器,具体用于调用所述计算机指令以使得所述电子设备执行:
    按照预设时间周期在所述第一时间段内对所述视频进行N次截屏,得到N个第一截屏图片。
  19. 根据权利要求15至17中任一项所述的电子设备,其特征在于,所述一个或多个处理器,具体用于调用所述计算机指令以使得所述电子设备执行:
    在所述第一时间段内对所述视频进行目标检测;
    每当确定所述待处理目标在视频中的位置变化超出预设距离阈值时,进行一次截屏,产生一个第一截屏图片,直到得到所述N个第一截屏图片。
  20. 根据权利要求14至19中任一项所述的电子设备,其特征在于,所述一个或多个处理器,还用于调用所述计算机指令以使得所述电子设备执行:
    删除所述N个第一截屏图片中不符合进行目标检测的图片质量需求的第一截屏图片。
  21. 根据权利要求14至20中任一项所述的电子设备,其特征在于,所述一个或多个处理器,具体用于调用所述计算机指令以使得所述电子设备执行:
    按照预设默认顺序,将所述M个第二截屏图片进行叠加,得到第三截屏图片。
  22. 根据权利要求21所述的电子设备,其特征在于,所述预设默认顺序为在所述视频中播放时间在后的图片叠加在上的顺序。
  23. 根据权利要求14至20中任一项所述的电子设备,其特征在于,所述一个或多个处理器,具体用于调用所述计算机指令以使得所述电子设备执行:
    显示对所述M个第二截屏图片的叠加顺序;
    响应于用户调整叠加顺序的操作,根据用户调整的叠加顺序,对所述M个第二截屏图片进行叠加,得到第三截屏图片。
  24. 根据权利要求14至23中任一项所述的电子设备,其特征在于,所述一个或多个处理器,还用于调用所述计算机指令以使得所述电子设备执行:
    使用所述第三截屏图片中的背景色填充所述第三截屏图片中的透明区域。
  25. 根据权利要求14至23中任一项所述的电子设备,其特征在于,所述一个或多个处理器,还用于调用所述计算机指令以使得所述电子设备执行:
    使用智能修复技术对所述第三截屏图片中的透明区域进行填充补全。
  26. 根据权利要求14至25中任一项所述的电子设备,其特征在于,所述一个或多个处理器,还用于调用所述计算机指令以使得所述电子设备执行:
    将叠加在最上层的第二截屏图片对应的第一截屏图片中的待处理目标所在的区域进行半透明处理,得到半透明待处理目标;
    将所述半透明待处理目标叠加在所述第三截屏图片上,得到第四截屏图片。
  27. 一种芯片系统,所述芯片系统应用于电子设备,所述芯片系统包括一个或多个处理器,所述处理器用于调用计算机指令以使得所述电子设备执行如权利要求1-13中任一项所述的方法。
  28. 一种包含指令的计算机程序产品,其特征在于,当所述计算机程序产品在电子设备上运行时,使得所述电子设备执行如权利要求1-13中任一项所述的方法。
  29. 一种计算机可读存储介质,包括指令,其特征在于,当所述指令在电子设备上运行时,使得所述电子设备执行如权利要求1-13中任一项所述的方法。
PCT/CN2021/094619 2020-05-26 2021-05-19 一种截屏方法及电子设备 WO2021238740A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010455200.1 2020-05-26
CN202010455200.1A CN113723397B (zh) 2020-05-26 2020-05-26 一种截屏方法及电子设备

Publications (1)

Publication Number Publication Date
WO2021238740A1 true WO2021238740A1 (zh) 2021-12-02

Family

ID=78671944

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/094619 WO2021238740A1 (zh) 2020-05-26 2021-05-19 一种截屏方法及电子设备

Country Status (2)

Country Link
CN (1) CN113723397B (zh)
WO (1) WO2021238740A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115086774A (zh) * 2022-05-31 2022-09-20 北京达佳互联信息技术有限公司 资源显示方法、装置、电子设备及存储介质
CN115562525A (zh) * 2022-03-15 2023-01-03 荣耀终端有限公司 截屏方法及装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106851385A (zh) * 2017-02-20 2017-06-13 北京金山安全软件有限公司 视频录制方法、装置和电子设备
CN106970754A (zh) * 2017-03-28 2017-07-21 北京小米移动软件有限公司 截屏处理的方法及装置
CN109525874A (zh) * 2018-09-27 2019-03-26 维沃移动通信有限公司 一种截屏方法及终端设备
CN110502117A (zh) * 2019-08-26 2019-11-26 三星电子(中国)研发中心 电子终端中的截图方法以及电子终端

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103997616B (zh) * 2013-12-20 2019-02-05 三亚中兴软件有限责任公司 一种处理视频会议画面的方法、装置及会议终端
CN104516644A (zh) * 2014-12-09 2015-04-15 广东欧珀移动通信有限公司 一种自由截屏的方法及终端
CN106227419A (zh) * 2016-07-11 2016-12-14 北京小米移动软件有限公司 截屏方法及装置
CN109005446A (zh) * 2018-06-27 2018-12-14 聚好看科技股份有限公司 一种截屏处理方法及装置、电子设备、存储介质
CN109144370B (zh) * 2018-09-30 2022-04-29 珠海豹趣科技有限公司 一种截屏方法、装置、终端及计算机可读介质
CN111143015B (zh) * 2019-12-31 2022-03-08 维沃移动通信有限公司 一种截屏方法及电子设备

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106851385A (zh) * 2017-02-20 2017-06-13 北京金山安全软件有限公司 视频录制方法、装置和电子设备
CN106970754A (zh) * 2017-03-28 2017-07-21 北京小米移动软件有限公司 截屏处理的方法及装置
CN109525874A (zh) * 2018-09-27 2019-03-26 维沃移动通信有限公司 一种截屏方法及终端设备
CN110502117A (zh) * 2019-08-26 2019-11-26 三星电子(中国)研发中心 电子终端中的截图方法以及电子终端

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115562525A (zh) * 2022-03-15 2023-01-03 荣耀终端有限公司 截屏方法及装置
CN115086774A (zh) * 2022-05-31 2022-09-20 北京达佳互联信息技术有限公司 资源显示方法、装置、电子设备及存储介质
CN115086774B (zh) * 2022-05-31 2024-03-05 北京达佳互联信息技术有限公司 资源显示方法、装置、电子设备及存储介质

Also Published As

Publication number Publication date
CN113723397A (zh) 2021-11-30
CN113723397B (zh) 2023-07-25

Similar Documents

Publication Publication Date Title
WO2020253719A1 (zh) 一种录屏方法及电子设备
WO2020238871A1 (zh) 一种投屏方法、系统及相关装置
WO2020259452A1 (zh) 一种移动终端的全屏显示方法及设备
JP7238115B2 (ja) 写真撮影シナリオおよび電子デバイスで画像を表示するための方法
WO2020224485A1 (zh) 一种截屏方法及电子设备
WO2021136050A1 (zh) 一种图像拍摄方法及相关装置
WO2021213164A1 (zh) 应用界面交互方法、电子设备和计算机可读存储介质
CN110114747B (zh) 一种通知处理方法及电子设备
WO2021000881A1 (zh) 一种分屏方法及电子设备
WO2021042978A1 (zh) 一种主题切换方法以及主题切换装置
WO2021036770A1 (zh) 一种分屏处理方法及终端设备
WO2021258814A1 (zh) 视频合成方法、装置、电子设备及存储介质
WO2021008589A1 (zh) 一种应用的运行方法及电子设备
WO2020107463A1 (zh) 一种电子设备的控制方法及电子设备
CN112383664B (zh) 一种设备控制方法、第一终端设备、第二终端设备及计算机可读存储介质
WO2022001258A1 (zh) 多屏显示方法、装置、终端设备及存储介质
WO2021238370A1 (zh) 显示控制方法、电子设备和计算机可读存储介质
CN113935898A (zh) 图像处理方法、系统、电子设备及计算机可读存储介质
WO2022012418A1 (zh) 拍照方法及电子设备
WO2021143391A1 (zh) 基于视频通话的共享屏幕方法及移动设备
WO2021238740A1 (zh) 一种截屏方法及电子设备
WO2021042878A1 (zh) 一种拍摄方法及电子设备
EP4163782A1 (en) Cross-device desktop management method, first electronic device, and second electronic device
WO2022179495A1 (zh) 一种隐私风险反馈方法、装置及第一终端设备
WO2021204103A1 (zh) 照片预览方法、电子设备和存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21812975

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21812975

Country of ref document: EP

Kind code of ref document: A1