Nothing Special   »   [go: up one dir, main page]

CN106993134B - Image generation device and method and terminal - Google Patents

Image generation device and method and terminal Download PDF

Info

Publication number
CN106993134B
CN106993134B CN201710206406.9A CN201710206406A CN106993134B CN 106993134 B CN106993134 B CN 106993134B CN 201710206406 A CN201710206406 A CN 201710206406A CN 106993134 B CN106993134 B CN 106993134B
Authority
CN
China
Prior art keywords
area
foreground
shot
background
region
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710206406.9A
Other languages
Chinese (zh)
Other versions
CN106993134A (en
Inventor
陈小翔
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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
Priority to CN201710206406.9A priority Critical patent/CN106993134B/en
Publication of CN106993134A publication Critical patent/CN106993134A/en
Application granted granted Critical
Publication of CN106993134B publication Critical patent/CN106993134B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof
    • 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/2621Cameras specially adapted for the electronic generation of special effects during image pickup, e.g. digital cameras, camcorders, video cameras having integrated special effects capability

Landscapes

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

Abstract

The invention discloses an image generation device and method and a terminal, wherein the device comprises: the extraction module is used for extracting a foreground area and a background area from an area to be shot; the determining module is used for determining a main object from the foreground area; and the fuzzy processing module is used for performing dynamic stretching fuzzy operation on the main object and the background area of the area to be shot to obtain a shot picture. The technical problem that the existing dynamic picture is too complex to obtain is solved, and the technical effect of simply and efficiently obtaining the dynamic picture is achieved.

Description

Image generation device and method and terminal
Technical Field
The present invention relates to the field of image processing, and in particular, to an image generating apparatus and method, and a terminal.
Background
With the continuous development of internet technology and mobile terminals such as mobile phones and the like. More and more intelligent terminals integrate the camera shooting function, so that people can realize the functions of shooting and the like through mobile phone terminals.
Further, as people have more and more requirements on the photographing effect, for example: beauty, skin makeup, etc. And some people with high requirements on the shooting effect also want to be able to shoot pictures with specific effects.
For example, there are times when one wishes to take a picture of a motion, such as the flight of an airplane, the travel of a car, one running, etc. At present, in order to meet the requirement of a dynamic picture, complex parameters are generally required to be calculated so as to obtain the dynamic picture, and the realization is complex.
No effective solution to this problem has been proposed.
Disclosure of Invention
The invention mainly aims to provide an image generation device, an image generation method and a terminal, and aims to simply and efficiently shoot a picture with a sense of motion.
In order to achieve the above object, the present invention provides an image generating apparatus, comprising:
the extraction module is used for extracting a foreground area and a background area from an area to be shot;
the determining module is used for determining a main object from the foreground area;
and the fuzzy processing module is used for performing dynamic stretching fuzzy operation on the main object and the background area of the area to be shot to obtain a shot picture.
Further, the extraction module is specifically configured to extract a foreground region and a background region from the region to be photographed through two cameras.
Further, the extraction module is specifically configured to extract a foreground area and a background area from the area to be photographed through the depth-of-field information in the area to be photographed.
Further, the fuzzy processing module comprises:
a first processing unit for performing dynamic stretching blurring on the edge of the subject matter;
and the second processing unit is used for blurring the background area according to the dynamic motion trail.
Further, the fuzzy processing module comprises:
the first merging unit is used for merging the dynamically stretched and blurred main body with the foreground area to obtain a blurred foreground area;
and the second merging unit is used for merging the background area subjected to dynamic stretching blurring and the foreground area subjected to blurring processing to obtain a static picture with dynamic sense.
In order to achieve the above object, the present invention also provides a terminal including the above image generating apparatus.
In addition, to achieve the above object, the present invention further provides an image generating method, including:
extracting a foreground area and a background area from an area to be shot;
determining a main object from the foreground area;
and performing dynamic stretching fuzzy operation on the main object and the background area of the area to be shot to obtain a shot picture.
Further, extracting a foreground region and a background region from the region to be shot includes:
and extracting a foreground area and a background area from the area to be shot through the double cameras.
Further, extracting a foreground region and a background region from the region to be photographed through the two cameras includes:
and extracting a foreground area and a background area from the area to be shot according to the depth of field information in the area to be shot.
Further, the performing a dynamic stretch blur operation on the subject object and the background area in the region to be captured includes:
performing dynamic stretching blurring on the edge of the main object;
and blurring the background area according to the dynamic motion track.
Further, performing a dynamic stretching blurring operation on the subject object and the background area in the region to be photographed to obtain a photographed picture, including:
combining the dynamically stretched and blurred main body with the foreground area to obtain a blurred foreground area;
and combining the background area after the dynamic stretching blurring and the foreground area after the blurring processing to obtain a static picture with dynamic sense.
The invention provides an image generation device and method, which are used for extracting a foreground area and a background area from an area to be shot, then determining a main object from the foreground area, and finally performing dynamic stretching fuzzy operation on the main object and the background area of the area to be shot to obtain a shot image. The shooting of the dynamic picture is realized through the mode, so that the technical problem that the existing dynamic picture is too complicated to obtain is solved, and the technical effect of simply and efficiently obtaining the dynamic picture is achieved.
Drawings
Fig. 1 is a schematic diagram of a hardware structure of an optional mobile terminal for implementing various embodiments of the present invention;
FIG. 2 is a diagram of a wireless communication system for the mobile terminal shown in FIG. 1;
FIG. 3 is a block diagram of an image generation apparatus according to an embodiment of the present invention;
FIG. 4 is a flow chart of an image generation method according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of an area to be photographed according to an embodiment of the present invention;
FIG. 6 is a diagram of an extracted subject structure according to an embodiment of the present invention;
FIG. 7 is a diagram illustrating the blurring result of the background area according to the embodiment of the present invention;
FIG. 8 is a photograph of a formed dynamic still of an embodiment of the present invention;
the implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
A mobile terminal implementing various embodiments of the present invention will now be described with reference to the accompanying drawings. In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for facilitating the explanation of the present invention, and have no specific meaning in themselves. Thus, "module" and "component" may be used in a mixture.
The mobile terminal may be implemented in various forms. For example, the terminal described in the present invention may include a mobile terminal such as a mobile phone, a smart phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a navigation device, and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. In the following, it is assumed that the terminal is a mobile terminal. However, it will be understood by those skilled in the art that the configuration according to the embodiment of the present invention can be applied to a fixed type terminal in addition to elements particularly used for moving purposes.
Fig. 1 is a schematic hardware configuration of a mobile terminal implementing various embodiments of the present invention. Of course, the hardware structure of the mobile terminal will be fully described in the embodiments of the present invention, and in the following embodiments, if the mobile terminal is also referred to, the hardware structure description in the embodiments may also be used, and the following description shall be applicable to each embodiment of the present invention, which will not be repeatedly explained in the following embodiments.
The mobile terminal 100 may include a wireless communication unit 110, an a/V (audio/video) 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, and a power supply unit 190, etc. Fig. 1 illustrates a mobile terminal having various components, but it is to be understood that not all illustrated components are required to be implemented. More or fewer components may alternatively be implemented. Elements of the mobile terminal will be described in detail below.
The wireless communication unit 110 typically includes one or more components that allow radio communication between the mobile terminal 100 and a wireless communication system or network. For example, 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 may 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 a terminal. The broadcast signal may include a TV broadcast signal, a radio broadcast signal, a data broadcast signal, and the like. Also, 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 an Electronic Program Guide (EPG) of Digital Multimedia Broadcasting (DMB), an Electronic Service Guide (ESG) of digital video broadcasting-handheld (DVB-H), and the like. The broadcast receiving module 111 may receive a signal broadcast by using various types of broadcasting systems. In particular, the broadcast receiving module 111 may receive a broadcast signal by using a signal such as multimedia broadcasting-terrestrial (DMB-T), digital multimedia broadcasting-satellite (DMB-S), digital video broadcasting-handheld (DVB-H), forward link media (MediaFLO)@) Data of (2)A digital broadcasting system of a broadcasting system, an integrated services for terrestrial digital broadcasting (ISDB-T), etc. receives digital broadcasting. The broadcast receiving module 111 may be constructed to be suitable for various broadcasting systems that provide broadcast signals as well as the above-mentioned digital broadcasting systems. 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 medium).
The mobile communication module 112 transmits and/or receives radio signals to and/or from at least one of a base station (e.g., access point, node B, etc.), an external terminal, and a server. Such radio signals may include voice call signals, video call signals, or various types of data transmitted and/or received according to text and/or multimedia messages.
The wireless internet module 113 supports wireless internet access of the mobile terminal. The module may be internally or externally coupled to the terminal. The wireless internet access technology to which the module relates may include WLAN (wireless LAN) (Wi-Fi), Wibro (wireless broadband), Wimax (worldwide interoperability for microwave access), HSDPA (high speed downlink packet access), and the like.
The short-range communication module 114 is a module for supporting short-range communication. Some examples of short-range communication technologies include bluetoothTMRadio Frequency Identification (RFID), infrared data association (IrDA), Ultra Wideband (UWB), zigbeeTMAnd so on.
The location information module 115 is a module for checking or acquiring location information of the mobile terminal. A typical example of the location information module is a GPS (global positioning system). According to the current technology, the GPS module 115 calculates distance information and accurate time information from three or more satellites and applies triangulation to the calculated information, thereby accurately calculating three-dimensional current location information according to longitude, latitude, and altitude. Currently, a method for calculating position and time information uses three satellites and corrects an error of the calculated position and time information by using another satellite. In addition, the GPS module 115 can calculate speed information by continuously calculating current position information in real time.
The a/V input unit 120 is used to receive an audio or video signal. The a/V input unit 120 may include a camera 121 and a microphone 122, and the camera 121 processes image data of still pictures or video obtained by an image capturing apparatus in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 151. The image frames processed by the cameras 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 construction of the mobile terminal. The microphone 122 may receive sounds (audio data) via the microphone in a phone call mode, a recording mode, a voice recognition mode, or the like, and can process such sounds into audio data. The processed audio (voice) data may be converted into a format output transmittable to a mobile communication base station via the mobile communication module 112 in case of a phone call mode. The microphone 122 may implement various types of noise cancellation (or suppression) algorithms to cancel (or suppress) noise or interference generated in the course of receiving and transmitting audio signals.
The user input unit 130 may generate key input data according to a command input by a user to control various operations of the mobile terminal. The user input unit 130 allows a user to input various types of information, and may include a keyboard, dome sheet, touch pad (e.g., a touch-sensitive member that detects changes in resistance, pressure, capacitance, and the like due to being touched), scroll wheel, joystick, and the like. In particular, when the touch pad is superimposed on the display unit 151 in the form of a layer, a touch screen may be formed.
The sensing unit 140 detects a current state of the mobile terminal 100 (e.g., an open or closed state of the mobile terminal 100), a position of the mobile terminal 100, presence or absence of contact (i.e., touch input) by a user with the mobile terminal 100, an orientation of the mobile terminal 100, acceleration or deceleration movement and direction of the mobile terminal 100, and the like, and generates a command or signal for controlling an operation of the mobile terminal 100. For example, when the mobile terminal 100 is implemented as a slide-type mobile phone, the sensing unit 140 may sense whether the slide-type phone is opened or closed. In addition, the sensing unit 140 can detect whether the power supply unit 190 supplies power or whether the interface unit 170 is coupled with an external device. The sensing unit 140 may include a proximity sensor 1410 as 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 is connected to the mobile terminal 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The identification module may store various information for authenticating a user using the mobile terminal 100 and may include a User Identity Module (UIM), a Subscriber Identity Module (SIM), a Universal Subscriber Identity Module (USIM), and the like. In addition, a device having an identification module (hereinafter, referred to as an "identification device") may take the form of a smart card, and thus, the identification device may be connected with the mobile terminal 100 via a port or other connection means. The interface unit 170 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the mobile terminal 100 or may be used to transmit data between the mobile terminal and the external device.
In addition, when the mobile terminal 100 is connected with an external cradle, the interface unit 170 may serve as a path through which power is supplied from the cradle to the mobile terminal 100 or may serve as a path through which various command signals input from the cradle are transmitted to the mobile terminal. Various command signals or power input from the cradle may be used as signals for recognizing whether the mobile terminal is accurately mounted on the cradle. The output unit 150 is configured to provide output signals (e.g., audio signals, video signals, alarm signals, vibration signals, 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 may display information processed in the mobile terminal 100. For example, when the mobile terminal 100 is in a phone call mode, the display unit 151 may display a User Interface (UI) or a Graphical User Interface (GUI) related to a call or other communication (e.g., text messaging, multimedia file downloading, etc.). When the mobile terminal 100 is in a video call mode or an 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 an image and related functions, and the like.
Meanwhile, when the display unit 151 and the touch pad are overlapped with each other in the form of a layer to form a touch screen, the display unit 151 may serve 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. 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 transparent displays, and a typical transparent display may be, for example, a TOLED (transparent organic light emitting diode) display or the like. Depending on the particular desired implementation, the mobile terminal 100 may include two or more display units (or other display devices), for example, the mobile terminal may include an external display unit (not shown) and an internal display unit (not shown). The touch screen may be used to detect a touch input pressure as well as a touch input position and a touch input area.
The audio output module 152 may convert audio data received by the wireless communication unit 110 or stored in the memory 160 into an audio signal and output as sound when the mobile terminal is in a call signal reception mode, a call mode, a recording mode, a voice recognition mode, a broadcast reception mode, or the like. Also, the audio output module 152 may provide audio output related to a specific function performed by the mobile terminal 100 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output module 152 may include a speaker, a buzzer, and the like.
The alarm unit 153 may provide an output to notify the mobile terminal 100 of the occurrence of an event. Typical events may include call reception, message reception, key signal input, touch input, and the like. In addition to audio or video output, the alarm unit 153 may provide output in different ways to notify the occurrence of an event. For example, the alarm unit 153 may provide an output in the form of vibration, and when a call, a message, or some other incoming communication (incomingmunication) is received, the alarm unit 153 may provide a tactile output (i.e., vibration) to inform the user thereof. By providing such a tactile output, the user can recognize the occurrence of various events even when the user's mobile phone is in the user's pocket. The alarm unit 153 may also provide an output notifying the occurrence of an event via the display unit 151 or the audio output module 152.
The memory 160 may store software programs and the like for processing and controlling operations performed by the controller 180, or may temporarily store data (e.g., a phonebook, messages, still images, videos, and the like) that has been or will be output. Also, the memory 160 may store data regarding various ways of vibration and audio signals 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 (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. Also, the mobile terminal 100 may cooperate with a network storage device that performs a storage function of the memory 160 through a network connection.
The controller 180 generally controls the overall operation of the mobile terminal. For example, the controller 180 performs control and processing related to voice calls, data communications, video calls, and the like. In addition, the controller 180 may include a multimedia module 181 for reproducing (or playing back) multimedia data, and the multimedia module 181 may be constructed within the controller 180 or may be constructed separately 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 and provides appropriate power required to operate various elements and components under the control of the controller 180.
The various embodiments described herein may be implemented in a computer-readable medium using, for example, computer software, hardware, or any combination thereof. For a hardware implementation, the embodiments described herein may be implemented using at least one of an Application Specific Integrated Circuit (ASIC), a Digital Signal Processor (DSP), a Digital Signal Processing Device (DSPD), a Programmable Logic Device (PLD), a Field Programmable Gate Array (FPGA), a processor, a controller, a microcontroller, a microprocessor, an electronic unit designed to perform the functions described herein, and in some cases, such embodiments may be implemented in the controller 180. For a software implementation, the implementation such as a process or a function may be implemented with a separate software module that allows performing at least one function or operation. The software codes may be implemented by software applications (or programs) written in any suitable programming language, which may be stored in the memory 160 and executed by the controller 180.
Up to this point, mobile terminals have been described in terms of their functionality. Hereinafter, a slide-type mobile terminal among various types of mobile terminals, such as a folder-type, bar-type, swing-type, slide-type mobile terminal, and the like, will be described as an example for the sake of brevity. Accordingly, the present invention can be applied to any type of mobile terminal, and is not limited to a slide type mobile terminal.
The mobile terminal 100 as shown in fig. 1 may be configured to operate with communication systems such as wired and wireless communication systems and satellite-based communication systems that transmit data via frames or packets.
A communication system in which a mobile terminal according to the present invention is operable will now be described with reference to fig. 2.
Such communication systems may use different air interfaces and/or physical layers. For example, the air interface used by the communication system includes, 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), and the like. By way of non-limiting example, the following description relates to a CDMA communication system, but such teachings are equally applicable to other types of systems.
Referring to fig. 2, the CDMA wireless communication system may include a plurality of mobile terminals 100, a plurality of Base Stations (BSs) 270, Base Station Controllers (BSCs) 275, and a Mobile Switching Center (MSC) 280. The MSC280 is configured to interface with a Public Switched Telephone Network (PSTN) 290. The MSC280 is also configured to interface with a BSC275, which may be coupled to the base station 270 via a backhaul. The backhaul may be 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 understood that a system as shown in fig. 2 may include multiple BSCs 275.
Each BS270 may serve one or more sectors (or regions), each sector covered by a multi-directional antenna or an antenna pointing in a particular direction being radially distant from the BS 270. Alternatively, each partition may be covered by two or more antennas for diversity reception. Each BS270 may be configured to support multiple frequency allocations, with each frequency allocation having a particular frequency spectrum (e.g., 1.25MHz,5MHz, etc.).
The intersection of partitions with frequency allocations may be referred to as a CDMA channel. The BS270 may also be referred to as a Base Transceiver Subsystem (BTS) or other equivalent terminology. In such a case, the term "base station" may be used to generically refer to a single BSC275 and at least one BS 270. The base stations may also be referred to as "cells". Alternatively, each sector of a particular BS270 may be referred to as a plurality of cell sites.
As shown in fig. 2, 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. In fig. 2, several Global Positioning System (GPS) satellites 300 are shown. The satellite 300 assists in locating at least one of the plurality of mobile terminals 100.
In fig. 2, a plurality of satellites 300 are depicted, but it is understood that useful positioning information may be obtained with any number of satellites. The GPS module 115 as shown in fig. 1 is generally configured to cooperate with satellites 300 to obtain desired positioning information. Other techniques that can track the location of the mobile terminal may be used instead of or in addition to GPS tracking techniques. In addition, at least one GPS satellite 300 may selectively or additionally process satellite DMB transmission.
As a typical operation of the wireless communication system, the BS270 receives reverse link signals from various mobile terminals 100. The mobile terminal 100 is generally engaged in conversations, messaging, and other types of communications. Each reverse link signal received by a particular base station 270 is processed within the particular BS 270. The obtained data is forwarded to the associated BSC 275. The BSC provides call resource allocation and mobility management functions including coordination of soft handoff procedures between BSs 270. The BSCs 275 also route the received data to the MSC280, which provides additional routing services for interfacing with the PSTN 290. Similarly, the PSTN290 interfaces with the MSC280, the MSC interfaces with the BSCs 275, and the BSCs 275 accordingly control the BS270 to transmit forward link signals to the mobile terminal 100.
Based on the above mobile terminal hardware structure and communication system, the mobile terminal in the embodiment of the present invention is provided, as shown in fig. 3, the mobile terminal may be provided with an image generating apparatus, and may include: a decimation module 301, a determination module 302 and a blur processing module 303. The following is a detailed description of these modules:
1) an extraction module 301, configured to extract a foreground region and a background region from a region to be photographed;
the extraction module 301 may be executed in response to a photographing trigger instruction of a user at the mobile terminal, or may be executed when the user selects to synthesize or generate a module image.
For example, in an application scenario, a blurred image generation function may be built in the image capturing function, and when the user selects the mode to take a picture, the user indicates that the current picture taking work is triggered when clicking "take a picture". At this time, the extraction module 301 may trigger the extraction of the foreground region and the background region from the region to be photographed. The area to be shot can be an area which is faced by the camera presented by the current terminal or is included, and can be used as the area to be shot.
In another application scenario, after a picture is selected, the picture is selected to be changed into a dynamic picture, and then a region displayed on the current picture can be triggered to be taken as a region to be shot, then a foreground region and a background region in the picture are identified, and corresponding blurring processing and the like are further performed.
Of course, the above listed application scenarios are only schematic descriptions, and many other application scenarios may exist in practical implementation, and the present application is not limited to this.
When the foreground region and the background region are extracted, a training model can be established in advance, the foreground region and the background region are manually calibrated by manually calibrating a plurality of sample pictures, and then the training is carried out to obtain an identification model capable of automatically identifying the foreground region and the background region.
When the area to be shot is input into the recognition model as the content to be recognized, the background area and the foreground area in the area to be shot can be automatically recognized.
Certainly, other manners may also be used to identify the foreground area and the background area of the area to be photographed, for example, the position of the moving target object in the image may be determined, the area between the position of the moving target object and the camera is used as the foreground area, the area between the position of the moving target object and the camera which starts to be far away from the camera is used as the background area, and the like, or other manners are used to identify the foreground area and the background area, and the specific identification manner is not limited in this application.
2) A determining module 302, configured to determine a subject from the foreground region;
after the foreground region is determined, a target object, which may also be referred to as a subject, may be determined from the foreground region. For example, if the photographic subject is a person running, an airplane in flight, a car in motion, or the like, these subjects can be determined as the subject. Namely, the determined subject object is the target object which needs to be changed into a dynamic state.
When the subject is identified, the subject may be identified by using an identification model, or may be clicked by a user, for example, when the user clicks a certain region on the user terminal, the subject of the region is used as the identified subject, that is, as an object to be generated into a dynamic image. For example, if the shooting target is a running person, the user can click on the area of the person on the display screen, and then the person can be recognized as a subject, that is, the target object which needs to be changed into a dynamic state.
3) And the blurring processing module 303 is configured to perform dynamic stretching blurring operation on the main object of the region to be photographed and the background region to obtain a photographed picture.
When the method is implemented, considering that dynamic images are mainly formed by the motion state of a main object, for example, when an airplane flies, the eyes of people have certain time delay, and in order to shoot the motion effect of the target object with higher speed, the dynamic images of the targets can be shot. The fuzzy processing module 303 may include: the first processing unit is used for performing dynamic stretching blurring on the edge of the main object; and the second processing unit is used for blurring the background area according to the dynamic motion trail. That is, when the blurring process is performed, the edge of the subject may be dynamically stretched and blurred, and then the background region may be stretched and blurred in the moving direction of the subject, so that an image in a blurred dynamic state may be formed.
When the blurring processing is performed, the subject matter after the dynamic stretching blurring and the foreground region are combined to obtain the foreground region after the blurring processing, and then the background region after the dynamic stretching blurring and the foreground region after the blurring processing are combined to obtain the static picture with the motion sense.
That is, the region to be photographed is divided into three parts: a subject, a foreground region, and a background region. Then, the subject is blurred, the background region is blurred, and the three are combined to form a final picture with motion sense.
When the foreground area and the background area are determined, the determination can be realized through two cameras, that is, two cameras, a first camera and a second camera are arranged in the terminal, and the extraction of the foreground area and the background area is realized through the two cameras. The extraction of the foreground region and the background region can be determined by the depth of field.
Based on the above mobile terminal hardware structure and communication system, the present invention provides various embodiments of the method.
As shown in fig. 4, an embodiment of the present invention provides an image generating method, including:
step 401: extracting a foreground area and a background area from an area to be shot;
in one embodiment, the method can be performed in response to a photographing triggering instruction of a user at the mobile terminal, and can also be performed when the user selects to synthesize or generate the module image.
For example, in an application scenario, a blurred image generation function may be built in the image capturing function, and when the user selects the mode to take a picture, the user indicates that the current picture taking work is triggered when clicking "take a picture". At this time, extraction of the foreground region and the background region from the region to be photographed may be triggered. The area to be shot can be an area which is faced by the camera presented by the current terminal or is included, and can be used as the area to be shot.
In another application scenario, after a picture is selected, the picture is selected to be changed into a dynamic picture, and then a region displayed on the current picture can be triggered to be taken as a region to be shot, then a foreground region and a background region in the picture are identified, and corresponding blurring processing and the like are further performed.
Of course, the above listed application scenarios are only schematic descriptions, and many other application scenarios may exist in practical implementation, and the present application is not limited to this.
When the foreground region and the background region are extracted, a training model can be established in advance, the foreground region and the background region are manually calibrated by manually calibrating a plurality of sample pictures, and then the training is carried out to obtain an identification model capable of automatically identifying the foreground region and the background region.
When the area to be shot is input into the recognition model as the content to be recognized, the background area and the foreground area in the area to be shot can be automatically recognized.
Certainly, other manners may also be used to identify the foreground area and the background area of the area to be photographed, for example, the position of the moving target object in the image may be determined, the area between the position of the moving target object and the camera is used as the foreground area, the area between the position of the moving target object and the camera which starts to be far away from the camera is used as the background area, and the like, or other manners are used to identify the foreground area and the background area, and the specific identification manner is not limited in this application.
Step 402: determining a main object from the foreground area;
after the foreground region is determined, a target object, which may also be referred to as a subject, may be determined from the foreground region. For example, if the photographic subject is a person running, an airplane in flight, a car in motion, or the like, these subjects can be determined as the subject. Namely, the determined subject object is the target object which needs to be changed into a dynamic state.
When the subject is identified, the subject may be identified by using an identification model, or may be clicked by a user, for example, when the user clicks a certain region on the user terminal, the subject of the region is used as the identified subject, that is, as an object to be generated into a dynamic image. For example, if the shooting target is a running person, the user can click on the area of the person on the display screen, and then the person can be recognized as a subject, that is, the target object which needs to be changed into a dynamic state.
Step 403: and carrying out dynamic stretching fuzzy operation on the main object and the background area of the area to be shot to obtain a shot picture.
When the method is implemented, considering that dynamic images are mainly formed by the motion state of a main object, for example, when an airplane flies, the eyes of people have certain time delay, and in order to shoot the motion effect of the target object with higher speed, the dynamic images of the targets can be shot. In one embodiment, step 403 may include: performing dynamic stretching blurring on the edge of the main object; and blurring the background area according to the dynamic motion track. That is, when the blurring process is performed, the edge of the subject may be dynamically stretched and blurred, and then the background region may be stretched and blurred in the moving direction of the subject, so that an image in a blurred dynamic state may be formed.
When the blurring processing is performed, the subject matter after the dynamic stretching blurring and the foreground region are combined to obtain the foreground region after the blurring processing, and then the background region after the dynamic stretching blurring and the foreground region after the blurring processing are combined to obtain the static picture with the motion sense.
That is, the region to be photographed is divided into three parts: a subject, a foreground region, and a background region. Then, the subject is blurred, the background region is blurred, and the three are combined to form a final picture with motion sense.
When the foreground area and the background area are determined, the determination can be realized through two cameras, that is, two cameras, a first camera and a second camera are arranged in the terminal, and the extraction of the foreground area and the background area is realized through the two cameras. The extraction of the foreground region and the background region can be determined by the depth of field.
The following describes the above image generation method and apparatus with reference to a specific embodiment, but it should be noted that the specific embodiment is only for better describing the present application and is not to be construed as a limitation to the present application.
In this example, a two-camera mobile terminal performs shooting. When shooting, can jointly shoot through first camera and second camera. The first camera shoots a normal image, the second camera carries out fuzzy processing on the image, and then the first camera and the second camera are combined to obtain a dynamic static image. That is, the two cameras can perform different operations to acquire different pictures, so that the merging process can be performed finally.
Specifically, the method may include the steps of:
s1: opening the cameras, and extracting foreground and background information by using the double cameras; when the foreground information and the background information are extracted, the depth of field information of the main object can be determined through the double cameras, so that the background and the foreground can be identified and determined.
S2: the edge of the foreground main object can be dynamically stretched and blurred, and the background can be blurred according to the dynamic motion track;
s3: a still picture is formed which is animated.
For example, as shown in fig. 5, the region to be photographed is an airplane, and in order to photograph a dynamic image of the airplane, the subject and background regions thereof can be identified. Then, as shown in fig. 6, a frame diagram corresponding to the subject is shown, and as shown in fig. 7, a frame diagram obtained by blurring the motion trajectory of the background region according to the subject is shown. Then, the blurred subject, the foreground region, and the blurred background region are combined to obtain a still picture with motion as shown in fig. 8. Namely the photo to be obtained.
The invention provides an image generation device and method, which are used for extracting a foreground area and a background area from an area to be shot, then determining a main object from the foreground area, and finally performing dynamic stretching fuzzy operation on the main object and the background area of the area to be shot to obtain a shot image. The shooting of the dynamic picture is realized through the mode, so that the technical problem that the existing dynamic picture is too complicated to obtain is solved, and the technical effect of simply and efficiently obtaining the dynamic picture is achieved.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (6)

