A method and apparatus for automatically laying out a picture

By identifying and comparing image information, the system obtains layout rules and automatically arranges images on the canvas, solving the problem of users having to manually adjust positions and improving layout efficiency.

CN116012494BActive Publication Date: 2026-05-12BEIJING JINWEI ZHIGUANG INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING JINWEI ZHIGUANG INFORMATION TECH CO LTD
Filing Date
2023-01-03
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

When users use canvas-based products, adding new images requires manual repositioning, resulting in wasted time and low layout efficiency.

Method used

By identifying the information of the image to be laid out, comparing it with the information of the images already on the canvas, obtaining the preset layout rules based on the degree of correlation, and automatically laying out the images on the canvas.

Benefits of technology

This minimizes the need for users to perform secondary operations, saves time, and improves typesetting efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116012494B_ABST
    Figure CN116012494B_ABST
Patent Text Reader

Abstract

The application discloses a method and device for automatically arranging pictures, which can be applied to the technical field of picture arrangement. The method comprises the following steps: identifying picture information carried by pictures to be arranged; comparing the picture information with picture information corresponding to pictures already in a canvas to obtain a correlation degree of the picture information of the pictures to be arranged and the picture information corresponding to the pictures already in the canvas; obtaining a preset arrangement rule according to the correlation degree of the picture information; and automatically arranging the pictures to be arranged on the canvas according to the obtained arrangement rule. It can be seen that the method and device for automatically arranging pictures can automatically arrange pictures according to a user's preset arrangement rule and a completed canvas design, so that the user's secondary operation is avoided, and the user's time is saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image layout technology, and in particular to a method and apparatus for automatically layouting images. Background Technology

[0002] As technology continues to develop, the requirements for technological planning are also constantly increasing. For example, the Business Canvas not only provides more flexible and diverse plans, but also more easily meets user needs. More importantly, it can standardize the elements in a business model and emphasize the interaction between these elements.

[0003] Currently, when using canvas-based products, users need to upload local images to the canvas. Adding a new image to an existing canvas often requires manual repositioning, wasting user time. Therefore, designing a method that automatically arranges uploaded images has become a pressing technical problem in this field. Summary of the Invention

[0004] In view of this, embodiments of this application provide a method and apparatus for automatically arranging images, aiming to achieve the requirement of automatically arranging images to save users' time.

[0005] In a first aspect, embodiments of this application provide a method for automatically formatting images, the method comprising:

[0006] Identify the image information carried by the image to be formatted;

[0007] The image information is compared with the image information corresponding to the image already in the canvas to obtain the degree of correlation between the image information of the image to be laid out and the image information corresponding to the image already in the canvas.

[0008] Preset layout rules are obtained based on the correlation between the image information;

[0009] Based on the obtained layout rules, the image to be layout is automatically laid out on the canvas.

[0010] Optionally, obtaining the preset layout rules based on the correlation of the image information specifically includes:

[0011] Based on the degree of correlation between the image information and the image information corresponding to the image already in the canvas, obtain the layout rule that is closest in correlation with the current canvas.

[0012] Optionally, comparing the image information with the image information corresponding to the image already in the canvas to obtain the degree of correlation between the image information of the image to be laid out and the image information corresponding to the image already in the canvas specifically includes:

[0013] The multiple image information carried by the image to be laid out is compared with the image information corresponding to the image already in the canvas, and the multiple comparison results are assigned weights. The image information includes image size and image content.

[0014] The weighted comparison results are summed according to their weights to obtain the degree of correlation between the image information of the image to be laid out and the image information corresponding to the image already in the canvas.

[0015] Optionally, obtaining the preset layout rules based on the correlation of the image information specifically includes:

[0016] Compare the degree of association between image information in all completed canvases, and obtain the completed canvas that is closest in degree of association with the image information in the current canvas;

[0017] Obtain the layout rules from the completed canvas, and based on the obtained preset layout rules and the layout rules from the completed canvas, obtain the final layout rules.

