Nothing Special   »   [go: up one dir, main page]

CN111008416A - 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
CN111008416A
CN111008416A CN201911101210.9A CN201911101210A CN111008416A CN 111008416 A CN111008416 A CN 111008416A CN 201911101210 A CN201911101210 A CN 201911101210A CN 111008416 A CN111008416 A CN 111008416A
Authority
CN
China
Prior art keywords
point
points
area
line segment
wall
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.)
Granted
Application number
CN201911101210.9A
Other languages
Chinese (zh)
Other versions
CN111008416B (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 position 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 of the tedious manual click among the process of designer's house ornamentation design, 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 geometrical 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 method can also find an automatic display point determining method for better 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 continuing numbering the rest boundary points anticlockwise or clockwise;
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 previous point and the A point of the current point; then, the outer product A1 of V3 and V1 and the outer product 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 supplementary lighting point is not in the minimum bounding box, one of the supplementary lighting points is arbitrarily taken as the position of a supplementary lighting 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 midpoint 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 point of oldStart and oldEnd as the horizontal coordinate of the fill-in lamp;
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 BDA0002269925180000031
Acquiring data of all wall line segments in the living room, respectively calculating vectors of the data, and recording the vectors as
Figure BDA0002269925180000041
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 performed.
In one embodiment, for a living room and a restaurant, if the living room and the restaurant are adjacent, the midpoint of the line connecting the center points or approximate center points of the living room and the restaurant is taken as the observation point of the living room or the restaurant;
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, 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 middle point 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 in parallel with 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 different schemes, but the position of light filling lamp intelligent computation avoids furniture model automatically simultaneously, avoids the position of light filling lamp to fall inside the model or paste the model, and the interval distribution between lamp and the lamp is reasonable, 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 home decoration design process. 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 diagram illustrating the calculation of 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 flowchart for automatically calculating an initial camera direction vector of an 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 a 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 "protruding" areas in the graph, such as BCDE areas, and in the method of the present invention, after the area of the living room of the area, the "protruding" areas therein need to be identified. 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, and 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 the vector between point A and the next point, and the 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;
respectively calculating the LocalCenter and the midpoints of PA, PB, PC and PD to obtain Light1, Light2, Light3 and Light4, simultaneously calculating the Height from the bottom surface of a suspended ceiling model or a customized suspended ceiling to the top of a wall in the area and the Height WallHeaght of the wall, taking WallHeaght-Tol as the z-axis coordinate of the Light supplement lamp (the value of Tol is generally set to be between 10 cm and 20 cm), subtracting the distances, calculating the Height of the Light supplement lamp from the Height of the wall, deducting the thickness of the suspended ceiling, deducting the distance occupied by a small segment of lamp holder, and taking the distance as the Height of an actual Light source; in addition, the x and y coordinates of the Light source are consistent with the 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 the preselected light source points; meanwhile, considering that the light source may be shielded by the object in the room, the illumination effect may be affected, and then, the condition of the object in the room needs to be considered.
Obtaining 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 normally, 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. 5 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 the long side EF is calculated as DisL, and the distance from the long side EF to the outside is calculated as AddDis, the expansion Ratio is DisL/(DisL + AddDis). And performing outward expansion on H, E, F and G 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 range is understood to have better illumination supplementary lighting 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. 6 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. 7;
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 determining 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 L1 and L2 and the region (polygon ABCD) in the above steps, and recording 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 the supplementary lighting lamps in the dry and wet areas;
fig. 8 is a schematic diagram 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 supplementary lighting points are all located in the bounding box of the model, a door under the space is obtained, the bottom central point of the door in the step is calculated, a point (generally set to be between 20 and 30 centimeters) extending a distance from the central point to the space is calculated, and the z value of the point to be supplemented is taken as the z value of the point to be supplemented; in this step, since the spatial positions of the three types of rooms are relatively narrow, it is possible that the automatically generated light supplement points fall 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 taken and a distance is extended into the room, which is bound to avoid collision with other objects.
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:
1.9.1. calculating the maximum local area of the living room; as shown in fig. 9, where GHIJ is the largest convex rectangular area;
1.9.2. 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 reverse direction of GH and the reverse 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 vestibule, 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, a small area on at least one side is formed and is marked as SmallRegion (in FIG. 9, 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 center points of the two extension line segments is calculated and is marked as MiddleSeg;
1.9.3. calculating the central axis of the SmallRegion, and the head and tail points oldStart and oldEnd of the central axis retract the ShrinkL distance towards the central point of the axis (the ShrinkL is usually set to be 65-70 cm) to obtain two new points newstart and newend, and setting the contraction distance mainly for avoiding the sector occupied by the entrance door in the entrance and 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 middle 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 do not need to be arranged, 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 points to be compensated, and adding a point as a point to be compensated after every EachDis distance between the two points;
calculating a 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, and otherwise, the light is easy to interfere with the watching effect of the television.
Then, there is a need for automated identification of the wall in the living room.
As shown in fig. 10, after the identification of the living room data, the identification is generally made up of the outer boundary line (thin line) of the living room and the wall (thick solid line) inside the boundary line, and when the boundary point and line segment of the living room boundary line are obtained, the obtained Polygon is called Polygon, which solid wall is further determined in the area corresponding to the Polygon, 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 recorded as
Figure BDA0002269925180000111
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 BDA0002269925180000112
Determining vectors in the above process
Figure BDA0002269925180000113
Whether or not to cooperate with
Figure BDA0002269925180000114
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 the solid walls that get this region as RegionWalls.
Removing the wall body containing a door, a door opening or a window from the RegionWalls in the process, wherein the removed wall body set is called NewWalls; then calculating the corresponding wall with the maximum length, and marking as MaxLengthwall; in general, the tv 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, the position of the fill light is moved a suitable distance in a direction away from MaxLengthWall.
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. 12 and 13. In a specific method, each room and the function of each room need to be determined firstly, the room is represented by a line segment formed by boundary points, the position and the shape of each wall are also displayed in the room, the wall body of each ground area boundary is obtained, each wall body is a polyhedron formed by a plurality of points, the areas and the wall body set form a mapping relation, and each wall body has own attributes including wall thickness, the starting point of the wall, the wall height, an inner side wall, an outer side wall 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 room design effect is fulfilled by observing the central position after the initial position is determined. The determination process of the central point or the approximate central point can be determined by using a method of panorama acquisition points disclosed in CN109960850A, "a method and system for calculating indoor panorama acquisition points and roof lamp layout".
The following description of the camera initial position points 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 galleys are open galleys (i.e., there are not physical walls between the galley and the adjacent area), and some are normally self-contained spaces. The customer restaurant and kitchen area data is 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.
The method comprises the following steps of preprocessing the regional data flow of the guest dining room, acquiring regional data (namely a regional ordered point set) of a living room and a dining room, 2.2, setting a distance threshold value, for example, setting the value to be 5 cm, traversing each point on the region of the living room, calculating the distance from the point to each point of the dining room α, ending the calculation flow of the step if α is less than or equal to 5, and summarizing the guest dining room into an adjacent type, if α is less than or equal to 5, summarizing the guest dining room into two independent spaces;
acquiring all region contour data (namely a region internal 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 ordered point set of the internal lines) and other area data (in the form of the polygon) are used for judging whether the kitchen area and other areas have common points or intersect 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 belongs to 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 (in a polygonal form) of the type region, and recording the number of vertices of the Polygon as N under the assumption of being named as Polygon;
obtaining 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 of the common bed 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. 17:
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. 17, 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 middle point 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. 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 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. 17. 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 can be well determined, and the whole display of a room can be considered in one aspect, mainly because the extension line of the center 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 the main effect of the majority of the bed can be better displayed in front of the camera after the position of the camera is determined; 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. 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 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 is 3, indicating that three sides of the common bed bounding box are 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 region as RegionCenter and the center point DoorCenter of the region door, calculating the center point of the RegionCenter and the center point DoorCenter, taking the center point as the observation point of the region, and enabling the observation point to face to the center point of the region;
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. 21, 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 out a line segment (ED in FIG. 21) parallel to a middle line segment from the local maximum rectangular line segments, taking the midpoint (namely the midpoint of the line segment ME) of a partial line segment of which the line segment intersects in the region, and then calculating the midpoint of the point and the center point of the maximum local region as an observation point, wherein the observation point faces to the center 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 the Segment is parallel to a WallSeg line Segment formed by two points on the same side of the bottom of a certain wall body or not;
if the first condition is satisfied, further determining a second condition: 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 calculating the bisector point of 1/3 or 1/4 (or other bisector) from the TempNode to the central 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 BDA0002269925180000151
Vector quantity
Figure BDA0002269925180000152
Vector quantity
Figure BDA0002269925180000153
(3) Calculating the vector outer product:
Figure BDA0002269925180000154
(4) determining the vector in the above step
Figure BDA0002269925180000155
Z-axis component and vector of
Figure BDA0002269925180000156
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 a door opening to the inside of a region and is vertical to a 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 a 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, wherein the projection point is used as an observation point of the region, and the direction points to the center point of the maximum local region;
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, 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; 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 tail 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 maximum area rectangle.
Automatic calculate viewpoint in balcony region
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;
and calculating an approximate central point (namely the local maximum rectangular central point of the region) in the region, wherein the approximate central point serves as an observation point. This point is taken as the observation point, which points towards 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;
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;
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 a central point at the bottom of the door opening of the toilet, calculating an approximate central point (the central point of the maximum local area) of the area, and calculating the central point of a connecting line between the central point at the bottom of the door opening and the central point of the maximum local area as an observation point, wherein the observation point faces 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 trisection points of a line segment formed by the central point of the bottom of the door opening and the matched intersection points as the observation points;
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, then calculate the approximate center point [ i.e., the local maximum rectangular center point of the area ] in the area, and refer to the above steps. 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 centimeters 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
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 an indoor panorama initialization camera direction vector is shown in fig. 2.
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 type 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 a portion of the toilet area, DoorCenter is subtracted from the observation point to obtain a vector and normalized, which is used as the initial camera direction vector for this area.

Claims (10)

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 previous point and the A point of the current point; then, the outer product A1 of V3 and V1 and the outer product 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.
2. A method for generating a lighting effect of a house-type scene according to claim 1, wherein in one embodiment, the area of the protruding region is obtained by: 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 one embodiment, the step 3, shrinking the four vertexes 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 Wallheight-Height-Tol, wherein Wallheight 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 be between 10 cm and 20 cm; in one embodiment, the higher height furniture in step 4 refers to 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.
3. The method for generating lighting effect of house-type scene according to claim 1, further comprising a method for determining the position of the fill-in light of the toilet, in one embodiment, 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.
4. A method for generating a lighting effect for a house-type scene according to claim 1, further comprising a method for determining a location of a fill-in light in a kitchen, a storage room or a cloakroom, in one embodiment, 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; 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.
5. A method for generating a lighting effect for a residential scene as claimed in claim 1, wherein in one embodiment, the distance extending from the midpoint to the inside of the room is 20-30 cm longer.
6. 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.
7. 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; in one embodiment, ShrinkL is set between 65-70 centimeters.
8. A method for generating a house-type scene lighting effect according to claim 1, characterized in that, in one embodiment, it further comprises a method for determining a background wall of a living room, comprising 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 FDA0002269925170000031
Acquiring data of all wall line segments in the living room, respectively calculating vectors of the data, and recording the vectors as
Figure FDA0002269925170000032
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.
9. The method for generating a house-type scene lighting effect according to claim 1, in an 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 faces the central point or the approximate central point of the room where the camera is located to observe; in one embodiment, for a living room and a restaurant, if the living room and the restaurant are adjacent, the midpoint of the line connecting the center points of the living room and the restaurant or the approximate center points is taken as the observation point of the living room or the restaurant; 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.
10. A method for generating a house-type scene lighting effect according to claim 14, characterized in that, in one embodiment, for a bedroom, the number of edges of the bed that are close to the border of the bedroom is determined; 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; 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 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.
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 true CN111008416A (en) 2020-04-14
CN111008416B 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)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111611726A (en) * 2020-06-22 2020-09-01 广州极点三维信息科技有限公司 Automatic indoor scene lighting method and related device
CN111882651A (en) * 2020-06-23 2020-11-03 北京城市网邻信息技术有限公司 Spatial light processing method and device, electronic equipment and storage medium
CN111968247A (en) * 2020-07-10 2020-11-20 北京城市网邻信息技术有限公司 Method and device for constructing three-dimensional house space, electronic equipment and storage medium
CN113297651A (en) * 2020-07-16 2021-08-24 躺平设计家(上海)科技有限公司 Three-dimensional house type data generation method, device and equipment
CN114139249A (en) * 2021-11-10 2022-03-04 深圳须弥云图空间科技有限公司 Automatic light distribution method and device based on illusion engine and electronic equipment
CN114139250A (en) * 2021-11-10 2022-03-04 深圳须弥云图空间科技有限公司 Automatic lighting method, device, equipment and storage medium based on Unreal Engine
CN116052223A (en) * 2023-04-03 2023-05-02 浪潮通用软件有限公司 Method, system, equipment and medium for identifying people in operation area based on machine vision
CN118070403A (en) * 2024-04-17 2024-05-24 四川省建筑设计研究院有限公司 BIM-based method and system for automatically generating lamp loop influence area space

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

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111611726A (en) * 2020-06-22 2020-09-01 广州极点三维信息科技有限公司 Automatic indoor scene lighting method and related device
CN111611726B (en) * 2020-06-22 2021-03-23 广州极点三维信息科技有限公司 Automatic indoor scene lighting method and related device
CN111882651A (en) * 2020-06-23 2020-11-03 北京城市网邻信息技术有限公司 Spatial light processing method and device, electronic equipment and storage medium
CN111968247A (en) * 2020-07-10 2020-11-20 北京城市网邻信息技术有限公司 Method and device for constructing three-dimensional house space, 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
CN113297651A (en) * 2020-07-16 2021-08-24 躺平设计家(上海)科技有限公司 Three-dimensional house type data generation method, device and equipment
CN114139249A (en) * 2021-11-10 2022-03-04 深圳须弥云图空间科技有限公司 Automatic light distribution method and device based on illusion engine and electronic equipment
CN114139250A (en) * 2021-11-10 2022-03-04 深圳须弥云图空间科技有限公司 Automatic lighting method, device, equipment and storage medium based on Unreal Engine
CN116052223A (en) * 2023-04-03 2023-05-02 浪潮通用软件有限公司 Method, system, equipment and medium for identifying people in operation area based on machine vision
CN116052223B (en) * 2023-04-03 2023-06-30 浪潮通用软件有限公司 Method, system, equipment and medium for identifying people in operation area based on machine vision
CN118070403A (en) * 2024-04-17 2024-05-24 四川省建筑设计研究院有限公司 BIM-based method and system for automatically generating lamp loop influence area space

Also Published As

Publication number Publication date
CN111008416B (en) 2022-07-08

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
US11727587B2 (en) Method and system for scene image modification
US11989895B2 (en) Capturing environmental features using 2D and 3D scans
US20210173967A1 (en) Artificial intelligence systems and methods for interior design
CN109711018B (en) Two-dimensional to three-dimensional house type design method
CN111985022B (en) Processing method and device for on-line decoration, electronic equipment and storage medium
CN104751520B (en) Computer method, apparatus, and medium for displaying theme environment
CN107004297B (en) Three-dimensional automatic stereo modeling method and program based on two-dimensional plane diagram
JP6423435B2 (en) Method and apparatus for representing a physical scene
Zhang et al. Online structure analysis for real-time indoor scene reconstruction
US20240062345A1 (en) Method, apparatus, and computer-readable medium for foreground object deletion and inpainting
US9230360B2 (en) Connectivity depended geometry optimization for real-time rendering
US20140125654A1 (en) Modeling and Editing Image Panoramas
CN108446830B (en) Household type sunshine analysis method based on mobile equipment terminal
CN103337072B (en) A kind of room objects analytic method based on texture and geometric attribute conjunctive model
CN115393386B (en) Three-dimensional scene graph generation method, device and equipment and readable storage medium
US20220300669A1 (en) An auxiliary method for graphic home improvement design
CN109960850B (en) Method and system for calculating indoor panoramic image acquisition points and roof lamp layout
KR20190117354A (en) Method and apparatus for generating 3d map of indoor space
CN110276824A (en) A kind of automatic lighting method, medium, equipment and device
CN111986305A (en) Furniture display method and device, electronic equipment and storage medium
JP2019185776A (en) Method and apparatus for generating three-dimensional map of indoor space
CN115203774A (en) Method for automatically equipping virtual 3D rooms with furniture
Zhang et al. A geometry and texture coupled flexible generalization of urban building models

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