1. An image generation apparatus, characterized in that the apparatus comprises:
the extraction module is used for extracting a foreground area and a background area from an area to be shot;
the determining module is used for determining a main object from the foreground area;
the fuzzy processing module is used for carrying out dynamic stretching fuzzy operation on the main object and the background area of the area to be shot to obtain a shot picture; the fuzzy processing module comprises:
the first processing unit is used for performing dynamic stretching blurring on the edge of the main object;
the second processing unit is used for blurring the background area according to the dynamic motion track;
the first merging unit is used for merging the dynamically stretched and blurred main object with the foreground area to obtain a blurred foreground area;
and the second merging unit is used for merging the background area subjected to dynamic stretching blurring and the foreground area subjected to blurring processing to obtain a static picture with dynamic sense.
2. The apparatus according to claim 1, wherein the extraction module is specifically configured to extract a foreground region and a background region from the region to be captured through depth information in the region to be captured.
3. A terminal characterized by comprising the image generation apparatus of any one of claims 1 to 2.
4. An image generation method, characterized in that the method comprises:
extracting a foreground area and a background area from an area to be shot;
determining a main object from the foreground area;
performing dynamic stretching fuzzy operation on the main object and the background area of the area to be shot to obtain a shot picture, specifically comprising: performing dynamic stretching blurring on the edge of the main object; blurring the background area according to a dynamic motion track; combining the dynamically stretched and blurred main body with the foreground area to obtain a blurred foreground area; and combining the background area after the dynamic stretching blurring and the foreground area after the blurring processing to obtain a static picture with dynamic sense.
5. The method of claim 4, wherein extracting foreground and background regions from the region to be captured comprises:
and extracting a foreground area and a background area from the area to be shot through the double cameras.
6. The method of claim 5, wherein extracting foreground and background regions from the region to be photographed by means of two cameras comprises:
and extracting a foreground area and a background area from the area to be shot according to the depth of field information in the area to be shot.
CN201710206406.9A 2017-03-31 2017-03-31 Image generation device and method and terminal Active CN106993134B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710206406.9A CN106993134B (en) 2017-03-31 2017-03-31 Image generation device and method and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710206406.9A CN106993134B (en) 2017-03-31 2017-03-31 Image generation device and method and terminal