[0018] Optionally, after automatically arranging the image to be laid out on the canvas, the method further includes:

[0019] Obtain the final position of the image to be formatted, which is manually adjusted by the user.

[0020] Save the correlation and final position as new layout rules.

[0021] Optionally, before identifying the image information carried by the image to be formatted, the following steps may also be taken:

[0022] After the images to be arranged are determined, it is determined whether the images to be arranged are the first images on the current canvas. If so, the images to be arranged are placed in the default position on the canvas.

[0023] Secondly, embodiments of this application provide an apparatus for automatically arranging images, the apparatus comprising:

[0024] The image recognition module is used to identify the image information carried by the image to be formatted;

[0025] The comparison and association module is used to compare the image information with the image information corresponding to the image already in the canvas, and to obtain the degree of association between the image information of the image to be laid out and the image information corresponding to the image already in the canvas;

[0026] The rule acquisition module is used to acquire preset layout rules based on the correlation degree of the image information;

[0027] The layout module is used to automatically layout the image to be layout on the canvas according to the obtained layout rules.

[0028] Optionally, the rule acquisition module is specifically used for:

[0029] Based on the degree of correlation between the image information and the image information corresponding to the image already in the canvas, obtain the layout rule that is closest in correlation with the current canvas.

[0030] Optionally, the comparison and association module is specifically used for:

[0031] The multiple image information carried by the image to be laid out is compared with the image information corresponding to the image already in the canvas, and the multiple comparison results are assigned weights. The image information includes image size and image content.

[0032] The weighted comparison results are summed according to their weights to obtain the degree of correlation between the image information of the image to be laid out and the image information corresponding to the image already in the canvas.

[0033] Optionally, the rule acquisition module is specifically used for:

[0034] Compare the degree of association between image information in all completed canvases, and obtain the completed canvas that is closest in degree of association with the image information in the current canvas;

[0035] Obtain the layout rules from the completed canvas, and based on the obtained preset layout rules and the layout rules from the completed canvas, obtain the final layout rules.

[0036] This application provides a method for automatically arranging images. The method includes: identifying image information carried by the image to be arranged; comparing the image information with image information corresponding to an image already on a canvas to obtain the degree of correlation between the image information of the image to be arranged and the image information corresponding to the image already on the canvas; obtaining a preset layout rule based on the degree of correlation; and automatically arranging the image to be arranged on the canvas according to the obtained layout rule.

[0037] As can be seen, the method and apparatus for automatically arranging images in this application can automatically arrange images according to the user's preset layout rules and the completed canvas design, compare the image information of each image with other images, so that each step of the layout is based on a basis, minimize the need for the user to perform secondary operations, thereby saving the user's time and improving the layout efficiency. Attached Figure Description

[0038] To more clearly illustrate the technical solutions in this embodiment or the prior art, the drawings used in the description of the embodiment or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0039] Figure 1 A flowchart of a method for automatically arranging images provided in this application embodiment;

[0040] Figure 2 An example diagram illustrating the effect of a method for automatically arranging images provided in an embodiment of this application;

[0041] Figure 3 Another effect diagram of the method for automatically arranging images provided in the embodiments of this application;

[0042] Figure 4 This is a schematic diagram of a device for automatically arranging images, provided in an embodiment of this application. Detailed Implementation

[0043] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are merely some embodiments of the present application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0044] When using canvas-based products, users need to upload their local designs to the canvas. Adding a new design to an existing canvas often requires manual repositioning. Canvas-based products provide a default position where all uploaded designs are placed, but this may not meet user expectations in some scenarios, necessitating further manual layout. For example, using existing canvas software, when inserting a new image while the canvas already contains images, the new image is typically placed to the right of the most recently inserted image by a default distance. In this case, users need to rearrange the layout as needed, wasting time on repetitive work and resulting in low layout efficiency.

[0045] This application provides a method for automatically formatting images, and the flowchart of the method is shown below. Figure 1 As shown, it includes the following steps:

