CN111008416B - Method and system for generating illumination effect of house type scene - Google Patents

Method and system for generating illumination effect of house type scene Download PDF

Info

Publication number
CN111008416B
CN111008416B CN201911101210.9A CN201911101210A CN111008416B CN 111008416 B CN111008416 B CN 111008416B CN 201911101210 A CN201911101210 A CN 201911101210A CN 111008416 B CN111008416 B CN 111008416B
Authority
CN
China
Prior art keywords
point
points
area
room
line segment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911101210.9A
Other languages
Chinese (zh)
Other versions
CN111008416A (en
Inventor
陈旋
周海
王洪建
刘化丹
赵瑞新
席璐
刘尧辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jiangsu Aijia Household Products Co Ltd
Original Assignee
Jiangsu Aijia Household Products Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jiangsu Aijia Household Products Co Ltd filed Critical Jiangsu Aijia Household Products Co Ltd
Priority to CN201911101210.9A priority Critical patent/CN111008416B/en
Publication of CN111008416A publication Critical patent/CN111008416A/en
Application granted granted Critical
Publication of CN111008416B publication Critical patent/CN111008416B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02BCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO BUILDINGS, e.g. HOUSING, HOUSE APPLIANCES OR RELATED END-USER APPLICATIONS
    • Y02B20/00Energy efficient lighting technologies, e.g. halogen lamps or gas discharge lamps
    • Y02B20/40Control techniques providing energy savings, e.g. smart controller or presence detection

Landscapes

  • Circuit Arrangement For Electric Light Sources In General (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a method and a system for generating an illumination effect of a house type scene, in particular to a method and a system for automatically supplementing light based on geometrical characteristics of a house type space region and space information occupied by a furniture model, and belongs to the technical field of computer aided design. The invention provides an automatic light supplementing method and system based on geometric characteristics of a house type space region and space information occupied by a furniture model. And automatically calculating the specific position of the light supplement lamp to be placed by utilizing the geometrical characteristic data of the area and the space information occupied by the model in the space. The efficiency of designer's work is saved for the workflow.

Description

Method and system for generating illumination effect of house type scene
Technical Field
The invention discloses a method and a system for generating an illumination effect of a house type scene, in particular to a method and a system for automatically supplementing light based on geometrical characteristics of a house type space region and space information occupied by a furniture model, and belongs to the technical field of computer aided design.
Background
In the exhibition of house type design effect, often because self-defined light irradiation effect exists not enoughly, need increase the light source to increase the indoor bandwagon effect.
The existing home decoration design software and the light supplement method are mainly based on that light supplement lamps are manually dragged one by one in a scheme scene, and the positions of the light supplement lamps are manually adjusted. If a better light supplement effect is to be achieved, most light supplement lamps are needed, adjustment is not stopped, and much time of a designer needs to be consumed.
In addition, after the supplementary lighting is completed, in order to better show the design effect to the customer, a better observation position needs to be automatically generated through software. The indoor panorama is presented and is favorable to the user and can experience the foreseeing effect after the house ornamentation design conveniently, but the initial visual angle and the camera observation point (or can be called as the positional information that the anthropomorphic dummy is located in three-dimensional space) of panorama are very important to the visual effect of panorama, a good observation point, can give the better experience of observer to each spatial zone, automatic calculation initialization camera direction vector and observation point, can reduce the process that the designer's house ornamentation was designed manually to click with the loaded down with trivial details, and the work efficiency is improved. In the existing home decoration software, a method for automatically generating a better global observation point is not provided.
Disclosure of Invention
The purpose of the invention is: the problem that light supplementing points cannot be automatically added to house types by existing home decoration design software is solved. The invention provides an automatic light supplementing method and system based on geometric characteristics of a house type space region and space information occupied by a furniture model. And automatically calculating the specific position of the light supplement lamp to be placed by utilizing the geometrical characteristic data of the area and the space information occupied by the model in the space. The efficiency of designer's work is saved for the workflow. Meanwhile, the invention can also realize finding a better method for determining the automatic display points for displaying the design effect of various rooms after the light supplement setting is obtained, and can effectively determine the display position and angle in the software according to different characteristics of various rooms.
The technical scheme is as follows:
a method for generating illumination effect of house type scene includes the following steps:
step 1, acquiring boundary areas of all rooms in a house type graph, and identifying boundary points; for the sets of boundary points which are in a collinear relationship, deleting boundary points except the boundary points at two ends from the sets; and the remaining boundary points are numbered counterclockwise or clockwise continuously;
step 2, traversing each boundary point in turn for the ordered point set of the boundary points of the restaurant, the living room or the bedroom, and calculating a vector V1 between the current point and the next point, a vector V2 between the current point and the next point, and a vector V3 between the current point and the point A; then, the outer products A1 of V3 and V1 and A2 of V1 and V2 are calculated; if the inner product signs of A1 and A2 are positive, marking a convex area by an area formed by the previous point of the current point, the next point of the current point and the next point of the current point in sequence; after the traversing process is completed, identifying all the convex areas; for three sequentially connected line segments of the convex area, the shortest line segment of the two line segments at the head and the tail and the middle line segment form a rectangle as a convex rectangle; if the lengths of the head line segment and the tail line segment are equal, one of the head line segment and the tail line segment is arbitrarily selected to form a rectangle with the middle line segment; selecting the convex rectangle with the largest area, and entering the step 3;
step 3, contracting the four vertexes of the rectangle for a certain distance towards the center of the rectangle in equal proportion to obtain four contraction points; respectively taking the horizontal coordinate of the middle point between the four contraction points and the central point of the rectangle as the horizontal coordinate of the alternative light supplementing point, and taking the height obtained by subtracting a certain distance from the height of the wall as the vertical coordinate of the light supplementing point;
step 4, acquiring the coordinate of the minimum bounding box of the furniture in the room, selecting the furniture with higher height, acquiring a projection area of the furniture with higher height on a horizontal plane, and amplifying the projection area by a certain proportion to be used as a furniture projection area; and if the projection position of the alternative light supplementing point on the horizontal plane is positioned in the furniture projection area, deleting the light supplementing point from the alternative light supplementing point, and taking the rest light supplementing points as the positions of the light supplementing lamps.
In one embodiment, the area of the protruding region is obtained by: the area is the length of the shorter of the two line segments from the head to the tail x the length of the middle line segment.
In one embodiment, the step 3, shrinking the four vertices of the rectangle to the center of the rectangle by a certain distance in equal proportion means shrinking by 15 to 30 centimeters.
In one embodiment, the step 3 of subtracting a certain distance from the Height of the wall is called wall Height-Tol, wherein wall Height is the Height of the wall, Height is the Height of the bottom surface of the suspended ceiling from the top of the wall, and Tol is set to a value between 10 cm and 20 cm.
In one embodiment, the higher height furniture in step 4 is furniture having a height greater than 250 centimeters.
In one embodiment, the step 4 for enlarging the projection area by a certain ratio is to enlarge the area by 0.05-0.3 times.
In one embodiment, the method for determining the position of the fill light of the toilet further comprises the following steps:
for a dry-wet separation type toilet, a dry-wet separation wall is identified, the midpoints of the walls are respectively taken as vertical lines towards the two sides of the wall, the two vertical lines are respectively intersected with the boundary line segment of the toilet to obtain two intersection points, and the midpoints of the line segments between the two intersection points and the midpoints of the walls are respectively used as the horizontal positions of the light supplement lamps.
In one embodiment, the method for determining the position of the supplementary lighting lamp in the kitchen, the storage room or the hatrack room comprises the following steps:
executing the step 3 to obtain horizontal and vertical coordinates of the alternative light supplement points;
identifying an object in a room, obtaining a minimum bounding box of the object, and judging whether an alternative light supplementing point falls in the minimum bounding box; if at least one alternative light supplement point is not in the minimum bounding box, one of the light supplement points is taken as the position of the light supplement lamp; and if all the alternative light supplement points are in the minimum bounding box, taking the middle point of the door of the room, and extending a certain distance to the interior of the room along the middle point to be used as the horizontal direction coordinate of the light supplement lamp.
In one embodiment, extending a distance along the midpoint toward the interior of the room means extending 20-30 centimeters.
In one embodiment, the method for determining the position of the fill light in the corridor or the entrance area comprises the following steps:
judging whether the living room and the restaurant are in adjacent position relation;
1) if the living room and the dining room are adjacent, finding the largest protruding rectangle of the living room, extending the head line segment and the tail line segment of the rectangle, and if the line segments can be extended and at least one intersection point can be obtained with the living room, taking the division area of the extension line of the obtained intersection point, which faces the outside of the living room, as an entrance or a corridor;
a perpendicular line penetrating through the segmentation region is made from the middle point of the extension line, another intersection point of the perpendicular line and the segmentation region is obtained, the middle point of the extension line is defined as an oldstart point, and the other intersection point is an olden point; respectively contracting the oldstart point and the oldden point to the middle point of the vertical line by a certain distance ShrinkL, wherein the distance between newstart and newend is TempL, and the distance between oldstart and oldden is TempLength;
calculating the value TempN of TempL divided by (2 × ShrinkL); the number NumOfLights of the temporary lights to be supplemented is TempN + 1;
if TempLength < > 150 cm or NumOfLights < > 2; calculating the central points of oldStart and oldEnd as the horizontal coordinates of the fill-in light;
if NumOfLights > -3, calculating a lamp spacing value EachDis ═(TempLength-2 × (ShrinkL)/(NumOfLights-1)), taking the newstart and newend as the light points to be compensated, and adding a new point as the light point to be compensated after every EachDis distance between the two points;
2) if the living room and the dining room are not adjacent, all the convex rectangles of the living room or the dining room are respectively found, and light supplementing points are arranged inside the other convex rectangles except the convex rectangle with the largest area.
In one embodiment, ShrinkL is set between 65-70 centimeters.
In one embodiment, the method for determining the background wall of the living room comprises the following steps:
for the boundary point of living room, arbitrarily taking two adjacent points to form line segment and calculating its vector, and recording it as
Figure GDA0003611572980000031
Acquiring data of all wall line segments in the living room, respectively calculating vectors of the data, and recording the vectors as
Figure GDA0003611572980000041
Pairing line segments formed by all boundary points with all wall line segments in pairs, judging whether vectors between the line segments are smaller than a set threshold value or not, if so, judging that the line segments are in parallel relation, then calculating the distance between the two line segments, if so, judging that the wall line segments are attached to the line segments formed by the boundary points, and recording the wall as the wall belonging to the line segments between the boundary points; traversing all the line segments formed by the boundary points and the wall line segments in sequence until the attribution judgment of all the wall line segments is completed;
and finding the wall line segment with the longest length, and moving the coordinates of the light supplement lamp in the horizontal direction for a certain distance in the direction away from the wall line segment with the longest length.
In one embodiment, further comprising: a method for automatically generating a viewpoint in a house type, comprising the steps of:
for each room, determining an initial position of the camera as a viewpoint; the lens of the camera is directed to the central point or the approximate central point of the room where the camera is located, and observation is carried out.
In one embodiment, for a living room and a dining room, if the living room and the dining room are adjacent, the midpoint of the line connecting the center points or approximate center points of the living room and the dining room is taken as the observation point of the living room or the dining room;
if the living room and the dining room are not adjacent, the observation point of the living room or the dining room is determined respectively, and the steps are as follows: calculating the number of door openings of the room, and if the number of the door openings is 1, extending 80 centimeters from the two-dimensional central point of each door opening into the area to serve as an observation point; and if the number of the door openings is more than or equal to 2, taking the door opening closest to the central point or the approximate central point of the room, and taking the two-dimensional central point of the door opening as an observation point, wherein the two-dimensional central point of the door opening extends 80 centimeters inwards.
In one embodiment, for a bedroom, determining the number of edges of the bed that are adjacent to the border of the bedroom;
if the bed sheet is close to the wall or the bed sheet is close to the wall at two sides, finding the long side and the short side of the bed, finding the wall, then taking the Center point of the bounding box of the bed, starting from the Center point, emitting rays according to the direction of the long side of the bed and the opposite direction, enabling the two rays to be intersected with the boundary line of the bedroom to obtain an intersection point, obtaining two line segments, taking the longer line segment of the two line segments, defining the intersection point of the longer line segment and the bounding box of the bed as a first intersection point, defining the intersection point of the longer line segment and the bedroom as a second intersection point, and taking the midpoint of the first intersection point and the second intersection point as an observation point;
if the bed is three-side wall-by-wall, (1) if the bedroom is quadrilateral, taking the midpoint of the connecting line of the central point of the bedroom and the central point of the door as an observation point; (2) if the number of boundary lines of the bedroom is more than or equal to 5, identifying the largest protruding rectangle of the bedroom; finding out other line segments in the bedroom which do not belong to the maximum convex rectangle, finding out a line segment parallel to the middle line segment of the maximum convex rectangle in the other line segments to be used as a parallel line segment, and taking the midpoint of a connecting line between the midpoint of the parallel line segment and the central point or the approximate central point of the bedroom as an observation point.
Advantageous effects
The invention can reduce the user operation and improve the working efficiency of designers in the process of home decoration design. Carry out automatic light filling to the different regions of scheme of difference, but the position intelligent calculation of light filling lamp can evade furniture model automatically simultaneously, avoids the position of light filling lamp to fall inside the model or paste the model, and the interval between lamp and the lamp distributes rationally, can reach a better light filling effect.
The invention can reduce user operation, automatically calculate panorama view point and initialize camera direction vector, reduce manual and fussy interface operation of designers and improve working efficiency in the process of home decoration design. And according to calculation, the shape of the graph (namely the shape of the area) can be reversely deduced, the method is suitable for various schemes, the calculation effect can be close to the habit standard of manual placement, and better visual experience is presented for people.
Drawings
FIG. 1 is a flow chart of automatic light supplement
FIG. 2 is an explanatory view of a "convex" region
FIG. 3 is an explanatory view of a "convex" region
FIG. 4 is a flow chart of "salient" region calculation
FIG. 5 is a schematic illustration of the determination of preselected light source points
FIG. 6 is an enlarged view of the model bounding box
FIG. 7 is a schematic diagram of the position of an automatic fill-in light for the maximum local area of a certain area
FIG. 8 is a schematic view of a toilet type
FIG. 9 is a schematic view illustrating the position of a dry-wet separation type light supplement lamp in a toilet
FIG. 10 is a schematic diagram of the points of the hallway and the entrance
FIG. 11 is a schematic view of wall determination
FIG. 12 is a schematic view of wall determination
FIG. 13 is a flow chart for automatically calculating an indoor panorama viewpoint
FIG. 14 is a flow chart of automatically calculating the initial camera direction vector of the indoor panorama
FIG. 15 automatic viewpoint Generation Effect example
FIG. 16 area approximate center point auto-generated effects example
FIG. 17 is a diagram of initialization direction vectors for a camera
FIG. 18 the bedside with one side of the zone next to it
FIG. 19 shows the situation that the enclosure of the conventional bed has two sides close to the region side
FIG. 20 shows the conventional bed with three side edges of the enclosure adjacent to the zone edge
FIG. 21 schematic of calculation of bedroom viewpoint
FIG. 22 schematic diagram of calculation of bedroom viewpoint
Detailed Description
The main steps of the automatic generation method of the light supplement effect in the invention are shown in fig. 1.
Firstly, opening home decoration design software and loading a house type scheme; acquiring the area data of a living room and a restaurant in the area data; the area data here includes: a set of line segments representing the room shape size of the living room or restaurant, and a set of boundary points for the line segments. The regional data of the living room and the dining room are preprocessed, and the collinear points between two points in the regional boundary are mainly removed.
An automatic light supplementing method for living room or dining room.
Recording the number of the boundary points at the moment as N for the obtained house type line segment point set of the living room or the dining room, and if the number of the point N is 4, taking the whole rectangle as the maximum local area; if N >4, the areas of the restaurant and living room need to be identified as "bulging" areas. The specific process is shown in fig. 2-4, and is detailed as follows: as shown in fig. 2, there are "convex" areas in the graph, such as BCDE areas, and in the method of the present invention, the "convex" areas need to be identified after the area of the living room of the area. The process of identification is as follows:
a. acquiring an updated polygon boundary point set;
b. traversing each point of the polygon, calculating a vector formed by the point and an adjacent point, taking A in the figure as an example, calculating vectors AB, FA and BC; (point A is the current point, since the polygon vertex ordering direction is counterclockwise, point B is its next point, point C is its next point, and point F is its previous point; therefore, it can be expressed as a vector between point A and the next point, and a vector between point A and point A)
c. Calculating an outer product A1 of the vector FA and the vector AB and an outer product A2 of the vector AB and the vector BC in the above steps;
d. calculating the InnnerCrossValue of the inner product of the vectors of V1 and V2 in the above step;
e. if the inner product of InnerCrossValue in the above step is positive, the portion of the convex region formed by point F, A, B, C is denoted as FABC.
So far, the identification of one convex area can be realized, and all convex areas are identified through traversing each vertex in sequence;
in addition, for each convex region, the area of the convex region needs to be defined, and in the method of the invention, the convex region is formed by three line segments which are connected in sequence. For the first and last two line segments, the shorter one (or any one if the lengths of the first and last two line segments are equal) is found, and the area of the convex region is set as the length of the middle line segment of the convex region x the length of the shorter one of the first and last two line segments.
Next, according to the above method, the convex rectangular area with the largest area in the living room and the restaurant in the plan can be calculated, and the specific method for calculating the local maximum rectangle in the living room and the restaurant is as described above; as shown in fig. 5, assume that the rectangle having the largest area in each of the convex regions is a padbpcpd;
after the maximum local rectangle is obtained through calculation, the four corner points Pa, Pb, Pc and Pd of the maximum local rectangle are respectively contracted to the central point LocalCenter of the maximum local rectangle by a distance (which can be set to be 15-30 cm), and the purpose of contracting by a distance is to avoid the space occupied by the suspended ceiling and obtain four contracted points Pa, Pb, Pc and Pd;
as shown in fig. 5, calculating the midpoint between LocalCenter and PA, PB, PC, PD to obtain Light1, Light2, Light3, Light4, and calculating the Height from the bottom surface of the suspended ceiling model or customized suspended ceiling to the top of the wall in the area, and the Height wall Height, using wall Height-Tol as the z-axis coordinate of the fill-in Light (the value of Tol is generally set to be between 10 cm and 20 cm), subtracting the distances to make the Height of the fill-in Light be calculated from the Height of the wall, subtracting the thickness of the suspended ceiling, and then subtracting the distance occupied by a small segment of lamp holder to be the Height of the actual Light source; in addition, the x and y coordinates of the Light source are consistent with those of Light1, Light2, Light3 and Light4, and the points are used as candidate positions of the lamp; generally, the light source needs to have a position closer to the middle, so the four middle points designed in this step are used as preselected light source points; meanwhile, considering that the light source may be shielded by an object in the room, the illumination effect may be affected, and then, the condition of the object in the room needs to be considered.
Acquiring all models in an area, wherein the models refer to various furniture or other accessories arranged in a room, such as cabinets, standing lamps, tables, sofas, cabinet air conditioners and the like in a living room, each model has a bounding box in a house-type three-dimensional drawing, and generally, a higher object has influence on the illumination of a light source, so that all models with the height of the bounding box higher than 250 centimeters are calculated in the bounding box of each object;
obtaining a projection surface of the model, and then expanding the projection surface in a certain proportion, wherein the specific proportion calculation method comprises the following steps: taking fig. 6 as an example, if EFGH is a projection plane of a certain model, the long side is EF, the short side is HE, the center point PCenter of the quadrilateral HEFG is calculated, the distance from PCenter to long side EF is DisL, and the distance from long side EF to the outside is AddDis, the expansion Ratio is DisL/(DisL + AddDis). And expanding H, E, F and G outwards according to the expansion Ratio to obtain four updated points: h ', E', F ', G'; and judging whether the projection point of the point to be selected of the fill-in lamp is in the H 'E' F 'G' quadrangle, if so, rejecting the lamp position, and if not, taking the lamp position as the final position of the fill-in lamp. In the method, whether the distance between the light source and the higher object is too close and whether the lighting effect of the light source is influenced can be determined by properly expanding the projection area obtained by the selected model and investigating whether the projection of the light source on the ground falls within the projection range; if the light source is in the range, the light source at the position should not be selected, and the light source which is not in the position range is understood to have better light supplement effect.
An automatic light supplementing method for a bedroom.
Calculating the maximum local rectangular area of the bedroom type area, wherein the specific calculation method refers to the method for calculating the maximum local rectangular area of the living room or the dining room; fig. 7 is a schematic diagram of a light position for automatic light supplement in a bedroom (a circle point is the position of a light supplement lamp);
an automatic light supplementing method for a toilet.
For the light supplement setting of the toilet, the area type of the toilet needs to be judged firstly, namely whether the area is a dry-wet separation area or a non-dry-wet separation area is judged, and then the position of a specific light supplement lamp is calculated according to different types of toilets according to a corresponding method. The type of toilet is shown in fig. 8;
method for determining dry-wet separation area:
acquiring a boundary point set of a toilet area, wherein the point set is connected end to form a polygon;
judging whether a projection point of the center point of a certain wall exists in the polygon (aiming at positioning whether a wall separating a dry area from a wet area exists in a toilet area); if the dry-wet separation type toilet exists, the dry-wet separation type toilet is a dry-wet separation type toilet, and if the dry-wet separation type toilet does not exist, the dry-wet separation type toilet is a non-dry-wet separation type toilet;
in the case of a dry-wet separation type toilet, one point location is calculated in each of the dry area and the wet area. We take the figure as an example to calculate and explain:
(1) calculating the midpoint of the toilet interior wall: a WallCenter;
(2) respectively making rays L1 and L2 along the directions vertical to the front side and the rear side of the wall by taking the WallCenter as a ray starting point;
(3) calculating the intersection points of the L1 and the L2 and the area (the polygon ABCD) in the step, and recording the intersection points as InterSectP1 and InterSectP 2;
(4) calculating the midpoints of the InterSectP1, the InterSectP2 and the WallCenter in the steps respectively, and respectively using the midpoints as the points of light supplement lamps in the dry and wet regions;
fig. 9 is a schematic view illustrating the calculation of the position of a dry-wet separation type light supplement lamp for a toilet.
If the type of the non-dry-wet area is adopted, calculating the central point of the maximum local rectangle according to the method for calculating the maximum local rectangle of the living room area;
an automatic light supplementing method for kitchen, storage room, clothes and hat room and other areas.
In general, a space of a room type such as a kitchen, a storage room, and a cloakroom is compact and narrow, and thus, when a light supplement position is provided, the structural particularity of the room type should be considered.
The main steps are as described above, and the center point of the maximum local rectangle is obtained according to the method for calculating the maximum local rectangle; calculating the Height of the suspended ceiling under the space, calculating the Height from the bottom surface of the suspended ceiling model or the customized suspended ceiling in the area to the top of the wall and the Height WallHeaght according to the similar method, and taking the WallHeaght-Height-Tol as the z-axis coordinate of the fill-in light (the value of the Tol is generally set to be between 10 cm and 20 cm); then according to the method, 4 optional light supplementing points can be obtained, and the position of the lamp to be supplemented with light is obtained;
next, identifying objects in a room, including a cabinet, a ceiling and the like, determining a minimum bounding box of the objects, and judging whether the positions of the 4 lamps to be compensated are in the model bounding box in the space; if the light source is not in the bounding box of the model, one of the light sources is selected as a light supplement point; if 4 light supplementing points are all located in the bounding box of the model, a gate under the space is obtained, the bottom center point of the gate in the step is calculated, a point (usually set to be between 20 and 30 centimeters) extending a distance into the space from the center point is calculated, and the z value of the point to be supplemented is taken as the z value of the point; in this step, since the spatial positions of the three types of rooms are relatively narrow, it is possible that an automatically generated light supplement point falls inside the bounding box of the object, which results in a light supplement generation error, and for a narrow room, the opening and closing of the door are not blocked, so that the center point of the door is extended a distance into the room, which is also necessary not to collide with other objects, and for a narrow space, when a user observes the layout, the user mainly observes the position at the doorway, so that the door is used as a determined starting point of the light supplement position, and the effect that the light supplement point fully illuminates the position at the doorway can be satisfied.
An automatic light supplementing method for corridor and entrance area.
For these two positions, when the supplementary lighting setting is performed, it is necessary to consider whether the adjacent type of the living room and the restaurant are adjacent. The determination method comprises the following steps: traversing each edge of the living room, calculating the distances from the middle point of the edge to all the edges of the dining room, and obtaining the minimum value from the distances; if the minimum distance is less than or equal to a certain minimum threshold (marked as MinDis, and usually set to be 0.1-0.5 cm), the living room is adjacent to the dining room, otherwise, the living room is not adjacent to the dining room.
When the living room restaurant areas are adjacent:
calculating the maximum local area of the living room; as shown in fig. 10, where GHIJ is the largest convex rectangular area;
starting from the ends of line segments (points G and J in the figure) at the head and the tail of the maximum local area, shooting rays along the opposite direction of GH and the opposite direction of JI, and calculating other intersection points of the rays and the living room:
if at least one intersection point exists, the situation that at least a corridor or an entrance exists in the house type is indicated; if the two line segments from the head to the tail cannot obtain the intersection point, the situation that no corridor or hallway exists in the house type is shown; for the case of corridor or entrance, after the intersection point of the head line segment and the tail line segment is obtained, the area of the living room can be cut, at least one small area on one side is formed and is marked as SmallRegion (in FIG. 10, because the intersection point of the extension lines of the two line segments exists, two divided small areas can be obtained), and meanwhile, the connecting line segment between the central points of the two extension line segments is calculated and is marked as MiddleSeg;
calculating the central axis of the SmallRegion, and retracting the ShrinkL distance (ShrinkL is usually set to be 65-70 cm) from the head point and the tail point of the central axis to the central point of the central axis to obtain two new points newstart and newend, wherein such a retracting distance is set mainly for avoiding the sector occupied by the opening process of the entrance door in the entrance and also avoiding a certain width distance occupied by the suspended ceiling. Calculating the distance TempL between newstart and newend; meanwhile, calculating the distance between the original head and tail points oldStart and oldEnd of the central axis and recording as tempLength;
calculating a value TempN of the above TempL divided by (2 × ShrinkL);
calculating the number NumOfLights of the temporary lights to be compensated as TempN + 1;
if the TempLength < ═ 150 cm or NumOfLights < > 2 represents that the middle length of the entrance is short and excessive light supplement lamps are not needed, the central points of oldStart and oldEnd are calculated as the positions of the light supplement lamps;
if NumOfLights > is 3, the length of the entrance is considered to be long, and a plurality of light supplement lamps need to be arranged, and the following steps are executed;
if NumOfLights > is 3, the lamp spacing value is calculated: EachDis ═ (TempLength-2. multidot ShrinkL)/(NumOfLights-1) [ units of length are in centimeters ].
Taking newstart and newend as the light points to be compensated, and adding a new point as the light point to be compensated after every EachDis distance between the two points;
calculating the light point to be compensated on the MiddleSeg line segment in the same way;
if there are no two intersections, the light compensation points are set as follows when the living room and the dining room are not connected.
When the living room is not adjacent to the restaurant:
calculating the positions of the light supplement lamps in local 'convex' areas of the living room and the dining room by combining the area point sets of the living room and the dining room;
acquiring other local 'convex' areas of the area except the maximum local area; this step is adopted for the purpose that for the house type in the case that the living room or the dining room is not adjacent, the corridor or the entrance is necessarily located in a small protruding area of the living room or the dining room, and therefore, light needs to be supplemented in the small protruding area.
According to a similar method, calculating the position of a light spot to be compensated on the central axis of the 'convex' area;
filtering all the points to be supplemented with light, and removing points which are too close to a wall (usually, a distance threshold value is set to be 20 cm);
in addition, in an improved embodiment, because a television generally needs to be installed in a living room, the distance of the light supplement lamp needs to be adjusted accordingly, the light supplement lamp needs to be adjusted, so that the position of the horizontal plane of the light is slightly far away from the television, otherwise, the light is likely to interfere with the watching effect of the television.
Then, an automated identification of the wall in the living room is required.
As shown in fig. 11, after the identification of the living room data, the identification is generally composed of the boundary line (thin line) outside the living room and the wall (thick solid line) inside the boundary line, and when the boundary point and the line segment of the living room boundary line are obtained, the obtained Polygon is called Polygon, which solid walls exist in the area corresponding to the Polygon is further determined, and the specific steps are as follows:
arbitrarily taking two adjacent points of Polygon, constructing a line segment Edge, calculating a vector of the line segment Edge, and performing vector unitization treatment, wherein the vector is marked as
Figure GDA0003611572980000111
Acquiring all entity wall data in the house type, and storing the entity wall data in a wall set SolidWalls;
selecting one wall from the SolidWalls one by one, calculating a line segment WallSeg constructed by the initial point of the wall, and calculating a unit vector of the wall, wherein the vector is marked as
Figure GDA0003611572980000112
Determining vectors in the above process
Figure GDA0003611572980000113
Whether or not to cooperate with
Figure GDA0003611572980000114
Collinear, namely judging whether the vector is in a set threshold range, and if the vector is smaller than a certain threshold, determining the vector is collinear; if the collineation further calculates the shortest distance between Edge and WallSeg, if the distance is less than or equal to 10 cm, the wall body is assigned to the area;
and the process is carried out in sequence until all the walls in the SolidWalls are processed. We call all solid walls that get this region as RegionWalls.
Removing walls containing doors, door openings or windows from the RegionWalls in the process, wherein the removed walls are called NewWalls; then calculating the corresponding wall with the maximum length, and marking as MaxLengthwall; usually, the television set in the living room should be installed near the wall with the largest length, and therefore, after the longest wall in the living room is determined,
and moving the position of the fill-in lamp to a direction away from MaxLengtWall by a proper distance.
After the position of the fill light is determined, in order to better show the design effect in the room, an initial panoramic display position needs to be automatically generated in software. The specific method is shown in fig. 13 and 14. In a specific method, firstly, determining each room and functions of each room, wherein the rooms are represented by line segments formed by boundary points, the positions and shapes of walls are also displayed in the rooms, wall bodies of the boundaries of each ground area are obtained, each wall body is a polyhedron formed by a plurality of point sets, the areas and the wall bodies form a mapping relation, and each wall body has own attributes including wall thickness, the starting points of the walls, wall height, inner side walls, outer side walls and the like;
in the panorama display process, the main design idea is as follows: firstly, the initial position of a camera needs to be determined, meanwhile, the lens of the camera is towards the central point (or the approximate central point) of the room, and the aim of better showing the design effect of the room is achieved by observing the central position after the initial position is determined. The determination process of the central point or the approximate central point may be determined by using a method of collecting points of a panorama as disclosed in CN109960850A, "a method and system for calculating indoor panorama collecting points and layout of roof lighting fixtures".
The following description of the initial position points of the camera is made for the characteristics of each room:
restaurant area data and kitchen area presentations:
due to the diversified types of the scheme, particularly the dining room and the kitchen. The area of the customer restaurant is diversified: some plan type customer restaurants are adjacent (namely, no actual wall body exists between two areas of the customer restaurants), and some plan customer restaurants are not adjacent; kitchen area diversification: some solutions are open kitchens (i.e. there are non-physical walls between the kitchen and the adjacent areas) and some are normally separate spaces. Customer restaurant and kitchen area data are preprocessed primarily to identify whether the customer restaurant area type is adjacent to each other or an independent space, and whether the kitchen is an open kitchen.
Preprocessing the data flow of the customer restaurant area: acquiring region data (namely a region inner contour ordered point set) of a living room and a restaurant; setting a distance threshold, for example, setting the value to 5 cm; traversing each point on the living room area, calculating the distance alpha from the point to each point of the restaurant, if alpha is less than or equal to 5, ending the calculation process of the step, and summarizing the living room and the restaurant to be of adjacent types; if alpha is not more than 5, summarizing the guest restaurants into two independent spaces;
acquiring all region contour data (namely a region interior line ordered point set), and matching the region data with respective space names one by one; the kitchen area data (i.e. the polygon formed by the internal line ordered point set) and other area data (in the form of polygons) are used for judging whether the kitchen area and other areas have common points or intersect one another one by one: if the common point or the intersection exists, judging that the kitchen is an open kitchen; otherwise, concluding that the kitchen is a closed area type kitchen;
preprocessing the result in the regional data flow of the guest restaurant according to the steps, and if the guest restaurant belongs to the type of the adjacent region, using the mean value point of the approximate center points of the two regions of the guest restaurant as the common observation point of the living room and the restaurant;
if the customer-restaurant is in two independent non-adjacent area types, processing according to independent spaces respectively, and the specific method is as follows:
the living room observation point calculation method comprises the following steps:
counting NumOfDoors of the number of doors or door openings of a living room area;
if NumOfDoors is 1, extending 80 centimeters into the area from the two-dimensional central point of the door or the door opening for calculation to obtain an observation point of the living room;
if NumOfDoors > is 2, calculating a door or a door opening which is closest to the approximate center point of the living room, and extending 80 centimeters into the area from the two-dimensional center point of the door or the door opening for calculation to obtain an observation point of the living room;
the same observation points of the restaurant are the same.
Bedroom zone data and bedroom zone presentation:
automatically calculating the observation points of the areas (the space names are the main lying area, the secondary lying area, the third room, the fourth room and other room types of the areas and the approximate central point of the areas) of the bedroom type: acquiring an ordered point set (existing in a polygonal form) of the type area, and recording the number of the top points of the Polygon as N if the ordered point set is named as the Polygon;
acquiring model types of the bed in the space (the model types of the common bed include a common bed, a child bed, an upper and lower layer combined bed and the like), if the model types are the common bed types, calculating a bounding Box of the bed model, recording the bounding Box as Box, and then executing the following steps;
acquiring a projection quadrangle of the Box on the bottom surface, and recording the projection quadrangle as project polygon;
calculating the length and width of the quadrilateral project polygon, and calculating the short side closest to a certain side of the region: the specific case calculation is as follows:
(1) the bed has one side against the wall, see fig. 18:
the rectangular HIJK is a rectangle formed by the projection of the bounding box of the common bed, KJ is the part close to the head of the bed, and HI is the part close to the tail of the bed; the polygon ABCDEF is a polygon formed by a region.
The specific identification method comprises the following steps:
traversing each side of a projection rectangle of the common bed bounding box, calculating the shortest distance MinDis from the side to each side of the region, recording the statistical number NumCount of MinDis < ═ 5 cm, and if NumCount equals 1, indicating that only one side of the common bed bounding box is close to the region boundary;
calculating the longest edge and the shortest edge of the common bed bounding box and a direction vector where the long axis is positioned (for example, in fig. 18, namely, a vector formed by points HK);
starting from the Center point Center of the projection rectangle of the common bed bounding box, rays are emitted along the direction vector of the long axis and the opposite direction of the long axis, in the case that rays are emitted from the Center to the two sides respectively, the two rays respectively have intersection points with the boundary line of the bedroom, the obtained line segments are a first line segment and a second line segment, the longer line segment of the two line segments is taken, the intersection point of the longer line segment and the bounding box of the bed is defined as a first intersection point (M in the figure), the intersection point of the longer line segment and the bedroom is defined as a second intersection point (G in the figure), and the midpoint of the MG is taken as the position point of the initial camera.
(2) The bed has two sides close to the wall (see fig. 19):
the rectangular HIJK is a rectangle formed by the projection of the bounding box of the common bed, KJ is the part close to the head of the bed, and HI is the part close to the tail of the bed; the polygon ABCDEF is a polygon formed by a region.
The specific identification method comprises the following steps:
traversing each side of the projection rectangle of the common bed bounding box, calculating the shortest distance MinDis from the side to each side of the region, recording the statistical number NumCount of MinDis < 5 cm, and if NumCount is 2, indicating that only two sides of the common bed bounding box are close to the region boundary;
calculating two sides of the bounding box projection rectangle of the border of the proximity region, and calculating the length difference of the two sides, if the conditions are met: the absolute value of the difference is larger than a certain small distance value (set to 2 cm, for example), the arrangement of the bed in the bedroom is similar to that shown in fig. 18. Calculating the direction vector of the long axis of the bounding box of the common bed
Similar process calculations resemble the calculation of a side-by-side wall with the viewpoint and orientation of the viewpoint for the region.
For the calculation method for the conditions that one side is close to the wall and two sides are close to the wall, the position which can be well determined can give consideration to the overall display of the room on the one hand, mainly because the extension line of the central point is found as the position of the initial point of the camera in the direction of the long side after the long side and the short side of the bed are found, and after the position of the camera is determined, most main body effects of the bed can be better displayed in front of the camera; so that the visual effects of both the bed and the room are considered.
(3) The bed has three sides against the wall (see fig. 20):
the rectangular HIJK is a rectangle formed by the projection of the bounding box of the common bed, KJ is the part close to the head of the bed, and HI is the part close to the tail of the bed; the polygon ABCDEF is a polygon formed by a region.
The specific identification method comprises the following steps:
traversing each side of a projection rectangle of the common bed bounding box, calculating the shortest distance MinDis from the side to each side of the region, recording the statistical number NumCount of MinDis < (5 cm), and if the NumCount is 3, indicating that the common bed bounding box has three sides close to the boundary of the region;
calculating the number of the points after the area is preprocessed, namely the value of N;
if N is 4, calculating the center point of the area as RegionCenter and the center point DoorCenter of the area door, calculating the center point of the RegionCenter and the center point DoorCenter, taking the center point as the observation point of the area, and enabling the observation point to face to the center point of the area;
if N > is 5, the maximum local rectangle of the region is calculated, and a line segment parallel to the "middle line segment" of the local maximum rectangle is calculated [ for example, as shown in fig. 22, a rectangle MBCD is the local maximum rectangle of the region, BC is called the "middle line segment", MD is the line segment parallel to the "middle line segment" in the local maximum rectangle, and ED is the original line segment of the region ];
finding a line segment (ED in figure 22) parallel to a middle line segment from the local maximum rectangular line segment, taking the midpoint (namely the midpoint of the line segment ME) of a partial line segment where the line segment intersects in the region, and then calculating the midpoint of the point and the central point of the maximum local region as an observation point, wherein the observation point faces to the central point of the maximum local region; when the design is adopted, the overall design effect display of the bed and the room can be considered.
If the bed in the space is of a non-ordinary bed type and the number of vertexes N after the area preprocessing is 4:
if N in the above step is 4, judging whether a certain side of the area is adjacent to other areas;
the specific determination method is as follows:
traversing each Segment formed by two adjacent points in the region;
it is determined whether the following conditions are satisfied:
the first condition is as follows: whether Segment is parallel to a WallSeg line Segment formed by two points on the same side of the bottom of a certain wall body;
if the condition one is satisfied, further determining a condition two: calculating the shortest distance DisOfSegs between the Segment and the WallSeg line Segment, and judging whether the DisOfSegs is less than or equal to 25 cm (the wall thickness is 20 cm usually);
if only condition one is satisfied, then there is a case (as shown) in the area that is not attached to the solid wall, as calculated from S1 to S2:
s1 calculating the center point of the region (i.e. the center point of Polygon Polygon2, denoted as Roomcenter);
s2, acquiring all affiliated doorways (consisting of 8 points in total and shown in a schematic diagram) in the area, traversing two points on the same side of the bottom of each doorway, judging whether a line segment constructed by the two points is parallel to one edge of the Polygon2 and the shortest distance between the line segment and the edge is less than or equal to 25 cm, and if the conditions are met, calculating the midpoint TempNode of the edge; then calculate the bisector point of 1/3 or 1/4 (or other bisector) from TempNode to the center point RoomCenter of the area; the bisection point is used as an observation point to be selected, and the direction points to the center point of the area;
if the above-mentioned condition one and condition two are satisfied
If the type is shown (the region boundaries are all adjacent to the solid wall):
acquiring all the door openings attached to the area, finding a certain door opening with the door opening width less than or equal to 150 cm, and marking as a TargetDoor;
using the bottom central point of the TargetDoor and the midpoint of a line segment constructed by the central point of the region as an observation point to be selected, and pointing the direction to the midpoint of the region;
if the bed in the space is of a non-ordinary bed type and the number of vertexes N after the area preprocessing is greater than 4:
calculating the maximum area local rectangle of the region, wherein the specific calculation method is as follows:
carrying out quadrilateral segmentation on the region to obtain a segmented quadrilateral with the largest area:
(1) the set of boundary points for the region is ordered in a counterclockwise direction. Taking point a as an example, point a is next B, next point is C, and point a is previous F.
(2) Forming vectors by using the points
Figure GDA0003611572980000151
(Vector)
Figure GDA0003611572980000152
(Vector)
Figure GDA0003611572980000153
(3) Calculating the vector outer product:
Figure GDA0003611572980000154
(4) determining the vector in the above step
Figure GDA0003611572980000155
Z-axis component and vector of
Figure GDA0003611572980000156
Whether the sign of the z-axis component of (a) is the same;
(5) if the symbols in the above steps are the same, calculating the length AF and the length BC, comparing the two lengths to obtain a line segment with a smaller length, wherein the corresponding line segment in FIG. 1 is AF, starting from a point F, segmenting along a direction parallel to AB to obtain a point intersecting the line segment BC, and if the point is named as F ', FABF' is a segmented quadrangle of the region;
(6) sequentially calculating the rest points according to the similar method to obtain all the segmented quadrangles of the whole area;
(7) calculating the area of all the segmented quadrangles to obtain a segmented quadrangle with the largest area, and taking the segmented quadrangle as a local rectangle with the largest area;
acquiring the central point of the local rectangle with the maximum area;
calculating the number of doors in the area and recording as NumOfDoors;
if NumOfDoors is 1,
judging which partially split quadrangle the door belongs to (namely judging which side of the area the line segment formed by two places at the bottom of a certain side of the door is parallel to, and the shortest distance from the side is less than or equal to 25 cm (the thickness of the wall is usually 20 cm);
further determining whether the edge of the door is a middle line segment of the partially-cut quadrangle or two side line segments (shown in the figure for illustration); if the middle line segment is found, executing S3; if it is on the shorter one of the two sides, then S4 is executed if the door falls on the longer one of the two sides;
starting from the center point of the door, emitting a ray along the direction which points to the inside of the region and is vertical to the long side of the bottom of the door, calculating the intersection point of the ray on the boundary of the region, and recording the line segment formed by the intersection point and the center point of the door as seg;
s3, calculating the intersection point of the midpoint of the maximum local rectangle of the area, which is perpendicular to the seg line segment in the above step, and recording as point, taking the point as the observation point of the area, and pointing the direction to the center of the maximum rectangle of the area;
s4 if the door falls as shown in the figure: calculating a ray which is emitted from the center of the door opening to the inside of the region and is vertical to the side, calculating another intersection point of the ray and the region, calculating the length of the intersection line, starting from the middle point of the intersection line if the length is less than 2 m, emitting the ray along the direction which points to the inside of the main region and is vertical to the intersection line, calculating the intersection point of the ray and the region, marking the intersection line at the moment as segment, calculating a projection point of the center of the maximum local region on the segment, taking the projection point as an observation point of the region, and pointing to the center point of the maximum local region in the direction;
calculate according to the similar method as above: calculating a ray which is emitted from the center of the door opening to the inside of the region and is vertical to the side, calculating another intersection point of the ray and the region, calculating the length of the intersection line, if the length is less than 2 m, emitting the ray from the middle point of the intersection line along the direction which points to the inside of the main region and is vertical to the intersection line, calculating the intersection point of the ray and the region, marking the intersection line at the moment as segment, calculating the projection point of the center of the maximum local region on the segment, and taking the projection point as the observation point of the region, wherein the direction points to the center of the maximum local region; if the length of the line segment is more than 2 meters, directly calculating a projection point of the central point of the maximum local rectangle on one side with longer length, taking the projection point as the starting point of a certain line segment, taking the central point of the regional maximum local rectangle as the end point of the line segment, calculating trisection or quarteection points of the line segment as the observation points of the region, and pointing to the center of the regional local maximum area rectangle.
Automatic calculating observation point of balcony area
An ordered set of points (in the form of polygons) for this type of region is obtained, given the designation Polygon 1;
combining the collinear intermediate points in the Polygon1 (i.e. removing the intermediate points between two collinear points), wherein the Polygon is recorded as Polygon 2;
calculating an approximate central point (namely a local maximum rectangular central point of the region) in the region, wherein the approximate central point is used as an observation point, the point is used as an observation point, and the observation point faces to the door opening;
and a sixth step: automatically calculating observation points of regions such as host computer, guest computer and the like
An ordered set of points (in the form of polygons) for this type of region is obtained, which is assumed to be named Polygon 1;
merging the middle points of the polygons Polygon1 (i.e. removing the middle point between two collinear points) in the above steps, and recording the Polygon as Polygon 2;
judging whether the toilet type is a dry-wet separation type: whether a wall is arranged in a toilet area or not is judged, if yes, the toilet area is of a dry-wet separation type, if not, the toilet area is of a common toilet type, and a schematic diagram of the toilet type is shown in a reference diagram;
if the type of the toilet is a common toilet type, acquiring the bottom central point of the toilet door opening, calculating an approximate central point (the central point of the maximum local area) of the area, and calculating the central point of the connecting line of the bottom central point of the door opening and the central point of the maximum local area as an observation point which points to the central point of the area; if the type is dry-wet separation, acquiring the central point of the bottom of the internal wall of the region, emitting rays perpendicular to the long edge of the bottom of the door opening respectively along the front and back directions of the door opening to obtain intersection points of the front side and the back side of the door opening, calculating the distance between the intersection points and the central point of the door opening, selecting the ray vector corresponding to the larger distance value as the direction of an observation point, and selecting the trisection point of a line segment formed by the central point of the bottom of the door opening and the matched intersection points thereof as the observation point;
the seventh step: automatically calculating a point of view for a kitchen area
An ordered set of points (in the form of polygons) for this type of region is obtained, which is assumed to be named Polygon 1;
combining the collinear intermediate points in the Polygon1 (i.e. removing the intermediate points between two collinear points), wherein the Polygon is recorded as Polygon 2;
according to the result of preprocessing the kitchen area data in the second step:
if the kitchen is an open kitchen, calculating an approximate center point (namely, a local maximum rectangular center point of the area) in the area, and referring to the steps in the method. The approximate center point serves as a viewpoint.
If the kitchen is a non-open kitchen (i.e. an independent closed area), counting the number of doors or door openings of the kitchen area, NumOfDoors; if the NumOfDoors is 1, extending 50 centimeters into the area from the two-dimensional central point of the door or the door opening for calculation to obtain an observation point; if NumOfDoors > is 2, calculating the door or the door opening which is closest to the approximate center point of the living room, extending 50 cm into the area from the two-dimensional center point of the door or the door opening for calculation to obtain an observation point, wherein the observation point faces to the inside of the pointing area
The eighth step: automatically calculating the observation point of the storage area:
an ordered set of points (in the form of polygons) for this type of region is obtained, which is assumed to be named Polygon 1;
combining the collinear intermediate points in the Polygon1 (i.e. removing the intermediate points between two collinear points), wherein the Polygon is recorded as Polygon 2;
counting the number of doors or door openings in the region, and extending 25 centimeters from the two-dimensional central point of the doors or door openings into the region for calculation to obtain an observation point; the viewpoint is directed towards the inside of the pointing region.
The ninth step: automatically calculating the observation points of the cloakroom area:
the method of the storage room
The method for automatically calculating the direction vector of the initialized camera of the indoor panorama comprises the following steps:
the flow of automatically computing the indoor panorama initialization camera direction vector is shown in fig. 14.
The specific method is as follows:
the first step is as follows: loading data to obtain all regional data of the scheme house type;
the second step is that: automatically calculating the approximate central point of each region space;
the third step: automatically calculating the observation point of the panoramic image of each area;
the fourth step: judging whether the approximate center points of the areas are consistent with the observation points one by one:
if not, subtracting the coordinates of the observation points corresponding to the area from the coordinates of the approximate central point of the area to obtain a vector and carrying out normalization processing, wherein the vector is used as an initialization direction vector corresponding to the observation points of the area;
if the observation points are consistent (referring to the content of the observation points automatically obtained in the patent, the observation points of the balcony, the open kitchen or the partial toilet area can be found to be consistent with the approximate central point of the space), firstly, automatically calculating the central point of the door or the door opening matched with the observation points, namely calculating the central point DoorCenter of the door or the door opening closest to the observation points;
the fifth step: calculating a vector constructed between the observation point and the door or the central point of the door opening, and carrying out normalization treatment:
for a balcony or an open kitchen, subtracting an observation point by using a DoorCenter to obtain a vector and normalizing the vector, wherein the vector is used as an initialization camera direction vector of the area;
for part of the toilet area, DoorCenter is subtracted from the observation point to obtain a vector and the vector is normalized, and the vector serves as an initial camera direction vector of the area.

Claims (7)

1. A method for generating the illumination effect of a house type scene is characterized by comprising the following steps:
step 1, acquiring boundary areas of all rooms in a house type graph, and identifying boundary points; for the sets of boundary points which are in a collinear relationship, deleting boundary points except the boundary points at two ends from the sets; and the remaining boundary points are numbered counterclockwise or clockwise continuously;
step 2, traversing each boundary point in turn for the ordered point set of the boundary points of the restaurant, the living room or the bedroom, and calculating a vector V1 between the current point and the next point, a vector V2 between the current point and the next point, and a vector V3 between the current point and the point A; then, the outer products A1 of V3 and V1 and the outer products A2 of V1 and V2 are calculated; if the inner product signs of A1 and A2 are positive, marking a convex area by an area formed by the previous point of the current point, the next point of the current point and the next point of the current point in sequence; after the traversing process is completed, identifying all the convex areas; for three sequentially connected line segments of the convex area, the shortest line segment of the two line segments at the head and the tail and the middle line segment form a rectangle as a convex rectangle; if the lengths of the head line segment and the tail line segment are equal, one of the head line segment and the tail line segment is arbitrarily selected to form a rectangle with the middle line segment; selecting the convex rectangle with the largest area, and entering the step 3;
step 3, contracting the four vertexes of the rectangle for a certain distance towards the center of the rectangle in equal proportion to obtain four contraction points; respectively taking the horizontal coordinate of the middle point between the four contraction points and the central point of the rectangle as the horizontal coordinate of the alternative light supplementing point, and taking the height obtained by subtracting a certain distance from the height of the wall as the vertical coordinate of the light supplementing point;
step 4, acquiring the coordinate of the minimum bounding box of the furniture in the room, selecting the furniture with higher height, acquiring a projection area of the furniture with higher height on a horizontal plane, and amplifying the projection area by a certain proportion to be used as a furniture projection area; if the projection position of the alternative light supplementing point on the horizontal plane is located in the furniture projection area, deleting the light supplementing point from the alternative light supplementing point, and taking the rest light supplementing points as the positions of light supplementing lamps;
the area of the protruding region is obtained by the following method: the area is the length of the shorter line segment in the head line segment and the tail line segment multiplied by the length of the middle line segment;
in the step 3, the four vertexes of the rectangle are shrunk to the center of the rectangle by a certain distance in an equal proportion, namely, the four vertexes are shrunk by 15 to 30 centimeters;
in the step 3, subtracting a certain distance from the Height of the wall refers to Wallheight-Height-Tol, wherein Wallheight is the Height of the wall, Height is the Height from the bottom surface of the suspended ceiling to the top of the wall, and the value of Tol is set to be between 10 cm and 20 cm;
the furniture with higher height in the step 4 refers to the furniture with the height higher than 250 cm; enlarging the projection area by a certain proportion in the step 4 means enlarging the area by 0.05-0.3 times.
2. The method for generating the lighting effect of the house-type scene according to the claim 1, further comprising a method for determining the position of the fill-in light of the toilet, comprising the following steps: for a dry-wet separation type toilet, a dry-wet separation wall is identified, the midpoints of the walls are respectively taken as vertical lines towards the two sides of the wall, the two vertical lines are respectively intersected with the boundary line segment of the toilet to obtain two intersection points, and the midpoints of the line segments between the two intersection points and the midpoints of the walls are respectively used as the horizontal positions of the light supplement lamps.
3. A method for generating a lighting effect of a house-type scene according to claim 1, further comprising a method for determining a position of a fill-in light of a kitchen, a storage room or a cloakroom, comprising the steps of: executing the step 3 to obtain horizontal and vertical coordinates of the alternative light supplement points; identifying an object in a room, obtaining a minimum bounding box of the object, and judging whether an alternative light supplementing point falls in the minimum bounding box; if at least one alternative light supplement point is not in the minimum bounding box, one of the light supplement points is taken as the position of the light supplement lamp; if all the alternative light supplement points are in the minimum bounding box, the middle point of a door of the room is taken, and a certain distance extends to the interior of the room along the middle point to serve as a horizontal coordinate of the light supplement lamp;
extending a certain distance along the midpoint towards the interior of the room means an extension of 20-30 cm.
4. A method for generating a lighting effect for a residential scene as claimed in claim 1, further comprising a method for determining a position of a fill light in a corridor or entrance area, comprising the steps of: it is determined whether the living room and the restaurant are in an adjacent positional relationship.
5. The method for generating house-type scene lighting effect according to claim 1, wherein 1) if the living room and the dining room are adjacent, finding the largest protruding rectangle of the living room, extending the two line segments at the head and the tail of the rectangle, and if the line segments can be extended and at least one intersection can be obtained with the living room, then using the partition area facing the outside of the living room, where the extension line of the intersection is obtained, as an entrance or a corridor; a perpendicular line penetrating through the segmentation region is made from the middle point of the extension line, another intersection point of the perpendicular line and the segmentation region is obtained, the middle point of the extension line is defined as an oldstart point, and the other intersection point is an olden point; respectively contracting the oldstart point and the oldden point to the middle point of the vertical line by a certain distance ShrinkL, wherein the distance between newstart and newend is TempL, and the distance between oldstart and oldden is TempLength; calculating the value TempN of TempL divided by (2 × ShrinkL); the number NumOfLights of the temporary lights to be supplemented is TempN + 1; if TempLength < ═ 150 cm or NumOfLights < ═ 2; calculating the central points of oldStart and oldEnd as the horizontal coordinates of the fill-in light; if NumOfLights > -3, calculating a lamp spacing value EachDis ═(TempLength-2 × (ShrinkL)/(NumOfLights-1)), taking the newstart and newend as the light points to be compensated, and adding a new point as the light point to be compensated after every EachDis distance between the two points; 2) if the living room and the dining room are not adjacent, all the convex rectangles of the living room or the dining room are respectively found, and light supplementing points are arranged inside the other convex rectangles except the convex rectangle with the largest area; the ShrinkL is set between 65-70 cm.
6. The method for generating a lighting effect of a house-type scene according to claim 1, further comprising: a method for automatically generating a viewpoint in a house type, comprising the steps of: for each room, determining an initial position of the camera as a viewpoint; enabling a lens of the camera to face the central point of the room where the camera is located for observation; regarding the living room and the dining room, if the living room and the dining room are adjacent, the midpoint of the connecting line of the central points of the living room and the dining room is taken as the observation point of the living room or the dining room; if the living room and the dining room are not adjacent, the observation point of the living room or the dining room is determined respectively, and the steps are as follows: calculating the number of door openings of the room, and if the number of the door openings is 1, extending 80 centimeters from the two-dimensional central point of each door opening into the area to serve as an observation point; and if the number of the door openings is more than or equal to 2, taking the door opening closest to the center point of the room, and extending the two-dimensional center point of the door opening into the area by 80 centimeters to be used as an observation point.
7. The method for generating house-type scene lighting effect according to claim 1, wherein for the bedroom, the number of the edges of the bed close to the boundary of the bedroom is determined; if the bed is in a state that the bed sheet is close to the wall or the bed sheet is close to the wall at two sides, finding the long side and the short side of the bed, finding the wall, taking a Center point of a bounding box of the bed, starting from the Center point, emitting rays according to the direction of the long side of the bed and the opposite direction, enabling the two rays to be intersected with the boundary line of the bedroom to obtain an intersection point, obtaining two line segments, taking a longer line segment of the two line segments, defining the intersection point of the longer line segment and the bounding box of the bed as a first intersection point, defining the intersection point of the longer line segment and the bedroom as a second intersection point, and taking the midpoint of the first intersection point and the second intersection point as an observation point; if the bed is three-side near the wall, (1) if the bedroom is quadrilateral, taking the midpoint of the connecting line of the central point of the bedroom and the central point of the door as an observation point; (2) if the number of boundary lines of the bedroom is more than or equal to 5, identifying the largest protruding rectangle of the bedroom; finding out other line segments in the bedroom which do not belong to the maximum protruding rectangle, finding out a line segment parallel to the middle line segment of the maximum protruding rectangle in the other line segments to be used as a parallel line segment, and taking the midpoint of a connecting line of the midpoint of the parallel line segment and the center point of the bedroom as an observation point.
CN201911101210.9A 2019-11-12 2019-11-12 Method and system for generating illumination effect of house type scene Active CN111008416B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911101210.9A CN111008416B (en) 2019-11-12 2019-11-12 Method and system for generating illumination effect of house type scene

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911101210.9A CN111008416B (en) 2019-11-12 2019-11-12 Method and system for generating illumination effect of house type scene

