Lighting design method based on floor plan
By semantically segmenting and skeletalizing the floor plan, a vector image is generated. Combined with ceiling type constraints, the spatial planning is optimized, solving the problems of instability in handling irregular apartment layouts and neglecting ceiling structure in existing technologies, and achieving high-precision lighting design.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GONEO GRP CO LTD
- Filing Date
- 2026-04-02
- Publication Date
- 2026-07-10
AI Technical Summary
Existing lighting design methods are unstable in handling irregular and integrated apartment layouts, misjudge functional areas of the space, and ignore the influence of the ceiling structure, making lighting layout schemes infeasible.
By semantically segmenting and skeletalizing the floor plan, a vector image is generated. Combined with the ceiling type as a constraint, spatial planning and functional zoning are carried out, the building wall edge recognition is optimized, and a high-precision lighting layout scheme is generated.
It improves the accuracy and feasibility of lighting design, eliminates burrs, jagged edges, and breaks in semantic segmentation, ensures that ceiling types are compatible with lighting fixtures, and achieves high-precision spatial planning and modeling.
Smart Images

Figure CN122365622A_ABST
Abstract
Description
Technical Field
[0001] This application mainly relates to the fields of computer vision and building information modeling, and in particular to a lighting design method based on floor plan. Background Technology
[0002] Against the backdrop of diversified architectural forms and the development of irregularly shaped apartment layouts, lighting fixtures, as spatial lighting elements, face higher design requirements, and rational lighting design has become a key step in improving the spatial experience. With the increasing popularity and application of artificial intelligence technology in interior design and lighting layout, methods for achieving high-precision apartment layout understanding and highly feasible lighting design are receiving significant attention.
[0003] However, existing technologies still have significant limitations in terms of the accuracy and rationality of lighting layout. Current lighting design methods directly model walls based on semantic segmentation results, which suffers from poor semantic segmentation quality, such as pixel-level jagged edges, breaks, etc., making it difficult to achieve high-precision understanding of the apartment layout and leading to lighting deviations. Secondly, existing methods are unstable in handling irregular and integrated apartment layouts; for example, they may mistakenly classify an open-plan living and dining area as a single functional area, lacking the ability to correct for irregular spaces and adapt to tilted spaces. Furthermore, existing methods ignore the impact of ceiling structure on lighting schemes, resulting in lighting schemes that are detached from physical reality and impractical, such as placing recessed downlights on a ceiling without chandeliers. Summary of the Invention
[0004] The technical problem to be solved by this application is to provide a lighting design method based on a floor plan, so as to achieve high-precision spatial planning modeling and generate a highly feasible lighting design scheme.
[0005] To address the aforementioned technical problems, this application provides a lighting design method based on a floor plan, comprising: semantically segmenting the floor plan to obtain a segmentation mask for the building walls; skeletalizing the segmentation mask to generate a skeleton diagram; fitting the skeleton diagram into multiple building wall segments based on the curvature characteristics of the skeleton diagram, wherein the multiple building wall segments include at least one of straight building wall segments, polygonal building wall segments, and curved building wall segments; merging the multiple building wall segments to obtain a vector diagram; performing spatial planning on the connected areas in the floor plan based on the building walls in the vector diagram to divide the connected areas into at least two functional zones; and generating a lighting layout scheme based on the floor plan.
[0006] In one embodiment of this application, after the step of spatially planning the connected areas in the floor plan according to the building walls of the vector diagram to divide the connected areas into at least two functional zones, the method further includes: rotating the floor plan so that the extension direction of the main building wall of the floor plan is aligned with the reference direction.
[0007] In one embodiment of this application, the step of spatially planning the connected areas in the floor plan based on the building walls of the vector diagram to divide the connected areas into at least two functional zones includes: determining the default dividing line of the connected areas, wherein the default dividing line is the equidistant line of the connected areas.
[0008] In one embodiment of this application, the step of spatially planning the connected areas in the floor plan based on the building walls of the vector diagram to divide the connected areas into at least two functional zones further includes: when the outline of the connected area includes corner points with curvature greater than a curvature threshold, constructing a first candidate dividing line passing through the corner points and perpendicular to the main direction of the connected area, and selecting a target dividing line from the first candidate dividing lines; in response to selecting the target dividing line, the target dividing line divides the connected area into the functional zones; in response to not selecting the target dividing line, using the default dividing line as the target dividing line to divide the connected area into the functional zones.
[0009] In one embodiment of this application, the connected region has multiple positioning points related to functional partitions. The step of selecting a target dividing line from the first candidate dividing lines includes: obtaining spatial information of the furnishings in the connected region and evaluating the passage cost of the connected region based on the spatial information; constructing paths between the positioning points of adjacent functional partitions where the passage cost is less than a first threshold; eliminating the first candidate dividing lines that do not intersect with the paths to obtain second candidate dividing lines; obtaining the angle ratio between the second candidate dividing line and the path and the angle between the second candidate dividing line and the main direction, and obtaining the area ratio of adjacent functional partitions after the connected region is divided by the second candidate dividing lines; calculating the score of the second candidate dividing lines based on the angle ratio and the area ratio; when the score difference of the second candidate dividing lines of adjacent functional partitions is less than a second threshold, merging the second candidate dividing lines as the target dividing lines of adjacent functional partitions; otherwise, selecting the second candidate dividing line with a score close to 1 as the target dividing line of adjacent functional partitions.
[0010] In one embodiment of this application, the step of generating a lighting layout scheme based on the plan layout includes: setting an area-based lighting strategy, and generating a lighting layout scheme based on the vector diagram and the lighting strategy.
[0011] In one embodiment of this application, the step of generating a lighting arrangement scheme based on the floor plan includes: obtaining the ceiling type and using the ceiling type as a constraint condition when generating the lighting arrangement scheme.
[0012] This application also proposes a lighting design system based on a floor plan, the system comprising: a memory for storing instructions executable by a processor; and a processor for executing the instructions to implement the method described above.
[0013] This application also proposes a computer storage medium storing computer program code that, when executed by a processor, implements the method described above.
[0014] This application also proposes a computer program product including computer program code, which, when executed by one or more processors, implements the steps described above.
[0015] Compared with the prior art, this application has the following advantages: (1) The skeleton map is obtained by skeletonizing the segmentation mask of the building wall. The skeleton map is then segmented and fitted based on the strong geometric prior of the building wall. The fitted building wall segments are then merged to obtain a vector map after geometric optimization of the building wall. This can eliminate problems such as burrs, jagged edges, and breaks in the semantic segmentation results, thereby significantly reducing the deviation in the identification of the edge position of the building wall. (2) Based on the geometric optimization of building walls, spatial path verification is introduced to perform spatial planning of connected areas. By generating paths between adjacent functional zones with a passage cost less than the first threshold, and based on path verification and screening of target dividing lines, the accuracy of functional zone division within connected areas is improved, thereby achieving high-precision spatial planning modeling and improving lighting accuracy. (3) Obtain the ceiling type as a hard constraint for lighting layout to avoid mismatch between ceiling type and lighting type, thereby improving the feasibility of lighting design methods. Attached Figure Description
[0016] The accompanying drawings are included to provide a further understanding of this application; they are incorporated into and constitute a part of this application. The drawings illustrate embodiments of this application and, together with this specification, serve to explain the principles of this application. In the drawings: Figure 1 This is a schematic flowchart of a lighting design method based on a floor plan according to an embodiment of this application; Figure 2 This is a schematic diagram of semantic segmentation according to an embodiment of this application; Figure 3This is a schematic diagram of the skeleton of an embodiment of this application; Figure 4 This is a schematic diagram of a fitted building wall segment according to an embodiment of this application; Figure 5 This is a schematic diagram of a vector graphic representation of an embodiment of this application; Figure 6 This is a flowchart illustrating the process of filtering target dividing lines according to an embodiment of this application; Figure 7 This is a schematic diagram of the usable indoor space according to an embodiment of this application; Figure 8 This is a schematic diagram of the path with the minimum travel cost within a connected area according to an embodiment of this application; Figure 9 This is a schematic diagram of the distribution of the second candidate dividing line according to an embodiment of this application; Figure 10 This is a schematic diagram of the result of dividing functional areas based on target dividing lines according to an embodiment of this application; Figure 11 This is a schematic diagram of the structure of a lighting design system based on a floor plan according to an embodiment of this application; Figure 12 This is a schematic diagram of the C / S system architecture according to an embodiment of this application.
[0017] Reference numerals: Skeleton key point 310, outline line 710, positioning point 720, path 810, corner point 820, second candidate segmentation line 910, target segmentation line 1010, electronic device 1100, communication bus 1101, processor 1102, read-only memory 1103, random access memory 1104, communication port 1105, hard disk 1106, C / S system architecture 1200, client 1201, client data storage 1202, server 1203, server data storage 1204, network 1205. Detailed Implementation
[0018] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are merely some examples or embodiments of this application. For those skilled in the art, these drawings can be applied to other similar scenarios without creative effort. Unless obvious from the context or otherwise specified, the same reference numerals in the drawings represent the same structures or operations.
[0019] As indicated in this application and claims, unless the context clearly indicates otherwise, the words "a," "an," "an," and / or "the" are not specifically singular and may include plural forms. Generally speaking, the terms "comprising" and "including" only indicate the inclusion of explicitly identified steps and elements, which do not constitute an exclusive list, and the method or apparatus may also include other steps or elements.
[0020] Unless otherwise specifically stated, the relative arrangement, numerical expressions, and values of the components and steps described in these embodiments do not limit the scope of this application. It should also be understood that, for ease of description, the dimensions of the various parts shown in the drawings are not drawn to actual scale. Techniques, methods, and devices known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and devices should be considered part of the specification. In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not as limitations. Therefore, other examples of exemplary embodiments may have different values. It should be noted that similar reference numerals and letters in the following drawings denote similar items; therefore, once an item is defined in one drawing, it need not be further discussed in subsequent drawings.
[0021] Furthermore, it should be noted that the use of terms such as "first" and "second" to define components is merely for the purpose of distinguishing the corresponding components. Unless otherwise stated, these terms have no special meaning and therefore should not be construed as limiting the scope of protection of this application. In addition, although the terminology used in this application is selected from commonly known and used terms, some terms mentioned in this application's specification may have been chosen by the applicant according to his or her judgment, and their detailed meanings are explained in the relevant sections of this description. Moreover, this application should be understood not only through the actual terms used, but also through the meaning implied by each term.
[0022] It should be understood that when a component is referred to as "on another component," "connected to another component," "coupled to another component," or "in contact with another component," it can be directly on, connected to, coupled to, or in contact with that other component, or there may be an intervening component. In contrast, when a component is referred to as "directly on another component," "directly connected to," "directly coupled to," or "directly in contact with" another component, there is no intervening component. Similarly, when a first component is referred to as "electrically contacting" or "electrically coupled to" a second component, there is an electrical path between the first and second components that allows current to flow. This electrical path may include capacitors, coupled inductors, and / or other components that allow current to flow, even if there is no direct contact between the conductive components.
[0023] Flowcharts are used in this application to illustrate the operations performed by the system according to embodiments of this application. It should be understood that the preceding or following operations are not necessarily performed in exact order. Instead, various steps can be processed in reverse order or simultaneously. Furthermore, other operations may be added to these processes, or one or more steps may be removed from these processes.
[0024] The following describes the automated object layout method for spatial scenes in this application through specific embodiments.
[0025] refer to Figure 1 The diagram shows a flowchart of a lighting design method based on a floor plan, the lighting design method including... Figure 1 Steps S110 to S160 are described in detail below.
[0026] In step S110, semantic segmentation is performed on the floor plan to obtain the segmentation mask of the building walls.
[0027] In practice, the floor plan includes the distribution and area information of the building walls. In the design field, building walls are generally understood as vertical components in a building used for load-bearing, enclosure, or space division; vertical components with doors or windows are also considered building walls. In step S110, semantic segmentation is performed on the floor plan. By generating pixel-level labels, the floor plan is identified as a segmentation mask that can distinguish between building walls and non-building walls. As an example, the floor plan is 512 pixels × 512 pixels. Pixels identified as building walls are labeled with 1, and pixels identified as non-building walls are labeled with 0, resulting in a segmentation mask for building walls of the same size (512 pixels × 512 pixels). The computer can then distinguish between building walls and non-building walls using this segmentation mask.
[0028] It should be noted that the specific processing steps and computer implementation code for semantic segmentation can be found in relevant technologies, and will not be elaborated here.
[0029] In some embodiments, the floor plan also includes text labels for functional areas, for example, a "Restaurant" label is present in the center of the restaurant. In step S110, the text labels are identified using Optical Character Recognition (OCR) technology, and the position of the text labels in the floor plan is accurately located, with the position of the text labels serving as the center position of the functional areas.
[0030] In step S120, the segmentation mask is skeletonized to generate a skeleton diagram.
[0031] Specifically, skeletonization is the process of simplifying the two-dimensional shape of a building wall, identified through semantic segmentation, into its essential linear structure. For example, the segmentation mask is skeletonized using the Zhang-Suen skeleton extraction algorithm. In practice, the input to the Zhang-Suen skeleton extraction algorithm is a binary segmentation mask, and the output is a skeleton map with a single pixel width. It is important to note that skeletonization can lose the thickness information of the building wall. However, this application preserves the thickness information of the building wall during the skeletonization process. For instance, the thickness information of the building wall is collected before skeletonization and stored as data to facilitate the recovery of the building wall thickness in subsequent steps.
[0032] In step S130, based on the curvature characteristics of the skeleton diagram, the skeleton diagram is fitted into multiple building wall segments, which include at least one of straight building wall segments, polygonal building wall segments, and curved building wall segments.
[0033] In practice, based on the curvature characteristics of the skeleton image, points exhibiting sharp curvature peaks are identified as skeleton key points, thus simplifying the skeleton image into multiple discrete skeleton key points. For example, for an "L"-shaped line segment in the skeleton image, its turning point exhibits a sharp curvature peak, therefore this turning point is identified as a skeleton key point. On the other hand, for a straight line segment in the skeleton image, the curvature values of its pixels are distributed smoothly, without exhibiting sharp curvature peaks, therefore this straight line segment is not identified as a skeleton key point.
[0034] Next, the simplified discrete skeleton keypoints are divided into several keypoint subsets that may have overlapping skeleton keypoints. Each keypoint subset is associated with a segment of building wall. In some embodiments, the number of skeleton keypoints in each keypoint subset can be used as a hyperparameter, and the number of skeleton keypoints in each keypoint subset can be set empirically, for example, each keypoint subset may contain three or four skeleton keypoints.
[0035] Next, the skeleton key points within each key point subset are fitted to obtain the corresponding building wall segments. Based on the fitting results, the building wall segment belongs to one of three types: straight, polygonal, or curved. Thus, the skeleton diagram is fitted into multiple building wall segments. Specifically, if the key point subset is fitted to a linear function using a linear fitting method (such as least squares), the corresponding building wall segment is a straight segment; if the key point subset is fitted to a piecewise linear function using a piecewise linear fitting method (such as the Douglas-Peucker algorithm), the corresponding building wall segment is a polygonal segment; and if the key point subset is fitted to a Bell curve using a curve fitting method (such as cubic B-spline interpolation), the corresponding building wall segment is a curved segment.
[0036] In step S140, multiple building wall segments are merged to obtain a vector diagram.
[0037] Specifically, in step S130, straight-line building wall segments are represented as linear functions, polygonal building wall segments as piecewise linear functions, and curved building wall segments as Bell curves. In step S140, the fitted building wall segments are merged to form a vector map corresponding to the building walls. It should be noted that this step also includes restoring the thickness information of the building walls retained in step S120 to form a complete vector map. Therefore, the vector map contains the geometrically optimized distribution and thickness information of the building walls and is stored in a standard storage format, such as a DXF format vector map.
[0038] refer to Figures 2 to 5 The following example illustrates the process of the building walls changing sequentially through steps S110 to S140, using a geometric optimization of the building walls in a floor plan.
[0039] The floor plan includes information on the distribution and area of the building walls, as well as textual labels for functional zones. After semantic segmentation in step S110, the floor plan is obtained as follows: Figure 2 The shown image is a segmentation mask for the building walls. Figure 2 In the process, some building wall segmentation masks have jagged edges and breaks (no burrs were identified in this embodiment), therefore based on Figure 2 The obtained edge positions of the building walls are inaccurate and require further geometric optimization.
[0040] Then, following step S120, the... Figure 2 The segmentation mask is skeletonized to obtain, as shown below. Figure 3The skeleton diagram shown preserves the thickness information of the building walls in data form, but the skeleton diagram itself does not display the thickness information. Due to semantic segmentation issues such as jagged edges and breaks, etc. Figure 3 As shown, taking the skeleton diagram selected by the dashed box as an example, multiple skeleton key points 310 (i.e., those exhibiting sharp curvature peaks) are identified within the dashed box. Figure 3 (The dots shown). The three skeleton key points 310 within the dashed box are considered as a subset of key points. Linear fitting is performed on this subset of key points to obtain straight-line building wall segments. Similarly, based on curvature characteristics, Figure 3 The skeleton diagram shown is fitted into multiple building wall segments, and these segments are then merged (e.g., Figure 4 (As shown).
[0041] Next, the thickness information of the building walls retained in step S120 is restored to the vector diagram to obtain the following: Figure 5 The vector diagram shown is the result of geometric optimization of the building walls, compared to... Figure 2 The semantic segmentation shown Figure 5 It eliminates obvious jaggedness and breakage problems, and reduces the deviation of the edge position of the building wall.
[0042] This application performs geometric optimization on the building walls in the plan layout drawing through steps S110 to S140, eliminating problems such as burrs, jagged edges, and breaks in the semantic segmentation results, and effectively reducing the deviation in the identification of the edge position of the building walls.
[0043] In step S150, based on the building walls in the vector diagram, spatial planning is performed on the connected areas in the floor plan to divide the connected areas into at least two functional zones.
[0044] Specifically, the usable interior area is obtained by subtracting the geometrically optimized building walls from the vector diagram based on the floor plan. Because the edge positioning of building walls in the vector diagram has smaller identification deviations, the calculated boundaries and area of the usable interior area are more accurate. Within the usable interior area, some functional zones are separated by no building walls, thus forming connected areas. These connected areas are divided into at least two functional zones; for example, an integrated living and dining area can be divided into a dining room functional zone and a living room functional zone, each adapted to different lighting requirements. The number and categories of functional zones can be determined by OCR-recognized text labels, by preset functional zone requirements, or by using artificial intelligence technology to identify the functional zone division requirements.
[0045] In some embodiments, in order to ensure that dividing lines can be generated for functional partitioning under any circumstances, step S150 includes determining the default dividing line of the connected region, wherein the default dividing line is the equidistant line of the connected region.
[0046] When the outline of a connected region (i.e., the outline obtained by subtracting the building walls from the vector diagram from the floor plan) includes corner points with curvature greater than a curvature threshold, a first candidate dividing line is constructed passing through the corner points and perpendicular to the main direction of the connected region. A target dividing line is then selected from the first candidate dividing lines. In response to selecting the desired target dividing line, the connected region is divided into functional zones.
[0047] When the outline of a connected region does not include corner points with curvature greater than a curvature threshold, it is impossible to construct a first candidate dividing line, and consequently, it is also impossible to select a target dividing line from the first candidate dividing lines. Therefore, in response to the failure to select the desired target dividing line, a default dividing line is used as the target dividing line to divide the connected region into functional zones. For example, for a circular connected region, dividing it into a dining area, a living room area, and a bedroom area, since this connected region does not include corner points with curvature greater than a curvature threshold, a trisection line is determined as the default dividing line, and this default dividing line is used as the target dividing line to divide the connected region into three functional zones that meet the requirements.
[0048] The following specific embodiment illustrates the method for selecting target dividing lines from first candidate dividing lines. Specifically, the connected region has multiple positioning points related to functional partitions. Positioning points are the start / end points for establishing a path between two adjacent functional partitions. If both adjacent functional partitions have text labels, the text labels are obtained through OCR recognition in step S110, and the two obtained text labels are used as the start and end points respectively to establish a path between the two adjacent functional partitions. If neither adjacent functional partition has a text label, the center point of the contour formed by the two adjacent functional partitions is first calculated, and the contour is extended to both sides along its main direction to obtain two intersection points with the contour as the start and end points, thus establishing a path between the two adjacent functional partitions. If only one of the two adjacent functional partitions has a text label, the text label identified in step S110 is selected, and one of the intersection points is obtained using the above method as the start and end points, thus establishing a path between the two adjacent functional partitions. For the main direction of the contour, a principal axis of the contour can be calculated using Principal Component Analysis (PCA) algorithm, and the direction parallel to the principal axis is taken as the main direction of the contour.
[0049] Methods for filtering target dividing lines include Figure 6 Steps S610 to S660 are described in detail below.
[0050] In step S610, spatial information of the furnishings in the connected region is obtained, and the passage cost of the connected region is evaluated based on the spatial information. Specifically, the spatial information of the furnishings includes, but is not limited to, the pose information and size information of the furnishings. This application does not limit the method of obtaining the spatial information of the furnishings. The spatial information of manually annotated furnishings can be obtained through human-computer interaction, or the spatial information of furnishings can be calculated through automated post-processing methods (such as object detection, clustering algorithms, automatic annotation, etc.). It can be understood that any method that can obtain the spatial information of furnishings is within the protection scope of this application.
[0051] Based on spatial information, the passage cost of connected areas is assessed. Specifically, sub-areas with furnishings have high passage resistance and their passage cost should be assessed as high, while sub-areas without furnishings (i.e., open areas) have low passage resistance and their passage cost should be assessed as low. It can be understood that after step S610, connected areas have a corresponding passage cost distribution map, enabling the formation of specific passage paths within connected areas based on passage cost requirements.
[0052] In step S620, paths with a travel cost less than a first threshold are constructed between the location points of adjacent functional zones. Specifically, based on the travel cost, a path search algorithm is used to construct multiple first paths from one location point in an adjacent functional zone to another, and the first path with a travel cost less than the first threshold is selected as the path constructed in step S620. The first threshold can be set according to the scenario requirements. For example, in scenarios where strict avoidance of objects is required, a lower first threshold is set so that travel paths close to objects exceed the first threshold and cannot be selected as first paths. Alternatively, in scenarios with limited space and no strict avoidance of objects is required, an appropriate first threshold is set to allow the selection of travel paths slightly closer to the edge of objects that satisfy the condition of a travel cost less than the first threshold as the first path.
[0053] In some embodiments, it is preferable to construct the path with the minimum travel cost between the location points of adjacent functional zones. For example, using the location points of adjacent functional zones as the start and end points, A... The algorithm searches for the second path with the minimum travel cost from the starting point to the ending point, which is then used as the path constructed in step S620.
[0054] In step S630, the first candidate dividing line that does not intersect with the path is eliminated to obtain the second candidate dividing line. Specifically, the first candidate dividing line that intersects with the path is retained as the second candidate dividing line for subsequent filtering steps.
[0055] It should be noted that when none of the first candidate dividing lines intersect with the path, the second candidate dividing line cannot be obtained, and the subsequent filtering steps S640 to S660 cannot be executed to filter and obtain the target dividing line. In this case, the failure to filter the target dividing line is directly triggered. In response to the failure to filter the target dividing line, the default dividing line is used as the target dividing line.
[0056] Continue to refer to Figure 6 In step S640, the angle ratio between the second candidate dividing line and the path and the angle between the second candidate dividing line and the main direction is obtained, as well as the area ratio of adjacent functional zones after the connected region is divided by the second candidate dividing line. Specifically, the angle between the second candidate dividing line and the path is obtained as the first angle, the angle between the second candidate dividing line and the main direction is obtained as the second angle, and the angle ratio between the first angle and the second angle is calculated, as well as the area ratio of adjacent functional zones obtained by dividing the connected region based on the second candidate dividing line is calculated. Here, the main direction refers to the main direction of the contour of the connected region. For example, the main axis of the contour is calculated by the PCA algorithm, and the main direction is the direction parallel to the main axis of the connected region.
[0057] In step S650, the score of the second candidate dividing line is calculated based on the angle ratio and area ratio. Specifically, a collaborative calculation formula based on the angle ratio and area ratio is used to comprehensively quantify the score of the second candidate dividing line from both the aspects of reasonableness and aesthetics of the division. For example, the collaborative calculation formula is: In the formula, The score for the second candidate dividing line. The angle ratio between the second candidate dividing line and the path and the main direction. This represents the area ratio of adjacent functional zones formed by the second candidate dividing line. and This is the weighting factor.
[0058] In some embodiments, setting That is, the weighting factor of the angle ratio is greater than that of the area ratio, so that the angle ratio has a greater influence on the score of the second candidate dividing line than the area ratio.
[0059] In step S660, when the score difference between the second candidate dividing lines of adjacent functional zones is less than the second threshold, the second candidate dividing lines are merged as the target dividing line of the adjacent functional zones; otherwise, the second candidate dividing line with a score close to 1 is selected as the target dividing line of the adjacent functional zones. Specifically, when there are at least two second candidate dividing lines between adjacent functional zones, and the scores of the second candidate dividing lines are very close (i.e., the score difference is less than the second threshold), the middle position of the second candidate dividing lines of the adjacent functional zones is taken as the merged target dividing line. Otherwise, the second candidate dividing line with a score closer to 1 (angle ratio and area ratio closer to 1) is selected as the target dividing line.
[0060] On a test set of 50 irregularly shaped living-dining-kitchen (LDK) floor plans, the living room, dining room, and kitchen functional areas were divided using both traditional methods and the technical solution of this application. Samples with segmentation errors within a certain range (no obvious segmentation errors and conforming to physical common sense) were identified as positive examples. Compared with traditional methods, the technical solution of this application improved the F1-score evaluation index to 0.89, significantly improving the accuracy of functional area segmentation in irregularly shaped connected areas, thereby achieving high-precision spatial planning modeling.
[0061] refer to Figures 7 to 10 The following is a specific example of generating and filtering the target dividing line to illustrate steps S610 to S660.
[0062] First, subtract the building walls from the vector diagram based on the floor plan to obtain the usable interior area, such as... Figure 7 As shown, the multiple internal areas formed by connecting the outline 710 end to end constitute the usable indoor areas. Within these usable indoor areas, there are multiple positioning points 720 related to functional zoning (i.e., Figure 7 The dot shown is used to determine the location of positioning point 720 by recognizing the text labels of the functional areas using OCR. For example... Figure 8 As shown, for Figure 7 The connected regions in the diagram are functionally partitioned. Following steps S610 (travel costs of connected regions not shown in the figure) and S620, the path 810 with the minimum travel cost between the location points is constructed (i.e., ...). Figure 8 (The polyline segments within the connected region shown). Construct first candidate dividing lines along multiple corner points 820 on the contour, passing through corner points 820 and perpendicular to the main direction of the connected region. Eliminate first candidate dividing lines that do not intersect the path, resulting in the following: Figure 9The second candidate dividing line 910 is shown. The score of the second candidate dividing line 910 is calculated based on the angle ratio and area ratio of the second candidate dividing lines of adjacent functional zones. Then, second candidate dividing lines 910 with similar scores are merged as the target dividing line, or the second candidate dividing line 910 with the score closest to 1 is selected as the target dividing line. For example... Figure 10 As shown, the target dividing line 1010 divides the connected region into four functional zones. Based on the actual scenario, the four functional zones from left to right are the balcony, living room, dining room and entrance area. The division of functional zones is both reasonable and aesthetically pleasing.
[0063] Continue to refer to Figure 1 In step S160, a lighting arrangement scheme is generated based on the plan layout diagram.
[0064] In some embodiments, to improve the physical feasibility of lighting layout, step S160 further includes obtaining the ceiling type and using the ceiling type as a constraint when generating the lighting layout scheme. For example, an interactive interface including a function to set the ceiling type is provided to obtain the ceiling type input by the user. As shown in Table 1, lighting layout constraint rules based on the ceiling type are set. The ceiling types include suspended ceiling, edge-mounted ceiling, and no ceiling. Each ceiling type has a corresponding lighting layout constraint rule, and the process of generating the lighting layout scheme requires the lighting layout constraint rules shown in Table 1 as constraint conditions.
[0065] Table 1: Lighting Constraint Rules Based on Ceiling Type
[0066]
[0067] In some embodiments, step S160 includes setting an area-based lighting strategy and generating a lighting layout scheme based on the floor plan and the lighting strategy. For example, based on design experience, a three-level area-based lighting strategy as shown in Table 2 is pre-set, and a floor plan with spatial planning completed in step S150 is used to generate a specific lighting layout scheme.
[0068] Table 2: Three-level lighting strategy based on area.
[0069]
[0070] It is understood that the area-based lighting strategy and the ceiling type-based lighting constraint rules in the above embodiments are not independent parallel choices. Both the area-based lighting strategy and the ceiling type-based lighting constraint rules can be considered simultaneously in one embodiment to generate a reasonable lighting layout scheme.
[0071] In some embodiments, before generating the lighting layout scheme in step S160, the plan layout is rotated to align the extension direction of the main building wall in the plan layout with a reference direction. Specifically, the longest building wall in the plan layout is determined as the main building wall, and the orientation angle of the main building wall is detected using the Hough transform algorithm. Direction angle This refers to the angle between the main building's walls and a reference direction (such as the horizontal direction). Rotate the floor plan around its center. The angle is adjusted so that the extension direction of the main building walls in the floor plan is aligned with the reference direction, thus normalizing the sloping room type. Subsequently, in step S160, a lighting layout scheme is generated based on the normalized floor plan, and a reverse rotation is output. The lighting arrangement scheme based on the angles will be used as the final lighting arrangement scheme.
[0072] This application also proposes a lighting design system based on a floor plan, including a memory for storing instructions executable by a processor, and a processor for executing the instructions to implement an automated object layout method for a spatial scene as described above.
[0073] As an embodiment, the logical functional modules of the lighting design system based on floor plan of this application include a floor plan input module, a geometry optimization and spatial partitioning module, a lighting design engine module, and a scheme output module. It can be understood that each module in this embodiment can be implemented by the memory and processor described above. The floor plan input module is used to perform semantic segmentation on the input floor plan to obtain segmentation masks for the building walls. The geometry optimization and spatial partitioning module is used to optimize the building walls and divide connected areas into at least two functional zones to form an accurate spatial planning model. The lighting design engine module is used to generate a lighting layout scheme based on the spatial planning model formed by the geometry optimization and spatial partitioning module and the set lighting strategy. The scheme output module is used to output the generated lighting layout scheme to the user. The output format of the lighting layout scheme includes a list of luminaires, a corresponding quotation scheme, and a lighting diagram.
[0074] like Figure 11 As shown, as one embodiment, a lighting design system based on a floor plan may include an internal communication bus 1101, a processor 1102, a read-only memory (ROM) 1103, a random access memory (RAM) 1104, and a communication port 1105. When applied to a personal computer, the electronic device may also include a hard disk 1106.
[0075] The internal communication bus 1101 enables data communication between components of the electronic device 1100. The processor 1102 can make judgments and issue prompts. In some embodiments, the processor 1102 may consist of one or more processors. The communication port 1105 enables data communication between the electronic device 1100 and external devices. In some embodiments, the electronic device 1100 can send and receive information and data from a network through the communication port 1105.
[0076] The lighting design system based on the floor plan may also include different types of program storage units and data storage units, such as hard disk 1106, read-only memory (ROM) 1103, and random access memory (RAM) 1104, capable of storing various data files used for computer processing and / or communication, as well as possible program instructions executed by processor 1102. The processor executes these instructions to implement the main parts described above. The results of processor processing are transmitted to the user equipment via a communication port and displayed on the user interface.
[0077] It is understandable that lighting design systems based on floor plans can also be deployed in, for example... Figure 12 The C / S system architecture 1200 shown includes a client 1201, a client data storage 1202, a server 1203, a server data storage 1204, and a network 1205. The client 1201 and the server 1203 communicate through the network 1205. The memory and processor of the lighting design system based on the floor plan can be configured in either the server 1203 or the client 1201.
[0078] This application also proposes a computer-readable medium storing computer program code that, when executed by a processor, implements the method described above.
[0079] In addition, this application also proposes a computer program product, including computer program code, which, when executed by one or more processors, enables the implementation of the steps described above.
[0080] The basic concepts have been described above. Obviously, for those skilled in the art, the above disclosure is merely illustrative and does not constitute a limitation of this application. Although not explicitly stated herein, those skilled in the art may make various modifications, improvements, and corrections to this application. Such modifications, improvements, and corrections are suggested in this application, and therefore remain within the spirit and scope of the exemplary embodiments of this application.
[0081] Furthermore, this application uses specific terms to describe embodiments of the application. For example, "an embodiment," "one embodiment," and / or "some embodiments" refer to a particular feature, structure, or characteristic related to at least one embodiment of the application. Therefore, it should be emphasized and noted that "an embodiment," "one embodiment," or "an alternative embodiment" mentioned twice or more in different locations in this specification do not necessarily refer to the same embodiment. In addition, certain features, structures, or characteristics in one or more embodiments of the application can be appropriately combined.
[0082] Similarly, it should be noted that, in order to simplify the description of the present application and thus aid in the understanding of one or more embodiments, the foregoing description of the embodiments of the present application sometimes combines multiple features into a single embodiment, drawing, or description thereof. However, this disclosure method does not imply that the subject matter of the present application requires more features than those mentioned in the claims. In fact, the embodiments contain fewer features than all the features of the single embodiments disclosed above.
[0083] In some embodiments, numbers describing the quantity of components and attributes are used. It should be understood that such numbers used in the description of embodiments are modified in some examples with the terms "approximately," "approximately," or "generally." Unless otherwise stated, "approximately," "approximately," or "generally" indicates that the numbers are allowed to vary by ±20%. Accordingly, in some embodiments, the numerical parameters used in the specification and claims are approximate values, which may be changed depending on the characteristics required by individual embodiments. In some embodiments, numerical parameters should take into account specified significant digits and employ a general method of digit reservation. Although the numerical ranges and parameters used to confirm their breadth of scope in some embodiments of this application are approximate values, in specific embodiments, such values are set as precisely as feasible.
[0084] Although this application has been described with reference to specific embodiments, those skilled in the art should recognize that the above embodiments are only used to illustrate this application, and various equivalent changes or substitutions can be made without departing from the spirit of this application. Therefore, any changes or modifications to the above embodiments within the essential spirit of this application will fall within the scope of the claims of this application.
Claims
1. A lighting design method based on a floor plan, characterized in that, include: Semantic segmentation is performed on the floor plan to obtain the segmentation mask for the building walls; The segmentation mask is skeletonized to generate a skeleton diagram; Based on the curvature characteristics of the skeleton diagram, the skeleton diagram is fitted into multiple building wall segments, which include at least one of straight building wall segments, polygonal building wall segments, and curved building wall segments; Merge the multiple building wall segments to obtain a vector diagram; Based on the building walls in the vector diagram, spatial planning is performed on the connected areas in the floor plan to divide the connected areas into at least two functional zones; as well as Based on the floor plan, a lighting layout scheme is generated.
2. The lighting design method based on a floor plan as described in claim 1, characterized in that, After the step of spatially planning the connected areas in the floor plan based on the building walls of the vector diagram to divide the connected areas into at least two functional zones, the method further includes: rotating the floor plan so that the extension direction of the main building wall of the floor plan is aligned with the reference direction.
3. The lighting design method based on a floor plan as described in claim 1, characterized in that, Based on the building walls in the vector diagram, the step of spatially planning the connected areas in the floor plan to divide the connected areas into at least two functional zones includes: Determine the default dividing line of the connected region, wherein the default dividing line is the bisector of the connected region.
4. The lighting design method based on a floor plan as described in claim 3, characterized in that, The step of spatially planning the connected areas in the floor plan based on the building walls in the vector diagram to divide the connected areas into at least two functional zones further includes: When the outline of the connected region includes corner points with curvature greater than a curvature threshold, a first candidate segmentation line is constructed that passes through the corner points and is perpendicular to the main direction of the connected region, and a target segmentation line is selected from the first candidate segmentation lines. In response to the selection of the target dividing line, the target dividing line divides the connected region into the functional partitions; In response to the failure to select the target dividing line, the default dividing line is used as the target dividing line to divide the connected region into the functional partitions.
5. The lighting design method based on a floor plan as described in claim 4, characterized in that, The connected region has multiple positioning points related to the functional partition. The step of filtering the target dividing line from the first candidate dividing line includes: Obtain spatial information of the furnishings in the connected region, and evaluate the passage cost of the connected region based on the spatial information; Construct a path between the location points of adjacent functional zones where the travel cost is less than a first threshold; Eliminate the first candidate dividing line that does not intersect with the path to obtain the second candidate dividing line; Obtain the ratio of the angle between the second candidate dividing line and the path to the angle between the second candidate dividing line and the main direction, and obtain the ratio of the areas of adjacent functional partitions after the connected region is divided by the second candidate dividing line; Calculate the score of the second candidate dividing line based on the angle ratio and the area ratio; When the score difference between the second candidate dividing lines of adjacent functional partitions is less than the second threshold, the second candidate dividing lines are merged as the target dividing lines of adjacent functional partitions; otherwise, the second candidate dividing line with a score close to 1 is selected as the target dividing line of adjacent functional partitions.
6. The lighting design method based on a floor plan as described in claim 1, characterized in that, The steps for generating a lighting layout scheme based on the floor plan include: setting an area-based lighting strategy, and generating a lighting layout scheme based on the vector diagram and the lighting strategy.
7. The lighting design method based on a plan layout as described in claim 1 or 6, characterized in that, The steps for generating a lighting layout plan based on the aforementioned floor plan include: Obtain the ceiling type and use the ceiling type as a constraint when generating the lighting layout scheme.
8. A lighting design system based on a floor plan, the system comprising: Memory is used to store instructions that can be executed by the processor; as well as A processor for executing the instructions to implement the method as described in any one of claims 1-7.
9. A computer storage medium storing computer program code, said computer program code implementing the method as claimed in any one of claims 1-7 when executed by a processor.
10. A computer program product comprising computer program code, wherein when the computer program code is executed by one or more processors, the one or more processors implement the steps of the method as described in any one of claims 1-7.