Composition generation method, composition generation device, computer equipment and its media

By defining a spatial region in a user-selected scene image and cropping occluded areas to generate a target composition, the problem of low composition efficiency in traditional real-scene shooting is solved, achieving more efficient composition generation.

CN116168100BActive Publication Date: 2025-11-14HANGZHOU QUNHE INFORMATION TECHNOLOGIES CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211699076.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-28
Publication Date
2025-11-14
Estimated Expiration
2042-12-28

AI Technical Summary

Technical Problem

In traditional live-action shooting, users lacking design experience have difficulty composing shots, while experienced designers spend a lot of time adjusting the camera, resulting in low efficiency in composition generation.

Method used

The system determines the area to be photographed based on the scene image selected by the user, obtains the camera's shooting parameters, detects and crops occluded areas, and generates the target composition.

Benefits of technology

It improves the efficiency and intelligence of composition generation, saving time for manual adjustment of the perspective of photographic composition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116168100B_ABST
    Figure CN116168100B_ABST
Patent Text Reader

Abstract

This application belongs to the field of home decoration design technology, and particularly relates to a composition generation method, a composition generation device, a computer device and its medium. The method includes determining a spatial area to be photographed based on a scene image selected by the user; obtaining shooting parameters representing the camera pose based on the spatial area; determining the occlusion area when the camera is detected to be obstructing the scene based on the shooting parameters and the scene image; cropping the occluded area to obtain a cropping result; and generating a target composition of the spatial area based on the camera's shooting parameters when the cropping result does not obstruct the scene. That is, the camera pose is determined by determining the spatial area to be photographed, which is to determine the composition viewpoint. Even if the camera is obstructed in this pose, the obstruction area in front of the camera can be quickly removed by cropping, so that the finally determined camera can be used as the composition viewpoint to automatically shoot the spatial area, which greatly improves the efficiency of composition generation and has more intelligent features.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of home decoration design technology, and in particular to composition generation methods, composition generation devices, computer equipment and media thereof. Background Technology

[0002] Traditional location shooting requires a location, set design, transportation, a professional team for shooting, and photo editing.

[0003] Currently, there are two problems with users manually adjusting the camera to complete the spatial composition. First, it is difficult for users without design experience to adjust to a good composition. Second, even experienced designers spend a lot of time adjusting the camera in their daily design work, which greatly reduces the efficiency of composition generation. Summary of the Invention

[0004] The purpose of this application is to provide a composition generation method, a composition generation device, a computer device and its medium to solve the problem of low composition generation efficiency.

[0005] To address the aforementioned technical problems, embodiments of this application provide a method for generating a composition, including:

[0006] The area to be photographed is determined based on the scene map selected by the user;

[0007] Based on the spatial region, obtain the camera's shooting parameters; where the shooting parameters represent the camera's pose.

[0008] When camera occlusion is detected based on shooting parameters and scene diagram, the occlusion area is determined;

[0009] The obscured area is cropped to obtain the cropped result;

[0010] When the cropping result does not have any image occlusion, the target composition of the spatial area is generated by the camera's shooting parameters.

[0011] To address the aforementioned technical problems, this application also provides a composition generation apparatus, comprising:

[0012] The area determination module is used to determine the spatial area to be photographed based on the scene map selected by the user.

[0013] The parameter acquisition module is used to acquire the camera's shooting parameters based on the spatial region; where the shooting parameters represent the camera's pose.

[0014] The occlusion determination module is used to determine the occlusion area when the camera is detected to be occluding the scene based on the shooting parameters and scene map;

[0015] The occlusion and cropping module is used to crop the occluded area and obtain the cropped result;

[0016] The composition generation module is used to generate a target composition of a spatial area based on the camera's shooting parameters when there is no image occlusion in the cropped result.

[0017] To address the aforementioned technical problems, this application also provides a computer device, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps of the above-described pattern generation method.

[0018] To address the aforementioned technical problems, this application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the above-described composition generation method.

[0019] Compared with the prior art, the embodiments of this application have the following main advantages:

