WO2019062631A1 - 一种局部动态影像生成方法及装置 - Google Patents

一种局部动态影像生成方法及装置 Download PDF

Info

Publication number
WO2019062631A1
WO2019062631A1 PCT/CN2018/106633 CN2018106633W WO2019062631A1 WO 2019062631 A1 WO2019062631 A1 WO 2019062631A1 CN 2018106633 W CN2018106633 W CN 2018106633W WO 2019062631 A1 WO2019062631 A1 WO 2019062631A1
Authority
WO
WIPO (PCT)
Prior art keywords
video data
frame
target
target video
dynamic
Prior art date
Application number
PCT/CN2018/106633
Other languages
English (en)
French (fr)
Inventor
耿军
朱斌
胡康康
马春阳
李郭
张建毅
Original Assignee
阿里巴巴集团控股有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 阿里巴巴集团控股有限公司 filed Critical 阿里巴巴集团控股有限公司
Publication of WO2019062631A1 publication Critical patent/WO2019062631A1/zh

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/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/90Dynamic range modification of images or parts thereof
    • G06T5/94Dynamic range modification of images or parts thereof based on local image properties, e.g. for local contrast enhancement
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • 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
    • H04N25/00Circuitry of solid-state image sensors [SSIS]; Control thereof
    • H04N25/40Extracting pixel data from image sensors by controlling scanning circuits, e.g. by modifying the number of pixels sampled or to be sampled
    • 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