[0046] S10, identify the image information carried by the image to be formatted.

[0047] In order to automatically arrange images onto a canvas, this application embodiment proposes to first identify the image information carried in the image to be arranged (i.e., the image to be arranged).

[0048] Specifically, the image information can be identified by recognizing its size and content. The image content can be customized based on user needs; for example, one or more elements such as design type, product model, or geometric shape can be categorized as relevant content for identification, while other content not of interest or not needed by the user is identified as "other content." This relevant content is then used as the image information for the layout. The identified image information is then matched with the image to be laid out for comparison in subsequent steps.

[0049] The specific method of image recognition is something that users can freely choose according to their needs, and this application does not impose any specific restrictions.

[0050] S20, compare the image information with the image information corresponding to the image already in the canvas to obtain the degree of correlation between the image information of the image to be laid out and the image information corresponding to the image already in the canvas.

[0051] If there is only one image on the canvas and it is in the default position, it is considered as an already laid-out image.

[0052] The image to be arranged is inserted into the canvas, and its image information is obtained through step S10. Then, the image information of the image to be arranged is compared with the image information of other arranged images in the current canvas to obtain a comparison result. The image information of the arranged images can also be obtained through step S10. The comparison results of multiple image information are summed to obtain the final comparison result, and a correlation degree is obtained from the final comparison result.

[0053] The purpose of this step is to analyze the degree of correlation between the image to be laid out and the existing images in the current canvas. Based on the degree of correlation, the positional relationship of the images that the user needs to have the aforementioned degree of correlation is determined.

[0054] S30, Obtain preset layout rules based on the correlation degree of the image information.

[0055] Query all preset layout rules for their respective degrees of relevance. By comparison, find the set with the closest relevance to the image information in the current canvas, and select the corresponding layout rule.

[0056] It should be noted that before this step is executed, users can pre-set several layout rules. After setting the layout rules, the degree of association between the layout rules should also be set so that the layout rules that best meet the user's needs can be obtained during automatic layout.

[0057] The formatting rules can be set according to the user's needs, and this application does not impose specific restrictions on them.

[0058] S40, based on the obtained layout rules, automatically arrange the image to be layout on the canvas.

[0059] According to the layout rules obtained in S30, the images to be layoutd are arranged. For example, the layout rules require that all images except the first image be arranged around the first image in a specified order, at a specified distance.

[0060] As can be seen, the method and apparatus for automatically arranging images in this application can automatically arrange images according to the user's preset layout rules and the completed canvas design, compare the image information of each image with other images, so that each step of the layout is based on a basis, minimize the need for the user to perform secondary operations, thereby saving the user's time and improving the layout efficiency.

[0061] In some specific embodiments, step S30 specifically includes:

[0062] Based on the degree of correlation between the image information and the image information corresponding to the image already in the canvas, obtain the layout rule that is closest in correlation with the current canvas.

[0063] The preset layout rules can be as shown in Table 1. The preset layout rules may include, for example, size correlation degree and content correlation degree. The correlation degree is calculated in the same way as in step S20, and the final correlation degree is calculated so as to compare with the correlation degree of the image information in the current canvas.

[0064] Table 1

[0065] Size correlation Content relevance Final degree of correlation Preset rule 1 XX% XX% XX% Preset rule 2 XX% XX% XX%

[0066] In some specific embodiments, step S20 specifically includes:

[0067] The multiple image information carried by the image to be laid out is compared with the image information corresponding to the image already in the canvas, and the multiple comparison results are assigned weights. The image information includes image size and image content.

[0068] The weighted comparison results are summed according to their weights to obtain the degree of correlation between the image information of the image to be laid out and the image information corresponding to the image already in the canvas.

[0069] After calculating the correlation degree of the image information, the correlation degree corresponding to each different image information is further weighted to obtain the final correlation degree between the image information of the image to be laid out and the image information corresponding to the image already in the canvas. The specific weighting calculation method can be preset in the canvas software. For example, the final correlation degree can be calculated as: final correlation degree = size correlation degree × 30% + content correlation degree × 70%; alternatively, it can be set by the user before layout based on their current layout needs.

