WO2018059237A1 - 一种视频数据的生成方法、终端和计算机可读存储介质 - Google Patents

一种视频数据的生成方法、终端和计算机可读存储介质 Download PDF

Info

Publication number
WO2018059237A1
WO2018059237A1 PCT/CN2017/101621 CN2017101621W WO2018059237A1 WO 2018059237 A1 WO2018059237 A1 WO 2018059237A1 CN 2017101621 W CN2017101621 W CN 2017101621W WO 2018059237 A1 WO2018059237 A1 WO 2018059237A1
Authority
WO
WIPO (PCT)
Prior art keywords
picture
sub
target
target area
pictures
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2017/101621
Other languages
English (en)
French (fr)
Inventor
刘林汶
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nubia Technology Co Ltd
Original Assignee
Nubia Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Publication of WO2018059237A1 publication Critical patent/WO2018059237A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • H04N5/2624Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects for obtaining an image which is composed of whole input images, e.g. splitscreen
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • H04N5/2625Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects for obtaining an image which is composed of images from a temporal image sequence, e.g. for a stroboscopic effect
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • H04N5/265Mixing

Definitions

  • the present invention relates to the field of terminal applications, and in particular, to a method for generating video data, a terminal, and a computer readable storage medium.
  • embodiments of the present invention are expected to provide a method, a terminal, and a computer readable storage medium for generating video data.
  • an embodiment of the present invention provides a method for generating video data, including: when a camera of a terminal is running, acquiring a target area of a shooting interface, determining a target object from an object of the target area; receiving a photo After the instruction, the preset time is taken as the starting time before the time of the photographing, and the ending time is the ending time after the photographing time, and each picture is obtained according to the preset step size; An area including the target object and having the same size as the target area is each sub-picture; the target area is matched with each of the sub-pictures respectively, and when the matching is successful, the sub-picture is retained; each sub-picture based on the reservation is retained The video data is generated, and the video data is saved with the photo taken at the photographing moment.
  • the extracting, from each picture, the area that includes the target object and having the same size as the target area is each sub-picture, including: detecting each of the pictures, and obtaining each of the pictures. An object of the picture; matching the object of each picture with the target object, and when the matching is successful, retaining each picture that is successfully matched; and determining, from each picture retained, location information of the target object According to the location information, an area including the target object and having the same size as the target area is intercepted from each of the reserved pictures, and the intercepted area is taken as a corresponding sub-picture.
  • the matching the target area with each of the sub-pictures includes: determining an object of each sub-picture, and determining an object other than the target object in the object of each sub-picture as a first feature object set; determining, in the object of the target area, an object other than the target object as a second feature object set; and the second feature object set Matching with the first set of feature objects.
  • the target area is a closed area.
  • the sub-picture is discarded.
  • the matching the target area with each of the sub-pictures includes:
  • the objects of the target area are matched one by one for each object of the sub-picture.
  • the reserved sub-picture includes:
  • an embodiment of the present invention provides a terminal, where the terminal includes: an acquiring module configured to acquire a target area of a shooting interface when the camera of the terminal is running, and determine a target object from objects in the target area; After receiving the photographing instruction, the preset time is taken as the starting time before the photographing time, and the preset time is the ending time after the photographing time, and the images are obtained according to the preset step size; the intercepting module, Configuring to extract, from each picture, an area including the target object and having the same size as the target area as each sub-picture; and a matching module configured to match the target area with each of the sub-pictures, When the matching is successful, the sub-picture is retained; the saving module is configured to generate video data based on the retained sub-pictures, and save the video data and the photos taken at the photographing moment.
  • the intercepting module is configured to detect each of the pictures to obtain an object of each picture; and match the object of each picture with the target object, and when the matching is successful, retain Matching each picture that is successful; determining, from each of the retained pictures, location information of the target object; according to the location information, cutting from each of the reserved pictures An area including the target object and having the same size as the target area is taken, and the intercepted area is taken as a corresponding sub-picture.
  • the intercepting module is further configured to discard the picture that fails the matching when the object of the image fails to match the target object.
  • the intercepting module is configured to set a center position of the target object according to the location information, and intercept the target area from each of the pictures centering on a center position of the target object Areas of the same size.
  • the matching module is configured to determine an object of each of the sub-pictures, and determine an object other than the target object in the object of each sub-picture as a first feature object set; An object other than the target object is determined as a second feature object set; and the second feature object set is matched with the first feature object set.
  • the target area is a closed area.
  • the matching module is further configured to discard the sub-picture when the target area fails to match the sub-picture.
  • the matching module is configured to match the objects of the target area to the objects of each sub-picture one by one.
  • the matching module is configured to:
  • an embodiment of the present invention provides a terminal, including a processor and a memory for storing a computer program capable of running on a processor,
  • processor is configured to perform any of the above methods when the computer program is executed step.
  • an embodiment of the present invention provides a computer readable storage medium having stored thereon a computer program, the computer program being executed by a processor to implement the steps of any of the foregoing methods.
  • a method for generating video data, a terminal, and a computer readable storage medium provided by an embodiment of the present invention.
  • a camera of a terminal When a camera of a terminal is running, first, a target area of a shooting interface is acquired and a target object is determined from an object of the target area, and then After receiving the photographing instruction, the preset time is taken as the starting time before the photographing time, and the preset time is the ending time after the photographing moment, and each image is obtained according to the preset step size; secondly, from each image Each sub-picture is truncated, and each sub-picture includes a target object and the size of each sub-picture is the same as the size of the target area, so that the partial picture is truncated by generating the sub-picture; finally, by respectively, the target area is respectively The sub-pictures are matched to obtain the reserved sub-pictures, and video data is generated based on the retained sub-pictures, and the video data and the photos taken at the time of photograph
  • the retained sub-pictures are obtained, thereby generating local video data, and matching the local video data by matching
  • the local video data is saved together with the photo, so that the user can watch the local small video while viewing the photo, and improve the viewing quality of the video before and after the photo is saved, and improve the viewing performance. user experience.
  • FIG. 1 is a schematic structural diagram of hardware of an optional terminal for implementing various embodiments of the present invention
  • FIG. 2 is a schematic diagram of a wireless communication system of the mobile terminal shown in FIG. 1;
  • FIG. 3 is a schematic flowchart diagram of a method for generating video data according to an embodiment of the present invention
  • FIG. 4 is a schematic diagram of arrangement of target areas according to an embodiment of the present invention.
  • FIG. 5 is a timing diagram of a method for generating video data according to an embodiment of the present invention.
  • FIG. 6 is a schematic flowchart diagram of another method for generating video data according to an embodiment of the present invention.
  • 7-1 is an optional schematic diagram of a picture of an embodiment of the present invention.
  • FIG. 7-2 is another schematic diagram of an arrangement of a picture according to an embodiment of the present invention.
  • 7-3 is still another schematic arrangement diagram of a picture of an embodiment of the present invention.
  • 7-4 is an alternative schematic view of a picture of an embodiment of the present invention.
  • FIGS. 7-5 are schematic diagrams showing another alternative arrangement of a picture of an embodiment of the present invention.
  • FIG. 8 is a schematic structural diagram of a terminal of an embodiment of the present invention.
  • the terminal can be implemented in various forms.
  • the terminals described in the present invention may include, for example, mobile phones, smart phones, notebook computers, digital broadcast receivers, personal digital assistants (PDAs), tablet computers (PADs), portable multimedia players (PMPs), navigation devices, and the like.
  • Terminals and fixed terminals such as digital TVs, desktop computers, and the like.
  • the terminal is a terminal.
  • PDAs personal digital assistants
  • PADs tablet computers
  • PMPs portable multimedia players
  • terminals and fixed terminals such as digital TVs, desktop computers, and the like.
  • the terminal is a terminal.
  • configurations in accordance with embodiments of the present invention can be applied to fixed type terminals in addition to components that are specifically for mobile purposes.
  • FIG. 1 is a schematic diagram showing the hardware structure of an optional terminal for implementing various embodiments of the present invention.
  • the terminal 100 may include a wireless communication unit 110, an audio/video (A/V) input unit 120, a user input unit 130, a sensing unit 140, an output unit 150, a memory 160, an interface unit 170, a controller 180, a power supply unit 190, and the like. Wait.
  • Figure 1 shows a terminal with various components, but it should be understood that not all illustrated components may be implemented, alternatively more or With fewer components, the components of the terminal will be described in detail below.
  • Wireless communication unit 110 typically includes one or more components that permit radio communication between terminal 100 and a wireless communication system or network.
  • the wireless communication unit may include at least one of a broadcast receiving module 111, a mobile communication module 112, a wireless internet module 113, a short-range communication module 114, and a location information module 115.
  • the broadcast receiving module 111 receives a broadcast signal and/or broadcast associated information from an external broadcast management server via a broadcast channel.
  • the broadcast channel can include a satellite channel and/or a terrestrial channel.
  • the broadcast management server may be a server that generates and transmits a broadcast signal and/or broadcast associated information or a server that receives a previously generated broadcast signal and/or broadcast associated information and transmits it to the terminal.
  • the broadcast signal may include a TV broadcast signal, a radio broadcast signal, a data broadcast signal, and the like.
  • the broadcast signal may further include a broadcast signal combined with a TV or radio broadcast signal.
  • the broadcast associated information may also be provided via a mobile communication network, and in this case, the broadcast associated information may be received by the mobile communication module 112.
  • the broadcast signal may exist in various forms, for example, it may exist in the form of Digital Multimedia Broadcasting (DMB) Electronic Program Guide (EPG), Digital Video Broadcasting Handheld (DVB-H) Electronic Service Guide (ESG), and the like.
  • the broadcast receiving module 111 can receive a signal broadcast by using various types of broadcast systems.
  • the broadcast receiving module 111 can use forward link media (MediaFLO) by using, for example, multimedia broadcast-terrestrial (DMB-T), digital multimedia broadcast-satellite (DMB-S), digital video broadcast-handheld (DVB-H)
  • MediaFLO forward link media
  • the digital broadcasting system of the @) data broadcasting system, the terrestrial digital broadcasting integrated service (ISDB-T), and the like receives digital broadcasting.
  • the broadcast receiving module 111 can be constructed as various broadcast systems suitable for providing broadcast signals as well as the above-described digital broadcast system.
  • the broadcast signal and/or broadcast associated information received via the broadcast receiving module 111 may be stored in the memory 160 (or other type of storage
  • the mobile communication module 112 transmits the radio signals to and/or receives radio signals from at least one of a base station (e.g., an access point, a Node B, etc.), an external terminal, and a server.
  • a base station e.g., an access point, a Node B, etc.
  • Such radio signals may include voice call signals, video call signals, or according to text and/or Various types of data transmitted and/or received by multimedia messages.
  • the wireless internet module 113 supports wireless internet access of the terminal.
  • the module can be internally or externally coupled to the terminal.
  • the wireless Internet access technologies involved in the module may include WLAN (Wireless LAN) (Wi-Fi), Wibro (Wireless Broadband), Wimax (Worldwide Interoperability for Microwave Access), HSDPA (High Speed Downlink Packet Access), etc. .
  • the short range communication module 114 is a module configured to support short range communication.
  • Some examples of short-range communication technology include Bluetooth TM, a radio frequency identification (RFID), infrared data association (IrDA), ultra wideband (UWB), ZigBee, etc. TM.
  • the location information module 115 is a module configured to check or acquire location information of the terminal.
  • a typical example of the location information module 115 is a Global Positioning System (GPS) module.
  • GPS Global Positioning System
  • the position information module 115 as a GPS calculates distance information and accurate time information from three or more satellites and applies triangulation to the calculated information to accurately calculate the three-dimensional current based on longitude, latitude, and altitude. location information.
  • the method for calculating position and time information uses three satellites and corrects the calculated position and time information errors by using another satellite.
  • the GPS module can calculate the speed information by continuously calculating the current position information in real time.
  • the A/V input unit 120 is configured to receive an audio or video signal.
  • the A/V input unit 120 may include a camera 121 and a microphone 122 that processes image data of still pictures or video obtained by the image capturing device in a video capturing mode or an image capturing mode.
  • the processed image frame can be displayed on the display unit 151.
  • the image frames processed by the camera 121 may be stored in the memory 160 (or other storage medium) or transmitted via the wireless communication unit 110, and two or more cameras 121 may be provided according to the configuration of the terminal.
  • the microphone 122 can receive sound (audio data) via the microphone 122 in an operation mode of a telephone call mode, a recording mode, a voice recognition mode, and the like, and can process such sound as audio data.
  • the processed audio (voice) data can be converted to be transmittable via the mobile communication module 112 in the case of a telephone call mode
  • the microphone 122 can implement various types of noise cancellation (or suppression) algorithms to cancel (or suppress) noise or interference generated during the process of receiving and transmitting audio signals.
  • the user input unit 130 can generate key input data according to a command input by the user to control various operations of the terminal.
  • the user input unit 130 allows the user to input various types of information, and may include a keyboard, a pot, a touch pad (eg, a touch sensitive component that detects changes in resistance, pressure, capacitance, etc. due to contact), a scroll wheel , rocker, etc.
  • a touch screen can be formed.
  • the sensing unit 140 detects the current state of the terminal 100 (eg, the open or closed state of the terminal 100), the location of the terminal 100, the presence or absence of the user's contact with the terminal 100 (ie, touch input), the orientation of the terminal 100, and the terminal. Acceleration or deceleration movement and direction of 100, etc., and generation of commands or signals for controlling the operation of the terminal 100.
  • the sensing unit 140 can sense whether the slide type phone is turned on or off.
  • the sensing unit 140 can detect whether the power supply unit 190 provides power or whether the interface unit 170 is coupled to an external device.
  • Sensing unit 140 may include proximity sensor 141 which will be described below in connection with a touch screen.
  • the interface unit 170 serves as an interface through which at least one external device can connect with the terminal 100.
  • the external device may include a wired or wireless headset port, an external power (or battery charger) port, a wired or wireless data port, a memory card port, a port configured to connect a device having an identification module, audio input/output (I/O) port, video I/O port, headphone port, and more.
  • the identification module may be stored to verify various information used by the user using the terminal 100 and may include a User Identification Module (UIM), a Customer Identification Module (SIM), a Universal Customer Identification Module (USIM), and the like.
  • the device having the identification module may take the form of a smart card, and thus the identification device may be connected to the terminal 100 via a port or other connection device.
  • the interface unit 170 can be configured to receive input from an external device (eg, data Information, power, etc.) and transmits the received input to one or more components within terminal 100 or may be configured to transfer data between the terminal and an external device.
  • an external device eg, data Information, power, etc.
  • Output unit 150 is configured to provide an output signal (eg, an audio signal, a video signal, an alarm signal, a vibration signal, etc.) in a visual, audio, and/or tactile manner.
  • the output unit 150 may include a display unit 151, an audio output module 152, an alarm unit 153, and the like.
  • the display unit 151 can display information processed in the terminal 100. For example, when the terminal 100 is in the phone call mode, the display unit 151 can display a user interface (UI) or a graphical user interface (GUI) related to a call or other communication (eg, text messaging, multimedia file download, etc.). When the terminal 100 is in the video call mode or the image capturing mode, the display unit 151 may display a captured image and/or a received image, a UI or GUI showing a video or image and related functions, and the like.
  • UI user interface
  • GUI graphical user interface
  • the display unit 151 can function as an input device and an output device.
  • the display unit 151 may include at least one of a liquid crystal display (LCD), a thin film transistor LCD (TFT-LCD), an organic light emitting diode (OLED) display, a flexible display, a three-dimensional (3D) display, and the like.
  • LCD liquid crystal display
  • TFT-LCD thin film transistor LCD
  • OLED organic light emitting diode
  • a flexible display a three-dimensional (3D) display, and the like.
  • 3D three-dimensional
  • Some of these displays may be configured to be transparent to allow a user to view from the outside, which may be referred to as a transparent display, and a typical transparent display may be, for example, a TOLED (Transparent Organic Light Emitting Diode) display or the like.
  • TOLED Transparent Organic Light Emitting Diode
  • the terminal 100 may include two or more display units (or other display devices) according to a particular desired embodiment, for example, the terminal may include an external display unit (not shown) and an internal display unit (not shown).
  • the touch screen can be configured to detect touch input pressure as well as touch input position and touch input area.
  • the audio output module 152 can convert audio data received by the wireless communication unit 110 or stored in the memory 160 into audio when the terminal is in a call signal receiving mode, a call mode, a recording mode, a voice recognition mode, a broadcast receiving mode, and the like.
  • the signal is output as a sound.
  • the audio output module 152 can provide audio output (eg, call signal reception sound, message reception sound, etc.) associated with a particular function performed by the terminal 100.
  • the audio output module 152 can include a speaker, a buzzer, and the like.
  • the memory 160 may store a software program or the like that performs processing and control operations performed by the controller 180, or may temporarily store data (for example, a phone book, a message, a still image, a video, and the like) that has been output or is to be output. Moreover, the memory 160 can store data regarding vibrations and audio signals of various manners that are output when a touch is applied to the touch screen.
  • the memory 160 may include at least one type of storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (eg, SD or DX memory, etc.), a random access memory (RAM), a static random access memory ( SRAM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), programmable read only memory (PROM), magnetic memory, magnetic disk, optical disk, and the like.
  • the terminal 100 can cooperate with a network storage device that performs a storage function of the memory 160 through a network connection.
  • Controller 180 typically controls the overall operation of the terminal.
  • the controller 180 performs the control and processing associated with voice calls, data communications, video calls, and the like.
  • the controller 180 may include a multimedia module 181 configured to reproduce (or play back) multimedia data, which may be constructed within the controller 180 or may be configured to be separate from the controller 180.
  • the controller 180 may perform a pattern recognition process to recognize a handwriting input or a picture drawing input performed on the touch screen as a character or an image.
  • the power supply unit 190 receives external power or internal power under the control of the controller 180 and provides appropriate power required to operate the various components and components.
  • the various embodiments described herein can be used, for example, in computer software, hardware, or any of them.
  • the combined computer readable medium is implemented.
  • the embodiments described herein may be through the use of application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays ( An FPGA, a processor, a controller, a microcontroller, a microprocessor, at least one of the electronic units designed to perform the functions described herein, in some cases, such an embodiment may be at the controller 180 Implemented in the middle.
  • implementations such as procedures or functions may be implemented with separate software modules that permit the execution of at least one function or operation.
  • the software code can be implemented by a software application (or program) written in any suitable programming language, which can be stored in memory
  • the terminal has been described in terms of its function.
  • a slide type terminal among various types of terminals such as a folding type, a bar type, a swing type, a slide type terminal, and the like will be described as an example. Therefore, the present invention can be applied to any type of terminal, and is not limited to a slide type terminal.
  • the terminal 100 as shown in FIG. 1 may be configured to operate using a communication system such as a wired and wireless communication system and a satellite-based communication system that transmits data via frames or packets.
  • a communication system such as a wired and wireless communication system and a satellite-based communication system that transmits data via frames or packets.
  • Such communication systems may use different air interfaces and/or physical layers.
  • air interfaces used by communication systems include, for example, Frequency Division Multiple Access (FDMA), Time Division Multiple Access (TDMA), Code Division Multiple Access (CDMA), and Universal Mobile Telecommunications System (UMTS) (in particular, Long Term Evolution (LTE)). ), Global System for Mobile Communications (GSM), etc.
  • FDMA Frequency Division Multiple Access
  • TDMA Time Division Multiple Access
  • CDMA Code Division Multiple Access
  • UMTS Universal Mobile Telecommunications System
  • LTE Long Term Evolution
  • GSM Global System for Mobile Communications
  • the following description relates to a CDMA communication system, but such teachings are equally applicable to other types of systems.
  • a CDMA wireless communication system can include a plurality of mobile terminals 100, a plurality of base stations (BS) 270, a base station controller (BSC) 275, and a mobile switching center (MSC) 280.
  • the MSC 280 is configured to interface with a public switched telephone network (PSTN) 290.
  • PSTN public switched telephone network
  • the MSC 280 is also configured to interface with a BSC 275 that can be coupled to the base station 270 via a backhaul line.
  • Return line can be root Constructed according to any of several known interfaces including, for example, E1/T1, ATM, IP, PPP, Frame Relay, HDSL, ADSL or xDSL. It will be appreciated that the system as shown in FIG. 2 can include multiple BSCs 275.
  • Each BS 270 can serve one or more partitions (or regions), with each partition covered by a multi-directional antenna or an antenna pointing in a particular direction radially away from the BS 270. Alternatively, each partition may be covered by two or more antennas configured to receive diversity. Each BS 270 can be configured to support multiple frequency allocations, and each frequency allocation has a particular frequency spectrum (eg, 1.25 MHz, 5 MHz, etc.).
  • BS 270 may also be referred to as a Base Transceiver Subsystem (BTS) or other equivalent terminology.
  • BTS Base Transceiver Subsystem
  • the term "base station” can be used to generally mean a single BSC 275 and at least one BS 270.
  • a base station can also be referred to as a "cell station.”
  • each partition of a particular BS 270 may be referred to as multiple cellular stations.
  • a broadcast transmitter (BT) 295 transmits a broadcast signal to the mobile terminal 100 operating within the system.
  • a broadcast receiving module 111 as shown in FIG. 1 is provided at the mobile terminal 100 to receive a broadcast signal transmitted by the BT 295.
  • several GPS satellites 300 are shown. The satellite 300 helps locate at least one of the plurality of mobile terminals 100.
  • a plurality of satellites 300 are depicted, but it is understood that useful positioning information can be obtained using any number of satellites.
  • the location information module 115 i.e., the GPS module, as shown in FIG. 1, is typically configured to cooperate with the satellite 300 to obtain desired positioning information. Instead of GPS tracking technology or in addition to GPS tracking technology, other techniques that can track the location of the mobile terminal can be used. Additionally, at least one GPS satellite 300 can selectively or additionally process satellite DMB transmissions.
  • BS 270 receives reverse link signals from various mobile terminals 100.
  • Mobile terminal 100 typically participates in calls, messaging, and other types of communications.
  • Each reverse link signal received by a particular BS 270 is processed within a particular BS 270.
  • the obtained data is forwarded to the relevant BSC 275.
  • BSC provides call resource allocation and includes between BS 270 Coordinated mobility management capabilities of the soft handoff process.
  • the BSC 275 also routes the received data to the MSC 280, which provides additional routing services for interfacing with the PSTN 290.
  • PSTN 290 interfaces with MSC 280, which forms an interface with BSC 275, and BSC 275 controls BS 270 accordingly to transmit forward link signals to mobile terminal 100.
  • an embodiment of the present invention provides a method for generating video data, where the method is applied to a terminal, and the function implemented by the method for generating the video data may be implemented by using a processor in a terminal to call a program code, of course, the program.
  • the code can be stored in a computer storage medium, and the terminal can include at least a processor and a storage medium.
  • FIG. 3 is a schematic flowchart of a method for generating video data according to an embodiment of the present invention. As shown in FIG. 3, the method for generating video data includes:
  • FIG. 4 is In the embodiment of the present invention, as shown in FIG. 4, the rectangle in FIG. 4 is a target area circled by the user.
  • the shape of the target area may be a rectangle, a circle, a triangle line, or the like, and is not specifically limited in the embodiment of the present invention.
  • the target area is detected to know the object of the target area.
  • Target area in Figure 4 The objects include object 1, object 2, and object 3; the user selects object 1 as the target object.
  • FIG. 5 is a timing diagram of a method for generating video data according to an embodiment of the present invention.
  • the terminal receives a photographing instruction, and at this time, the starting time is t1, and the photograph is taken at a distance.
  • the preset time is the start time t2 before the time t3, and the preset time is the end time t4 after the time of the photographing time t3, and each picture is acquired according to the preset step size.
  • the preset time is 2s
  • the preset step size is 1ms.
  • the first picture is acquired in the first 2s of the photographing time t3, and the picture is acquired every 2ms, and the picture is obtained after 2s after the photographing time t3;
  • S302 Extract, from each picture, an area that includes the target object and has the same size as the target area, and each sub-picture;
  • each picture needs to be screenshotd to obtain each sub-picture.
  • Each of the sub-pictures includes a target object selected by the user, and the size of each sub-picture is the same as the size of the target area selected by the user.
  • the object 1 is a person
  • the object 2 is a red balloon
  • the object 3 is a blue balloon, which is the most exciting when the user uses the object 1 whose target terminal 2 and the object 3 are in the background.
  • the terminal intercepts the area including the object 1 and the same size as the rectangle in FIG. 4 after each time the picture is acquired;
  • the partial picture including the target object is deleted, and the picture that does not include the target object is deleted, so that the video viewed by the user is the picture that the user desires to see, which improves the user experience.
  • the target object in the embodiment of the present invention may be one or more, which is not specifically limited in the embodiment of the present invention.
  • S303 Match the target area to each sub-picture separately. When the matching is successful, the sub-picture is reserved. If the matching fails, the sub-picture is discarded.
  • the target area is respectively compared with each sub-picture. Match, get the matching result, when the matching result is a successful sub-picture is retained, the matching result is discarded for the failed sub-picture;
  • matching the target area with each sub-picture separately means that the objects of the target area are respectively matched with the objects of each sub-picture, for example, a matching manner is, the target area is When the target object matches the target object of the sub-picture successfully, the object other than the target object in the sub-picture is deleted, and then the sub-picture is retained; the other matching manner is that the object of the target area and the object of the sub-picture are performed one by one. After the matching is successful, the object other than the object of the target area in the sub-picture is deleted, and then the sub-picture is retained; of course, the two matching methods are not limited in the embodiment of the present invention.
  • the obtained sub-picture includes the object 1, the object 2, the object 3, and the object 4, in the first matching manner
  • the deletion in the sub-picture is deleted.
  • object 1, object 2, object 3 and object 4, and then retain the sub-picture in another matching mode, object 1, object 2 and object 3 of the target area are matched one by one with the object of the sub-picture, and the matching is successful.
  • the object 4 other than the object 1, the object 2, and the object 3 in the sub-picture is deleted, and then the sub-picture is retained.
  • the matching manner in the embodiment of the present invention is not limited thereto;
  • the object that the user does not expect to appear in the video is deleted, so that the reserved sub-picture is the picture desired by the user, thereby improving the viewing performance of the picture before and after the photo is saved, and improving the user experience.
  • S304 Generate video data based on the retained sub-pictures, and save the video data and the photos taken at the time of photographing.
  • the video data is generated based on each sub-picture, and the format of the video data may be video/avc, video/3gpp, video/mp4v-es, etc., and the format of the photo may be bmp, jpg, Tiff, gif, pcx, tga, exif, fpx, svg, psd, cdr, pcd, dxf, ufo, eps, ai, raw, etc., in the embodiment of the present invention, the format and photo of the video data The format is not specifically limited.
  • the target area of the shooting interface is acquired and the target object is determined from the object of the target area, and then the photo is taken after the photographing instruction is received.
  • the preset time is the starting time
  • the preset time is the ending time after the photo taking time
  • each picture is obtained according to the preset step size.
  • each sub picture is cut out from each picture, and each sub picture is taken.
  • the target object is included and the size of each sub-picture is the same as the size of the target area, so that the partial picture is truncated by generating the sub-picture; finally, the remaining sub-parents are obtained by matching the target area with each sub-picture separately.
  • the embodiment of the present invention provides another method for generating video data, which should be configured as a terminal, and the function implemented by the method for generating video data can be implemented by using a processor in the terminal to call a program code.
  • the program code can be stored in a computer storage medium.
  • the terminal includes at least a processor and a storage medium.
  • FIG. 6 is a schematic flowchart of another method for generating video data according to an embodiment of the present invention. As shown in FIG. 6, on the basis of the foregoing embodiment, S302 may include:
  • S602 Matching the object of each picture with the target object, and when the matching is successful, retaining the matching picture successfully, and when the matching fails, discarding the picture that fails to match;
  • S603 determining, from each of the retained pictures, location information of the target object
  • S604 According to the location information, an area including the target object and having the same size as the target area is intercepted from each of the reserved pictures, and the intercepted area is used as a corresponding sub-picture.
  • FIG. 7-1 is an optional arrangement diagram of a picture in the embodiment of the present invention.
  • the object that is detected to obtain the picture includes: object 1, object 2, object 3, object 4, object 5, and object 6, and then the above objects are respectively matched with the target object, and the matching succeeds to indicate that the target object exists in the picture, and still
  • the object 1 is a target object, and by matching, it is known that the object 1 exists in the picture, and the picture is retained.
  • FIG. 7-2 is another schematic diagram of an arrangement of a picture according to an embodiment of the present invention.
  • the obtained picture is first detected by the picture, and the object of the picture is: Object 2, object 3, object 4, object 5, and object 6, and then match the above object with the target object respectively.
  • the matching success indicates that the target object exists in the image, and the object 1 is still the target object, and the image is known by matching. If there is object 1 in it, the picture is retained.
  • FIG. 7-3 is still another schematic diagram of the arrangement of the picture in the embodiment of the present invention.
  • the obtained image is first detected by the picture, and the object of the picture is: Object 3, object 4, object 5, and object 6, and then match the above object with the target object respectively.
  • the matching succeeds to indicate that the target object exists in the image, and the object 1 is still the target object, and the matching is found to be non-existent in the image.
  • the retained image is obtained.
  • a partial small video of the target object is obtained.
  • the position of the target object is determined from each of the retained images.
  • Information, where the location information is coordinate information of the target object on the shooting interface; after determining the location information of the target object, according to the location information, the sub-picture including the target object is intercepted on the picture, and the size of the sub-picture is Same size as the target area. At this point, you get a partial picture.
  • the method may include: setting a center position of the target object according to the location information; and extracting an area of the same size as the target area from each picture centering on the center position of the target object.
  • the terminal After determining the location information of the target object, the terminal sets its own central location for the target object.
  • the central location of the target object may be preset by the user in the terminal, for example, when the person is photographed, the head of the person is set as a center position; and then the person's head is centered, and the picture is taken from the picture. An area of the same size as the target object.
  • FIG. 7-4 is an optional arrangement diagram of the second sub-picture according to the embodiment of the present invention
  • the sub-picture of FIG. 7-4 is a sub-picture taken from the picture of FIG. 7-1, as shown in FIG. 7.
  • FIG. 4 after the object 1 is acquired, the position information of the object 1 is determined, and then the center position of the object 1 is set, and the sub-picture in FIG. 7-4 is cut out centering on the center position of the object 1.
  • the subpicture includes object 1, object 2, and object 3.
  • FIG. 7-5 is another schematic diagram of an arrangement diagram of an embodiment of the present invention.
  • the sub-picture of FIG. 7-5 is a sub-picture taken from the picture in FIG. 7-2, as shown in FIG. 7-5.
  • the S303 may include: determining an object of each sub-picture, and selecting an object of each sub-picture other than the target object.
  • the object is determined as the first feature object set; the object other than the target object in the object of the target area is determined as the second feature object set; the second feature object set is matched with the first feature object set, and when the matching is successful, the sub-picture is retained When the match fails, the sub-picture is discarded.
  • the terminal first determines the object of each subgraph and the object of the target area by means of detection.
  • the target area of FIG. 4 is still taken as an example, and the object of the target area is object 1 (Person), Object 2 (red balloon), and Object 3 (blue balloon), then the first feature object collection is a red balloon and a blue balloon.
  • the object of the sub-picture in Figure 7-4 is a person, a red balloon and a blue balloon, then the second feature object set is a red balloon and a blue balloon, the red balloon and the blue balloon in Figure 4 and Figure 7-4
  • the red balloon matches the blue balloon, the match is successful, and the sub-picture is retained.
  • the objects of the sub-pictures in Figure 7-5 are the object person, the red balloon, the blue balloon, and the object 4 (bird), then the second feature object collection is a red balloon, a blue balloon, and a bird, and the red balloon in Figure 4 Match the blue balloon with the red balloon, blue balloon and bird in Figure 7-5. If the match is successful and the sub-picture is retained, if the bird in Figure 7-5 does not find a match, delete the bird and keep the picture.
  • FIG. 7-6 are still another schematic arrangement diagram of a picture of an embodiment of the present invention.
  • the object of the sub-picture in FIG. 7-6 is an object person and a blue balloon
  • the second The feature object collection is a blue balloon
  • the red balloon and the blue balloon in FIG. 4 are matched with the blue balloon in FIG. 7-6. Since the red balloon in FIG. 4 does not find a matching object, the matching fails, and the child is discarded. image.
  • the above target area is a closed area.
  • the embodiment provides a terminal, where the acquiring unit and the determining unit in the terminal, and each module included in each unit can be understood as a processor in the terminal by using a processor in the terminal.
  • the controller 180 is implemented, and of course, can also be implemented by a specific logic circuit; in the process of a specific embodiment, the processor can be a central processing unit (CPU), a microprocessor (MPU), a DSP, or an FPGA.
  • FIG. 8 is a schematic structural diagram of a terminal according to an embodiment of the present invention. As shown in FIG. 8, the terminal includes an obtaining module 81, an intercepting module 82, a matching module 83, and a saving module 84.
  • the obtaining module 81 is configured to acquire a target area of the shooting interface when the camera of the terminal is configured to operate, determine a target object from the object of the target area, and take a distance after receiving the photographing instruction.
  • the preset time is taken as the starting time, and the preset time is taken as the ending time after the time of the photographing, and each picture is obtained according to the preset step size;
  • the intercepting module 82 is configured to extract, from each picture, an area including the target object and having the same size as the target area as each sub-picture;
  • the matching module 83 is configured to match the target area with each sub-picture, and when the matching is successful, the sub-picture is reserved, and when the matching fails, the sub-picture is discarded;
  • the saving module 84 is configured to generate video data based on the retained sub-pictures, and save the video data and the photos taken at the moment of photographing.
  • the target area is a closed area.
  • the intercepting module 82 is configured to detect each picture to obtain an object of each picture; match the object of each picture with the target object, and when the matching is successful, retain Each picture, when the matching fails, discard each picture; from each picture retained, determine the location information of the target object; according to the location information, intercept the target object from each of the retained pictures and the size of the target area The same area, the intercepted area is taken as the corresponding sub-picture.
  • the intercepting module 82 is configured to set a central position of the target object according to the location information; and intercept the target area from each picture centering on the central position of the target object. Areas of the same size.
  • the matching module 83 is configured to determine an object of each sub-picture, and determine an object other than the target object in the object of each sub-picture as the first feature object. a set; the object other than the target object in the object of the target area is determined as the second feature object set; the second feature object set is matched with the first feature object set, and when the matching is successful, the sub-picture is retained, and when the matching fails, the discarder is discarded. image.
  • the embodiment of the present invention further provides a terminal, including: a processor and a storage device capable of processing The memory of the computer program running on the device,
  • the method of the embodiment of the present invention is executed when the processor is used to run the computer program.
  • the disclosed apparatus and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division, and the actual implementation may have another The way of dividing, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored, or not executed.
  • the coupling, or direct coupling, or communication connection of the components shown or discussed may be indirect coupling or communication connection through some interfaces, devices or units, and may be electrical, mechanical or other forms. of.
  • the units described above as separate components may or may not be physically separated, and the components displayed as the unit may or may not be physical units; they may be located in one place or distributed on multiple network units; Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may be separately used as one unit, or two or more units may be integrated into one unit;
  • the unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
  • the foregoing program may be stored in a computer readable storage medium, and when executed, the program includes The foregoing steps of the method embodiment; and the foregoing storage medium includes: a removable storage device, a ROM, a magnetic disk, or an optical disk, and the like, which can store program codes.
  • the above-described integrated unit of the present invention may be stored in a computer readable storage medium if it is implemented in the form of a software function module and sold or used as a standalone product.
  • the technical solution of the embodiments of the present invention may be embodied in the form of a software product in essence or in the form of a software product stored in a storage medium, including a plurality of instructions.
  • a computer device (which may be a personal computer, server, or network device, etc.) is caused to perform all or part of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes various media that can store program codes, such as a mobile storage device, a ROM, a magnetic disk, or an optical disk.
  • an embodiment of the present invention further provides a computer readable storage medium, where the computer program is stored, and when the computer program is executed by the processor, the method provided by one or more of the foregoing technical solutions is implemented.
  • the target area of the shooting interface is acquired and the target object is determined from the object of the target area, and then after receiving the photographing instruction, the preset time before the photographing time is The starting time is the ending time after the preset time is taken, and each picture is obtained according to the preset step size; from each picture, each sub-picture is intercepted, and each sub-picture includes a target object and each sub-picture The size of the target area is the same as the size of the target area, so that the partial picture is truncated by generating a sub-picture; then each sub-picture is obtained by matching the target area with each sub-picture, and is generated based on the retained sub-pictures.
  • Video data and save the video data and the photos taken at the moment of taking the photo. That is, in the embodiment of the present invention, by extracting the sub-picture and matching the target area with each sub-picture, the retained sub-pictures are obtained, thereby generating local video data, and matching the local video data by matching There is no intrusive person or thing, and the local video data is saved together with the photo, so that the user can watch the local small video while viewing the photo, and improve the viewing quality of the video before and after the photo is saved, and improve the viewing performance. user experience.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Telephone Function (AREA)

Abstract

公开了一种视频数据的生成方法,终端的相机运行时,获取拍摄界面的目标区域,从所述目标区域的对象中确定出目标对象;在接收到拍照指令之后,以距离拍照时刻前预设时间处为起始时刻,以距离所述拍照时刻后所述预设时间处为结束时刻,按照预设步长获取各图片;从每个图片中,截取出包括所述目标对象且与所述目标区域大小相同的区域为每个子图片;将所述目标区域分别与所述每个子图片进行匹配,匹配成功时,保留子图片;基于保留的各子图片生成视频数据,并将所述视频数据与所述拍照时刻所拍的照片进行保存。还同时公开了一种终端和计算机可读存储介质。

Description

一种视频数据的生成方法、终端和计算机可读存储介质
相关申请的交叉引用
本申请基于申请号为201610879193.1、申请日为2016年09月30日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。
技术领域
本发明涉及终端应用领域,尤其涉及一种视频数据的生成方法、终端和计算机可读存储介质。
背景技术
目前,用户普遍使用移动设备中的相机来拍照。但是,在拍照过程中经常会错过精彩的瞬间。为了留下精彩的瞬间,相关技术中,在拍照瞬间保存前后时间段的视频,同时也可以保存该时间段的音频数据,来弥补漏拍的精彩瞬间和美秒的声音。
用户在拍照的过程中,往往都是为了拍摄某个特定的对象,例如人或者物。然而,在得到的视频数据中往往会出现一些乱入的人或物,影响用户的观感;也就是说,相关技术中,在拍照时所保存的前后时间段的视频的观赏性较差,影响用户的体验度。
发明内容
有鉴于此,本发明实施例期望提供一种视频数据的生成方法、终端和计算机可读存储介质。
本发明实施例的技术方案是这样实现的:
第一方面,本发明实施例提供了一种视频数据的生成方法,包括:终端的相机运行时,获取拍摄界面的目标区域,从所述目标区域的对象中确定出目标对象;在接收到拍照指令之后,以距离拍照时刻前预设时间处为起始时刻,以距离所述拍照时刻后所述预设时间处为结束时刻,按照预设步长获取各图片;从每个图片中,截取出包括所述目标对象且与所述目标区域大小相同的区域为每个子图片;将所述目标区域分别与所述每个子图片进行匹配,匹配成功时,保留子图片;基于保留的各子图片生成视频数据,并将所述视频数据与所述拍照时刻所拍的照片进行保存。
上述方案中,所述从每个图片中,截取出包括所述目标对象且与所述目标区域大小相同的区域为每个子图片,包括:对所述每个图片进行检测,得到所述每个图片的对象;将所述每个图片的对象与所述目标对象进行匹配,当匹配成功时,保留匹配成功的每个图片;从保留的每个图片中,确定出所述目标对象的位置信息;根据所述位置信息,从保留的所述每个图片中截取包括所述目标对象且与所述目标区域大小相同的区域,将截取的区域作为对应的子图片。
上述方案中,当图像的对象与所述目标对象匹配失败时,丢弃匹配失败的图片。
上述方案中,所述根据所述位置信息,从保留的所述每个图片中截取包括所述目标对象且与所述目标区域大小相同的区域,包括:根据所述位置信息,设定所述目标对象的中心位置;以所述目标对象的中心位置为中心,从所述每个图片中截取与所述目标区域大小相同的区域。
上述方案中,所述将所述目标区域分别与所述每个子图片进行匹配,包括:确定所述每个子图片的对象,将所述每个子图片的对象中所述目标对象以外的对象确定为第一特征对象集合;将所述目标区域的对象中所述目标对象以外的对象确定为第二特征对象集合;将所述第二特征对象集合 与所述第一特征对象集合进行匹配。
上述方案中,所述目标区域为闭合区域。
所述目标区域与子图片匹配失败时,丢弃子图片。
上述方案中,所述将所述目标区域分别与所述每个子图片进行匹配,包括:
将所述目标区域的对象分别于每个子图片的对象一一进行匹配。
上述方案中,所述保留子图片,包括:
删除子图片中的除了目标对象以外的其他对象,保留删除其他对象后的子图片;
或者,
删除子图片中的除了目标区域的对象以外的其他对象,保留删除其他对象的子图片。
第二方面,本发明实施例提供了一种终端,所述终端包括:获取模块,配置为终端的相机运行时,获取拍摄界面的目标区域,从所述目标区域的对象中确定出目标对象;在接收到拍照指令之后,以距离拍照时刻前预设时间处为起始时刻,以距离所述拍照时刻后所述预设时间处为结束时刻,按照预设步长获取各图片;截取模块,配置为从每个图片中,截取出包括所述目标对象且与所述目标区域大小相同的区域为每个子图片;匹配模块,配置为将所述目标区域分别与所述每个子图片进行匹配,匹配成功时,保留子图片;保存模块,配置为基于保留的各子图片生成视频数据,并将所述视频数据与所述拍照时刻所拍的照片进行保存。
上述方案中,所述截取模块配置为对所述每个图片进行检测,得到所述每个图片的对象;将所述每个图片的对象与所述目标对象进行匹配,当匹配成功时,保留匹配成功的每个图片;从保留的每个图片中,确定出所述目标对象的位置信息;根据所述位置信息,从保留的所述每个图片中截 取包括所述目标对象且与所述目标区域大小相同的区域,将截取的区域作为对应的子图片。
上述方案中,所述截取模块还配置为当图像的对象与所述目标对象匹配失败时,丢弃匹配失败的图片。
上述方案中,所述截取模块配置为根据所述位置信息,设定所述目标对象的中心位置;以所述目标对象的中心位置为中心,从所述每个图片中截取与所述目标区域大小相同的区域。
上述方案中,所述匹配模块配置为确定所述每个子图片的对象,将所述每个子图片的对象中所述目标对象以外的对象确定为第一特征对象集合;将所述目标区域的对象中所述目标对象以外的对象确定为第二特征对象集合;将所述第二特征对象集合与所述第一特征对象集合进行匹配。
上述方案中,所述目标区域为闭合区域。
所述匹配模块,还配置为当所述目标区域与子图片匹配失败时,丢弃子图片。
上述方案中,所述匹配模块,配置为将所述目标区域的对象分别于每个子图片的对象一一进行匹配。
上述方案中,所述匹配模块,配置为:
删除子图片中的除了目标对象以外的其他对象,保留删除其他对象后的子图片;
或者,
删除子图片中的除了目标区域的对象以外的其他对象,保留删除其他对象的子图片。
第三方面,本发明实施例提供了一种终端,包括处理器和用于存储能够在处理器上运行的计算机程序的存储器,
其中,所述处理器用于运行所述计算机程序时,执行上述任一方法的 步骤。
第四方面,本发明实施例提供了一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现上述任一方法的步骤。
本发明实施例所提供的一种视频数据的生成方法、终端和计算机可读存储介质,终端的相机运行时,首先,获取拍摄界面的目标区域并从目标区域的对象中确定出目标对象,然后在接收到拍照指令之后,以距离拍照时刻前预设时间处为起始时刻,以距离拍照时刻后预设时间处为结束时刻,按照预设步长获取各图片;其次,从每个图片中,截取出每个子图片,每个子图片中包括有目标对象且每个子图片的大小与目标区域的大小相同,这样,通过生成子图片,截取出局部的图片;最后,通过将目标区域分别与每个子图片进行匹配,得到保留的各子图片,并基于保留的各子图片生成视频数据,并将视频数据与拍照时刻所拍的照片进行保存。也就是说,本发明实施例中,通过截取出子图片,并将目标区域与每个子图片进行匹配,得到保留的各子图片,从而生成局部的视频数据,通过匹配使得该局部的视频数据中没有乱入的人或物,并且将该局部的视频数据与照片保存在一起,使得用户在观赏照片的同时可以观赏局部小视频,提高在拍照时所保存的前后时间段的视频的观赏性,提高用户体验。
附图说明
图1为实现本发明各个实施例的一种可选的终端的硬件结构示意图;
图2为如图1所示的移动终端的无线通信系统示意图;
图3为本发明实施例一种视频数据的生成方法的流程示意图;
图4为本发明实施例目标区域的排布示意图;
图5为本发明实施例视频数据的生成方法中的时刻图;
图6为本发明实施例另一种视频数据的生成方法的流程示意图;
图7-1为本发明实施例图片的一种可选的排布示意图;
图7-2为本发明实施例图片的另一种可选的排布示意图;
图7-3为本发明实施例图片的又一种可选的排布示意图;
图7-4为本发明实施例子图片的一种可选的排布示意图;
图7-5为本发明实施例子图片的另一种可选的排布示意图;
图7-6为本发明实施例子图片的又一种可选的排布示意图;
图8为本发明实施例终端的组成结构示意图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述。
现在将参考附图1来描述实现本发明各个实施例的终端。在后续的描述中,使用用于表示元件的诸如“模块”、“部件”或“单元”的后缀仅为了有利于本发明的说明,其本身并没有特定的意义。因此,“模块”与“部件”可以混合地使用。
终端可以以各种形式来实施。例如,本发明中描述的终端可以包括诸如移动电话、智能电话、笔记本电脑、数字广播接收器、个人数字助理(PDA)、平板电脑(PAD)、便携式多媒体播放器(PMP)、导航装置等等的终端以及诸如数字TV、台式计算机等等的固定终端。下面,假设终端是终端。然而,本领域技术人员将理解的是,除了特别用于移动目的的元件之外,根据本发明的实施方式的构造也能够应用于固定类型的终端。
图1为实现本发明各个实施例的一种可选的终端的硬件结构示意。
终端100可以包括无线通信单元110、音频/视频(A/V)输入单元120、用户输入单元130、感测单元140、输出单元150、存储器160、接口单元170、控制器180和电源单元190等等。图1示出了具有各种组件的终端,但是应理解的是,并不要求实施所有示出的组件,可以替代地实施更多或 更少的组件,将在下面详细描述终端的元件。
无线通信单元110通常包括一个或多个组件,其允许终端100与无线通信系统或网络之间的无线电通信。例如,无线通信单元可以包括广播接收模块111、移动通信模块112、无线互联网模块113、短程通信模块114和位置信息模块115中的至少一个。
广播接收模块111经由广播信道从外部广播管理服务器接收广播信号和/或广播相关信息。广播信道可以包括卫星信道和/或地面信道。广播管理服务器可以是生成并发送广播信号和/或广播相关信息的服务器或者接收之前生成的广播信号和/或广播相关信息并且将其发送给终端的服务器。广播信号可以包括TV广播信号、无线电广播信号、数据广播信号等等。而且,广播信号可以进一步包括与TV或无线电广播信号组合的广播信号。广播相关信息也可以经由移动通信网络提供,并且在该情况下,广播相关信息可以由移动通信模块112来接收。广播信号可以以各种形式存在,例如,其可以以数字多媒体广播(DMB)的电子节目指南(EPG)、数字视频广播手持(DVB-H)的电子服务指南(ESG)等等的形式而存在。广播接收模块111可以通过使用各种类型的广播系统接收信号广播。特别地,广播接收模块111可以通过使用诸如多媒体广播-地面(DMB-T)、数字多媒体广播-卫星(DMB-S)、数字视频广播-手持(DVB-H),前向链路媒体(MediaFLO@)的数据广播系统、地面数字广播综合服务(ISDB-T)等等的数字广播系统接收数字广播。广播接收模块111可以被构造为适合提供广播信号的各种广播系统以及上述数字广播系统。经由广播接收模块111接收的广播信号和/或广播相关信息可以存储在存储器160(或者其它类型的存储介质)中。
移动通信模块112将无线电信号发送到基站(例如,接入点、节点B等等)、外部终端以及服务器中的至少一个和/或从其接收无线电信号。这样的无线电信号可以包括语音通话信号、视频通话信号、或者根据文本和/或 多媒体消息发送和/或接收的各种类型的数据。
无线互联网模块113支持终端的无线互联网接入。该模块可以内部或外部地耦接到终端。该模块所涉及的无线互联网接入技术可以包括WLAN(无线LAN)(Wi-Fi)、Wibro(无线宽带)、Wimax(全球微波互联接入)、HSDPA(高速下行链路分组接入)等等。
短程通信模块114是配置为支持短程通信的模块。短程通信技术的一些示例包括蓝牙TM、射频识别(RFID)、红外数据协会(IrDA)、超宽带(UWB)、紫蜂TM等等。
位置信息模块115是配置为检查或获取终端的位置信息的模块。位置信息模块115的典型示例是全球定位系统(GPS)模块。根据当前的技术,作为GPS的位置信息模块115计算来自三个或更多卫星的距离信息和准确的时间信息并且对于计算的信息应用三角测量法,从而根据经度、纬度和高度准确地计算三维当前位置信息。当前,用于计算位置和时间信息的方法使用三颗卫星并且通过使用另外的一颗卫星校正计算出的位置和时间信息的误差。此外,GPS模块能够通过实时地连续计算当前位置信息来计算速度信息。
A/V输入单元120配置为接收音频或视频信号。A/V输入单元120可以包括相机121和麦克风122,相机121对在视频捕获模式或图像捕获模式中由图像捕获装置获得的静态图片或视频的图像数据进行处理。处理后的图像帧可以显示在显示单元151上。经相机121处理后的图像帧可以存储在存储器160(或其它存储介质)中或者经由无线通信单元110进行发送,可以根据终端的构造提供两个或更多相机121。麦克风122可以在电话通话模式、记录模式、语音识别模式等等运行模式中经由麦克风122接收声音(音频数据),并且能够将这样的声音处理为音频数据。处理后的音频(语音)数据可以在电话通话模式的情况下转换为可经由移动通信模块112发 送到移动通信基站的格式输出。麦克风122可以实施各种类型的噪声消除(或抑制)算法以消除(或抑制)在接收和发送音频信号的过程中产生的噪声或者干扰。
用户输入单元130可以根据用户输入的命令生成键输入数据以控制终端的各种操作。用户输入单元130允许用户输入各种类型的信息,并且可以包括键盘、锅仔片、触摸板(例如,检测由于被接触而导致的电阻、压力、电容等等的变化的触敏组件)、滚轮、摇杆等等。特别地,当触摸板以层的形式叠加在显示单元151上时,可以形成触摸屏。
感测单元140检测终端100的当前状态,(例如,终端100的打开或关闭状态)、终端100的位置、用户对于终端100的接触(即,触摸输入)的有无、终端100的取向、终端100的加速或减速移动和方向等等,并且生成用于控制终端100的操作的命令或信号。例如,当终端100实施为滑动型移动电话时,感测单元140可以感测该滑动型电话是打开还是关闭。另外,感测单元140能够检测电源单元190是否提供电力或者接口单元170是否与外部装置耦接。感测单元140可以包括接近传感器141将在下面结合触摸屏来对此进行描述。
接口单元170用作至少一个外部装置与终端100连接可以通过的接口。例如,外部装置可以包括有线或无线头戴式耳机端口、外部电源(或电池充电器)端口、有线或无线数据端口、存储卡端口、配置为连接具有识别模块的装置的端口、音频输入/输出(I/O)端口、视频I/O端口、耳机端口等等。识别模块可以是存储用于验证用户使用终端100的各种信息并且可以包括用户识别模块(UIM)、客户识别模块(SIM)、通用客户识别模块(USIM)等等。另外,具有识别模块的装置(下面称为"识别装置")可以采取智能卡的形式,因此,识别装置可以经由端口或其它连接装置与终端100连接。接口单元170可以配置为接收来自外部装置的输入(例如,数据 信息、电力等等)并且将接收到的输入传输到终端100内的一个或多个元件或者可以配置为在终端和外部装置之间传输数据。
另外,当终端100与外部底座连接时,接口单元170可以用作允许通过其将电力从底座提供到终端100的路径或者可以用作允许从底座输入的各种命令信号通过其传输到终端的路径。从底座输入的各种命令信号或电力可以用作用于识别终端是否准确地安装在底座上的信号。输出单元150被构造为以视觉、音频和/或触觉方式提供输出信号(例如,音频信号、视频信号、警报信号、振动信号等等)。输出单元150可以包括显示单元151、音频输出模块152、警报单元153等等。
显示单元151可以显示在终端100中处理的信息。例如,当终端100处于电话通话模式时,显示单元151可以显示与通话或其它通信(例如,文本消息收发、多媒体文件下载等等)相关的用户界面(UI)或图形用户界面(GUI)。当终端100处于视频通话模式或者图像捕获模式时,显示单元151可以显示捕获的图像和/或接收的图像、示出视频或图像以及相关功能的UI或GUI等等。
同时,当显示单元151和触摸板以层的形式彼此叠加以形成触摸屏时,显示单元151可以用作输入装置和输出装置。显示单元151可以包括液晶显示器(LCD)、薄膜晶体管LCD(TFT-LCD)、有机发光二极管(OLED)显示器、柔性显示器、三维(3D)显示器等等中的至少一种。这些显示器中的一些可以被构造为透明状以允许用户从外部观看,这可以称为透明显示器,典型的透明显示器可以例如为TOLED(透明有机发光二极管)显示器等等。根据特定想要的实施方式,终端100可以包括两个或更多显示单元(或其它显示装置),例如,终端可以包括外部显示单元(未示出)和内部显示单元(未示出)。触摸屏可配置为检测触摸输入压力以及触摸输入位置和触摸输入面积。
音频输出模块152可以在终端处于呼叫信号接收模式、通话模式、记录模式、语音识别模式、广播接收模式等等模式下时,将无线通信单元110接收的或者在存储器160中存储的音频数据转换音频信号并且输出为声音。而且,音频输出模块152可以提供与终端100执行的特定功能相关的音频输出(例如,呼叫信号接收声音、消息接收声音等等)。音频输出模块152可以包括扬声器、蜂鸣器等等。
存储器160可以存储由控制器180执行的处理和控制操作的软件程序等等,或者可以暂时地存储已经输出或将要输出的数据(例如,电话簿、消息、静态图像、视频等等)。而且,存储器160可以存储关于当触摸施加到触摸屏时输出的各种方式的振动和音频信号的数据。
存储器160可以包括至少一种类型的存储介质,所述存储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘等等。而且,终端100可以与通过网络连接执行存储器160的存储功能的网络存储装置协作。
控制器180通常控制终端的总体操作。例如,控制器180执行与语音通话、数据通信、视频通话等等相关的控制和处理。另外,控制器180可以包括配置为再现(或回放)多媒体数据的多媒体模块181,多媒体模块181可以构造在控制器180内,或者可以构造为与控制器180分离。控制器180可以执行模式识别处理,以将在触摸屏上执行的手写输入或者图片绘制输入识别为字符或图像。
电源单元190在控制器180的控制下接收外部电力或内部电力并且提供操作各元件和组件所需的适当的电力。
这里描述的各种实施方式可以以使用例如计算机软件、硬件或其任何 组合的计算机可读介质来实施。对于硬件实施,这里描述的实施方式可以通过使用特定用途集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理装置(DSPD)、可编程逻辑装置(PLD)、现场可编程门阵列(FPGA)、处理器、控制器、微控制器、微处理器、被设计为执行这里描述的功能的电子单元中的至少一种来实施,在一些情况下,这样的实施方式可以在控制器180中实施。对于软件实施,诸如过程或功能的实施方式可以与允许执行至少一种功能或操作的单独的软件模块来实施。软件代码可以由以任何适当的编程语言编写的软件应用程序(或程序)来实施,软件代码可以存储在存储器160中并且由控制器180执行。
至此,已经按照其功能描述了终端。下面,为了简要起见,将描述诸如折叠型、直板型、摆动型、滑动型终端等等的各种类型的终端中的滑动型终端作为示例。因此,本发明能够应用于任何类型的终端,并且不限于滑动型终端。
如图1中所示的终端100可以被构造为利用经由帧或分组发送数据的诸如有线和无线通信系统以及基于卫星的通信系统来操作。
现在将参考图2描述其中根据本发明的移动终端能够操作的通信系统。
这样的通信系统可以使用不同的空中接口和/或物理层。例如,由通信系统使用的空中接口包括例如频分多址(FDMA)、时分多址(TDMA)、码分多址(CDMA)和通用移动通信系统(UMTS)(特别地,长期演进(LTE))、全球移动通信系统(GSM)等等。作为非限制性示例,下面的描述涉及CDMA通信系统,但是这样的教导同样适用于其它类型的系统。
参考图2,CDMA无线通信系统可以包括多个移动终端100、多个基站(BS)270、基站控制器(BSC)275和移动交换中心(MSC)280。MSC 280被构造为与公共电话交换网络(PSTN)290形成接口。MSC 280还被构造为与可以经由回程线路耦接到基站270的BSC 275形成接口。回程线路可以根 据若干已知的接口中的任一种来构造,所述接口包括例如E1/T1、ATM,IP、PPP、帧中继、HDSL、ADSL或xDSL。将理解的是,如图2中所示的系统可以包括多个BSC 275。
每个BS270可以服务一个或多个分区(或区域),由多向天线或指向特定方向的天线覆盖的每个分区放射状地远离BS 270。或者,每个分区可以由配置为分集接收的两个或更多天线覆盖。每个BS 270可以被构造为支持多个频率分配,并且每个频率分配具有特定频谱(例如,1.25MHz,5MHz等等)。
分区与频率分配的交叉可以被称为CDMA信道。BS 270也可以被称为基站收发器子系统(BTS)或者其它等效术语。在这样的情况下,术语“基站”可以用于笼统地表示单个BSC 275和至少一个BS 270。基站也可以被称为“蜂窝站”。或者,特定BS 270的各分区可以被称为多个蜂窝站。
如图2中所示,广播发射器(BT)295将广播信号发送给在系统内操作的移动终端100。如图1中所示的广播接收模块111被设置在移动终端100处以接收由BT 295发送的广播信号。在图2中,示出了几个GPS卫星300。卫星300帮助定位多个移动终端100中的至少一个。
在图2中,描绘了多个卫星300,但是理解的是,可以利用任何数目的卫星获得有用的定位信息。如图1中所示的位置信息模块115即GPS模块通常被构造为与卫星300配合以获得想要的定位信息。替代GPS跟踪技术或者在GPS跟踪技术之外,可以使用可以跟踪移动终端的位置的其它技术。另外,至少一个GPS卫星300可以选择性地或者额外地处理卫星DMB传输。
作为无线通信系统的一个典型操作,BS 270接收来自各种移动终端100的反向链路信号。移动终端100通常参与通话、消息收发和其它类型的通信。特定BS 270接收的每个反向链路信号被在特定BS 270内进行处理。获得的数据被转发给相关的BSC 275。BSC提供通话资源分配和包括BS 270之间的 软切换过程的协调的移动管理功能。BSC 275还将接收到的数据路由到MSC280,其提供用于与PSTN 290形成接口的额外的路由服务。类似地,PSTN 290与MSC 280形成接口,MSC与BSC 275形成接口,并且BSC 275相应地控制BS 270以将正向链路信号发送到移动终端100。
下面将基于上述终端硬件结构以及通信系统,提出本发明方法各个实施例。
下面结合附图和具体实施例对本发明的技术方案进一步详细阐述。
基于前述的实施例,本发明实施例提供一种视频数据的生成方法,该方法应用于终端,该视频数据的生成方法所实现的功能可以通过终端中的处理器调用程序代码来实现,当然程序代码可以保存在计算机存储介质中,可见,该终端至少包括处理器和存储介质。
本发明实施例提供一种视频数据的生成方法。图3为本发明实施例视频数据的生成方法的流程示意图,如图3所示,该视频数据的生成方法包括:
S301:终端的相机运行时,获取拍摄界面的目标区域,从目标区域的对象中确定出目标对象;在接收到拍照指令之后,以距离拍照时刻前预设时间处为起始时刻,以距离拍照时刻后所述预设时间处为结束时刻,按照预设步长获取各图片;
其中,用户点击终端中的相机图标,终端的相机运行,终端的显示界面为相机的拍摄界面,此时拍摄界面上显示待拍画面;然后用户在拍摄界面上圈出目标区域,图4为本发明实施例目标区域的排布示意图,如图4所示,图4中的矩形为用户圈出的目标区域。
需要说明的是,目标区域的形状可以为矩形,圆形,三角形行等等,这里,本发明实施例不做具体限定;
对目标区域进行检测,可以得知目标区域的对象。图4中的目标区域 的对象包括对象1、对象2和对象3;用户选中对象1为目标对象。
图5为本发明实施例视频数据的生成方法中的时刻图,如图5所示,首先用户点击拍摄界面中下方的快门,则终端接收到拍照指令,此时为开始时刻t1,以距离拍照时刻t3前预设时间处为起始时刻t2,以距离拍照时刻t3后所述预设时间处为结束时刻t4,按照预设步长获取各图片。这里,以预设时间为2s,预设步长为1ms举例来说,拍照时刻t3的前2s获取第一张图片,每隔2ms获取一次图片,直到拍照时刻t3后2s结束获取图片;
至此,可以获取到各图片。
S302:从每个图片中,截取出包括目标对象且与目标区域大小相同的区域为每个子图片;
具体来说,在获取到每个图片之后,需要对每个图片进行截图得到每个子图片。其中每个子图片中包括用户选中的目标对象,并且每个子图片的大小与用户选中的目标区域的大小是相同的。
举例来说,如图4所示,假设对象1为人,对象2为红色气球,对象3为蓝色气球,当用户使用终端希望以对象2和对象3为背景的对象1跳起时最精彩的瞬间;那么,在S301中用户圈出目标区域和目标对象之后,终端每次获取到图片之后,截取出包括对象1的且与图4中的矩形大小相同的区域为子图片;这样,便获得了包括目标对象的局部图片,删除掉了不包括目标对象的图片,使得用户所观赏的视频为用户期望看到的画面,提高了用户的体验度。
这里,需要说明的是,本发明实施例中的目标对象可以为一个或者多个,这里本发明实施例中不做具体限定。
S303:将目标区域分别与每个子图片进行匹配,匹配成功时,保留子图片,匹配失败时,丢弃子图片;
在S301中获取到各子图片之后,将目标区域分别与每个子图片进行匹 配,得到匹配结果,当匹配结果为成功的子图片保留起来,将匹配结果为失败的子图片丢弃掉;
这里,需要说明的是,将目标区域分别与每个子图片进行匹配中,指的是将目标区域的对象分别与每个子图片的对象一一进行匹配,例如,一种匹配方式为,目标区域的目标对象与子图片的目标对象匹配成功时,删除子图片中的除了目标对象以外的其他对象,然后保留该子图片;另一种匹配方式为,目标区域的对象与子图片的对象一一进行匹配,匹配成功后,删除子图片中的除了目标区域的对象以外的其他对象,然后保留该子图片;当然,本发明实施例中不限于上述两种匹配方式。
举例来说,当得到的子图片中包括对象1、对象2、对象3和对象4,第一种匹配方式中,目标区域的对象1与子图片的对象1匹配成功时,删除子图片中的除了对象1以外的对象2、对象3和对象4,然后保留该子图片;另一种匹配方式中,目标区域的对象1、对象2和对象3与子图片的对象一一进行匹配,匹配成功后,删除子图片中的除了对象1、对象2和对象3以外的对象4,然后保留该子图片,这里,本发明实施例中的匹配方式不限于此;
这样,将用户不期望出现在视频中的对象删除掉,使得保留下的子图片都是用户期望的画面,从而提高了在拍照时所保存的前后时间段的图片的观赏性,提高用户体验。
S304:基于保留的各子图片生成视频数据,并将视频数据与拍照时刻所拍的照片进行保存。
在S303中得到了保留的各子图片之后,基于各子图片生成视频数据,视频数据的格式可以为video/avc,video/3gpp,video/mp4v-es等,照片的格式可以为bmp,jpg,tiff,gif,pcx,tga,exif,fpx,svg,psd,cdr,pcd,dxf,ufo,eps,ai,raw等,这里本发明实施例中对视频数据的格式与照片 的格式不做具体限定。
本发明实施例所提供的视频数据的生成方法,终端的相机运行时,首先,获取拍摄界面的目标区域并从目标区域的对象中确定出目标对象,然后在接收到拍照指令之后,以距离拍照时刻前预设时间处为起始时刻,以距离拍照时刻后预设时间处为结束时刻,按照预设步长获取各图片;其次,从每个图片中,截取出每个子图片,每个子图片中包括有目标对象且每个子图片的大小与目标区域的大小相同,这样,通过生成子图片,截取出局部的图片;最后,通过将目标区域分别与每个子图片进行匹配,得到保留的各子图片,并基于保留的各子图片生成视频数据,并将视频数据与拍照时刻所拍的照片进行保存,也就是说,本发明实施例中,通过截取出子图片,并将目标区域与每个子图片进行匹配,得到保留的各子图片,从而生成局部的视频数据,通过匹配使得该局部的视频数据中没有乱入的人或物,并且将该局部的视频数据与照片保存在一起,使得用户在观赏照片的同时可以观赏局部小视频,提高在拍照时所保存的前后时间段的视频的观赏性,提高用户体验。
基于前述的实施例,本发明实施例提供另一种视频数据的生成方法,该方法应配置为终端,该视频数据的生成方法所实现的功能可以通过终端中的处理器调用程序代码来实现,当然程序代码可以保存在计算机存储介质中,可见,该终端至少包括处理器和存储介质。
图6为本发明实施例另一种视频数据的生成方法的流程示意图,如图6所示,在上述实施例的基础上,S302可以包括:
S601:对每个图片进行检测,得到每个图片的对象;
S602:将每个图片的对象与目标对象进行匹配,当匹配成功时,保留匹配成功的图片,当匹配失败时,丢弃匹配失败的图片;
S603:从保留的每个图片中,确定出目标对象的位置信息;
S604:根据位置信息,从保留的每个图片中截取包括目标对象且与目标区域大小相同的区域,将截取的区域作为对应的子图片。
举例来说,在获取到每个图片之后,图7-1为本发明实施例的图片的一种可选的排布示意图,获取到的图片中如图7-1所示,首先对该图片进行检测得到该图片的对象包括:对象1、对象2、对象3、对象4、对象5和对象6,然后将上述对象分别与目标对象进行匹配,匹配成功说明该图片中存在目标对象,仍然以对象1为目标对象,通过匹配得知该图片中存在对象1,则保留该图片。
图7-2为本发明实施例图片的另一种可选的排布示意图,获取到的图片中如图7-2所示,首先对该图片进行检测得到该图片的对象包括:对象1、对象2、对象3、对象4、对象5和对象6,然后将上述对象分别与目标对象进行匹配,匹配成功说明该图片中存在目标对象,仍然以对象1为目标对象,通过匹配得知该图片中存在对象1,则保留该图片。
图7-3为本发明实施例图片的又一种可选的排布示意图,获取到的图片中如图7-3所示,首先对该图片进行检测得到该图片的对象包括:对象2、对象3、对象4、对象5和对象6,然后将上述对象分别与目标对象进行匹配,匹配成功说明该图片中存在目标对象,仍然以对象1为目标对象,通过匹配得知该图片中不存在对象1,则丢弃该图片。
经过上述检测和匹配得到了保留下来的图片,为了获取到目标对象的局部图片,从而得到目标对象的局部小视频,在具体实施过程中,从保留的每个图片中,确定出目标对象的位置信息,这里的位置信息为目标对象的在拍摄界面上的坐标信息;在确定了目标对象的位置信息之后,根据位置信息,在该图片上截取包括目标对象的子图片,并且该子图片的大小与目标区域的大小相同。至此,便得到了局部图片。
为了对保留下来的图片进行截取得到子图片,在一些实施例中,S604 可以包括:根据位置信息,设定目标对象的中心位置;以目标对象的中心位置为中心,从每个图片中截取与目标区域大小相同的区域。
终端在确定出目标对象的位置信息之后,为该目标对象设定出自身的中心位置。这里,该目标对象的中心位置可以是用户预先设置在终端中的,例如,在拍摄人物的时候,设定人物的头部为中心位置;然后以人物的头部为中心,从该图片中截取出与目标对象大小相同的区域。
举例来说,图7-4为本发明实施例二子图片的一种可选的排布示意图,图7-4的子图片是从图7-1的图片中截取出来的子图片,如图7-4所示,在获取到对象1之后,确定出对象1的位置信息,然后设定出对象1的中心位置,以对象1的中心位置为中心,截取出图7-4中的子图片,该子图片中包括对象1、对象2和对象3。
图7-5为本发明实施例子图片的另一种可选的排布示意图,图7-5的子图片是从图7-2的图片中截取出来的子图片,如图7-5所示,在获取到对象1之后,确定出对象1的位置信息,然后设定出对象1的中心位置,以对象1的中心位置为中心,截取出图7-5中的子图片,该子图片中包括对象1、对象2、对象3和对象4。
这样,对每个图片都做类似处理,便得到了各子图片。
在确定出子图片之后,为了满足用户的需求,在一些实施例中,在上述实施例一的基础上,S303可以包括:确定每个子图片的对象,将每个子图片的对象中目标对象以外的对象确定为第一特征对象集合;将目标区域的对象中目标对象以外的对象确定为第二特征对象集合;将第二特征对象集合与第一特征对象集合进行匹配,匹配成功时,保留子图片,匹配失败时,丢弃子图片。
其中,终端通过检测的方式,先确定出每个子图的对象和目标区域的对象,举例来说,仍然以图4的目标区域为例,则目标区域的对象为对象1 (人)、对象2(红色气球)和对象3(蓝色气球),则第一特征对象的集合为红色气球和蓝色气球。
图7-4中的子图片的对象为人、红色气球和蓝色气球,那么第二特征对象集合为红色气球和蓝色气球,将图4中的红色气球和蓝色气球和图7-4中的红色气球和蓝色气球进行匹配,匹配成功,保留该子图片。
图7-5中的子图片的对象为对象人、红色气球、蓝色气球和对象4(鸟),那么第二特征对象集合为红色气球、蓝色气球和鸟,将图4中的红色气球和蓝色气球和图7-5中的红色气球、蓝色气球和鸟进行匹配,匹配成功,保留该子图片,图7-5中的鸟未找到匹配对象,则删除鸟,保留该图片。
图7-6为本发明实施例子图片的又一种可选的排布示意图,如图7-6所示,图7-6中的子图片的对象为对象人和蓝色气球,那么第二特征对象集合为蓝色气球,将图4中的红色气球和蓝色气球和图7-6中的蓝色气球进行匹配,由于图4中的红色气球未找到匹配对象,匹配失败,丢弃该子图片。
由上述可以得到制作局部小视频的局部图片。
这里,这里需要说明的是,上述目标区域为闭合区域。
基于前述的方法实施例,本实施例提供一种终端,该终端中的获取单元和确定单元,以及各单元各自所包括的各模块,都可以通过终端中的处理器,可以理解为图1中的控制器180,来实现,当然也可通过具体的逻辑电路实现;在具体实施例的过程中,处理器可以为中央处理器(CPU)、微处理器(MPU)、DSP或FPGA等。
本实施例所提供的终端,图8为本发明实施例终端的组成结构示意图,如图8所示,该终端包括获取模块81、截取模块82、匹配模块83和保存模块84,其中,
获取模块81,配置为终端的相机运行时,获取拍摄界面的目标区域,从目标区域的对象中确定出目标对象;在接收到拍照指令之后,以距离拍 照时刻前预设时间处为起始时刻,以距离拍照时刻后所述预设时间处为结束时刻,按照预设步长获取各图片;
截取模块82,配置为从每个图片中,截取出包括目标对象且与目标区域大小相同的区域为每个子图片;
匹配模块83,配置为将目标区域分别与每个子图片进行匹配,匹配成功时,保留子图片,匹配失败时,丢弃子图片;
保存模块84,配置为基于保留的各子图片生成视频数据,并将视频数据与拍照时刻所拍的照片进行保存。
其中,上述目标区域为闭合区域。
为了截取出子图片,在一些实施例中,上述截取模块82配置为对每个图片进行检测,得到每个图片的对象;将每个图片的对象与目标对象进行匹配,当匹配成功时,保留每个图片,当匹配失败时,丢弃每个图片;从保留的每个图片中,确定出目标对象的位置信息;根据位置信息,从保留的每个图片中截取包括目标对象且与目标区域大小相同的区域,将截取的区域作为对应的子图片。
为了准确地截取出子图片,在一些实施例中,上述截取模块82配置为根据位置信息,设定目标对象的中心位置;以目标对象的中心位置为中心,从每个图片中截取与目标区域大小相同的区域。
为了满足用户的需求,得到用户需要的局部图片,在一些实施例中,上述匹配模块83配置为确定每个子图片的对象,将每个子图片的对象中目标对象以外的对象确定为第一特征对象集合;将目标区域的对象中目标对象以外的对象确定为第二特征对象集合;将第二特征对象集合与第一特征对象集合进行匹配,匹配成功时,保留子图片,匹配失败时,丢弃子图片。
这里需要指出的是:以上终端实施例项的描述,与上述方法描述是类似的,具有同方法实施例相同的有益效果,因此不做赘述。对于本发明终 端实施例中未披露的技术细节,本领域的技术人员请参照本发明方法实施例的描述而理解,为节约篇幅,这里不再赘述。
基于图1所示的终端及图8所示的程序模块的硬件实现,为了实现本发明实施例的方法,本发明实施例还提供了一种终端,包括:处理器和用于存储能够在处理器上运行的计算机程序的存储器,
其中,所述处理器用于运行所述计算机程序时,执行本发明实施例的方法。
这里需要指出的是:
应理解,说明书通篇中提到的“一个实施例”或“一实施例”意味着与实施例有关的特定特征、结构或特性包括在本发明的至少一个实施例中。因此,在整个说明书各处出现的“在一个实施例中”或“在一实施例中”未必一定指相同的实施例。此外,这些特定的特征、结构或特性可以任意适合的方式结合在一个或多个实施例中。应理解,在本发明的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本发明实施例的实施过程构成任何限定。上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。
在本申请所提供的几个实施例中,应该理解到,所揭露的设备和方法,可以通过其它的方式实现。以上所描述的设备实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外 的划分方式,如:多个单元或组件可以结合,或可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的各组成部分相互之间的耦合、或直接耦合、或通信连接可以是通过一些接口,设备或单元的间接耦合或通信连接,可以是电性的、机械的或其它形式的。
上述作为分离部件说明的单元可以是、或也可以不是物理上分开的,作为单元显示的部件可以是、或也可以不是物理单元;既可以位于一个地方,也可以分布到多个网络单元上;可以根据实际的需要选择其中的部分或全部单元来实现本实施例方案的目的。
另外,在本发明各实施例中的各功能单元可以全部集成在一个处理单元中,也可以是各单元分别单独作为一个单元,也可以两个或两个以上单元集成在一个单元中;上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:移动存储设备、ROM、磁碟或者光盘等各种可以存储程序代码的介质。
或者,本发明上述集成的单元如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明实施例的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机、服务器、或者网络设备等)执行本发明各个实施例所述方法的全部或部分。而前述的存储介质包括:移动存储设备、ROM、磁碟或者光盘等各种可以存储程序代码的介质。
基于此,本发明实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现上述的一个或多个技术方案提供的方法。
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以所述权利要求的保护范围为准。
工业实用性
本发明实施例提供的方案,终端的相机运行时,获取拍摄界面的目标区域并从目标区域的对象中确定出目标对象,然后在接收到拍照指令之后,以距离拍照时刻前预设时间处为起始时刻,以距离拍照时刻后预设时间处为结束时刻,按照预设步长获取各图片;从每个图片中,截取出每个子图片,每个子图片中包括有目标对象且每个子图片的大小与目标区域的大小相同,这样,通过生成子图片,截取出局部的图片;然后通过将目标区域分别与每个子图片进行匹配,得到保留的各子图片,并基于保留的各子图片生成视频数据,并将视频数据与拍照时刻所拍的照片进行保存。也就是说,本发明实施例中,通过截取出子图片,并将目标区域与每个子图片进行匹配,得到保留的各子图片,从而生成局部的视频数据,通过匹配使得该局部的视频数据中没有乱入的人或物,并且将该局部的视频数据与照片保存在一起,使得用户在观赏照片的同时可以观赏局部小视频,提高在拍照时所保存的前后时间段的视频的观赏性,提高用户体验。

