CN117893644A - Picture transition method and device, nonvolatile storage medium and electronic equipment - Google Patents

Picture transition method and device, nonvolatile storage medium and electronic equipment Download PDF

Info

Publication number
CN117893644A
CN117893644A CN202410070391.8A CN202410070391A CN117893644A CN 117893644 A CN117893644 A CN 117893644A CN 202410070391 A CN202410070391 A CN 202410070391A CN 117893644 A CN117893644 A CN 117893644A
Authority
CN
China
Prior art keywords
picture
transition
preset
target
converted
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.)
Pending
Application number
CN202410070391.8A
Other languages
Chinese (zh)
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.)
Tianyi Telecom Terminals Co Ltd
Original Assignee
Tianyi Telecom Terminals 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 Tianyi Telecom Terminals Co Ltd filed Critical Tianyi Telecom Terminals Co Ltd
Priority to CN202410070391.8A priority Critical patent/CN117893644A/en
Publication of CN117893644A publication Critical patent/CN117893644A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T13/00Animation

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention discloses a picture transition method and device, a nonvolatile storage medium and electronic equipment. Wherein the method comprises the following steps: acquiring a picture to be transferred; selecting a target transition template from a plurality of preset transition templates in a preset transition template library, wherein each preset transition template is preset with a corresponding preset transition action, and each preset transition template comprises: the system comprises a plurality of preset transition blocks for executing preset transition actions, wherein each preset transition block is used for accommodating a preset transition sub-picture of a corresponding region in a preset transition picture; dividing a picture to be converted into a plurality of sub pictures to be converted, wherein the sub pictures to be converted correspond to target conversion blocks in a target conversion template one by one; and filling the plurality of sub-pictures to be converted into corresponding target transition blocks to obtain target transition animation, wherein the target transition animation represents that the plurality of target transition blocks containing the sub-pictures to be converted execute target transition actions. The invention solves the technical problem of single transition effect of the existing transition animation.

Description

Picture transition method and device, nonvolatile storage medium and electronic equipment
Technical Field
The present invention relates to the field of computers, and in particular, to a method and apparatus for transferring a picture, a nonvolatile storage medium, and an electronic device.
Background
Transition animation refers to an animation effect that makes a smooth transition between two different pages, scenes, or states. The transition animation can enhance the user experience, so that the user feels that the application program is smoother and more natural. Common transition animations include fade, push, flip, rotate, etc. effects that enable a user to feel a visual continuity and immersion when switching pages. Through skillfully applying the transition animation, the quality and the competitiveness of the product can be improved, and more users are attracted to use the product.
Mask transfer is a relatively common page switching effect, and achieves a transitional effect by covering a partial area between an original page and a target page. Specific implementations are described, for example, below:
1. Defining two ViewGroup in the layout file, one representing the original page and the other representing the target page;
2. creating a mask View and adding it to the container;
3. Defining an animation, and gradually changing the size and the position of a mask View in the animation so as to realize a transition effect;
4. the animation is applied to the mask View and the corresponding operations (e.g., removing old View, adding new View, etc.) are performed at the end of the animation.
Mask transfer performance is poor, application is limited, and only transparent/color stack filters are supported.
Aiming at the problem that the transition effect of the existing transition animation is single, no effective solution is proposed at present.
Disclosure of Invention
The embodiment of the invention provides a picture transition method, a device, a nonvolatile storage medium and electronic equipment, which are used for at least solving the technical problem of single transition effect of the existing transition animation.
According to an aspect of an embodiment of the present invention, there is provided a picture transition method including: acquiring a picture to be transferred; selecting a target transition template from a plurality of preset transition templates in a preset transition template library, wherein each preset transition template is preset with a corresponding preset transition action, and each preset transition template comprises: the preset transition blocks are used for executing the preset transition actions, and each preset transition block is used for accommodating a preset transition sub-picture of a corresponding region in a preset transition picture; dividing the picture to be converted into a plurality of sub pictures to be converted, wherein the sub pictures to be converted are in one-to-one correspondence with target conversion blocks in the target conversion template; and filling the plurality of sub-pictures to be converted into corresponding target conversion blocks to obtain target conversion animation, wherein the target conversion animation represents that the plurality of target conversion blocks containing the sub-pictures to be converted execute target conversion actions.
Optionally, acquiring the to-be-transitioned picture includes: identifying an image type of an interface image in an interface to be transitioned, wherein the image type comprises: a first type representing the interface image as a local image and a second type representing the interface image as a remote image; reading a local image of the interface to be converted under the condition that the interface image is of a first type, and determining the read local image as the picture to be converted; and downloading the remote image of the interface to be converted under the condition that the interface image is of the second type, and determining the downloaded remote image as the picture to be converted.
Optionally, before identifying the image type of the interface image in the interface to be transformed, the method further comprises: and under the condition that the interface image is not allowed to be read/downloaded from the interface to be converted, intercepting a screen picture of a screen where the interface to be converted is positioned, and obtaining the screen picture to be converted.
Optionally, selecting the target transition template from a plurality of preset transition templates in the preset transition template library includes: detecting a target object, wherein the target object is the same as or similar to the to-be-transferred image, and the to-be-transferred image is the image subjected to transfer of the to-be-transferred image, and the to-be-transferred image and the target transfer image are the same in size; identifying a first position of the target object in the picture to be converted and a second position of the target object in the target conversion picture; and selecting a preset transition template for enabling the target object to move from the first position to the second position from the preset transition template library as the target transition template.
Optionally, dividing the picture to be converted into a plurality of sub-pictures to be converted includes: obtaining a preset transition picture corresponding to a target transition template, wherein the preset transition picture comprises: a preset dividing line for dividing the preset transition picture into a plurality of preset transition sub-pictures; the size of the picture to be transferred is adjusted to obtain a picture to be segmented, wherein the size of the picture to be segmented is the same as that of the preset transfer picture; covering the preset transition picture on the picture to be segmented; and dividing the picture to be divided according to a preset dividing line in the preset transition picture to obtain a plurality of sub pictures to be transitioned.
Optionally, after dividing the picture to be divided according to a preset dividing line in the preset transition picture to obtain a plurality of sub-pictures to be transitioned, the method further includes: acquiring a picture identifier of each preset transition picture in the preset transition pictures, wherein the picture identifier is used for representing the corresponding relation between the preset transition picture and a target transition block in the target transition template; and distributing the picture identification of each preset transition picture to the sub-picture to be transitioned covered by the preset transition picture.
Optionally, before dividing the picture to be converted into a plurality of sub-pictures to be converted, the method further comprises: detecting a processor and a memory of a terminal to obtain a processor score and a memory score, wherein the terminal is used for performing transition by using the picture to be transitioned; determining that the picture to be transferred uses virtual segmentation under the condition that the processor score is not greater than the memory score, wherein the virtual segmentation indicates that the segmentation process occupies memory resources; and under the condition that the processor score is larger than the memory score, determining that the picture to be transferred uses entity segmentation, wherein the entity segmentation indicates that the segmentation process occupies processor resources.
According to another aspect of the embodiment of the present invention, there is also provided a picture transition apparatus, including: the acquisition module is used for acquiring a picture to be transferred; the selection module is used for selecting a target transition template from a plurality of preset transition templates in a preset transition template library, wherein each preset transition template is preset with a corresponding preset transition action, and each preset transition template comprises: the preset transition blocks are used for executing the preset transition actions, and each preset transition block is used for accommodating a preset transition sub-picture of a corresponding region in a preset transition picture; the segmentation module is used for segmenting the picture to be converted into a plurality of sub pictures to be converted, wherein the sub pictures to be converted are in one-to-one correspondence with the target conversion blocks in the target conversion template; and the filling module is used for filling the plurality of sub-pictures to be converted into corresponding target conversion blocks to obtain target conversion animation, wherein the target conversion animation represents that the plurality of target conversion blocks containing the sub-pictures to be converted execute target conversion actions.
According to another aspect of the embodiment of the present invention, there is further provided a nonvolatile storage medium, where the nonvolatile storage medium is configured to store a program, and when the program runs, control a device where the nonvolatile storage medium is located to execute the above-mentioned picture transition method.
According to another aspect of the embodiment of the present invention, there is also provided an electronic device, including: the system comprises a memory and a processor, wherein the processor is used for running a program stored in the processor, and the program executes the picture transition method when running.
In the embodiment of the invention, a picture to be transferred is obtained; selecting a target transition template from a plurality of preset transition templates in a preset transition template library, wherein each preset transition template is preset with a corresponding preset transition action, and each preset transition template comprises: the system comprises a plurality of preset transition blocks for executing preset transition actions, wherein each preset transition block is used for accommodating a preset transition sub-picture of a corresponding region in a preset transition picture; dividing a picture to be converted into a plurality of sub pictures to be converted, wherein the sub pictures to be converted correspond to target conversion blocks in a target conversion template one by one; and filling the plurality of to-be-turned sub-pictures into the corresponding target transition blocks to obtain target transition pictures, wherein the target transition pictures represent the plurality of target transition blocks containing the to-be-turned sub-pictures to execute target transition actions, so that the to-be-turned pictures can be divided into the plurality of to-be-turned sub-pictures, and after the plurality of to-be-turned sub-pictures are respectively put into the corresponding target transition blocks, different transition effects can be displayed by controlling the transition actions of the target transition blocks, the technical effect of the transition effects of the abundant transition pictures is realized, and the technical problem of single transition effect of the existing transition pictures is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute a limitation on the application. In the drawings:
FIG. 1 is a flow chart of a picture transition method according to an embodiment of the present invention;
FIG. 2 is a flow chart of a method of calculating transition animation in real time according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a frame transfer device according to an embodiment of the present invention;
Fig. 4 is a block diagram of a computer terminal according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures 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 of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations 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 but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to an embodiment of the present invention, there is provided a screen transition method embodiment, it should be noted that the steps shown in the flowchart of the drawings may be performed in a computer system such as a set of computer executable instructions, and that although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in an order other than that shown or described herein.
Fig. 1 is a flowchart of a picture transition method according to an embodiment of the present invention, as shown in fig. 1, the method includes the steps of:
Step S102, obtaining a picture to be transferred;
step S104, selecting a target transition template from a plurality of preset transition templates in a preset transition template library, wherein each preset transition template is preset with a corresponding preset transition action, and each preset transition template comprises: the system comprises a plurality of preset transition blocks for executing preset transition actions, wherein each preset transition block is used for accommodating a preset transition sub-picture of a corresponding region in a preset transition picture;
Step S106, dividing the picture to be converted into a plurality of sub pictures to be converted, wherein the sub pictures to be converted are in one-to-one correspondence with the target conversion blocks in the target conversion template;
step S108, filling the plurality of sub-pictures to be converted into corresponding target transition blocks to obtain target transition animation, wherein the target transition animation represents that the plurality of target transition blocks containing the sub-pictures to be converted execute target transition actions.
In the embodiment of the invention, a picture to be transferred is obtained; selecting a target transition template from a plurality of preset transition templates in a preset transition template library, wherein each preset transition template is preset with a corresponding preset transition action, and each preset transition template comprises: the system comprises a plurality of preset transition blocks for executing preset transition actions, wherein each preset transition block is used for accommodating a preset transition sub-picture of a corresponding region in a preset transition picture; dividing a picture to be converted into a plurality of sub pictures to be converted, wherein the sub pictures to be converted correspond to target conversion blocks in a target conversion template one by one; and filling the plurality of to-be-turned sub-pictures into the corresponding target transition blocks to obtain target transition pictures, wherein the target transition pictures represent the plurality of target transition blocks containing the to-be-turned sub-pictures to execute target transition actions, so that the to-be-turned pictures can be divided into the plurality of to-be-turned sub-pictures, and after the plurality of to-be-turned sub-pictures are respectively put into the corresponding target transition blocks, different transition effects can be displayed by controlling the transition actions of the target transition blocks, the technical effect of the transition effects of the abundant transition pictures is realized, and the technical problem of single transition effect of the existing transition pictures is solved.
In the above step S102, the picture to be transitioned may be a bitmap (bitmap).
It should be noted that a Bitmap (Bitmap) is a common image file format, which is also called a Bitmap or a pixel map. Consists of a rectangular array of pixels, each pixel representing information such as color, gray scale, etc.
In the above step S106, the frame to be converted may be divided into a plurality of sub-frames to be converted by using a bitmap division method, where bitmap division refers to dividing one large bitmap (bitmap) file into a plurality of small bitmap files.
It should be noted that the conventional bitmap splitting includes the following: determining the number of blocks to be divided and the size of each block; reading an original large bitmap, and cutting according to the set number and size of the blocks; storing each bitmap as a separate file or data structure in memory; performing subsequent processing, such as scaling, cutting, rotating and the like, on each bitmap, and storing the result into a new file or memory; if all small bitmaps need to be recombined, they can be spliced together in sequence to produce the final complete original large bitmap.
As an alternative embodiment, acquiring the picture to be transitioned includes: identifying an image type of an interface image in the interface to be transitioned, wherein the image type comprises: a first type representing the interface image as a local image and a second type representing the interface image as a remote image; reading a local image of an interface to be converted under the condition that the interface image is of a first type, and determining the read local image as a picture to be converted; and downloading the remote image of the interface to be converted under the condition that the interface image is of the second type, and determining the downloaded remote image as a picture to be converted.
In the above embodiment of the present invention, in the process of frame transition, a transition from an interface to be transitioned to a next interface is required, then an image to be transitioned can be obtained from an interface image in the interface to be transitioned, and further, in the case that the interface image in the interface to be transitioned is a local image, the local image can be directly read from the interface image as a frame to be transitioned; under the condition that the interface image in the interface to be converted is a remote image, the remote image can be downloaded to the local through a network, and then the remote image downloaded to the local is used as the picture to be converted, so that the picture to be converted is obtained.
As an alternative embodiment, before identifying the image type of the interface image in the interface to be transformed, the method further comprises: and under the condition that the interface image is not allowed to be read/downloaded from the interface to be converted, intercepting a screen picture of a screen where the interface to be converted is positioned, and obtaining the picture to be converted.
According to the embodiment of the invention, under the condition that the interface image in the interface to be converted cannot be obtained in a reading or downloading mode, the screen picture of the screen where the interface to be converted is located can be intercepted, the picture to be converted is obtained, and the picture to be converted is obtained.
As an alternative embodiment, selecting the target transition template from a plurality of preset transition templates of the preset transition template library includes: detecting a target object of which the picture to be converted is the same as or similar to the target conversion picture, wherein the target conversion picture is a picture after the picture to be converted is converted, and the size of the picture to be converted is the same as that of the target conversion picture; identifying a first position of a target object in a picture to be transferred and a second position of the target object in the target transfer picture; and selecting a preset transition template for enabling the target object to move from the first position to the second position from the preset transition template library as a target transition template.
In the above embodiment of the present invention, the target object may be the same or similar object in the frame to be transcoded and the target transcoding frame, and the target object may be in different positions in the frame to be transcoded and the target transcoding frame, for example, the target object may be in a first position in the frame to be transcoded and the target object may be in a second position in the target transcoding frame, so that the purpose of transcoding the frame is to transcode from the frame to be transcoded to the target transcoding frame, and the transcoding process is equivalent to moving the target object from the first position to the second position, so that in the process of selecting the target transcoding frame, the target transcoding frame capable of moving the target object from the first position to the second position may be selected, thereby realizing the selection of the target transcoding frame.
It should be noted that, the sizes of the frame to be transferred and the target transfer frame may be the same, and if the frame to be transferred and the target transfer frame are both displayed in the target interface, the first position of the target object in the frame to be transferred is equivalent to the first position of the target interface, and then the second position of the target object in the target transfer frame is equivalent to the second position of the target interface.
Optionally, the target transition template may include a plurality of target transition templates that may include: for example, in a case where a target object exists in a picture to be transcoded, a target transcoding block corresponding to a sub-picture to be transcoded where the target object exists may employ a first transcoding motion, and a target transcoding block corresponding to an image region other than the target object in the picture to be transcoded may employ a second transcoding motion different from the first transcoding motion.
It should be noted that, the size of the target object in the frame to be converted and the target converting frame may be different, so that the first converting action adopted by the target converting block corresponding to the sub-frame to be converted where the target object is located further includes changing the size of the sub-frame to be converted where the target object is located.
As an alternative embodiment, dividing the picture to be transitioned into a plurality of sub-pictures to be transitioned includes: obtaining a preset transition picture corresponding to a target transition template, wherein the preset transition picture comprises: a preset dividing line for dividing a preset transition picture into a plurality of preset transition sub-pictures; the method comprises the steps of adjusting the size of a picture to be converted to obtain a picture to be segmented, wherein the size of the picture to be segmented is the same as that of a preset conversion picture; covering a preset transition picture on a picture to be segmented; dividing the picture to be divided according to a preset dividing line in the preset transition picture to obtain a plurality of sub pictures to be transitioned.
According to the embodiment of the invention, the target transition template is provided with the corresponding preset transition picture, the preset transition picture can be preset with the preset dividing line for dividing the preset transition picture into a plurality of preset transition sub-pictures, the size of the picture to be transitioned can be changed in the process of dividing the picture to be transitioned, so that the size of the picture to be transitioned is the same as that of the preset transition picture, then the surface of the picture to be transitioned is covered with the preset transition picture, and the picture to be transitioned can be divided into a plurality of sub-pictures to be transitioned according to the preset dividing line preset in the preset transition picture, thereby realizing the division of the picture to be transitioned.
As an optional embodiment, after dividing the to-be-divided picture according to a preset dividing line in the preset transition picture to obtain a plurality of to-be-transitioned sub-pictures, the method further includes: acquiring picture identifiers of each preset transition sub-picture in the preset transition pictures, wherein the picture identifiers are used for representing the corresponding relation between the preset transition sub-picture and a target transition block in a target transition template; and distributing the picture identification of each preset transition picture to the sub-picture to be transitioned covered by the preset transition picture.
According to the embodiment of the invention, each preset rotor picture in the preset rotor pictures has a unique picture identification, the corresponding relation between the preset rotor picture and the target rotor block in the target rotor template can be represented by the picture identification, and further after the to-be-transferred picture is divided into the to-be-transferred rotor pictures, the corresponding preset rotor picture in the preset rotor pictures is covered above each to-be-transferred picture, so that the picture identification of each preset rotor picture can be distributed to the to-be-transferred picture covered by the preset rotor picture, and the corresponding relation between the to-be-transferred picture and the target rotor block can be represented by the distributed picture identification, and the to-be-transferred picture can be filled into the corresponding target rotor block according to the corresponding relation.
As an alternative embodiment, before dividing the picture to be converted into a plurality of sub-pictures to be converted, the method further comprises: detecting a processor and a memory of a terminal to obtain a processor score and a memory score, wherein the terminal is used for performing transition by using a picture to be transitioned; under the condition that the processor score is not greater than the memory score, determining that the picture to be transferred uses virtual segmentation, wherein the virtual segmentation indicates that the segmentation process occupies memory resources; and under the condition that the processor score is larger than the memory score, determining that the picture to be transferred uses entity segmentation, wherein the entity segmentation indicates that the segmentation process occupies processor resources.
According to the embodiment of the invention, the division of the picture to be converted into the plurality of sub-pictures to be converted can be realized in a virtual division and physical division mode, wherein the virtual division means that the division process occupies memory resources, and the physical division means that the division process occupies processor resources, so that before the picture to be converted is divided into the plurality of sub-pictures to be converted, the mode of virtual division or physical division can be adopted according to the processor scores and the memory scores of the picture to be converted, and the reasonable selection of the division mode is realized.
It should be noted that, the processor score is greater than the memory score, which indicates that the idle processor resource in the current terminal is better than the idle memory resource, and the entity segmentation mode occupying the processor resource is preferentially used for segmentation; and if the processor score is not greater than the memory score, indicating that the idle memory resources in the current terminal are better than the idle processor resources, preferentially dividing by using a virtual dividing mode occupying the memory resources.
The invention also provides a preferred embodiment, which provides a method for calculating the transition animation in real time, and is used for solving the technical problems of poor transition performance, limited application occasions and limited support filters in the related technology.
The application focuses on the realization mode of the animation controller and the loading, supports various morphological changes, divides the page into small blocks and respectively implements the animation so as to achieve better performance or visual effect, does not limit video frames, page frames or images, and does not need to 'exist', 'recognize', 'correlate' shared elements.
Fig. 2 is a flowchart of a method for calculating a transition animation in real time according to an embodiment of the present invention, as shown in fig. 2, specifically including the following steps:
Step S1, a current picture (i.e. a picture to be transferred, for convenience of subsequent description, referred to as a first picture) and a next picture (i.e. a target transferred picture, for convenience of subsequent description, referred to as a second picture) continuous with the current picture are obtained, so as to obtain a current interface (i.e. a interface to be transferred, for convenience of subsequent description, referred to as a first interface), and a next interface (i.e. a new interface after transferring the current interface, which may be referred to as a second interface) continuous with the current interface.
Step S2, bitmap segmentation is carried out on the first picture to obtain a plurality of sub-image blocks, wherein the Bitmap segmentation refers to the segmentation of a large Bitmap (Bitmap) file into a plurality of small Bitmap files.
As an alternative example, in the process of performing Bitmap segmentation, auxiliary data required by a transition algorithm is obtained according to an actual picture size and a screen size, wherein the auxiliary data includes: the method comprises the steps of original video frames (such as pictures to be converted), converted video frames (such as target converted pictures), key point matching data (such as target objects for determining that the pictures to be converted are the same as or similar to the target converted pictures), algorithm parameter setting values and other relevant configuration information.
Alternatively, for an original video frame (e.g., a frame to be transcoded), a video to be transcoded may be divided into frames, each frame being an image. The original video frames are used as input for generating new transitional effects.
Alternatively, for a converted video frame (e.g., a target transition picture), a new set of video frames similar to the original video but with transitional effects needs to be output, since the transition algorithm aims to smoothly connect between two different scenes.
Optionally, the data is matched against keypoints (e.g., a target object that determines that the picture to be transitioned is the same as or similar to the target transition picture). To ensure that a smooth and natural transitional effect is created between two different scenes, the important elements in these scenes must be exactly matched. The keypoint matching data records the position information of each keypoint in the original and transformed images and the correspondence between them.
Optionally, other relevant configuration information such as algorithm parameter setting values. For example, a color space, an optical flow calculation method, a feature detector, and the like are specified.
Optionally, in the Bitmap segmentation process, a virtual segmentation or physical segmentation mode may be adopted to segment the Bitmap, where the virtual segmentation refers to at most one original image on the disk, and one original image Bitmap in the memory, and different pixels are taken from the Bitmap to be drawn into different baskets by means of copyPixel; the entity division refers to that after the material is divided, the material is stored on a disk in a lasting way, and a plurality of (small) bitmaps are stored in a memory when the material is used.
As an alternative example, the virtual segmentation comprises the steps of:
step S211, in the virtual segmentation process, the original bitmap is saved, and auxiliary data required by a transition algorithm is obtained only according to the actual picture size and the screen size.
In step S212, during animation rendering, pixel information is obtained in real time from the original image by means of a drawmage/copyPixel or the like (depending on the running platform).
As an alternative example, the entity segmentation comprises the steps of:
In step S221, after the auxiliary data (e.g. the preset transition picture) is obtained during the segmentation process, the first picture (e.g. the picture to be transitioned) is cut and stored as a sub-bitmap (e.g. the sub-picture to be transitioned).
Step S222, filling the subsamples into different subspecies when the animation is rendered.
It should be noted that, in addition to performing difference estimation based on the animation global timeline, the physical scheme may also support frame-by-frame superposition in a progressive manner.
Step S3, detecting configuration attributes of a computer, grading the CPU and the memory by combining the CPU attributes and the memory attributes through preset weights, and using virtual segmentation under the condition that the grading value of the CPU attributes is not greater than that of the memory attributes; in the case where the scoring value of the CPU attribute is greater than the scoring value of the memory attribute, entity segmentation is used.
Wherein, CPU attributes refer to the performance parameters and characteristics of a Central Processing Unit (CPU). These attributes include: clock frequency, number of cores, number of threads, cache size, manufacturing process, power consumption, etc. Different CPUs have different attributes that directly affect the operating speed and stability of the computer system.
It should be noted that the memory attribute refers to characteristics and features of a memory unit in a computer system, including the following aspects: 1. capacity: indicating the size of the memory cells that can store data. Typically measured in bytes (bytes). 2. Speed of: indicating the speed at which the memory cell reads and writes data. Typically measured in terms of clock cycles or Bandwidth (Bandwidth). 3. Model: different types of memories have different physical size, voltage, working frequency and other parameters, and the optimal brand type is required to be selected according to the supporting condition of the main board, and is suitable for the use requirement and budget level of the personal computer. 4. Stability: stability refers to whether a memory module fails or crashes during long-term operation. Good quality guarantees high performance and durability generally mean higher prices. 5. Energy efficiency ratio: the lower power consumption indicates that the product is more environmentally friendly and reliable, and also indicates that a larger space is provided for CPU and graphics card manufacturers to innovate the design. 6. Extensibility-means how much additional capacity is allowed to be added under this type/brand/specification.
Processor scoring may be determined based on the clock frequency, the number of cores, the number of threads, and the weight value corresponding to the cache size in the CPU attribute.
For example, CPU functions are strongest when determining how much the weights of the individual parameters are based on the neural network model. Assuming that the weights corresponding to the clock frequency, the core number, the thread number and the buffer size are a1, a2, a3 and a4 respectively, the processor scores as follows: clock frequency (quantized) a1+core number a2+thread number a3+buffer size a4. And the same can determine the scoring value corresponding to the memory attribute.
Optionally, in the case that the scoring value of the CPU attribute is not greater than the scoring value of the memory attribute, virtual segmentation is used; in the case where the scoring value of the CPU attribute is greater than the scoring value of the memory attribute, entity segmentation is used.
For example, virtual partitioning includes the steps of:
Image loading: the picture needs to be loaded into the memory of the computer first.
Cutting and rotating: the shape of the picture may be changed by cutting or rotating or the like.
Painting and filling: colors or textures may be added to enrich the picture content.
Adding text/labels: words can be written into the pictures or tag description information can be added.
And (3) output preservation: and finally, outputting the modified new picture and storing the new picture on a hard disk.
And step S4, based on the frame rate, a block coordinate-based transition algorithm is scheduled to act on each sub-image block (or target transition block) frame by frame.
Specifically, two adjacent image frames are first selected as a transition start point and an end point (e.g., the start point represents a picture to be transitioned, and the end point represents a target transition picture). The difference between the two selected frames is then calculated to determine what type of transition is required. For example, if the difference is small, a fade effect may be used; if the difference is large, more complex effects of curling or rotation or the like can be used. The length of time each image frame occupies in the play sequence is then determined. This may involve calculating compression ratio based on video duration and target output file size. Again a "schedule" is created based on the length of time each image frame takes in the play sequence, containing all the images to be displayed and their duration information. In addition, sufficient space should be left for the intended transitional effect. Finally, a dynamic scheduler is implemented using a priority-based queue or other similar data structure to ensure that the various content is properly played in a schedule order and to perform transitional effects.
Optionally, the transition algorithm refers to gradually fading out all sub-image blocks based on a certain rule and a follow-up main time line, and finally completely displaying the next scene.
Optionally, the transition algorithm is composed of a sub-image block fade algorithm and a block execution rule, and specific combination of the sub-image block fade algorithm and the block execution rule can correspond to various common transition special effects.
Among them, common transition algorithms are as follows: sub-image blocks are sequentially alpha faded (obliquely revealed) from top left to bottom right and are of the same priority in rows and columns; translating the sub-image block batch inwards from the outer ring + fade out (collapse); odd-even interlacing, sub-image blocks are sequentially flashed white (shutter).
As an alternative example, a frame rate based transition algorithm comprises the steps of:
Step S41, determining a start position and a target position of each sub-image block (or target transition block). These locations may be designed according to specific needs, such as left to right, top to bottom, etc.
Step S42, determining the transition time of each sub-image block according to the frame rate. The transition time may be calculated from the frame rate, such as in the case of 30 frames per second, the transition time per frame being 1/30 second.
In step S43, in each frame, the position where each sub-image block should be is calculated according to the current frame number and the transition time of each sub-image block. The sub-image blocks may be transitioned from the starting position to the target position using linear interpolation or other interpolation methods.
In step S44, the position of each sub-image block is updated so that transition display is continued in the next frame.
Step S45, repeating steps S43 and S44 until each sub-image block reaches the target position.
By this frame rate based transition algorithm, each sub-image block will transition from the start position to the target position frame by frame, thereby achieving the effect of acting on each sub-image block frame by frame.
Step S5, gradually executing along with the transition algorithm, and replacing more and more areas in the picture with the next scene. And finally, finishing the whole transition, and stopping the animation.
It should be noted that a transition algorithm is a technique for video editing, which can smoothly transition one video clip to another.
The transition algorithm completely adopts real-time calculation, and the transition process is controllable, can be suspended, can be continued and is reversible.
As an alternative example, the real-time algorithm comprises the steps of:
In step S51, feature point matching (e.g. detecting the same or similar target objects) is performed on the first picture (e.g. the picture to be transferred) and the second picture (e.g. the target transferred picture), i.e. the same key points in the two pictures are found. The matching may be performed using the ORB, SIFT, etc. algorithms provided in OpenCV.
Step S52, a transformation matrix is calculated according to the found characteristic points, wherein the transformation matrix comprises transformation information such as rotation, translation, scaling and the like. The first picture can then be affine transformed by the transformation matrix to gradually transition to the second picture to be skipped.
In step S53, the above process is presented with animation effects, such as effects of fade-in and fade-out, sliding, rotation, etc. And loading the target page after the transition is completed, and carrying out layout and initialization operation on the new page. And finally, clearing the temporary data and releasing the resources.
In step S54, the real-time algorithm allows for smooth and variable time length transitions between different types, wherein the real-time algorithm can be adapted to various requirements quickly by simply modifying the parameters without predefining a large number of fixed mode transition effects.
Optionally, the pre-rendered content is cached, or pre-rendered content for the next page is loaded in advance for later use.
According to the embodiment of the invention, when the actual animation is executed, only two layers are needed to be rendered, and the performance is higher than that of a mask scheme; the preprocessing part can support performance optimization in two directions, and further meets the performance requirement of the subdivision scene; each portion of the animation is calculated in real time (the "effect" of the mask mode is usually pre-rendered), and can be controlled by software in real time, so as to increase interaction schemes such as pause, acceleration and the like.
According to the embodiment of the invention, the current picture can be acquired at any time, and the instant screen capturing of the animation starting moment is supported, or the dynamic effect of the interface is compatible in a real-time mode, so that more use scenes can be dealt with.
In the above embodiment of the present invention, the sub-image block (e.g., the target transition block) may apply a richer transformation effect. Any bitmap array transform, 3d transform, canvas modifier attribute transform, etc. are supported. After combination, the common transition effect of prerendering such as superposition, image dividing, multi-picture dividing and the like can be realized.
In the above embodiment of the present invention, the three steps of image source, preprocessing, and transfer algorithm are independent from each other, and can be freely matched after standardized docking.
According to the embodiment of the present invention, a picture transition device is provided, and it should be noted that the picture transition device may be used to execute the picture transition method in the embodiment of the present invention, and the picture transition method in the embodiment of the present invention may be executed in the picture transition device.
Fig. 3 is a schematic diagram of a picture transition apparatus according to an embodiment of the present invention, and as shown in fig. 3, the apparatus may include: an acquisition module 32, configured to acquire a picture to be transitioned; the selecting module 34 is configured to select a target transition template from a plurality of preset transition templates in a preset transition template library, where each preset transition template is preset with a corresponding preset transition action, and each preset transition template includes: the system comprises a plurality of preset transition blocks for executing preset transition actions, wherein each preset transition block is used for accommodating a preset transition sub-picture of a corresponding region in a preset transition picture; the dividing module 36 is configured to divide the to-be-converted picture into a plurality of to-be-converted sub-pictures, where the to-be-converted sub-pictures are in one-to-one correspondence with the target conversion blocks in the target conversion template; the filling module 38 is configured to fill the plurality of sub-frames to be transcoded into corresponding target transcoding blocks to obtain a target transcoding animation, where the target transcoding animation represents that the plurality of target transcoding blocks containing the sub-frames to be transcoded perform the target transcoding action.
It should be noted that, the acquiring module 32 in this embodiment may be used to perform step S102 in the embodiment of the present application, the selecting module 34 in this embodiment may be used to perform step S104 in the embodiment of the present application, the dividing module 36 in this embodiment may be used to perform step S106 in the embodiment of the present application, and the filling module 38 in this embodiment may be used to perform step S108 in the embodiment of the present application. The above modules are the same as examples and application scenarios implemented by the corresponding steps, but are not limited to what is disclosed in the above embodiments.
In the embodiment of the invention, a picture to be transferred is obtained; selecting a target transition template from a plurality of preset transition templates in a preset transition template library, wherein each preset transition template is preset with a corresponding preset transition action, and each preset transition template comprises: the system comprises a plurality of preset transition blocks for executing preset transition actions, wherein each preset transition block is used for accommodating a preset transition sub-picture of a corresponding region in a preset transition picture; dividing a picture to be converted into a plurality of sub pictures to be converted, wherein the sub pictures to be converted correspond to target conversion blocks in a target conversion template one by one; and filling the plurality of to-be-turned sub-pictures into the corresponding target transition blocks to obtain target transition pictures, wherein the target transition pictures represent the plurality of target transition blocks containing the to-be-turned sub-pictures to execute target transition actions, so that the to-be-turned pictures can be divided into the plurality of to-be-turned sub-pictures, and after the plurality of to-be-turned sub-pictures are respectively put into the corresponding target transition blocks, different transition effects can be displayed by controlling the transition actions of the target transition blocks, the technical effect of the transition effects of the abundant transition pictures is realized, and the technical problem of single transition effect of the existing transition pictures is solved.
As an alternative embodiment, the obtaining module includes: the first identification unit is used for identifying the image type of the interface image in the interface to be transited, wherein the image type comprises: a first type representing the interface image as a local image and a second type representing the interface image as a remote image; the reading unit is used for reading the local image of the interface to be converted under the condition that the interface image is of a first type, and determining the read local image as a picture to be converted; and the downloading unit is used for downloading the remote image of the interface to be converted under the condition that the interface image is of the second type, and determining the downloaded remote image as the picture to be converted.
As an alternative embodiment, the apparatus further comprises: and the intercepting unit is used for intercepting a screen picture of a screen where the interface to be converted is positioned under the condition that the interface image is not allowed to be read/downloaded from the interface to be converted before the image type of the interface image in the interface to be converted is identified, so as to obtain the screen picture to be converted.
As an alternative embodiment, the selection module comprises: the detection unit is used for detecting a target object of which the picture to be converted is the same as or similar to the target conversion picture, wherein the target conversion picture is a picture after the picture to be converted is converted, and the size of the picture to be converted is the same as that of the target conversion picture; the second identification unit is used for identifying a first position of the target object in the picture to be converted and a second position of the target object in the target conversion picture; the selection unit is used for selecting a preset transition template which enables the target object to move from the first position to the second position from the preset transition template library as a target transition template.
As an alternative embodiment, the segmentation module comprises: the device comprises an acquisition unit, a target transition template and a target transition template, wherein the acquisition unit is used for acquiring a preset transition picture corresponding to the target transition template, and the preset transition picture comprises: a preset dividing line for dividing a preset transition picture into a plurality of preset transition sub-pictures; the adjusting unit is used for adjusting the size of the picture to be transferred to obtain a picture to be segmented, wherein the size of the picture to be segmented is the same as that of a preset transferred picture; the covering unit is used for covering the preset transition picture on the picture to be segmented; the dividing unit is used for dividing the picture to be divided according to a preset dividing line in the preset transition picture to obtain a plurality of sub pictures to be transitioned.
As an alternative embodiment, the apparatus further comprises: the method comprises the steps of obtaining a sub-unit, after dividing a picture to be divided according to a preset dividing line in a preset transition picture to obtain a plurality of sub-pictures to be transitioned, obtaining picture identification of each preset transition sub-picture in the preset transition picture, wherein the picture identification is used for representing the corresponding relation between the preset transition sub-picture and a target transition block in a target transition template; and the distribution subunit is used for distributing the picture identification of each preset transition picture to the sub-picture to be transitioned covered by the preset transition picture.
As an alternative embodiment, the apparatus further comprises: the detection sub-module is used for detecting a processor and a memory of the terminal before dividing the picture to be converted into a plurality of sub-pictures to be converted to obtain a processor score and a memory score, wherein the terminal is used for converting the picture to be converted; the first determining submodule is used for determining that the picture to be transferred uses virtual segmentation under the condition that the processor score is not larger than the memory score, wherein the virtual segmentation indicates that the segmentation process occupies memory resources; and the second determining submodule is used for determining that the picture to be transferred uses entity segmentation under the condition that the processor score is larger than the memory score, wherein the entity segmentation indicates that the segmentation process occupies processor resources.
Embodiments of the present invention may provide a computer terminal, which may be any one of a group of computer terminals. Alternatively, in the present embodiment, the above-described computer terminal may be replaced with a terminal device such as a mobile terminal.
Alternatively, in this embodiment, the above-mentioned computer terminal may be located in at least one network device among a plurality of network devices of the computer network.
In this embodiment, the above-mentioned computer terminal may execute the program code of the following steps in the screen transition method: acquiring a picture to be transferred; selecting a target transition template from a plurality of preset transition templates in a preset transition template library, wherein each preset transition template is preset with a corresponding preset transition action, and each preset transition template comprises: the system comprises a plurality of preset transition blocks for executing preset transition actions, wherein each preset transition block is used for accommodating a preset transition sub-picture of a corresponding region in a preset transition picture; dividing a picture to be converted into a plurality of sub pictures to be converted, wherein the sub pictures to be converted correspond to target conversion blocks in a target conversion template one by one; and filling the plurality of sub-pictures to be converted into corresponding target transition blocks to obtain target transition animation, wherein the target transition animation represents that the plurality of target transition blocks containing the sub-pictures to be converted execute target transition actions.
Alternatively, fig. 4 is a block diagram of a computer terminal according to an embodiment of the present invention. As shown in fig. 4, the computer terminal 40 may include: one or more (only one is shown) processors 42, and memory 44.
The memory may be used to store software programs and modules, such as program instructions/modules corresponding to the method and apparatus for image transition in the embodiments of the present invention, and the processor executes the software programs and modules stored in the memory, thereby executing various functional applications and data processing, that is, implementing the method for image transition described above. The memory may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory may further include memory remotely located with respect to the processor, which may be connected to the terminal 40 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The processor may call the information and the application program stored in the memory through the transmission device to perform the following steps: acquiring a picture to be transferred; selecting a target transition template from a plurality of preset transition templates in a preset transition template library, wherein each preset transition template is preset with a corresponding preset transition action, and each preset transition template comprises: the system comprises a plurality of preset transition blocks for executing preset transition actions, wherein each preset transition block is used for accommodating a preset transition sub-picture of a corresponding region in a preset transition picture; dividing a picture to be converted into a plurality of sub pictures to be converted, wherein the sub pictures to be converted correspond to target conversion blocks in a target conversion template one by one; and filling the plurality of sub-pictures to be converted into corresponding target transition blocks to obtain target transition animation, wherein the target transition animation represents that the plurality of target transition blocks containing the sub-pictures to be converted execute target transition actions.
Optionally, the above processor may further execute program code for: identifying an image type of an interface image in the interface to be transitioned, wherein the image type comprises: a first type representing the interface image as a local image and a second type representing the interface image as a remote image; reading a local image of an interface to be converted under the condition that the interface image is of a first type, and determining the read local image as a picture to be converted; and downloading the remote image of the interface to be converted under the condition that the interface image is of the second type, and determining the downloaded remote image as a picture to be converted.
Optionally, the above processor may further execute program code for: and under the condition that the interface image is not allowed to be read/downloaded from the interface to be converted, intercepting a screen picture of a screen where the interface to be converted is positioned, and obtaining the picture to be converted.
Optionally, the above processor may further execute program code for: detecting a target object of which the picture to be converted is the same as or similar to the target conversion picture, wherein the target conversion picture is a picture after the picture to be converted is converted, and the size of the picture to be converted is the same as that of the target conversion picture; identifying a first position of a target object in a picture to be transferred and a second position of the target object in the target transfer picture; and selecting a preset transition template for enabling the target object to move from the first position to the second position from the preset transition template library as a target transition template.
Optionally, the above processor may further execute program code for: obtaining a preset transition picture corresponding to a target transition template, wherein the preset transition picture comprises: a preset dividing line for dividing a preset transition picture into a plurality of preset transition sub-pictures; the method comprises the steps of adjusting the size of a picture to be converted to obtain a picture to be segmented, wherein the size of the picture to be segmented is the same as that of a preset conversion picture; covering a preset transition picture on a picture to be segmented; dividing the picture to be divided according to a preset dividing line in the preset transition picture to obtain a plurality of sub pictures to be transitioned.
Optionally, the above processor may further execute program code for: dividing a picture to be divided according to a preset dividing line in a preset transition picture to obtain a plurality of sub-pictures to be transitioned, and then obtaining picture identification of each preset sub-picture to be transitioned in the preset transition picture, wherein the picture identification is used for representing the corresponding relation between the preset sub-picture to be transitioned and a target transition block in a target transition template; and distributing the picture identification of each preset transition picture to the sub-picture to be transitioned covered by the preset transition picture.
Optionally, the above processor may further execute program code for: before dividing a picture to be converted into a plurality of sub pictures to be converted, detecting a processor and a memory of a terminal to obtain a processor score and a memory score, wherein the terminal is used for converting the picture to be converted; under the condition that the processor score is not greater than the memory score, determining that the picture to be transferred uses virtual segmentation, wherein the virtual segmentation indicates that the segmentation process occupies memory resources; and under the condition that the processor score is larger than the memory score, determining that the picture to be transferred uses entity segmentation, wherein the entity segmentation indicates that the segmentation process occupies processor resources.
By adopting the embodiment of the invention, a picture transition scheme is provided. In the embodiment of the invention, a picture to be transferred is obtained; selecting a target transition template from a plurality of preset transition templates in a preset transition template library, wherein each preset transition template is preset with a corresponding preset transition action, and each preset transition template comprises: the system comprises a plurality of preset transition blocks for executing preset transition actions, wherein each preset transition block is used for accommodating a preset transition sub-picture of a corresponding region in a preset transition picture; dividing a picture to be converted into a plurality of sub pictures to be converted, wherein the sub pictures to be converted correspond to target conversion blocks in a target conversion template one by one; and filling the plurality of to-be-turned sub-pictures into the corresponding target transition blocks to obtain target transition pictures, wherein the target transition pictures represent the plurality of target transition blocks containing the to-be-turned sub-pictures to execute target transition actions, so that the to-be-turned pictures can be divided into the plurality of to-be-turned sub-pictures, and after the plurality of to-be-turned sub-pictures are respectively put into the corresponding target transition blocks, different transition effects can be displayed by controlling the transition actions of the target transition blocks, the technical effect of the transition effects of the abundant transition pictures is realized, and the technical problem of single transition effect of the existing transition pictures is solved.
It will be appreciated by those skilled in the art that the structure shown in fig. 4 is only illustrative, and the computer terminal may be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, a Mobile internet device (Mobile INTERNET DEVICES, MID), a PAD, etc. Fig. 4 is not limited to the structure of the electronic device. For example, the computer terminal 40 may also include more or fewer components (e.g., network interfaces, display devices, etc.) than shown in FIG. 4, or have a different configuration than shown in FIG. 4.
Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be implemented by a program for instructing a terminal device to execute on hardware associated with the terminal device, the program may be stored in a nonvolatile storage medium, and the nonvolatile storage medium may include: flash disk, read-only memory (ROM), random-access memory (Random Access Memory, RAM), magnetic disk or optical disk, etc.
Embodiments of the present invention also provide a nonvolatile storage medium. Alternatively, in the present embodiment, the above-described nonvolatile storage medium may be used to store the program code executed by the screen transition method provided in the above-described embodiment.
Alternatively, in this embodiment, the above-mentioned nonvolatile storage medium may be located in any one of the computer terminals in the computer terminal group in the computer network, or in any one of the mobile terminals in the mobile terminal group.
Optionally, in the present embodiment, the non-volatile storage medium is arranged to store program code for performing the steps of: acquiring a picture to be transferred; selecting a target transition template from a plurality of preset transition templates in a preset transition template library, wherein each preset transition template is preset with a corresponding preset transition action, and each preset transition template comprises: the system comprises a plurality of preset transition blocks for executing preset transition actions, wherein each preset transition block is used for accommodating a preset transition sub-picture of a corresponding region in a preset transition picture; dividing a picture to be converted into a plurality of sub pictures to be converted, wherein the sub pictures to be converted correspond to target conversion blocks in a target conversion template one by one; and filling the plurality of sub-pictures to be converted into corresponding target transition blocks to obtain target transition animation, wherein the target transition animation represents that the plurality of target transition blocks containing the sub-pictures to be converted execute target transition actions.
Optionally, in the present embodiment, the non-volatile storage medium is arranged to store program code for performing the steps of: identifying an image type of an interface image in the interface to be transitioned, wherein the image type comprises: a first type representing the interface image as a local image and a second type representing the interface image as a remote image; reading a local image of an interface to be converted under the condition that the interface image is of a first type, and determining the read local image as a picture to be converted; and downloading the remote image of the interface to be converted under the condition that the interface image is of the second type, and determining the downloaded remote image as a picture to be converted.
Optionally, in the present embodiment, the non-volatile storage medium is arranged to store program code for performing the steps of: and under the condition that the interface image is not allowed to be read/downloaded from the interface to be converted, intercepting a screen picture of a screen where the interface to be converted is positioned, and obtaining the picture to be converted.
Optionally, in the present embodiment, the non-volatile storage medium is arranged to store program code for performing the steps of: detecting a target object of which the picture to be converted is the same as or similar to the target conversion picture, wherein the target conversion picture is a picture after the picture to be converted is converted, and the size of the picture to be converted is the same as that of the target conversion picture; identifying a first position of a target object in a picture to be transferred and a second position of the target object in the target transfer picture; and selecting a preset transition template for enabling the target object to move from the first position to the second position from the preset transition template library as a target transition template.
Optionally, in the present embodiment, the non-volatile storage medium is arranged to store program code for performing the steps of: obtaining a preset transition picture corresponding to a target transition template, wherein the preset transition picture comprises: a preset dividing line for dividing a preset transition picture into a plurality of preset transition sub-pictures; the method comprises the steps of adjusting the size of a picture to be converted to obtain a picture to be segmented, wherein the size of the picture to be segmented is the same as that of a preset conversion picture; covering a preset transition picture on a picture to be segmented; dividing the picture to be divided according to a preset dividing line in the preset transition picture to obtain a plurality of sub pictures to be transitioned.
Optionally, in the present embodiment, the non-volatile storage medium is arranged to store program code for performing the steps of: dividing a picture to be divided according to a preset dividing line in a preset transition picture to obtain a plurality of sub-pictures to be transitioned, and then obtaining picture identification of each preset sub-picture to be transitioned in the preset transition picture, wherein the picture identification is used for representing the corresponding relation between the preset sub-picture to be transitioned and a target transition block in a target transition template; and distributing the picture identification of each preset transition picture to the sub-picture to be transitioned covered by the preset transition picture.
Optionally, in the present embodiment, the non-volatile storage medium is arranged to store program code for performing the steps of: before dividing a picture to be converted into a plurality of sub pictures to be converted, detecting a processor and a memory of a terminal to obtain a processor score and a memory score, wherein the terminal is used for converting the picture to be converted; under the condition that the processor score is not greater than the memory score, determining that the picture to be transferred uses virtual segmentation, wherein the virtual segmentation indicates that the segmentation process occupies memory resources; and under the condition that the processor score is larger than the memory score, determining that the picture to be transferred uses entity segmentation, wherein the entity segmentation indicates that the segmentation process occupies processor resources.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
In the foregoing embodiments of the present invention, the descriptions of the embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed technology may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and the division of the units, for example, may be a logic function division, and may be implemented in another manner, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
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 non-volatile 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 non-volatile storage medium, including instructions for causing a computer device (which may be a personal computer, a server, a network device, or the like) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned nonvolatile storage medium includes: a usb disk, a read-only memory (ROM), a random access memory (RAM, random Access Memory), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely a preferred embodiment of the present invention and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present invention, which are intended to be comprehended within the scope of the present invention.

Claims (10)

1. A picture transition method, comprising:
Acquiring a picture to be transferred;
Selecting a target transition template from a plurality of preset transition templates in a preset transition template library, wherein each preset transition template is preset with a corresponding preset transition action, and each preset transition template comprises: the preset transition blocks are used for executing the preset transition actions, and each preset transition block is used for accommodating a preset transition sub-picture of a corresponding region in a preset transition picture;
Dividing the picture to be converted into a plurality of sub pictures to be converted, wherein the sub pictures to be converted are in one-to-one correspondence with target conversion blocks in the target conversion template;
And filling the plurality of sub-pictures to be converted into corresponding target conversion blocks to obtain target conversion animation, wherein the target conversion animation represents that the plurality of target conversion blocks containing the sub-pictures to be converted execute target conversion actions.
2. The method of claim 1, wherein obtaining a picture to be transitioned comprises:
Identifying an image type of an interface image in an interface to be transitioned, wherein the image type comprises: a first type representing the interface image as a local image and a second type representing the interface image as a remote image;
Reading a local image of the interface to be converted under the condition that the interface image is of a first type, and determining the read local image as the picture to be converted;
And downloading the remote image of the interface to be converted under the condition that the interface image is of the second type, and determining the downloaded remote image as the picture to be converted.
3. The method of claim 2, wherein prior to identifying the image type of the interface image in the interface to be transcoded, the method further comprises:
and under the condition that the interface image is not allowed to be read/downloaded from the interface to be converted, intercepting a screen picture of a screen where the interface to be converted is positioned, and obtaining the screen picture to be converted.
4. The method of claim 1, wherein selecting a target transition template from a plurality of preset transition templates of a library of preset transition templates comprises:
detecting a target object, wherein the target object is the same as or similar to the to-be-transferred image, and the to-be-transferred image is the image subjected to transfer of the to-be-transferred image, and the to-be-transferred image and the target transfer image are the same in size;
identifying a first position of the target object in the picture to be converted and a second position of the target object in the target conversion picture;
And selecting a preset transition template for enabling the target object to move from the first position to the second position from the preset transition template library as the target transition template.
5. The method of claim 1, wherein partitioning the picture to be transitioned into a plurality of sub-pictures to be transitioned comprises:
obtaining a preset transition picture corresponding to a target transition template, wherein the preset transition picture comprises: a preset dividing line for dividing the preset transition picture into a plurality of preset transition sub-pictures;
the size of the picture to be transferred is adjusted to obtain a picture to be segmented, wherein the size of the picture to be segmented is the same as that of the preset transfer picture;
Covering the preset transition picture on the picture to be segmented;
and dividing the picture to be divided according to a preset dividing line in the preset transition picture to obtain a plurality of sub pictures to be transitioned.
6. The method according to claim 5, wherein after dividing the picture to be divided according to a preset division line in the preset transition picture to obtain a plurality of sub-pictures to be transitioned, the method further comprises:
acquiring a picture identifier of each preset transition picture in the preset transition pictures, wherein the picture identifier is used for representing the corresponding relation between the preset transition picture and a target transition block in the target transition template;
And distributing the picture identification of each preset transition picture to the sub-picture to be transitioned covered by the preset transition picture.
7. The method of claim 1, wherein prior to dividing the picture to be transitioned into the plurality of sub-pictures to be transitioned, the method further comprises:
detecting a processor and a memory of a terminal to obtain a processor score and a memory score, wherein the terminal is used for performing transition by using the picture to be transitioned;
determining that the picture to be transferred uses virtual segmentation under the condition that the processor score is not greater than the memory score, wherein the virtual segmentation indicates that the segmentation process occupies memory resources;
And under the condition that the processor score is larger than the memory score, determining that the picture to be transferred uses entity segmentation, wherein the entity segmentation indicates that the segmentation process occupies processor resources.
8. A picture transition apparatus, comprising:
the acquisition module is used for acquiring a picture to be transferred;
The selection module is used for selecting a target transition template from a plurality of preset transition templates in a preset transition template library, wherein each preset transition template is preset with a corresponding preset transition action, and each preset transition template comprises: the preset transition blocks are used for executing the preset transition actions, and each preset transition block is used for accommodating a preset transition sub-picture of a corresponding region in a preset transition picture;
the segmentation module is used for segmenting the picture to be converted into a plurality of sub pictures to be converted, wherein the sub pictures to be converted are in one-to-one correspondence with the target conversion blocks in the target conversion template;
and the filling module is used for filling the plurality of sub-pictures to be converted into corresponding target conversion blocks to obtain target conversion animation, wherein the target conversion animation represents that the plurality of target conversion blocks containing the sub-pictures to be converted execute target conversion actions.
9. A non-volatile storage medium for storing a program, wherein the program, when executed, controls a device in which the non-volatile storage medium is located to perform the picture transition method of any one of claims 1 to 7.
10. An electronic device, comprising: a memory and a processor for executing a program stored in the processor, wherein the program is executed to perform the picture transition method of any one of claims 1 to 7.
CN202410070391.8A 2024-01-17 2024-01-17 Picture transition method and device, nonvolatile storage medium and electronic equipment Pending CN117893644A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410070391.8A CN117893644A (en) 2024-01-17 2024-01-17 Picture transition method and device, nonvolatile storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410070391.8A CN117893644A (en) 2024-01-17 2024-01-17 Picture transition method and device, nonvolatile storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN117893644A true CN117893644A (en) 2024-04-16