Publications (2)

Publication Number Publication Date
CN111008416A CN111008416A (en) 2020-04-14
CN111008416B true CN111008416B (en) 2022-07-08

Family

ID=70113067

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911101210.9A Active CN111008416B (en) 2019-11-12 2019-11-12 Method and system for generating illumination effect of house type scene

Country Status (1)

Country Link
CN (1) CN111008416B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111611726B (en) * 2020-06-22 2021-03-23 广州极点三维信息科技有限公司 Automatic indoor scene lighting method and related device
CN111882651B (en) * 2020-06-23 2022-04-15 北京城市网邻信息技术有限公司 Spatial light processing method and device, electronic equipment and storage medium
CN111968247B (en) * 2020-07-10 2021-10-19 北京城市网邻信息技术有限公司 Method and device for constructing three-dimensional house space, electronic equipment and storage medium
CN113297651B (en) * 2020-07-16 2024-06-14 每平每屋(上海)科技有限公司 Three-dimensional house type data generation method, device and equipment
CN116052223B (en) * 2023-04-03 2023-06-30 浪潮通用软件有限公司 Method, system, equipment and medium for identifying people in operation area based on machine vision

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106780709A (en) * 2016-12-02 2017-05-31 腾讯科技(深圳)有限公司 A kind of method and device for determining global illumination information
CN109960850A (en) * 2019-02-20 2019-07-02 江苏艾佳家居用品有限公司 A kind of method and system calculating indoor panorama sketch collection point and roof lamps and lanterns layout

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106780709A (en) * 2016-12-02 2017-05-31 腾讯科技(深圳)有限公司 A kind of method and device for determining global illumination information
CN109960850A (en) * 2019-02-20 2019-07-02 江苏艾佳家居用品有限公司 A kind of method and system calculating indoor panorama sketch collection point and roof lamps and lanterns layout

