CN116152472A - Digital collection clipping method and system - Google Patents
Digital collection clipping method and system Download PDFInfo
- Publication number
- CN116152472A CN116152472A CN202210884072.1A CN202210884072A CN116152472A CN 116152472 A CN116152472 A CN 116152472A CN 202210884072 A CN202210884072 A CN 202210884072A CN 116152472 A CN116152472 A CN 116152472A
- Authority
- CN
- China
- Prior art keywords
- clipping
- cutting
- parameters
- materials
- user
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T19/00—Manipulating 3D models or images for computer graphics
- G06T19/20—Editing of 3D images, e.g. changing shapes or colours, aligning objects or positioning parts
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0484—Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
- G06F3/04845—Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range for image manipulation, e.g. dragging, rotation, expansion or change of colour
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T11/00—2D [Two Dimensional] image generation
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T15/00—3D [Three Dimensional] image rendering
- G06T15/005—General purpose rendering architectures
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2219/00—Indexing scheme for manipulating 3D models or images for computer graphics
- G06T2219/20—Indexing scheme for editing of 3D models
- G06T2219/2021—Shape modification
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/30—Computing systems specially adapted for manufacturing
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Computer Graphics (AREA)
- Architecture (AREA)
- Computer Hardware Design (AREA)
- Software Systems (AREA)
- Human Computer Interaction (AREA)
- Processing Or Creating Images (AREA)
Abstract
The application discloses a method for cutting digital collection, which comprises the following steps: receiving materials uploaded by a user, analyzing to obtain material names and contents, and storing the material names and the contents in a database of a server; providing a material management interface, acquiring a material set from a server and rendering; receiving cutting operation of a user on all materials or single materials, updating cutting parameters and sending the cutting parameters to a server so as to correlate the cutting parameters with collection item IDs or material IDs; and when materials are synthesized, correspondingly cutting the materials with cutting parameters. The application also discloses a digital collection clipping system, an electronic device and a computer readable storage medium. Therefore, the user can actively adjust the material display area and has the cutting capability for single materials, and the requirement of the user for cutting the single materials in the synthesis process can be met.
Description
Technical Field
The present disclosure relates to the field of digital collection technologies, and in particular, to a method, a system, an electronic device, and a computer readable storage medium for cutting a digital collection.
Background
The collection is a digital asset having a unique Token ID (identity Token number) on the blockchain based on the media form of pictures, video, audio, 3D models, etc. The materials are called stock before stock is not chained, and after the steps of screening, checking, chaining and the like, the materials are called stock. The material is a basic material for generating materials, and the material can be in different formats such as pictures, videos, audios, 3D models and the like. In many cases, materials are synthesized after being cut, and then the materials are chained into stock.
At present, in the systems of various collection generators, the function of explicitly cutting materials is not available, but part of generators have implicit cutting logic. The system without the explicit cutting function needs a user to cut materials outside the system and then enter the system for uploading the materials. The hidden clipping logic clips all materials according to a fixed clipping mode based on the size of a viewing port (a content area visible to a user) of the collection, and then displays the materials on the viewing port, and the main purpose of the hidden clipping logic is to display the materials with different size proportions in a matching way.
Therefore, in the conventional various collection generator systems, the user cannot actively set the material cropping parameters, so that the material display area cannot be freely adjusted in the system.
Disclosure of Invention
The main objective of the present application is to provide a method, a system, an electronic device and a computer readable storage medium for clipping digital stock, which aims to solve the problem of how to facilitate the user to freely adjust the material display area.
In order to achieve the above object, an embodiment of the present application provides a method for clipping a digital collection, where the method includes:
receiving materials uploaded by a user, analyzing to obtain material names and contents, and storing the material names and the contents in a database of a server;
Providing a material management interface, acquiring a material set from a server and rendering;
receiving cutting operation of a user on all materials or single materials, updating cutting parameters and sending the cutting parameters to a server so as to correlate the cutting parameters with the collection item numbers or the material numbers;
and when materials are synthesized, correspondingly cutting the materials with cutting parameters.
Optionally, the receiving the clipping operation of the user on all the materials or the single material, updating clipping parameters and sending to the server side includes:
receiving a cutting request of a user for all materials or a single material, and providing a cutting popup window;
receiving cutting operation of a user in the cutting popup window, and updating and displaying corresponding cutting parameters;
and after the user finishes the cutting operation, sending the current latest cutting parameters to the server.
Optionally, the receiving a clipping request of the user for all materials or a single material includes:
providing corresponding cutting operation inlets for cutting all materials and cutting single materials in the material management interface;
and receiving a clipping request sent by a user through the clipping operation inlet.
Optionally, the providing a clipping popup includes:
Acquiring material content and displaying the material content in the cutting popup window;
acquiring initial cutting parameters returned by a server side and displaying the initial cutting parameters in the cutting popup window;
and positioning the rectangular frame and setting the size of the rectangular frame based on the initial clipping parameters.
Optionally, the receiving the clipping operation of the user in the clipping popup window, updating and displaying the corresponding clipping parameters includes:
and receiving the operation of moving and scaling the rectangular frame in the cutting popup window by a user, and updating and displaying the cutting parameters in real time according to the operation of moving and scaling the rectangular frame.
Optionally, the clipping parameter includes x, y, width, height, where x and y are coordinate values of a vertex of the rectangular frame, width is a width of the rectangular frame, and height is a height of the rectangular frame.
Optionally, the updating the clipping parameters includes:
when a user operates the translation rectangular selection frame, calculating x and y in the clipping parameters in real time according to the mouse offset value, wherein width and height are kept unchanged;
when the user operates the zoom rectangle selection box, the clipping parameters x, y, width, height are updated in real time based on different zoom directions.
Optionally, when synthesizing the material, performing corresponding clipping processing on the material with clipping parameters includes:
Traversing each layer to obtain an array, wherein the array contains a material number of each layer;
and reading the materials in the array, judging whether the materials have clipping parameters, and performing corresponding clipping processing when the clipping parameters exist.
Optionally, the reading the materials in the array and judging whether the materials have clipping parameters, and when the clipping parameters exist, performing corresponding clipping processing includes:
reading the material numbers in the array, and obtaining material contents through the material numbers;
determining whether the current material has clipping parameters;
and when the current material has the clipping parameters, clipping the material according to the clipping parameters.
Optionally, the determining whether the current material has clipping parameters includes:
firstly judging whether the current material has the cutting parameters of a single material or not;
when the cutting parameters of the single materials are not included, judging whether the cutting parameters of all the materials are included;
and when the current material has the clipping parameters of a single material or the clipping parameters of all materials, determining that the current material has the clipping parameters.
Optionally, the cropping the material according to the cropping parameters includes:
If the current material has the cutting parameters of the single material, cutting the current material preferentially according to the cutting parameters of the single material;
and if the current material does not have the cutting parameters of the single material but has the cutting parameters of all the materials, cutting the current material according to the cutting parameters of all the materials.
Optionally, the cropping includes size scaling of the material, positioning offset points of the superimposed material.
In addition, in order to achieve the above object, an embodiment of the present application further provides a system for clipping a digital collection, the system including:
the analysis module is used for receiving the materials uploaded by the user, analyzing the materials to obtain the names and the contents of the materials, and storing the names and the contents of the materials into a database of the server;
the acquisition module is used for providing a material management interface, acquiring a material set from the server and rendering;
the cutting module is used for receiving cutting operation of a user on all materials or single materials, updating cutting parameters and sending the cutting parameters to the server so as to correlate the cutting parameters with the collection item numbers or the material numbers;
and the synthesis module is used for correspondingly cutting the materials with the cutting parameters when synthesizing the materials.
To achieve the above object, an embodiment of the present application further provides an electronic device, including: the digital collection cutting device comprises a memory, a processor and a digital collection cutting program which is stored in the memory and can run on the processor, wherein the digital collection cutting program realizes the digital collection cutting method when being executed by the processor.
In order to achieve the above object, an embodiment of the present application further provides a computer readable storage medium, where a digital collection clipping program is stored, and the digital collection clipping method is implemented when the digital collection clipping program is executed by a processor.
The digital collection cutting method, the system, the electronic device and the computer readable storage medium can provide a material cutting function in the collection generation process, so that a user can actively set material cutting parameters and adjust a material display area. And the system has the capability of cutting out single materials, and can meet the requirement of a user for cutting out the single materials in the synthesis process.
Drawings
FIG. 1 is a diagram of an application environment architecture for implementing various embodiments of the present application;
Fig. 2 is a flowchart of a method for clipping a digital collection according to a first embodiment of the present application;
FIG. 3 is a schematic diagram of the refinement procedure of step S24 in FIG. 2;
FIG. 4 is a schematic view of a cutting pop-up window according to the present application;
FIG. 5 is a schematic diagram of the refinement procedure of step S240 in FIG. 3;
FIG. 6 is a schematic view of an orientation of a rectangular selection box of the present application;
FIG. 7 is a schematic diagram of the refinement procedure of step S26 in FIG. 2;
FIG. 8 is a schematic diagram of the refinement procedure of step S262 in FIG. 7;
fig. 9 is a schematic diagram of a material stacking and clipping effect in the present application;
fig. 10 is a schematic hardware architecture of an electronic device according to a second embodiment of the present application;
fig. 11 is a schematic block diagram of a digital collection clipping system according to a third embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
It should be noted that the descriptions of "first," "second," etc. in the embodiments of the present application are for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In addition, the technical solutions of the embodiments may be combined with each other, but it is necessary to base that the technical solutions can be realized by those skilled in the art, and when the technical solutions are contradictory or cannot be realized, the combination of the technical solutions should be regarded as not exist and not within the protection scope of the present application.
Referring to fig. 1, fig. 1 is a schematic diagram of an application environment for implementing various embodiments of the present application. The application is applicable to application environments including, but not limited to, client 2, server 4, and network 6.
The client 2 is configured to receive the material uploaded by the user, provide a material management interface for the user, receive operations such as cutting the material by the user, and perform material synthesis. The client 2 may be a terminal device such as a PC (Personal Computer ), a mobile phone, a tablet computer, a portable computer, or a collection generation device.
The server 4 is configured to provide data and technical support for the client 2, including saving materials received by the client 2 in a database (not shown in the figure), providing data related to a material set for the material management interface, and so on. The server 4 may be a rack server, a blade server, a tower server, or a cabinet server, and may be an independent server or a server cluster formed by a plurality of servers.
The network 6 may be a wireless or wired network such as an Intranet (Intranet), the Internet (Internet), a global system for mobile communications (Global System of Mobile communication, GSM), wideband code division multiple access (Wideband Code Division Multiple Access, WCDMA), a 4G network, a 5G network, bluetooth (Bluetooth), wi-Fi, etc. The server 4 and one or more clients 2 are in communication connection through the network 6 for data transmission and interaction.
Example 1
Fig. 2 is a flowchart of a method for clipping a digital collection according to a first embodiment of the present application. It will be appreciated that the flow charts in the method embodiments are not intended to limit the order in which the steps are performed. Some of the steps in the flow chart may be added or subtracted as desired. It is noted that the method may be applied to the client or the server. The method will be described below taking the client as an execution subject.
The method comprises the following steps:
s20, receiving the material uploaded by the user, analyzing to obtain the name and the content of the material, and storing the name and the content in a database of the server.
And uploading materials required by the generation of the collection by the user at the client, and displaying the material contents after the uploading of the materials is completed. After receiving the material uploaded by the user, the client analyzes the material to obtain the material name and the content, and stores the material name and the content into a database through a server interface.
S22, providing a material management interface, and acquiring and rendering a material set from the server.
And the client side provides a management interface of the uploaded materials for the user, and in the material management interface, a material set A is acquired from the service interface, and each material in the set A is sequentially rendered. If the material is in the picture format, rendering is carried out by using an img label; if in video format, video tags are used for rendering. An operation button can be provided for a user in a material content display area, and a menu can be called out after clicking, wherein one item is cut.
S24, receiving cutting operation of a user on all materials or single materials, updating cutting parameters and sending the cutting parameters to a server side so as to correlate the cutting parameters with collection item IDs (numbers) or material IDs (numbers).
In this embodiment, the user may cut the material by moving, zooming, or the like the rectangular frame. Of course, in other embodiments, other cutting operation modes may be provided to the user, such as directly inputting cutting parameters, and the like.
The cropping includes cropping for all materials and cropping for a single material. In the material management interface, the two cutting modes are respectively provided with corresponding operation inlets. For example, the cropping button of the interface corresponds to a cropping popup for all materials, selecting the cropping button in a column of the operation menu of a single material corresponds to a cropping popup for the single material, and so on.
Specifically, referring further to fig. 3, a schematic diagram of the refinement procedure of step S24 is shown. It will be appreciated that the flowchart is not intended to limit the order in which the steps are performed. Some of the steps in the flow chart may be added or subtracted as desired. In this embodiment, the step S24 specifically includes:
s240, receiving a cutting request of a user for all materials or single materials, and providing a cutting popup.
And the user sends out a cutting request through a cutting operation entry provided in the material management interface. For example, the user clicks a clip button in the interface to request a clip operation on all the materials, or selects a clip button in a column of an operation menu of a single material to request a clip operation on the single material, or the like. And after receiving the clipping request, the client provides clipping popup windows for all the materials or the single materials.
In this embodiment, the clipping popup includes, but is not limited to, material content, a draggable rectangular frame, clipping parameter information, and a determination button. The clipping parameters include x, y, width, height for defining the position and size of the rectangular box. Wherein x and y are coordinate values of a vertex (a starting point, generally an upper left corner) of the rectangular frame, width is a width of the rectangular frame, height is a height of the rectangular frame, and the initial value is returned by the server. Fig. 4 is a schematic view of the cutting popup window.
For example, when the user needs to cut all the materials, the user clicks a cutting button of the materials management interface, and a cutting popup window appears. In the process, a preset material content C appears in the popup window, and the content provides a first material from each layer participating in synthesis to form a material group T, and the material content in the material group T is overlapped. In addition, the user can see the clipping parameters x, y, width, height in the clipping popup window, and initial values of these parameters are returned by the server.
Specifically, referring further to fig. 5, a schematic diagram of the refinement process of step S240 is shown. It will be appreciated that the flowchart is not intended to limit the order in which the steps are performed. Some of the steps in the flow chart may be added or subtracted as desired. In this embodiment, the step S240 (in providing the clipping popup) specifically includes:
S2400, acquiring material content and displaying the material content in the cutting popup window.
S2402, obtaining initial clipping parameters returned by the server side and displaying the initial clipping parameters in the clipping popup window.
S2404, positioning a rectangular frame and setting the size of the rectangular frame based on the initial clipping parameters.
Returning to fig. 3, S242 receives the clipping operation of the user in the clipping popup window, and updates and displays the corresponding clipping parameters.
And the user drags the rectangular selection frame in the cutting popup window, and the rectangular selection frame can be moved and zoomed. In the moving and scaling process, the clipping parameter information is updated and displayed accordingly.
Specifically, when a user operates to translate (move up and down or move left and right) the rectangular selection frame, x and y in the clipping parameters are calculated in real time according to the mouse offset value, and width and height remain unchanged; when the user operates the zoom rectangle selection box, the clipping parameters x, y, width, height need to be updated in real time based on different zoom directions.
As shown in fig. 6, an azimuth schematic view of the rectangular selection frame is shown. In an optional embodiment, when the user performs the zoom operation on the rectangular selection frame in each direction, the updating of the clipping parameter may specifically include:
(1) When the upper left position is dragged and zoomed, x, y, width, height is updated;
(2) When the upper position is dragged and zoomed, x and width are unchanged, and y and height are updated;
(3) When the upper right position is dragged and zoomed, x is unchanged, and y, width, height is updated;
(4) When the left middle position is dragged and zoomed, y and height are unchanged, and x and width are updated;
(5) When the right middle position is dragged and zoomed, x, y, height is unchanged, and the width is updated;
(6) When the left lower position is dragged and zoomed, y is unchanged, and x, width, height is updated;
(7) When the lower middle position is dragged and zoomed, x, y, width is unchanged, and height is updated;
(8) When the right lower position is dragged and zoomed, x and y are unchanged, and width and height are updated.
And S244, after the user completes the cutting operation, sending the current latest cutting parameters to a server side so as to correlate the cutting parameters with the collection item ID or the material ID.
After the user finishes the rectangular frame selection operation in the clipping popup window for all the materials, the clipping result of all the materials can be determined by clicking the determination button. The client saves the clipping parameters (x, y, width, height) of all the current latest materials, sends the clipping parameters to the server through the server interface, and records the clipping parameters in the database. The server associates the clipping parameters with the collection item IDs (e.g., records the mapping relationship between the clipping parameters and the corresponding collection item IDs in a database), indicating that the clipping parameters are used for clipping the overall material.
After the user finishes the rectangular box selecting operation in the clipping popup window for the single material, the clipping result of the single material can be determined by clicking the determination button. The client saves the current latest clipping parameters (x, y, width, height) of the single material, sends the clipping parameters to the server through the server interface, and records the clipping parameters in the database. The server associates the cropping parameters with the material IDs (e.g., records the mapping relationship between the cropping parameters and the corresponding material IDs in a database), which indicates that the cropping parameters are used for cropping a specific material.
It is noted that in the subsequent material synthesis process, the cutting parameter priority of the material is: the cropping parameters of a single material take precedence over the cropping parameters of all materials. That is, the individual materials have individual cropping parameters according to which cropping is performed; and cutting the single material according to the cutting parameters of all the materials without cutting parameters.
Returning to fig. 2, S26, when synthesizing the material, the material with the clipping parameters is clipped accordingly.
Typically, each material comprises a plurality of layers. One layer can contain zero or more materials, and the stacking sequence of the materials in the material generation process is determined by the stacking sequence between layers.
Specifically, referring further to fig. 7, a schematic diagram of the refinement procedure of step S26 is shown. It will be appreciated that the flowchart is not intended to limit the order in which the steps are performed. Some of the steps in the flow chart may be added or subtracted as desired. In this embodiment, the step S26 specifically includes:
s260, traversing each layer to obtain an array.
For each material, the layers are traversed first, and a sequence number is obtained for each layer based on the number of materials in the layers in the traversing process. The sequence number value method can be as follows: the number of materials is a random number of 0-1, and then the random number is rounded downwards.
After each layer is traversed, an Array is obtained, and the Array contains a material ID of each layer. Array is used for the synthesis of individual materials.
S262, reading the materials in the array, judging whether the materials have clipping parameters, and performing corresponding clipping processing when the clipping parameters exist.
Specifically, referring further to fig. 8, a detailed flowchart of step S262 is shown. It will be appreciated that the flowchart is not intended to limit the order in which the steps are performed. Some of the steps in the flow chart may be added or subtracted as desired. In this embodiment, the step S262 specifically includes:
S2620, reading the material ID in the array, and obtaining the material content through the material ID.
The Array contains a material ID of each layer, and after the material ID of each layer in the Array is read, the material content of each layer can be obtained according to the material IDs. The material content originates from a client cache or a server interface and returns.
S2622, it is determined whether the current material has clipping parameters.
In this embodiment, it is first determined whether the current material has the cropping parameters of a single material, and when not, it is then determined whether the current material has the cropping parameters of all the materials (the whole material).
The reason for the above judgment sequence is: the embodiment sets the priority of the cropping parameters of the single material higher than the cropping parameters of all the materials.
And determining that the current material has the cropping parameters when the current material has the cropping parameters of a single material or the cropping parameters of all materials.
Specifically, whether the current material has the clipping parameters can be judged by inquiring the mapping relation recorded in the database of the server side, wherein the judging comprises the mapping relation between the clipping parameters and the corresponding material IDs and the mapping relation between the clipping parameters and the corresponding collection item IDs. Firstly, inquiring whether the corresponding cutting parameters (cutting parameters of single materials) exist according to the material ID of the current material, and if not, inquiring whether the corresponding cutting parameters (cutting parameters of all materials) exist according to the collection item ID of the current material.
S2624, when the current material has clipping parameters, clipping the material according to the clipping parameters.
If the current material has the cutting parameters of the single material, the current material is preferentially cut according to the cutting parameters of the single material. And if the current material does not have the cutting parameters of the single material but has the cutting parameters of all the materials, cutting the current material according to the cutting parameters of all the materials. In general, the cropping includes size scaling of the material and positioning offset points of the superimposed material, etc.
In this embodiment, the dimensions w and h of the material are known, and the specific rule of clipping may be:
(1) And scaling the material according to the material sizes (w, h) and the clipping parameters (width, height). Wherein, the horizontal direction scales w/width times, and the vertical direction scales h/height times.
(2) And shifting the superposition position of the materials from the initial point coordinates (0, 0) to (-1 x w/width, -1 x y h/height).
Returning to fig. 7, S264, the materials in the array are superimposed, so as to obtain a synthesized material.
And based on the sequence of the material IDs in the Array, stacking the material contents into a container according to the sequence or the reverse sequence, wherein the container displays the content after material synthesis. Fig. 9 is a schematic diagram of a material stacking and cropping effect.
Assuming 1000 materials are needed, the steps S260-S264 are repeated to complete the synthesis of 1000 materials.
The digital collection cutting method provided by the embodiment can provide a material cutting function in the collection generation process, so that a user (designer) can customize a cutting area; providing fine granularity to a single material level, the post-clip composite material may be tailored to only one material. The clipping content comprises starting point coordinates x and y, width and height, and the clipped rectangular area content is taken as the content of the material which actually participates in the material synthesizing process. In the material synthesis process, materials are sequentially overlapped based on the lamination sequence of layers, and when the current overlapped materials are cut materials, the materials only display the contents of the cut rectangular areas. The types of material that may be cropped include, but are not limited to, formats such as pictures, videos, and the like.
The method is specifically explained below by taking several practical scenarios as examples. Those skilled in the art will recognize that the following specific details of the actual scenario are not intended to limit the inventive concepts of the present application, and those skilled in the art may readily implement appropriate content divergence and expansion in accordance with the following specific descriptions of the actual scenario.
Scene one: after a project designer provides materials, the materials are found to be not attractive after being combined.
(1) Uploading materials.
(2) Screening material synthetic materials, wherein the material synthetic effect is not attractive enough in the material screening process, and the specific reason is that the positions of the materials are staggered.
(3) The designer tailors the problem material.
(4) The materials were resynthesized and the effect after synthesis was found to be expected.
Scene II: the size of the material provided by a certain project party is oversized, and the content area in the material only accounts for about 50% of the whole area of the material.
(1) Uploading materials.
(2) Screening material synthesized materials, and finding that the content of the materials is not high enough and has about 50% of areas without practical significance after synthesis.
(3) The designer tailors all the material.
(4) The materials were resynthesized and the effect after synthesis was found to be expected.
Scene III: and a project party uses the same set of materials to generate a plurality of sets of collection with different sizes.
(1) Uploading materials.
(2) Cutting materials, generating a batch of materials and submitting the materials to a server for storage.
(3) And adjusting the cutting size of the materials, generating a batch of materials again, and submitting the batch of materials to a server for storage.
(4) Repeating the steps (2) and (3) for a plurality of times until a plurality of sets of sizes are submitted to the server for storage.
According to the actual scene, the method provides the capability of more finely operating the materials in the system, and the materials can only participate in the process of synthesizing the materials in the whole way, and the materials are finely processed until partial areas of the materials participate in the process of synthesizing the materials. In the synthesis process, the problems of shielding of contents, poor attractiveness of combination and the like possibly occur between materials, and the problems can be effectively processed by cutting single or multiple materials, so that the steps of adjusting and re-uploading the materials under the line of a designer are avoided. Under the scene that collection needs many sets of sizes, can satisfy this scene demand soon through the tailorring.
Example two
As shown in fig. 10, a hardware architecture diagram of an electronic device 20 according to a second embodiment of the present application is provided. In this embodiment, the electronic device 20 may include, but is not limited to, a memory 21, a processor 22, and a network interface 23, which may be communicatively connected to each other through a system bus. It should be noted that fig. 10 only shows an electronic device 20 having components 21-23, but it should be understood that not all of the illustrated components are required to be implemented and that more or fewer components may alternatively be implemented. In this embodiment, the electronic device 20 may be the client.
The memory 21 includes at least one type of readable storage medium including flash memory, hard disk, multimedia card, card memory (e.g., SD or DX memory, etc.), random Access Memory (RAM), static Random Access Memory (SRAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), programmable Read Only Memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the storage 21 may be an internal storage unit of the electronic device 20, such as a hard disk or a memory of the electronic device 20. In other embodiments, the memory 21 may also be an external storage device of the electronic apparatus 20, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the electronic apparatus 20. Of course, the memory 21 may also include both an internal memory unit and an external memory device of the electronic apparatus 20. In this embodiment, the memory 21 is generally used for storing an operating system and various application software installed on the electronic device 20, such as a program code of the digital collection clipping system 60. Further, the memory 21 may be used to temporarily store various types of data that have been output or are to be output.
The processor 22 may be a central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor, or other data processing chip in some embodiments. The processor 22 is generally used to control the overall operation of the electronic device 20. In this embodiment, the processor 22 is configured to execute the program code or process data stored in the memory 21, for example, to execute the digital collection clipping system 60.
The network interface 23 may comprise a wireless network interface or a wired network interface, which network interface 23 is typically used for establishing a communication connection between the electronic apparatus 20 and other electronic devices.
Example III
As shown in fig. 11, a block diagram of a digital collection clipping system 60 according to a third embodiment of the present application is provided. The digital collection cropping system 60 may be partitioned into one or more program modules that are stored in a storage medium and executed by one or more processors to complete the embodiments of the application. Program modules in the embodiments of the present application refer to a series of computer program instruction segments capable of implementing specific functions, and the following description specifically describes the functions of each program module in the embodiments.
In this embodiment, the digital collection clipping system 60 includes:
the parsing module 600 is configured to receive the material uploaded by the user, parse the material to obtain a material name and content, and store the material name and content in a database of the server.
And uploading materials required by the generation of the collection by the user at the client, and displaying the material contents after the uploading of the materials is completed. After receiving the material uploaded by the user, the parsing module 600 parses the material to obtain a material name and content, and stores the material name and content in the database through the server interface.
The obtaining module 602 is configured to provide a material management interface, obtain a material set from a server, and render the material set.
The acquisition module 602 provides the user with a management interface of the uploaded materials, in which the material set a is acquired from the service interface, and each material in the set a is sequentially rendered. If the material is in the picture format, rendering is carried out by using an img label; if in video format, video tags are used for rendering. An operation button can be provided for a user in a material content display area, and a menu can be called out after clicking, wherein one item is cut.
And the clipping module 604 is configured to receive clipping operation of a user on all materials or a single material, update clipping parameters, and send the clipping parameters to a server, so as to associate the clipping parameters with the collection item ID or the material ID.
In this embodiment, the user may cut the material by moving, zooming, or the like the rectangular frame. Of course, in other embodiments, other cutting operation modes may be provided to the user, such as directly inputting cutting parameters, and the like.
The cropping includes cropping for all materials and cropping for a single material. In the material management interface, the two cutting modes are respectively provided with corresponding operation inlets. For example, the cropping button of the interface corresponds to a cropping popup for all materials, selecting the cropping button in a column of the operation menu of a single material corresponds to a cropping popup for the single material, and so on.
Specifically, the processing of the clipping module 604 includes:
(1) And receiving a cutting request of a user for all materials or single materials, and providing a cutting popup.
And the user sends out a cutting request through a cutting operation entry provided in the material management interface. For example, the user clicks a clip button in the interface to request a clip operation on all the materials, or selects a clip button in a column of an operation menu of a single material to request a clip operation on the single material, or the like. The cropping module 604 provides a cropping popup for the entire material or the single material upon receiving the cropping request.
In this embodiment, the clipping popup includes, but is not limited to, material content, a draggable rectangular frame, clipping parameter information, and a determination button. The clipping parameters include x, y, width, height for defining the position and size of the rectangular box. Wherein x and y are coordinate values of a vertex (a starting point, generally an upper left corner) of the rectangular frame, width is a width of the rectangular frame, height is a height of the rectangular frame, and the initial value is returned by the server.
(2) And receiving the cutting operation of the user in the cutting popup window, and updating and displaying the corresponding cutting parameters.
And the user drags the rectangular selection frame in the cutting popup window, and the rectangular selection frame can be moved and zoomed. In the moving and scaling process, the clipping parameter information is updated and displayed accordingly.
Specifically, when a user operates to translate (move up and down or move left and right) the rectangular selection frame, x and y in the clipping parameters are calculated in real time according to the mouse offset value, and width and height remain unchanged; when the user operates the zoom rectangle selection box, the clipping parameters x, y, width, height need to be updated in real time based on different zoom directions.
(3) And after the user finishes the cutting operation, sending the current latest cutting parameters to a server side so as to correlate the cutting parameters with the collection item ID or the material ID.
After the user finishes the rectangular frame selection operation in the clipping popup window for all the materials, the clipping result of all the materials can be determined by clicking the determination button. The clipping module 604 stores clipping parameters (x, y, width, height) of all the current latest materials, and sends the clipping parameters to the server through the server interface, and records the clipping parameters in the database. The server associates the clipping parameters with the collection item IDs (e.g., records the mapping relationship between the clipping parameters and the corresponding collection item IDs in a database), indicating that the clipping parameters are used for clipping the overall material.
After the user finishes the rectangular box selecting operation in the clipping popup window for the single material, the clipping result of the single material can be determined by clicking the determination button. The client saves the current latest clipping parameters (x, y, width, height) of the single material, sends the clipping parameters to the server through the server interface, and records the clipping parameters in the database. The server associates the cropping parameters with the material IDs (e.g., records the mapping relationship between the cropping parameters and the corresponding material IDs in a database), which indicates that the cropping parameters are used for cropping a specific material.
It is noted that in the subsequent material synthesis process, the cutting parameter priority of the material is: the cropping parameters of a single material take precedence over the cropping parameters of all materials. That is, the individual materials have individual cropping parameters according to which cropping is performed; and cutting the single material according to the cutting parameters of all the materials without cutting parameters.
The synthesizing module 606 is configured to perform corresponding clipping processing on the material with clipping parameters when synthesizing the material.
Typically, each material comprises a plurality of layers. One layer can contain zero or more materials, and the stacking sequence of the materials in the material generation process is determined by the stacking sequence between layers.
Specifically, the processing of the synthesis module 606 includes:
(1) And traversing each layer to obtain an array.
For each material, the layers are traversed first, and a sequence number is obtained for each layer based on the number of materials in the layers in the traversing process. The sequence number value method can be as follows: the number of materials is a random number of 0-1, and then the random number is rounded downwards.
After each layer is traversed, an Array is obtained, and the Array contains a material ID of each layer. Array is used for the synthesis of individual materials.
(2) And reading the materials in the array, judging whether the materials have clipping parameters, and performing corresponding clipping processing when the clipping parameters exist.
In this embodiment, the method specifically includes: reading a material ID in the array, and obtaining material content through the material ID; judging whether the current material has the cutting parameters of a single material or not, and judging whether the current material has the cutting parameters of all materials (integral materials) or not when the current material does not have the cutting parameters of the single material; and when the current material has the clipping parameters, clipping the material according to the clipping parameters.
If the current material has the cutting parameters of the single material, the current material is preferentially cut according to the cutting parameters of the single material. And if the current material does not have the cutting parameters of the single material but has the cutting parameters of all the materials, cutting the current material according to the cutting parameters of all the materials. In general, the cropping includes size scaling of the material and positioning offset points of the superimposed material, etc.
(3) And superposing the materials in the array to obtain the synthesized material.
And based on the sequence of the material IDs in the Array, stacking the material contents into a container according to the sequence or the reverse sequence, wherein the container displays the content after material synthesis.
The digital collection cutting system provided by the embodiment can provide a material cutting function in the collection generation process, so that a user (designer) can customize a cutting area; providing fine granularity to a single material level, the post-clip composite material may be tailored to only one material. The clipping content comprises starting point coordinates x and y, width and height, and the clipped rectangular area content is taken as the content of the material which actually participates in the material synthesizing process. In the material synthesis process, materials are sequentially overlapped based on the lamination sequence of layers, and when the current overlapped materials are cut materials, the materials only display the contents of the cut rectangular areas.
Example IV
The present application also provides another embodiment, namely, a computer-readable storage medium storing a digital collection clipping program executable by at least one processor to cause the at least one processor to perform the steps of the digital collection clipping method as described above.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing embodiment numbers of the present application are merely for describing, and do not represent advantages or disadvantages of the embodiments.
It will be apparent to those skilled in the art that the modules or steps of the embodiments of the application described above may be implemented in a general purpose computing device, they may be concentrated on a single computing device, or distributed across a network of computing devices, they may alternatively be implemented in program code executable by computing devices, so that they may be stored in a storage device for execution by computing devices, and in some cases, the steps shown or described may be performed in a different order than what is shown or described, or they may be separately fabricated into individual integrated circuit modules, or multiple modules or steps of them may be fabricated into a single integrated circuit module. Thus, embodiments of the present application are not limited to any specific combination of hardware and software.
The foregoing is only the preferred embodiments of the present application, and is not intended to limit the scope of the embodiments of the present application, and all equivalent structures or equivalent processes using the descriptions of the embodiments of the present application and the contents of the drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the embodiments of the present application.
Claims (15)
1. A method for cutting out digital collections, the method comprising:
receiving materials uploaded by a user, analyzing to obtain material names and contents, and storing the material names and the contents in a database of a server;
providing a material management interface, acquiring a material set from a server and rendering;
receiving cutting operation of a user on all materials or single materials, updating cutting parameters and sending the cutting parameters to a server so as to correlate the cutting parameters with the collection item numbers or the material numbers;
and when materials are synthesized, correspondingly cutting the materials with cutting parameters.
2. The method for clipping the digital collection according to claim 1, wherein the receiving the clipping operation of the user on all the materials or the single materials, updating the clipping parameters and sending the updated clipping parameters to the server comprises:
receiving a cutting request of a user for all materials or a single material, and providing a cutting popup window;
receiving cutting operation of a user in the cutting popup window, and updating and displaying corresponding cutting parameters;
and after the user finishes the cutting operation, sending the current latest cutting parameters to the server.
3. The method of clipping a digital collection according to claim 2, wherein receiving a clipping request from a user for all or a single material comprises:
Providing corresponding cutting operation inlets for cutting all materials and cutting single materials in the material management interface;
and receiving a clipping request sent by a user through the clipping operation inlet.
4. A method of cutting out a digital collection according to claim 2 or 3, wherein said providing a cutting out popup comprises:
acquiring material content and displaying the material content in the cutting popup window;
acquiring initial cutting parameters returned by a server side and displaying the initial cutting parameters in the cutting popup window;
and positioning the rectangular frame and setting the size of the rectangular frame based on the initial clipping parameters.
5. The method of clipping a digital collection according to any one of claims 2 to 4, wherein the receiving a clipping operation of a user in the clipping popup window, updating a clipping parameter corresponding to a presentation includes:
and receiving the operation of moving and scaling the rectangular frame in the cutting popup window by a user, and updating and displaying the cutting parameters in real time according to the operation of moving and scaling the rectangular frame.
6. The method of any one of claims 1 to 5, wherein the clipping parameters include x, y, width, height, where x and y are coordinate values of a vertex of the rectangular frame, width is a width of the rectangular frame, and height is a height of the rectangular frame.
7. The method of clipping a digital collection of claim 6, wherein updating clipping parameters comprises:
when a user operates the translation rectangular selection frame, calculating x and y in the clipping parameters in real time according to the mouse offset value, wherein width and height are kept unchanged;
when the user operates the zoom rectangle selection box, the clipping parameters x, y, width, height are updated in real time based on different zoom directions.
8. The method for clipping digital stock according to any one of claims 1 to 7, wherein the step of performing the corresponding clipping process on the material having the clipping parameters when synthesizing the material comprises:
traversing each layer to obtain an array, wherein the array contains a material number of each layer;
and reading the materials in the array, judging whether the materials have clipping parameters, and performing corresponding clipping processing when the clipping parameters exist.
9. The method of claim 8, wherein the reading the material in the array and determining whether the material has a clipping parameter, and performing a clipping process when the clipping parameter is present comprises:
reading the material numbers in the array, and obtaining material contents through the material numbers;
Determining whether the current material has clipping parameters;
and when the current material has the clipping parameters, clipping the material according to the clipping parameters.
10. The method of clipping a digital collection of claim 9, wherein the determining whether the current material has clipping parameters comprises:
firstly judging whether the current material has the cutting parameters of a single material or not;
when the cutting parameters of the single materials are not included, judging whether the cutting parameters of all the materials are included;
and when the current material has the clipping parameters of a single material or the clipping parameters of all materials, determining that the current material has the clipping parameters.
11. The method of clipping a digital collection according to claim 9 or 10, wherein the clipping the material according to the clipping parameters includes:
if the current material has the cutting parameters of the single material, cutting the current material preferentially according to the cutting parameters of the single material;
and if the current material does not have the cutting parameters of the single material but has the cutting parameters of all the materials, cutting the current material according to the cutting parameters of all the materials.
12. The method of clipping a digital stock of claim 11, wherein the clipping comprises size scaling the stock, locating an offset point of the superimposed stock.
13. A digital collection cropping system, the system comprising:
the analysis module is used for receiving the materials uploaded by the user, analyzing the materials to obtain the names and the contents of the materials, and storing the names and the contents of the materials into a database of the server;
the acquisition module is used for providing a material management interface, acquiring a material set from the server and rendering;
the cutting module is used for receiving cutting operation of a user on all materials or single materials, updating cutting parameters and sending the cutting parameters to the server so as to correlate the cutting parameters with the collection item numbers or the material numbers;
and the synthesis module is used for correspondingly cutting the materials with the cutting parameters when synthesizing the materials.
14. An electronic device, the electronic device comprising: a memory, a processor, and a digital collection cropping program stored on the memory and executable on the processor, which when executed by the processor, implements the digital collection cropping method of any one of claims 1 to 12.
15. A computer-readable storage medium, wherein a digital collection cropping program is stored on the computer-readable storage medium, which when executed by a processor, implements the digital collection cropping method of any one of claims 1 to 12.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210884072.1A CN116152472A (en) | 2022-07-26 | 2022-07-26 | Digital collection clipping method and system |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210884072.1A CN116152472A (en) | 2022-07-26 | 2022-07-26 | Digital collection clipping method and system |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN116152472A true CN116152472A (en) | 2023-05-23 |
Family
ID=86339524
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202210884072.1A Pending CN116152472A (en) | 2022-07-26 | 2022-07-26 | Digital collection clipping method and system |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN116152472A (en) |
-
2022
- 2022-07-26 CN CN202210884072.1A patent/CN116152472A/en active Pending
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US20200349386A1 (en) | Storing Information for Access Using a Captured Image | |
| CN109343851B (en) | Page generation method, page generation device, computer equipment and storage medium | |
| US8200037B2 (en) | Importance guided image transformation | |
| CN114938458B (en) | Object information display method and device, electronic equipment and storage medium | |
| JP6096634B2 (en) | 3D map display system using virtual reality | |
| CN113342247B (en) | Material processing method and device, electronic equipment and storage medium | |
| EP4080507A1 (en) | Method and apparatus for editing object, electronic device and storage medium | |
| JP7337428B1 (en) | CONTROL METHOD, CONTROL DEVICE, AND RECORDING MEDIUM FOR INTERACTIVE THREE-DIMENSIONAL REPRESENTATION OF OBJECT | |
| US11874859B2 (en) | Method of and system for defining a service for serving map images | |
| US8885952B1 (en) | Method and system for presenting similar photos based on homographies | |
| JP2013120201A (en) | Information processing apparatus and method | |
| CN116466935A (en) | Template processing method, device, computer equipment and storage medium | |
| CN116152472A (en) | Digital collection clipping method and system | |
| CN113888673A (en) | Map editing method, system, device, computing equipment and storage medium | |
| CN114117161A (en) | Display method and device | |
| CN109522429A (en) | Method and apparatus for generating information | |
| CN107742314B (en) | Image generation method, device and equipment | |
| CN113973235A (en) | Interactive information display method and device and computer equipment | |
| CN119478317B (en) | Unified map tile access method, device, equipment and storage medium | |
| CN115567737B (en) | Method and device for replacing cut-out picture | |
| CN112394809A (en) | Method, device and communication equipment for realizing augmented reality | |
| CN118071614A (en) | Multi-element object generation method, device, equipment, storage medium and program product | |
| CN116975473A (en) | Information display methods and devices | |
| CN117130606A (en) | Front-end page configuration method, front-end page configuration device, computer equipment and storage medium | |
| CN117827329A (en) | Method and system for displaying multiple avatars |
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 |