CN115660944B - Method, device, equipment and storage medium for dynamic state of static picture - Google Patents

Method, device, equipment and storage medium for dynamic state of static picture Download PDF

Info

Publication number
CN115660944B
CN115660944B CN202211327969.0A CN202211327969A CN115660944B CN 115660944 B CN115660944 B CN 115660944B CN 202211327969 A CN202211327969 A CN 202211327969A CN 115660944 B CN115660944 B CN 115660944B
Authority
CN
China
Prior art keywords
picture
region
dynamic
static
preset
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211327969.0A
Other languages
Chinese (zh)
Other versions
CN115660944A (en
Inventor
李昌庆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Flash Scissor Intelligent Technology Co ltd
Original Assignee
Shenzhen Flash Scissor Intelligent Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Flash Scissor Intelligent Technology Co ltd filed Critical Shenzhen Flash Scissor Intelligent Technology Co ltd
Priority to CN202211327969.0A priority Critical patent/CN115660944B/en
Publication of CN115660944A publication Critical patent/CN115660944A/en
Application granted granted Critical
Publication of CN115660944B publication Critical patent/CN115660944B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Processing (AREA)

Abstract

The invention relates to the field of picture dynamic, and discloses a method, a device, equipment and a storage medium for dynamic picture. The method comprises the following steps: acquiring a static picture, and carrying out identification processing on the static picture based on a preset AI semantic segmentation network to obtain a picture static region and a picture dynamic region; according to a preset blurring algorithm, blurring processing is carried out on the picture static region and the picture dynamic region, and a blurring static region and a blurring dynamic region are obtained; performing pixel offset cyclic processing on the fuzzy dynamic region based on a preset offset vector to obtain a cyclic dynamic region; and carrying out edge smoothing treatment on the cyclic dynamic region and the fuzzy static region according to a preset linear interpolation method to obtain a smooth dynamic image.

Description

Method, device, equipment and storage medium for dynamic state of static picture
Technical Field
The present invention relates to the field of image motion, and in particular, to a method, apparatus, device, and storage medium for moving a still image.
Background
The dynamic processing of the static picture is the current front-end processing hot spot, and has wide application in short video, webpage display and document processing. For example, the face is dynamically changed, the face is expressed and displayed, and a face dynamic picture with emotion expression can be generated after the face is input into the system through self-timer. After taking the whole body picture, the whole body picture is input, and the limbs of the body can move dynamically. The dynamic picture increases the interest of video and display and improves the living pleasure of people.
However, the current dynamic of still pictures is focused on the processing of people, and the image processing of objects and landscapes is mainly to simply convert two-dimensional and three-dimensional display of a full screen, and the requirements of users on dynamic display cannot be well met. Therefore, a new technology is needed for the technical problem that the current image dynamic processing of the object and the landscape is too single, and the user experience is poor due to the overlarge granularity of dynamic display.
Disclosure of Invention
The invention mainly aims to solve the technical problem that the user experience is poor due to the fact that the dynamic processing of images of the current articles and scenery is too single and the granularity of dynamic display is too large.
The first aspect of the present invention provides a method for dynamically changing a still picture, the method for dynamically changing a still picture comprising:
acquiring a static picture, and carrying out identification processing on the static picture based on a preset AI semantic segmentation network to obtain a picture static region and a picture dynamic region;
according to a preset blurring algorithm, blurring processing is carried out on the picture static region and the picture dynamic region, and a blurring static region and a blurring dynamic region are obtained;
performing pixel offset cyclic processing on the fuzzy dynamic region based on a preset offset vector to obtain a cyclic dynamic region;
and carrying out edge smoothing treatment on the cyclic dynamic region and the fuzzy static region according to a preset linear interpolation method to obtain a smooth dynamic image.
Optionally, in a first implementation manner of the first aspect of the present invention, performing a pixel offset cyclic process on the blurred dynamic area based on the preset offset vector, to obtain a cyclic dynamic area includes:
carrying out unit offset processing on each pixel in the fuzzy dynamic region based on the direction of a preset offset vector to obtain a unit offset region;
and circularly shifting the unit shifting area by the length of the shifting vector according to a preset circulation period to obtain a circulation dynamic area.
Optionally, in a second implementation manner of the first aspect of the present invention, the performing unit offset processing on each pixel in the fuzzy dynamic area based on the direction of the preset offset vector, to obtain a unit offset area includes:
and carrying out unit offset processing on the single channel of the RGB channel of the fuzzy dynamic region based on the direction of a preset offset vector to obtain a unit offset region.
Optionally, in a third implementation manner of the first aspect of the present invention, the identifying the still picture based on the preset AI semantic division network to obtain a still picture area and a dynamic picture area includes:
based on a preset AI semantic segmentation network, carrying out identification processing on the static picture to obtain a sky area and a running water area of the static picture;
combining and dividing the sky area and the running water area into a picture dynamic area;
and carrying out set subtraction processing on the static picture based on the picture dynamic region to obtain a picture static region.
Optionally, in a fourth implementation manner of the first aspect of the present invention, the performing, according to a preset blurring algorithm, blurring processing on the static region of the picture and the dynamic region of the picture to obtain a blurred static region and a blurred dynamic region includes:
matrixing the static picture to generate a picture matrix;
carrying out convolution processing on the picture matrix according to a preset fuzzy matrix to obtain a convolution picture matrix;
and determining the picture dynamic region corresponding to the convolution picture matrix as a fuzzy dynamic region, and determining the picture static region corresponding to the convolution picture matrix as a fuzzy static region.
Optionally, in a fifth implementation manner of the first aspect of the present invention, performing convolution processing on the picture matrix according to a preset blur matrix, to obtain a convolution picture matrix includes:
and carrying out convolution processing on the picture matrix corresponding to the picture dynamic region according to a preset fuzzy matrix to obtain a convolution picture matrix.
Optionally, in a sixth implementation manner of the first aspect of the present invention, performing edge smoothing processing on the cyclic dynamic region and the blurred static region according to a preset linear interpolation method, to obtain a smooth dynamic image includes:
reading first edge coordinates and second edge coordinates of the cyclic dynamic region and the fuzzy static region;
constructing a linear equation based on the first edge coordinate and the second edge coordinate, and calculating the midpoint abscissa of the first edge coordinate and the second edge coordinate;
substituting the midpoint abscissa into the linear equation to obtain a midpoint ordinate;
and adjusting the edges of the cyclic dynamic region and the fuzzy static region based on the midpoint ordinate to obtain a smooth dynamic image.
A second aspect of the present invention provides a device for moving a still picture, the device comprising:
the identification module is used for acquiring a static picture, and carrying out identification processing on the static picture based on a preset AI semantic segmentation network to obtain a picture static region and a picture dynamic region;
the blurring processing module is used for blurring processing the picture static region and the picture dynamic region according to a preset blurring algorithm to obtain a blurring static region and a blurring dynamic region;
the cyclic offset module is used for carrying out pixel offset cyclic processing on the fuzzy dynamic region based on a preset offset vector to obtain a cyclic dynamic region;
and the smoothing processing module is used for carrying out edge smoothing processing on the circulating dynamic region and the fuzzy static region according to a preset linear interpolation method to obtain a smooth dynamic image.
A third aspect of the present invention provides a moving picture moving apparatus comprising: a memory and at least one processor, the memory having instructions stored therein, the memory and the at least one processor being interconnected by a line; the at least one processor invokes the instructions in the memory to cause the device for the dynamic of the still picture to perform the method for the dynamic of the still picture described above.
A fourth aspect of the present invention provides a computer-readable storage medium having instructions stored therein that, when executed on a computer, cause the computer to perform the above-described method of dynamic picture stabilization.
In the embodiment of the invention, the moving object is subjected to fuzzification processing by carrying out AI semantic segmentation on the static picture, the dynamic motion of the specific object in the static picture is realized by utilizing the pixel cyclic offset, and then the edge between the dynamic region and the static region is subjected to smooth processing, so that the effect that the static picture can be subjected to specific dynamic is realized, the dynamic is more in accordance with the actual state, and the user experience is improved.
Drawings
FIG. 1 is a diagram illustrating a method for dynamically changing a still picture according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an embodiment of a still picture according to an embodiment of the present invention;
FIG. 3 is an effect diagram of the AI semantic segmentation process of FIG. 2;
FIG. 4 is a schematic diagram of global blurring of the AI semantic segmentation graph of FIG. 3;
FIG. 5 is a schematic diagram of an embodiment of a device for dynamically changing a still picture according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of another embodiment of a device for dynamically changing a still picture according to an embodiment of the present invention;
fig. 7 is a schematic diagram of an embodiment of a device for dynamically changing a still picture according to an embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a method, a device, equipment and a storage medium for dynamic picture.
The terms "first," "second," "third," "fourth" and the like in the description and in the claims and in the above drawings, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments described herein may be implemented in other sequences than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed or inherent to such process, method, article, or apparatus.
For easy understanding, the following describes a specific flow of an embodiment of the present invention, referring to fig. 1, and an embodiment of a method for dynamic picture in an embodiment of the present invention includes the steps of:
101. acquiring a static picture, and carrying out identification processing on the static picture based on a preset AI semantic segmentation network to obtain a picture static region and a picture dynamic region;
in this embodiment, the AI semantic segmentation network is a prior art, and mainly includes the following steps:
1. image classification (image classification)
Identifying content present in the image, for example: person (person), tree, grass, sky (sky).
2. Target detection (object detection)
Identifying content present in the image and detecting its location, such as identifying and detecting a person (person).
3. Semantic segmentation (semantic segmentation)
Each pixel in the image is labeled with a category label.
4. Example segmentation (instance segmentation)
The combination of object detection and semantic segmentation detects objects in the image (object detection) and labels each pixel (semantic segmentation).
5. Panorama splitting (panoptic segmentation)
The combination of semantic segmentation and instance segmentation both detects all objects and distinguishes between different instances in the same class.
And dividing the static picture into a movable object and a non-movable object through an AI semantic segmentation network, and finally obtaining a picture static region and a picture dynamic region.
Further, at 101 the following steps may be performed:
1011. based on a preset AI semantic segmentation network, carrying out identification processing on the static picture to obtain a sky area and a running water area of the static picture;
1012. combining and dividing the sky area and the running water area into a picture dynamic area;
1013. and carrying out set subtraction processing on the static picture based on the picture dynamic region to obtain a picture static region.
In steps 1011-1013, please refer to fig. 2, fig. 2 is a schematic diagram of an embodiment of a still picture. In the figure, the contents of sky, mountain, river and the like are included, and the segmentation processing is firstly carried out by using an AI semantic segmentation network. Referring to fig. 3, fig. 3 is a schematic diagram of the AI semantic segmentation process of fig. 2, the first image white region of fig. 3 is the sky region of fig. 2, and the second image white region of fig. 3 is the running region of fig. 2, and the sky region and the running region are merged and confirmed as a picture dynamic region. And the picture static region can be obtained after the picture dynamic region is subtracted from the static picture.
102. According to a preset blurring algorithm, blurring processing is carried out on the picture static region and the picture dynamic region, and a blurring static region and a blurring dynamic region are obtained;
in this embodiment, the blurring algorithm may execute various blurring schemes such as Gaussian Blur (Gaussian Blur), box Blur (Box Blur), kawase Blur (Kawase Blur), double Blur (Dual Blur), foreground Blur (Bokeh Blur), shift Blur (Tilt Shift Blur), aperture Blur (Iris Blur), granular Blur (Grainy Blur), radial Blur (Radial Blur), direction Blur (direct Blur), and the like, and the purpose of blurring the dynamic region and the static region is to obtain excessive edges, which is beneficial to the subsequent dynamic processing procedure.
Further, at step 102, the following steps may be performed:
1021. matrixing the static picture to generate a picture matrix;
1022. carrying out convolution processing on the picture matrix according to a preset fuzzy matrix to obtain a convolution picture matrix;
1023. and determining the picture dynamic region corresponding to the convolution picture matrix as a fuzzy dynamic region, and determining the picture static region corresponding to the convolution picture matrix as a fuzzy static region.
In steps 1021-1023, the still picture is first matrixed based on the RBG values, each pixel being processed as a matrix element. And then the fuzzy matrix is 3*3, and all elements are gradually convolved on the picture matrix according to the mode that the step length is 3, so that a convolution picture matrix is obtained. Based on the original division of the dynamic region and the static region, the picture dynamic region corresponding to the blurred convolution picture matrix is determined to be a blurred dynamic region, and the picture static region corresponding to the blurred convolution picture matrix is determined to be a blurred static region. Referring to fig. 4, fig. 4 is a schematic diagram of global blurring of the AI semantic segmentation map of fig. 3.
Further, 1022 may perform the following steps:
10221. and carrying out convolution processing on the picture matrix corresponding to the picture dynamic region according to a preset fuzzy matrix to obtain a convolution picture matrix.
In this embodiment, the convolution range of the blur matrix is limited in the picture matrix of the picture dynamic region, and in a preferred scheme, only the edges of the picture dynamic region and the picture static region are subjected to the blurring convolution processing, so that the region not at the edges is not affected, the display is clear, and the convolution picture matrix with more precise blurring is obtained.
103. Performing pixel offset cyclic processing on the fuzzy dynamic region based on a preset offset vector to obtain a cyclic dynamic region;
in the present embodiment, the offset vector may manually set the offset direction and magnitude, assuming the direction from left to right of F, and move to 9 pixel values. The blurred dynamic region is shifted by 9 pixel values from left to right within a set period of time, and the reset image is shifted again after the shifting is completed, so that a cyclic dynamic region is obtained.
Further, at 103, the following steps may be performed:
1031. carrying out unit offset processing on each pixel in the fuzzy dynamic region based on the direction of a preset offset vector to obtain a unit offset region;
1032. and circularly shifting the unit shifting area by the length of the shifting vector according to a preset circulation period to obtain a circulation dynamic area.
In steps 1031-1032, the offset direction of the offset vector F is performed first, offset from left to right, and each pixel in the blur dynamics area is offset by only one pixel value. Then, setting the cyclic period to be 2 seconds, shifting the 9 pixel values of the shift vector F within two seconds, wherein the shift is that RGB three channels shift simultaneously, and the cyclic shift process obtains a cyclic dynamic region.
In one embodiment, 1031 may perform the steps of:
10311. and carrying out unit offset processing on the single channel of the RGB channel of the fuzzy dynamic region based on the direction of a preset offset vector to obtain a unit offset region.
In step 10311, a unit shift process is performed on the R channel, the G channel, or the B channel of the RGB channel in the blurred dynamic region based on the left-to-right direction of the shift vector F1, and not all the channels may be shifted, but 2 channels may be shifted, to obtain a unit shift region.
104. And carrying out edge smoothing treatment on the cyclic dynamic region and the fuzzy static region according to a preset linear interpolation method to obtain a smooth dynamic image.
In this embodiment, the linear interpolation is a method for smoothing the edges, mainly smoothing the edges of the cyclic dynamic region and the fuzzy static region, and converting the edges with higher curvature into straight lines to smooth the edges, so as to obtain a smooth dynamic image.
Further, at step 104, the following steps may be performed:
1041. reading the pixel points of the static picture;
1042. judging whether the offset direction of the pixel points to a non-offset area or not;
1043. if the non-offset region is pointed, reading the width of the region to be smoothed in the offset direction, and carrying out interpolation smoothing on the width of the region to be smoothed and the offset vector to obtain an interpolation vector;
1044. if the pixel points do not point to the non-offset area, carrying out translation processing on the offset vector according to the pixel points to obtain an interpolation vector;
1045. and carrying out moving processing on the pixel points based on the interpolation vector to obtain the pixel points of the smooth dynamic image.
In steps 1041-1045, a-B-C represent different regions in a certain direction, a being an offsetable region, B being a region to be smoothed, i.e. a blurred region, and C being an immovable region.
When the offset direction of the pixel points to a from B, the non-offset area is not pointed, and the difference vector=pixel point X offset vector is considered.
When the offset direction of the pixel points from A to C, the non-offset area is pointed, and an interpolation vector = (J/len) XV is pointed, wherein J is the ratio of the length from the pixel point to the edge of the area C to len, V is an offset vector, and len is the sum of the width of the area B to be smoothed in the offset direction and the length of the offset vector.
The ratio of J can be specifically analyzed:
1. when the pixel is in the region to be smoothed, j=pixel X W, where W is the width of the region to be smoothed B in the offset direction.
2. When the shifted pixel falls into the region B to be smoothed, j=the shift vector length+ (shifted pixel X W), where W is the width of the region B to be smoothed in the shift direction
3. When the shifted pixel points enter the immovable area C, correcting the J, and firstly reducing the pixel length of the offset vector until the shifted pixel points fall into the area B to be smoothed. And based on the vector subjected to offset vector reduction, calculating len again, and assigning the calculated len to J, wherein len is the sum of the width of the area B to be smoothed in the offset direction and the length of the offset vector.
In the embodiment of the invention, the moving object is subjected to fuzzification processing by carrying out AI semantic segmentation on the static picture, the dynamic motion of the specific object in the static picture is realized by utilizing the pixel cyclic offset, and then the edge between the dynamic region and the static region is subjected to smooth processing, so that the effect that the static picture can be subjected to specific dynamic is realized, the dynamic is more in accordance with the actual state, and the user experience is improved.
The method for moving a still picture in the embodiment of the present invention is described above, and the following describes a device for moving a still picture in the embodiment of the present invention, referring to fig. 5, and the device for moving a still picture in the embodiment of the present invention includes:
the identification module 501 is configured to obtain a still picture, and perform identification processing on the still picture based on a preset AI semantic segmentation network to obtain a still picture region and a dynamic picture region;
the blurring processing module 502 is configured to perform blurring processing on the static region of the picture and the dynamic region of the picture according to a preset blurring algorithm, so as to obtain a blurred static region and a blurred dynamic region;
a cyclic offset module 503, configured to perform pixel offset cyclic processing on the blurred dynamic region based on a preset offset vector, to obtain a cyclic dynamic region;
and the smoothing processing module 504 is configured to perform edge smoothing processing on the cyclic dynamic region and the fuzzy static region according to a preset linear interpolation method, so as to obtain a smooth dynamic image.
In the embodiment of the invention, the moving object is subjected to fuzzification processing by carrying out AI semantic segmentation on the static picture, the dynamic motion of the specific object in the static picture is realized by utilizing the pixel cyclic offset, and then the edge between the dynamic region and the static region is subjected to smooth processing, so that the effect that the static picture can be subjected to specific dynamic is realized, the dynamic is more in accordance with the actual state, and the user experience is improved.
Referring to fig. 6, in another embodiment of a device for moving a still picture according to an embodiment of the present invention, the device for moving a still picture includes:
the identification module 501 is configured to obtain a still picture, and perform identification processing on the still picture based on a preset AI semantic segmentation network to obtain a still picture region and a dynamic picture region;
the blurring processing module 502 is configured to perform blurring processing on the static region of the picture and the dynamic region of the picture according to a preset blurring algorithm, so as to obtain a blurred static region and a blurred dynamic region;
a cyclic offset module 503, configured to perform pixel offset cyclic processing on the blurred dynamic region based on a preset offset vector, to obtain a cyclic dynamic region;
and the smoothing processing module 504 is configured to perform edge smoothing processing on the cyclic dynamic region and the fuzzy static region according to a preset linear interpolation method, so as to obtain a smooth dynamic image.
The cyclic shift module 503 is specifically configured to:
carrying out unit offset processing on each pixel in the fuzzy dynamic region based on the direction of a preset offset vector to obtain a unit offset region;
and circularly shifting the unit shifting area by the length of the shifting vector according to a preset circulation period to obtain a circulation dynamic area.
Wherein, the cyclic shift module 503 is further specifically configured to:
and carrying out unit offset processing on the single channel of the RGB channel of the fuzzy dynamic region based on the direction of a preset offset vector to obtain a unit offset region.
The identifying module 501 is specifically configured to:
based on a preset AI semantic segmentation network, carrying out identification processing on the static picture to obtain a sky area and a running water area of the static picture;
combining and dividing the sky area and the running water area into a picture dynamic area;
and carrying out set subtraction processing on the static picture based on the picture dynamic region to obtain a picture static region.
Wherein, the blurring processing module 502 includes:
a matrix unit 5021, configured to matrix the still picture to generate a picture matrix;
the convolution unit 5022 is used for carrying out convolution processing on the picture matrix according to a preset fuzzy matrix to obtain a convolution picture matrix;
the defining unit 5023 is configured to determine the picture dynamic region corresponding to the convolution picture matrix as a blurred dynamic region, and determine the picture static region corresponding to the convolution picture matrix as a blurred static region.
Wherein, the convolution unit 5022 is specifically configured to:
and carrying out convolution processing on the picture matrix corresponding to the picture dynamic region according to a preset fuzzy matrix to obtain a convolution picture matrix.
The smoothing module 504 is specifically configured to:
reading first edge coordinates and second edge coordinates of the cyclic dynamic region and the fuzzy static region;
constructing a linear equation based on the first edge coordinate and the second edge coordinate, and calculating the midpoint abscissa of the first edge coordinate and the second edge coordinate;
substituting the midpoint abscissa into the linear equation to obtain a midpoint ordinate;
and adjusting the edges of the cyclic dynamic region and the fuzzy static region based on the midpoint ordinate to obtain a smooth dynamic image.
In the embodiment of the invention, the moving object is subjected to fuzzification processing by carrying out AI semantic segmentation on the static picture, the dynamic motion of the specific object in the static picture is realized by utilizing the pixel cyclic offset, and then the edge between the dynamic region and the static region is subjected to smooth processing, so that the effect that the static picture can be subjected to specific dynamic is realized, the dynamic is more in accordance with the actual state, and the user experience is improved.
The above fig. 5 and fig. 6 describe the apparatus for dynamically moving a still picture in the embodiment of the present invention in detail from the point of view of modularized functional entities, and the following describes the apparatus for dynamically moving a still picture in the embodiment of the present invention in detail from the point of view of hardware processing.
Fig. 7 is a schematic structural diagram of a static picture dynamic device according to an embodiment of the present invention, where the static picture dynamic device 700 may have a relatively large difference due to different configurations or performances, and may include one or more processors (central processing units, CPU) 710 (e.g., one or more processors) and a memory 720, and one or more storage media 730 (e.g., one or more mass storage devices) storing application programs 733 or data 732. Wherein memory 720 and storage medium 730 may be transitory or persistent. The program stored in the storage medium 730 may include one or more modules (not shown), each of which may include a series of instruction operations in the moving apparatus 700 for still pictures. Still further, the processor 710 may be configured to communicate with the storage medium 730 to execute a series of instruction operations in the storage medium 730 on the moving picture device 700.
The still picture based dynamization device 700 may also include one or more power supplies 740, one or more wired or wireless network interfaces 750, one or more input/output interfaces 760, and/or one or more operating systems 731, such as Windows Server, mac OS X, unix, linux, freeBSD, and the like. It will be appreciated by those skilled in the art that the static picture-based dynamic device structure shown in fig. 7 does not constitute a limitation of the static picture-based dynamic device, and may include more or fewer components than shown, or may combine certain components, or may be arranged in a different arrangement of components.
The present invention also provides a computer readable storage medium, which may be a non-volatile computer readable storage medium, and may also be a volatile computer readable storage medium, where instructions are stored in the computer readable storage medium, when the instructions are executed on a computer, cause the computer to perform the steps of the method for dynamically changing a still picture.
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the system or apparatus and unit described above may refer to the corresponding process in the foregoing method embodiment, which is not repeated herein.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium, including instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a read-only memory (ROM), a random access memory (random access memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (8)

1. A method for dynamically changing a still picture, comprising the steps of:
acquiring a static picture, and carrying out identification processing on the static picture based on a preset AI semantic segmentation network to obtain a picture static region and a picture dynamic region;
according to a preset blurring algorithm, blurring processing is carried out on the picture static region and the picture dynamic region, and a blurring static region and a blurring dynamic region are obtained;
performing pixel offset cyclic processing on the fuzzy dynamic region based on a preset offset vector to obtain a cyclic dynamic region;
according to a preset linear interpolation method, carrying out edge smoothing on the cyclic dynamic region and the fuzzy static region to obtain a smooth dynamic image;
the step of performing pixel offset cyclic processing on the fuzzy dynamic region based on the preset offset vector to obtain a cyclic dynamic region comprises the following steps:
carrying out unit offset processing on each pixel in the fuzzy dynamic region based on the direction of a preset offset vector to obtain a unit offset region;
circularly shifting the unit offset region by the length of the offset vector according to a preset circulation period to obtain a circulation dynamic region;
the step of identifying the static picture based on the preset AI semantic segmentation network to obtain a picture static region and a picture dynamic region comprises the following steps:
based on a preset AI semantic segmentation network, carrying out identification processing on the static picture to obtain a sky area and a running water area of the static picture;
combining and dividing the sky area and the running water area into a picture dynamic area;
and carrying out set subtraction processing on the static picture based on the picture dynamic region to obtain a picture static region.
2. The method for dynamically changing a still picture according to claim 1, wherein the performing unit offset processing on each pixel in the blurred dynamic region based on the direction of the preset offset vector to obtain a unit offset region includes:
and carrying out unit offset processing on the single channel of the RGB channel of the fuzzy dynamic region based on the direction of a preset offset vector to obtain a unit offset region.
3. The method for dynamically changing a still picture according to claim 1, wherein the blurring the still picture region and the moving picture region according to a preset blurring algorithm to obtain a blurred still region and a blurred moving region comprises:
matrixing the static picture to generate a picture matrix;
carrying out convolution processing on the picture matrix according to a preset fuzzy matrix to obtain a convolution picture matrix;
and determining the picture dynamic region corresponding to the convolution picture matrix as a fuzzy dynamic region, and determining the picture static region corresponding to the convolution picture matrix as a fuzzy static region.
4. The method for moving still pictures according to claim 3, wherein said convolving said picture matrix according to a preset blur matrix to obtain a convolved picture matrix comprises:
and carrying out convolution processing on the picture matrix corresponding to the picture dynamic region according to a preset fuzzy matrix to obtain a convolution picture matrix.
5. The method for dynamically changing a still picture according to claim 1, wherein the performing edge smoothing on the cyclic dynamic region and the blurred static region according to a preset linear interpolation method to obtain a smooth dynamic image comprises: reading the pixel points of the static picture;
judging whether the offset direction of the pixel points to a non-offset area or not;
if the non-offset region is pointed, reading the width of the region to be smoothed in the offset direction, and carrying out interpolation smoothing on the width of the region to be smoothed and the offset vector to obtain an interpolation vector;
if the pixel points do not point to the non-offset area, carrying out translation processing on the offset vector according to the pixel points to obtain an interpolation vector;
and carrying out moving processing on the pixel points based on the interpolation vector to obtain the pixel points of the smooth dynamic image.
6. A device for dynamically changing a still picture, the device comprising:
the identification module is used for acquiring a static picture, and carrying out identification processing on the static picture based on a preset AI semantic segmentation network to obtain a picture static region and a picture dynamic region;
the blurring processing module is used for blurring processing the picture static region and the picture dynamic region according to a preset blurring algorithm to obtain a blurring static region and a blurring dynamic region;
the cyclic offset module is used for carrying out pixel offset cyclic processing on the fuzzy dynamic region based on a preset offset vector to obtain a cyclic dynamic region;
the smoothing processing module is used for carrying out edge smoothing processing on the circulating dynamic region and the fuzzy static region according to a preset linear interpolation method to obtain a smooth dynamic image;
the cyclic shift module is specifically configured to:
carrying out unit offset processing on each pixel in the fuzzy dynamic region based on the direction of a preset offset vector to obtain a unit offset region;
circularly shifting the unit offset region by the length of the offset vector according to a preset circulation period to obtain a circulation dynamic region;
the identification module is specifically configured to:
based on a preset AI semantic segmentation network, carrying out identification processing on the static picture to obtain a sky area and a running water area of the static picture;
combining and dividing the sky area and the running water area into a picture dynamic area;
and carrying out set subtraction processing on the static picture based on the picture dynamic region to obtain a picture static region.
7. A device for the dynamic of a still picture, the device comprising: a memory and at least one processor, the memory having instructions stored therein, the memory and the at least one processor being interconnected by a line;
the at least one processor invoking the instructions in the memory to cause the apparatus for the dynamic of the still picture to perform the method for dynamic of a still picture as claimed in any of claims 1-5.
8. A computer readable storage medium having stored thereon a computer program, which when executed by a processor implements a method of dynamizing a still picture according to any of claims 1-5.
CN202211327969.0A 2022-10-27 2022-10-27 Method, device, equipment and storage medium for dynamic state of static picture Active CN115660944B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211327969.0A CN115660944B (en) 2022-10-27 2022-10-27 Method, device, equipment and storage medium for dynamic state of static picture

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211327969.0A CN115660944B (en) 2022-10-27 2022-10-27 Method, device, equipment and storage medium for dynamic state of static picture

Publications (2)

Publication Number Publication Date
CN115660944A CN115660944A (en) 2023-01-31
CN115660944B true CN115660944B (en) 2023-06-30

Family

ID=84993394

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211327969.0A Active CN115660944B (en) 2022-10-27 2022-10-27 Method, device, equipment and storage medium for dynamic state of static picture

Country Status (1)

Country Link
CN (1) CN115660944B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105009169A (en) * 2012-12-21 2015-10-28 菲力尔***公司 Systems and methods of suppressing sky regions in images
CN110942500A (en) * 2019-11-29 2020-03-31 广州久邦世纪科技有限公司 Method and device for converting static graph into dynamic graph
CN111724460A (en) * 2019-03-18 2020-09-29 北京京东尚科信息技术有限公司 Dynamic display method, device and equipment for static pictures
CN111797688A (en) * 2020-06-02 2020-10-20 武汉大学 Visual SLAM method based on optical flow and semantic segmentation
CN112200817A (en) * 2020-10-15 2021-01-08 广州华多网络科技有限公司 Sky region segmentation and special effect processing method, device and equipment based on image
CN112565623A (en) * 2020-12-09 2021-03-26 深圳市达特照明股份有限公司 Dynamic image display system
CN114764839A (en) * 2020-12-30 2022-07-19 武汉Tcl集团工业研究院有限公司 Dynamic video generation method and device, readable storage medium and terminal equipment
CN114782499A (en) * 2022-04-28 2022-07-22 杭州电子科技大学 Image static area extraction method and device based on optical flow and view geometric constraint
CN115061770A (en) * 2022-08-10 2022-09-16 荣耀终端有限公司 Method and electronic device for displaying dynamic wallpaper

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105009169A (en) * 2012-12-21 2015-10-28 菲力尔***公司 Systems and methods of suppressing sky regions in images
CN111724460A (en) * 2019-03-18 2020-09-29 北京京东尚科信息技术有限公司 Dynamic display method, device and equipment for static pictures
CN110942500A (en) * 2019-11-29 2020-03-31 广州久邦世纪科技有限公司 Method and device for converting static graph into dynamic graph
CN111797688A (en) * 2020-06-02 2020-10-20 武汉大学 Visual SLAM method based on optical flow and semantic segmentation
CN112200817A (en) * 2020-10-15 2021-01-08 广州华多网络科技有限公司 Sky region segmentation and special effect processing method, device and equipment based on image
CN112565623A (en) * 2020-12-09 2021-03-26 深圳市达特照明股份有限公司 Dynamic image display system
CN114764839A (en) * 2020-12-30 2022-07-19 武汉Tcl集团工业研究院有限公司 Dynamic video generation method and device, readable storage medium and terminal equipment
CN114782499A (en) * 2022-04-28 2022-07-22 杭州电子科技大学 Image static area extraction method and device based on optical flow and view geometric constraint
CN115061770A (en) * 2022-08-10 2022-09-16 荣耀终端有限公司 Method and electronic device for displaying dynamic wallpaper

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
视觉注意力检测综述;视觉注意力检测综述_王文冠;软件学报;第30卷(第2期);全文 *

Also Published As

Publication number Publication date
CN115660944A (en) 2023-01-31

Similar Documents

Publication Publication Date Title
US8675966B2 (en) System and method for saliency map generation
Li et al. Weighted guided image filtering
US9672414B2 (en) Enhancement of skin, including faces, in photographs
Tsai Adaptive local power-law transformation for color image enhancement
Parihar et al. Fusion‐based simultaneous estimation of reflectance and illumination for low‐light image enhancement
Liu et al. Image de-hazing from the perspective of noise filtering
CN114862725B (en) Method and device for realizing motion perception fuzzy special effect based on optical flow method
CN111489322A (en) Method and device for adding sky filter to static picture
US7826678B2 (en) Adaptive image sharpening method
CN107578375B (en) Image processing method and device
CN114372932A (en) Image processing method and computer program product
CN114372931A (en) Target object blurring method and device, storage medium and electronic equipment
CN115660944B (en) Method, device, equipment and storage medium for dynamic state of static picture
CN108734712B (en) Background segmentation method and device and computer storage medium
CN115798005A (en) Reference photo processing method and device, processor and electronic equipment
Toet et al. Efficient contrast enhancement through log-power histogram modification
JP2014230283A (en) Method and device for processing picture
CN113760429A (en) Control method and control device
US9361540B2 (en) Fast image processing for recognition objectives system
CN113362351A (en) Image processing method and device, electronic equipment and storage medium
Jo et al. Single image haze removal using single pixel approach based on dark channel prior with fast filtering
EP4068196A1 (en) High dynamic range tone mapping
Agrawal et al. Visibility improvement of hazy image using fusion of multiple exposure images
Wang et al. An effective low-light image enhancement algorithm via fusion model
Demirbilek et al. Ghost-Free High Dynamic Range Imaging Based on Two-Stage Dense Image Alignment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 518000 Building 1901, 1902, 1903, Qianhai Kexing Science Park, Labor Community, Xixiang Street, Bao'an District, Shenzhen, Guangdong Province

Applicant after: Shenzhen Flash Scissor Intelligent Technology Co.,Ltd.

Address before: 518000 Unit 9ABCDE, Building 2, Haihong Industrial Plant Phase II, Haihong Industrial Plant, West Side of Xixiang Avenue, Labor Community, Xixiang Street, Bao'an District, Shenzhen, Guangdong

Applicant before: Shenzhen big brother Technology Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant