Summary of the invention
Technical matters to be solved by this invention is to provide a kind of easy to use sweeping by indoor and claps the automatic method and apparatus generating room floor plan.
To achieve these goals, the invention provides a kind of method of automatic generation room floor plan, wherein, comprise the steps:
S1, in room, determine that a surface level just sets a reference point to the side of the door in this room as reference plane on this reference plane;
S2, on the intersection of the wall in this reference plane and this room, determine multiple reference point;
S3, measure described reference point and multiple reference point line between the angle of angle;
S4, according to the width of described door or the Distance geometry between described reference point and reference point, angle calculation obtains length and the width in described room;
The position of S5, length, width and described door according to the described room that obtains generates the planimetric map in described room.
The method of above-mentioned automatic generation room floor plan, wherein, described multiple reference point comprises:
The dual-side of the door in described room and the first intersection point of described reference plane and the second intersection point,
The metope at the door place in described room and the intersection of two metopes adjacent with this metope and the 3rd intersection point of described reference plane and the 4th intersection point,
The intersection of the metope relative with described door and two metopes adjacent with this metope and the 5th intersection point of described reference plane or the 6th intersection point, and
Described reference point is to the intersection point between described 3rd intersection point and described 5th intersection point, or described reference point is to the intersection point between described 4th intersection point and described 6th intersection point.
The method of above-mentioned automatic generation room floor plan, wherein, the length in room described in step S4 and the computing formula of width as follows:
Length CF=CD+DE+EF, width AC=AB+BC, wherein,
DF=((d/sinθ1)×cosθ1)/cos(θ1+θ2)×sin(θ1+θ2),
CD=((d/sinθ1)×cosθ1)/cosθ3×sinθ3,
BC=((d/sinθ1)×cosθ1)/cosθ3×sinθ4,
AB=(((d/sinθ1)×cosθ1)/cosθ3×cosθ4)/cosθ5×sinθ5,
Wherein, d is the distance between described first intersection point and the second intersection point;
DF is the distance between described first intersection point and the 3rd intersection point;
CD is the distance between described first intersection point and the 4th intersection point;
BC is the distance between described intersection point and the 4th intersection point or the 3rd intersection point;
AB is the distance of described 5th intersection point or the 6th between intersection point and intersection point;
θ 1 is the angle between described 3rd intersection point and the second intersection point;
θ 2 is the angle between described second intersection point and the first intersection point;
θ 3 is the angle between described first intersection point and the 4th intersection point;
θ 4 is the angle of described 4th intersection point or the 3rd between intersection point and intersection point;
θ 5 is the angle between described intersection point and described 5th intersection point or the 6th intersection point.
The method of above-mentioned automatic generation room floor plan, wherein, described reference plane is floor or ceiling.
The method of above-mentioned automatic generation room floor plan, wherein, in described step S3, utilizes the 3D acceleration sensor of handheld device or gyroscope automatically to measure the angle of the angle between the line of described reference point and multiple reference point.
In order to realize above-mentioned purpose better, present invention also offers a kind of equipment of automatic generation room floor plan, wherein, comprising:
Reference point setting module, for determining that in room a surface level just sets a reference point to the side of the door in this room as reference plane on this reference plane;
Reference point determination module, determines multiple reference point on the intersection of the wall at this reference plane and this room;
Angle Measurement Module, for measure described reference point and multiple reference point line between the angle of angle;
Length and width calculation module, obtain length and the width in described room for angle calculation described in the width according to described door or the Distance geometry between described reference point and reference point;
Room floor plan generation module, the position for the length according to the described room obtained, width and described door generates the planimetric map in described room.
The equipment of above-mentioned automatic generation room floor plan, wherein, described multiple reference point comprises:
The dual-side of the door in described room and the first intersection point of described reference plane and the second intersection point,
The metope at the door place in described room and the intersection of two metopes adjacent with this metope and the 3rd intersection point of described reference plane and the 4th intersection point,
The intersection of the metope relative with described door and two metopes adjacent with this metope and the 5th intersection point of described reference plane or the 6th intersection point, and
Described reference point is to the intersection point between described 3rd intersection point and described 5th intersection point, or described reference point is to the intersection point between described 4th intersection point and described 6th intersection point.
The equipment of above-mentioned automatic generation room floor plan, wherein, the length in described room and the computing formula of width as follows:
Length CF=CD+DE+EF, width AC=AB+BC, wherein,
DF=((d/sinθ1)×cosθ1)/cos(θ1+θ2)×sin(θ1+θ2),
CD=((d/sinθ1)×cosθ1)/cosθ3×sinθ3,
BC=((d/sinθ1)×cosθ1)/cosθ3×sinθ4,
AB=(((d/sinθ1)×cosθ1)/cosθ3×cosθ4)/cosθ5×sinθ5,
Wherein, d is the distance between described first intersection point and the second intersection point;
DF is the distance between described first intersection point and the 3rd intersection point;
CD is the distance between described first intersection point and the 4th intersection point;
BC is the distance between described intersection point and the 4th intersection point or the 3rd intersection point;
AB is the distance of described 5th intersection point or the 6th between intersection point and intersection point;
θ 1 is the angle between described 3rd intersection point and the second intersection point;
θ 2 is the angle between described second intersection point and the first intersection point;
θ 3 is the angle between described first intersection point and the 4th intersection point;
θ 4 is the angle of described 4th intersection point or the 3rd between intersection point and intersection point;
θ 5 is the angle between described intersection point and described 5th intersection point or the 6th intersection point.
The equipment of above-mentioned automatic generation room floor plan, wherein, described reference plane is floor or ceiling.
The equipment of above-mentioned automatic generation room floor plan, wherein, measures the angle of the angle between the line obtaining described reference point and multiple reference point automatically by the 3D acceleration sensor of handheld device or gyroscope.
Technique effect of the present invention is: the present invention only need sweep and clap two adjacent face walls, and both can by having swept the boundary line clapping floor and wall, also can by sweeping the boundary line clapping ceiling and wall, modeling can also be carried out to room by sweeping the boundary line clapping any surface level and wall, than prior art, there is greater flexibility, use more convenient, thus also there is better Consumer's Experience.The present invention is easy to use, can generate the planimetric map in required room neatly and be stored in the electronic equipment carried with, and for room finish, purchase house ornamentation etc. provide believable reference, greatly saves time and efforts, effectively improves quality of life.
Describe the present invention below in conjunction with the drawings and specific embodiments, but not as a limitation of the invention.
Embodiment
Below in conjunction with accompanying drawing, structural principle of the present invention and principle of work are described in detail:
Be the method flow diagram of one embodiment of the invention see Fig. 2 and Fig. 3, Fig. 2, Fig. 3 is the measuring method principle schematic of one embodiment of the invention.The method of automatic generation room floor plan of the present invention, comprises the steps:
Step S1, in room, determine that a surface level just sets a reference point O to the side of the door 6 in this room as reference plane 7 on this reference plane 7; Described reference plane 7 can be any surface level, is preferably floor or ceiling.
Step S2, on this reference plane 7 with the intersection of the wall in this room, determine multiple reference point A ~ F;
Step S3, measure described reference point O and multiple reference point A ~ F line between the angle of angle theta 1 ~ θ 5, preferably utilize the 3D acceleration sensor of handheld device or gyroscope automatically to measure the angle of the angle theta 1 ~ θ 5 between the line of described reference point O and multiple reference point A ~ F.
In step S4, angle θ 1 ~ θ 5 according to the width d (distance namely between reference point D and E) of described door 6 or the Distance geometry between described reference point O to reference point A ~ F any point, an angle calculation relevant with this distance obtains length and the width in described room;
The position of step S5, length, width and described door 6 according to the described room that obtains generates the planimetric map in described room.
Wherein, described multiple reference point A ~ F is respectively:
The dual-side of the door 6 in described room and the first intersection point D of described reference plane 7 and the second intersection point E,
The metope at door 6 place in described room and the intersection of two metopes adjacent with this metope and the 3rd intersection point F of described reference plane 7 and the 4th intersection point C,
The intersection of the metope relative with described door 6 and two metopes adjacent with this metope and the 5th intersection point A of described reference plane 7 or the 6th intersection point H, and
Described reference point O is to the intersection point B between described 3rd intersection point F and described 5th intersection point A, or described reference point O is to the intersection point (not shown) between described 4th intersection point C and described 6th intersection point H.
Wherein, the length in room described in step S4 and the computing formula of width as follows:
Length CF=CD+DE+EF, width AC=AB+BC, wherein,
DF=((d/sinθ1)×cosθ1)/cos(θ1+θ2)×sin(θ1+θ2),
CD=((d/sinθ1)×cosθ1)/cosθ3×sinθ3,
BC=((d/sinθ1)×cosθ1)/cosθ3×sinθ4,
AB=(((d/sinθ1)×cosθ1)/cosθ3×cosθ4)/cosθ5×sinθ5,
Wherein, d is the distance between described first intersection point D and the second intersection point E;
DF is the distance between described first intersection point D and the 3rd intersection point F;
CD is the distance between described first intersection point D and the 4th intersection point C;
BC is the distance between described intersection point B and the 4th intersection point C or the 3rd intersection point F;
AB is the distance between described 5th intersection point A or the 6th intersection point H and intersection point B;
θ 1 is the angle between described 3rd intersection point F and the second intersection point E;
θ 2 is the angle between described second intersection point E and the first intersection point D;
θ 3 is the angle between described first intersection point D and the 4th intersection point C;
θ 4 is the angle between described 4th intersection point C or the 3rd intersection point F and intersection point B;
θ 5 is the angle between described intersection point B and described 5th intersection point A or the 6th intersection point H.
See the device structure block diagram that Fig. 4, Fig. 4 are one embodiment of the invention.The equipment of automatic generation room floor plan of the present invention, comprising:
Reference point setting module 1, for determining that in room a surface level just sets a reference point O to the side of the door 6 in this room as reference plane 7 on this reference plane 7, described reference plane 7 is preferably floor or ceiling.
Reference point determination module 2, for determining multiple reference point A ~ F on this reference plane 7 with the intersection of the wall in this room;
Wherein, described multiple reference point A ~ F comprises:
The dual-side of the door 6 in described room and the first intersection point D of described reference plane 7 and the second intersection point E,
The metope at door 6 place in described room and the intersection of two metopes adjacent with this metope and the 3rd intersection point F of described reference plane 7 and the 4th intersection point C,
The intersection of the metope relative with described door 6 and two metopes adjacent with this metope and the 5th intersection point A of described reference plane 7 or the 6th intersection point H, and
Described reference point O is to the intersection point B between described 3rd intersection point F and described 5th intersection point A, or described reference point O is to the intersection point (not shown) between described 4th intersection point C and described 6th intersection point H.
Angle Measurement Module 3, for measure described reference point O and multiple reference point A ~ F line between the angle of angle theta 1 ~ θ 5, automatically measure the angle of the angle theta 1 ~ θ 5 between the line obtaining described reference point O and multiple reference point A ~ F by the 3D acceleration sensor of handheld device or gyroscope.
Length and width calculation module 4, obtain length and the width in described room for an angle calculation relevant with this distance in angle θ 1 ~ θ 5 described in the width d (distance namely between reference point D and E) according to described door 6 or the Distance geometry between described reference point O to reference point A ~ F any point;
The length in described room and the computing formula of width as follows:
Length CF=CD+DE+EF, width AC=AB+BC, wherein,
DF=((d/sinθ1)×cosθ1)/cos(θ1+θ2)×sin(θ1+θ2),
CD=((d/sinθ1)×cosθ1)/cosθ3×sinθ3,
BC=((d/sinθ1)×cosθ1)/cosθ3×sinθ4,
AB=(((d/sinθ1)×cosθ1)/cosθ3×cosθ4)/cosθ5×sinθ5,
Wherein, d is the distance between described first intersection point D and the second intersection point E;
DF is the distance between described first intersection point D and the 3rd intersection point F;
CD is the distance between described first intersection point D and the 4th intersection point C;
BC is the distance between described intersection point B and the 4th intersection point C or the 3rd intersection point F;
AB is the distance between described 5th intersection point A or the 6th intersection point H and intersection point B;
θ 1 is the angle between described 3rd intersection point F and the second intersection point E;
θ 2 is the angle between described second intersection point E and the first intersection point D;
θ 3 is the angle between described first intersection point D and the 4th intersection point C;
θ 4 is the angle between described 4th intersection point C or the 3rd intersection point F and intersection point B;
θ 5 is the angle between described intersection point B and described 5th intersection point A or the 6th intersection point H.
Room floor plan generation module 5, the position for the length according to the described room obtained, width and described door 6 generates the planimetric map in described room.
Further technical scheme of the present invention is described in detail with specific embodiment below.
Embodiment one:
First reference point setting module 1 needs to determine plane parallel with floor in a room, can be floor or ceiling in reality, because these two planes are preferably determined.Sweep and clap room half cycle, reference point determination module 2 locks ceiling three turnings, the both sides of door 6 and two of ceiling vertical points.Givenly determine the left side D point of positive opposite house 6 as after a reference plane 7 of Fig. 4, then by camera locking A, B, C, D, E, F point of hand-held intelligent equipment.Given room type, according to the length of the relative position of these reference points and the width d calculated room of door 6 and wide, the equipment of automatic generation room floor plan of the present invention can generate the room floor plan of the full-size(d) of vector format.Hand-held intelligent equipment preferably possesses the hardware device such as gyroscope or three-dimensional acceleration sensor to support angle measuring function.
See the computer program process flow diagram that Fig. 3, Fig. 3 are one embodiment of the invention.
After reference point setting module 1 sets reference point O, reference point determination module 2 locks reference point, with electronic compass record current device towards (such as eastern inclined 30 degree, inclined 45 degree of south etc.), first the camera of handheld device is utilized to lock first corner (A point), press acknowledgement key after locking, locking process completely manually also can use image recognition technology secondary locking;
Calculate locking last reference point time equipment towards with current towards angular deviation, judge whether next reference point, if have, then equipment turns to next reference point, and locks B successively with the camera of handheld device, C, D, E, F point, utilize 3D acceleration sensor or the gyroscope of handheld device, Angle Measurement Module 3 takes measurement of an angle θ 1 ~ θ 5 automatically;
If do not have next reference point, then determine invariant (door 6 is wide), length and width calculation module 4 are according to the length of triangle formula calculated room, wide:
DF can be calculated successively, the distance between CD, BC, AB.Because the door 6 of chummery is not wide is standard, if user selects room type, such as parlor, bedroom, dining room etc., system will confirm the distance between DE.If this distance is d.Specific formula for calculation is as follows:
Length CF=CD+DE+EF, width AC=AB+BC, wherein,
DF=((d/sinθ1)×cosθ1)/cos(θ1+θ2)×sin(θ1+θ2),
CD=((d/sinθ1)×cosθ1)/cosθ3×sinθ3,
BC=((d/sinθ1)×cosθ1)/cosθ3×sinθ4,
AB=(((d/sinθ1)×cosθ1)/cosθ3×cosθ4)/cosθ5×sinθ5,
The length computation of each bar line segment out after, the distance of AC=AB+BC and CF=CD+DE+EF just can be easy to draw.
There is length, wide, and determine the position of door 6, room floor plan generation module 5 generates the room floor plan of vector format, and is stored on memory device with the form of vector file (form such as AI, EPS), and the planimetric map in room just can generate automatically.
Embodiment two:
With one be equipped with gyroscope etc. can measuring equipment towards the change hardware of angle and the handheld device of camera, this handheld device can the automatic software for drawing of built-in room floor plan, the automatic software for drawing of this room floor plan is utilized first to determine the reference plane 7 of and plane-parallel and face one side of door 6, utilize in this reference plane 7 camera artificial or augmented reality and image recognition technology auxiliary under sweep and clap this plane two limits crossing with wall, and lock some reference points, equipment is automatically measured the angle between these reference points and is calculated the distance between this reference point, and calculate the length and width of sweeping and clapping room accordingly.By said reference point input room floor plan automatic software for drawing, what software obtained according to the distance between its reference point and angle calcu-lation thereof sweeps the length and width of clapping room, automatically generates the room floor plan of electronic format according to the position of room type and door 6.Wherein, augmented reality (AugmentReality) refers generally to virtual digit image and real scene be combined in the display device.The CitySense application of such as Nokia, when the adept machine of user is taken pictures to certain buildings, in mobile phone screen, the image of this building is other there will be an electronic tag, introduces the brief introduction of this buildings.In the present invention, augmented reality can help Subscriber Locked reference point, the turning of such as ceiling.After camera catches the turning of ceiling, the ceiling turning in mobile phone screen may be marked with special color and lock to point out this point of user, can press acknowledgement key.Image recognition technology is generally used for realizing augmented reality.In the locking process of A point, first software identifies " turning " image by image recognition algorithm in the image photographed, and identifies that marking and be presented on screen is successfully exactly augmented reality.Required image is presented at user after on screen and just can have been locked by acknowledgement key.
Be reference plane 7 with floor in embodiment one, using ceiling as reference plane 7 in the present embodiment.In this case A point is an angle of ceiling.Next determine datum method on other ceiling and embodiment one similar, only one is sweep bat along the boundary line on wall and floor, and one is sweep bat along the boundary line of ceiling and wall.Each reference point determines that the formula in rear computing method and embodiment one is just the same, and the generation of room floor plan is also identical with embodiment one.
Can take in above-mentioned two embodiments from A point, lock B successively, C, D, E, F point, also can take random order lock these points and between angle, or first determine D point and B point two reference points, the line of reference point O and these two reference points D, B is respectively perpendicular to corresponding metope, OD, OB can respectively as two vertical calibration lines, and the change locking each reference point order does not affect the effect that the present invention generates room floor plan automatically.In addition, when calculated room length and width, the width d of preferred employing door, but the distance also can directly measured between reference point O and arbitrary reference point A ~ F, then according to the angle of this distance and correspondence thereof, obtain length and the width in room according to triangle computing formula, similar in its computing method and above-described embodiment, therefore not to repeat here.
During use, without the need to hand dipping and the length inputting room, wide, its physical size planimetric map needing room can be generated easily by the present invention, and be stored in mobile phone or other portable memory devices, such as, when buying furniture, just the size input handset that every part will buy furniture can be set up an areal model, then just can pull on the planimetric map in this room, put these mock-up funitures, roughly estimate that whether the collocation of these furniture is suitable.The present invention is easy to use, can generate the planimetric map in required room neatly and be stored in the electronic equipment carried with, and for room finish, purchase house ornamentation etc. provide believable reference, greatly saves time and efforts, effectively improves quality of life.
Certainly; the present invention also can have other various embodiments; when not deviating from the present invention's spirit and essence thereof; those of ordinary skill in the art are when making various corresponding change and distortion according to the present invention, but these change accordingly and are out of shape the protection domain that all should belong to the claim appended by the present invention.