[0020] By determining the spatial area to be photographed based on the scene image selected by the user, and obtaining shooting parameters to represent the camera pose based on the spatial area, when camera occlusion is detected based on the shooting parameters and the scene image, the occlusion area is determined and cropped to obtain the cropped result. When the cropped result does not have any occlusion, the target composition of the spatial area is generated based on the camera's shooting parameters. That is, the camera pose is determined by determining the spatial area to be photographed, which also determines the compositional perspective. Even if the camera is occluded in this pose, the occlusion area in front of the camera can be quickly removed by cropping. The final determined camera is used as the compositional perspective to automatically shoot the spatial area, solving the problem of composition effect and efficiency in design tools for users. It saves the time of manually adjusting the camera's compositional perspective, greatly improves the efficiency of composition generation and has more intelligent features. Attached Figure Description

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

[0022] Figure 1 This is an exemplary system architecture diagram to which this application can be applied;

[0023] Figure 2 This is a flowchart of an embodiment of the composition generation method of this application;

[0024] Figure 3 This is a schematic diagram of the camera in the living room in an embodiment of this application;

[0025] Figure 4 This is a schematic diagram of the scene of the camera in the spatial region in the embodiments of this application;

[0026] Figure 5 This is a flowchart of another embodiment of the composition generation method of this application;

[0027] Figure 6 This is a schematic diagram of an embodiment of the composition generation apparatus of this application;

[0028] Figure 7 This is a basic structural block diagram of the computer device of this application. Detailed Implementation

[0029] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein in the specification of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "comprising" and "having," and any variations thereof, in the specification, claims, and foregoing drawings of this application, are intended to cover non-exclusive inclusion. The terms "first," "second," etc., in the specification, claims, or foregoing drawings of this application are used to distinguish different objects, not to describe a particular order.

[0030] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0031] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.

[0032] Based on this, this application provides a composition generation method to solve the above-mentioned technical problems.

[0033] like Figure 1 As shown, system architecture 100 may include terminal devices 101, 102, and 103, a network 104, and a server 105. Network 104 serves as the medium for providing communication links between terminal devices 101, 102, and 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.

[0034] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social media platform software, etc.

[0035] Terminal devices 101, 102, and 103 can be various electronic devices with displays and support web browsing, including but not limited to smartphones, tablets, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 players (Moving Picture Experts Group Audio Layer IV), laptops, and desktop computers, etc.

[0036] Server 105 can be a server that provides various services, such as a backend server that supports the pages displayed on terminal devices 101, 102, and 103.

[0037] It should be noted that the composition generation method provided in this application embodiment is executed by a server / terminal device, and correspondingly, the composition generation device is generally set in the server / terminal device.

[0038] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.

[0039] Continue to refer to Figure 2 , Figure 2 A flowchart of an embodiment of the graph generation method for [the purpose of] includes:

[0040] S201: Determine the spatial area to be photographed based on the scene map selected by the user.

[0041] The scene diagram can be a floor plan design that is pre-saved on a server or a preset database, or a floor plan design that is designed by an editor. The scene diagram includes the structural layout of the floor plan space, the furniture and other decoration elements placed in each space area of ​​the floor plan space, etc., which are not limited here.

[0042] For example, users can select the scene image to be displayed by clicking on the front-end interface, and the selected scene image will be automatically imported into the target position on the front-end interface. Alternatively, users can drag and drop the selected scene image to the target position on the front-end interface. The target position can be in the center, right, or left of the front-end interface, and there is no limitation here.

[0043] Since the scene image includes multiple areas of the apartment space, users can select one area from the scene image as the space to be photographed. Users can select the space to be photographed by dragging the mouse, such as the living room, dining room, bedroom, bathroom, etc.

[0044] In one embodiment, step S201 above determines the spatial area to be photographed based on the scene map selected by the user. The specific implementation steps may further include:

[0045] Obtain a preset scene graph, which includes a feature model;

[0046] Determine the geometric region corresponding to the feature model;

[0047] Based on the category and geometric region to which the feature model belongs, the spatial region to be photographed is determined from the scene map; wherein, the feature model is associated with the attribute function of the spatial region.

[0048] The method for obtaining the scene diagram can be found in the relevant instructions of step S201 above, and will not be repeated here. The feature model is used to represent a representative model with the function of dividing spatial regions; that is, it can be furniture models and appliance types that often exist in a specific space. For example, there is a sofa model in the living room, a dining table model in the dining room, and a bed model in the bedroom. Or, there is a television model in the living room, a computer model in the study, and an electric water heater model in the bathroom, etc.

