Summary of the invention
Technical matters to be solved by this invention provides a kind ofly easy to use can clap the method and apparatus that automatically generates room floor plan by indoor sweeping.
To achieve these goals, the invention provides a kind of method of automatic generation room floor plan, wherein, comprise the steps:
S1, in the room, determine a surface level as reference plane and on this reference plane the side over against the door in this room set a reference point;
S2, determine a plurality of reference points at the intersection of the wall in this reference plane and this room;
The angle of the angle between the line of S3, the described reference point of measurement and a plurality of reference points;
S4, obtain length and the width in described room according to the width of described door or the distance between described reference point and reference point and described angle calculation;
The position of S5, the length according to the described room that obtains, width and described door generates the planimetric map in described room.
The method of above-mentioned automatic generation room floor plan, wherein, described a plurality of reference points comprise:
The dual-side of the door in described room and the first intersection point and second intersection point of described reference plane,
The intersection of the metope at the door place in described room and two metopes adjacent with this metope and the 3rd intersection point and the 4th intersection point of described reference plane,
The intersection of the metope relative with described door and two metopes adjacent with this metope and the 5th intersection point or the 6th intersection point of described reference plane, and
Described reference point is to the intersection point between described the 3rd intersection point and described the 5th intersection point, and perhaps described reference point is to the intersection point between described the 4th intersection point and described the 6th intersection point.
The method of above-mentioned automatic generation room floor plan, wherein, the length in room described in the step S4 and the computing formula of width are as follows:
Length C F=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 the first intersection point and the second intersection point;
DF is the distance between described the first intersection point and the 3rd intersection point;
CD is the distance between described the 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 between described the 5th intersection point or the 6th intersection point and the intersection point;
θ 1 is the angle between described the 3rd intersection point and the second intersection point;
θ 2 is the angle between described the second intersection point and the first intersection point;
θ 3 is the angle between described the first intersection point and the 4th intersection point;
θ 4 is the angle between described the 4th intersection point or the 3rd intersection point and the intersection point;
θ 5 is the angle between described intersection point and described the 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, among the 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 a plurality of reference points.
In order to realize better above-mentioned purpose, the present invention also provides a kind of equipment of automatic generation room floor plan, wherein, comprising:
The reference point setting module, be used in the room, determining a surface level as reference plane and on this reference plane the side over against the door in this room set a reference point;
The reference point determination module is used for the definite a plurality of reference points of intersection at the wall in this reference plane and this room;
Angle Measurement Module is for the angle of the angle between the line of measuring described reference point and a plurality of reference points;
Length and width computing module are used for obtaining according to the width of described door or the distance between described reference point and reference point and described angle calculation length and the width in described room;
The room floor plan generation module, the position that is used for length, width and described door according to the described room that obtains generates the planimetric map in described room.
The equipment of above-mentioned automatic generation room floor plan, wherein, described a plurality of reference points comprise:
The dual-side of the door in described room and the first intersection point and second intersection point of described reference plane,
The intersection of the metope at the door place in described room and two metopes adjacent with this metope and the 3rd intersection point and the 4th intersection point of described reference plane,
The intersection of the metope relative with described door and two metopes adjacent with this metope and the 5th intersection point or the 6th intersection point of described reference plane, and
Described reference point is to the intersection point between described the 3rd intersection point and described the 5th intersection point, and perhaps described reference point is to the intersection point between described the 4th intersection point and described the 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 are as follows:
Length C F=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 the first intersection point and the second intersection point;
DF is the distance between described the first intersection point and the 3rd intersection point;
CD is the distance between described the 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 between described the 5th intersection point or the 6th intersection point and the intersection point;
θ 1 is the angle between described the 3rd intersection point and the second intersection point;
θ 2 is the angle between described the second intersection point and the first intersection point;
θ 3 is the angle between described the first intersection point and the 4th intersection point;
θ 4 is the angle between described the 4th intersection point or the 3rd intersection point and the intersection point;
θ 5 is the angle between described intersection point and described the 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, the angle of the angle between the line that 3D acceleration sensor or the gyroscope by handheld device measures described reference point and a plurality of reference points automatically.
Technique effect of the present invention is: the present invention only need sweep and clap two adjacent face walls, and both can be by having swept the boundary line of clapping floor and wall, also can be by sweeping the boundary line of clapping ceiling and wall, can also carry out modeling to the room by sweeping the boundary line of clapping any surface level and wall, has greater flexibility than prior art, use more conveniently, thereby also have better user and experience.The present invention is easy to use, can generate neatly the planimetric map in required room and is stored in the electronic equipment of carrying, and for room finish, buy house ornamentation etc. believable reference is provided, has greatly saved time and efforts, Effective Raise 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 done concrete description:
Referring to Fig. 2 and Fig. 3, Fig. 2 is the method flow diagram of one embodiment of the invention, and 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 the room, determine a surface level as reference plane 7 and on this reference plane 7 side over against the door 6 in this room set a reference point O; Described reference plane 7 can be any surface level, is preferably floor or ceiling.
Step S2, determine a plurality of reference point A~F at this reference plane 7 and the intersection of the wall in this room;
Step S3, measure the angle of the angle theta 1~θ 5 between the line of described reference point O and a plurality of reference point A~F, preferably utilize the automatically angle of the angle theta 1~θ 5 between the line of the described reference point O of measurement and a plurality of reference point A~F of the 3D acceleration sensor of handheld device or gyroscope.
Step S4, according to the length and the width that obtain described room among the width d (being the distance between reference point D and the E) of described door 6 or the distance between described reference point O and reference point A~F any point and the described angle θ 1~θ 5 with an angle calculation of this Range-based;
The position of step S5, the length according to the described room that obtains, width and described door 6 generates the planimetric map in described room.
Wherein, described a plurality of reference point A~F is respectively:
The dual-side of the door 6 in described room and the first intersection point D and the second intersection point E of described reference plane 7,
The intersection of the metope at door 6 places in described room and two metopes adjacent with this metope and the 3rd intersection point F and the 4th intersection point C of described reference plane 7,
The intersection of the metope relative with described door 6 and two metopes adjacent with this metope and the 5th intersection point A or the 6th intersection point H of described reference plane 7, and
Described reference point O is to the intersection point B between described the 3rd intersection point F and described the 5th intersection point A, and perhaps described reference point O is to the intersection point (not shown) between described the 4th intersection point C and described the 6th intersection point H.
Wherein, the computing formula of the length in room and width is as follows described in the step S4:
Length C F=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 the first intersection point D and the second intersection point E;
DF is the distance between described the first intersection point D and the 3rd intersection point F;
CD is the distance between described the 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 the 5th intersection point A or the 6th intersection point H and the intersection point B;
θ 1 is the angle between described the 3rd intersection point F and the second intersection point E;
θ 2 is the angle between described the second intersection point E and the first intersection point D;
θ 3 is the angle between described the first intersection point D and the 4th intersection point C;
θ 4 is the angle between described the 4th intersection point C or the 3rd intersection point F and the intersection point B;
θ 5 is the angle between described intersection point B and described the 5th intersection point A or the 6th intersection point H.
Referring to Fig. 4, Fig. 4 is the device structure block diagram of one embodiment of the invention.The equipment of automatic generation room floor plan of the present invention comprises:
Reference point setting module 1, be used in the room, determining a surface level as reference plane 7 and on this reference plane 7 side over against the door 6 in this room set a reference point O, described reference plane 7 is preferably floor or ceiling.
Reference point determination module 2 is used for determining a plurality of reference point A~F at this reference plane 7 and the intersection of the wall in this room;
Wherein, described a plurality of reference point A~F comprises:
The dual-side of the door 6 in described room and the first intersection point D and the second intersection point E of described reference plane 7,
The intersection of the metope at door 6 places in described room and two metopes adjacent with this metope and the 3rd intersection point F and the 4th intersection point C of described reference plane 7,
The intersection of the metope relative with described door 6 and two metopes adjacent with this metope and the 5th intersection point A or the 6th intersection point H of described reference plane 7, and
Described reference point O is to the intersection point B between described the 3rd intersection point F and described the 5th intersection point A, and perhaps described reference point O is to the intersection point (not shown) between described the 4th intersection point C and described the 6th intersection point H.
Angle Measurement Module 3, for the angle of the angle theta 1~θ 5 between the line of measuring described reference point O and a plurality of reference point A~F, the angle of the angle theta 1~θ 5 between the line that can automatically measure described reference point O and a plurality of reference point A~F by 3D acceleration sensor or the gyroscope of handheld device.
Length and width computing module 4 are used for obtaining according to the width d (being the distance between reference point D and the E) of described door 6 or the distance between described reference point O and reference point A~F any point and described angle θ 1~θ 5 and an angle calculation of this Range-based length and the width in described room;
The length in described room and the computing formula of width are as follows:
Length C F=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 the first intersection point D and the second intersection point E;
DF is the distance between described the first intersection point D and the 3rd intersection point F;
CD is the distance between described the 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 the 5th intersection point A or the 6th intersection point H and the intersection point B;
θ 1 is the angle between described the 3rd intersection point F and the second intersection point E;
θ 2 is the angle between described the second intersection point E and the first intersection point D;
θ 3 is the angle between described the first intersection point D and the 4th intersection point C;
θ 4 is the angle between described the 4th intersection point C or the 3rd intersection point F and the intersection point B;
θ 5 is the angle between described intersection point B and described the 5th intersection point A or the 6th intersection point H.
Room floor plan generation module 5, the position that is used for length, width and described door 6 according to the described room that obtains generates the planimetric map in described room.
The below is further described in detail technical scheme of the present invention with specific embodiment.
Embodiment one:
At first reference point setting module 1 needs to determine the plane parallel with the floor in the room, can be floor or ceiling in the reality, because these two planes are preferably determined.Sweep and clap the room half cycle, three turnings of reference point determination module 2 locking ceilings, the both sides of door 6 and two vertical points of ceiling.Behind the given reference plane 7 such as Fig. 4, determine the left side D point over against door 6, then can be by camera locking A, B, C, D, E, the F point of hand-held intelligent equipment.Given room type, according to the length of the width d calculated room of the relative position of these reference points and 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 devices such as gyroscope or three-dimensional acceleration sensor to support angle measuring function.
Referring to Fig. 3, Fig. 3 is the computer program process flow diagram of one embodiment of the invention.
After reference point setting module 1 sets reference point O, reference point determination module 2 locking reference points, record current device towards (spending such as east inclined to one side 30 with electronic compass, inclined to one side 45 degree in south etc.), at first utilize the camera of handheld device to lock first corner (A point), press acknowledgement key after the locking, locking process can fully manually also can be used the image recognition technology secondary locking;
When calculating the last reference point of locking equipment towards with current towards angular deviation, judged whether next reference point, if have, then equipment turns to next reference point, and locks successively B with the camera of handheld device, C, D, E, F point, utilize 3D acceleration sensor or the gyroscope of handheld device, the Angle Measurement Module 3 θ 1~θ 5 that automatically takes measurement of an angle;
If there is not next reference point, then determine invariant (door 6 is wide), length and width computing module 4 are according to the length of triangle formula calculated room, and be wide:
DF can be calculated successively, CD, BC, the distance between the AB.Because not chummery the door 6 wide be standard, if the user selection room type, such as parlor, bedroom, dining room etc., system will confirm the distance between the DE.If this distance is d.Specific formula for calculation is as follows:
Length C F=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.
Length has been arranged, wide, and determined the position of door 6, and room floor plan generation module 5 generates the room floor plan of vector formats, and stores on the memory device with the form (AI, the forms such as EPS) of vector file, and the planimetric map in room just can generate automatically.
Embodiment two:
With one be equipped with gyroscope etc. can measuring equipment towards the hardware that changes angle and the handheld device of camera, this handheld device can the automatic software for drawing of built-in room floor plan, utilize the automatic software for drawing of this room floor plan at first to determine a reference plane parallel with surface level 7 and face one side of 6, artificial or sweep at augmented reality and image recognition technology auxiliary lower and to clap two crossing limits of this plane and wall at the interior camera that utilizes of this reference plane 7, and lock some reference points, equipment is automatically measured the angle between these reference points and is calculated distance between this reference point, and calculates accordingly and sweep length and the width of clapping the room.With the automatic software for drawing of said reference point input room floor plan, software is swept length and the width of clapping the room according to what the distance between its reference point and angle thereof calculated, automatically generates the room floor plan of electronic format according to the position of room type and door 6.Wherein, augmented reality (Augment Reality) refers generally in display device virtual digit image and real scene combination.CitySense such as Nokia uses, and when the adept machine of user is taken pictures to certain buildings, is somebody's turn to do the image side of building in the mobile phone screen and an electronic tag can occur, introduces the brief introduction of this buildings.In the present invention, augmented reality can help the Subscriber Locked reference point, such as the turning of ceiling.Catch the turning of ceiling when camera after, the ceiling turning in the mobile phone screen may be marked with special color and lock with this point of prompting user, can press acknowledgement key.Image recognition technology is generally used for realizing augmented reality.In the locking process that A is ordered, at first software is identified " turning " image by image recognition algorithm in the image that photographs, and marking and be presented on the screen after identifying successfully is exactly augmented reality.The user just can have been locked by acknowledgement key after required image was presented on the screen.
Be reference plane 7 among the embodiment one take the floor, in the present embodiment with ceiling as reference plane 7.The A point is an angle of ceiling in this case.Next determine that reference point method and embodiment one on other ceiling are similar, only one is to sweep bat along the boundary line on wall and floor, and one is to sweep bat along the boundary line of ceiling and wall.Formula after each reference point is determined among computing method and the embodiment one is just the same, and the generation of room floor plan is also identical with embodiment one.
Can take from the A point among above-mentioned two embodiment, lock successively B, C, D, E, the F point, also can take random order lock these points and between angle, perhaps at first determine D point and two reference points of B point, the line of reference point O and these two reference point D, B is respectively perpendicular to corresponding metope, OD, OB can be respectively as two vertical calibration lines, and the change that locks 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 preferred width d that adopts door, but also can directly measure the distance between reference point O and the arbitrary reference point A~F, then according to this distance and corresponding angle thereof, obtain length and the width in room according to the triangle computing formula, similar in its computing method and above-described embodiment, therefore not to repeat here.
During use, need not the length in hand dipping and input room, wide, can generate the physical size planimetric map that it needs the room by the present invention easily, and store in mobile phone or other the portable memory devices, for example when buying furniture, just can set up an areal model to every the size input handset that will buy furniture, then just can pull, put these mock-up funitures at the planimetric map in this room, estimate roughly whether the collocation of these furniture is suitable.The present invention is easy to use, can generate neatly the planimetric map in required room and is stored in the electronic equipment of carrying, and for room finish, buy house ornamentation etc. believable reference is provided, has greatly saved time and efforts, has effectively improved quality of life.
Certainly; the present invention also can have other various embodiments; in the situation that does not deviate from spirit of the present invention and essence thereof; those of ordinary skill in the art work as can make according to the present invention various corresponding changes and distortion, but these corresponding changes and distortion all should belong to the protection domain of the appended claim of the present invention.