Definitions

  • the present application relates to the field of image processing technologies, and in particular, to a local motion image generation method and apparatus.
  • the user needs to import the video data into CINEMAGRAPH (the magical micro motion technology in the static photo) software, and then create a local motion image by the following steps: First, the video is divided into two layers, the first One layer is a static frame layer, the second layer is a dynamic frame layer; secondly, the user manually draws a contour area on the first layer; again, the image of the contour area in the first layer static frame is deleted, on the second layer The dynamic frame of the outline area is transparent; finally, the partial motion picture including the two layers is derived.
  • CINEMAGRAPH the magical micro motion technology in the static photo
  • embodiments of the present application provide a local motion image generation method for determining a dynamic region of a subject object by automatically according to a degree of coincidence between body objects of each frame in a sequence frame of the video, and then automatically generating for the subject
  • the dynamic area of the object solves the problem that the user hand animates the outline in the prior art, which is difficult to operate, the contours drawn are not accurate, and the screen is distorted or not coincident.
  • the embodiment of the present application further provides a local motion image generating apparatus to ensure implementation and application of the foregoing method.
  • a partial motion image generation method including:
  • a partial motion image for the target dynamic region is generated based on the target dynamic region determined by the user.
  • the embodiment of the present application further discloses a local motion image generation method, including:
  • a partial motion image for the target dynamic region is generated.
  • An embodiment of the present application further discloses an image processing method, including:
  • the embodiment of the present application further discloses a local motion image generating apparatus, including:
  • a first video acquisition module configured to acquire target video data uploaded by a user
  • a dynamic area analysis module configured to analyze pixel values of each frame of the target video data, and determine at least one dynamic region in the target video data
  • a first target determining module configured to receive, by the user, a target dynamic region from the at least one dynamic region
  • the local image generating module is configured to generate a partial motion image for the target dynamic region based on the target dynamic region determined by the user.
  • the embodiment of the present application further discloses a local motion image generating apparatus, including:
  • a second video acquisition module configured to acquire target video data
  • a dynamic area analysis module configured to analyze pixel values of each frame of the target video data, and determine at least one dynamic region in the target video data
  • a second target determining module configured to determine, from the at least one dynamic region, a target dynamic region to which the target subject object belongs;
  • the local image generating module is configured to generate a partial motion image for the target dynamic region.
  • the embodiment of the present application further discloses an image processing apparatus, including:
  • a second video acquisition module configured to acquire target video data
  • a dynamic area analysis module configured to analyze pixel values of each frame of the target video data, and determine at least one dynamic area in the target video data.
  • the embodiment of the present application further discloses an apparatus, including a processor, a memory, and a computer program stored on the memory and operable on the processor, where the computer program is executed by the processor to implement the following steps Obtaining target video data uploaded by the user; analyzing pixel values of each frame of the target video data, determining at least one dynamic region in the target video data; and determining, by the receiving user, the target dynamic region from the at least one dynamic region Generating a local motion image for the target dynamic region based on the target dynamic region determined by the user.
  • the embodiment of the present application further discloses a computer readable storage medium, where the computer readable storage medium stores a computer program, and when the computer program is executed by the processor, the following steps are performed: acquiring target video data uploaded by a user; Performing analysis on the pixel values of each frame of the target video data to determine at least one dynamic region in the target video data; the receiving user determining the target dynamic region from the at least one dynamic region; generating a target based on the target dynamic region determined by the user a local motion image of the target dynamic region.
  • the embodiment of the present application further discloses an apparatus, including a processor, a memory, and a computer program stored on the memory and operable on the processor, where the computer program is executed by the processor to implement the following steps Obtaining target video data; analyzing pixel values of each frame of the target video data, determining at least one dynamic region in the target video data; determining, from the at least one dynamic region, target dynamics to which the target subject object belongs a region; generating a local motion image for the target dynamic region.
  • the embodiment of the present application further discloses a computer readable storage medium, where the computer readable storage medium stores a computer program, and when the computer program is executed by the processor, the following steps are performed: acquiring target video data; and targeting the target video And analyzing pixel values of each frame of the data to determine at least one dynamic region in the target video data; determining, from the at least one dynamic region, a target dynamic region to which the target subject object belongs; generating a local portion for the target dynamic region Motion picture.
  • the embodiment of the present application further discloses an apparatus, including a processor, a memory, and a computer program stored on the memory and operable on the processor, where the computer program is executed by the processor to implement the following steps Obtaining target video data; analyzing pixel values of each frame of the target video data to determine at least one dynamic region in the target video data.
  • the embodiment of the present application further discloses a computer readable storage medium, where the computer readable storage medium stores a computer program, and when the computer program is executed by the processor, the following steps are performed: acquiring target video data; and targeting the target video The pixel values of each frame of the data are analyzed to determine at least one dynamic region in the target video data.
  • the embodiment of the present application intelligently determines at least one dynamic region in the target video data by analyzing pixel values of each frame of the target video data, and then automatically generates a target dynamic region for at least one dynamic region. a local motion image of the target dynamic region.
  • the automatic recognition of the dynamic interval is realized to generate the local motion image, thereby reducing the user operation; since the dynamic region is the region in which the subject object moves in the video, the accuracy of the dynamic region selection of the subject object can be improved, and the labor and time costs are reduced;
  • the automatic recognition of the dynamic area by the system avoids the situation that it is difficult to identify the subject object that is not clear by the human eye recognition, and the separation of the main object of the video is required to be low, thereby reducing the demand for the video material.
  • FIG. 1 is a flow chart showing the steps of an embodiment of a partial motion image generating method according to the present application
  • 1A is an example of a local dynamic image generation system architecture of the present application
  • 1B is an example of a dynamic area contour of the present application
  • FIG. 2 is a flow chart of steps of another embodiment of a partial motion picture generation method according to the present application.
  • FIG. 3 is a flow chart showing the steps of another embodiment of the image processing method of the present application.
  • FIG. 4 is a structural block diagram of an embodiment of a partial motion image generating apparatus of the present application.
  • FIG. 5 is a structural block diagram of another embodiment of a partial motion picture generating apparatus according to the present application.
  • FIG. 6 is a structural block diagram of an embodiment of an image processing apparatus of the present application.
  • FIG. 7 is a schematic structural diagram of hardware of a device according to another embodiment of the present disclosure.
  • Local motion image is a combination of dynamic photography and still image. In general, it is a fixed way of shooting the camera, and then the captured video is processed to retain the dynamic state of the subject object that needs to be moved, while the other part of the subject remains stationary. For example, a fixed camera captures a video, including A, B, and C. Three people are beckoning, and if you only want the beating action of performance A, you can fix a certain frame of the video as the background. Keep the beating action of character A. At this time, the local motion picture shows that other people are not moving, and A is beckoning.
  • the embodiment of the present application can automatically analyze the video material, determine the dynamic region where the subject object is located, and then intelligently generate the local motion image of the target dynamic region.
  • FIG. 1 is a flow chart showing the steps of an embodiment of a method for generating a partial motion image of the present application, which may specifically include:
  • Step 101 Obtain target video data uploaded by a user.
  • the user can obtain the target video data in various ways, such as using a mobile phone to capture a video, a video camera to capture a video, copying a video from another user's terminal, and downloading a video from the network. It is limited.
  • FIG. 1A an example of a partial motion image generation architecture of an embodiment of the present application is shown. It includes a server 20 and a client 10.
  • the embodiment of the present application may adopt a client+server architecture.
  • the user can upload the target video data to the server in the client, and the server performs subsequent processing on the video data and then returns to the client.
  • the target video data of the user may be locally received by the client, and the target video data may be subsequently processed locally by the client.
  • Step 102 Perform analysis on pixel values of each frame of the target video data to determine at least one dynamic region in the target video data.
  • the pixel values of each frame of the target video data may be intelligently analyzed, so that at least the dynamic region in the target video data may be determined. Then provide the user with the choice.
  • a dynamic area that can be identified can be determined and then provided to the user for selection.
  • the server analyzes the pixel values of each frame of the target video data, and after determining at least one dynamic region in the target video data, the contour of the dynamic region may be marked; then the dynamic region contour is marked.
  • the image is returned to the client for display.
  • the user can select one or more dynamic regions based on the outline of the marker on the client side.
  • the target video data may be a video material that selects a fixed background
  • the video material of the fixed background may be a video material obtained by a fixed lens, and may also be a material obtained by other methods.
  • the example does not limit it.
  • step 102 includes:
  • Sub-step A11 converting the target video data into a sequence frame
  • the video conversion function may be first called to convert the target video into a sequence frame, such as VideoToImage().
  • a sequence frame such as VideoToImage().
  • the specific video conversion function may be different in different systems, and the embodiment of the present application does not limit the same.
  • the images are sorted by play time.
  • Sub-step A12 determining at least one dynamic region in the target video data according to a degree of coincidence between pixel blocks belonging to different pixel positions in each frame image.
  • each frame in the sequence frame has little difference between the pixel value before the movement and the pixel value after the movement.
  • the process of moving the subject object in the video can be understood as the pixel value of each pixel position in the pixel block in which it is moved, corresponding to the pixel value of each pixel position in the moved pixel block.
  • the embodiment of the present application can determine the dynamic region based on the degree of coincidence between the pixel blocks at different pixel positions. After the dynamic area is determined, the body object wrapped in the dynamic area is also determined.
  • the shoe occupies a block of pixels consisting of 1000 pixels, in the pixel block of the area A1 at the first frame. After the shoe is moved, it is displayed in the pixel block of the area A2 at the next frame. Then the value of 1000 pixel points in the pixel block of the area A1 and the value of 1000 pixel points in the area A2 pixel block are substantially identical.
  • the pixel values of the same block of pixels in different frames may not be exactly the same, because as the light changes, There may be some pixels in different pixel blocks whose values change.
  • the coincidence degree of each pixel of two pixel blocks reaches a certain value, it can be considered that the two regions are the same object moving at different positions.
  • a dynamic region can be determined based on the pixel block.
  • the dynamic region can be determined by the overlapping of the pixel blocks, and after the dynamic region is determined, the picture object in the wrapped region is the subject object.
  • step 102 includes:
  • Sub-step A21 converting the target video data into a sequence frame
  • Sub-step A22 for each pixel position in the target video data, determining a recyclable pixel position according to a degree of change of a pixel value of the pixel position in each frame;
  • the resolution ratio of the target video data is 800*600
  • the resolution of each frame is also 800*600
  • the pixel value of the same pixel position changes during the video playback according to the change of the frame.
  • the embodiment of the present application can divide the pixel position. For example, if the image does not change, the pixel value of the pixel position is the same, and the pixel position is static, and the moving object in the video is in motion. It may cause a change in the pixel position to which it moves, and the pixel position may be divided into recyclable pixel positions.
  • the pixel positions can be divided into three categories: static pixel position, non-recyclable pixel position, and recyclable pixel position:
  • the position of the still pixel is from the first frame of the frame sequence to the end of the last frame, and the pixel value of the pixel position does not change.
  • the position of the still pixel can be understood as the position of the still image in the video, so the pixel value of the pixel position does not change. .
  • the non-recyclable pixel position is from the first frame of the frame sequence to the end of the last frame, and its pixel value is always increasing or decreasing.
  • the position of the recyclable pixel is from the first frame to the end of the last frame, and the pixel value thereof is increased or decreased.
  • the passing pixel position By counting the position of the pixel passing by the moving object in the video, the passing pixel position causes the value of the pixel position to be both increased and decreased, so that there may be both an increase and a decrease.
  • the pixel position acts as a recyclable position so that the dynamic region can be determined from the recyclable position.
  • an upper limit of the pixel value increase and a lower limit of the pixel value decrease may be set, for example, within 10 pixel values, and 10 pixels are reduced. If the change is too large, it may be an object that was added during the shooting, which may be inaccurately identified. It should be noted that the values of the foregoing upper and lower limits may be set according to actual requirements, and are not limited in the embodiment of the present application.
  • 1, 2 can be combined into one class, and the pixel position in the third point is mainly identified.
  • Sub-step A23 determining at least one dynamic region in the target video data based on a region in which each of the recyclable pixel locations is connected.
  • the moving object in the video will cause a change in the value of the pixel position through which it passes, and then each recyclable pixel position is connected to the obtained region, including each dynamic region, so that each can be In the region where the cyclic pixel position is connected, at least one dynamic region in the target video data is determined.
  • the foregoing dynamic area has a time dimension attribute and a spatial dimension attribute, and may also be understood that the dynamic area includes a pixel location area, and a start frame and a loop duration of the pixel location area.
  • the pixel location area is the area in which the subject object moves throughout the video.
  • the loop duration may be the time between the start frame and the end frame of the main object when the frame is marked by the play time, or may be the sequence number of the start frame when the number is played in the play order. The number of frames of the end frame.
  • the sub-step A23 includes:
  • Sub-step A231 obtaining a time consistency parameter and a spatial consistency parameter of the recyclable pixel position
  • the time consistency parameter may start from the first frame, and the frame difference of the previous frame from the previous frame may calculate the time consistency of the recyclable pixel position.
  • the difference in frame value such as a pixel value, may of course be other parameters based on pixel values. It should be noted that the time consistency in the embodiment of the present application is a calculation between different frames of the same recyclable pixel position.
  • each recyclable pixel location A its spatial consistency parameter can be calculated based on the recyclable pixel location and its adjacent recyclable pixel locations.
  • the spatial parameters of the frame may be calculated for each frame of the recyclable pixel position A and its adjacent recyclable pixel position, and then the spatial consistency of the recyclable pixel position is calculated based on the spatial parameters of each frame.
  • Sub-step A232 determining a start frame and a cycle duration of each recyclable pixel position according to a time consistency parameter and a spatial consistency parameter of each recyclable pixel position;
  • the graph is cut into an algorithm to calculate the starting frame and the loop duration of each recyclable pixel position.
  • the graph cutting algorithm is not limited, and the time consistency parameter and the spatial consistency parameter may be used as one of the input parameters.
  • Sub-step A233 selecting, from among the areas connected by the respective recyclable pixel positions, an area that meets the connected domain condition as a pixel location area of the dynamic area;
  • the reproducible pixel position is determined by the foregoing steps, and noise may be present in the recyclable pixel position.
  • the embodiment of the present application will be from the region wrapped by each recyclable pixel position. An area that meets the condition of the connected domain is selected as the pixel location area, and the pixel location area is used as a spatial dimension attribute of the dynamic area.
  • the connected domain is an area that can be understood as surrounded by a line.
  • the corresponding connected domain conditions can be set according to the requirements of Gaussian smoothing, hole filling and morphological analysis.
  • the connected domain condition is as follows: the connected domain whose area is smaller than the area threshold is removed. It should be noted that the area threshold may be set according to actual requirements, which is not limited in the embodiment of the present application.
  • the video image may be binarized into a grayscale image according to the position of the recyclable pixel and other pixel positions than the position of the recyclable pixel, such as the aforementioned 800*600 resolution video, which can be recycled pixels.
  • the position gray value can be set to 255, and other pixel positions than the recyclable pixel position can be set to 0, thereby generating a grayscale image.
  • Sub-step A234 determining a start frame and a cycle duration of the dynamic region based on a start frame and a cycle duration of each pixel position in each pixel location region.
  • each of the recyclable pixel positions in the foregoing step calculates a start frame and a loop duration
  • a possible start frame between each recyclable pixel position may be Inconsistent, the loop duration may also be inconsistent, then one of the earliest start frames may be selected as the start frame of the dynamic region based on the start frame of each recyclable pixel position, and then one of the latest ones corresponding to each recyclable pixel position is selected.
  • the cycle time of the frame is used as the cycle time of the dynamic region, so that the start frame and the cycle duration can be used as the time dimension attribute of the dynamic region.
  • the loop position area A includes: a recyclable pixel position 1, a recyclable pixel position 2, a loopable pixel position 10.
  • the start frame of the recyclable pixel position 1 is 2, and the loop duration is 40 frames.
  • the start frame of the recyclable pixel positions 2-9 is 3, and the loop duration is 41 frames.
  • the startable frame of the recyclable pixel position 10 is 4, and the loop duration is 50 frames.
  • the start frame can be selected as 2 because the start frame 2 is the oldest.
  • the cycle length can be calculated by using a corresponding calculation manner, which is not limited in the embodiment of the present application.
  • Step 103 The receiving user determines a target dynamic area from the at least one dynamic area.
  • the one or more dynamic regions can be sent to the user for selection, and the dynamic region that the user needs, the local dynamic image is generated based on the dynamic region that is needed. .
  • the server 20 can draw contours for each dynamic region, and then select a frame image from the video, mark the contour, and return it to the client 10 for display.
  • the image of the dynamic region contour may select any frame image including the loop region, and then add a dynamic region contour on the frame image, which is not limited in the embodiment of the present application.
  • the system automatically recognizes the dynamic region of the subject object, which may identify multiple dynamic regions, multiple subject objects may be involved.
  • the embodiment of the present application can identify all dynamic regions that can be identified. For the user, it may not be necessary for all the main objects to be dynamically displayed. Therefore, after identifying all the dynamic areas, the embodiment of the present application marks the dynamic area contour, and then returns the image marked with the dynamic area contour to the user. For example, Figure 1B, there are two dynamic area outlines for the user to select.
  • the dynamic region contour can be added by the above-mentioned binarization method, and the image is converted into a grayscale image, the loopable pixel position is set to 255, the other pixel positions are set to 0, and then the connected domain of 255 wrapping is selected. And then determine the pixel location of the edge of the Unicom domain. After selecting the aforementioned one-frame image, a red line is added to the pixel position of the edge of the record to obtain a dynamic area outline.
  • the user can then select one or more dynamic areas in the client 10 as the target dynamic area, and the client uploads the target dynamic area selected by the user to the server.
  • the client when the client performs local video processing on the client, the client can directly display the at least one dynamic area, and the user can directly select the target dynamic area locally in the client.
  • Step 104 Generate a partial motion image for the target dynamic region based on the target dynamic region determined by the user.
  • a partial motion image for the target dynamic region may be generated based on the target dynamic region.
  • all the target dynamic regions selected by the user may generate a partial motion image, and the dynamic images of all the target dynamic regions are displayed in the local motion image. It is also possible to generate a partial motion image for each target dynamic region selected by the user, and each partial motion image displays a dynamic image of the target dynamic region.
  • each target dynamic region selected by the user may generate a partial motion image for each target dynamic region selected by the user, and each partial motion image displays a dynamic image of the target dynamic region.
  • step 104 includes:
  • Sub-step 1041 determining a sub-sequence frame corresponding to the target dynamic region
  • the start frame and the loop duration are calculated, and then the frame sequence of the video data can be determined to generate local dynamics according to the start frame and the loop duration.
  • Subsequence frame of the image when there are multiple loop intervals, since the start frame and the loop duration of each loop section are different, respectively, the start frame and the loop duration including the plurality of loop sections may be selected.
  • sub-step 1041 includes:
  • Step A31 Determine a sub-sequence frame of the target dynamic area according to a start frame and a cycle duration of the target dynamic area.
  • each dynamic region is the motion region of a shoe.
  • the cycle time is 50 frames
  • the starting frame of the dynamic area B corresponding to the other shoe is 12, and the cycle duration is 52.
  • the starting frame of the local motion picture can be set to 10 and the cycle time is 54. Then at this time, the sub-sequence frame can be obtained 10-64 frames.
  • the sub-sequence frames can be obtained according to the corresponding start frame and cycle duration respectively.
  • Sub-step 1042 replacing, in the sub-sequence frame, a background image of a subsequent frame after the start frame with a background image of the start frame; the background image is outside the target dynamic region in each frame image Image;
  • the 10th frame is used as the start frame, and the background outside the dynamic area outline of the 10th frame is a still image. Then the 10th frame is used as the first frame of the new partial motion picture.
  • the background outside the dynamic region outline region of the 11th frame of the target video data is replaced with the background outside the dynamic region outline of the 10th frame, and the background of the replaced image is identical to the 10th frame, and then the replaced image is taken as The first frame of the new partial motion picture.
  • the processing of other frames is analogous, and it is known that the background of the 64th frame of the target video data is replaced as the 55th frame of the new partial motion picture.
  • Sub-step 1043 generating a partial motion image for the target dynamic region based on the start frame and subsequent frames in which the background image is replaced.
  • a partial motion picture of two shoes can be generated by sequentially combining the first frame corresponding to the new partial motion image with 55 frames.
  • the 55-frame image may also be used to generate a partial motion image in a gif (Graphics Interchange Format) format.
  • the specific format of the local dynamic image is not limited in the embodiment of the present application.
  • the corresponding sub-sequence frames can respectively generate a partial motion image in the above manner.
  • the embodiments of the present application do not limit them.
  • the user can select to export the partial motion image, or click the share button to share the partial motion image to an application, and the user can also upload to the page.
  • the embodiments of the present application do not limit them.
  • the embodiment of the present application intelligently determines at least one dynamic region in the target video data by analyzing pixel values of each frame of the target video data, and then automatically generates a target dynamic region for at least one dynamic region. a local motion image of the target dynamic region.
  • the automatic recognition of the dynamic interval is realized to generate the local motion image, thereby reducing the user operation; since the dynamic region is the region in which the subject object moves in the video, the accuracy of the dynamic region selection of the subject object can be improved, and the labor and time costs are reduced;
  • the automatic recognition of the dynamic area by the system avoids the situation that it is difficult to identify the subject object that is not clear by the human eye recognition, and the separation of the main object of the video is required to be low, thereby reducing the demand for the video material.
  • the embodiment of the present application can automatically identify multiple dynamic regions in the target video data, and then select for the user, and then automatically generate the required local motion image according to the user's needs.
  • FIG. 2 a flow chart of steps of another embodiment of a partial motion picture generation method of the present application is shown, including:
  • Step 201 Acquire target video data.
  • video data can be obtained in various manners.
  • the orientation server is analyzed for video data
  • the user can upload his target video data through the client.
  • the user can import their target video data into their device.
  • the specific target video data acquisition manner is not limited in the embodiment of the present application.
  • Step 202 Perform analysis on pixel values of each frame of the target video data to determine at least one dynamic region in the target video data.
  • step 102 of the previous embodiment is similar to step 102 of the previous embodiment and will not be described in detail herein.
  • step 203 includes:
  • Sub-step B11 converting the target video data into a sequence frame
  • Sub-step B12 determining at least one dynamic region in the target video data according to a degree of coincidence between pixel blocks belonging to different pixel positions in each frame image.
  • the sub-steps B11-B12 refer to the aforementioned embodiment example steps A11-A12 and will not be described in detail herein.
  • step 203 includes:
  • Sub-step B21 converting the target video data into a sequence frame
  • Sub-step B22 for each pixel position in the target video data, determining a recyclable pixel position according to a degree of change of a pixel value of the pixel position in each frame;
  • Sub-step B23 determining at least one dynamic region in the target video data based on a region in which each of the recyclable pixel locations is connected.
  • Sub-steps B21-B23 refer to the aforementioned embodiment example steps A21-A23 and will not be described in detail herein.
  • Step 203 Determine, from the at least one dynamic region, a target dynamic region to which the target subject object belongs;
  • the at least one dynamic region may be marked with an outline, and then selected by the user, and then the target dynamic region is determined according to the user's selection.
  • the image recognition method it is also possible to identify the subject object in the dynamic area by the image recognition method, whether it is the target subject object required by the user, and if so, determine that the dynamic area is the target dynamic area. For example, the user can pre-select the word "shoes”, and then the system can obtain the characteristics of the "shoes" from the database, and then identify whether there are some features in the images of the respective dynamic regions, and if so, select the dynamic regions as Target dynamic area.
  • Step 204 Generate a partial motion image for the target dynamic region.
  • step 204 of the previous embodiment is similar to step 204 of the previous embodiment and will not be described in detail herein.
  • step 204 includes:
  • Sub-step 2041 determining a sub-sequence frame corresponding to the target dynamic region
  • Sub-step 2042 replacing, in the sub-sequence frame, a background image of a subsequent frame after the start frame with a background image of the start frame; the background image is outside the target dynamic region in each frame image Image;
  • Sub-step 2043 generating a partial motion image for the target dynamic region based on the start frame and subsequent frames in which the background image is replaced.
  • Sub-steps 2041-2043 refer to sub-steps 1041-1043 of the previous embodiment, and are not described in detail herein.
  • the embodiment of the present application intelligently determines at least one dynamic region in the target video data by analyzing pixel values of each frame of the target video data, and then automatically generates a target dynamic region for at least one dynamic region. a local motion image of the target dynamic region.
  • the automatic recognition of the dynamic interval is realized to generate the local motion image, thereby reducing the user operation; since the dynamic region is the region in which the subject object moves in the video, the accuracy of the dynamic region selection of the subject object can be improved, and the labor and time costs are reduced;
  • the automatic recognition of the dynamic area by the system avoids the situation that it is difficult to identify the subject object that is not clear by the human eye recognition, and the separation of the main object of the video is required to be low, thereby reducing the demand for the video material.
  • the embodiment of the present application can automatically identify the dynamic area of the subject object required by the user, and further reduce the labor and time cost of the user.
  • FIG. 3 a flow chart of steps of an embodiment of an image processing method of the present application is shown, including:
  • Step 301 Acquire target video data.
  • This step refers to the description of the foregoing step 101 or 201, and will not be described in detail herein.
  • Step 302 Perform analysis on pixel values of each frame of the target video data to determine at least one dynamic region in the target video data.
  • This step refers to the description of the foregoing step 102, and will not be described in detail herein.
  • step 302 includes:
  • Sub-step C11 converting the target video data into a sequence frame
  • Sub-step C12 determining at least one dynamic region in the target video data according to a degree of coincidence between pixel blocks belonging to different pixel positions in each frame image.
  • Sub-steps C11-C12 refer to the aforementioned embodiment example steps A11-A12 and will not be described in detail herein.
  • step 302 includes:
  • Sub-step C21 converting the target video data into a sequence frame
  • Sub-step C22 for each pixel position in the target video data, determining a recyclable pixel position according to a degree of change of a pixel value of the pixel position in each frame;
  • Sub-step C23 determining at least one dynamic region in the target video data based on a region in which each of the recyclable pixel locations is connected.
  • sub-step C23 comprises:
  • Sub-step C231 acquiring a time consistency parameter and a spatial consistency parameter of the recyclable pixel position
  • Sub-step C232 determining a start frame and a cycle duration of each recyclable pixel position according to a time consistency parameter and a spatial consistency parameter of each recyclable pixel position;
  • Sub-step C233 selecting, from among the areas connected by the respective recyclable pixel positions, an area that meets the connected domain condition as a pixel location area of the dynamic area;
  • Sub-step C234 determining a start frame and a loop duration of the dynamic region based on a start frame and a loop duration of each pixel position in each pixel location region.
  • Sub-steps C231-C234 refer to the aforementioned embodiment example steps A231-A234 and will not be described in detail herein.
  • the embodiment of the present application intelligently determines at least one dynamic region in the target video data by analyzing pixel values of each frame of the target video data, and then reduces the user's hand for the target dynamic region in the at least one dynamic region.
  • the process of animating contours improves the accuracy of dynamic regions, reduces manpower and time costs, and automatically recognizes dynamic regions through the system, avoiding the difficulty of recognizing less clear subject objects by human eye recognition, and separating the subject matter of the video. Lower requirements, which reduces the need for video material.
  • FIG. 4 a structural block diagram of an embodiment of a partial motion image generating apparatus of the present application is shown, which may specifically include the following modules:
  • the first video obtaining module 401 is configured to acquire target video data uploaded by the user;
  • the dynamic area analysis module 402 is configured to analyze pixel values of each frame of the target video data, and determine at least one dynamic area in the target video data;
  • a first target determining module 403, configured to receive, by the user, a target dynamic area from the at least one dynamic area
  • the partial image generating module 404 is configured to generate a partial motion image for the target dynamic region based on the target dynamic region determined by the user.
  • the dynamic area analysis module comprises:
  • a video conversion sub-module for converting target video data into a sequence frame
  • the first dynamic area analysis sub-module is configured to determine at least one dynamic area in the target video data according to a degree of coincidence between pixel blocks belonging to different pixel positions in each frame image.
  • the dynamic area analysis module comprises:
  • a video conversion sub-module for converting target video data into a sequence frame
  • a recyclable pixel position determining sub-module configured to determine a recyclable pixel position according to a degree of change of a pixel value of the pixel position in each frame for each pixel position in the target video data
  • a second dynamic area analysis submodule configured to determine at least one dynamic region in the target video data based on an area connected by each recyclable pixel position.
  • the second dynamic area analysis submodule comprises:
  • a consistency parameter obtaining unit configured to acquire a time consistency parameter and a spatial consistency parameter of the recyclable pixel position
  • a pixel parameter determining unit configured to determine a starting frame and a cycle duration of each recyclable pixel position according to a time consistency parameter and a spatial consistency parameter of each recyclable pixel position;
  • a pixel location area determining unit configured to select, as a pixel location area of the dynamic area, an area that meets a connected domain condition from a region that is connected to each of the recyclable pixel positions;
  • a frame parameter unit configured to determine a start frame and a cycle duration of the dynamic region based on a start frame and a cycle duration of each pixel location in each pixel location region.
  • the partial image generation module comprises:
  • a subsequence frame determining submodule configured to determine a subsequence frame corresponding to the target dynamic region
  • a replacement submodule configured to replace, in the subsequence frame, a background image of a subsequent frame subsequent to the start frame with a background image of the start frame; the background image is the target dynamic region in each frame image
  • the first generation sub-module generates a partial motion image for the target dynamic region based on the start frame and a subsequent frame in which the background image is replaced.
  • the sub-sequence frame determining sub-module includes:
  • the sub-sequence frame determining unit determines a sub-sequence frame of the target dynamic region according to a start frame and a cycle duration of the target dynamic region.
  • the embodiment of the present application intelligently determines at least one dynamic region in the target video data by analyzing pixel values of each frame of the target video data, and then automatically generates a target dynamic region for at least one dynamic region. a local motion image of the target dynamic region.
  • the automatic recognition of the dynamic interval is realized to generate the local motion image, thereby reducing the user operation; since the dynamic region is the region in which the subject object moves in the video, the accuracy of the dynamic region selection of the subject object can be improved, and the labor and time costs are reduced;
  • the automatic recognition of the dynamic area by the system avoids the situation that it is difficult to identify the subject object that is not clear by the human eye recognition, and the separation of the main object of the video is required to be low, thereby reducing the demand for the video material.
  • the embodiment of the present application can automatically identify multiple dynamic regions in the target video data, and then select for the user, and then automatically generate the required local motion image according to the user's needs.
  • FIG. 5 a structural block diagram of another embodiment of a partial motion picture generating apparatus of the present application is shown, which may specifically include the following modules:
  • a second video acquisition module 501 configured to acquire target video data
  • the dynamic area analysis module 502 is configured to analyze pixel values of each frame of the target video data, and determine at least one dynamic area in the target video data;
  • a second target determining module 503, configured to determine, from the at least one dynamic region, a target dynamic region to which the target subject object belongs;
  • the partial image generating module 504 is configured to generate a partial motion image for the target dynamic region.
  • the dynamic area analysis module comprises:
  • a video conversion sub-module for converting target video data into a sequence frame
  • the first dynamic area analysis sub-module is configured to determine at least one dynamic area in the target video data according to a degree of coincidence between pixel blocks belonging to different pixel positions in each frame image.
  • the dynamic area analysis module comprises:
  • a video conversion sub-module for converting target video data into a sequence frame
  • a recyclable pixel position determining sub-module configured to determine a recyclable pixel position according to a degree of change of a pixel value of the pixel position in each frame for each pixel position in the target video data
  • a second dynamic area analysis submodule configured to determine at least one dynamic region in the target video data based on an area connected by each recyclable pixel position.
  • the partial image generation module comprises:
  • a subsequence frame determining submodule configured to determine a subsequence frame corresponding to the target dynamic region
  • a replacement submodule configured to replace, in the subsequence frame, a background image of a subsequent frame subsequent to the start frame with a background image of the start frame; the background image is the target dynamic region in each frame image
  • the first generation sub-module generates a partial motion image for the target dynamic region based on the start frame and a subsequent frame in which the background image is replaced.
  • the embodiment of the present application intelligently determines at least one dynamic region in the target video data by analyzing pixel values of each frame of the target video data, and then automatically generates a target dynamic region for at least one dynamic region. a local motion image of the target dynamic region.
  • the automatic recognition of the dynamic interval is realized to generate the local motion image, thereby reducing the user operation; since the dynamic region is the region in which the subject object moves in the video, the accuracy of the dynamic region selection of the subject object can be improved, and the labor and time costs are reduced;
  • the automatic recognition of the dynamic area by the system avoids the situation that it is difficult to identify the subject object that is not clear by the human eye recognition, and the separation of the main object of the video is required to be low, thereby reducing the demand for the video material.
  • the embodiment of the present application can automatically identify the dynamic area of the subject object required by the user, and further reduce the labor and time cost of the user.
  • FIG. 6 a structural block diagram of an embodiment of an image processing apparatus of the present application is shown, which may specifically include the following modules:
  • a second video acquisition module 601, configured to acquire target video data
  • the dynamic area analysis module 602 is configured to analyze pixel values of each frame of the target video data to determine at least one dynamic area in the target video data.
  • the dynamic area analysis module comprises:
  • a video conversion sub-module for converting target video data into a sequence frame
  • the first dynamic area analysis sub-module is configured to determine at least one dynamic area in the target video data according to a degree of coincidence between pixel blocks belonging to different pixel positions in each frame image.
  • the dynamic area analysis module comprises:
  • a video conversion sub-module for converting target video data into a sequence frame
  • a recyclable pixel position determining sub-module configured to determine a recyclable pixel position according to a degree of change of a pixel value of the pixel position in each frame for each pixel position in the target video data
  • a second dynamic area analysis submodule configured to determine at least one dynamic region in the target video data based on an area connected by each recyclable pixel position.
  • the second dynamic area analysis submodule comprises:
  • a consistency parameter obtaining unit configured to acquire a time consistency parameter and a spatial consistency parameter of the recyclable pixel position
  • a pixel parameter determining unit configured to determine a starting frame and a cycle duration of each recyclable pixel position according to a time consistency parameter and a spatial consistency parameter of each recyclable pixel position;
  • a pixel location area determining unit configured to select, as a pixel location area of the dynamic area, an area that meets a connected domain condition from a region that is connected to each of the recyclable pixel positions;
  • a frame parameter unit configured to determine a start frame and a cycle duration of the dynamic region based on a start frame and a cycle duration of each pixel location in each pixel location region.
  • the embodiment of the present application intelligently determines at least one dynamic region in the target video data by analyzing pixel values of each frame of the target video data, and then reduces the user's hand for the target dynamic region in the at least one dynamic region.
  • the process of animating contours improves the accuracy of dynamic regions, reduces manpower and time costs, and automatically recognizes dynamic regions through the system, avoiding the difficulty of recognizing less clear subject objects by human eye recognition, and separating the subject matter of the video. Lower requirements, which reduces the need for video material.
  • the embodiment of the present application further provides a non-volatile readable storage medium, where the storage medium stores one or more programs, and when the one or more modules are applied to the device, the device may be executed.
  • the instructions of each method step in the embodiment of the present application is not limited to, but not limited to, but not limited to, but not limited to, but not limited to, but not limited to, but not limited to, but not limited to, but not limited to, but not limited to the storage medium.
  • FIG. 7 is a schematic structural diagram of hardware of a device according to another embodiment of the present disclosure. As shown in FIG. 7, the apparatus of this embodiment includes a processor 81 and a memory 82.
  • the processor 81 executes the computer program code stored in the memory 82 to implement the partial motion image generating method of FIGS. 1 to 4 in the above embodiment.
  • Memory 82 is configured to store various types of data to support operation at the device. Examples of such data include instructions for any application or method operating on the device, such as messages, pictures, videos, and the like.
  • the memory 82 may include a random access memory (RAM), and may also include a non-volatile memory such as at least one disk storage.
  • processor 81 is disposed in processing component 80.
  • the device may also include a communication component 83, a power component 84, a multimedia component 85, an audio component 86, an input/output interface 87, and/or a sensor component 88.
  • the components and the like included in the device are set according to actual requirements, which is not limited in this embodiment.
  • Processing component 80 typically controls the overall operation of the device.
  • Processing component 80 may include one or more processors 81 to execute instructions to perform all or part of the steps of the methods of Figures 1-4 above.
  • processing component 80 can include one or more modules to facilitate interaction between component 80 and other components.
  • processing component 80 can include a multimedia module to facilitate interaction between multimedia component 85 and processing component 80.
  • Power component 84 provides power to various components of the device.
  • Power component 84 can include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the device.
  • the multimedia component 85 includes a display screen between the device and the user that provides an output interface.
  • the display screen can include a liquid crystal display (LCD) and a touch panel (TP). If the display includes a touch panel, the display can be implemented as a touch screen to receive input signals from the user.
  • the touch panel includes one or more touch sensors to sense touches, slides, and gestures on the touch panel. The touch sensor may sense not only the boundary of the touch or sliding action, but also the duration and pressure associated with the touch or slide operation.
  • the audio component 86 is configured to output and/or input an audio signal.
  • audio component 86 includes a microphone (MIC) that is configured to receive an external audio signal when the device is in an operational mode, such as a voice recognition mode.
  • the received audio signal may be further stored in memory 82 or transmitted via communication component 83.
  • audio component 86 also includes a speaker for outputting an audio signal.
  • the input/output interface 87 provides an interface between the processing component 80 and the peripheral interface module, which may be a click wheel, a button, or the like. These buttons may include, but are not limited to, a volume button, a start button, and a lock button.
  • Sensor assembly 88 includes one or more sensors for providing various aspects of state assessment for the device.
  • sensor component 88 can detect the on/off state of the device, the relative positioning of the components, and the presence or absence of user contact with the device.
  • Sensor assembly 88 can include a proximity sensor configured to detect the presence of nearby objects without any physical contact, including detecting the distance between the user and the device.
  • the sensor assembly 88 can also include a camera or the like.
  • Communication component 83 is configured to facilitate wired or wireless communication between the device and other devices.
  • the device can access a wireless network based on communication standards such as WiFi, 2G or 3G, or a combination thereof.
  • the device may include a SIM card slot for inserting the SIM card so that the device can log into the GPRS network to establish communication with the server via the Internet.
  • the communication component 83, the audio component 86, and the input/output interface 87 and the sensor component 88 involved in the embodiment of FIG. 7 can be implemented as an input device.
  • the processor is configured to acquire target video data uploaded by a user, analyze pixel values of each frame of the target video data, and determine at least one dynamic in the target video data.
  • a receiving user determines a target dynamic area from the at least one dynamic area; generating a partial dynamic image for the target dynamic area based on the target dynamic area determined by the user; or acquiring target video data; and the target video And analyzing pixel values of each frame of the data to determine at least one dynamic region in the target video data; determining, from the at least one dynamic region, a target dynamic region to which the target subject object belongs; generating a local portion for the target dynamic region a dynamic image; or for acquiring target video data; analyzing pixel values of each frame of the target video data to determine at least one dynamic region in the target video data.
  • the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.
  • embodiments of the embodiments of the present application can be provided as a method and apparatus, or a computer program product. Therefore, the embodiments of the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Moreover, embodiments of the present application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • Embodiments of the present application are described with reference to flowchart illustrations and/or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present application. It will be understood that each flow and/or block of the flowchart illustrations and/or FIG.
  • These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing device to produce a machine for the execution of instructions for execution by a processor of a computer or other programmable data processing device.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