[0049] Specifically, users can determine the category of the scene map to which the feature model belongs by selecting at least one feature model. The category is the type of spatial region corresponding to the feature model, such as a sofa for a living room, a dining table for a dining room, a stove for a kitchen, and a toilet for a bathroom. Simultaneously, the geographical area to be photographed is determined by the geometric region mapped through the feature model. This geometric region can be rectangular, square, or circular, etc.

[0050] In this embodiment, the geometric region is preferably a rectangular region. Multiple known walls can be obtained from the space containing the feature model; the two closest walls are identified as target walls; and the shortest length of the target walls and the distance between the two walls are used as the length and width of the rectangular region. Figure 3The dashed box in the image represents the geometric area of ​​the living room. The purpose of dividing the image into rectangular areas is to define the specific spatial regions to be displayed. Since the selected spatial areas may have multiple functions—for example, in modern apartment designs, the living room and dining room are often connected—it's generally preferred to describe the area with the sofa as the living room and the area with the dining table as the dining room. Dividing the scene feature map into rectangular areas further facilitates subsequent geometric calculations for compositional perspective projection.

[0051] For example, such as Figure 4 As shown, taking the living room and dining room as an example, modern apartment designs typically place the living room and dining room adjacent to each other, "separated" by a corridor. The impact of this corridor on the apartment layout is the "discontinuity of the walls." Taking the living room as an example, the characteristic model of the living room is usually the sofa. Sampling rays are emitted from the center point of the sofa model in the x and -x directions to find the walls, recording the distance between walls 43 and 44; similarly, rays are emitted in the y and -y directions to record the distance between walls 48 and 49. Comparing and selecting the two walls closer together, when the distance between walls 43 and 44 is closer, the shorter wall 43 is determined. Using wall 43 as one side of a rectangle, and the distance between walls 43 and 44 as the length of the other side of the rectangle, the size of the rectangle is determined, thus determining the geometric area where the sofa is located. Figure 4 The dashed rectangle shown.

[0052] S202: Obtain the camera's shooting parameters based on the spatial region; where the shooting parameters represent the camera's pose.

[0053] Specifically, once the area to be photographed by the user is determined, different compositional perspectives can be set according to the area. These different perspectives depend on the camera's shooting parameters. The pose representation includes positional information and orientation angle. The camera's shooting parameters also include the camera's field of view and height. These shooting parameters allow for different compositions within the spatial area; for example, the field of view and height can be used for panoramic, medium-range, and oblique shots.

[0054] In one embodiment, step S202 above, which obtains the camera's shooting parameters based on the spatial region, specifically includes the following steps:

[0055] Determine the information of multiple apartment types within the boundary of the spatial region;

[0056] Determine the target apartment type information from among the multiple apartment type information;

[0057] The orientation information of the target apartment type is used as the camera parameters of the lens.

[0058] Camera parameters can include orientation information. Specifically, the shooting parameters can be determined by using the floor plan information of the boundary of the spatial area as the camera's position information, i.e., the camera's orientation information. Floor plan information includes windows, doors, doorways, etc. When one floor plan is specified as the target floor plan, it is used as a reference object. For example, the user can choose to transmit floor plan information such as windows and doors on the boundary of the spatial area (rectangular area), or specify some feature models in the space, and then determine the camera's orientation information based on the orientation of the reference object.

[0059] Furthermore, geometric calculations are performed based on the geometric region and the camera parameters of the lens to obtain the camera's position information.

[0060] For example, when the camera is a panoramic lens, after determining the view from inside the space towards the window, the camera's orientation information is determined. Then, the side of the rectangle (i.e., the geometric region) that faces the same direction as the camera's orientation towards the center of the rectangle is found. The camera is moved along the perpendicular bisector of this side. The two points where the two rays of the field of view intersect this side define a line segment, such as... Figure 3 As shown by line 35, specifying the length of this line segment as a proportion of the original side length allows us to determine the camera's position on the plane. Then, by determining the camera's height, we can obtain the camera's position information in three-dimensional space.

[0061] For example, when the camera is an angled lens, the camera position is selected at one of the four corners of the rectangular area. It's necessary to determine whether the side containing the window or the opposite side of the window is used as a reference, thus limiting the four positions to two. Then, by judging the distance between the remaining two positions and the feature model, the camera position that conforms to the design rules is determined. Finally, the camera angle is adjusted to look at the opposite corner to determine the camera height, thus obtaining the camera's position information in three-dimensional space.