Claims (20)

  1. 一种视频数据的生成方法,包括:
    终端的相机运行时,获取拍摄界面的目标区域,从所述目标区域的对象中确定出目标对象;在接收到拍照指令之后,以距离拍照时刻前预设时间处为起始时刻,以距离所述拍照时刻后所述预设时间处为结束时刻,按照预设步长获取各图片;
    从每个图片中,截取出包括所述目标对象且与所述目标区域大小相同的区域为每个子图片;
    将所述目标区域分别与所述每个子图片进行匹配,匹配成功时,保留子图片;
    基于保留的各子图片生成视频数据,并将所述视频数据与所述拍照时刻所拍的照片进行保存。
  2. 根据权利要求1所述的方法,其中,所述从每个图片中,截取出包括所述目标对象且与所述目标区域大小相同的区域为每个子图片,包括:
    对所述每个图片进行检测,得到所述每个图片的对象;
    将所述每个图片的对象与所述目标对象进行匹配,当匹配成功时,保留匹配成功的每个图片;
    从保留的每个图片中,确定出所述目标对象的位置信息;
    根据所述位置信息,从保留的所述每个图片中截取包括所述目标对象且与所述目标区域大小相同的区域,将截取的区域作为对应的子图片。
  3. 根据权利要求2所述的方法,其中,当图像的对象与所述目标对象匹配失败时,丢弃匹配失败的图片。
  4. 根据权利要求2所述的方法,其中,所述根据所述位置信息,从保留的所述每个图片中截取包括所述目标对象且与所述目标区域大小相同的区域,包括:
    根据所述位置信息,设定所述目标对象的中心位置;
    以所述目标对象的中心位置为中心,从所述每个图片中截取与所述目标区域大小相同的区域。
  5. 根据权利要求1所述的方法,其中,所述将所述目标区域分别与所述每个子图片进行匹配,包括:
    确定所述每个子图片的对象,将所述每个子图片的对象中所述目标对象以外的对象确定为第一特征对象集合;
    将所述目标区域的对象中所述目标对象以外的对象确定为第二特征对象集合;
    将所述第二特征对象集合与所述第一特征对象集合进行匹配。
  6. 根据权利要求1所述的方法,其中,所述目标区域为闭合区域。
  7. 根据权利要求1所述的方法,其中,所述目标区域与子图片匹配失败时,丢弃子图片。
  8. 根据权利要求1所述的方法,其中,所述将所述目标区域分别与所述每个子图片进行匹配,包括:
    将所述目标区域的对象分别于每个子图片的对象一一进行匹配。
  9. 根据权利要求1所述的方法,其中,所述保留子图片,包括:
    删除子图片中的除了目标对象以外的其他对象,保留删除其他对象后的子图片;
    或者,
    删除子图片中的除了目标区域的对象以外的其他对象,保留删除其他对象的子图片。
  10. 一种终端,包括:
    获取模块,配置为终端的相机运行时,获取拍摄界面的目标区域,从所述目标区域的对象中确定出目标对象;在接收到拍照指令之后,以距离 拍照时刻前预设时间处为起始时刻,以距离所述拍照时刻后所述预设时间处为结束时刻,按照预设步长获取各图片;
    截取模块,配置为从每个图片中,截取出包括所述目标对象且与所述目标区域大小相同的区域为每个子图片;
    匹配模块,配置为将所述目标区域分别与所述每个子图片进行匹配,匹配成功时,保留子图片;
    保存模块,配置为基于保留的各子图片生成视频数据,并将所述视频数据与所述拍照时刻所拍的照片进行保存。
  11. 根据权利要求10所述的终端,其中,所述截取模块配置为对所述每个图片进行检测,得到所述每个图片的对象;将所述每个图片的对象与所述目标对象进行匹配,当匹配成功时,保留匹配成功的每个图片;从保留的每个图片中,确定出所述目标对象的位置信息;根据所述位置信息,从保留的所述每个图片中截取包括所述目标对象且与所述目标区域大小相同的区域,将截取的区域作为对应的子图片。
  12. 根据权利要求11所述的终端,其中,所述截取模块还配置为当图像的对象与所述目标对象匹配失败时,丢弃匹配失败的图片。
  13. 根据权利要求11所述的终端,其中,所述截取模块配置为根据所述位置信息,设定所述目标对象的中心位置;以所述目标对象的中心位置为中心,从所述每个图片中截取与所述目标区域大小相同的区域。
  14. 根据权利要求10所述的终端,其中,所述匹配模块配置为确定所述每个子图片的对象,将所述每个子图片的对象中所述目标对象以外的对象确定为第一特征对象集合;将所述目标区域的对象中所述目标对象以外的对象确定为第二特征对象集合;将所述第二特征对象集合与所述第一特征对象集合进行匹配。
  15. 根据权利要求10所述的终端,其中,所述目标区域为闭合区域。
  16. 根据权利要求10所述的终端,其中,所述匹配模块,还配置为当所述目标区域与子图片匹配失败时,丢弃子图片。
  17. 根据权利要求10所述的终端,其中,所述匹配模块,配置为将所述目标区域的对象分别于每个子图片的对象一一进行匹配。
  18. 根据权利要求10所述的终端,其中,所述匹配模块,配置为:
    删除子图片中的除了目标对象以外的其他对象,保留删除其他对象后的子图片;
    或者,
    删除子图片中的除了目标区域的对象以外的其他对象,保留删除其他对象的子图片。
  19. 一种终端,包括处理器和用于存储能够在处理器上运行的计算机程序的存储器,
    其中,所述处理器用于运行所述计算机程序时,执行权利要求1至9任一项所述方法的步骤。
  20. 一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现权利要求1至9任一项所述方法的步骤。