本申请实施例提供了一种局部动态影像生成方法及装置,涉及图像处理技术。所述方法包括:获取用户上传的目标视频数据;对所述目标视频数据的各帧的像素值进行分析,确定所述目标视频数据中至少一个动态区域;接收用户从所述至少一个动态区域中确定目标动态区域;基于用户确定的目标动态区域,生成针对所述目标动态区域的局部动态影像。本申请实施例降低了用户操作,提高主体对象的动态区域选取的精准度,降低人力和时间成本;并且,通过***自动识别动态区域,避免了通过人眼识别很难识别不太清晰的主体对象的情况,对视频的主体对象分离要求较低,从而降低对视频素材的需求。

Description

一种局部动态影像生成方法及装置
本申请要求2017年09月30日递交的申请号为201710939457.2、发明名称为“一种局部动态影像生成方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及图像处理技术领域,特别是涉及一种局部动态影像生成方法及装置。
背景技术
随着图像技术的不断发展,出现了一种局部动态影像,即整个影像中只有部分主体对象在运动。
在先技术中,要生成一个局部动态影像,需要用户将视频数据导入CINEMAGRAPH(静态照片中神奇的细微运动技术)软件,然后通过如下步骤创建局部动态影像:首先,将视频分为两层,第一层为静态帧层,第二层为动态帧层;其次,用户手动在第一层上画出一块轮廓区域;再次,将第一层静态帧中的轮廓区域的图像删除,在第二层中透出轮廓区域的动态帧;最后,导出包括该两层构成的局部动态影像。
发明人在应用上述技术的过程中发现,其需要通过用户手动画出一块主体对象的轮廓来标记动态区域,以实现视频的局部动态影像的生成,但是:通过手动画出主体对象的轮廓,操作难度大,容易导致效果不精准,通常将其他非需要的图像元素也划到轮廓中,导致其他非需要的图像元素也发生运动,而如果要效果精准,需要用户使用大量复杂的图片操作,浪费人力和时间成本;再者,由于通过人眼去分辨其需求的主体对象,其主体对象分离非常清晰的视频效果较好,对当主体对象不够清晰的时候,人眼容易导致轮廓不精准,造成画面的扭曲或者不重合。
发明内容
鉴于上述问题,本申请实施例提供一种局部动态影像生成方法,以通过自动根据视频的序列帧中各帧的主体对象之间的重合度,确定主体对象的动态区域,然后自动生成针对该主体对象的动态区域,解决现有技术中用户手动画出轮廓导致操作难度大、画出的轮廓不精准、产生画面扭曲或者不重合的问题。
相应的,本申请实施例还提供了一种局部动态影像生成装置,用以保证上述方法的 实现及应用。
为了解决上述问题,本申请实施例公开了一种局部动态影像生成方法,包括:
获取用户上传的目标视频数据;
对所述目标视频数据的各帧的像素值进行分析,确定所述目标视频数据中至少一个动态区域;
接收用户从所述至少一个动态区域中确定目标动态区域;
基于用户确定的目标动态区域,生成针对所述目标动态区域的局部动态影像。
本申请实施例还公开了一种局部动态影像生成方法,包括:
获取目标视频数据;
对所述目标视频数据的各帧的像素值进行分析,确定所述目标视频数据中至少一个动态区域;
从所述至少一个动态区域中,确定目标主体对象所属的目标动态区域;
生成针对所述目标动态区域的局部动态影像。
本申请实施例还公开了一种图像处理方法,包括:
获取目标视频数据;
对所述目标视频数据的各帧的像素值进行分析,确定所述目标视频数据中至少一个动态区域。
本申请实施例还公开了一种局部动态影像生成装置,包括:
第一视频获取模块,用于获取用户上传的目标视频数据;
动态区域分析模块,用于对所述目标视频数据的各帧的像素值进行分析,确定所述目标视频数据中至少一个动态区域;
第一目标确定模块,用于接收用户从所述至少一个动态区域中确定目标动态区域;
局部影像生成模块,用于基于用户确定的目标动态区域,生成针对所述目标动态区域的局部动态影像。
本申请实施例还公开了一种局部动态影像生成装置,包括:
第二视频获取模块,用于获取目标视频数据;
动态区域分析模块,用于对所述目标视频数据的各帧的像素值进行分析,确定所述目标视频数据中至少一个动态区域;
第二目标确定模块,用于从所述至少一个动态区域中,确定目标主体对象所属的目标动态区域;
局部影像生成模块,用于生成针对所述目标动态区域的局部动态影像。
本申请实施例还公开了一种图像处理装置,包括:
第二视频获取模块,用于获取目标视频数据;
动态区域分析模块,用于对所述目标视频数据的各帧的像素值进行分析,确定所述目标视频数据中至少一个动态区域。
本申请实施例还公开了一种设备,包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现如下步骤:获取用户上传的目标视频数据;对所述目标视频数据的各帧的像素值进行分析,确定所述目标视频数据中至少一个动态区域;接收用户从所述至少一个动态区域中确定目标动态区域;基于用户确定的目标动态区域,生成针对所述目标动态区域的局部动态影像。
本申请实施例还公开了一种计算机可读存储介质,所述计算机可读存储介质上存储计算机程序,所述计算机程序被处理器执行时实现如下步骤:获取用户上传的目标视频数据;对所述目标视频数据的各帧的像素值进行分析,确定所述目标视频数据中至少一个动态区域;接收用户从所述至少一个动态区域中确定目标动态区域;基于用户确定的目标动态区域,生成针对所述目标动态区域的局部动态影像。
本申请实施例还公开了一种设备,包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现如下步骤:获取目标视频数据;对所述目标视频数据的各帧的像素值进行分析,确定所述目标视频数据中至少一个动态区域;从所述至少一个动态区域中,确定目标主体对象所属的目标动态区域;生成针对所述目标动态区域的局部动态影像。
本申请实施例还公开了一种计算机可读存储介质,所述计算机可读存储介质上存储计算机程序,所述计算机程序被处理器执行时实现如下步骤:获取目标视频数据;对所述目标视频数据的各帧的像素值进行分析,确定所述目标视频数据中至少一个动态区域;从所述至少一个动态区域中,确定目标主体对象所属的目标动态区域;生成针对所述目标动态区域的局部动态影像。
本申请实施例还公开了一种设备,包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现如下步骤:获取目标视频数据;对所述目标视频数据的各帧的像素值进行分析,确定所述目标视频数据中至少一个动态区域。
本申请实施例还公开了一种计算机可读存储介质,所述计算机可读存储介质上存储计算机程序,所述计算机程序被处理器执行时实现如下步骤:获取目标视频数据;对所述目标视频数据的各帧的像素值进行分析,确定所述目标视频数据中至少一个动态区域。
本申请实施例包括以下优点:
本申请实施例通过对对所述目标视频数据的各帧的像素值进行分析,智能确定所述目标视频数据中至少一个动态区域,然后对于至少一个动态区域中的目标动态区域,可以自动生成针对所述目标动态区域的局部动态影像。实现了自动化识别动态区间以生成局部动态影像,从而降低了用户操作;由于动态区域是视频中主体对象运动的区域,因此也能提高主体对象的动态区域选取的精准度,降低人力和时间成本;并且,通过***自动识别动态区域,避免了通过人眼识别很难识别不太清晰的主体对象的情况,对视频的主体对象分离要求较低,从而对降低对视频素材的需求。
附图说明
图1是本申请的一种局部动态影像生成方法实施例的步骤流程图;
图1A是本申请的一种局部动态影像生成***架构示例;
图1B是本申请的一种动态区域轮廓示例;
图2是本申请的另一种局部动态影像生成方法实施例的步骤流程图;
图3是本申请的另一种图像处理方法实施例的步骤流程图;
图4是本申请的一种局部动态影像生成装置实施例的结构框图;
图5是本申请的另一种局部动态影像生成装置实施例的结构框图;
图6是本申请的一种图像处理装置实施例的结构框图;
图7为本申请另一实施例提供的设备的硬件结构示意图。
具体实施方式
为使本申请的上述目的、特征和优点能够更加明显易懂,下面结合附图和具体实施方式对本申请作进一步详细的说明。
局部动态影像,是一种动态摄影和静态图片的结合。一般而言,其是摄像头固定的方式进行拍摄,然后对拍摄得到的视频进行处理,保留需要运动的主体对象的动态状态,而其主体对象之外他部分则保持静止。比如采用固定摄像头拍摄了一个视频,其中包括 了A、B、C三个人都在招手,而如果只想让表现A的招手动作,则可以将视频的某一帧图像作为背景固定不变,而保留人物A的招手动作,此时局部动态影像则表现出其他人都是不动的,而A在招手。
本申请实施例可以自动对视频素材进行分析,确定其中的主体对象所在的动态区域,然后可以智能的生成目标动态区域的局部动态影像。
参照图1,其示出了本申请一种局部动态影像生成方法实施例的步骤流程图,具体可以包括:
步骤101,获取用户上传的目标视频数据;
在本申请实施例中,用户可以通过各种途径获取目标视频数据,比如采用手机拍摄视频、摄像机拍摄视频,从其他用户的终端中拷贝视频,从网络上下载视频等方式,本申请实施例不对其加以限定。
用户可以将其获取到的目标视频数据,上传至***中。
结合图1A,其示出了本申请实施例的一种局部动态影像生成架构示例。其包括服务器20、客户端10。本申请实施例可以采用客户端+服务器的架构。用户可以在客户端中将目标视频数据上传至服务器,服务器对视频数据进行后续处理,然后返回客户端。
需要说明的是,本申请实施例中,也可以在客户端本地接收用户的目标视频数据,在客户端本地对目标视频数据进行后续处理。
步骤102,对所述目标视频数据的各帧的像素值进行分析,确定所述目标视频数据中至少一个动态区域;
在本申请实施例中,在接收到用户上传的目标视频数据后,可以对所述目标视频数据的各帧的像素值进行智能化分析,从而可以确定所述目标视频数据中的至少动态区域,然后提供给用户选择。当然在实际应用中,可以确定出能够识别的动态区域,然后提供给用户选择。
结合图1A,服务器在对对所述目标视频数据的各帧的像素值进行分析,确定所述目标视频数据中至少一个动态区域后,可以标记该动态区域的轮廓;然后将标记了动态区域轮廓的图像返回给客户端进行展示。用户可以在客户端根据标记的轮廓对一个或多个动态区域进行选择。
在本申请实施例中,该目标视频数据可以为选择固定背景的视频素材,,该固定背景的视频素材可以为固定镜头拍摄得到的视频素材,当然也可以为其他方式得到的素材,本申请实施例不对其加以限制。
优选的,在本申请另一实施例中,步骤102包括:
子步骤A11,将目标视频数据转换为序列帧;
在本申请实施例中,对于用户上传的目标视频数据,可以首先调用视频转换函数将目标视频转换为序列帧,该视频转换函数比如VideoToImage()。当然,具体的视频转换函数不同***可能不同,本申请实施例不对其加以限制。该序列帧中,图像按播放时间的先后排序。
子步骤A12,根据各帧图像中属于不同像素位置的像素块之间的重合度,确定所述目标视频数据中的至少一个动态区域。
在本申请实施例中,由于前述步骤转换得到了序列帧,而对于序列帧而言其每帧的分辨率是一致的,比如目标视频数据是800*600的分辨率,那么序列帧中每帧图像的分辨率也是800*600。对于一个视频中运动的主体对象而言,该主体对象实际上在每帧图像中是一个像素块,那么该像素块在移动前的像素值和移动后的像素值之间的差别不大。那么主体对象在视频中运动的过程,可以理解为其移动前的所在的像素块中的各像素位置的像素值,对应替换了移动后像素块中各像素位置的像素值。那么本申请实施例可以基不同像素位置的像素块之间的重合度,确定动态区域。动态区域确定后,该动态区域中包裹的主体对象也就确定。
比如如果目标视频数据中有一只鞋在运动,那么这只鞋占用由1000个像素点组成的像素块,在第一帧时在区域A1的像素块中。该鞋移动后,在下一帧时,在区域A2的像素块中显示。那么区域A1的像素块中1000个像素点的值和区域A2像素块中1000个像素点的值基本上是一致的。
那么,通过上述按序将每帧图像中的各个像素块与之后的各帧图像进行匹配,可以确定该鞋在哪些帧中出现,并且移动的像素块所处的像素位置区域有哪些。比如有100帧都有上述鞋的主体对象,而这100帧中鞋出现的区域分别为A1、A2……A100,由于这些区域只是所在帧所指向的像素点位置,那么这100个区域的像素点位置取交集,则得到这个鞋移动的像素位置区域。因此,可以确定该鞋从第1帧到100帧这些帧的时间维度,和该鞋的移动的像素位置区域这一空间维度,从而确定了该鞋所处的动态区域。
当然,在实际应用中,同一个物体在不同的位置,其某些像素可能会发生变化,因此,不同帧中同一个物体所在像素块的像素值可能不完全一致,因为随着光线的变化,不同的像素块中可能会有一些像素点的值发生变化,那么当两个像素块的各个像素点的重合度达到一定数值,则可以认为该两块区域是同一个物体在不同的位置移动的情况, 进而可以基于该像素块确定动态区域。
需要说明的是,本申请实施例中,通过像素块的重合能够确定动态区域,在动态区域确定后,其覆包裹的区域中的图片对象则为主体对象。
可以理解,对于各帧图像中,如果各帧中一个或多个重合的像素块,其出现的像素位置区域一致,比如在800*600分辨率的视频中,各帧中有一个像素块重合,且都在{(0,0),(0,100),(100,0),(100,100)}这个区域,那么可以认为该像素块是一个静态的元素。
优选的,在本申请另一实施例中,步骤102包括:
子步骤A21,将目标视频数据转换为序列帧;
子步骤A22,对于所述目标视频数据中每个像素位置,根据各帧中所述像素位置的像素值的变化程度,确定可循环像素位置;
在本申请实施例中,比如目标视频数据的分别率是800*600,那么每帧的分辨率也是800*600,在视频播放的过程中同一个像素位置的像素值根据帧的变化而变化。那么本申请实施例可以将像素位置进行划分,比如图像没变化的情况下,其像素位置的像素值是一样的,该种像素位置就为静止的,视频中运动的对象,其在运动过程中可能导致其运动到的像素位置产生变化,那么该种像素位置则可以划分为可循环像素位置。
在实际应用中,根据实验得到的效果,可以将像素位置划分为三类:静止像素位置,不可循环像素位置、可循环像素位置:
1、静止像素位置就是从帧序列的第一帧开始到最后一帧结束,该像素位置的像素值不发生变化。
静止像素位置可以理解为视频中静止不动的图像所在的位置,所以其像素位置的像素值不发生变化。。
2、不可循环像素位置就是从帧序列的第一帧开始到最后一帧结束,其像素值是一直增加或者一直减少。
该种情况通过实验数据得知,其基本上不会出现在运动的物体经过的像素位置中。
3、可循环像素位置是从第一帧开始到最后一帧结束,其像素值既存在增加的情况也存在减少的情况。
通过对视频中运动物体经过的像素位置的统计,其经过的像素位置会导致该像素位置的值既存在增加的情况也存在减少的情况,因此可以将既存在增加的情况也存在减少的情况的像素位置作为可循环位置,从而可以从可循环位置中确定动态区域。在本申请 实施例中,可以设定一个像素值增加的上限和像素值减少的下限,比如增加10个像素值之内,减少10个像素。如果变化太大,则可能是在拍摄过程中加入的物体,该种情况可能识别不准确。需要说明的是,上述上、下限的取值可以根据实际需求设定,本申请实施例不对其加以限制。
本申请实施例则根据上述过程,针对每个像素位置在不同帧中的像素值的变化程度,确定其是不是可循环像素位置。
当然,本申请实施例中可以将1、2合并为一类,主要识别第3点中的像素位置。
子步骤A23,基于各可循环像素位置所连通的区域中,确定所述目标视频数据中的至少一个动态区域。
由于可循环像素位置的上述定义,那么视频中运动的物体会导致其经过的像素位置的值产生变化,那么各个可循环像素位置连通后得到区域中,就包括各动态区域,从而可以从各可循环像素位置所连通的区域中,确定所述目标视频数据中的至少一个动态区域。
需要说明的是,在本申请实施例中,前述动态区域具备时间维度属性和空间维度属性,也可以理解为所述动态区域包括像素位置区域,以及所述像素位置区域的起始帧和循环时长,其中该像素位置区域为其中的主体对象在整个视频中运动的区域。该循环时长可以为在以播放时间对各帧进行标记时,主体对象出现的起始帧的时间到结束帧之间的时间,也可以为在以播放顺序进行编号时,起始帧的序号到结束帧的帧数。
优选的,在本申请另一实施例中,所述子步骤A23,包括:
子步骤A231,获取所述可循环像素位置的时间一致性参数和空间一致性参数;
在本申请实施例中,基于可循环像素位置取计算主体对象的动态区域时,首先需要获取可循环像素位置的时间一致性参数和空间一致性参数。
需要说明的是,针对每个可循环像素位置A,其时间一致性参数可以从第一帧开始,以后一帧对前一帧的帧差,计算该可循环像素位置的时间一致性。该帧差比如像素值的差,当然也可以为基于像素值的其他参数。需要说明的是,本申请实施例中时间一致性是针对同一个可循环像素位置不同帧之间的计算。
针对每个可循环像素位置A,其空间一致性参数可以基于该可循环像素位置和其相邻的可循环像素位置进行计算。在实际应用中,可以先针对每帧的可循环像素位置A和其相邻的可循环像素位置计算该帧的空间参数,然后基于各帧的空间参数计算该可循环像素位置的空间一致性。
子步骤A232,根据各可循环像素位置的时间一致性参数和空间一致性参数,确定各可循环像素位置的起始帧和循环时长;
然后基于各可循环像素位置的时间一致性参数和空间一致性参数作为能量值,带入图割算法进行计算,即可确定各个可循环像素位置的起始帧和循环时长。需要说明的是,本申请实施例对图割算法不加以限制,可以将上述时间一致性参数和空间一致性参数作为其输入参数的之一即可。
子步骤A233,从各可循环像素位置所连通的区域中,选择符合连通域条件的区域作为所述动态区域的像素位置区域;
在本申请实施例中,通过前述步骤确定了可循环像素位置,而可循环像素位置中可能存在噪点,为了避免噪点的存在,本申请实施例则将从各可循环像素位置包裹的区域中,选择符合连通域条件的区域作为所述像素位置区域,该像素位置区域则作为动态区域的空间维度属性。
其中连通域是可以理解为由一条线围住的区域。在实际应用中,可以根据高斯平滑、填洞和形态学分析等方面的要求设定相应的连通域条件。其中该连通域条件比如:去掉面积小于面积阈值的连通域。需要说明的是,该面积阈值可以根据实际需求设置,本申请实施例不对其加以限制。
在实际应用中,可以根据可循环像素位置和除可循环像素位置之外的其他像素位置,将视频图像二值化为一个灰度图像,比如前述800*600分辨率的视频,其可循环像素位置灰度值可以设为255,除可循环像素位置之外的其他像素位置可以设置为0,从而生成了一张灰度图像。
那么对于灰度图像中的灰度值为255的区域进行切割可得到动态区域。
子步骤A234,基于每个像素位置区域中的各像素位置的起始帧和循环时长,确定所述动态区域的起始帧和循环时长。
由于前述步骤中每个可循环像素位置都计算了一个起始帧和循环时长,那么由于一个像素位置区域中包括了多个可循环像素位置,而各可循环像素位置的起始帧之间可能不一致,循环时长也可能不一致,那么可以基于各可循环像素位置的起始帧选择一个最早的起始帧作为动态区域的起始帧,然后选择一个包括了各可循环像素位置对应的最晚一帧的循环时间作为动态区域的循环时间,从而可以将该起始帧和循环时长则可以作为动态区域的时间维度属性。
比如循环位置区域A中包括:可循环像素位置1,可循环像素位置2……可循环像 素位置10。
其中可循环像素位置1的起始帧为2,循环时长为40个帧。可循环像素位置2-9的起始帧为3,循环时长为41个帧。可循环像素位置10的起始帧为4,循环时长为50个帧。
那么对于循环位置区域A对应的动态区域,其起始帧则可以选择2,因为起始帧2最早。而可循环像素位置1的结束帧为2+40=42帧,可循环像素位置2-9的结束帧为3+41=44帧,可循环像素位置10的结束帧为4+50=54帧,那么可以54帧计算循环时长,即54-2=52个帧。
当然,如果循环时长采用其他计数方式,可以采用相应的计算方式计算该循环时长,本申请实施例不对其加以限制。
步骤103,接收用户从所述至少一个动态区域中确定目标动态区域;
在实际应用中,由于可以识别出一个或多个动态区域,将该一个或多个动态区域可以发送给用户进行选择,用户需要哪一个动态区域,则基于其需要的动态区域去生成局部动态影像。
结合图1A,服务器20在识别出各种动态区域后,可以给各动态区域画出轮廓,然后从视频中选择出一帧图像,标记处该轮廓后,返回给客户端10进行展示,以供用户选择。当然实际应用中,动态区域轮廓的图像可以选择包括该循环区域的任意一帧图像,然后在该帧图像上添加动态区域轮廓,本申请实施例不对其加以限制。
可以理解的是,在本申请实施例中,由于是***对主体对象的动态区域进行自动识别,其可能识别多个动态区域,那么可能涉及到多个主体对象。当然实际应用中,本申请实施例可以识别所有能够识别的动态区域。而对于用户而言,其可能不需要全部的主体对象都动态显示,因此本申请实施例在识别所有动态区域后,为其标记动态区域轮廓,然后将标记了动态区域轮廓之后的图像返回给用户,比如图1B,有两个动态区域轮廓以供用户选择。
需要说明的是,添加动态区域轮廓可以采用前述二值化的方式,将图像转换为灰度图像,可循环像素位置为准设为255,其他像素位置设为0,然后选择255包裹的连通域,然后再确定该联通域的边沿的像素位置。在选择前述的一帧图像后,在该记录的边沿的像素位置上添加红色线条,即可得到动态区域轮廓。
然后用户可以在客户端10中选择一个或多个动态区域作为目标动态区域,客户端则将用户选择的目标动态区域上传至服务器。
需要说明的是,当采用在客户端本地进行视频处理的架构下,客户端识别到至少一个动态区域后可以直接进行展示,用户可以在客户端本地直接选择目标动态区域。
步骤104,基于用户确定的目标动态区域,生成针对所述目标动态区域的局部动态影像。
在本申请实施例中,由于用户确定了一个或多个目标动态区域,则可以基于目标动态区域,生成针对该目标动态区域的局部动态影像。
当然,在实际应用中,当用户选择了多个目标动态区域,可以将用户选择的所有目标动态区域,生成一个局部动态影像,在该局部动态影像中显示所有目标动态区域的动态图像。还可以分别针对用户选择的每个目标动态区域,各自生成一个局部动态影像,每个局部动态影像显示一个目标动态区域的动态图像。当然还可以有其他组合方式,本申请实施例不对其加以限制。
优选的,步骤104包括:
子步骤1041,确定对应所述目标动态区域的子序列帧;
在实际应用中,如前述例子中,对于一个循环区间,计算了其起始帧和循环时长,那么可以根据其起始帧和循环时长,确定所述视频数据的帧序列中用于生成局部动态影像的子序列帧。其中,当有多个循环区间时,由于每个循环区间的起始帧和循环时长各自有差别,那么可以选择包括多个循环区间的起始帧和循环时长。
优选的,子步骤1041包括:
步骤A31,根据所述目标动态区域的起始帧和循环时长,确定所述目标动态区域的子序列帧。
比如图1B中的两个动态区域,每个动态区域为一只鞋的运动区域。当用户选择了该两个动态区域。假使一只鞋对应的动态区域A的起始帧为10,循环时长为50个帧;另一只鞋对应的动态区域B的起始帧为12,循环时长为52。
如果要将该两个动态区域放到一个局部动态影像中,则那么可以设置局部动态影像的起始帧为10,循环时长为54。那么此时可以获取子序列帧10-64帧。
当然如果要分别将两个动态区域各自设置到一个局部动态影像中,则可以分别根据相应的起始帧和循环时长获取子序列帧。
子步骤1042,将所述子序列帧之中,起始帧之后的后续帧的背景图像替换为所述起始帧的背景图像;所述背景图像为每帧图像中所述目标动态区域之外的图像;
比如前述图1B的目标视频数据的10-64帧,以第10帧为起始帧,那么第10帧的 动态区域轮廓外的背景为静态图像。那么该第10帧作为新的局部动态影像的第1帧。将目标视频数据的第11帧的动态区域轮廓区域外的背景替换为第10帧的动态区域轮廓外的背景,则替换后的图像的背景与第10帧一致,然后将替换后的图像作为为新的局部动态影像的第1帧。其他帧的处理方式以此类推,知道将目标视频数据的第64帧的背景替换完之后作为新的局部动态影像的第55帧。
可以理解,对于其他情况以此类推,本申请实施例不对其加以限制。
子步骤1043,基于所述起始帧和替换了背景图像的后续帧,生成针对所述目标动态区域的局部动态影像。
如前述例子,将对应新的局部动态影像的第1帧到底55帧,按序组合即可生成两只鞋的局部动态影像。
当然实际应用中,可以继续生成视频格式的局部动态影像。也可以将该55帧图像生成gif(Graphics Interchange Format,图像互换格式)格式的局部动态影像。局部动态影像的具体格式本申请实施例不对其加以限制。
可以理解,当需要分别对两只鞋生成两个局部动态影像时,可以将相应的子序列帧按照上述方式各自生成一个局部动态影像。本申请实施例不对其加以限制。
当然在局部动态影像生成之后,用户可以选择导出局部动态影像,或者点击分享按钮,将所述局部动态影像分享至某个应用,当然用户也可以上传至自己的页面。本申请实施例不对其加以限制。
本申请实施例通过对对所述目标视频数据的各帧的像素值进行分析,智能确定所述目标视频数据中至少一个动态区域,然后对于至少一个动态区域中的目标动态区域,可以自动生成针对所述目标动态区域的局部动态影像。实现了自动化识别动态区间以生成局部动态影像,从而降低了用户操作;由于动态区域是视频中主体对象运动的区域,因此也能提高主体对象的动态区域选取的精准度,降低人力和时间成本;并且,通过***自动识别动态区域,避免了通过人眼识别很难识别不太清晰的主体对象的情况,对视频的主体对象分离要求较低,从而对降低对视频素材的需求。另外,本申请实施例可以自动识别目标视频数据中的多个动态区域,然后供用户选择,然后可以根据用户的需求自动生成其需要的局部动态影像。
参照图2,其示出了本申请的另一种局部动态影像生成方法实施例的步骤流程图,包括:
步骤201,获取目标视频数据;
在本申请实施例中,可以通过各种方式获取视频数据。当对视频数据进行分析的执行方位服务器时,则用户可以通过客户端上传其目标视频数据。
当对视频数据进行分析的执行方位用户的设备时,则用户可以将其目标视频数据导入其设备。
当然,具体的目标视频数据获取方式本申请实施例不对其加以限制。
步骤202,对所述目标视频数据的各帧的像素值进行分析,确定所述目标视频数据中至少一个动态区域;
本步骤和前述实施例的步骤102类似,在此不再详述。
优选的,步骤203包括:
子步骤B11,将目标视频数据转换为序列帧;
子步骤B12,根据各帧图像中属于不同像素位置的像素块之间的重合度,确定所述目标视频数据中的至少一个动态区域。
子步骤B11-B12参照前述实施例子步骤A11-A12,在此不再详述。
优选的,步骤203包括:
子步骤B21,将目标视频数据转换为序列帧;
子步骤B22,对于所述目标视频数据中每个像素位置,根据各帧中所述像素位置的像素值的变化程度,确定可循环像素位置;
子步骤B23,基于各可循环像素位置所连通的区域中,确定所述目标视频数据中的至少一个动态区域。
子步骤B21-B23参照前述实施例子步骤A21-A23,在此不再详述。
步骤203,从所述至少一个动态区域中,确定目标主体对象所属的目标动态区域;
在实际应用中,可以由将上述至少一个动态区域标记轮廓,然后供用户选择,然后根据用户的选择确定目标动态区域。
还可以通过图像识别方式,去识别动态区域中的主体对象,是否为用户需求的目标主体对象,如果是,则确定该动态区域为目标动态区域。比如,用户可预先选择“鞋”两个字,然后***可以从数据库中获取“鞋”的特征,然后去识别各个动态区域的图像中是否出现些的特征,如果出现,则选择该动态区域为目标动态区域。
当然,具体确定目标主体对象所属的目标动态区域可以有多种,本申请实施例不对其加以限制。
步骤204,生成针对所述目标动态区域的局部动态影像。
本步骤和前述实施例的步骤204类似,在此不再详述。
优选的,步骤204包括:
子步骤2041,确定对应所述目标动态区域的子序列帧;
子步骤2042,将所述子序列帧之中,起始帧之后的后续帧的背景图像替换为所述起始帧的背景图像;所述背景图像为每帧图像中所述目标动态区域之外的图像;
子步骤2043,基于所述起始帧和替换了背景图像的后续帧,生成针对所述目标动态区域的局部动态影像。
子步骤2041-2043参照前述实施例的子步骤1041-1043,在此不再详述。
本申请实施例通过对对所述目标视频数据的各帧的像素值进行分析,智能确定所述目标视频数据中至少一个动态区域,然后对于至少一个动态区域中的目标动态区域,可以自动生成针对所述目标动态区域的局部动态影像。实现了自动化识别动态区间以生成局部动态影像,从而降低了用户操作;由于动态区域是视频中主体对象运动的区域,因此也能提高主体对象的动态区域选取的精准度,降低人力和时间成本;并且,通过***自动识别动态区域,避免了通过人眼识别很难识别不太清晰的主体对象的情况,对视频的主体对象分离要求较低,从而对降低对视频素材的需求。另外,本申请实施例可以自动识别用户需求的主体对象的动态区域,更减少用户的人力和时间成本。
参照图3,其示出了本申请的一种图像处理方法实施例的步骤流程图,包括:
步骤301,获取目标视频数据;
本步骤参照前述步骤101或201的描述,在此不再详述。
步骤302,对所述目标视频数据的各帧的像素值进行分析,确定所述目标视频数据中至少一个动态区域。
本步骤参照前述步骤102的描述,在此不再详述。
优选的,步骤302包括:
子步骤C11,将目标视频数据转换为序列帧;
子步骤C12,根据各帧图像中属于不同像素位置的像素块之间的重合度,确定所述目标视频数据中的至少一个动态区域。
子步骤C11-C12参照前述实施例子步骤A11-A12,在此不再详述。
优选的,步骤302包括:
子步骤C21,将目标视频数据转换为序列帧;
子步骤C22,对于所述目标视频数据中每个像素位置,根据各帧中所述像素位置的像素值的变化程度,确定可循环像素位置;
子步骤C23,基于各可循环像素位置所连通的区域中,确定所述目标视频数据中的至少一个动态区域。
子步骤C21-C23参照前述实施例子步骤A21-A23,在此不再详述。
优选的,子步骤C23包括:
子步骤C231,获取所述可循环像素位置的时间一致性参数和空间一致性参数;
子步骤C232,根据各可循环像素位置的时间一致性参数和空间一致性参数,确定各可循环像素位置的起始帧和循环时长;
子步骤C233,从各可循环像素位置所连通的区域中,选择符合连通域条件的区域作为所述动态区域的像素位置区域;
子步骤C234,基于每个像素位置区域中的各像素位置的起始帧和循环时长,确定所述动态区域的起始帧和循环时长。
子步骤C231-C234参照前述实施例子步骤A231-A234,在此不再详述。
本申请实施例通过对对所述目标视频数据的各帧的像素值进行分析,智能确定所述目标视频数据中至少一个动态区域,然后对于至少一个动态区域中的目标动态区域,从而降低用户手动画轮廓的过程,提高动态区域的精确性,降低人力和时间成本,并且通过***自动识别动态区域,避免了通过人眼识别很难识别不太清晰的主体对象的情况,对视频的主体对象分离要求较低,从而对降低对视频素材的需求。
需要说明的是,对于方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请实施例并不受所描述的动作顺序的限制,因为依据本申请实施例,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作并不一定是本申请实施例所必须的。
参照图4,示出了本申请的一种局部动态影像生成装置实施例的结构框图,具体可以包括如下模块:
第一视频获取模块401,用于获取用户上传的目标视频数据;
动态区域分析模块402,用于对所述目标视频数据的各帧的像素值进行分析,确定所述目标视频数据中至少一个动态区域;
第一目标确定模块403,用于接收用户从所述至少一个动态区域中确定目标动态区 域;
局部影像生成模块404,用于基于用户确定的目标动态区域,生成针对所述目标动态区域的局部动态影像。
优选的,所述动态区域分析模块包括:
视频转换子模块,用于将目标视频数据转换为序列帧;
第一动态区域分析子模块,用于根据各帧图像中属于不同像素位置的像素块之间的重合度,确定所述目标视频数据中的至少一个动态区域。
优选的,所述动态区域分析模块包括:
视频转换子模块,用于将目标视频数据转换为序列帧;
可循环像素位置确定子模块,用于对于所述目标视频数据中每个像素位置,根据各帧中所述像素位置的像素值的变化程度,确定可循环像素位置;
第二动态区域分析子模块,用于基于各可循环像素位置所连通的区域中,确定所述目标视频数据中的至少一个动态区域。
优选的,所述第二动态区域分析子模块包括:
一致性参数获取单元,用于获取所述可循环像素位置的时间一致性参数和空间一致性参数;
像素参数确定单元,用于根据各可循环像素位置的时间一致性参数和空间一致性参数,确定各可循环像素位置的起始帧和循环时长;
像素位置区域确定单元,用于从各可循环像素位置所连通的区域中,选择符合连通域条件的区域作为所述动态区域的像素位置区域;
帧参数单元,用于基于每个像素位置区域中的各像素位置的起始帧和循环时长,确定所述动态区域的起始帧和循环时长。
优选的,所述局部影像生成模块包括:
子序列帧确定子模块,用于确定对应所述目标动态区域的子序列帧;
替换子模块,用于将所述子序列帧之中,起始帧之后的后续帧的背景图像替换为所述起始帧的背景图像;所述背景图像为每帧图像中所述目标动态区域之外的图像;
第一生成子模块,基于所述起始帧和替换了背景图像的后续帧,生成针对所述目标动态区域的局部动态影像。
优选的,所述子序列帧确定子模块包括:
子序列帧确定单元根据所述目标动态区域的起始帧和循环时长,确定所述目标动态 区域的子序列帧。
本申请实施例通过对对所述目标视频数据的各帧的像素值进行分析,智能确定所述目标视频数据中至少一个动态区域,然后对于至少一个动态区域中的目标动态区域,可以自动生成针对所述目标动态区域的局部动态影像。实现了自动化识别动态区间以生成局部动态影像,从而降低了用户操作;由于动态区域是视频中主体对象运动的区域,因此也能提高主体对象的动态区域选取的精准度,降低人力和时间成本;并且,通过***自动识别动态区域,避免了通过人眼识别很难识别不太清晰的主体对象的情况,对视频的主体对象分离要求较低,从而对降低对视频素材的需求。另外,本申请实施例可以自动识别目标视频数据中的多个动态区域,然后供用户选择,然后可以根据用户的需求自动生成其需要的局部动态影像。
参照图5,示出了本申请的另一种局部动态影像生成装置实施例的结构框图,具体可以包括如下模块:
第二视频获取模块501,用于获取目标视频数据;
动态区域分析模块502,用于对所述目标视频数据的各帧的像素值进行分析,确定所述目标视频数据中至少一个动态区域;
第二目标确定模块503,用于从所述至少一个动态区域中,确定目标主体对象所属的目标动态区域;
局部影像生成模块504,用于生成针对所述目标动态区域的局部动态影像。
优选的,所述动态区域分析模块包括:
视频转换子模块,用于将目标视频数据转换为序列帧;
第一动态区域分析子模块,用于根据各帧图像中属于不同像素位置的像素块之间的重合度,确定所述目标视频数据中的至少一个动态区域。
优选的,所述动态区域分析模块包括:
视频转换子模块,用于将目标视频数据转换为序列帧;
可循环像素位置确定子模块,用于对于所述目标视频数据中每个像素位置,根据各帧中所述像素位置的像素值的变化程度,确定可循环像素位置;
第二动态区域分析子模块,用于基于各可循环像素位置所连通的区域中,确定所述目标视频数据中的至少一个动态区域。
优选的,所述局部影像生成模块包括:
子序列帧确定子模块,用于确定对应所述目标动态区域的子序列帧;
替换子模块,用于将所述子序列帧之中,起始帧之后的后续帧的背景图像替换为所述起始帧的背景图像;所述背景图像为每帧图像中所述目标动态区域之外的图像;
第一生成子模块,基于所述起始帧和替换了背景图像的后续帧,生成针对所述目标动态区域的局部动态影像。
本申请实施例通过对对所述目标视频数据的各帧的像素值进行分析,智能确定所述目标视频数据中至少一个动态区域,然后对于至少一个动态区域中的目标动态区域,可以自动生成针对所述目标动态区域的局部动态影像。实现了自动化识别动态区间以生成局部动态影像,从而降低了用户操作;由于动态区域是视频中主体对象运动的区域,因此也能提高主体对象的动态区域选取的精准度,降低人力和时间成本;并且,通过***自动识别动态区域,避免了通过人眼识别很难识别不太清晰的主体对象的情况,对视频的主体对象分离要求较低,从而对降低对视频素材的需求。另外,本申请实施例可以自动识别用户需求的主体对象的动态区域,更减少用户的人力和时间成本。
参照图6,示出了本申请的一种图像处理装置实施例的结构框图,具体可以包括如下模块:
第二视频获取模块601,用于获取目标视频数据;
动态区域分析模块602,用于对所述目标视频数据的各帧的像素值进行分析,确定所述目标视频数据中至少一个动态区域。
优选的,所述动态区域分析模块包括:
视频转换子模块,用于将目标视频数据转换为序列帧;
第一动态区域分析子模块,用于根据各帧图像中属于不同像素位置的像素块之间的重合度,确定所述目标视频数据中的至少一个动态区域。
优选的,所述动态区域分析模块包括:
视频转换子模块,用于将目标视频数据转换为序列帧;
可循环像素位置确定子模块,用于对于所述目标视频数据中每个像素位置,根据各帧中所述像素位置的像素值的变化程度,确定可循环像素位置;
第二动态区域分析子模块,用于基于各可循环像素位置所连通的区域中,确定所述目标视频数据中的至少一个动态区域。
优选的,所述第二动态区域分析子模块包括:
一致性参数获取单元,用于获取所述可循环像素位置的时间一致性参数和空间一致性参数;
像素参数确定单元,用于根据各可循环像素位置的时间一致性参数和空间一致性参数,确定各可循环像素位置的起始帧和循环时长;
像素位置区域确定单元,用于从各可循环像素位置所连通的区域中,选择符合连通域条件的区域作为所述动态区域的像素位置区域;
帧参数单元,用于基于每个像素位置区域中的各像素位置的起始帧和循环时长,确定所述动态区域的起始帧和循环时长。
本申请实施例通过对对所述目标视频数据的各帧的像素值进行分析,智能确定所述目标视频数据中至少一个动态区域,然后对于至少一个动态区域中的目标动态区域,从而降低用户手动画轮廓的过程,提高动态区域的精确性,降低人力和时间成本,并且通过***自动识别动态区域,避免了通过人眼识别很难识别不太清晰的主体对象的情况,对视频的主体对象分离要求较低,从而对降低对视频素材的需求。
本申请实施例还提供了一种非易失性可读存储介质,该存储介质中存储有一个或多个模块(programs),该一个或多个模块被应用在设备时,可以使得该设备执行本申请实施例中各方法步骤的指令(instructions)。
图7为本申请另一实施例提供的设备的硬件结构示意图。如图7所示,本实施例的设备包括处理器81以及存储器82。
处理器81执行存储器82所存放的计算机程序代码,实现上述实施例中图1至图4的局部动态影像生成方法。
存储器82被配置为存储各种类型的数据以支持在设备的操作。这些数据的示例包括用于在设备上操作的任何应用程序或方法的指令,例如消息,图片,视频等。存储器82可能包含随机存取存储器(random access memory,简称RAM),也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。
可选地,处理器81设置在处理组件80中。该设备还可以包括:通信组件83,电源组件84,多媒体组件85,音频组件86,输入/输出接口87和/或传感器组件88。设备具体所包含的组件等依据实际需求设定,本实施例对此不作限定。
处理组件80通常控制设备的整体操作。处理组件80可以包括一个或多个处理器81来执行指令,以完成上述图1至图4方法的全部或部分步骤。此外,处理组件80可以包括一个或多个模块,便于处理组件80和其他组件之间的交互。例如,处理组件80可以包括多媒体模块,以方便多媒体组件85和处理组件80之间的交互。
电源组件84为设备的各种组件提供电力。电源组件84可以包括电源管理***,一 个或多个电源,及其他与为设备生成、管理和分配电力相关联的组件。
多媒体组件85包括在设备和用户之间的提供一个输出接口的显示屏。在一些实施例中,显示屏可以包括液晶显示器(LCD)和触摸面板(TP)。如果显示屏包括触摸面板,显示屏可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。
音频组件86被配置为输出和/或输入音频信号。例如,音频组件86包括一个麦克风(MIC),当设备处于操作模式,如语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器82或经由通信组件83发送。在一些实施例中,音频组件86还包括一个扬声器,用于输出音频信号。
输入/输出接口87为处理组件80和***接口模块之间提供接口,上述***接口模块可以是点击轮,按钮等。这些按钮可包括但不限于:音量按钮、启动按钮和锁定按钮。
传感器组件88包括一个或多个传感器,用于为设备提供各个方面的状态评估。例如,传感器组件88可以检测到设备的打开/关闭状态,组件的相对定位,用户与设备接触的存在或不存在。传感器组件88可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在,包括检测用户与设备间的距离。在一些实施例中,该传感器组件88还可以包括摄像头等。
通信组件83被配置为便于设备和其他设备之间有线或无线方式的通信。设备可以接入基于通信标准的无线网络,如WiFi,2G或3G,或它们的组合。在一个实施例中,该设备中可以包括SIM卡插槽,该SIM卡插槽用于***SIM卡,使得设备可以登录GPRS网络,通过互联网与服务器建立通信。
由上可知,在图7实施例中所涉及的通信组件83、音频组件86以及输入/输出接口87、传感器组件88均可以作为输入设备的实现方式。
在本实施例的一种设备中,所述处理器,用于获取用户上传的目标视频数据;对所述目标视频数据的各帧的像素值进行分析,确定所述目标视频数据中至少一个动态区域;接收用户从所述至少一个动态区域中确定目标动态区域;基于用户确定的目标动态区域,生成针对所述目标动态区域的局部动态影像;或者用于获取目标视频数据;对所述目标视频数据的各帧的像素值进行分析,确定所述目标视频数据中至少一个动态区域;从所述至少一个动态区域中,确定目标主体对象所属的目标动态区域;生成针对所述目标动态区域的局部动态影像;或者用于获取目标视频数据;对所述目标视频数据的 各帧的像素值进行分析,确定所述目标视频数据中至少一个动态区域。
对于装置实施例而言,由于其与方法实施例基本相似,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
本说明书中的各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似的部分互相参见即可。
本领域内的技术人员应明白,本申请实施例的实施例可提供为方法及装置、或计算机程序产品。因此,本申请实施例可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请实施例可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本申请实施例是参照根据本申请实施例的方法、设备(***)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
尽管已描述了本申请实施例的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例做出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本申请实施例范围的所有变更和修改。
最后,还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操 作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
以上对本申请所提供的一种局部动态影像生成方法、一种局部动态影像生成装置、一种图像处理方法、一种图像处理装置,进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。

