CN112702655A - Media alignment method and media alignment device - Google Patents

Media alignment method and media alignment device Download PDF

Info

Publication number
CN112702655A
CN112702655A CN201911007045.0A CN201911007045A CN112702655A CN 112702655 A CN112702655 A CN 112702655A CN 201911007045 A CN201911007045 A CN 201911007045A CN 112702655 A CN112702655 A CN 112702655A
Authority
CN
China
Prior art keywords
media
target
alignment
coordinate
vertex
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
CN201911007045.0A
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.)
Xian Novastar Electronic Technology Co Ltd
Original Assignee
Xian Novastar Electronic Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xian Novastar Electronic Technology Co Ltd filed Critical Xian Novastar Electronic Technology Co Ltd
Priority to CN201911007045.0A priority Critical patent/CN112702655A/en
Publication of CN112702655A publication Critical patent/CN112702655A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/472End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content
    • H04N21/47205End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content for manipulating displayed content, e.g. interacting with MPEG-4 objects, editing locally
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering
    • H04N21/4312Generation of visual interfaces for content selection or interaction; Content or additional data rendering involving specific graphical features, e.g. screen layout, special fonts or colors, blinking icons, highlights or animations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/435Processing of additional data, e.g. decrypting of additional data, reconstructing software from modules extracted from the transport stream
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/81Monomedia components thereof

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the invention discloses a media alignment method and a media alignment device. The media alignment method comprises the following steps: displaying at least one media on the canvas; selecting a target medium from the at least one medium and acquiring a medium parameter of the target medium; acquiring an alignment reference of the target media, an alignment mode corresponding to the alignment reference and a reference parameter of the alignment reference; determining target vertex coordinates of the target media according to the reference parameters of the alignment reference, the alignment mode and the media parameters of the target media; and moving the target media according to the target vertex coordinates to align the target media according to the alignment mode. The embodiment of the invention improves the media alignment efficiency.

Description