[0062] In the embodiments of this application, such as Figure 3 As shown, Figure 3 This is a schematic diagram of a camera scene in a living room according to an embodiment of this application. When displaying the living room 30, one can choose to use the living room window 32 as a reference point, and then choose to look at the window 32 from inside the space (e.g., Figure 3 The living room 30 can be shown using an arrow 33 pointing from the living room 30 to the window 32, or it can be viewed from outside the space towards the window 32 (e.g., arrow 33). Figure 3 Arrow 34 pointing from window 32 to living room 30 indicates that the living room is viewed through window 32. Different floor plan information and orientation options are provided for users to choose from to meet their personalized needs.

[0063] For example, after the spatial area is determined, the front-end interface displays the floor plan information of the spatial area in a highlighted manner. Users can drag the camera (displayed as a camera model in the front-end interface) to place the camera near the floor plan information and point the camera's orientation information towards the spatial area, or point it in the opposite direction to the spatial area.

[0064] S203: When the camera is detected to be obstructing the view based on the shooting parameters and scene diagram, the obstruction area is determined.

[0065] While the specific orientation and location of the camera can be determined through the above methods, the camera may be located in other spatial areas, behind large feature models such as screens or cabinets, or even inside such features. In these cases, if the camera frames the shot using the current shooting parameters, the entire captured image will be obscured by these feature models, resulting in an inability to fully capture the spatial area due to occlusion. Therefore, before shooting a spatial area, the above situations need to be assessed. If the occlusion detection algorithm detects that a feature model occupies more than a preset threshold in the image, then the camera is confirmed to be obstructing the view, and the camera's shooting parameters are adjusted according to the identified obstruction area. Otherwise, the camera can directly capture the spatial area to generate the composition.

[0066] S204: Crop the occluded area to obtain the cropped result.

[0067] Specifically, in cases where there is significant occlusion in the image, the camera's cropping function can be used in 3D software to crop the occluded area, ensuring that the cropped result retains the content suitable for display space, thus resolving the image occlusion problem.

[0068] In one embodiment, after generating a target composition of the spatial region using the camera's shooting parameters when the cropping result does not have any image occlusion, the above method further includes:

[0069] When the image includes information about areas other than the spatial area in the scene diagram, adjust the camera's position information to update the camera's shooting parameters.

[0070] Because cropping may affect other content in the image due to excessive cropping distance, the cropped result may include walls or ground in the spatial area revealing the exterior view or other feature models in the spatial area.

[0071] For example, such as Figure 4 As shown, Figure 4This is a scene diagram of the camera in the spatial area in an embodiment of this application. When the camera 40 is located outside the window of the wall 43 and the viewing angle of the camera 40 is obliquely facing the living room 41, the picture at this time includes not only the content displayed in the living room 41, but also the wall 44, chair 45 and dining table 46 in the dining room 42.

[0072] Therefore, when the image includes information about areas other than the spatial area in the scene diagram, the camera's position information is moved forward by a first preset distance relative to the occluded area to obtain the camera's current position information.

[0073] The first preset distance can be set according to the actual situation of the camera in the scene. When cropping may affect the image, the camera's position and / or orientation can be moved to remove occlusion from the camera's view.

[0074] For example, when there is occlusion in the image, the occluded area can be cropped by moving the camera forward and using a smaller crop value, which reduces the likelihood that the cropped result will crop onto the wall, the ground, or other feature models.

[0075] Specifically, if the clipping value for the feature model in front of the camera is too large, it means that the camera is clipping onto walls, the ground, or other feature models, indicating that the camera position cannot generate a composition. In this case, the camera needs to be moved forward, which allows for a smaller clipping and reduces the probability of problems. There's no need to adjust the camera orientation, as adjusting the camera orientation means multiple compositions can be output; therefore, only one orientation needs to be considered for a single composition. When the area in front of the camera is occluded, the priority should be to clip away the occluded area. If the clipping result in clipping onto walls, the ground, or other feature models, then the camera's movement distance needs to be adjusted, and a smaller clipping area should be used. When the camera moves to the front of the occluded area, no clipping operation is needed; the camera position can be determined directly at this point.

[0076] In one embodiment, after moving the camera's position information forward by a first preset distance relative to the occluded area to obtain the camera's current position information, the method further includes:

[0077] When the current location information is behind the occluded area, the camera is moved forward by a second preset distance relative to the occluded area to obtain the updated current location information.

[0078] Specifically, after moving the camera forward a certain distance, it's necessary to determine if the camera is in front of the furthest obstruction area. If not, it's necessary to check again if there's any obstruction in the image. If there is, the obstruction needs to be resolved by adjusting the camera's position and combining this with cropping. If the camera is in front of the furthest obstruction area, it means the obstruction is behind the camera, and there is no obstruction.

[0079] S205: When the cropping result does not have any image occlusion, the target composition of the spatial area is generated by the camera's shooting parameters.

[0080] When there is no obstruction in the scene, that is, when the current position information is in front of the obstruction area, a new target composition is generated using the current camera shooting parameters.

[0081] In the embodiments of this application, such as Figure 5 As shown, Figure 5 This is a flowchart of another embodiment of the composition generation method of this application. The above scheme can be summarized into the following steps:

[0082] S501: The user selects the space to be displayed;

[0083] S502: Determine the feature model of the space and divide it into rectangular regions;

[0084] S503: Project information such as windows, doors, and openings in the original house layout onto a rectangular area as parameters for the camera position and orientation. The parameters include specifying camera parameters S5041, specifying reference objects and camera orientation S5042, and specifying composition type (panoramic, medium shot, oblique angle) S5043.

[0085] S505: The position and orientation of the camera are calculated using different methods depending on the composition type and reference object;

[0086] S506: Determine if the image is obstructed by a wall or model;

[0087] If yes, proceed to step S507; if no, proceed to step S511.

[0088] S507: Open the camera and crop to the area in front of the obstruction;

[0089] S508: Determine whether the exterior scene is exposed or cropped to other models;

[0090] If yes, proceed to step S509; if no, proceed to step S511.

[0091] S509: Move the camera forward a certain distance;

[0092] S510: Determines whether the camera has moved to the furthest obstruction;

[0093] If yes, proceed to step S511; if no, proceed to step S506.

[0094] S511: Generate composition;

[0095] By determining the spatial area to be photographed based on the scene image selected by the user, and obtaining shooting parameters to represent the camera pose based on the spatial area, when camera occlusion is detected based on the shooting parameters and the scene image, the occlusion area is determined and cropped to obtain the cropped result. When the cropped result does not have any occlusion, the target composition of the spatial area is generated based on the camera's shooting parameters. That is, the camera pose is determined by determining the spatial area to be photographed, which also determines the compositional perspective. Even if the camera is occluded in this pose, the occlusion area in front of the camera can be quickly removed by cropping. The final determined camera is used as the compositional perspective to automatically shoot the spatial area, solving the problem of composition effect and efficiency in design tools for users. It saves the time of manually adjusting the camera's compositional perspective, greatly improves the efficiency of composition generation and has more intelligent features.

[0096] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This computer program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. The aforementioned storage medium can be a non-volatile storage medium such as a magnetic disk, optical disk, or read-only memory (ROM), or random access memory (RAM).

[0097] It should be understood that although the steps in the flowcharts of the accompanying figures are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the accompanying figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.

[0098] Further reference Figure 6 As a response to the above Figure 2 The implementation of the composition generation method shown in this application provides a schematic diagram of an embodiment of a composition generation device, which is similar to... Figure 2 Corresponding to the method embodiments shown, this device can be specifically applied to various electronic devices.

[0099] like Figure 6As shown, the composition generation device described in this embodiment includes: a region determination module 61, a parameter acquisition module 62, an occlusion determination module 63, an occlusion clipping module 64, and a composition generation module 65. Wherein:

[0100] The area determination module 61 is used to determine the spatial area to be photographed based on the scene map selected by the user;

[0101] The parameter acquisition module 62 is used to acquire the camera's shooting parameters based on the spatial region; wherein, the shooting parameters represent the camera's pose.

[0102] The occlusion determination module 63 is used to determine the occlusion area when the camera is detected to be occluded in the scene based on the shooting parameters and scene diagram;

[0103] The occlusion and clipping module 64 is used to clip the occluded area to obtain the clipping result;

[0104] The composition generation module 65 is used to generate a target composition of a spatial area based on the camera's shooting parameters when the cropping result does not have any screen occlusion.

[0105] In one embodiment, the region determination module 61 includes:

[0106] The scene acquisition submodule is used to acquire a preset scene graph, which includes a feature model.

[0107] The region acquisition submodule is used to determine the geometric region corresponding to the feature model;

[0108] The spatial acquisition submodule is used to determine the spatial region to be photographed from the scene map based on the category and geometric region to which the feature model belongs; wherein, the feature model is associated with the attribute function of the spatial region.

[0109] In one embodiment, the parameter acquisition module 62 includes:

[0110] The first determination submodule is used to determine the information of multiple apartment types within the boundary of the spatial area;

[0111] The second determination submodule is used to determine the target apartment type information from multiple apartment type information;

[0112] The third determination submodule is used to determine the orientation information of the target apartment type as the camera parameters for the lens.

[0113] In one embodiment, the camera's shooting parameters include the camera's position information; the above-mentioned composition generation device further includes:

[0114] The position adjustment module is used to adjust the camera's position information to update the camera's shooting parameters when the image includes information about areas other than the spatial area in the scene diagram.

[0115] In one embodiment, the update module includes:

[0116] The moving submodule is used to move the camera's position information forward by a first preset distance relative to the occluded area to obtain the camera's current position information.

[0117] In one embodiment, the update module includes:

[0118] The composition acquisition module is used to acquire a new target composition using the current camera when the current location information is in front of the occluded area.

[0119] In one embodiment, the above-described pattern generation apparatus further includes:

[0120] The position movement module is used to move the camera forward a second preset distance relative to the occluded area when the current position information is behind the occluded area, so as to obtain the updated current position information.

[0121] Regarding the composition generation device in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated here.

[0122] To address the aforementioned technical problems, embodiments of this application also provide a computer device. Please refer to [link / reference needed]. Figure 7 , Figure 7 This is a basic structural block diagram of the computer device in this embodiment.

[0123] The computer device 7 includes a memory 71, a processor 72, and a network interface 73 that are interconnected via a system bus. It should be noted that only the computer device 7 with components 71-73 is shown in the figure; however, it should be understood that it is not required to implement all the shown components, and more or fewer components can be implemented alternatively. Those skilled in the art will understand that the computer device described here is a device capable of automatically performing numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes, but is not limited to, microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.

[0124] The computer device can be a desktop computer, laptop, handheld computer, or cloud server, etc. The computer device can interact with the user via a keyboard, mouse, remote control, touchpad, or voice control.

[0125] The memory 71 includes at least one type of readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or D-interface display memory), 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, disk, optical disk, etc. In some embodiments, the memory 71 may be an internal storage unit of the computer device 7, such as the hard disk or memory of the computer device 7. In other embodiments, the memory 71 may also be an external storage device of the computer device 7, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the computer device 7. Of course, the memory 71 may include both the internal storage unit and its external storage device of the computer device 7. In this embodiment, the memory 71 is typically used to store the operating system and various application software installed on the computer device 7, such as the program code of the drawing generation method. In addition, the memory 71 can also be used to temporarily store various types of data that have been output or will be output.