Family

ID=90639436

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410070391.8A Pending CN117893644A (en) 2024-01-17 2024-01-17 Picture transition method and device, nonvolatile storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN117893644A (en)

Similar Documents

Publication Publication Date Title
EP4198909A1 (en) Image rendering method and apparatus, and computer device and storage medium
US9607357B2 (en) Image processing device for displaying moving image and image processing method thereof
CN110557625A (en) live virtual image broadcasting method, terminal, computer equipment and storage medium
CN111899322B (en) Video processing method, animation rendering SDK, equipment and computer storage medium
CN111899155B (en) Video processing method, device, computer equipment and storage medium
US11410377B2 (en) Lightweight view dependent rendering system for mobile devices
CN115908644A (en) Animation processing method and device
CN112057851A (en) Multi-display-card-based real-time rendering method for single-frame picture
EP3923585A1 (en) Video transcoding method and device
US12014452B2 (en) Web-based digital image editing in real time utilizing a latent vector stream renderer and an image modification neural network
CN114598937B (en) Animation video generation and playing method and device
US20230022344A1 (en) System and method for dynamic images virtualisation
CN114222185B (en) Video playing method, terminal equipment and storage medium
CN115719399A (en) Object illumination editing method, system and medium based on single picture
CN107564084B (en) Method and device for synthesizing motion picture and storage equipment
CN117893644A (en) Picture transition method and device, nonvolatile storage medium and electronic equipment
CN116233532A (en) Video playing method, device, computer equipment and computer readable storage medium
KR102437726B1 (en) Apparatus and method for storing snack culture contents
CN114452645B (en) Method, apparatus and storage medium for generating scene image
KR102656674B1 (en) Method and apparatus for transforming input image based on target style and target corlor information
KR102701292B1 (en) An image processing method that synthesizes images by distinguishing backgrounds and objects
US20230328222A1 (en) Real-time multiview video conversion method and system
WO2024087971A1 (en) Method and apparatus for image processing, and storage medium
JP2012060612A (en) Data compression device, data decoding device, data compression method, data decoding method, and compressed dynamic image file data structure
CN118511506A (en) Method and system for multi-view video rendering, preparation of multi-view cache and real-time multi-view video conversion

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