Method, device, equipment and storage medium for converting images to video
The method and apparatus convert static images into dynamic videos by segmenting foreground and background regions, applying iterative depth transformations to the background, and compositing frames, addressing the limitations of mobile devices in implementing Hitchcockian zoom technology and enhancing album creation efficiency.
Patent Information
- Application Number
- JP2023504122
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2020-09-30
- Filing Date
- 2021-08-30
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2041-08-30
AI Technical Summary
Mobile devices lack the capability to implement Hitchcockian moving zoom technology due to limitations in lens focal length switching, preventing the creation of dynamic videos from static images.
A method and apparatus that divides an image into foreground and background regions, applies iterative visual depth transformations to the background, and composites the resulting frames to create a dynamic video, mimicking Hitchcockian zoom effects without manual intervention.
Enables the conversion of static images into dynamic videos with Hitchcockian transformations, enhancing album creation convenience by automating the process and reducing user interaction.
Smart Images

Figure 0007601525000001 
Figure 0007601525000002 
Figure 0007601525000003
Abstract
Description
[Technical field]
[0001] This application claims priority to Chinese Patent Application No. 202011063249.9, filed on September 30, 2020, the entire contents of which are incorporated by reference as part of this application.
[0002] SUMMARY OF THE DISCLOSURE Embodiments of the present disclosure relate to a method, apparatus, device, and storage medium for converting images to video. [Background technology]
[0003] With the popularity of smart devices, the photography function has become an essential feature of mobile phones. Currently, photos taken with mobile phones are just still images, which is not very interesting.
[0004] Hitchcock moving zoom technology is applied to movies and television productions, and uses moving shots and zoom lenses to shoot the distance change between the subject and the background, creating the visual effect of the screen and space being distorted, leading the audience to the psychological state of the protagonist. The principle of Hitchcock moving zoom technology is the change of the focal length of the lens during the video shooting process. In order to ensure that the proportion of the main part of the image in each frame of the video remains unchanged, the focal length of the telephoto lens is switched to the focal length of the wide-angle lens, that is, the lens is zoomed up or out on the subject while zooming in and shooting. This technology generally requires special shooting equipment to continuously switch the focal length of the lens during the zoom up or zoom out process, and in the past, most of the lenses in mobile terminals are non-zoomable lenses or are composed of several lenses with different focal lengths, so that Hitchcock moving zoom technology shooting cannot be performed, and the shooting of Hitchcock moving zoom technology is limited. Summary of the Invention
[0005] The embodiments of the present disclosure provide a method, device, equipment, and storage medium for converting images to videos, which can realize converting static images to dynamic videos, and realize album creation with focus on foreground images and Hitchcock transformation of background images, without the need for manual pausing, which enhances the convenience of album creation.
[0006] According to a first aspect, an embodiment of the present disclosure includes: Segmenting an original image to obtain foreground and background regions; performing repeated visual depth transformation on the background region, and storing the image obtained each time as a screen frame to obtain a multi-frame image; and synthesizing the multi-frame images to obtain a target video. A method for converting images to video is provided, in which the iterative transformation includes at least two visual depth transformations.
[0007] According to a second aspect, an embodiment of the present disclosure includes: a region capture module for segmenting an original image to capture foreground and background regions; a visual depth conversion module for repeatedly converting the visual depth of the background region and storing the converted image as a screen frame to obtain a multi-frame image; a target video capture module for synthesizing the multi-frame images to capture a target video; There is further provided an apparatus for converting images to video, wherein the iterative transformation includes at least two visual depth transformations.
[0008] According to a third aspect, an embodiment of the present disclosure further provides an electronic device, the electronic device comprising: one or more processing devices; a memory device for storing one or more instructions; The one or more instructions, when executed by the one or more processing devices, cause the one or more processing devices to implement a method for converting images to video as described in embodiments of the present disclosure.
[0009] According to a fourth aspect, an embodiment of the present disclosure further discloses a computer-readable storage medium having a computer program stored thereon, the program realizing the image-to-video conversion method described in the embodiment of the present disclosure when executed by a processing device.
[0010] The present disclosure discloses a method, apparatus, device and storage medium for converting images to video. First, the original image is divided to obtain a foreground region and a background region, then the visual depth transformation is performed on the background region, and the image obtained after each transformation is stored as a screen frame to obtain a multi-frame image, and the repeated transformation includes at least two visual depth transformations, and finally the multi-frame image is synthesized to obtain a target video. The image-to-video method according to the embodiment of the present disclosure synthesizes a plurality of images generated by performing the visual depth transformation on the image in the background region, and obtains a video album with foreground image focus and background image Hitchcock transformation effect, without the need for manual stopping, and enhances the convenience of album creation. [Brief description of the drawings]
[0011] [Figure 1] 1 is a flowchart of a method for converting an image to a video in an embodiment of the present disclosure. [Diagram 2] FIG. 2 is a structural schematic diagram of an image-to-video conversion device according to an embodiment of the present disclosure; [Diagram 3] FIG. 1 is a structural schematic diagram of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0012] Hereinafter, the embodiments of the present disclosure will be described in more detail with reference to the drawings. Although the drawings show some embodiments of the present disclosure, it should be understood that the present disclosure can be realized in various forms and should not be construed as being limited to the embodiments described herein, but instead provide these embodiments for a more transparent and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are merely illustrative and do not limit the scope of protection of the present disclosure.
[0013] As will be understood, the steps recited in the method embodiments of the present disclosure may be performed in differing orders and / or in parallel, and method embodiments may include additional steps and / or omit the performance of steps as illustrated, and the scope of the present disclosure is not limited in this respect.
[0014] As used herein, the term "comprises" and variations thereof are open inclusive, i.e., "including, but not limited to." The term "based on" means "based at least in part on." The term "one embodiment" refers to "at least one embodiment," the term "another embodiment" refers to "at least one other embodiment," and the term "some embodiments" refers to "at least some embodiments." Relevant definitions of other terms are provided below.
[0015] However, the concepts of "first", "second", etc. referred to in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order or interdependence of functions performed in these devices, modules or units.
[0016] It should be understood that the modifications "one" and "multiple" referred to in the present disclosure are exemplary rather than limiting, and that a person of ordinary skill in the art should understand "one or more" unless the context clearly indicates otherwise.
[0017] The names of messages or information exchanged among multiple devices in the embodiments of the present disclosure are for illustrative purposes, rather than limiting the scope of these messages or information.
[0018] 1 is a flow chart of a method for converting images to video according to an embodiment of the present disclosure, the embodiment can be applied to a situation of converting static images to dynamic videos, the method can be performed by an apparatus for converting images to video, the apparatus can be configured with hardware and / or software, and can be integrated into a device having a function of converting images to video in general, the device can be an electronic device such as a server or a server cluster. As shown in FIG. 1, the method specifically includes the following steps 110 to 130:
[0019] Step 110: Segment the original image to obtain foreground and background regions.
[0020] The original image may be an image input or selected by a user. The foreground region may be a target region to be identified, such as a human figure region, an animal region, and a building region, and the background region is the remaining region except for the foreground region. Segmenting the original image is understood to be segmenting the foreground region and the background region.
[0021] In this embodiment, the method of dividing the original image to obtain the foreground region and the background region may be to identify a target object in the original image, divide the region in which the target object exists as the foreground region, and obtain the foreground region and the background region.
[0022] Specifically, the target object in the original image can be identified using the object identification model. For example, if the foreground image is a person image, it is identified using the person image identification model, and if the foreground image is an animal, it is identified using the animal identification model. This embodiment does not limit the type of the identified target object. The area where the target object exists is cropped from the original image, and the foreground area and the background area are separated, and the foreground area and the background area are obtained.
[0023] In this embodiment, the method of dividing the area where the target object exists as a foreground area and acquiring the foreground area and the background area may be to acquire the center point depth of the foreground area, perform a depth smoothing process on the pixel points of the foreground area based on the center point depth, and perform an edge depth sharpening process on the background area and the foreground area, respectively, to acquire the processed foreground area and background area.
[0024] The method of acquiring the depth of a pixel point may be a focus adjustment method, a light and shade and illumination method, and a relative depth or depth ordering method, etc., and the method of acquiring the depth is not limited here. The process of performing a depth smoothing process on the pixel points of the foreground region based on the center point depth can be understood as adjusting the depth of each pixel point in the foreground region to the depth of the center point, so that the image of the foreground region has the same visual depth.
[0025] Specifically, after dividing the foreground region, a depth smoothing process is performed on the pixel points of the foreground region based on the center point depth of the foreground region, and depth sharpening is performed on the edges, and discontinuous and closed edges are obtained according to the depth information, thereby trimming the foreground region and leaving the background region.
[0026] Step 120: Perform visual depth transformation on the background region repeatedly, and store the image obtained each time as a screen frame to obtain a multi-frame image.
[0027] The iterative transformation includes at least two visual depth transformations, and each transformation continues the visual depth transformation based on the previous transformation result. The visual depth transformation includes a transformation from far to near or from near to far. The visual depth transformation can be understood as performing a zoom process on the image. In this embodiment, a visual depth transformation range is first determined, and then the visual depth transformation is performed iteratively within the transformation range with a predetermined step width for the background region.
[0028] In this embodiment, the method of performing iterative visual depth transformation on the background region may involve complementing an image for a region in the background region where the foreground has been cropped, based on a set machine learning model, and performing iterative visual depth transformation on the completed background region.
[0029] The preset machine learning model may be a model obtained by training with a large number of samples, and the samples may be partially cropped images, and the complete image is supervised and trained. For example, the background region is a building, and in the original image, a part of the building is occluded by the foreground image, and in the foreground cropped region, the preset machine learning model is used to complement the building image in the background region.
[0030] In this embodiment, the method of performing iterative transformation of visual depth for the background region may be to transform the depth of pixel points in the background region from near to far based on the center point depth and a first set step width.
[0031] Specifically, the depth of the pixel point of the background region is gradually increased based on the depth of the central point. For example, if the step width is set to d, the visual depth is d away during the first conversion, and the first frame image is obtained, and the visual depth based on the first frame image continues to be d away during the second conversion, and the second frame image is obtained, and thus the depth of the second type of image relative to the original image is 2d, and thus a multi-frame image is obtained.
[0032] In this embodiment, the method of performing iterative transformation of visual depth for the background region may be to transform the depth of pixel points in the background region from far to near based on the center point depth and a second set step width.
[0033] The second set step width may be the same as or different from the first set step width. Specifically, the depth of the pixel point of the background region is gradually made closer to the center point depth. For example, if the step width is set to d, the visual depth is close to d when the first conversion is performed, and the first frame image is obtained; if the second conversion is performed, the visual depth based on the first frame image continues to be close to d when the second conversion is performed, and the second frame image is obtained; thus, the depth of the second type of image is zoomed up by 2d with respect to the depth of the original image, and thus, a multi-frame image is obtained.
[0034] Step 130: Synthesize multi-frame images to obtain a target video.
[0035] In this embodiment, the manner of synthesizing the multi-frame images can be synthesizing according to the time stamps of the multi-frame images. After synthesis, the target video is an album with the Hitchcock effect.
[0036] Optionally, when the original image includes at least two images, for each of the original images, the following operations are performed: dividing the original image to obtain a foreground region and a background region, performing visual depth transformation on the background region repeatedly, storing the image obtained after each transformation as a screen frame, obtaining a multi-frame image, and synthesizing the multi-frame image to obtain a target video, thereby obtaining at least two target videos.
[0037] Optionally, the method further includes the steps of: after obtaining the at least two target videos, ordering the at least two target videos in a set order; combining the at least two target videos after ordering using a scheme of adding a set field rotation special effect between adjacent target videos; and rendering the at least two target videos after being combined to obtain a final video.
[0038] The set order may be the order in which the user inputs the images, or the order after the user adjusts, and is not limited thereto. The field rotation special effects set between adjacent target videos may be the same or different. The set field rotation special effects are preset and can be arbitrarily selected.
[0039] The technical solution of this embodiment is to first divide the original image to obtain the foreground region and the background region, then perform visual depth transformation on the background region, store the image obtained after each transformation as a screen frame, obtain a multi-frame image, the repeated transformation includes at least two visual depth transformations, and finally synthesize the multi-frame image to obtain the target video. The image to video method according to the embodiment of the present disclosure synthesizes a plurality of images generated by performing visual depth transformation on the image in the background region, obtains a video album with foreground image focus and background image Hitchcock transformation effect, without the need for manual stopping, and improves the convenience of album creation.
[0040] The image to video conversion method according to the embodiment of the present disclosure is made online as a function of a video APP. This function can realize automatic editing, creating and sharing of videos. In this application scenario, a user selects the image to video conversion function, the user selects an image, the client uploads the image to the server, the server obtains the uploaded image from the client, generates a Hitchcock video fragment for the image, and returns to the client, the client decodes and cuts the video, and renders the screen, and performs an auto-play preview after adding field rotation special effects, and the user can share or publish the video. The solution of this application does not require the user to manually stop the video, but only needs to upload an image, which greatly reduces the cost of generating videos from images.
[0041] 2 is a structural schematic diagram of the image to video conversion device disclosed in the embodiment of the present disclosure. As shown in FIG. 2, the device includes an area acquisition module 210, a visual depth conversion module 220 and a target video acquisition module 230.
[0042] The region acquisition module 210 is used to segment the original image to obtain the foreground region and the background region.
[0043] The visual depth transformation module 220 is used to perform iterative visual depth transformation on the background region, store the image obtained after each transformation as a screen frame, and obtain a multi-frame image, where the iterative transformation includes at least two visual depth transformations.
[0044] The target video acquisition module 230 is used for synthesizing multi-frame images to acquire the target video.
[0045] Optionally, the region acquisition module 210 further comprises: Identifying a target object in an original image; The region in which the target object exists is divided into a foreground region, and a foreground region and a background region are obtained, where the background region is a region in the original image other than the region in which the target object exists.
[0046] Optionally, the region acquisition module 210 further comprises: Obtaining a center point depth of a foreground region; performing depth smoothing processing on the pixel points of the foreground region based on the center point depth, and performing edge depth sharpening processing on the background region and the foreground region respectively to obtain processed foreground region and background region.
[0047] Optionally, the visual depth transformation module 220 further comprises: Completing the image for a cropped foreground region in a background region based on the configured machine learning model; It is used to perform an iterative visual depth transformation on the interpolated background region.
[0048] Optionally, the visual depth transformation module 220 further comprises: Based on the center point depth, the depth of the pixel point in the background region is converted from near to far based on a first set step width.
[0049] Optionally, the visual depth transformation module 220 further comprises: Based on the center point depth, the depth of the pixel point in the background region is converted from far to near based on a second setting step width.
[0050] Optionally, the original image is an image input or selected by a user, and if the original image includes at least two images, for each of the original images, the following operations are performed: dividing the original image to obtain a foreground region and a background region, performing visual depth transformation on the background region repeatedly, storing the image obtained after each transformation as a screen frame, obtaining a multi-frame image, and synthesizing the multi-frame image to obtain a target video, thereby obtaining at least two target videos.
[0051] Optionally, further comprising a video compositing module; sequencing at least two target videos in a set order; Combining at least two target videos after being ordered using a method of adding a set field rotation special effect between adjacent target videos; Rendering the at least two target videos after they have been composited to obtain a final video.
[0052] The above-mentioned device can execute the method according to all the above-mentioned embodiments of the present disclosure, and has corresponding functional modules and beneficial effects for executing the above-mentioned methods. For technical details not described in detail in this embodiment, please refer to the method according to all the above-mentioned embodiments of the present disclosure.
[0053] Hereinafter, referring to FIG. 3, a structural schematic diagram of an electronic device 300 for implementing an embodiment of the present disclosure will be described. The electronic devices in the embodiment of the present disclosure include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable media players), and in-vehicle terminals (e.g., car navigation terminals), as well as fixed terminals such as digital TVs and desktop computers, or various forms of servers such as standalone servers or server clusters. The electronic devices shown in FIG. 3 are merely examples and do not impose any limitations on the functions and scope of use of the embodiment of the present disclosure.
[0054] 3, the electronic device 300 may include a processing unit (e.g., a central processor, a graphic processor, etc.) 301, which can perform various suitable operations and processes based on programs stored in a read-only memory (ROM) 302 or programs uploaded from the memory 305 to a random access memory (RAM) 303. The RAM 303 further stores various programs and data necessary for the operation of the electronic device 300. The processing unit 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.
[0055] Typically, devices such as input devices 306 including, for example, a touch panel, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc., output devices 307 including, for example, a liquid crystal display (LCD), speakers, oscillators, etc., storage devices 308 including, for example, tapes, hard disks, etc., and communication devices 309 can be connected to the I / O interface 305. The communication devices 309 enable the electronic device 300 to communicate wirelessly or via wires with other devices to exchange data. Although FIG. 3 illustrates the electronic device 300 having various devices, it should be understood that it is not required to implement or include all of the illustrated devices. Alternatively, more or fewer devices may be implemented or included.
[0056] In particular, according to an embodiment of the present disclosure, the above process described with reference to the flowchart is implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, including a computer program carried on a computer-readable medium, the computer program including a program code for executing the phrase recommendation method. In such an embodiment, the computer program may be downloaded and installed from a network via the communication device 309, or may be installed from the storage device 305, or may be installed from the ROM 302. When the computer program is executed by the processing device 301, it performs the above functions limited to the method of the embodiment of the present disclosure.
[0057] It should be noted that the computer readable medium of the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the above. The computer readable storage medium may be, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer readable storage medium may be, but are not limited to, an electrical connection having one or more conductors, a portable computer disk, a hard disk, a random access memory (RAM), a read only memory (ROM), an erasable programmable read only memory (EPROM or flash memory), optical fiber, a portable compact disk read only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, the computer readable storage medium may be any tangible medium that contains or stores a program, which may be used by or in combination with an instruction execution system, apparatus, or device. In the present disclosure, the computer readable signal medium may include a data signal transmitted in baseband or as part of a carrier wave, on which the computer readable program code is carried. Such propagated data signals may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may transmit, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained in the computer-readable medium may be transmitted by any suitable medium, including, but not limited to, wire, cable, RF (radio frequency), etc., or any suitable combination of the above.
[0058] In some embodiments, the clients and servers may communicate using any now known or future developed network protocol, such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communications network). Examples of communications networks include local area networks ("LANs"), wide area networks ("WANs"), the Internet (e.g., networks), and end-to-end networks (e.g., ad hoc end-to-end networks), and any now known or future developed networks.
[0059] The computer readable medium may be included in the electronic device or may exist separately and not assembled to the electronic device.
[0060] The computer-readable medium is equipped with one or more programs, and when the one or more programs are executed by the electronic device, the electronic device divides an original image to obtain a foreground region and a background region, performs an iterative visual depth transformation on the background region, stores the image obtained after each transformation as a screen frame, obtains a multi-frame image, where the iterative transformation includes at least two visual depth transformations, and synthesizes the multi-frame image to obtain a target video.
[0061] The computer program code for carrying out the operations of the present disclosure can be written in one or more programming languages or combinations thereof, including, but not limited to, object-oriented programming languages such as Java, Smalltalk, C++, etc., as well as conventional procedural programming languages such as "C" or similar programming languages. The program code may run entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, such as a local area network (LAN) or wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet Service Provider).
[0062] The flowcharts and block diagrams in the figures show possible organizational structures, functions and operations of the systems, methods and computer program products of various embodiments of the present disclosure. In this regard, each block in the flowcharts or block diagrams may represent a module, a program section or a portion of code, which includes one or more executable instructions for implementing a specified logical function. It should be noted that in alternative implementations, the functions depicted in the blocks may occur in a different order than depicted in the figures. For example, two consecutive blocks may actually be essentially executed in parallel, but may also be executed in the opposite order in some cases, as determined by the functions involved. It should also be noted that each block of the block diagrams and / or flowcharts, as well as combinations of blocks in the block diagrams and / or flowcharts, may be implemented in a dedicated hardware-based system that performs the specified functions or operations, or may be implemented by a combination of dedicated hardware and computer instructions.
[0063] The units relating to the embodiments of the present disclosure may be realized in the form of software or in the form of hardware, and the names of the units in some cases do not constitute limitations on the units themselves.
[0064] The functionality described herein may be performed at least in part by one or more hardware logic components, such as, but not limited to, exemplary types of hardware logic components that may be used include field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on a chip (SOCs), complex programmable logic devices (CPLDs), and the like.
[0065] In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain or store a program used by or in combination with an instruction execution system, device, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium includes, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the above. More specific examples of machine-readable storage media include an electrical connection having one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0066] According to one or more embodiments of the present disclosure, the present disclosure provides a method for manufacturing a semiconductor device comprising: Segmenting an original image to obtain foreground and background regions; performing repeated visual depth transformation on the background region, and storing the image obtained each time as a screen frame to obtain a multi-frame image; and synthesizing the multi-frame images to obtain a target video. A method of converting images to video is disclosed, in which the iterative transformations include at least two visual depth transformations.
[0067] Furthermore, the step of dividing the original image to obtain the foreground region and the background region includes: Identifying a target object in an original image; The method includes a step of dividing the region in which the target object exists as a foreground region, and obtaining a foreground region and a background region, the background region being a region in the original image other than the region in which the target object exists.
[0068] Furthermore, the step of dividing the region in which the target object exists as a foreground region and acquiring the foreground region and the background region includes: obtaining a center point depth of the foreground region; performing a depth smoothing process on pixel points of the foreground region based on the center point depth, and performing an edge depth sharpening process on the background region and the foreground region, respectively, to obtain processed foreground region and background region.
[0069] Furthermore, the step of performing an iterative visual depth transformation on the background region includes: Completing the image for a cropped region of the foreground in the background region based on the configured machine learning model; and performing an iterative visual depth transformation on the interpolated background region.
[0070] Furthermore, the step of performing an iterative visual depth transformation on the background region includes: The method includes converting the depth of pixel points in the background region from near to far based on the center point depth and a first set step width.
[0071] Furthermore, the step of performing an iterative visual depth transformation on the background region includes: The method includes converting the depth of pixel points in the background region from far to near based on the center point depth and a second set step width.
[0072] Furthermore, the original image is an image input or selected by a user, and if the original image includes at least two images, for each of the original images, the following operations are performed: dividing the original image to obtain a foreground region and a background region, performing repeated visual depth transformation on the background region, storing the image obtained after each transformation as a screen frame, obtaining a multi-frame image, and synthesizing the multi-frame image to obtain a target video, thereby obtaining at least two target videos.
[0073] After obtaining at least two target videos, ordering the at least two target videos in a set order; Combining at least two target videos after being ordered using a scheme of adding a set field rotation special effect between adjacent target videos; The method further includes the step of rendering the at least two target videos after being composited to obtain a final video.
[0074] Furthermore, the foreground region includes a human figure region.
[0075] It should be noted that the above are merely selectable embodiments of the present disclosure and the technical principles used. Those skilled in the art can understand that the present disclosure is not limited to the specific embodiments, and can make a number of significant changes, adjustments and substitutions without departing from the scope of protection of the present disclosure. Therefore, although the present disclosure has been described in detail by the above embodiments, the present disclosure is not limited to the above embodiments, and can include many other equivalent embodiments without departing from the concept of the present disclosure, and the scope of the present disclosure is determined by the appended claims.
Claims
1. 1. A method for converting an image to a video, comprising the steps of: Segmenting an original image to obtain foreground and background regions; performing repeated visual depth transformation on the background region, and storing the image obtained each time as a screen frame to obtain a multi-frame image; and synthesizing the multi-frame images to obtain a target video. the iterative transformation includes at least two visual depth transformations; The step of segmenting the original image to obtain the foreground region and the background region includes: Identifying a target object in an original image; and dividing the region in which the target object exists as a foreground region to obtain a foreground region and a background region. The background region is a region in the original image other than the region in which the target object exists, The step of dividing the region in which the target object exists as a foreground region and acquiring the foreground region and the background region includes: obtaining a center point depth of the foreground region; performing a depth smoothing process on pixel points of the foreground region based on the center point depth, and performing edge depth sharpening processes on the background region and the foreground region, respectively, to obtain processed foreground and background regions.
2. The step of performing an iterative visual depth transformation on the background region includes: Completing the image for the foreground cropped region in the background region based on the configured machine learning model; and performing an iterative visual depth transformation on the interpolated background region.
3. The step of performing an iterative visual depth transformation on the background region includes: The method of claim 1 , further comprising: converting the depths of pixel points of the background region from near to far based on the center point depth and a first set step width.
4. The step of performing an iterative visual depth transformation on the background region includes: The method of claim 1 , further comprising converting the depths of pixel points of the background region from far to near based on the center point depth and a second set step width.
5. The original image is an image input or selected by a user, and if the original image is at least two, for each of the original images, perform the following operations: divide the original image to obtain a foreground region and a background region, perform visual depth iteration transformation on the background region, store the image obtained by each transformation as a screen frame, obtain a multi-frame image, and synthesize the multi-frame image to obtain a target video, thereby obtaining at least two target videos; After obtaining at least two target videos, ordering the at least two target videos in a set sequence; Combining at least two target videos after being ordered using a method of adding a set field rotation special effect between adjacent target videos; The method according to any one of claims 1 to 4, further comprising the step of: rendering the at least two target videos after they have been combined to obtain a final video.
6. The method of any one of claims 1 to 5, wherein the foreground region comprises a human figure region.
7. 1. An image to video conversion device, comprising: a region capture module for segmenting an original image to capture foreground and background regions; a visual depth conversion module for repeatedly converting the visual depth of the background region and storing the converted image as a screen frame to obtain a multi-frame image; a target video capture module for synthesizing the multi-frame images to capture a target video; the iterative transformation includes at least two visual depth transformations; The area acquisition module further comprises: Identifying a target object in the original image; A region in which the target object exists is divided as a foreground region, and a foreground region and a background region are obtained; The background region is a region in the original image other than the region in which the target object exists, The area acquisition module further comprises: Obtaining a center point depth of the foreground region; and performing a depth smoothing operation on pixel points of the foreground region based on the center point depth, and performing an edge depth sharpening operation on the background region and the foreground region, respectively, to obtain processed foreground and background regions.
8. An electronic device, one or more processing devices; a memory device for storing one or more instructions; An electronic device, wherein said one or more instructions, when executed by said one or more processing devices, cause said one or more processing devices to implement the method of any one of claims 1 to 6.
9. A computer readable storage medium having a computer program stored thereon, the computer program being capable of implementing the method according to any one of claims 1 to 6 when executed by a processing device.
Citation Information
Patent Citations
Image processing method and image processing system
JP2014241584A
Image processing apparatus and control method therefor
JP2016144089A
Video processing device
JP2020005202A