Claims (34)

  1. 一种局部动态影像生成方法,其特征在于,包括:
    获取用户上传的目标视频数据;
    对所述目标视频数据的各帧的像素值进行分析,确定所述目标视频数据中至少一个动态区域;
    接收用户从所述至少一个动态区域中确定目标动态区域;
    基于用户确定的目标动态区域,生成针对所述目标动态区域的局部动态影像。
  2. 根据权利要求1所述的方法,其特征在于,所述对所述目标视频数据的各帧的像素值进行分析,确定所述目标视频数据中至少一个动态区域的步骤,包括:
    将目标视频数据转换为序列帧;
    根据各帧图像中属于不同像素位置的像素块之间的重合度,确定所述目标视频数据中的至少一个动态区域。
  3. 根据权利要求1所述的方法,其特征在于,所述对所述目标视频数据的各帧的像素值进行分析,确定所述目标视频数据中至少一个动态区域的步骤,包括:
    将目标视频数据转换为序列帧;
    对于所述目标视频数据中每个像素位置,根据各帧中所述像素位置的像素值的变化程度,确定可循环像素位置;
    基于各可循环像素位置所连通的区域中,确定所述目标视频数据中的至少一个动态区域。
  4. 根据权利要求3所述的方法,其特征在于,所述基于各可循环像素位置所连通的区域中,确定所述目标视频数据中的至少一个动态区域的步骤,包括:
    获取所述可循环像素位置的时间一致性参数和空间一致性参数;
    根据各可循环像素位置的时间一致性参数和空间一致性参数,确定各可循环像素位置的起始帧和循环时长;
    从各可循环像素位置所连通的区域中,选择符合连通域条件的区域作为所述动态区域的像素位置区域;
    基于每个像素位置区域中的各像素位置的起始帧和循环时长,确定所述动态区域的起始帧和循环时长。
  5. 根据权利要求1或4所述的方法,其特征在于,所述基于用户确定的目标动态区域,生成针对所述目标动态区域的局部动态影像的步骤,包括:
    确定对应所述目标动态区域的子序列帧;
    将所述子序列帧之中,起始帧之后的后续帧的背景图像替换为所述起始帧的背景图像;所述背景图像为每帧图像中所述目标动态区域之外的图像;
    基于所述起始帧和替换了背景图像的后续帧,生成针对所述目标动态区域的局部动态影像。
  6. 根据权利要求5所述的方法,其特征在于,所述确定所述视频数据中包括所述动态区域的子序列帧的步骤包括:
    根据所述目标动态区域的起始帧和循环时长,确定所述目标动态区域的子序列帧。
  7. 一种局部动态影像生成方法,其特征在于,包括:
    获取目标视频数据;
    对所述目标视频数据的各帧的像素值进行分析,确定所述目标视频数据中至少一个动态区域;
    从所述至少一个动态区域中,确定目标主体对象所属的目标动态区域;
    生成针对所述目标动态区域的局部动态影像。
  8. 根据权利要求7所述的方法,其特征在于,所述对所述目标视频数据的各帧的像素值进行分析,确定所述目标视频数据中至少一个动态区域的步骤,包括:
    将目标视频数据转换为序列帧;
    根据各帧图像中属于不同像素位置的像素块之间的重合度,确定所述目标视频数据中的至少一个动态区域。
  9. 根据权利要求8所述的方法,其特征在于,所述对所述目标视频数据的各帧的像素值进行分析,确定所述目标视频数据中至少一个动态区域的步骤,包括:
    将目标视频数据转换为序列帧;
    对于所述目标视频数据中每个像素位置,根据各帧中所述像素位置的像素值的变化程度,确定可循环像素位置;
    基于各可循环像素位置所连通的区域中,确定所述目标视频数据中的至少一个动态区域。
  10. 根据权利要求7所述的方法,其特征在于,基于用户确定的目标动态区域,生成针对所述目标动态区域的局部动态影像的步骤,包括:
    确定对应所述目标动态区域的子序列帧;
    将所述子序列帧之中,起始帧之后的后续帧的背景图像替换为所述起始帧的背景图 像;所述背景图像为每帧图像中所述目标动态区域之外的图像;
    基于所述起始帧和替换了背景图像的后续帧,生成针对所述目标动态区域的局部动态影像。
  11. 一种图像处理方法,其特征在于,包括:
    获取目标视频数据;
    对所述目标视频数据的各帧的像素值进行分析,确定所述目标视频数据中至少一个动态区域。
  12. 根据权利要求11所述的方法,其特征在于,所述对所述目标视频数据的各帧的像素值进行分析,确定所述目标视频数据中至少一个动态区域的步骤,包括:
    将目标视频数据转换为序列帧;
    根据各帧图像中属于不同像素位置的像素块之间的重合度,确定所述目标视频数据中的至少一个动态区域。
  13. 根据权利要求12所述的方法,其特征在于,所述对所述目标视频数据的各帧的像素值进行分析,确定所述目标视频数据中至少一个动态区域的步骤,包括:
    将目标视频数据转换为序列帧;
    对于所述目标视频数据中每个像素位置,根据各帧中所述像素位置的像素值的变化程度,确定可循环像素位置;
    基于各可循环像素位置所连通的区域中,确定所述目标视频数据中的至少一个动态区域。
  14. 根据权利要求13所述的方法,其特征在于,所述基于各可循环像素位置所连通的区域中,确定所述目标视频数据中的至少一个动态区域的步骤,包括:
    获取所述可循环像素位置的时间一致性参数和空间一致性参数;
    根据各可循环像素位置的时间一致性参数和空间一致性参数,确定各可循环像素位置的起始帧和循环时长;
    从各可循环像素位置所连通的区域中,选择符合连通域条件的区域作为所述动态区域的像素位置区域;
    基于每个像素位置区域中的各像素位置的起始帧和循环时长,确定所述动态区域的起始帧和循环时长。
  15. 一种局部动态影像生成装置,其特征在于,包括:
    第一视频获取模块,用于获取用户上传的目标视频数据;
    动态区域分析模块,用于对所述目标视频数据的各帧的像素值进行分析,确定所述目标视频数据中至少一个动态区域;
    第一目标确定模块,用于接收用户从所述至少一个动态区域中确定目标动态区域;
    局部影像生成模块,用于基于用户确定的目标动态区域,生成针对所述目标动态区域的局部动态影像。
  16. 根据权利要求15所述的装置,其特征在于,所述动态区域分析模块包括:
    视频转换子模块,用于将目标视频数据转换为序列帧;
    第一动态区域分析子模块,用于根据各帧图像中属于不同像素位置的像素块之间的重合度,确定所述目标视频数据中的至少一个动态区域。
  17. 根据权利要求15所述的装置,其特征在于,所述动态区域分析模块包括:
    视频转换子模块,用于将目标视频数据转换为序列帧;
    可循环像素位置确定子模块,用于对于所述目标视频数据中每个像素位置,根据各帧中所述像素位置的像素值的变化程度,确定可循环像素位置;
    第二动态区域分析子模块,用于基于各可循环像素位置所连通的区域中,确定所述目标视频数据中的至少一个动态区域。
  18. 根据权利要求17所述的装置,其特征在于,所述第二动态区域分析子模块包括:
    一致性参数获取单元,用于获取所述可循环像素位置的时间一致性参数和空间一致性参数;
    像素参数确定单元,用于根据各可循环像素位置的时间一致性参数和空间一致性参数,确定各可循环像素位置的起始帧和循环时长;
    像素位置区域确定单元,用于从各可循环像素位置所连通的区域中,选择符合连通域条件的区域作为所述动态区域的像素位置区域;
    帧参数单元,用于基于每个像素位置区域中的各像素位置的起始帧和循环时长,确定所述动态区域的起始帧和循环时长。
  19. 根据权利要求15或18所述的装置,其特征在于,所述局部影像生成模块包括:
    子序列帧确定子模块,用于确定对应所述目标动态区域的子序列帧;
    替换子模块,用于将所述子序列帧之中,起始帧之后的后续帧的背景图像替换为所述起始帧的背景图像;所述背景图像为每帧图像中所述目标动态区域之外的图像;
    第一生成子模块,基于所述起始帧和替换了背景图像的后续帧,生成针对所述目标 动态区域的局部动态影像。
  20. 根据权利要求19所述的装置,其特征在于,所述子序列帧确定子模块包括:
    子序列帧确定单元根据所述目标动态区域的起始帧和循环时长,确定所述目标动态区域的子序列帧。
  21. 一种局部动态影像生成装置,其特征在于,包括:
    第二视频获取模块,用于获取目标视频数据;
    动态区域分析模块,用于对所述目标视频数据的各帧的像素值进行分析,确定所述目标视频数据中至少一个动态区域;
    第二目标确定模块,用于从所述至少一个动态区域中,确定目标主体对象所属的目标动态区域;
    局部影像生成模块,用于生成针对所述目标动态区域的局部动态影像。
  22. 根据权利要求21所述的装置,其特征在于,所述动态区域分析模块包括:
    第二视频转换子模块,用于将目标视频数据转换为序列帧;
    第一动态区域分析子模块,用于根据各帧图像中属于不同像素位置的像素块之间的重合度,确定所述目标视频数据中的至少一个动态区域。
  23. 根据权利要求21所述的装置,其特征在于,所述动态区域分析模块包括:
    视频转换子模块,用于将目标视频数据转换为序列帧;
    可循环像素位置确定子模块,用于对于所述目标视频数据中每个像素位置,根据各帧中所述像素位置的像素值的变化程度,确定可循环像素位置;
    第二动态区域分析子模块,用于基于各可循环像素位置所连通的区域中,确定所述目标视频数据中的至少一个动态区域。
  24. 根据权利要求21所述的装置,其特征在于,所述局部影像生成模块包括:
    子序列帧确定子模块,用于确定对应所述目标动态区域的子序列帧;
    替换子模块,用于将所述子序列帧之中,起始帧之后的后续帧的背景图像替换为所述起始帧的背景图像;所述背景图像为每帧图像中所述目标动态区域之外的图像;
    第一生成子模块,基于所述起始帧和替换了背景图像的后续帧,生成针对所述目标动态区域的局部动态影像。
  25. 一种图像处理装置,其特征在于,包括:
    视频获取模块,用于获取目标视频数据;
    动态区域分析模块,用于对所述目标视频数据的各帧的像素值进行分析,确定所述 目标视频数据中至少一个动态区域。
  26. 根据权利要求25所述的装置,其特征在于,所述动态区域分析模块包括:
    视频转换子模块,用于将目标视频数据转换为序列帧;
    第一动态区域分析子模块,用于根据各帧图像中属于不同像素位置的像素块之间的重合度,确定所述目标视频数据中的至少一个动态区域。
  27. 根据权利要求25所述的装置,其特征在于,所述动态区域分析模块包括:
    视频转换子模块,用于将目标视频数据转换为序列帧;
    可循环像素位置确定子模块,用于对于所述目标视频数据中每个像素位置,根据各帧中所述像素位置的像素值的变化程度,确定可循环像素位置;
    第二动态区域分析子模块,用于基于各可循环像素位置所连通的区域中,确定所述目标视频数据中的至少一个动态区域。
  28. 根据权利要求27所述的装置,其特征在于,所述第二动态区域分析子模块包括:
    一致性参数获取单元,用于获取所述可循环像素位置的时间一致性参数和空间一致性参数;
    像素参数确定单元,用于根据各可循环像素位置的时间一致性参数和空间一致性参数,确定各可循环像素位置的起始帧和循环时长;
    像素位置区域确定单元,用于从各可循环像素位置所连通的区域中,选择符合连通域条件的区域作为所述动态区域的像素位置区域;
    帧参数单元,用于基于每个像素位置区域中的各像素位置的起始帧和循环时长,确定所述动态区域的起始帧和循环时长。
  29. 一种设备,其特征在于,包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现如下步骤:
    获取用户上传的目标视频数据;
    对所述目标视频数据的各帧的像素值进行分析,确定所述目标视频数据中至少一个动态区域;
    接收用户从所述至少一个动态区域中确定目标动态区域;
    基于用户确定的目标动态区域,生成针对所述目标动态区域的局部动态影像。
  30. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储计算机程序,所述计算机程序被处理器执行时实现如下步骤:
    获取用户上传的目标视频数据;
    对所述目标视频数据的各帧的像素值进行分析,确定所述目标视频数据中至少一个动态区域;
    接收用户从所述至少一个动态区域中确定目标动态区域;
    基于用户确定的目标动态区域,生成针对所述目标动态区域的局部动态影像。
  31. 一种设备,其特征在于,包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现如下步骤:
    获取目标视频数据;
    对所述目标视频数据的各帧的像素值进行分析,确定所述目标视频数据中至少一个动态区域;
    从所述至少一个动态区域中,确定目标主体对象所属的目标动态区域;
    生成针对所述目标动态区域的局部动态影像。
  32. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储计算机程序,所述计算机程序被处理器执行时实现如下步骤:
    获取目标视频数据;
    对所述目标视频数据的各帧的像素值进行分析,确定所述目标视频数据中至少一个动态区域;
    从所述至少一个动态区域中,确定目标主体对象所属的目标动态区域;
    生成针对所述目标动态区域的局部动态影像。
  33. 一种设备,其特征在于,包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现如下步骤:
    获取目标视频数据;
    对所述目标视频数据的各帧的像素值进行分析,确定所述目标视频数据中至少一个动态区域。
  34. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储计算机程序,所述计算机程序被处理器执行时实现如下步骤:
    获取目标视频数据;
    对所述目标视频数据的各帧的像素值进行分析,确定所述目标视频数据中至少一个动态区域。
PCT/CN2018/106633 2017-09-30 2018-09-20 一种局部动态影像生成方法及装置 WO2019062631A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710939457.2A CN109600544B (zh) 2017-09-30 2017-09-30 一种局部动态影像生成方法及装置
CN201710939457.2 2017-09-30

Publications (1)

Publication Number Publication Date
WO2019062631A1 true WO2019062631A1 (zh) 2019-04-04

Family

ID=65900674

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/106633 WO2019062631A1 (zh) 2017-09-30 2018-09-20 一种局部动态影像生成方法及装置

Country Status (3)

Country Link
CN (1) CN109600544B (zh)
TW (1) TW201915946A (zh)
WO (1) WO2019062631A1 (zh)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111179159A (zh) * 2019-12-31 2020-05-19 北京金山云网络技术有限公司 消除视频中目标影像的方法、装置、电子设备及存储介质
CN111598947A (zh) * 2020-04-03 2020-08-28 上海嘉奥信息科技发展有限公司 通过标识特征自动识别病人方位的方法和***
CN111753679A (zh) * 2020-06-10 2020-10-09 哈尔滨工业大学(深圳)(哈尔滨工业大学深圳科技创新研究院) 微运动监测方法、装置、设备及计算机可读存储介质
CN112995533A (zh) * 2021-02-04 2021-06-18 上海哔哩哔哩科技有限公司 视频制作方法及装置
CN114363697A (zh) * 2022-01-06 2022-04-15 上海哔哩哔哩科技有限公司 视频文件生成、播放方法及装置
CN112866669B (zh) * 2021-01-15 2023-09-15 聚好看科技股份有限公司 一种数据切换时间确定方法及设备

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110324663A (zh) * 2019-07-01 2019-10-11 北京奇艺世纪科技有限公司 一种动态图像的生成方法、装置、电子设备和存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007076891A1 (en) * 2005-12-30 2007-07-12 Telecom Italia S.P.A. Average calculation in color space, particularly for segmentation of video sequences
CN105025360A (zh) * 2015-07-17 2015-11-04 江西洪都航空工业集团有限责任公司 一种改进的快速视频浓缩的方法与***
CN105516610A (zh) * 2016-02-19 2016-04-20 深圳新博科技有限公司 拍摄局部动态影像的方法及装置
CN105654471A (zh) * 2015-12-24 2016-06-08 武汉鸿瑞达信息技术有限公司 应用于互联网视频直播的增强现实ar***及方法
CN106453864A (zh) * 2016-09-26 2017-02-22 广东欧珀移动通信有限公司 一种图像处理方法、装置和终端

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100568237B1 (ko) * 2004-06-10 2006-04-07 삼성전자주식회사 비디오 영상으로부터 이동 물체를 추출하는 장치 및 방법
JP4972095B2 (ja) * 2005-11-15 2012-07-11 イッサム リサーチ ディベロップメント カンパニー オブ ザ ヘブライ ユニバーシティー オブ エルサレム 映像概要を生成する方法およびシステム
CN101510304B (zh) * 2009-03-30 2014-05-21 北京中星微电子有限公司 一种分割获取前景图像的方法、装置和摄像头
WO2011140786A1 (zh) * 2010-10-29 2011-11-17 华为技术有限公司 一种视频兴趣物体提取与关联的方法及***
CN103092929B (zh) * 2012-12-30 2016-12-28 信帧电子技术(北京)有限公司 一种视频摘要的生成方法及装置
CN104023172A (zh) * 2014-06-27 2014-09-03 深圳市中兴移动通信有限公司 动态影像的拍摄方法和拍摄装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007076891A1 (en) * 2005-12-30 2007-07-12 Telecom Italia S.P.A. Average calculation in color space, particularly for segmentation of video sequences
CN105025360A (zh) * 2015-07-17 2015-11-04 江西洪都航空工业集团有限责任公司 一种改进的快速视频浓缩的方法与***
CN105654471A (zh) * 2015-12-24 2016-06-08 武汉鸿瑞达信息技术有限公司 应用于互联网视频直播的增强现实ar***及方法
CN105516610A (zh) * 2016-02-19 2016-04-20 深圳新博科技有限公司 拍摄局部动态影像的方法及装置
CN106453864A (zh) * 2016-09-26 2017-02-22 广东欧珀移动通信有限公司 一种图像处理方法、装置和终端

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111179159A (zh) * 2019-12-31 2020-05-19 北京金山云网络技术有限公司 消除视频中目标影像的方法、装置、电子设备及存储介质
CN111179159B (zh) * 2019-12-31 2024-02-20 北京金山云网络技术有限公司 消除视频中目标影像的方法、装置、电子设备及存储介质
CN111598947A (zh) * 2020-04-03 2020-08-28 上海嘉奥信息科技发展有限公司 通过标识特征自动识别病人方位的方法和***
CN111598947B (zh) * 2020-04-03 2024-02-20 上海嘉奥信息科技发展有限公司 通过标识特征自动识别病人方位的方法和***
CN111753679A (zh) * 2020-06-10 2020-10-09 哈尔滨工业大学(深圳)(哈尔滨工业大学深圳科技创新研究院) 微运动监测方法、装置、设备及计算机可读存储介质
CN111753679B (zh) * 2020-06-10 2023-11-24 哈尔滨工业大学(深圳)(哈尔滨工业大学深圳科技创新研究院) 微运动监测方法、装置、设备及计算机可读存储介质
CN112866669B (zh) * 2021-01-15 2023-09-15 聚好看科技股份有限公司 一种数据切换时间确定方法及设备
CN112995533A (zh) * 2021-02-04 2021-06-18 上海哔哩哔哩科技有限公司 视频制作方法及装置
CN114363697A (zh) * 2022-01-06 2022-04-15 上海哔哩哔哩科技有限公司 视频文件生成、播放方法及装置
CN114363697B (zh) * 2022-01-06 2024-04-26 上海哔哩哔哩科技有限公司 视频文件生成、播放方法及装置