Media alignment method and media alignment device
Technical Field
The present invention relates to the field of program editing technologies, and in particular, to a media alignment method and a media alignment apparatus.
Background
Currently, in a program editing scenario, a client typically needs to achieve alignment of media, such as images or videos, for example, achieve alignment of a diagonal of the media with a diagonal of a canvas, or achieve alignment of diagonals of multiple media with a diagonal of a certain media. However, in the prior art, the alignment can only be done by manually moving the media, and when the number of media on the canvas is large, the manual alignment is inefficient and it is difficult to ensure accurate alignment of the media.
Disclosure of Invention
Therefore, to overcome the defects and shortcomings of the prior art, embodiments of the present invention provide a media aligning method and a media aligning apparatus to improve the media aligning efficiency.
Specifically, in a first aspect, a media alignment method provided in an embodiment of the present invention includes: displaying at least one media on the canvas; selecting a target medium from the at least one medium and acquiring a medium parameter of the target medium; acquiring an alignment reference of the target media, an alignment mode corresponding to the alignment reference and a reference parameter of the alignment reference; determining target vertex coordinates of the target media according to the reference parameters of the alignment reference, the alignment mode and the media parameters of the target media; and moving the target media according to the target vertex coordinates to align the target media according to the alignment mode.
In the above scheme, by selecting the target media, determining the alignment reference of the target media and the alignment mode corresponding to the alignment reference, determining the target vertex coordinates of the target media according to the media parameter alignment mode of the target media and the reference parameters of the alignment reference, and then moving the target media according to the target vertex coordinates, the media are aligned according to the alignment mode, so that automatic alignment of the media is realized without manual operation, the media alignment step is simplified, the media alignment efficiency is improved, and the media alignment accuracy is ensured.
In one embodiment of the invention, the reference parameters include a reference vertex coordinate, a reference width, and a reference height of the alignment reference; the media parameters comprise media vertex coordinates, media width and media height of the target media; and the determining the target vertex coordinates of the target media according to the reference parameters of the alignment reference, the alignment mode and the media parameters of the target media comprises: determining an alignment line corresponding to the alignment mode according to the reference vertex coordinates, the reference width, the reference height and the alignment mode of the alignment reference; determining the coordinates of the media center point of the target media according to the media vertex coordinates, the media width and the media height of the target media; determining the target center point coordinate of the target media according to the alignment line and the media center point coordinate; and determining the target vertex coordinate of the target media according to the media vertex coordinate, the media center point coordinate and the target center point coordinate.
In an embodiment of the present invention, the alignment reference is the canvas, the alignment manner is a first diagonal alignment or a second diagonal alignment, and the alignment line is the first diagonal or the second diagonal of the canvas.
In one embodiment of the present invention, the determining the target vertex coordinates of the target media according to the media vertex coordinates, the media center point coordinates, and the target center point coordinates comprises: taking the abscissa of the media vertex coordinate as the abscissa of the target vertex coordinate; determining a vertical coordinate difference value between the vertical coordinate of the target central point coordinate and the vertical coordinate of the media central point coordinate; and adding the ordinate of the media vertex coordinate to the ordinate difference value to obtain the ordinate of the target vertex coordinate.
In an embodiment of the present invention, the alignment reference is a second target medium other than the target medium in the at least one medium, the alignment manner is a first diagonal alignment, a second diagonal alignment, a horizontal centerline alignment or a vertical centerline alignment, and the alignment line is the first diagonal, the second diagonal, the horizontal centerline or the vertical centerline of the second target medium.
In an embodiment of the present invention, when the alignment manner is the first diagonal alignment, the second diagonal alignment, or the horizontal center line alignment, the determining the target vertex coordinates of the target media according to the media vertex coordinates, the media center point coordinates, and the target center point coordinates includes: taking the abscissa of the media vertex coordinate as the abscissa of the target vertex coordinate; determining a vertical coordinate difference value between the vertical coordinate of the target central point coordinate and the vertical coordinate of the media central point coordinate; and adding the ordinate of the media vertex coordinate to the ordinate difference value to obtain the ordinate of the target vertex coordinate.
In an embodiment of the present invention, when the alignment manner is the alignment of the vertical center lines, the determining the target vertex coordinates of the target media according to the media vertex coordinates, the media center point coordinates, and the target center point coordinates includes: taking the ordinate of the media vertex coordinate as the ordinate of the target vertex coordinate; determining a horizontal coordinate difference value between the horizontal coordinate of the target central point coordinate and the horizontal coordinate of the media central point coordinate; and adding the abscissa of the media vertex coordinate to the abscissa difference value to obtain the abscissa of the target vertex coordinate.
In a second aspect, an embodiment of the present invention provides a media alignment apparatus, including: a media display module to display at least one media on the canvas; the target media selection module is used for selecting a target media from the at least one media and acquiring a media parameter of the target media; an alignment reference and alignment mode acquisition module, configured to acquire an alignment reference of the target media, an alignment mode corresponding to the alignment reference, and a reference parameter of the alignment reference; a target vertex coordinate determination module, configured to determine a target vertex coordinate of the target media according to the reference parameter of the alignment reference, the alignment manner, and the media parameter of the target media; and the target media moving module is used for moving the target media according to the target vertex coordinates so as to align the target media according to the alignment mode.
In the scheme, the alignment reference of the target media and the alignment mode corresponding to the alignment reference are determined by selecting the target media, the target vertex coordinates of the target media are determined according to the reference parameters of the alignment reference, the alignment mode and the media parameters of the target media, and then the target media is moved according to the target vertex coordinates, so that the media are aligned according to the alignment mode, automatic alignment of the media is realized without manual operation, the media alignment step is simplified, the media alignment efficiency is improved, and the media alignment accuracy is ensured.
In one embodiment of the invention, the reference parameters include a reference vertex coordinate, a reference width, and a reference height of the alignment reference; the media parameters comprise media vertex coordinates, media width and media height of the target media; and the target vertex coordinates determination module comprises: an alignment line determining unit, configured to determine an alignment line corresponding to the alignment mode according to the reference vertex coordinates, the reference width, the reference height, and the alignment mode of the alignment reference; the medium central point coordinate determination unit is used for determining the medium central point coordinate of the target medium according to the medium vertex coordinate, the medium width and the medium height of the target medium; the target central point coordinate determination unit is used for determining a target central point coordinate of the target media according to the alignment line and the media central point coordinate; and the target vertex coordinate determination unit is used for determining the target vertex coordinate of the target media according to the media vertex coordinate, the media center point coordinate and the target center point coordinate.
In an embodiment of the present invention, the alignment reference is the canvas, the alignment manner is a first diagonal alignment or a second diagonal alignment, and the alignment line is the first diagonal or the second diagonal of the canvas.
One or more of the above technical solutions may have the following advantages or beneficial effects: the method comprises the steps of selecting a target medium, determining an alignment reference of the target medium and an alignment line corresponding to the alignment reference, determining a target vertex coordinate of the target medium according to a reference parameter and the alignment line of the alignment reference and a medium parameter of the target medium, and then moving the target medium according to the target vertex coordinate, so that the medium is aligned with respect to the alignment line, automatic alignment of the medium is realized, manual operation is not needed, the step of medium alignment is simplified, the alignment efficiency of the medium is improved, and the accuracy of medium alignment is ensured.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart illustrating a media alignment method according to a first embodiment of the present invention.
Fig. 2A-2B are schematic diagrams illustrating alignment of a target media with respect to a canvas in a specific embodiment of a media alignment method according to a first embodiment of the present invention.
Fig. 3A-3D are schematic diagrams of a target medium with respect to medium alignment in an embodiment of a medium alignment method according to a first embodiment of the present invention.
Fig. 4A is a block diagram of a media alignment apparatus according to a second embodiment of the present invention.
Fig. 4B is a schematic diagram illustrating a specific unit structure of the target vertex coordinate determination module in fig. 4A.
Fig. 5 is a schematic structural diagram of a media alignment system according to a third embodiment of the present invention.
Fig. 6 is a schematic structural diagram of a computer storage medium according to a fourth embodiment of the present invention.
Detailed Description
It should be noted that the embodiments and features of the embodiments may be combined with each other in the present document without conflict. The invention will be described in connection with embodiments with reference to the drawings.
In order to make those skilled in the art better understand the technical solution of the present invention, the technical solution in the present embodiment will be clearly and completely described below with reference to the drawings in the present embodiment, and it is obvious that the described embodiment is only a part of the embodiments of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the terms so used are interchangeable under appropriate circumstances such that the embodiments described herein are capable of operation in sequences other than those illustrated or 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.
It should be noted that the division of the embodiments of the present invention is only for convenience of description and should not be construed as a limitation, and features of various embodiments may be combined and referred to each other without contradiction.
[ first embodiment ] A method for manufacturing a semiconductor device
Referring to fig. 1, a first embodiment of the invention provides a media alignment method. As shown in fig. 1, the media alignment method includes, for example, steps S102 to S110.
Step S102: displaying at least one media on the canvas;
step S104: selecting a target medium from the at least one medium and acquiring a medium parameter of the target medium;
step S106: acquiring an alignment reference of the target media, an alignment mode corresponding to the alignment reference and a reference parameter of the alignment reference;
step S108: determining target vertex coordinates of the target media according to the reference parameters of the alignment reference, the alignment mode and the media parameters of the target media; and
step S110: and moving the target media according to the target vertex coordinates to align the target media according to the alignment mode.
Specifically, in step S102, the canvas is a layer, which is, for example, on an operation interface of software such as program editing software. The mentioned media include images, videos, and the like.
The selecting of the target media from the at least one media in step S104 includes, for example: one or more target media are selected. The media parameters of the target media include media vertex coordinates, media width, and media height of the target media.
In step S106, the alignment reference may be a canvas or some media displayed on a canvas. For the case that the alignment reference is the canvas, the alignment mode is the first diagonal alignment or the second diagonal alignment, and the alignment line corresponding to the alignment mode is the first diagonal or the second diagonal of the canvas. The first diagonal line is a diagonal line from a top left corner vertex to a bottom right corner vertex of the canvas, and the second diagonal line is a diagonal line from the top left corner vertex to the top right corner vertex of the canvas; for a case where the alignment reference is a certain medium on the canvas, the alignment line corresponding to the alignment mode is a first diagonal line alignment, a second diagonal line alignment, a horizontal center line alignment, or a vertical center line alignment, and correspondingly, the alignment line is a first alignment line, a second alignment line, a horizontal center line, or a vertical center line, the first diagonal line is a diagonal line from a top left corner vertex to a bottom right corner vertex of the medium, the second diagonal line is a diagonal line from a bottom left corner to a top right corner vertex of the medium, the horizontal center line is a horizontal line passing through the center point of the medium, and the vertical center line is a vertical line passing through the center point of the medium.
In step S108, the reference parameters include a reference vertex coordinate, a reference width, and a reference height of the alignment reference; the media parameters comprise media vertex coordinates, media width and media height of the target media; and the determining the target vertex coordinates of the target media according to the reference parameters of the alignment reference, the alignment mode and the media parameters of the target media comprises: determining an alignment line corresponding to the alignment mode according to the reference vertex coordinates, the reference width, the reference height and the alignment mode of the alignment reference; determining the coordinates of the media center point of the target media according to the media vertex coordinates, the media width and the media height of the target media; determining the target center point coordinate of the target media according to the alignment line and the media center point coordinate; and determining the target vertex coordinate of the target media according to the media vertex coordinate, the media center point coordinate and the target center point coordinate.
In step S110, moving the target media according to the target vertex coordinates specifically includes: moving the target media such that coordinates of vertices of the target media are changed to the target vertex coordinates.
Wherein the aforementioned coordinates are, for example, relative coordinates with respect to the canvas. The canvas takes, for example, the upper left corner point as a reference point, and the coordinates of the reference point are, for example, default to (0, 0). In the embodiment of the invention, the reference vertex coordinate is the coordinate of a canvas or the upper left corner point of a reference medium, the medium vertex coordinate is the coordinate of the upper left corner point of the medium, the medium center point coordinate is the coordinate of the center point of the medium, the target center point coordinate is the coordinate of the center point after alignment of the target medium, and the target vertex coordinate is the coordinate of the upper left corner point after alignment of the target medium according to the alignment mode corresponding to the alignment reference.
For better understanding of the present embodiment, the media alignment method provided by the embodiment of the present invention is described in detail below with reference to fig. 2A to 2B and fig. 3A to 3D. The media alignment method provided by the embodiment of the invention can be executed on software such as program editing software.
In particular, FIG. 2A illustrates a case where the media is aligned with respect to a first diagonal of the canvas, diagonal 1 from the top left corner vertex to the bottom right corner vertex of the canvas. As shown in fig. 2A, at least one media 202 is displayed on the canvas 201, only one media is shown here as the target media 202 for illustrative purposes, in practical applications, multiple media 202 may be displayed, and multiple media may be selected as the target media to align with the first diagonal 1 of the canvas 201.
The vertex coordinates of canvas 201, point A in FIG. 2A1Has the coordinates of (X)A1,YA1) Wherein X isA1And YA1May for example all be 0, canvas height aHWidth of canvas is AW. The media vertex coordinates of the target media 202, i.e., the coordinates of the top left corner vertex of the target media 202, are B (X)B,YB) The target media 202 has a media height of BHThe medium width is BWWherein X isBAnd YBIs a relative coordinate value with respect to the vertex coordinate of the canvas.
When executing the media alignment method according to the embodiment of the present invention, the program editing software first determines the target media in response to a user operation, for example, and then determines an alignment reference and an alignment mode corresponding to the alignment reference in response to the user operation. As shown in fig. 2A, with the target media 202 as the target media and the canvas as the alignment reference, the corresponding alignment manner is that the first diagonal 1 is aligned, that is, the center point of the aligned target media 202 is located on the first diagonal 1 of the canvas 201. The program editing software can obtain an equation of an alignment line, namely a first diagonal line, according to the vertex coordinate, the height and the width of the canvas, specifically, according to the vertex coordinate A of the canvas1(XA1,YA1) Canvas height AHWidth of canvas AWAnother vertex of the first diagonal 1, point a in fig. 2A, may be determined2Coordinate (X) ofA2,YA2) Wherein X isA2=XA1+AW,YA2=YA2+AHThen according to A1、A2Can determine a first pairThe alignment equation for the corner line 1 is
Figure BDA0002243086300000081
Next, based on the media vertex coordinates B (X) of the target media 202B,YB) The medium height is BHThe medium width is BWDetermining a center point O of a target media 2021The coordinates of the center point of the medium are
Figure BDA0002243086300000082
Next, the target center point coordinates, i.e., the center point of the target media 202 after alignment, i.e., center point O in FIG. 2A, are determined according to the media center point coordinates and the alignment equation2In particular, the center O2Has the coordinates of
Figure BDA0002243086300000083
In the embodiment of the invention, for the first diagonal alignment mode, the target center point coordinate O2Abscissa of (a) and coordinate of center point of medium O1Are equal on the abscissa. Next, the program editing software is based on O1、O2Determines the difference in the ordinate, i.e. O2Ordinate of minus O1The ordinate of (a) is, that is,
Figure BDA0002243086300000091
next, the program editing software aligns the target media 202 vertex ordinate YBAdding the difference value of the vertical coordinates
Figure BDA0002243086300000092
Obtaining the target vertex ordinate
Figure BDA0002243086300000093
In the embodiment of the present invention, the target media vertex abscissa remains unchanged during the alignment process, and therefore, the target vertex coordinate of the target media 202, i.e., the vertex coordinate of the target media 202 after being aligned according to the first diagonal 1, is
Figure BDA0002243086300000094
Finally, the program editing software aligns the vertex coordinates of the target media 202 according to the determined alignment
Figure BDA0002243086300000095
Moving the target media 202, thereby moving the vertex B of the target media 202 to the point B1So that B is1Has an abscissa of XB1=XB,B1On the ordinate of
Figure BDA0002243086300000096
The final target media 202 is aligned according to the first diagonal 1.
FIG. 2B is a schematic diagram illustrating the process of aligning the target media 202 with respect to the second diagonal 2 of the canvas 201. first, the program editing software aligns the canvas according to its vertex coordinates A1(XA1,YA1) Canvas height AHWidth of canvas AWThe equation for the second diagonal 2 can be determined, specifically, first determine A in FIG. 2B3And A4Coordinate A of3(XA3,YA3) And A4(XA4,YA4) Then, the equation for the second diagonal 2 can be determined from the coordinates of these two points. And then based on the media vertex coordinates (X) of the target media 202B,YB) The medium height is BHThe medium width is BWDetermining a center point O of a target media 2021The coordinates of the center point of the medium are
Figure BDA0002243086300000097
Next, according to the media center point O1And the second diagonal 2 equation determines the target center point coordinates, i.e., the center point of the target media 202 after alignment, i.e., point O in fig. 2B2The coordinates of (a). Next, the program editing software is based on O1、O2Determines the difference in the ordinate, i.e. O2Ordinate of minus O1The ordinate of (c). Next, the program editing software aligns the target media 202 vertex ordinate YBAdding the difference value of the vertical coordinates to obtain the vertical coordinate of the target vertex. The abscissa of the vertex of the target media 202 remains unchanged during the alignment process, thereby obtaining the vertex B of the target media 202 after alignment according to the second diagonal 21Coordinate B of1(XB1,YB1). Finally, the program editing software moves the target media 202 according to the determined vertex coordinates of the aligned target media 202 to move the vertex B of the target media 202 to the point B1Such that the final implementation target media 202 is aligned according to the second diagonal 2.
FIG. 3A is a schematic diagram illustrating the process of aligning the target media 202 with respect to the first diagonal 3 of the media 203. first, the program editing software can obtain the equation of the aligned line, i.e. the first diagonal 3, according to the vertex coordinates, the canvas height and the canvas width of the media 203, and specifically, according to the vertex coordinates C of the media 2031(XC1,YC1) Canvas height CHWidth of canvas CWThe other vertex of the first diagonal 3, point C in fig. 2A, may be determined2Coordinate (X) ofC2,YC2) Wherein X isC2=XC1+CW,YC2=YC2+CHThen according to C1、C2May determine an alignment equation for the first diagonal 1 and then based on the media vertex coordinates B (X) of the target media 202B,YB) The medium height is BHThe medium width is BWDetermining a center point O of a target media 2021The coordinates of the center point of the medium are
Figure BDA0002243086300000101
Next, the target center point coordinates are determined from the alignment equation of the media center point coordinates and the first diagonal 3 of the media 203, that is, the center point of the target media 202 after alignment, that is, the point O in FIG. 3A2The coordinates of (a). Next, the program editing software is based on O1、O2Determines the difference in the ordinate, i.e. O2Ordinate of minus O1The ordinate of (c). Next, the program editing software aligns the target media 202 vertex ordinate YBAnd adding the ordinate difference value to obtain the target vertex ordinate. Target mediaThe vertex abscissa of the body 202 remains unchanged during alignment, thereby obtaining B1Coordinate B of1(XB1,YB1). Finally, the program editing software moves the target media 202 according to the determined vertex coordinates of the aligned target media 202 to move the vertex B of the target media 202 to the point B1So that the final achievement target media 202 is aligned according to the first diagonal 3.
FIG. 3B is a schematic diagram illustrating the process of aligning the target media 202 with respect to the second diagonal 4 of the media 203. first, the program editing software aligns the media 203 according to the vertex coordinates C of the media 2031(XC1,YC1) Canvas height CHWidth of canvas CWThe equation for the second diagonal 4 can be determined, specifically, C is first determined3And C4Coordinate C of3(XC3,YC3) And C4(XC4,YC4) The equation for the second diagonal 4 can then be determined from the coordinates of these two points. Then, according to the media vertex coordinates (X) of the target media 202B,YB) The medium height is BHThe medium width is BWDetermining a center point O of a target media 2021The coordinates of the center point of the medium are
Figure BDA0002243086300000111
Next, the target center point coordinates, i.e., the center point of the target media 202 after alignment, i.e., point O in FIG. 2B, are determined according to the equation of the media center point coordinates and the second diagonal line 42The coordinates of (a). Next, the program editing software is based on O1、O2Determines the difference in the ordinate, i.e. O2Ordinate of minus O1The ordinate of (c). Next, the program editing software adds the ordinate difference to the ordinate YB of the vertex of the target media 202 to obtain the target vertex ordinate. The abscissa of the vertex of the target media 202 remains unchanged during the alignment process, thereby obtaining B1Coordinate B of1(XB1,YB1). Finally, the program editing software moves the target media 202 according to the determined vertex coordinates of the aligned target media 202 to move the vertex B of the target media 202Move to point B1Such that the final implementation target media 202 is aligned according to the second diagonal 4.
Fig. 3C shows a schematic diagram of the process of aligning the target media 202 with respect to the horizontal centerline 5 of the media 203, i.e. the horizontal line of the media 203 passing through its center point. First, the program editing software calculates the vertex coordinates C of the medium 2031(XC1,YC1) Canvas height CHEquation for determining the horizontal centerline 5
Figure BDA0002243086300000112
Then, according to the media vertex coordinates (X) of the target media 202B,YB) The medium height is BHThe medium width is BWDetermining a center point O of a target media 2021The coordinates of the center point of the medium are
Figure BDA0002243086300000113
Next, the target center point coordinates are determined from the equation of the media center point coordinates and the horizontal center line 5, that is, the center point of the target media 202 after alignment, i.e., point O in FIG. 2B2Coordinates of (2)
Figure BDA0002243086300000114
Next, the program editing software is based on O1、O2Determines the difference in the ordinate, i.e. O2Ordinate of minus O1On the ordinate, i.e. the difference in the ordinate is
Figure BDA0002243086300000115
Next, the program editing software aligns the target media 202 vertex ordinate YBAdding the difference value of the vertical coordinates to obtain the vertical coordinate of the target vertex
Figure BDA0002243086300000116
The target vertex abscissa is kept unchanged in the alignment process, so that the target vertex B is obtained1Coordinate B of1(XB1,YB1). Finally, the program editing software aligns based on the determined alignmentVertex coordinate movement of target media 202 thereafter target media 202 moves vertex B of target media 202 to point target vertex B1So that the final achievement of the target media 202 is aligned according to the horizontal centerline 5.
Fig. 3D shows a schematic diagram of the process of aligning the target media 202 with respect to the vertical center line 6 of the media 203, i.e., the vertical line of the media 203 passing through its center point. First, the program editing software calculates the vertex coordinates C of the medium 2031(XC1,YC1) Canvas height CHEquation for determining the vertical centerline 6
Figure BDA0002243086300000121
Then, according to the media vertex coordinates (X) of the target media 202B,YB) The medium height is BHThe medium width is BWDetermining a center point O of a target media 2021The coordinates of the center point of the medium are
Figure BDA0002243086300000122
Next, the coordinates of the center point of the target are determined according to the coordinates of the center point of the medium and the equation of the vertical center line 6, that is, the center point of the target medium 202 after alignment, i.e., the point O in FIG. 2B2Coordinates of (2)
Figure BDA0002243086300000123
Next, the program editing software is based on O1、O2Determines the abscissa difference, i.e. O2Abscissa of minus O1The abscissa of (a), i.e. the difference between the abscissas is
Figure BDA0002243086300000124
Next, the program editing software maps the vertex abscissa X of the target media 202BAdding the difference value to obtain the target vertex abscissa
Figure BDA0002243086300000125
The vertical coordinates of the vertices of the target media 202 remain unchanged during the alignment process, thereby obtaining the target vertex B1Coordinate B of1(XB1,YB1). Finally, the program editing software moves the target media 202 according to the determined vertex coordinates of the aligned target media 202 to move the vertex B of the target media 202 to the point target vertex B1Such that the final achievement target media 202 is aligned according to the vertical centerline 6.
It should be noted that, in the embodiment of the present invention, for the alignment modes, such as the first diagonal alignment and the second diagonal alignment, whether the alignment reference is a canvas or some media on the canvas, the moving mode of the target media is the abscissa is unchanged, and determining the ordinate of the target media after the alignment movement according to the determined corresponding alignment line, thereby moving the target media to achieve either the first diagonal alignment or the second diagonal alignment based on the determined target vertex coordinates of the target media, however, alternatively, for the first diagonal alignment and the second diagonal alignment, it is also possible that the target media is moved in such a way that the ordinate remains unchanged, and determining the abscissa of the target media after the alignment movement according to the determined corresponding alignment line, and then moving the target media according to the determined target vertex coordinates of the target media to realize the first diagonal alignment or the second diagonal alignment.
In summary, in the media alignment method provided in this embodiment, the target media is selected, the alignment reference of the target media and the alignment line corresponding to the alignment reference are determined, the target vertex coordinates of the target media are determined according to the reference parameters and the alignment line of the alignment reference and the media parameters of the target media, and then the target media is moved according to the target vertex coordinates, so that the media are aligned with respect to the alignment line, automatic alignment of the media is achieved without manual operation, the media alignment step is simplified, the media alignment efficiency is improved, and the media alignment accuracy is ensured.
[ second embodiment ]
As shown in fig. 4A, a second embodiment of the invention provides a media alignment apparatus 300. The media alignment apparatus 300 includes, for example, a media display module 302, a target media selection module 304, an alignment reference and alignment acquisition module 306, a target vertex coordinate determination module 308, and a target media movement module 310.
In particular, a media display module 302 for displaying at least one media on a canvas;
a target media selecting module 304, configured to select a target media from the at least one media and obtain a media parameter of the target media;
an alignment reference and alignment mode obtaining module 306, configured to obtain an alignment reference of the target media, an alignment mode corresponding to the alignment reference, and a reference parameter of the alignment reference;
a target vertex coordinate determining module 308, configured to determine a target vertex coordinate of the target media according to the reference parameter of the alignment reference, the alignment manner, and the media parameter of the target media; and
and the target media moving module 310 is configured to move the target media according to the target vertex coordinates, so that the target media are aligned according to the alignment manner.
In one embodiment of the invention, the reference parameters include a reference vertex coordinate, a reference width, and a reference height of the alignment reference; the media parameters include media vertex coordinates, media width, and media height of the target media. As shown in fig. 4B, the target vertex coordinates determination module 308 includes: an alignment line determining unit 3082, configured to determine an alignment line corresponding to the alignment manner according to the reference vertex coordinates, the reference width, the reference height, and the alignment manner of the alignment reference; a medium center point coordinate determining unit 3084, configured to determine a medium center point coordinate of the target medium according to the medium vertex coordinate, the medium width, and the medium height of the target medium; a target center point coordinate determination unit 3086, configured to determine a target center point coordinate of the target media according to the alignment line and the media center point coordinate; and a target vertex coordinate determination unit 3088 for determining the target vertex coordinate of the target media according to the media vertex coordinate, the media center point coordinate, and the target center point coordinate.
In an embodiment of the present invention, the alignment reference is the canvas, the alignment manner is a first diagonal alignment or a second diagonal alignment, and the alignment line is the first diagonal or the second diagonal of the canvas.
The specific working process and technical effects between the modules in the media alignment apparatus 300 in this embodiment are described in the foregoing first embodiment.
[ third embodiment ]
As shown in fig. 5, a third embodiment of the invention provides a media alignment system 400. The media alignment system 400 includes, for example, a memory 410 and a processor 430 coupled to the memory 410. The memory 410 may be, for example, a non-volatile memory, on which the computer program 411 is stored. Processor 430 may, for example, comprise an embedded processor. The processor 430, when running the computer program 411, performs the media alignment method provided by the first embodiment described above.
[ fourth example ] A
As shown in FIG. 6, a fourth embodiment of the present invention provides a computer storage medium 500 having stored thereon computer-executable instructions 510. The computer-executable instructions 510 are for performing the media alignment method as described in the first embodiment above. The computer storage medium 500 is, for example, a non-volatile memory, such as including: magnetic media (e.g., hard disks, floppy disks, and magnetic tape), optical media (e.g., CDROM disks and DVDs), magneto-optical media (e.g., optical disks), and hardware devices specially constructed for storing and executing computer-executable instructions (e.g., Read Only Memories (ROMs), Random Access Memories (RAMs), flash memories, etc.). The computer storage medium 500 may be executable by one or more processors or processing devices to execute computer-executable instructions 510.
In addition, it should be understood that the foregoing embodiments are merely exemplary illustrations of the present invention, and the technical solutions of the embodiments can be arbitrarily combined and collocated without conflict between technical features and structural contradictions, which do not violate the purpose of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, a division of a unit is merely a division of one logic function, and an actual implementation may have another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
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 also be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, each functional unit/module in the embodiments of the present invention may be integrated into one processing unit/module, or each unit/module may exist alone physically, or two or more units/modules may be integrated into one unit/module. The integrated units/modules may be implemented in the form of hardware, or may be implemented in the form of hardware plus software functional units/modules.
The integrated units/modules, which are implemented in the form of software functional units/modules, may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions for causing one or more processors of a computer device (which may be a personal computer, a server, or a network device) to execute some steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A method for media alignment, comprising:
displaying at least one media on the canvas;
selecting a target medium from the at least one medium and acquiring a medium parameter of the target medium;
acquiring an alignment reference of the target media, an alignment mode corresponding to the alignment reference and a reference parameter of the alignment reference;
determining target vertex coordinates of the target media according to the reference parameters of the alignment reference, the alignment mode and the media parameters of the target media; and
and moving the target media according to the target vertex coordinates to align the target media according to the alignment mode.
2. The media alignment method of claim 1,
the reference parameters comprise a reference vertex coordinate, a reference width and a reference height of the alignment reference;
the media parameters comprise media vertex coordinates, media width and media height of the target media; and
the determining the target vertex coordinates of the target media according to the reference parameters of the alignment reference, the alignment mode, and the media parameters of the target media comprises:
determining an alignment line corresponding to the alignment mode according to the reference vertex coordinates, the reference width, the reference height and the alignment mode of the alignment reference;
determining the coordinates of the media center point of the target media according to the media vertex coordinates, the media width and the media height of the target media;
determining the target center point coordinate of the target media according to the alignment line and the media center point coordinate; and
and determining the target vertex coordinate of the target media according to the media vertex coordinate, the media center point coordinate and the target center point coordinate.
3. The media alignment method of claim 2, wherein the alignment reference is the canvas, the alignment is a first diagonal alignment or a second diagonal alignment, and the alignment line is the first diagonal or the second diagonal of the canvas.
4. The media alignment method of claim 3,
the determining the target vertex coordinates of the target media according to the media vertex coordinates, the media center point coordinates, and the target center point coordinates comprises:
taking the abscissa of the media vertex coordinate as the abscissa of the target vertex coordinate;
determining a vertical coordinate difference value between the vertical coordinate of the target central point coordinate and the vertical coordinate of the media central point coordinate; and
and adding the vertical coordinate of the medium vertex coordinate to the vertical coordinate difference value to obtain the vertical coordinate of the target vertex coordinate.
5. The media alignment method of claim 2,
the alignment reference is a second target medium except the target medium in the at least one medium, the alignment mode is first diagonal alignment, second diagonal alignment, horizontal centerline alignment or vertical centerline alignment, and the alignment line is the first diagonal, the second diagonal, the horizontal centerline or the vertical centerline of the second target medium.
6. The media alignment method of claim 5,
when the alignment manner is the first diagonal alignment, the second diagonal alignment, or the horizontal center line alignment, the determining the target vertex coordinate of the target media according to the media vertex coordinate, the media center point coordinate, and the target center point coordinate includes:
taking the abscissa of the media vertex coordinate as the abscissa of the target vertex coordinate;
determining a vertical coordinate difference value between the vertical coordinate of the target central point coordinate and the vertical coordinate of the media central point coordinate; and
and adding the vertical coordinate of the medium vertex coordinate to the vertical coordinate difference value to obtain the vertical coordinate of the target vertex coordinate.
7. The media alignment method of claim 5,
when the alignment manner is the alignment of the vertical center lines, the determining the target vertex coordinates of the target media according to the media vertex coordinates, the media center point coordinates, and the target center point coordinates includes:
taking the ordinate of the media vertex coordinate as the ordinate of the target vertex coordinate;
determining a horizontal coordinate difference value between the horizontal coordinate of the target central point coordinate and the horizontal coordinate of the media central point coordinate; and
and adding the abscissa of the media vertex coordinate to the abscissa difference value to obtain the abscissa of the target vertex coordinate.
8. A media alignment apparatus, comprising:
a media display module to display at least one media on the canvas;
the target media selection module is used for selecting a target media from the at least one media and acquiring a media parameter of the target media;
an alignment reference and alignment mode acquisition module, configured to acquire an alignment reference of the target media, an alignment mode corresponding to the alignment reference, and a reference parameter of the alignment reference;
a target vertex coordinate determination module, configured to determine a target vertex coordinate of the target media according to the reference parameter of the alignment reference, the alignment manner, and the media parameter of the target media; and
and the target media moving module is used for moving the target media according to the target vertex coordinates so as to align the target media according to the alignment mode.
9. The media alignment apparatus of claim 8,
the reference parameters comprise a reference vertex coordinate, a reference width and a reference height of the alignment reference;
the media parameters comprise media vertex coordinates, media width and media height of the target media; and
the target vertex coordinates determination module comprises:
an alignment line determining unit, configured to determine an alignment line corresponding to the alignment mode according to the reference vertex coordinates, the reference width, the reference height, and the alignment mode of the alignment reference;
the medium central point coordinate determination unit is used for determining the medium central point coordinate of the target medium according to the medium vertex coordinate, the medium width and the medium height of the target medium;
the target central point coordinate determination unit is used for determining a target central point coordinate of the target media according to the alignment line and the media central point coordinate; and
and the target vertex coordinate determination unit is used for determining the target vertex coordinate of the target media according to the media vertex coordinate, the media center point coordinate and the target center point coordinate.
10. The media alignment apparatus of claim 9, wherein the alignment reference is the canvas, the alignment is a first diagonal alignment or a second diagonal alignment, and the alignment line is the first diagonal or the second diagonal of the canvas.
CN201911007045.0A 2019-10-22 2019-10-22 Media alignment method and media alignment device Pending CN112702655A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911007045.0A CN112702655A (en) 2019-10-22 2019-10-22 Media alignment method and media alignment device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911007045.0A CN112702655A (en) 2019-10-22 2019-10-22 Media alignment method and media alignment device