Also Published As

Publication number Publication date
CN111008416A (en) 2020-04-14

Similar Documents

Publication Publication Date Title
CN111008416B (en) Method and system for generating illumination effect of house type scene
CN110781539B (en) Automatic design method and system for house type graph
US11989895B2 (en) Capturing environmental features using 2D and 3D scans
CN109711018B (en) Two-dimensional to three-dimensional house type design method
US20230410337A1 (en) Method and system for scene image modification
CN104751520B (en) Computer method, apparatus, and medium for displaying theme environment
Zhang et al. Online structure analysis for real-time indoor scene reconstruction
CN111985022B (en) Processing method and device for on-line decoration, electronic equipment and storage medium
CN107004297B (en) Three-dimensional automatic stereo modeling method and program based on two-dimensional plane diagram
US9230360B2 (en) Connectivity depended geometry optimization for real-time rendering
CN109960850B (en) Method and system for calculating indoor panoramic image acquisition points and roof lamp layout
US11295522B2 (en) Three-dimensional (3D) model creation and incremental model refinement from laser scans
JP2016534461A (en) Method and apparatus for representing a physical scene
CN108446830B (en) Household type sunshine analysis method based on mobile equipment terminal
CN110276824A (en) A kind of automatic lighting method, medium, equipment and device
CN111986305A (en) Furniture display method and device, electronic equipment and storage medium
CN113761614A (en) Auxiliary method for planar home decoration design
JP2019185776A (en) Method and apparatus for generating three-dimensional map of indoor space
EP4244820A1 (en) Image processing method, recording medium, and image processing system
GB2552281A (en) Space information generating device, space information generating method, and program
Ren et al. Data-driven digital lighting design for residential indoor spaces
CN117396925A (en) Method, apparatus and computer program product for manipulating virtual bounding volumes
EP4075316A1 (en) Method for automatically furnishing a virtual 3d room
US20240062345A1 (en) Method, apparatus, and computer-readable medium for foreground object deletion and inpainting
EP2993613A1 (en) A capture system arranged to create a 3d model from a scanned scene, a method and a graphical user interface

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 211100 floor 5, block a, China Merchants high speed rail Plaza project, No. 9, Jiangnan Road, Jiangning District, Nanjing, Jiangsu (South Station area)

Applicant after: JIANGSU AIJIA HOUSEHOLD PRODUCTS Co.,Ltd.

Address before: 211100 No. 18 Zhilan Road, Science Park, Jiangning District, Nanjing City, Jiangsu Province

Applicant before: JIANGSU AIJIA HOUSEHOLD PRODUCTS Co.,Ltd.

GR01 Patent grant
GR01 Patent grant