Also Published As

Publication number Publication date
TW201915946A (zh) 2019-04-16
CN109600544B (zh) 2021-11-23
CN109600544A (zh) 2019-04-09

Similar Documents

Publication Publication Date Title
WO2019062631A1 (zh) 一种局部动态影像生成方法及装置
US10880495B2 (en) Video recording method and apparatus, electronic device and readable storage medium
WO2019214319A1 (zh) 一种车辆定损的数据处理方法、装置、处理设备及客户端
WO2019214320A1 (zh) 车辆损伤识别的处理方法、处理设备、客户端及服务器
CN113453040B (zh) 短视频的生成方法、装置、相关设备及介质
KR101727169B1 (ko) 이미지 필터를 생성하기 위한 방법 및 장치
EP2998960B1 (en) Method and device for video browsing
TWI605712B (zh) 互動式媒體系統
JP2013527947A5 (zh)
CN105138962A (zh) 图像显示方法及装置
KR20200042019A (ko) 실시간 추적 보상 이미지 효과
WO2019105457A1 (zh) 图像处理方法、计算机设备和计算机可读存储介质
CN112115894B (zh) 手部关键点检测模型的训练方法、装置及电子设备
CN112672208B (zh) 视频播放方法、装置、电子设备、服务器及***
CN114267041B (zh) 场景中对象的识别方法及装置
US20220222831A1 (en) Method for processing images and electronic device therefor
KR20220118545A (ko) 메시징 시스템에서의 캡처후 처리
CN110089117B (zh) 处理和格式化视频用于交互式呈现
CN109271929B (zh) 检测方法和装置
EP4222740A1 (en) Ad breakpoints in video within messaging system
CN113099297A (zh) 卡点视频的生成方法、装置、电子设备及存储介质
TW202226049A (zh) 關鍵點檢測方法、電子設備和儲存媒體
CN113709545A (zh) 视频的处理方法、装置、计算机设备和存储介质
CN112069951A (zh) 视频片段提取方法、视频片段提取装置及存储介质
US20140286624A1 (en) Method and apparatus for personalized media editing

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: 18860925

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18860925

Country of ref document: EP

Kind code of ref document: A1