Publications (2)

Publication Number Publication Date
CN106993134A CN106993134A (en) 2017-07-28
CN106993134B true CN106993134B (en) 2020-01-07

Family

ID=59414622

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710206406.9A Active CN106993134B (en) 2017-03-31 2017-03-31 Image generation device and method and terminal

Country Status (1)

Country Link
CN (1) CN106993134B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108111748B (en) * 2017-11-30 2021-01-08 维沃移动通信有限公司 Method and device for generating dynamic image
CN110084765B (en) * 2019-05-05 2021-08-06 Oppo广东移动通信有限公司 An image processing method, an image processing device and a terminal device
CN110457102B (en) * 2019-07-26 2022-07-08 武汉深之度科技有限公司 Visual object blurring method, visual object rendering method and computing equipment
CN113132612B (en) * 2019-12-31 2022-08-09 华为技术有限公司 Image stabilization processing method, terminal shooting method, medium and system

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1201268C (en) * 1999-06-30 2005-05-11 国际商业机器公司 Image process for realizing moving fuzzification
JP2006092156A (en) * 2004-09-22 2006-04-06 Namco Ltd Program, information storage medium and image generation device
JP4761537B2 (en) * 2006-03-27 2011-08-31 サミー株式会社 Image generating apparatus, game machine, and image generating program
KR20110043991A (en) * 2009-10-22 2011-04-28 삼성테크윈 주식회사 Motion blur processing apparatus and method
US9928628B2 (en) * 2013-05-13 2018-03-27 Nokia Technologies Oy Method, apparatus and computer program product to represent motion in composite images
US9697636B2 (en) * 2013-10-18 2017-07-04 Apple Inc. Applying motion blur to animated objects within a presentation system
EP2933999B1 (en) * 2014-04-14 2018-02-21 Alcatel Lucent Method and apparatus for obtaining an image with motion blur
KR101671391B1 (en) * 2015-07-07 2016-11-02 한국과학기술연구원 Method for deblurring video using modeling blurred video with layers, recording medium and device for performing the method
CN106454143A (en) * 2016-08-31 2017-02-22 周民 Motion image shooting method and terminal