[0126] In some embodiments, the processor 72 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip. The processor 72 is typically used to control the overall operation of the computer device 7. In this embodiment, the processor 72 is used to run program code stored in the memory 71 or process data, for example, to run the program code of the graph generation method.

[0127] The network interface 73 may include a wireless network interface or a wired network interface, which is typically used to establish communication connections between the computer device 7 and other electronic devices.

[0128] This application also provides another embodiment, namely, a computer-readable storage medium storing a composition generation program, which can be executed by at least one processor to cause the at least one processor to perform the steps of the composition generation method as described above.

[0129] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0130] Obviously, the embodiments described above are only some embodiments of this application, not all embodiments. The accompanying drawings show preferred embodiments of this application, but do not limit the patent scope of this application. This application can be implemented in many different forms; rather, the purpose of providing these embodiments is to provide a more thorough and comprehensive understanding of the disclosure of this application. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing specific embodiments, or make equivalent substitutions for some of the technical features. Any equivalent structures made using the content of this application's specification and drawings, directly or indirectly applied to other related technical fields, are similarly within the scope of patent protection of this application.

Claims

1. A method for generating a composition, characterized in that, include: The area to be photographed is determined based on the scene map selected by the user; Based on the spatial region, the camera's shooting parameters are obtained; wherein, the shooting parameters represent the camera's pose. When the camera is detected to be occluded based on the shooting parameters and the scene diagram, the occlusion area is determined. The occluded area is cropped to obtain the cropping result; When the cropping result does not have any image occlusion, the target composition of the spatial area is generated by the shooting parameters of the camera; The step of determining the spatial area to be photographed based on the scene map selected by the user includes: Obtain a preset scene graph, wherein the scene graph includes a feature model; Determine the geometric region corresponding to the feature model; Based on the category to which the feature model belongs and the geometric region, the spatial region to be photographed is determined from the scene map; wherein, the feature model is associated with the attribute function of the spatial region; The step of obtaining the camera's shooting parameters based on the spatial region includes: Determine the information of multiple apartment types within the boundary of the spatial region; Determine the target apartment type information from among the multiple apartment type information; The orientation information of the target apartment type is used as the camera parameters of the lens; The scene diagram includes multiple areas of the apartment space. The user selects one of the areas in the scene diagram as the space to be photographed. The feature model is used to represent a representative model that has the function of dividing spatial regions. The representative model includes furniture models and types of home appliances that exist in a specific space. Users determine the category of the scene graph to which the feature model belongs by selecting at least one feature model. The category is the type of the spatial region corresponding to the feature model. Once the area where the user needs to shoot is determined, different composition angles are set according to the area. The different composition angles depend on the camera's shooting parameter settings. If the occlusion detection algorithm detects that a feature model occupies more than a preset threshold in the image, it confirms that the camera is occluding the image and adjusts the camera's shooting parameters according to the determined occlusion area. Otherwise, the camera directly shoots the spatial area to generate the composition.

