Image generation method, electronic device, storage medium and program product
Through the image generation method, the spatial area is determined according to the decoration style and item category, and the item area is rendered to this area, solving the problem of difficulty in previewing the soft decoration effect during the decoration process, and realizing intuitive and realistic effect preview and efficient decoration process.
Patent Information
- Application Number
- CN202411865051.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2025-03-18
AI Technical Summary
The prior art is difficult to visually preview the soft decoration effect during the decoration process, resulting in a deviation from the final decoration results from expectations, and manual mapping is inefficient and inconvenient to try different styles of matching.
Through the image generation method, the first area in the spatial photo is determined according to the target decoration style and the category of the item in the item photo, and the item area is rendered to the area to form an image with the target style.
It realizes an intuitive and realistic soft decoration effect preview, improves decoration efficiency, and facilitates users to try different styles of matching.
Smart Images

Figure CN119648837A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to technical fields such as home decoration services, and in particular to an image generation method, electronic equipment, storage medium, and program product. Background Art
[0002] Soft furnishings are an important part of the home decoration process. Only when the soft furnishings are in line with the overall tone of the house can a good decoration effect be truly achieved. However, it is difficult to preview the soft furnishings effect visually during the decoration process, which may cause the final decoration results to deviate from the initial expectations. Although there are some technical means, such as manual mapping, that can obtain renderings in advance. However, the renderings generated by these methods have too rigid splicing between the house space photos and the soft furnishings, and do not have an intuitive and realistic display effect. In addition, the efficiency of manual mapping is low, and it is not convenient enough when trying different styles. Summary of the invention
[0003] The present disclosure provides an image generating method, an electronic device, a storage medium and a program product.
[0004] According to one aspect of the present disclosure, there is provided an image generation method, comprising: determining a first area in a space photo according to a target decoration style and categories of items in an item photo, the first area being a portion of the space photo suitable for placing the item under the condition of the target decoration style; intercepting an item area in the item photo, the item area being a portion of the item photo containing the item; and rendering the item area to the first area to form a target style image containing the item, the target style image having the target decoration style.
[0005] In some embodiments, determining a first area in a space photo according to a target decoration style and categories of items in the item photo includes: determining a first volume of the item that meets the target decoration style according to the categories of the item, the first volume providing required space for the item; determining functional requirements of each space unit in the space photo according to a house structure in the space photo, the house structure representing the layout of each space unit in the house; matching the category of the item with the functional requirements of each space unit to determine a target unit suitable for the item; and determining an area with the first volume in the target unit to obtain the first area.
[0006] In some embodiments, rendering the object area to the first area to form a target style image including the object includes: covering the object area to the first area to form a process image; and performing detail processing on the process image to form a target style image adapted to the target decoration style.
[0007] In some embodiments, detail processing is performed on the process image, including: performing shadow processing on the process image according to lighting parameters in the process image, the lighting parameters including lighting angle, lighting intensity, and lighting color, including: adding a shadow to the object portion of the process image; and adjusting the shadow of the area in the process image that is disturbed by the object portion, the shadow adjustment including shadow shape adjustment and shadow deletion.
[0008] In some embodiments, detail processing is performed on the process image, including: adding elements having the target decoration style or removing elements inconsistent with the target decoration style in the process image, wherein the elements include elements set on the object; and adjusting the object texture and the object material of the object part of the process image according to the target decoration style.
[0009] In some embodiments, before rendering the object area to the first area, the method further includes: calibrating the object area according to the target decoration style and the photo features of the space photo, including: adjusting the color of the object area to a target color adapted to the target decoration style; and adjusting the object area according to the resolution, brightness and contrast of the photo features, so that the object area has the photo features after adjustment.
[0010] In some embodiments, before determining the first area in the spatial photo, the method includes: obtaining the item photo and the spatial photo, including: displaying a plurality of item category items through an item category selection control; in response to a first operation on an item category item, opening a receiving window for item photos of the item category, and obtaining the item photos of the item category through the receiving window; or displaying an item photo control in response to a first operation on the item category item; and, in response to the first operation on the item photo control, determining the item photo.
[0011] In some embodiments, before determining the first area in the space photo, it also includes: determining at least one decoration style based on the object photo, the decoration style including the target decoration style; and generating at least one raw image task according to the at least one decoration style, wherein the decoration style corresponds to the raw image task one by one, the raw image task includes the object photo, the descriptive information of the decoration style, and the space photo, and the raw image task is an instruction for an image model to generate the target style image.
[0012] In some embodiments, after generating at least one raw image task according to the at least one decoration style, it includes: adding the raw image task to a task queue, and the image model executing the raw image task according to the task order of the task queue; and determining the feedback period of the target style image according to the position of the raw image task in the task queue.
[0013] In some embodiments, it also includes: recording the object photo and the space photo in a storage space, and generating an object photo address and a space photo address, wherein the object photo address indicates the location of the object photo in the storage space, and the space photo address indicates the location of the space photo in the storage space.
[0014] In some embodiments, before determining the first area in the space photo according to the target decoration style and the category of the items in the item photo, it includes: reading the item photo in the storage space according to the item photo address; reading the space photo in the storage space according to the space photo address.
[0015] According to another aspect of the present disclosure, an electronic device is provided, comprising: a memory storing execution instructions; and a processor executing the execution instructions stored in the memory, so that the processor executes the image generation method of any one of the above-mentioned embodiments.
[0016] According to another aspect of the present disclosure, a readable storage medium is provided, in which execution instructions are stored. When the execution instructions are executed by a processor, they are used to implement the image generation method of any of the above-mentioned embodiments.
[0017] According to yet another aspect of the present disclosure, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the image generating method of any one of the above embodiments is implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The accompanying drawings illustrate exemplary embodiments of the present disclosure and together with the description serve to explain the principles of the present disclosure. These drawings are included to provide a further understanding of the present disclosure and are incorporated in and constitute a part of this specification.
[0019] Figure 1 It is a schematic diagram of an application scenario of the image generation method according to an embodiment of the present disclosure.
[0020] Figure 2 It is an interactive flow chart of an image generation method according to an embodiment of the present disclosure.
[0021] Figure 3 It is a schematic diagram of a process of generating a style image according to an embodiment of the present disclosure.
[0022] Figure 4 It is a data flow diagram according to an embodiment of the present disclosure.
[0023] Figure 5 Schematic diagram of a target style image generation process according to an embodiment of the present disclosure.
[0024] Figure 6 is a flow chart of an image generation method according to an embodiment of the present disclosure.
[0025] Figure 7 It is a schematic block diagram of the structure of an image generating device according to one embodiment of the present disclosure.
[0026] Figure 8 It is a schematic block diagram of the structure of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0027] The present disclosure is further described in detail below in conjunction with the accompanying drawings and examples. It is understood that the specific examples described herein are only used to explain the relevant content, rather than to limit the present disclosure. It should also be noted that, for ease of description, only the parts related to the present disclosure are shown in the accompanying drawings.
[0028] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in the present disclosure can be combined with each other. The technical solution of the present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0029] As people's requirements for the aesthetics of their living environment continue to increase, soft furnishings have become an indispensable part of home decoration. However, since soft furnishings are difficult to change once they are installed, it becomes a challenge to ensure that the soft furnishing style that one likes can be in harmony with the overall atmosphere of the house before decoration. In many cases, although users have beautiful imaginations about soft furnishings before decoration, they find that the effect is not satisfactory after the actual decoration is completed. Most of the solutions currently on the market rely on textures, low-quality three-dimensional models or two-dimensional renderings. These methods make the integration of soft furnishings and room backgrounds appear unnatural, thus failing to achieve the ideal purpose of previewing the decoration effect; and there are also deficiencies in efficiency, especially when different styles need to be changed frequently for comparison, and their flexibility is even more limited.
[0030] Figure 1 Schematic diagram of an application scenario of the image generation method according to an embodiment of the present disclosure. Figure 1As shown, in this scenario, a server 100 and a terminal device 200 may be included, and the server 100 and the terminal device 200 may interact through a network or the like. The server 100 may be a cloud server or a physical server, and the terminal device 200 may be a computer, a mobile phone or the like. The server 100 is used to provide the basic data required to run the image generation method, and the terminal device 200 executes the image generation method of the present disclosure based on the basic data provided by the server 100.
[0031] The terminal device 200 may have a camera for collecting space photos of the house and photos of soft furnishings to be placed in the house. Of course, the terminal device 200 may not have a camera and obtain space photos and item photos from other devices. Alternatively, the terminal device 200 obtains item photos recorded in the storage space of the server 100 through interaction with the server 100, and displays these item photos, thereby determining item photos that meet the soft furnishing requirements according to the user's selection. Finally, the terminal device 200 runs the image generation method, and by controlling the image model, it can determine a variety of suitable decoration styles based on the item photos; and generate a raw image task for each decoration style. Further, according to the target decoration style, the category of the item, etc. in the currently executed raw image task, determine the area in the house suitable for placing the item, that is, identify the first area of the space photo. Then, the item area in the item photo is intercepted. Further, the item area is rendered to the first area to obtain a target style image with the target decoration style. For each raw image task, the terminal device 200 will generate and display the corresponding style image accordingly.
[0032] Figure 2 is an interactive flow chart of an image generation method according to an embodiment of the present disclosure. The image generation method can be run on Figure 1 On the terminal device 200, the terminal device 200 implements the operation of the image generation method by interacting with the storage space in the server 100, as well as the interaction between the client, management system, image model and other service modules built into the device terminal 200. Figure 2 It shows the data flow process between the client, management system, image model and storage space, as well as the processing actions of each part.
[0033] In step S201, the client uploads a space photo and uploads or selects an item photo.
[0034] Space photos are photos of real scenes inside the house to be decorated. The photos not only show the house structure and the effect of the hard decoration, but also reflect the existing furniture arrangement and other decorative elements in the current space. Space photos usually have specific lighting parameters, such as lighting angle, lighting intensity and lighting color, which affect the resolution, brightness and contrast of the photo.
[0035] Item photos are photos that are intended to show soft furnishings that are intended to be used in space layouts. Through these photos, you can clearly understand the specific features of the item, such as the design style, size, color matching, etc. For example, if the item is a three-seater orange sofa, then this item photo should show the appearance of the sofa in detail, including its backrest design and armrest details. Item photos can be presented in a variety of ways: on the one hand, you can simply focus on the target item itself and exclude all irrelevant background interference; on the other hand, it may be a photo taken in an actual environment (such as a shopping mall display area). In this case, other furnishings may appear around the item as background elements, such as floor lamps, etc. Despite the presence of these additional elements, the characteristics of the item itself can still be highlighted.
[0036] Space photos and item photos can be collected and transmitted in a variety of ways. These photos can be directly taken by a terminal device with a corresponding client installed, or taken by other devices and then transmitted to the client. In addition, item photos can also originate from the storage space of the server and be displayed to the user through the client for selection. In the case where the image model of the terminal device has powerful image cropping, splicing and rendering functions, the system can support users to upload their own item photos through the client. However, if the image model of the terminal device does not support externally uploaded photos, the user will be guided to select from the standard item photos pre-stored on the server. Specifically, the client displays a variety of item category items through the item category selection control; in response to the user's first operation (such as clicking) on the item category item, a receiving window for item photos of the item category is opened, and item photos of the item category are obtained through the receiving window; or in response to the first operation on the item category item, an item photo control is displayed; and, in response to the first operation on the item photo control, the item photo is determined. In summary, whether it is space photos or item photos, the acquisition method is flexible and diverse, ensuring that users can conveniently provide photo resources according to their own situation and can obtain a better soft decoration design experience.
[0037] In step S202, the management system writes the space photos and item photos uploaded by the client into the storage space, and determines the photo address URL (Uniform Resource Locator) of each photo.
[0038] The URL is the storage address of the photo in the storage space, which can indicate the location of the photo in the storage space. Specifically, after the space photo is stored in the storage space, a space photo address will be generated, and after each item photo is stored in the storage space, an item photo address will be generated. In the subsequent data flow process, the URL of each photo is used instead of the photo for transmission, which reduces the transmission overhead of photos between different services.
[0039] In step S203, the management system determines at least one decoration style based on the item photo.
[0040] The decoration style is usually determined based on the design style of the item in the item photo. For example, if the item in the item photo is a simple sofa, the decoration style applicable to the sofa can be simple style, cream style, log style, etc. Each decoration style defines the decorative elements, color matching, and material texture of soft furnishings. Therefore, different decoration styles will affect the design details of the items in the item photos, as well as the location and layout of the items in the house space. For example, the simple style tends to use simple lines and neutral tones, focusing on the openness and fluidity of the space; the log style emphasizes the use of natural elements, such as wooden furniture and green plants, to create a warm and close to nature atmosphere. Through these style-oriented design choices, the harmony and unity of objects and space can be ensured, thereby achieving the ideal interior design effect.
[0041] In step S204, the management system generates at least one image generation task according to the decoration style.
[0042] The raw image task is a trigger instruction for the image model, which contains key information such as space photos, item photos, and specified decoration styles. The decoration style includes style description text, etc. In this process, space photos and item photos can be transmitted in the form of URL links. When the image model executes the task, it can instantly call the corresponding photos in the storage space through the URL link. For each clear decoration style, a corresponding raw image task will be created. In particular, if a certain item photo can adapt to multiple different decoration styles, the management system will create a raw image task for the item photo under each applicable decoration style. Subsequently, the image model will execute each raw image task and generate a series of style images matching different decoration styles. In this way, users can choose the design scheme that best suits their aesthetics and needs from multiple options. This method not only improves the efficiency of image processing, but also enhances the user experience, allowing users to make the most appropriate choice based on intuitive visual feedback.
[0043] In step S205, the management system adds the image generation task to the task queue.
[0044] The task queue is used to manage and schedule image generation tasks to ensure that these tasks are delivered to the image model at a reasonable rate to avoid exceeding the processing capacity of the model. In the task queue, multiple image generation tasks are arranged according to their generation time sequence or pre-set task priority. Since the time it takes for the image model to process each image generation task is usually within a relatively fixed range, the task queue can predict the specific time period when the task is executed based on the position of the task in the task queue, that is, the time period when the user can obtain feedback on the style image.
[0045] Next, the management system executes step S206 to synchronize the predicted feedback period to the client. In this way, users can understand the approximate length of time they need to wait, improving the overall user experience. This mechanism not only optimizes the task processing flow, but also increases the user's perception of the transparency of the image generation process.
[0046] In step S207, the management system pushes the image generation task to the image model in the order of the task queue. In the present disclosure, the task being processed by the image model is called the target image generation task, the decoration style included in the target image generation task is the target decoration style, and the style image obtained by executing the target image generation task is called the target style image.
[0047] In step S208, the image model determines the first area of the space photo according to the target decoration style specified by the target image generation task and the category of the object in the object photo.
[0048] After the image model obtains the target raw image task, the category of the item in the item photo is first identified. The category of the item indicates the type of the item, for example, the item in the item photo is identified as a sofa, curtain or coffee table. The first area refers to the most suitable location for placing the item in the house space shown in the space photo. When determining the first area, the space required for the items placed in the area in the normal state or in a transformed state should be considered. For example, a functional sofa maintains a four-seat static state in the normal state, so the space required in the normal state is the volume of the sofa in the normal state; however, when the functional sofa is in a transformed state, such as the rocking state when the rocking chair function is activated or the unfolded state when the recliner function is activated, more space is required to meet its deformation requirements. Different categories of items require different spaces, so according to the category of the item, the first volume of the item that meets the target decoration style is determined, and the first volume can provide the space required for the item in the normal state or in a transformed state. Furthermore, according to the house structure of the space photo, the functional requirements of each space unit in the space photo are determined. The house structure represents the layout of each space unit in the house. For example, the place near the wall in the living room is more suitable for placing a sofa, etc., so the place near the wall in the living room can be used as a space unit, and its functional requirement is entertainment and rest. Further, the category of the object is matched with the functional requirements of each space unit to determine the target unit suitable for the object; for example, the main purpose of the sofa is to provide a rest function between entertainment, so the space unit with the functional requirement of entertainment and rest can be used as the target unit of the sofa. The area with the first volume is determined in the target unit to obtain the first area. In this way, the image model can accurately locate the best position of the object in the room, thereby ensuring that the generated design scheme is both beautiful and practical.
[0049] In step S209, the image model captures the object area in the object photo.
[0050] The object area refers to the part of the object photo that only contains the object. Image segmentation technology is usually used to separate the object area from the background area in the object photo, ensuring that when generating style images, the object area can be accurately integrated into the new environment, ensuring that users can evaluate the appearance, size and degree of fit of the object with the house space under purer visual conditions.
[0051] Of course, in order to better integrate soft furnishings into space photos of various styles, the image model also has a fine-grained segmentation unit. This unit can deconstruct the intercepted object area into smaller components so that each part can be processed and analyzed more carefully. For example, the sofa can be split into components such as cushions, armrests, and bases, so that the design or position of each part can be adjusted individually; the surface texture and pattern of the sofa can also be split to better simulate and replace these details. The segmentation of the object area by the fine-grained segmentation unit makes the object area exist in the form of multiple deconstructed parts, which are the basis for the image model to stylize the object area.
[0052] In step S210, the image model renders the object area to the first area to generate a target style image.
[0053] When the image model renders the object area to the first area, it first splices the object area in the first area with other parts of the space photo to obtain a process image. The process image is the result of combining the object area and the space photo, but the two are not unified in terms of shadows, textures, materials, etc. Further, combined with the target decoration style, the shadows in the process image are processed so that the position, light and shadow of each element in the process image conform to the rules of the real scene. At the same time, combined with the target decoration style, the park in the process image that does not conform to the target decoration style is removed, and elements that conform to the target decoration style are added; here, it is mainly about the replacement or deletion of the deconstructed part of the object area in the process image. For example, for a simple decoration style, the complex handles in the sofa should be deleted, and the complex patterns of the sofa should be replaced with simple patterns such as solid colors.
[0054] In step S211, the image model synchronizes the generated target style image to the management system, and the management system executes step S212 to write the target style image into the storage space.
[0055] Finally, the management system executes step S213 to present multiple style images adapted to the object photo to the client for user selection and preview.
[0056] Through the data flow between various service modules in the terminal device, users only need to upload photos of the space and objects to efficiently obtain images of various styles during the feedback period, thus avoiding the low-quality distortion effect and inefficient raw image experience caused by manual mapping.
[0057] Figure 3 is a schematic diagram of a process of generating a style image according to an embodiment of the present disclosure, Figure 4 Schematic diagram of data flow according to the embodiment of the present disclosure. Figure 3 and Figure 4As shown, the process of the terminal device running the image generation method is shown. The terminal device can be Figure 1 The terminal device 200 in.
[0058] The management system in the terminal device has the ability to identify the category of items and determine the decoration style to be used according to the category of items. At the same time, the management system also has the ability to generate and deliver raw image tasks, manage task queues, and recycle raw image tasks. The management system can be Figure 2 The following steps are performed by the management system: Get space photos and item photos. The method of obtaining space photos and item photos can refer to the previous description and will not be repeated here. It should be noted that before providing item photos, the user needs to select the category of the item in the transmitted item photos, such as sofas, curtains, refrigerators, etc.; after the user uploads the item photos, it is necessary to identify whether the category of the item photos is consistent with the category selected by the user. If not, the upload fails. For example, if the user selects a sofa and the item in the uploaded item photos is a curtain, a failure signal will be fed back. Similarly, if the space photos do not meet the characteristic requirements of the house space, a failure signal will also be fed back. Space photos and item photos can be stored in the storage space of the server, and the space photo address and item photo address can be determined based on the storage location. Subsequently, during the transmission process, only the space photo address and the item photo address need to be transmitted, which reduces the overhead of transmitting photos between various service modules.
[0059] Furthermore, at least one decoration style suitable for the item is determined based on the category of the item in the item photo. Then, at least one raw image task is generated based on the decoration style and written into the task queue. Based on the position of the target raw image task in the task queue and the general duration of the image model executing the raw image task, a feedback period in which the style image can be displayed to the user is determined so that the user can arrange the waiting time reasonably.
[0060] The image model in the terminal device is used to perform image generation tasks, including cutting, noise processing, assembly, and detail processing of space photos and object photos. The image model can be Figure 2 The following steps are performed by the image model: When a raw image task is the first in the task queue, the raw image task will be pushed to the image model as the target raw image task. The image model first determines the item category of the item in the item image, and then determines the first area of the space photo based on the item category and the target decoration style and style description text indicated in the raw image task.
[0061] Then, the object area is intercepted in the object photo, the object area is discretized from the object image, and multiple deconstructed parts are formed. Further, the object area is calibrated. The calibration process mainly adjusts the color of the object area to the target color that is suitable for the target decoration style; and adjusts the object area according to the photo features of the space photo, such as resolution, brightness and contrast, so that the resolution, brightness and contrast of the object area are consistent with the space photo. It can be understood that when the object is in the house space, when the house space equipped with the object is photographed, the lighting conditions and shooting equipment are consistent, then the photo features of the object presented in the photo should be consistent with the photo features of other parts of the house space. In this way, when the two are spliced, better splicing and fusion effects can be achieved, making the final image more realistic. Further, the object area is rendered to the first area of the space photo to form a target style photo.
[0062] Finally, the management system displays multiple style images of various decoration styles corresponding to the item photos and space photos to the client.
[0063] Figure 5 Schematic diagram of the target style image generation process according to an embodiment of the present disclosure. Figure 5 As shown in FIG. 1 , the process of changing a photo into a style image when the terminal device runs the image generation method is shown. The terminal device may be Figure 1 The terminal device 200 in.
[0064] The raw image task includes space photos and object photos. After receiving the raw image task, the image model determines the first area in the space photo; and segments the object area in the object photo. Then, the object area is calibrated to adjust the photo features, colors and other parameters of the object area. Further, the object area is spliced to the first area in the space photo, and the first area is covered or replaced by the object area to obtain a process image. Then, the diffusion processing unit in the image model is used to process the process image in detail, such as adjusting the shadows of the space photo part and the object area part in the process image to a reasonable state; according to the target decoration style, the elements of the non-target decoration style in the process image are removed, and some elements with the style are added; and according to the target decoration style, the texture and material of the object part are adjusted, etc., and finally the target style image is obtained. The target style image has the target decoration style, and the two spliced parts have the same or similar colors, lighting parameters, styles, and shadow projection effects suitable for its layout.
[0065] Figure 6 : is a flow chart of an image generation method according to an embodiment of the present disclosure. In order to implement the aforementioned technical solution, the present disclosure proposes an image generation method M600, comprising: Step S610, determining a first area in the space photo according to the target decoration style and the categories of the items in the item photo, the first area being a portion of the space photo suitable for placing items under the condition of the target decoration style; Step S620, capturing an item area in the item photo, the item area being a portion of the item photo containing the items; and Step S630, rendering the item area to the first area to form a target style image containing the items, the target style image having the target decoration style.
[0066] The specific implementation methods and principles of each step of the image generation method M600 can be found in the previous text and will not be repeated here.
[0067] The image generation method proposed in the present disclosure determines a variety of decoration styles suitable for an item based on the item photo, and renders and fine-tunes the details of the images of various styles through the image model, showing the user a variety of style images configured with the item, and efficiently providing the user with a realistic preview of the soft decoration effect. If there is no satisfactory style image, the style image can be updated in real time by changing the item photo, etc., which has more convenient change conditions than the traditional raw image solution.
[0068] Figure 7 It is a schematic block diagram of the structure of an image generating device according to one embodiment of the present disclosure. Figure 7 It is a virtual device of the image generation method, which can be set with Figure 1 In the terminal device 200.
[0069] The image generation device may include: a first region determination module 710, an item region determination module 720, and a rendering module 730. The first region determination module 710 executes step S610 to determine a first region in the space photo according to the target decoration style and the category of the item in the item photo, the first region being a portion of the space photo suitable for placing items under the condition of the target decoration style; the item region determination module 720 executes step S620 to intercept an item region in the item photo, the item region being a portion of the item photo containing the item; and the rendering module 730 executes step S630 to render the item region to the first region, forming a target style image containing the item, the target style image having the target decoration style.
[0070] In some embodiments, the first area determination module 710 is used to: determine the first volume of the items that meet the target decoration style based on the category of the items, the first volume providing the required space for the items; determine the functional requirements of each space unit in the space photo based on the house structure of the space photo, the house structure represents the layout of each space unit in the house; match the category of the items with the functional requirements of each space unit to determine a target unit suitable for the items; and determine an area with the first volume in the target unit to obtain the first area.
[0071] In some embodiments, the execution steps of the rendering module 730 include: covering the object area to the first area to form a process image; and performing detail processing on the process image to form a target style image adapted to the target decoration style.
[0072] Specifically, the process image is processed in detail, including: performing shadow processing on the process image according to the lighting parameters in the process image, the lighting parameters including lighting angle, lighting intensity, and lighting color, including: adding shadows to the object part of the process image; and adjusting shadows for the areas in the process image that are disturbed by the object part, the shadow adjustment including shadow shape adjustment and shadow deletion.
[0073] Specifically, the detail processing of the process image also includes: adding elements with a target decoration style or removing elements inconsistent with the target decoration style in the process image, the elements including elements set on the objects; and adjusting the object texture and object material of the object part of the process image according to the target decoration style.
[0074] In some embodiments, the rendering module 730 is also used to: calibrate the object area according to the target decoration style and the photo features of the space photo, including: adjusting the color of the object area to a target color that is suitable for the target decoration style; and adjusting the object area according to the resolution, brightness and contrast of the photo features, so that the object area has the photo features after adjustment.
[0075] In some embodiments, the acquisition module 740 is used to acquire item photos and space photos, including: displaying multiple item category items through an item category selection control; in response to a first operation on an item category item, opening a receiving window for item photos related to the item category, and acquiring item photos related to the item category through the receiving window; or in response to a first operation on an item category item, displaying an item photo control; and, in response to a first operation on the item photo control, determining the item photo.
[0076] In some embodiments, the management module 750 is used to determine at least one decoration style based on the object photo, where the decoration style includes the target decoration style; and generate at least one raw image task according to the at least one decoration style, where the decoration style corresponds to the raw image task one by one, and the raw image task includes the object photo, the descriptive information of the decoration style, and the space photo, and the raw image task is an instruction for the image model to generate the target style image.
[0077] In some embodiments, the management module 750 is also used to add the image generation task to the task queue, and the image model executes the image generation task according to the task order of the task queue; and determines the feedback period of the target style image according to the position of the image generation task in the task queue.
[0078] In some embodiments, the management module 750 is also used to record item photos and space photos in a storage space, and generate an item photo address and a space photo address, where the item photo address indicates the location of the item photo in the storage space, and the space photo address indicates the location of the space photo in the storage space.
[0079] In some implementations, the management module 750 is further used to: read item photos in the storage space according to the item photo address; and read space photos in the storage space according to the space photo address.
[0080] The image generating device 700 of the present disclosure may be in the form of computer software, and each module of the code generating device may be in the form of a computer software module.
[0081] The various modules of the image generating device 700 disclosed in the present invention are arranged to implement the various steps of the image generating method. The execution principles and steps thereof may all be referred to in the foregoing text and will not be described in detail here.
[0082] Figure 8 FIG. 1 is a schematic block diagram of the structure of an electronic device according to an embodiment of the present disclosure. Figure 8 As shown, the electronic device 1000 can execute the image generating method of any one of the embodiments described above in the present disclosure.
[0083] The bus 1100 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Component (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the figure only uses one connecting line, but does not mean that there is only one bus or one type of bus.
[0084] The present disclosure also provides a readable storage medium, in which a computer program is stored, and the computer program is used to implement the above method when executed by a processor. "Readable storage medium" can be any device that can contain, store, communicate, propagate or transmit a program for use in an instruction execution system, device or equipment or in combination with these instruction execution systems, devices or equipment. More specific examples of readable storage media include the following: an electrical connection portion (electronic device) with one or more wirings, a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and editable read-only memory (EPROM or flash memory), an optical fiber device, and a portable read-only memory (CDROM), etc.
[0085] The present disclosure also provides a computer program product. The method of the present disclosure can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instruction is loaded and executed, the process or function of the present disclosure is executed in whole or in part.
[0086] The computer program or instructions may be stored in a readable storage medium or transmitted from one readable storage medium to another readable storage medium, for example, the computer program or instructions may be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired or wireless means. The readable storage medium may be any available medium that can be accessed or a data storage device such as a server, data center, etc. that integrates one or more available media. The available medium may be a magnetic medium, such as a floppy disk, a hard disk, or a magnetic tape; it may also be an optical medium, such as a digital video disk; it may also be a semiconductor medium, such as a solid state drive. The computer readable storage medium may be a volatile or non-volatile storage medium, or may include both volatile and non-volatile types of storage media.
[0087] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, systems, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0088] The present disclosure is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the present disclosure. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0089] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0090] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0091] In the description of this specification, the description with reference to the terms "one embodiment / method", "some embodiments / methods", "example", "specific example", or "some examples" etc. means that the specific features, structures, or characteristics described in conjunction with the embodiment / method or example are included in at least one embodiment / method or example of the present disclosure. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment / method or example. Moreover, the specific features, structures, or characteristics described may be combined in any one or more embodiments / methods or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments / methods or examples described in this specification and features of different embodiments / methods or examples, unless they are contradictory.
[0092] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of the present disclosure, "plurality" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0093] Those skilled in the art should understand that the above embodiments are only for the purpose of clearly illustrating the present disclosure, and are not intended to limit the scope of the present disclosure. For those skilled in the art, other changes or modifications may be made based on the above disclosure, and these changes or modifications are still within the scope of the present disclosure.
[0094] It is understood that before using the technical solutions disclosed in the embodiments of the present disclosure, the type, scope of use, and usage scenarios of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations. For example, in response to receiving the user's active request, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require the acquisition and use of the user's personal information. The user can autonomously choose whether to provide personal information to the software or hardware such as the terminal 200, application, server or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message. As an optional but non-limiting implementation method, in response to receiving the user's active request, the method of sending the prompt message to the user can be, for example, a pop-up window, and the prompt information can be presented in the form of text in the pop-up window. In addition, the pop-up window can also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the terminal 200. The above notification and the process of obtaining user authorization are only illustrative and do not constitute a limitation on the implementation method of the present disclosure. Other methods that meet relevant laws and regulations can also be applied to the implementation method of the present disclosure. At the same time, it can be understood that the data involved in the technical solution of the present disclosure (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.
Claims
1. An image generation method, characterized in that: include: Determine a first area in the space photo according to the target decoration style and the category of the item in the item photo, where the first area is a portion of the space photo suitable for placing the item under the condition of the target decoration style; Cutting out an object area in the object photo, where the object area is a portion of the object photo that includes the object; The object area is rendered to the first area to form a target style image including the object, wherein the target style image has the target decoration style.
2. The image generation method according to claim 1, characterized in that: According to the target decoration style and the categories of the items in the item photos, determine the first area in the space photo, including: Determine, according to the category of the item, a first volume of the item that meets the target decoration style, wherein the first volume provides required space for the item; Determining functional requirements of each space unit in the space photo according to the house structure in the space photo, wherein the house structure represents the layout of each space unit in the house; Matching the category of the object with the functional requirements of each of the spatial units to determine a target unit suitable for the object; and A region having the first volume is determined in the target unit to obtain the first region.
3. The image generation method according to claim 1, characterized in that: Rendering the object region to the first region to form a target style image containing the object includes: Overlaying the object area onto the first area to form a process image; and The process image is processed in detail to form a target style image adapted to the target decoration style.
4. The image generation method according to claim 3, characterized in that: The process image is processed in detail, including: Performing shadow processing on the process image according to the illumination parameters in the process image, wherein the illumination parameters include illumination angle, illumination intensity, and illumination color, including: adding a shadow to the object portion of the process image; and A shadow adjustment is performed for the area in the process image that is partially disturbed by the object, wherein the shadow adjustment includes shadow shape adjustment and shadow deletion.
5. The image generation method according to claim 3, characterized in that: The process image is processed in detail, including: In the process image, adding elements having the target decoration style or removing elements inconsistent with the target decoration style, the elements including elements set on the object; and According to the target decoration style, the object texture and the object material of the object part of the process image are adjusted.
6. The image generation method according to claim 1, characterized in that: Before rendering the item area to the first area, the method further includes: According to the target decoration style and the photo features of the space photo, the object area is calibrated, including: Adjusting the color of the object area to a target color that is suitable for the target decoration style; and The object region is adjusted according to the resolution, brightness and contrast of the photo feature, and the object region has the photo feature after the adjustment.
7. The image generation method according to claim 1, characterized in that: Before determining the first area in the space photo, include: Acquiring the item photo and the space photo includes: Displaying a plurality of item category items through an item category selection control; in response to a first operation on an item category item, opening a receiving window for item photos related to the item category, and acquiring the item photos related to the item category through the receiving window; or In response to a first operation on the item category item, an item photo control is displayed; and in response to a first operation on the item photo control, the item photo is determined.
8. The image generation method according to claim 1, characterized in that: Before determining the first area in the space photo, it also includes: Determining at least one decoration style according to the item photo, wherein the decoration style includes a target decoration style; and At least one raw image task is generated according to the at least one decoration style, wherein the decoration style corresponds to the raw image task one by one, the raw image task includes the object photo, the description information of the decoration style, and the space photo, and the raw image task is an instruction for an image model to generate the target style image.
9. The image generation method according to claim 8, characterized in that: After generating at least one raw image task according to the at least one decoration style, the method includes: Adding the image generation task to a task queue, and the image model performs the image generation task according to the task order of the task queue; and The feedback period of the target style image is determined according to the position of the image generation task in the task queue.
10. The image generation method according to claim 1, characterized in that: Also includes: The item photo and the space photo are recorded in a storage space, and an item photo address and a space photo address are generated. The item photo address indicates the location of the item photo in the storage space, and the space photo address indicates the location of the space photo in the storage space.
11. The image generation method according to claim 10, characterized in that: Before determining the first area in the space photo based on the target decoration style and the categories of items in the item photo, include: Reading the item photo in the storage space according to the item photo address; The space photo is read from the storage space according to the space photo address.
12. An electronic device, characterized in that: include: A memory storing execution instructions; as well as A processor, wherein the processor executes the execution instruction stored in the memory, so that the processor executes the image generation method according to any one of claims 1 to 11.
13. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the image generating method according to any one of claims 1 to 11 is implemented.