[0070] When the specific calculation method for weighting is set by the user, the final correlation degree in the layout rules will also be recalculated.

[0071] In some specific embodiments, step S30 specifically includes:

[0072] Compare the degree of association between image information in all completed canvases, and obtain the completed canvas that is closest in degree of association with the image information in the current canvas;

[0073] Obtain the layout rules from the completed canvas, and based on the obtained preset layout rules and the layout rules from the completed canvas, obtain the final layout rules.

[0074] Since a completed canvas is not necessarily created by the current canvas software, the layout rules from previously stored completed canvases can also be applied to the current canvas.

[0075] A similar selection method to step S30 described above can be to compare the correlation between the image information in the current canvas and the correlation between the image information in the completed canvas. The correlation between the image information in the completed canvas can be stored within the canvas itself or obtained in step S10. As shown in Table 2, the completed canvas rules and preset rules together form a layout rule table. Then, by comparing the correlation with the current canvas, the layout rule with the closest correlation is selected as the layout rule for the current canvas.

[0076] Table 2

[0077] Size correlation Content relevance Final degree of correlation Preset rule 1 XX% XX% XX% Preset rule 2 XX% XX% XX% Canvas rule 1 has been completed. XX% XX% XX% Canvas rule 2 has been completed. XX% XX% XX%

[0078] In some specific embodiments, after step S40, the method for automatically arranging images further includes:

[0079] Obtain the final position of the image to be formatted, which is manually adjusted by the user.

[0080] Save the correlation and final position as new layout rules.

[0081] If the user is still dissatisfied with the layout result after the automatic layout of the images, it indicates that the canvas software does not include a layout method that meets the user's needs. Therefore, after the user manually performs the layout, the user's layout method and the degree of correlation between the image information obtained in steps S10 and S20 and the current canvas image information are recorded. This information is then stored as a new layout rule, designated as preset rule X (X = maximum value of the current preset rule number + 1).

[0082] In some specific embodiments, before step S10, the method for automatically arranging images further includes:

[0083] After the images to be arranged are determined, it is determined whether the images to be arranged are the first images on the current canvas. If so, the images to be arranged are placed in the default position on the canvas.

[0084] Insert the first image into a blank canvas. Since there are no other images present, automatic layout is neither necessary nor required. The canvas software provides a default position, such as the top left corner of the canvas, to place the image in the default position.

[0085] In some specific embodiments, steps S10-S40 can be implemented to automatically arrange the images as follows, and the automatic arrangement effect is shown in the figure below. Figure 2 As shown:

[0086] Figure 2 Each gray square with a number represents an image to be laid out and an existing image. Groups 1-3 are for ease of understanding, representing a virtual grouping of images already laid out according to layout rules on the canvas based on their current positions. Square 6 (i.e., independent of any other group) is also included. Figure 2 The rightmost square marked with a 6 is the image to be laid out.

[0087] After recognizing image information in step S10, the correlation degree obtained in step S20 shows a high correlation with the old square 6 (existing image) in group 2. Since they are the same image, their size correlation, content correlation, and final correlation degree are all 100%. Then, considering other groups and existing images in the current canvas, the layout rule with the closest correlation degree is selected, such as... Figure 2 The layout rule shown is to align the top edge of the new square 6 (the image to be laid out) with the top edge of the old square 6 (the existing image) in group 2, and to separate it from the right edge of the square 3 (the existing image) in group 1 by a distance 'a'.

[0088] The process of considering other groups and existing images in the current canvas can be, for example, determining the degree of size correlation between the new square 6 (the image to be laid out) and other existing images (squares 1-5, squares 7-10), comparing the information of each existing image with the image in the new square 6, and summing them up to obtain the degree of size correlation.

[0089] The above effect is for illustrative purposes only, using an image that has appeared in the existing images on the canvas as the image to be laid out. The same steps can be used for automatic layout when the image to be laid out is a completely new image.