2. The composition generation method according to claim 1, characterized in that, The camera's shooting parameters include the camera's position information; the method further includes: When the image includes information about areas other than the spatial area in the scene diagram, the position information of the camera is adjusted to update the camera's shooting parameters.

3. The composition generation method according to claim 2, characterized in that, When the image includes information about areas other than the spatial area in the scene diagram, adjusting the camera's position information to update the camera's shooting parameters includes: The camera's position information is moved forward by a first preset distance relative to the occluded area to obtain the camera's current position information.

4. The composition generation method according to claim 3, characterized in that, The method further includes: When the current location information is in front of the occluded area, a new target composition is obtained through the current camera.

5. The composition generation method according to claim 3, characterized in that, After moving the camera's position information forward by a first preset distance relative to the occluded area to obtain the camera's current position information, the method further includes: When the current location information is located behind the occluded area, the camera is moved forward a second preset distance relative to the occluded area to obtain the updated current location information.

6. A composition generation device, characterized in that, include: The area determination module is used to determine the spatial area to be photographed based on the scene map selected by the user. The parameter acquisition module is used to acquire the camera's shooting parameters based on the spatial region; wherein the shooting parameters represent the camera's pose. The occlusion determination module is used to determine the occlusion area when the camera is detected to be occluded in the scene based on the shooting parameters and the scene map; The occlusion and cropping module is used to crop the occluded area to obtain the cropping result; The composition generation module is used to generate a target composition of the spatial area based on the camera's shooting parameters when the cropping result does not have any image occlusion. When determining the spatial area to be photographed based on the scene map selected by the user, the area determination module performs the following operations: Obtain a preset scene graph, wherein the scene graph includes a feature model; Determine the geometric region corresponding to the feature model; Based on the category to which the feature model belongs and the geometric region, the spatial region to be photographed is determined from the scene map; wherein, the feature model is associated with the attribute function of the spatial region; When the parameter acquisition module acquires the camera's shooting parameters based on the spatial region, it performs the following operations: Determine the information of multiple apartment types within the boundary of the spatial region; Determine the target apartment type information from among the multiple apartment type information; The orientation information of the target apartment type is used as the camera parameters of the lens; The scene diagram includes multiple areas of the apartment space. The user selects one of the areas in the scene diagram as the space to be photographed. The feature model is used to represent a representative model that has the function of dividing spatial regions. The representative model includes furniture models and types of home appliances that exist in a specific space. Users determine the category of the scene graph to which the feature model belongs by selecting at least one feature model. The category is the type of the spatial region corresponding to the feature model. Once the area where the user needs to shoot is determined, different composition angles are set according to the area. The different composition angles depend on the camera's shooting parameter settings. If the occlusion detection algorithm detects that a feature model occupies more than a preset threshold in the image, it confirms that the camera is occluding the image and adjusts the camera's shooting parameters according to the determined occlusion area. Otherwise, the camera directly shoots the spatial area to generate the composition.

7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the composition generation method as described in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the composition generation method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Image generation device, image generation method, information recording medium, and program

    WO2009113547A1

  • Home decoration plan automatic design method and apparatus, computer device, and storage medium

    WO2022141887A1