Also Published As

Publication number Publication date
CN106993134A (en) 2017-07-28

Similar Documents

Publication Publication Date Title
CN106454121B (en) Double-camera shooting method and device
CN106909274B (en) Image display method and device
CN105100491B (en) A kind of apparatus and method for handling photo
CN105468158B (en) Color adjustment method and mobile terminal
CN106097284B (en) A kind of processing method and mobile terminal of night scene image
CN106534693B (en) A kind of photo processing method, device and terminal
CN107018331A (en) A kind of imaging method and mobile terminal based on dual camera
CN106657782B (en) Picture processing method and terminal
CN106791480A (en) A kind of terminal and video skimming creation method
CN105430258B (en) A kind of method and apparatus of self-timer group photo
CN106993134B (en) Image generation device and method and terminal
CN105100619A (en) Apparatus and method for adjusting shooting parameters
CN106911881B (en) Dynamic photo shooting device and method based on double cameras and terminal
CN106598538B (en) Instruction set updating method and system
CN106131327B (en) Terminal and image acquisition method
CN106851114B (en) Photo display device, photo generation device, photo display method, photo generation method and terminal
CN104866352A (en) Method for starting application and mobile terminal
CN107018334A (en) A kind of applied program processing method and device based on dual camera
CN107018326B (en) Shooting method and device
CN106303044B (en) A kind of mobile terminal and obtain the method to coke number
CN105262953B (en) A kind of mobile terminal and its method of control shooting
CN105338244B (en) A kind of information processing method and mobile terminal
CN105049916B (en) A kind of video recording method and device
CN106657783A (en) Image shooting device and method
CN105898158B (en) A kind of data processing method and electronic equipment

Legal Events

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