[0090] In some other specific embodiments, steps S10-S40 can be implemented to automatically arrange the images as follows, and the automatic arrangement effect is shown in the figure below. Figure 3 As shown:

[0091] After recognizing the image information in step S10, the correlation degree is obtained in step S20. It can be seen that the correlation degree with block 6 in group 2 is high. Since they are the same image, their size correlation degree, content correlation degree, and final correlation degree are all 100%. The layout rule with the closest correlation degree is selected, such as... Figure 3 The layout rule shown is to align the new square 6 (the image to be laid out) with the left edge of square 4 (the existing image) in group 2, and with a distance b between the bottom edges of squares 7-10 (the existing images) in group 3.

[0092] The above effect is for illustrative purposes only, using an image that has appeared in the existing images on the canvas as the image to be laid out. The same steps can be used for automatic layout when the image to be laid out is a completely new image.

[0093] Based on the method for automatically arranging images provided in the above embodiments, this application provides an apparatus for performing the above-described automatic image arrangement. A schematic diagram of the apparatus for automatically arranging images is shown below. Figure 4 As shown, the device for automatically formatting images includes:

[0094] Image recognition module 10 is used to identify the image information carried by the image to be formatted.

[0095] The process identifies the size and content of the image to be formatted. The identified content can be customized based on user requirements, such as design type, product model, and geometric shapes. This identified image information is then compared with the image to be formatted in subsequent steps.

[0096] The comparison and association module 20 is used to compare the image information with the image information corresponding to the image already in the canvas, so as to obtain the degree of association between the image information of the image to be laid out and the image information corresponding to the image already in the canvas.

[0097] If there is only one image on the canvas and it is in the default position, it is considered as an already laid-out image.

[0098] The newly inserted image to be formatted is processed by the image recognition module 10 to obtain image information. Then, the image information of the image to be formatted is compared with the image information of other formatted images in the current canvas to obtain a comparison result. The image information of the formatted images can also be obtained by the image recognition module 10. The comparison results of multiple image information are summed to obtain the final comparison result, and a correlation degree is obtained from the final comparison result.

[0099] The rule acquisition module 30 is used to acquire preset layout rules based on the correlation degree of the image information.

[0100] Query all preset layout rules for their respective degrees of relevance. By comparison, find the set with the closest relevance to the image information in the current canvas, and select the corresponding layout rule.

[0101] The layout module 40 is used to automatically layout the image to be layout on the canvas according to the obtained layout rules.

[0102] Arrange the images to be formatted according to the requirements of the formatting rules. For example, arrange the images, except for the first image, around the first image in a certain order, at a certain distance and angle.

[0103] In some specific embodiments, the rule acquisition module 30 is specifically used for:

[0104] Based on the degree of correlation between the image information and the image information corresponding to the image already in the canvas, obtain the layout rule that is closest in correlation with the current canvas.

[0105] The preset layout rules include the correlation degree value calculated in the same way as in the comparison and correlation module 20, and calculate the final correlation degree so as to compare it with the correlation degree of the image information in the current canvas.

[0106] In some specific embodiments, the comparison and association module 20 is specifically used for:

[0107] The multiple image information carried by the image to be laid out is compared with the image information corresponding to the image already in the canvas, and the multiple comparison results are assigned weights. The image information includes image size and image content.

[0108] The weighted comparison results are summed according to their weights to obtain the degree of correlation between the image information of the image to be laid out and the image information corresponding to the image already in the canvas.

[0109] After calculating the correlation degree of the image information, the correlation degree corresponding to each different image information is further weighted to obtain the final correlation degree between the image information of the image to be laid out and the image information corresponding to the image already in the canvas. The specific calculation method for weighting can be preset by the canvas software.

[0110] In some specific embodiments, the rule acquisition module 30 is specifically used for:

[0111] Compare the degree of association between image information in all completed canvases, and obtain the completed canvas that is closest in degree of association with the image information in the current canvas;