Publications (1)

Publication Number Publication Date
CN112702655A true CN112702655A (en) 2021-04-23

Family

ID=75504620

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911007045.0A Pending CN112702655A (en) 2019-10-22 2019-10-22 Media alignment method and media alignment device

Country Status (1)

Country Link
CN (1) CN112702655A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008022514A (en) * 2006-06-13 2008-01-31 Matsushita Electric Ind Co Ltd Image display apparatus
CN102065227A (en) * 2009-11-17 2011-05-18 新奥特(北京)视频技术有限公司 Method and device for horizontally and vertically aligning object in graph and image processing
CN102063698A (en) * 2009-11-17 2011-05-18 新奥特(北京)视频技术有限公司 Method and device for obliquely aligning objects in graph and picture treatment
CN105159560A (en) * 2015-09-02 2015-12-16 上海斐讯数据通信技术有限公司 Component alignment method and system in circuit design software

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008022514A (en) * 2006-06-13 2008-01-31 Matsushita Electric Ind Co Ltd Image display apparatus
CN102065227A (en) * 2009-11-17 2011-05-18 新奥特(北京)视频技术有限公司 Method and device for horizontally and vertically aligning object in graph and image processing
CN102063698A (en) * 2009-11-17 2011-05-18 新奥特(北京)视频技术有限公司 Method and device for obliquely aligning objects in graph and picture treatment
CN105159560A (en) * 2015-09-02 2015-12-16 上海斐讯数据通信技术有限公司 Component alignment method and system in circuit design software

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
赵璐: "《中文版Photoshop CS2图像处理》", 30 June 2007, 云南人民电子音像出版社 *