PCT/CN2017/101621 2016-09-30 2017-09-13 一种视频数据的生成方法、终端和计算机可读存储介质 Ceased WO2018059237A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610879193.1A CN106303292B (zh) 2016-09-30 2016-09-30 一种视频数据的生成方法和终端
CN201610879193.1 2016-09-30

Publications (1)

Publication Number Publication Date
WO2018059237A1 true WO2018059237A1 (zh) 2018-04-05

Family

ID=57716848

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/101621 Ceased WO2018059237A1 (zh) 2016-09-30 2017-09-13 一种视频数据的生成方法、终端和计算机可读存储介质

Country Status (2)

Country Link
CN (1) CN106303292B (zh)
WO (1) WO2018059237A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106303292B (zh) * 2016-09-30 2019-05-03 努比亚技术有限公司 一种视频数据的生成方法和终端

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103971391A (zh) * 2013-02-01 2014-08-06 腾讯科技(深圳)有限公司 一种动画生成方法及装置
CN105245777A (zh) * 2015-09-28 2016-01-13 努比亚技术有限公司 生成视频图片的方法及装置
WO2016004765A1 (zh) * 2014-07-08 2016-01-14 华为技术有限公司 用于进行多点视频通讯的方法、设备及系统
US20160337593A1 (en) * 2014-01-16 2016-11-17 Zte Corporation Image presentation method, terminal device and computer storage medium
CN106303292A (zh) * 2016-09-30 2017-01-04 努比亚技术有限公司 一种视频数据的生成方法和终端

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7672538B2 (en) * 2003-04-17 2010-03-02 Seiko Epson Corporation Generation of still image from a plurality of frame images
CN102109902A (zh) * 2009-12-28 2011-06-29 鸿富锦精密工业(深圳)有限公司 基于手势识别的输入装置
JP5653736B2 (ja) * 2010-12-06 2015-01-14 オリンパスイメージング株式会社 カメラ、表示装置、および表示方法
CN104618572B (zh) * 2014-12-19 2018-02-16 广东欧珀移动通信有限公司 一种终端的拍照方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103971391A (zh) * 2013-02-01 2014-08-06 腾讯科技(深圳)有限公司 一种动画生成方法及装置
US20160337593A1 (en) * 2014-01-16 2016-11-17 Zte Corporation Image presentation method, terminal device and computer storage medium
WO2016004765A1 (zh) * 2014-07-08 2016-01-14 华为技术有限公司 用于进行多点视频通讯的方法、设备及系统
CN105245777A (zh) * 2015-09-28 2016-01-13 努比亚技术有限公司 生成视频图片的方法及装置
CN106303292A (zh) * 2016-09-30 2017-01-04 努比亚技术有限公司 一种视频数据的生成方法和终端