[0112] Obtain the layout rules from the completed canvas, and based on the obtained preset layout rules and the layout rules from the completed canvas, obtain the final layout rules.

[0113] Since a completed canvas is not necessarily created by the current canvas software, the layout rules in a stored completed canvas can also be used in the current canvas.

[0114] The correlation between the image information in the current canvas is compared with the correlation between the image information in the completed canvas. The correlation between the image information in the completed canvas can be stored in the canvas itself or obtained by the image recognition module 10.

[0115] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.

[0116] The solution provided in this application has been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for automatically formatting images, characterized in that, The method includes: Identify the image information carried by the image to be formatted; The image information is compared with the image information corresponding to the image already in the canvas to obtain the degree of correlation between the image information of the image to be laid out and the image information corresponding to the image already in the canvas. Preset layout rules are obtained based on the correlation between the image information; Based on the obtained layout rules, the image to be layout is automatically laid out on the canvas; The step of comparing the image information with the image information corresponding to the image already in the canvas to obtain the degree of correlation between the image information of the image to be laid out and the image information corresponding to the image already in the canvas specifically includes: The multiple image information carried by the image to be laid out is compared with the image information corresponding to the image already in the canvas, and the multiple comparison results are assigned weights. The image information includes image size and image content. The weighted comparison results are summed according to their weights to obtain the degree of correlation between the image information of the image to be laid out and the image information corresponding to the image already in the canvas.

2. The method according to claim 1, characterized in that, The step of obtaining preset layout rules based on the correlation of the image information specifically includes: Based on the degree of correlation between the image information and the image information corresponding to the image already in the canvas, obtain the layout rule that is closest in correlation with the current canvas.

3. The method according to claim 1, characterized in that, The step of obtaining preset layout rules based on the correlation of the image information specifically includes: Compare the degree of association between image information in all completed canvases, and obtain the completed canvas that is closest in degree of association with the image information in the current canvas; Obtain the layout rules from the completed canvas, and based on the obtained preset layout rules and the layout rules from the completed canvas, obtain the final layout rules.

4. The method according to claim 1, characterized in that, After automatically arranging the image to be laid out on the canvas, the process also includes: Obtain the final position of the image to be formatted, which is manually adjusted by the user. Save the correlation and final position as new layout rules.

5. The method according to any one of claims 1-4, characterized in that, Before identifying the image information carried by the image to be formatted, the process also includes: After the images to be arranged are determined, it is determined whether the images to be arranged are the first images on the current canvas. If so, the images to be arranged are placed in the default position on the canvas.

6. A device for automatically arranging images, characterized in that, The device includes: The image recognition module is used to identify the image information carried by the image to be formatted; The comparison and association module is used to compare the image information with the image information corresponding to the image already in the canvas, and to obtain the degree of association between the image information of the image to be laid out and the image information corresponding to the image already in the canvas; The rule acquisition module is used to acquire preset layout rules based on the correlation degree of the image information; The layout module is used to automatically layout the image to be layout on the canvas according to the obtained layout rules; The comparison and association module is specifically used for: The multiple image information carried by the image to be laid out is compared with the image information corresponding to the image already in the canvas, and the multiple comparison results are assigned weights. The image information includes image size and image content. The weighted comparison results are summed according to their weights to obtain the degree of correlation between the image information of the image to be laid out and the image information corresponding to the image already in the canvas.

7. The apparatus according to claim 6, characterized in that, The rule acquisition module is specifically used for: Based on the degree of correlation between the image information and the image information corresponding to the image already in the canvas, obtain the layout rule that is closest in correlation with the current canvas.

8. The apparatus according to claim 6, characterized in that, The rule acquisition module is specifically used for: Compare the degree of association between image information in all completed canvases, and obtain the completed canvas that is closest in degree of association with the image information in the current canvas; Obtain the layout rules from the completed canvas, and based on the obtained preset layout rules and the layout rules from the completed canvas, obtain the final layout rules.