Similar Documents

Publication Publication Date Title
KR101623415B1 (en) Drawing method, apparatus, and terminal
CN103177475B (en) A kind of streetscape map exhibiting method and system
CN110990516B (en) Map data processing method, device and server
US8194070B2 (en) System and method of converting edge record based graphics to polygon based graphics
US9014474B2 (en) Systems and methods for multi-resolution inpainting
CN109753641B (en) Method and device for changing object position, electronic equipment and storage medium
KR102432164B1 (en) System for providing construction site checking service using augmented reality checking and augmented reality form based on three dimentional building information modelling
CN107507225A (en) Moving target detecting method, device, medium and computing device
CN101809625A (en) Geospatial data system for selectively retrieving and displaying geospatial texture data in successive additive layers of resolution and related methods
CN104765857A (en) Background picture changing method and device
CN101802875B (en) Geospatial data system for selectively retrieving and displaying geospatial texture data based upon user-selected point-of-view and related methods
CN110070616A (en) Memory, statistical data rendering method, device and equipment based on GIS platform
US20240125613A1 (en) Map generation method and map generation apparatus
CN104766082A (en) Image recognition method and device based on android system
CN102831605A (en) Method for rapidly visualizing multi-scale image segmentation results for large images
CN112702655A (en) Media alignment method and media alignment device
JP4224093B2 (en) Texture filtering apparatus, texture mapping apparatus, method and program
CN111681322B (en) Fusion method of oblique photography model
CN107526576B (en) Method and device for displaying view components of page
CN108171784B (en) Rendering method and terminal
CN116758206A (en) Vector data fusion rendering method and device, computer equipment and storage medium
CN110580274B (en) GIS data rendering method
CN111105492B (en) Rapid scheduling method for tile elevation data in terrain smoothing process
AU2017204848A1 (en) Projecting rectified images on a surface using uncalibrated devices
CN110784876B (en) Cell coverage angle adjusting method and device

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210423