Also Published As

Publication number Publication date
CN106303292A (zh) 2017-01-04
CN106303292B (zh) 2019-05-03

Similar Documents

Publication Publication Date Title
WO2017050115A1 (zh) 一种图像合成方法和装置
WO2018019124A1 (zh) 一种图像处理方法及电子设备、存储介质
WO2017045650A1 (zh) 一种图片处理方法及终端
WO2018019122A1 (zh) 一种对焦方法、终端和计算机存储介质
CN106097284B (zh) 一种夜景图像的处理方法和移动终端
WO2017067526A1 (zh) 图像增强方法及移动终端
WO2016029766A1 (zh) 移动终端及其操作方法和计算机存储介质
WO2016173468A1 (zh) 组合操作方法和装置、触摸屏操作方法及电子设备
WO2017143855A1 (zh) 具有截屏功能的装置和截屏方法
WO2018045945A1 (zh) 一种对焦方法及终端、存储介质
CN106302651B (zh) 图片的社交分享方法及具有图片社交分享系统的终端
WO2017071476A1 (zh) 一种图像合成方法和装置、存储介质
WO2017071468A1 (zh) 一种信息处理方法、移动终端及计算机存储介质
WO2017012385A1 (zh) 快速启动应用的方法、装置和终端
WO2017071475A1 (zh) 一种图像处理方法及终端、存储介质
WO2017071469A1 (zh) 一种移动终端和图像拍摄方法、计算机存储介质
WO2017148211A1 (zh) 移动终端及网页截图方法
WO2017067523A1 (zh) 图像处理方法、装置及移动终端
WO2017071542A1 (zh) 图像处理方法及装置
CN106657782B (zh) 一种图片处理方法和终端
WO2017210971A1 (zh) 一种基于移动终端的热成像方法、装置及移动终端
WO2018050080A1 (zh) 一种移动终端、图片处理方法及计算机存储介质
WO2017071532A1 (zh) 一种自拍合影的方法和装置
WO2018045961A1 (zh) 一种图片处理方法及终端、存储介质
CN106131327B (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: 17854687

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 21.08.2019)

122 Ep: pct application non-entry in european phase

Ref document number: 17854687

Country of ref document: EP

Kind code of ref document: A1