WO2022051899A1 - 移动路线的处理方法、装置、终端和存储介质 - Google Patents

移动路线的处理方法、装置、终端和存储介质 Download PDF

Info

Publication number
WO2022051899A1
WO2022051899A1 PCT/CN2020/113999 CN2020113999W WO2022051899A1 WO 2022051899 A1 WO2022051899 A1 WO 2022051899A1 CN 2020113999 W CN2020113999 W CN 2020113999W WO 2022051899 A1 WO2022051899 A1 WO 2022051899A1
Authority
WO
WIPO (PCT)
Prior art keywords
movement
route
splicing
point
floor plan
Prior art date
Application number
PCT/CN2020/113999
Other languages
English (en)
French (fr)
Inventor
赵明
杨挺志
姜志刚
白杰
蔡锫
Original Assignee
上海亦我信息技术有限公司
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 上海亦我信息技术有限公司 filed Critical 上海亦我信息技术有限公司
Priority to CN202080002510.6A priority Critical patent/CN112204625B/zh
Priority to PCT/CN2020/113999 priority patent/WO2022051899A1/zh
Publication of WO2022051899A1 publication Critical patent/WO2022051899A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/05Geographic models
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformation in the plane of the image
    • G06T3/40Scaling the whole image or part thereof
    • G06T3/4038Scaling the whole image or part thereof for image mosaicing, i.e. plane images composed of plane sub-images

Definitions

  • the present disclosure relates to the technical field of home improvement, and in particular, to a method, device, terminal and storage medium for processing a moving route.
  • 3D modeling of space is a technology that has been rapidly developed and applied in recent years, and has been widely used in virtual reality, house decoration, space design and other fields.
  • a real-time automatic 3D modeling method based on photography is disclosed in Document 1 (Chinese patent application with application publication number CN110505463A), which uses a mobile device and a camera installed on the same shooting stand to take pictures, and the user moves the stand while moving While recording the moving route and the photos taken during the moving process, create a 3D model according to the moving route combined with the photos taken.
  • the route may be lost during the moving process of taking pictures, that is, if there is an interruption in the process of taking pictures with the mobile phone or camera, at least two routes will be formed at this time, and one is taken before the interruption.
  • the route formed by the photo is a route formed by a photo taken after the terminal. How to deal with the route interruption is an urgent problem to be solved in the art.
  • the present disclosure provides a method, device, terminal and storage medium for processing a moving route.
  • the present disclosure adopts the following technical solutions.
  • the present disclosure provides a method for processing a moving route, including:
  • the first movement route and the second movement route are spliced according to the corresponding point and the splicing angle to generate a splicing route.
  • the present disclosure provides a processing device for a moving route, characterized in that it includes:
  • an acquisition device for performing a first movement and determining a corresponding first movement route, and performing a second movement and determining a corresponding second movement route;
  • a processing device determining the corresponding point and the splicing angle of the starting point of the second moving route on the first moving route, and splicing the first moving route and the second moving route according to the corresponding point and the splicing angle, Generate stitching routes.
  • the present disclosure provides a terminal comprising: at least one memory and at least one processor;
  • the memory is used for storing program codes
  • the processor is used for calling the program codes stored in the memory to execute the above method.
  • the present disclosure provides a storage medium for storing program code for performing the above-described method.
  • a first movement is performed and a corresponding first movement route is determined
  • a second movement is performed and a corresponding second movement route is determined
  • a starting point of the second movement route is determined in the first movement route
  • the first moving route and the second moving route are spliced according to the corresponding points and the splicing angle to generate a splicing route.
  • the method proposed in the embodiment of the present disclosure can solve the acquired movement route caused by the interruption of the moving process. discontinuous problem.
  • FIG. 1 is a flowchart of a method for processing a movement route according to an embodiment of the present disclosure.
  • FIG. 2 is a flowchart of another method for processing a moving route according to an embodiment of the present disclosure.
  • FIG 3 is a schematic diagram of a first house type diagram and a second house type according to an embodiment of the present disclosure.
  • FIG. 4 is an effect diagram of various spliced floor plans according to an embodiment of the present disclosure.
  • FIG. 5 is a schematic structural diagram of a processing device for a moving route according to an embodiment of the present disclosure.
  • the term “including” and variations thereof are open-ended inclusions, ie, "including but not limited to”.
  • the term “based on” is “based at least in part on.”
  • the term “one embodiment” means “at least one embodiment”; the term “another embodiment” means “at least one additional embodiment”; the term “some embodiments” means “at least some embodiments”. Relevant definitions of other terms will be given in the description below.
  • a real-time automatic 3D modeling method based on photography is disclosed in Document 1 (Chinese Patent Application Publication No. CN110505463A), in which a mobile device with a photographing function and a camera are fixed on the same bracket, In the process of moving the stand, the mobile device and the camera take pictures respectively to obtain the image of the surrounding space, and combine the camera or the sensor of the mobile device to obtain the position and orientation of each shooting point, form a road map using a unified coordinate system, and then use the mobile device Real-time 3D modeling of the camera photos of each shooting point, and then uniformly place the 3D model of each shooting point in the same 3D coordinate system on the mobile device according to the position and orientation obtained before.
  • Document 1 Choinese Patent Application Publication No. CN110505463A
  • the joint parts between the 3D models are spliced to form an overall 3D model containing multiple shooting points, and a panoramic roaming effect is automatically generated on the mobile device. While generating the 3D model, a 2D floor plan corresponding to the 3D model can also be generated.
  • each movement route will have a corresponding model (for example, a 3D model or a 2D layout of the room passed through is created based on the movement route and the photos taken), but the relationship between the two movement routes cannot be determined. , it will cause the two 3D models (or two 2D layout drawings) corresponding to the moving route cannot be combined, and the integrated 3D model (or D layout drawing) cannot be obtained.
  • a 3D model or a 2D layout of the room passed through is created based on the movement route and the photos taken
  • an embodiment of the present disclosure proposes a method for processing a moving route.
  • FIG. 1 is a processing method of a moving route in an embodiment of the present disclosure, including:
  • S11 Perform a first movement and determine a corresponding first movement route.
  • the first movement route is the route taken during the first movement, and a plane coordinate system A can be established to draw the first movement route corresponding to the first movement in the plane coordinate system A.
  • a terminal such as a mobile phone is carried during the first movement, and the movement direction and distance during the movement are recorded by the acceleration sensor in the mobile phone, so as to determine the first movement. Move the corresponding first moving route.
  • the second movement route is the route taken during the second movement, and a plane coordinate system B can be established to draw the second movement route corresponding to the second movement in the plane coordinate system B.
  • the first movement and the second movement are not continuous, and there are interruptions in between.
  • the movement route is determined by the acceleration sensor of the terminal, but because the terminal is interrupted during the movement process, the reduction is reduced.
  • the speed sensor does not record consecutive numbers.
  • the data of the acceleration sensor recorded during the movement process is divided into two groups before and after the interruption.
  • the movement route corresponding to the movement process is divided into the first movement route and the second movement route.
  • the first movement and the second movement are not continuous, and the interruption occurs after the first movement. Therefore, the first movement route and the second movement route need to be spliced, and the starting point of the second movement route needs to be spliced to the first movement route.
  • the first movement route and the second movement route need to be placed in the same coordinate system, for example, the coordinate system when the first movement route is established is used as the benchmark.
  • the length and shape of the second movement route can be determined, so when splicing the first movement route and the second movement route, you need to know is the position on the first movement route to which the second movement route needs to be spliced and the angle of the second movement route relative to the first movement route during splicing, that is, the splicing angle.
  • the starting point of the second movement route is spliced to the corresponding point of the first movement route, and the angle of the second movement route relative to the first movement route is adjusted, so that the second movement route is the same as the first movement route.
  • the included angle between the routes is equal to the splicing angle, so as to realize the splicing between the first movement route and the second movement route.
  • the first movement route is determined according to a plurality of first images captured during the first movement, or the first movement route is determined according to positioning information collected by a sensor during the first movement.
  • the first movement route corresponding to the first movement there are two methods for determining the first movement route corresponding to the first movement.
  • One is to take pictures while moving during the first movement, and record the surrounding environment by taking pictures.
  • the photos taken in the process are the first images, and then feature matching is performed on each of the first images, so as to determine the first movement route of the first movement.
  • the other is to collect positioning information through sensors during the first movement, and determine the first movement route according to the positioning information. It is also possible to not only take pictures during the first moving process, but also collect positioning information, and combine the two methods to determine the first moving route.
  • a mobile phone is used as an example.
  • the mobile phone captures images of the surroundings, and at the same time, the motion sensor in the mobile phone collects positioning information to form the first movement route.
  • the motion sensor such as It can be a gyroscope or an accelerometer in a mobile phone.
  • the second movement route is determined according to a plurality of second images captured during the second movement, or the second movement route is determined according to positioning information collected by the sensor during the second movement.
  • the second movement route may be determined by two methods of photographing a second image and collecting positioning information.
  • the method proposed in this embodiment can be used for the real-time automatic 3D modeling method based on photographing proposed in Document 1.
  • the following description takes the method proposed in the present disclosure being used in the method proposed in Document 1 as an example.
  • the mobile phone and the camera are fixed on a bracket to perform the first movement, and during the first movement, the mobile phone and the camera respectively capture surrounding images, thereby acquiring multiple first images.
  • the first movement may be stopped due to the need to use a mobile phone or other reasons, and feature matching is performed on the acquired first image to establish a coordinate system A and draw a first movement route in the coordinate system A. Then move the bracket to perform the second movement.
  • the second movement it also takes pictures to obtain multiple second images, then establishes the coordinate system B and draws the second movement route, and then compares the first movement route and the second movement route.
  • the routes are spliced under the same coordinate system.
  • the user when the user performs the second movement, he tends to return to the position previously walked during the first movement. Therefore, the second image taken at the starting point of the second movement can be used to match the first position.
  • Feature matching is performed on the first image captured during the first movement, so as to determine the corresponding point of the starting point of the second moving route, and according to the angle of view of the second image captured at the starting point of the second movement and the first image of the corresponding point According to the difference in viewing angle, the rotation angle during the second movement can be determined, the splicing angle can be determined according to the rotation angle, and then the starting point of the second movement route is spliced to the corresponding one on the first movement route according to the determined splicing angle. point to form a splicing route.
  • FIG. 2 schematically shows a flowchart of another method for processing a moving route according to an embodiment of the present disclosure.
  • S11 Perform a first movement and determine a corresponding first movement route.
  • a plurality of first images are captured, which may be the first movement in the room, and the first images may be captured images in the room.
  • a plurality of second images are captured, which may be the second movement in the room, and the second images may be captured images in the room.
  • the method further includes: responding to the second position on the first movement route corresponding to The selection operation of any direction in the first image captured by the position, adjust the shooting angle to make the shooting angle the same as the selected direction or make the angle between the shooting angle and the selected direction equal to the preset angle;
  • the shooting angle is the starting shooting angle to start the second movement; wherein, the second position is any point on the first movement route.
  • the relationship between the initial shooting angle of the second movement and the shooting angle of the position corresponding to the second position can be known.
  • the relationship between the shooting angle of the position corresponding to the second point and the shooting angle of the position corresponding to the corresponding point can be determined according to the first image captured during the first movement, so that the initial position of the second movement can be known.
  • the relationship between the shooting angle and the shooting angle of the position corresponding to the corresponding point, and the second movement route is obtained from the second image, so the relationship between the initial shooting angle of the second movement and the shooting angle of the position corresponding to the corresponding point is known.
  • the splicing angle between the second movement route and the first movement route is determined. For example, if the initial angle of the second movement is the same as the shooting angle of the position corresponding to the corresponding point, the starting point of the second movement route may be directly connected to the corresponding point.
  • the user actually wants to perform one movement instead of two during the movement, possibly due to the failure of the device that captures the image, and the recording is stopped in the middle, so one movement is divided into two movements, and in the In this case, the second movement and the first movement are continuous in time, and the start point of the second movement and the end point of the first movement are actually adjacent or the same. Therefore, in some embodiments, the end point of the first movement route may be used as the corresponding point.
  • the user voluntarily stops the image capture due to other reasons during the movement. For example, the user uses the mobile phone to capture images during the movement, but stops the image capture because the mobile phone receives a call. In this case , the second movement and the first movement are discontinuous in time.
  • the second movement it is also possible to: send out prompt information, where the prompt information is used to indicate the position corresponding to the first point on the first movement route, wherein the first point is any point on the first movement route;
  • the prompt information is used to indicate the position corresponding to the first point on the first movement route, wherein the first point is any point on the first movement route;
  • the user is prompted to return to a certain position during the first movement before the second movement, so that the relationship between the starting point of the second movement route and the first movement route can be determined, and the first point will be used as the The corresponding point of the starting point of the second movement route.
  • determining the splicing angle includes: obtaining The second image (which may be a panorama) captured at the starting point of the second movement during the second movement and the first image captured during the first movement; used at the starting point of the second movement.
  • the captured second image and the first image are feature matched to determine the stitching angle.
  • the second image captured by the starting point of the second movement and the first image captured during the first movement have the same feature points, and the location of the starting point of the second movement can be determined through feature point matching.
  • the shooting angle of the second image at this position may be different from the shooting angle of the first image at this position, the viewing angle of the second image and the first image at the same position is different, according to The difference in viewing angle can determine the difference between the shooting direction of the first image shot at the position and the shooting angle of the second image shot at the position.
  • the second movement route is determined by The second image is calculated, so the angle relationship between the first movement route and the shooting angle of each first image can be known, and the angle relationship between the second movement route and the shooting angle of each second image can also be known.
  • the angle difference between the second image captured at the location and the first image determines the splicing angle of the first movement route and the second movement route.
  • the processing method for the moving route further includes: in response to the adjustment operation, adjusting the difference between the first moving route and the second moving route in the splicing route according to the adjustment operation. Splice point or splice angle.
  • S15 Acquire a first floor plan corresponding to the first movement route constructed by using the first image, and a second floor plan corresponding to the second movement route constructed by using the second image.
  • first images captured in the process of performing the first movement there are multiple first images captured in the process of performing the first movement, and two temporally adjacent first images have the same feature points. Determine the relationship between each first image and locate the first moving route.
  • a 3D model can be established according to the structure of the surrounding room captured in the first image, and a 2D first house plan can be generated according to the 3D model.
  • the first floor plan is directly generated according to the room structure captured in the multiple first images.
  • the first floor plan records the structure and room layout of the rooms passed through during the first movement. Similar , the structure and room layout of the second moving route and the room passed during the second moving can be determined in the same way.
  • first floor plan and the second floor plan can be spliced together under the same plane coordinate system, and the room corresponding to the starting point of the second movement route in the second floor plan and the room corresponding to the first movement in the first floor plan The rooms at the corresponding points in the route are spliced together, and the angle between the first floor plan and the second floor plan is adjusted according to the splicing angle.
  • a plurality of first images are captured during the first movement, and a plurality of second images are captured during the second movement, and a first floor plan and a second floor plan are generated, and the first floor plan
  • the floor plan is adapted to the first movement route
  • the second floor plan is adapted to the second movement route.
  • determining the splicing angle includes: selecting a plurality of different angles as multiple splicing angles, that is, in step S13, the splicing angle may not be set to a fixed value, it may be From the selection of multiple possible stitching angles. Therefore, different splicing angles will correspond to different splicing routes, and step S14 includes: respectively generating multiple splicing routes corresponding to multiple splicing angles. That is, one splicing angle will correspond to one splicing route. Therefore, step S15 will include: generating multiple spliced floor plans corresponding to multiple splicing routes.
  • Method 1 Display multiple spliced floor plans, and use the selected spliced floor plan as the target to stitch the floor plans.
  • a plurality of stitched floor plans are displayed for the user to select, and the stitched floor plan selected by the user is identified as a stitched floor plan consistent with the actual situation, that is, the target stitched floor plan.
  • Method 2 After generating the spliced floorplan, obtain the reliability of each spliced floorplan in the plurality of spliced floorplans, and use the spliced floor plan with the highest reliability as the target splicing the floor plan.
  • the mobile phone and the camera are fixed on the same bracket, and the mobile bracket is moved indoors.
  • the mobile phone and the camera capture images of the surrounding indoor rooms, and generate a first moving route according to the captured images.
  • the process of moving if the route is lost due to reasons such as poor light or the mobile phone is stuck, the movement before the route is lost is the first movement, and the movement after the route is lost is the second movement, and according to the process of the second movement image to generate a second movement route.
  • the floor plan of the room passed in the first moving process that is, the first floor plan
  • the floor plan of the room passed in the second movement process is generated according to the second image.
  • the second house type diagram you can refer to FIG. 3
  • FIG. 3a is the first house type diagram
  • FIG. 3b is the second house type diagram.
  • the corresponding point of the start point of the second movement route can be regarded as corresponding to the end point of the first movement route.
  • the user can manually adjust the connection position, and then determine the splicing angle.
  • the first floor plan and the second floor plan The outline of the room, considering the parallel or vertical relationship between the walls, first adjust the walls of the first floor plan and the second graphic to the horizontal or vertical direction, and then select the splicing angle as 0 degrees, 90 degrees, 180 degrees or 270 degrees.
  • Figure 4 schematically shows 3 kinds of splicing floor plans obtained from Figure 3. picture.
  • a weighting algorithm may be used to determine the reliability of each spliced house type degree, and the reliability may be determined by the weighted sum of multiple weighted items.
  • the weighted items may include at least one of overlapping area information, unit shape information, unit outline information, compass information, and window layout information.
  • Rule 1 is set here: if the name of a room i in the first floor plan is the same as the name of a room j in the second floor plan, it is considered that room i and room j are the same room, or if the first floor plan has the same name
  • the combination of the name of a room i in the picture and the name of a room j in the second floor plan is a preset combination name, then it is considered that room i and room j are the same room, for example, the room j in the first floor plan
  • the name is living room
  • the name of room i in the second floor plan is dining room
  • the preset combination names include ⁇ living room, dining room ⁇ , ⁇ living room, aisle ⁇ , ⁇ living room, hallway ⁇ , ⁇ dining room, aisle ⁇ , ⁇ dining room , Entrance ⁇ , so room j and room i are considered to be the same room.
  • the rule 1 determines the overlapping area of the first and second floor plans in the spliced floor plan, and then determine whether the overlapping area of the first floor plan and the second floor plan is the same according to rule 1.
  • the total area of each overlapping area belonging to the same room in accordance with Rule 1 is the allowable overlapping area CA of the first and second floor plans.
  • the overlapped part circled in Fig. 4a, the overlapping area in the first floor plan (Fig. 3a) and the second floor plan (Fig. 3b) belong to the restaurant and the second floor plan respectively in the first floor plan (Fig. 3a)
  • the aisle in the graphic diagram (Fig. 3b), and the preset combination name includes ⁇ restaurant, aisle ⁇ , so the aisle in Fig.
  • FIG. 4a is part of the allowable overlap area in accordance with rule 1, for the circled in Fig. 4b
  • the overlap is not allowed
  • the overlapping area in the first floor plan (Fig. 3a) and the second floor plan (Fig. 3b) belong to the kitchen in the first floor plan (Fig. 3a) and the main floor in the second floor plan (Fig. 3b), respectively.
  • the names of the two rooms are different and the combination name of the names of the two rooms is not the preset combination name. Therefore, the circled part in Figure 4b is the part that is not allowed to overlap.
  • CA in the spliced floor plan is not equal to 0, calculate the actual overlap area GIA of the first floor plan and the second floor plan in the stitched floor plan, and subtract the allowable overlap area CA from the actual overlap area GIA to obtain the overlap area information.
  • the larger the overlapping area information the lower the reliability of the spliced floor plan.
  • House shape information MBB/(PA1+PA2).
  • MBB is the area of the circumscribed rectangle of the spliced floor plan
  • PA1 is the area of the first floor plan
  • PA2 is the area of the second floor plan.
  • the angle difference between the first orientation and the second orientation is (RH_k-RH_j) ;
  • RR_j is the rotation angle of the first floor plan when generating the spliced floor plan
  • RR_k is the rotation angle of the second floor plan when splicing the floor plan.
  • (RH_k-RH_j) indicates the angle that should be rotated when the first and second floor plans are spliced together
  • (RR_k-RR_j+OR_i) indicates the spliced floor plan
  • the magnetic field strength needs to be recorded during the first movement and the second movement, and the magnetic field strength is calculated according to the recorded magnetic field strength at each location.
  • the mean value and the variance of the magnetic field strength If the mean value of the magnetic field strength is greater than 60 or the variance of the magnetic field strength is greater than 10, it indicates that the mobile phone compass may be inaccurate, so the compass information is not used at this time.
  • the window reliability of the window can be determined by: determining whether the extension direction of the window intersects with the room in the spliced floor plan; if it does not intersect, the window reliability of the window is 0; if it intersects and the window belongs to the first unit type Figure, then find the corresponding window that is closest to the window and belongs to the second floor plan, and calculate the distance L1 between the window and the corresponding window, if L1 is less than the distance threshold, use L1 as the window reliability, if L1 is not less than the distance threshold, Then use the distance threshold as the reliability of the window; if it intersects and the window belongs to the second floor plan, find the corresponding window that is closest to the window and belongs to the first floor plan, and calculate the distance L2 between the window and the corresponding window, if L2 is less than For the distance threshold, L2 is used as the window reliability. If L2 is not less than the distance threshold, the distance threshold is used as the window reliability.
  • unit shape information, unit outline information, compass information and window layout information After obtaining the overlapping area information, unit shape information, unit outline information, compass information and window layout information through the above method, set the corresponding room overlapping area information, unit shape information, unit outline information, compass information and window layout information Weight, using a weighting algorithm to calculate the reliability of the spliced floor plan.
  • the weight of these items can be set to be less than 0, and the weight of the apartment outline information can be set to be greater than 0.
  • the weight of the compass information is set to 0. If the compass information of each stitched floor plan is greater than 30, it indicates that the error of the compass information is large, and the weight of the compass information is also set at this time. It is 0. If the smallest compass information in each floor plan is less than 20 but not less than 5, it means that the reliability of the compass information is low, and the weight of the compass information should be reduced. If the smallest compass information in each floor plan is less than 5, it means The reliability of the compass information is very high, and the weight of the compass information should be increased at this time.
  • the weight of the profile information of the house type when determining the weight of the profile information of the house type, first obtain the ratio R1 of the area of the circumscribed rectangle of the first floor plan to the total room area of the first floor plan, and the area of the circumscribed rectangle of the second floor plan and the first floor plan.
  • the stitched floor plan with the highest reliability can be directly selected as the target stitched floor plan, or each stitched floor plan can be recommended to the user for selection by the user.
  • the mobile phone and the camera are fixed on the same bracket, and the mobile bracket is used to move indoors.
  • the mobile phone and the camera capture images of the surrounding rooms, and generate a first moving route according to the captured images.
  • the mobile phone is removed from the stand due to reasons such as a phone call.
  • the first movement is over.
  • the mobile phone can be moved according to the first movement between The route prompts the user to return to a certain position in the process of the first movement (for example, the end point of the first movement, the point of the position on the first movement route is the corresponding point), the user returns to the prompted position, and is preparing for the second movement.
  • the splicing route is obtained by connecting the starting point of the second movement route to the corresponding point of the first movement route and adjusting the angle between the two.
  • the present disclosure also proposes a processing device for a moving route, as shown in FIG. 5 , including:
  • an acquisition device 10 for performing a first movement and determining a corresponding first movement route, and performing a second movement and determining a corresponding second movement route;
  • the processing device 20 determines the corresponding point and the splicing angle of the starting point of the second moving route on the first moving route, and splices the first moving route and the second moving route according to the corresponding point and the splicing angle to generate a splicing route.
  • An embodiment of the present disclosure also proposes a terminal, including:
  • At least one memory is used for storing program codes
  • at least one processor is used for calling the program codes stored in the at least one memory to execute any one of the methods proposed in the present disclosure.
  • An embodiment of the present disclosure also provides a storage medium, where the storage medium is used to store program codes, and the program codes are used to execute any one of the methods proposed in the present disclosure.

Abstract

一种移动路线的处理方法及装置、终端和存储介质。移动路线的处理方法包括:进行第一移动并确定对应的第一移动路线(S11);进行第二移动并确定对应的第二移动路线(S12);确定第二移动路线的起点在第一移动路线上的对应点和拼接角度(S13);根据对应点和拼接角度对第一移动路线和第二移动路线进行拼接,生成拼接路线(S14)。该方法能够解决移动过程中断导致的移动路线不连续的问题。

Description

移动路线的处理方法、装置、终端和存储介质 技术领域
本公开涉及家装技术领域,尤其涉及一种移动路线的处理方法、装置、终端和存储介质。
背景技术
空间的3D建模是近年来快速发展和应用的一项技术,在虚拟现实、房屋装修、空间设计等领域都得到广泛的而应用。在文件1(申请公布号为CN110505463A的中国专利申请)中公布了一种基于拍照的实时自动3D建模方法,采用安装在同一拍摄支架上的移动设备和相机进行拍照,用户移动支架,边移动边记录移动路线以及移动过程拍摄的照片,再根据移动路线结合拍摄的照片建立3D模型。采用文件1中的方法时,在拍照的移动过程中可能会出现路线丢失的情况,即在手机或相机拍摄图片的过程中出现中断,此时会形成至少两条路线,一条是中断前拍摄的照片形成的路线,一条是终端后拍摄的照片形成的路线,在路线中断的情况下如何处理是本领域技术亟待解决的问题。
发明内容
为解决现有问题,本公开提供一种移动路线的处理方法、装置、终端和存储介质。
本公开采用以下的技术方案。
在一些实施例中,本公开提供一种移动路线的处理方法,包括:
进行第一移动并确定对应的第一移动路线;
进行第二移动并确定对应的第二移动路线;
确定第二移动路线的起点在所述第一移动路线上的对应点和拼接角度;
根据所述对应点和所述拼接角度对所述第一移动路线和第二移动路线进行拼接,生成拼接路线。
在一些实施例中,本公开提供一种移动路线的处理装置,其特征在于,包括:
获取设备,用于进行第一移动并确定对应的第一移动路线,以及进行第二移动并确定对应的第二移动路线;
处理设备,确定第二移动路线的起点在所述第一移动路线上的对应点和拼接角度,根据所述对应点和所述拼接角度对所述第一移动路线和第二移动路线进行拼接,生成拼接路线。
在一些实施例中,本公开提供一种终端,包括:至少一个存储器和至少一个处理器;
其中,存储器用于存储程序代码,处理器用于调用所述存储器所存储的程序代码执行上述的方法。
在一些实施例中,本公开提供一种存储介质,所述存储介质用于存储程序代码,所述程序代码用于执行上述的方法。
本公开实施例提供的移动路线的处理方法,进行第一移动并确定对应的第一移动路线,进行第二移动并确定对应的第二移动路,确定第二移动路线的起点在第一移动路线上的对应点和拼接角度,根据对应点和拼接角度对第一移动路线和第二移动路线进行拼接,生成拼接路线,本公开实施例提出的方法能够解决移动过程中断导致的获取到的移动路线不连续的问题。
附图说明
结合附图并参考以下具体实施方式,本公开各实施例的上述和其他特征、优点及方面将变得更加明显。贯穿附图中,相同或相似的附图标记表示相同或相似的元素。应当理解附图是示意性的,元件和元素不一定按照比例绘制。
图1是本公开实施例的一种移动路线的处理方法的流程图。
图2是本公开实施例的另一种移动路线的处理方法的流程图。
图3是本公开实施例的第一户型图和第二户型的示意图。
图4是本公开实施例的多种拼接户型图的效果图。
图5是本公开实施例的移动路线的处理装置的结构示意图。
具体实施方式
下面将参照附图更详细地描述本公开的实施例。虽然附图中显示了本公开的某些实施例,然而应当理解的是,本公开可以通过各种形式来实现,而且不应该被解释为限于这里阐述的实施例,相反提供这些实施例是为了更加透彻和完整地理解本公开。应当理解的是,本公开的附图及实施例仅用于示例性作用,并非用于限制本公开的保护范围。
应当理解,本公开的方法实施方式中记载的各个步骤可以按和/或并行执行。此外,方法实施方式可以包括附加的步骤和/或省略执行示出的步骤。本公开的范围在此方面不受限制。
本文使用的术语“包括”及其变形是开放性包括,即“包括但不限于”。术语“基于”是“至少部分地基于”。术语“一个实施例”表示“至少一个实施例”;术语“另一实施例”表示“至少一个另外的实施例”;术语“一些实施例”表示“至少一些实施例”。其他术语的相关定义将在下文描述中给出。
需要注意,本公开中提及的“第一”、“第二”等概念仅用于对不同的装置、模块或单元进行区分,并非用于限定这些装置、模块或单元所执行的功能的顺序或者相互依存关系。
需要注意,本公开中提及的“一个”的修饰是示意性而非限制性的,本领域技术人员应当理解,除非在上下文另有明确指出,否则应该理解为“一个或多个”。
本公开实施方式中的多个装置之间所交互的消息或者信息的名称仅用于说明性的目的,而并不是用于对这些消息或信息的范围进行限制。
在文件1(申请公布号为CN110505463A的中国专利申请)中公布了一种基于拍照的实时自动3D建模方法,其所采用的方法中将具有拍照功能的移动设备和相机固定在同一支架上,在移动支架的过程中移动设备和相机分别进行拍照得到周围空间的图像,结合相机或移动设备的传感器来获取每个拍摄点的位置和朝向,形成使用统一坐标系的路线图,然后在移动设备上实时对每个拍摄点的相机照片进行3D建模,再在移动设备上将每个拍摄点的3D模型按照之前获取的位置和朝向,统一放置在同一个三维坐标系内,对多个拍摄点3D模型之间的结合部位进行拼接处理,形成包含多拍摄点的整体3D模型,在移动设备上自动生成全景漫游效果。在生成3D模型的同时还可以生成3D模型对应的2D平面图。
文件1所采用的方法中,为了结合相机或移动设备的拍摄的图像和/或传感器来获取每个拍摄点的位置和朝向形成统一坐标系的路线图,要求移动过程不能中断,即需要进行连续的移动并连续的拍摄照片或定位,如果在移动过程中出现中断,则会形成至少两条移动路线,一条是中断前的移动路线,一条是中断后的移动路线,此时在用拍摄的照片进行建模时,每个移动路线会各自对应有一个模型(例如根据移动路线和拍摄的照片建立所经过的房间的3D模型或2D布局图),但由于无法确定两个移动路线之间的关系,会导致移动路线对应两个3D模型(或两个2D布局图)无法结合,无法得到整合在一起的3D模型(或D布局图)。
为了至少部分解决上述问题,本公开实施例中提出一种移动路线的处理方法。
以下将结合附图,对本申请实施例提供的方案进行详细描述。
实施例1
如图1所示,图1是本公开实施例中的一种移动路线的处理方法,包括:
S11:进行第一移动并确定对应的第一移动路线。
具体的,第一移动路线是进行第一移动时所走过的路线,可以建立平面坐标系A在平面坐标系A中绘制第一移动所对应的第一移动路线。确定第一移动过程中的位置的方法可以有多种,例如在进行第一移动的过程中携带手机等终端,通过手机中的加速度传感器记录移动过程中的移动方向和移动距离,从而确定第一移动对应的第一移动路线。
S12:进行第二移动并确定对应的第二移动路线。
具体的,第二移动路线是进行第二移动时所走过的路线,可以建立平面坐标系B在平面坐标系B中绘制第二移动所对应的第二移动路线。一些实施例中,第一移动和第二移动并不连续,中间具有中断,例如,在移动的过程中都是通过终端的加速度传感器确定移动路线,但由于终端在移动过程中中断了使用,减速度传感器没有记录到连续的数,移动过程记录的加速度传感器的数据分成了中断前和中断后的两组,移动过程对应的移动路线也就分为第一移动路线和第二移动路线。
S13:确定第二移动路线的起点在第一移动路线上的对应点和拼接角度。
具体的,第一移动与第二移动并不连续,在进行第一移动后发生了中断,因此第一移动路线和第二移动路线需要进行拼接,需要将第二移动路线的起点拼接到第一移动路线上,在对第一移动路线和第二移动路线进行拼接时,需要将第一移动路线和第二移动路线放到同一坐标系下,例如以建立第一移动路线时的坐标系为基准,将第二移动路线放入第一移动路线所在的坐标系中,第二移动路线的长度以及形状是可以确定的,因此在对第一移动路线和第二移动路线进行拼接时,需要知道的是第二移动路线需要拼接到的第一移动路线上的位置以及拼接时第二移动路线相对于第一移动路线的角度,即拼接角度。
S14:根据对应点和拼接角度对第一移动路线和第二移动路线进行拼接,生成拼接路线。
具体的,一些实施例中,将第二移动路线的起点拼接到第一移动路线的对应点上,并调节第二移动路线相对于第一移动路线的角度,使得第二移动路线与第一移动路线之间的夹角等于拼接角度,从而实现第一移动路线和第二移动路线之间的拼接。
在一些可选的实施例中,根据在第一移动的过程中拍摄的多张第一图像确定第一移动路线,或者,根据第一移动过程中传感器采集的定位信息确定第一移动路线。
具体的,确定第一移动对应的第一移动路线的方法可以有两种,一种是在进行第一移动的过程中边移动边进行拍照图像,通过拍照记录四周的环境,在第一移动的过程中拍摄的照片为第一图像,然后对各个第一图像进行特征匹配,从而确定第一移动的第一移动路线。另一种是在进行第一移动的过程中通过传感器采集定位信息,根据定位信息确定第一移动路线。也可以在进行第一移动过的过程中既进行拍照,同时也采集定位信息,结合两种方式确定第一移动路线。举例而言,在进行第一移动的过程中,使用手机为例,在第一移动的过程中手机拍摄周围的图像,同时手机中的运动传感器采集定位信息,形成第一移动路线,运动传感器例如可以是手机中的陀螺仪或者加速度传感器。
在一些可选的实施例中,根据在第二移动的过程中拍摄的多张第二图像确定第二移动路线,或者,根据第二移动过程中传感器采集的定位信息确定 第二移动路线。具体的,与生成第一移动路线的方法相同,可以采用拍摄第二图像和采集定位信息两种方式确定第二移动路线。
为了更好的说明本公开实施例中提出的方法以下提出一个具体的实施例。在本实施例提出的方法可以用于文件1中提出的基于拍照的实时自动3D建模的方法中,以下以本公开提出的方法用于文件1中提出的方法时为例进行说明。本实施例中,将手机和相机固定在一个支架上进行第一移动,并且在第一移动的过程中手机和相机分别拍摄周围的图像,从而获取到多张第一图像,在第一移动的过程中可能由于需要使用手机或其他原因停止了第一移动,对获取到的第一图像进行特征匹配从而建立坐标系A并在坐标系A中绘制第一移动路线。然后移动支架进行第二移动,在进行第二移动的过程中同时也进行拍照获取多张第二图像,然后建立坐标系B并绘制第二移动路线,然后对将第一移动路线和第二移动路线在同一坐标系下进行拼接,此时要确定第二移动路线需要与第一移动路线的哪一点进行拼接,以及拼接时的拼接角度。一些实施例中,用户在进行第二移动的时候往往会回到之前在第一移动的过程中所走过的位置,因此,可以用在进行第二移动的起点处拍摄的第二图像与第一移动的过程中拍摄的第一图像进行特征匹配,从而确定第二移动路线的起点的对应点,并且根据进行第二移动的起点处拍摄的第二图像的视角与对应点的第一图像的视角的差异,从而可以确定在进行第二移动时转动的角度,根据该转动的角度即可确定拼接角度,然后按照确定的拼接角度将第二移动路线的起点拼接到第一移动路线上的对应点,形成拼接路线。
实施例2
请参考图2,图2示意性的显示了另一种本公开实施例的移动路线的处理方法的流程图。
S11:进行第一移动并确定对应的第一移动路线。
具体的,在第一移动过程中拍摄有多张第一图像,可以是在房间内进行第一移动,第一图像可以是拍摄的房间内的图像。
S12:进行第二移动并确定对应的第二移动路线。
具体的,在第二移动过程中拍摄有多张第二图像,可以是在房间内进行第二移动,第二图像可以是拍摄的房间内的图像。
在进行第二移动之前需要调节拍摄角度,为了方便后续将第一移动路线和第二移动路线拼接在一起时确定第一移动路线和第二移动路线之间的拼接角度,该第二移动的起始拍摄角度应该与第一移动的过程中所采用的拍摄角度具有一定的联系,因此在一些实施例中,在步骤S12之前还包括:响应于对在第一移动路线上第二位点对应的位置所拍摄的第一图像中的任一方向的选取操作,调节拍摄角度以使拍摄角度与被选取的方向相同或者使拍摄角度与被选取的方向的夹角等于预设夹角;以调节后的拍摄角度为起始拍摄角度开始进行第二移动;其中,第二位点为第一移动路线上的任一点。通过在进行第二移动之前调节拍摄角度,就可以知道第二移动的初始拍摄角度与第二位点对应的位置拍摄角度的关系,同时,因为第二位点和对应点都位于第一移动路线上,所以可以根据第一移动的过程中拍摄的第一图像确定第二位点对应点位置的拍摄角度和对应点对应的位置的拍摄角度之间的关系,这样就可以知道第二移动的初始拍摄角度与对应点对应的位置的拍摄角度之间的关系,而第二移动路线由第二图像得到,所以在知道了第二移动的初始拍摄角度与对应点对应的位置的拍摄角度之间的关系后确定出第二移动路线和第一移动路线之间的拼接角度。例如,如果第二移动的初始角度与对应点对应的位置的拍摄角度相同时,可以直接将第二移动路线的起点连接到对应点处。
S13:确定第二移动路线的起点在第一移动路线上的对应点和拼接角度。
在一些实施例中,用户在进行移动的过程中实际上是希望进行一次移动,而非两次,可能由于拍摄图像的设备出现故障,中途停止拍摄,因此一次移动被分为了两次移动,在这种情况下,第二移动和第一移动在时间上连续,第二移动的起点和第一移动终点实际上相邻或相同,因此,一些实施例中可以用第一移动路线的终点作为对应点。
在另一些实施例中,用户在进行移动的过程中由于其他原因主动停止了图像拍摄,例如用户使用手机在移动的过程中拍摄图像,但由于手机接到电话而停止图像拍摄,这种情况下,第二移动和第一移动在时间上不连续。因此,在第二移动之前还可以:发出提示信息,提示信息用于指示第一移动路线上的第一位点对应的位置,其中,第一位点为第一移动路线上的任一点;通过这种方式在进行第二移动之前提示用户返回到第一移动过程中所走过的 某一个位置上,从而可以确定第二移动路线的起点与第一移动路线的关系,第一位点将作为第二移动路线的起点的对应点。
在进行第一移动和第二移动的过程中都拍摄有图像,当第二移动的起点位于第一移动的所经过的任一位置上及其附近时,第一移动的起点处所拍摄第二图像必然与第一移动的过程中拍摄的第一图像具有相同的特征点,通过特征点匹配即可确定第二移动的起点处的拍摄方向,因此在一些实施例中,确定拼接角度,包括:获取所述第二移动的过程中在第二移动的起点所拍摄的第二图像(可以是全景图)以及所述第一移动的过程中所拍摄的第一图像;用在第二移动的起点所拍摄的第二图像和第一图像进行特征匹配以确定拼接角度。在本实施例中,第二移动的起点所拍摄的第二图像与第一移动的过程中拍摄的第一图像具有相同的特征点,通过特征点匹配可以确定第二移动的起点所在的位置处对应的第一图像,由于在该位置拍摄第二图像的拍摄角度与在该位置拍摄第一图像的拍摄角度可能不同,因此在同一位置拍摄的第二图像和第一图像的视角有差异,根据该视角差异即可确定在该位置拍摄的第一图像的拍摄方向和在该位置拍摄的第二图像的拍摄角度的差值,由于第一移动路线由第一图像计算得到,第二移动路线由第二图像计算得到,因此第一移动路线和各个第一图像的拍摄角度的夹角关系可知,第二移动路线和各个第二图像的拍摄角度的夹角关系也可知,因此,可以根据在同一位置拍摄的第二图像和第一图像的视角差值确定第一移动路线和第二移动路线的拼接角度。
S14:根据对应点和拼接角度对第一移动路线和第二移动路线进行拼接,生成拼接路线。
在生成拼接路线后可以由用户手动调节拼接路线,因此在一些实施例中,移动路线的处理方法还包括:响应于调节操作,根据调节操作调节拼接路线中第一移动路线和第二移动路线的拼接点或拼接角度。
S15:获取通过第一图像构建的第一移动路线对应的第一户型图,以及通过第二图像构建的第二移动路线对应的第二户型图。
具体的,在进行第一移动的过程中所拍摄有多张第一图像,时间上相邻的两个第一图像彼此间具有相同的特征点,通过对各个第一图像进行特征点匹配就可以确定各个第一图像彼此之间的关系并定位第一移动路线,同时根 据第一图像中拍摄到的周围房间的结构能够建立3D模型,根据3D模型生成2D的第一户型图,当然,也可以不生成3D模型,直接根据多张第一图像中拍摄到的房间结构生成第一户型图,第一户型图记录了在第一移动的过程中所走过的房间的结构和房间布局,类似的,可以采用相同的方式确定第二移动路线和第二移动的过程中所走过的房间的结构和房间布局。
S16:根据拼接路线中第一移动路线和第二移动路线的拼接方式对第一户型图和第二户型图进行拼接,生成拼接户型图。
具体的,可以在同一平面坐标系下将第一户型图和第二户型图进行拼接,第二户型图中对应于第二移动路线的起点的房间,与第一户型图中对应于第一移动路线中对应点的房间相互拼接在一起,并根据拼接角度调节第一户型图和第二户型图之间的角度。
在本实施例中,在第一移动的过程中拍摄多张第一图像,并在第二移动的过程中拍摄多张第二图像,生成有第一户型图和第二户型图,并且第一户型图与第一移动移动路线相适配,第二户型图与第二移动路线相适配,通过确定第一移动路线和第二移动路线的拼接方式,从而可以实现第一户型图和第二户型图的拼接,本实施例提出的方法可以用于文件1中记载的基于拍照的实时自动3D建模方法中确定2D平面图的情况,在文件1记载的方法中,当通过拍照的方式确定移动过程所走过的房间的2D平面图(户型图)时,只能确定每一次移动过程所走过的2D平面图(户型图),当移动过程出现中断,两次移动过程不连续时会得到两张不同的2D平面图(户型图),无法得到一张完整的2D平面图(户型图),而采用本实施例中提出的方法后,可以解决移动路程中断的情况下无法得到一张完整的2D平面图(户型图)的问题。
在一些实施例中,请继续参考图2,在步骤S13中确定拼接角度包括:选取多个不同的角度作为多个拼接角度,即在步骤S13可以并不设定拼接角度为一个固定值,可以从选取多个可能的拼接角度。因此,不同的拼接角度将对应于不同的拼接路线,在步骤S14中包括:分别生成多个拼接角度对应的多个拼接路线。即一个拼接角度将对应一个拼接路线。因此,在步骤S15中将包括:生成多个拼接路线对应的多个拼接户型图。此时得到了多个拼接 户型图,但与实际情况相符合的拼接户型图只有一个,因此需要从多个拼接户型图中确定与实际情况相符合的拼接户型图,此处提供了两种方式。
方式1:展示多个拼接户型图,用被选取的拼接户型图作为目标拼接户型图。在方式1中,展示多个拼接户型图让用户进行选择,用户所选取的拼接户型图认定为与实际情况相符合的拼接户型图,即目标拼接户型图。
方式2;在生成拼接户型图后,获取多个拼接户型图中各个拼接户型图的可信度,用可信度最高的拼接户型图作为目标拼接户型图。
对于方式2,在得到不同的拼接户型图之后,需要对各个户型图的可信度进行评价,评价的方式可以为多种,可能采用的评价方式将在本申请下方进行介绍,在得到可信度之后用可信度最高的拼接户型图作为目标拼接户型图,即与实际情况相符合的拼接户型图。
实施例3
为了更好的对本公开实施例提出的方法进行说明,以下提出一个具体的实施例。在本实施例中,将手机和相机固定在同一支架上,通过移动支架在室内进行移动,在移动的过程中手机和相机拍摄周围室内房间的图像,并根据拍摄的图像生成第一移动路线,在移动的过程中由于光线差或手机卡顿等原因出现路线丢失,则在路线丢失前的移动为第一移动,在路线丢失后的移动为第二移动,并根据第二移动的过程中拍摄的图像,生成第二移动路线。在本实施例中还根据第一图像生成第一移动的过程所走过的房间的户型图,即第一户型图,并根据第二图像生成第二移动的过程所走过的房间的户型图,即第二户型图,可以参考图3,图3a为第一户型图,图3b为第二户型图。
由于第二移动在时间上与第一移动是连续的,因此第二移动路线的起点的对应点可以认为是第一移动路线的终点相对应,在得到第一移动路线和第二移动路线之后,将第二移动路线的起点连接到第一移动路线的终点处,在连接之后可以由用户手动调节连接位置,之后确定拼接角度,在本实施例中,根据第一户型图和第二户型图的房间轮廓,考虑到墙壁之间为平行或垂直关系,先将第一户型图和第二图形图的墙面调节到水平或垂直方向,然后选取拼接角度为0度、90度、180度或270度,这样共有四个不同的拼接角度,因此可以拼接得到四种不同的拼接路线,并得到四种不同的拼接户型图,图4中示意性的显示了其中3种由图3得到的拼接户型图。
在本实施例中,可以采用加权算法确定各个拼接户型度的可信度,可信度可以由多个加权项目的加权和确定。
加权项目可以包括重叠面积信息、户型形状信息、户型轮廓信息、指南针信息以及窗户布局信息中的至少一种。
以下介绍重叠面积信息的计算方式:
这里设定规则1:如果第一户型图中的某一个房间i的名称与第二户型图中某一个房间j的名称同名,则认为房间i和房间j是同一房间,或者,如果第一户型图中的某一个房间i的名称与第二户型图中某一个房间j的名称的组合是预设的组合名,则认为房间i和房间j是同一房间,例如第一户型图中房间j的名称为客厅,第二户型图中房间i的名称是餐厅,而预设的组合名中包括{客厅,餐厅},{客厅,过道},{客厅,玄关},{餐厅,过道},{餐厅,玄关},因此认为房间j和房间i为同一房间。
在明确了规则1之后,确定拼接户型图中第一户型图和第二户型图相重叠的区域,然后确定第一户型图和第二户型图中相重叠的区域按照规则1来判断是否为同一房间,各个重叠的区域中符合规则1属于同一房间的总面积为第一户型图和第二户型图的允许重叠面积CA。例如图4a中圈出的允许重叠的部分,在第一户型图(图3a)和第二户型图(图3b)中重叠的面积分别属于第一户型图(图3a)中的餐厅和第二图形图(图3b)中的过道,而预设的组合名包括{餐厅,过道},因此图4a中的过道属于符合规则1的允许重叠面积的一部分,对于图4b中圈出的不允许重叠的部分,在第一户型图(图3a)和第二户型图(图3b)中重叠的面积分别属于第一户型图(图3a)中的厨房和第二户型图(图3b)中的主卧,两者的名称不同且两个房间的名称的组合名并不是预设的组合名,因此,图4b中圈出的部分为不允许重叠的部分。
如果拼接户型图中的CA不等于0,则计算拼接户型图中第一户型图和第二户型图的实际重叠面积GIA,用实际重叠面积GIA减去允许重叠面积CA得到重叠面积信息。
如果拼接户型图中的CA等于0,计算r1和r2,其中r1=GIA/Amin,r2=GIA/Amax;其中,Amin是第一户型图和第二户型图中最小房间的面积,Amax是第一户型图和第二户型图中最大房间的面积。
如果r1>0.5且r2≤0.5,则用r1+r2作为重叠面积信息;
如果r1>0.5且r2>0.5,则该拼接户型图无效。
计算r3=GIA/min(GA1,GA2),如果r3大于0.5,则该拼接户型图无效,其中,GA1是第一户型图的面积,GA1是第二户型图的面积,min(GA1,GA2)是第一户型图和第二户型图中较小的一个的面积。
对于重叠面积信息而言,重叠面积信息越大,拼接户型图的可信度越低。
以下介绍户型形状信息的计算方式:
户型形状信息=MBB/(PA1+PA2)。
其中,MBB为拼接户型图的外接矩形的面积,PA1为第一户型图的面积,PA2为第二户型图的面积,户型形状信息越大,拼接户型图的可信度越低。
以下介绍户型轮廓信息的计算方式:
获取拼接户型图中第一户型图和第二户型图的实际重叠面积GIA;
对拼接户型图中第一户型图和第二户型图的轮廓进行膨胀,获取膨胀后拼接户型图中第一户型图和第二户型图的实际重叠面积GIA’;
计算户型轮廓信息=GIA’-GIA,其中,户型轮廓信息越大,拼接户型图的可信度越高。
以下介绍拼接前后的指南针信息的计算方式:
获取在拍摄第一图像时手机中的指南针(例如电子指南针)所指示的方向在第一户型图中的第一朝向RH_j,在拍摄第二图像时指南针所指示的方向在第二户型图中的第二朝向RH_k,
当对第一户型图和第二户型图进行拼接时需要将第一户型图和第二户型图绘制在同一坐标系下,此时第一朝向和第二朝向的角度差为(RH_k-RH_j);
RR_j为在生成拼接户型图时第一户型图旋转的角度,RR_k为拼接户型图时第二户型图旋转的角度。
指南针信息=(RH_k-RH_j)-(RR_k-RR_j+OR_i);
由于指南针所指示的应该是同一方向,因此(RH_k-RH_j)表示了将第一户型图和第二户型图拼接在一起时应该转动的角度,而(RR_k-RR_j+OR_i)表示了拼接户型图实际上转动的角度,因此指南针信息实际上表示了拼接角度的误差,所以指南针信息越小,拼接户型图的可信度越高。
需要注意的是,由于手机的指南针受磁场影响,因此在一些实施例中,在进行第一移动和第二移动的过程中需要记录磁场强度,根据每个位点位记 录的磁场强度计算磁场强度均值和磁场强度方差,若磁场强度均值大于60或者磁场强度方差大于10,则表明手机指南针可能不准确,因此此时不使用指南针信息。
以下介绍窗户布局信息的计算方式:
在拼接户型图中,确定属于第一户型图的各个窗户的窗户可信度以及属于第一户型图的各个窗户的窗户可信度;
具体可以通过如下方式确定窗户的窗户可信度:确定窗户的延伸方向与拼接户型图中的房间是否相交;若不相交,则窗户的窗户可信度为0;若相交且窗户属于第一户型图,则查找与该窗户距离最近且属于第二户型图的对应窗户,并计算窗户与对应窗户的距离L1,若L1小于距离阈值则用L1作为窗户可信度,若L1不小于距离阈值,则用距离阈值作为窗户可信度;若相交且窗户属于第二户型图,则查找与该窗户距离最近且属于第一户型图的对应窗户,并计算窗户与对应窗户的距离L2,若L2小于距离阈值则用L2作为窗户可信度,若L2不小于距离阈值,则用距离阈值作为窗户可信度。
用拼接户型图中各个窗户的窗户可信度的总和作为窗户布局信息;
其中,窗户布局信息越小,拼接户型图的可信度越高。
在通过上述方法得到了重叠面积信息、户型形状信息、户型轮廓信息、指南针信息以及窗户布局信息后,为房间重叠面积信息、户型形状信息、户型轮廓信息、指南针信息以及窗户布局信息设定对应的权重,采用加权算法计算得到拼接户型图的可信度。
其中,重叠面积信息、户型形状信息、指南针信息和窗户布局信息越大,可信度越低,因此可以设定这几项的权重小于0,而设定户型轮廓信息的权重大于0。
需要注意的是,如果不使用指南针信息,则设定指南针信息的权重为0,如果各个拼接户型图的指南针信息均大于30,表明指南针信息的误差较大,此时也设定指南针信息的权重为0,如果各个户型图中最小的指南针信息小于20但不小于5,说明指南针信息的可信度较低,应当减小指南针信息的权重,如果各个户型图中最小的指南针信息小于5,说明指南针信息的可信度非常高,此时应当增大指南针信息的权重。
还需要注意的是,在确定户型轮廓信息的权重时,先获取第一户型图的外接矩形的面积与第一户型图的房间总面积的比值R1、第二户型图的外接矩形的面积与第二户型图的房间总面积的比值R2;若R1或R2大于预设比值,则增大户型轮廓信息的权重。
在根据上述方式得到了各个拼接户型图的可信度后,可以直接选用可信度最高的拼接户型图作为目标拼接户型图,或者将各个拼接户型图推荐给用户,由用户选择。
实施例4
为了更好的说明本公开提出的方法,以下提出另一个实施例。
在本实施例中,将手机和相机固定在同一支架上,通过移动支架在室内进行移动,在移动的过程中手机和相机拍摄周围房间的图像,并根据拍摄的图像生成第一移动路线,在移动的过程中由于有电话等原因,将手机从支架上取下,此时第一移动结束,当用户想要继续拍摄时,将手机放回支架,此时手机可以根据之间的第一移动路线提示用户回到第一移动的过程中的某个位置(例如第一移动的终点,该位置在第一移动路线上的点为对应点),用户回到提示的位置,在准备进行第二移动之前可以先拍摄一张图像(例如全景图),用该图像与之前在第一移动的过程中拍摄的第一图像进行特征匹配,这样就能确定第二移动路线与第一移动路线之间的角度关系。也可以不拍照,在之前拍摄的图像中指示一个方向,使手机摄像头指向此方向,或者使得手机摄像头与该方向成预设角度,这样也能确定第二移动路线和第一移动路线至今的角度。
在得到第一移动路线和第二移动路线之后,根据将第二移动路线的起点连接到第一移动路线的对应点上,并调节两者的夹角,从而得到拼接路线。
在本公开的还提出一种移动路线的处理装置,如图5所示,包括:
获取设备10,用于进行第一移动并确定对应的第一移动路线,以及进行第二移动并确定对应的第二移动路线;
处理设备20,确定第二移动路线的起点在第一移动路线上的对应点和拼接角度,根据对应点和拼接角度对第一移动路线和第二移动路线进行拼接,生成拼接路线。
对于装置的实施例而言,由于其基本对应于方法实施例,所以相关之处参见方法实施例的部分说明即可。以上所描述的装置实施例仅仅是示意性的,其中所述作为分离模块说明的模块可以是或者也可以不是分开的。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。
本公开实施例中还提出一种终端,包括:
至少一个存储器和至少一个处理器;
其中,至少一个存储器用于存储程序代码,至少一个处理器用于调用至少一个存储器所存储的程序代码执行本公开提出的任一项的方法。
本公开实施例中还提出一种存储介质,存储介质用于存储程序代码,程序代码用于执行本公开提出的任一项的方法。
此外,虽然采用特定次序描绘了各操作,但是这不应当理解为要求这些操作以所示出的特定次序或以顺序次序执行来执行。在一定环境下,多任务和并行处理可能是有利的。同样地,虽然在上面论述中包含了若干具体实现细节,但是这些不应当被解释为对本公开的范围的限制。在单独的实施例的上下文中描述的某些特征还可以组合地实现在单个实施例中。相反地,在单个实施例的上下文中描述的各种特征也可以单独地或以任何合适的子组合的方式实现在多个实施例中。
尽管已经采用特定于结构特征和/或方法逻辑动作的语言描述了本主题,但是应当理解所附权利要求书中所限定的主题未必局限于上面描述的特定特征或动作。相反,上面所描述的特定特征和动作仅仅是实现权利要求书的示例形式。

Claims (12)

  1. 一种移动路线的处理方法,其特征在于,包括:
    进行第一移动并确定对应的第一移动路线;
    进行第二移动并确定对应的第二移动路线;
    确定第二移动路线的起点在所述第一移动路线上的对应点和拼接角度;
    根据所述对应点和所述拼接角度对所述第一移动路线和第二移动路线进行拼接,生成拼接路线。
  2. 根据权利要求1所述移动路线的处理方法,其特征在于,
    根据在第一移动的过程中拍摄的多张第一图像确定所述第一移动路线,或者,根据第一移动过程中传感器采集的定位信息确定第一移动路线;
    根据在第二移动的过程中拍摄的多张第二图像确定所述第二移动路线,或者,根据第二移动过程中传感器采集的定位信息确定第二移动路线。
  3. 根据权利要求2所述移动路线的处理方法,其特征在于,
    在第一移动过程中拍摄有多张第一图像,在第二移动的过程中拍摄有多张第二图像;
    所述移动路线的处理方法还包括:
    获取通过所述第一图像构建的所述第一移动路线对应的第一户型图,以及通过所述第二图像构建的所述第二移动路线对应的第二户型图;
    根据所述拼接路线中所述第一移动路线和所述第二移动路线的拼接方式对所述第一户型图和第二户型图进行拼接,生成拼接户型图。
  4. 根据权利要求3移动路线的处理方法,其特征在于,
    确定拼接角度包括:选取多个不同的角度作为多个拼接角度;
    根据所述对应点和所述拼接角度对所述第一移动路线和第二移动路线进行拼接,生成拼接路线,包括:分别生成所述多个拼接角度对应的多个拼接路线;
    所述生成拼接户型图,包括:生成所述多个拼接路线对应的多个拼接户型图;
    所述移动路线的处理方法还包括:
    获取所述多个拼接户型图中各个拼接户型图的可信度,用可信度最高的拼接户型图作为目标拼接户型图;
    或者,展示所述多个拼接户型图,用被选取的拼接户型图作为目标拼接户型图。
  5. 根据权利要求1所述移动路线的处理方法,其特征在于,生成拼接路线之后,还包括:
    响应于调节操作,根据所述调节操作调节所述拼接路线中所述第一移动路线和第二移动路线的拼接点或拼接角度。
  6. 根据权利要求1所述的移动路线的处理方法,其特征在于,确定第二移动路线的起点在所述第一移动路线上的对应点,包括:
    用所述第一移动路线的终点作为所述对应点。
  7. 根据权利要求2所述的移动路线的处理方法,其特征在于,
    在进行所述进行第二移动之前,还包括:发出提示信息,所述提示信息用于指示所述第一移动路线上的第一位点对应的位置,所述第一位点为所述第一移动路线上的任一点;
    所述确定第二移动路线的起点在所述第一移动路线上的对应点,包括:以所述第一位点作为所述对应点。
  8. 根据权利要求7移动路线的处理方法,其特征在于,所述进行第二移动,还包括:
    响应于对在所述第一移动路线上第二位点对应的位置所拍摄的第一图像中的任一方向的选取操作,调节拍摄角度以使所述拍摄角度与被选取的方向相同或者使所述拍摄角度与被选取的方向的夹角等于预设夹角;
    以调节后的所述拍摄角度为起始拍摄角度开始进行所述第二移动;
    其中,所述第二位点为所述第一移动路线上的任一点。
  9. 根据权利要求2-8任一项所述的移动路线的处理方法,其特征在于,所述确定拼接角度,包括:
    获取所述第二移动的过程中在所述第二移动的起点所拍摄的第二图像以及所述第一移动的过程中所拍摄的第一图像;
    用在所述第二移动的起点所拍摄的第二图像和所述第一图像进行特征匹配以确定所述拼接角度。
  10. 一种移动路线的处理装置,其特征在于,包括:
    获取设备,用于进行第一移动并确定对应的第一移动路线,以及进行第二移动并确定对应的第二移动路线;
    处理设备,确定第二移动路线的起点在所述第一移动路线上的对应点和拼接角度,根据所述对应点和所述拼接角度对所述第一移动路线和第二移动路线进行拼接,生成拼接路线。
  11. 一种终端,包括:
    至少一个存储器和至少一个处理器;
    其中,所述至少一个存储器用于存储程序代码,所述至少一个处理器用于调用所述至少一个存储器所存储的程序代码执行权利要求1至9中任一项所述的方法。
  12. 一种存储介质,所述存储介质用于存储程序代码,所述程序代码用于执行权利要求1至9中任一项所述的方法。
PCT/CN2020/113999 2020-09-08 2020-09-08 移动路线的处理方法、装置、终端和存储介质 WO2022051899A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202080002510.6A CN112204625B (zh) 2020-09-08 2020-09-08 移动路线的处理方法、装置、终端和存储介质
PCT/CN2020/113999 WO2022051899A1 (zh) 2020-09-08 2020-09-08 移动路线的处理方法、装置、终端和存储介质

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/113999 WO2022051899A1 (zh) 2020-09-08 2020-09-08 移动路线的处理方法、装置、终端和存储介质

Publications (1)

Publication Number Publication Date
WO2022051899A1 true WO2022051899A1 (zh) 2022-03-17

Family

ID=74033860

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/113999 WO2022051899A1 (zh) 2020-09-08 2020-09-08 移动路线的处理方法、装置、终端和存储介质

Country Status (2)

Country Link
CN (1) CN112204625B (zh)
WO (1) WO2022051899A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114945090A (zh) * 2022-04-12 2022-08-26 阿里巴巴达摩院(杭州)科技有限公司 视频生成方法、装置、计算机可读存储介质及计算机设备

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120314015A1 (en) * 2011-06-10 2012-12-13 Microsoft Corporation Techniques for multiple video source stitching in a conference room
CN110231049A (zh) * 2019-07-15 2019-09-13 腾讯科技(深圳)有限公司 导航路线显示方法、装置、终端及存储介质
CN111433809A (zh) * 2020-01-17 2020-07-17 上海亦我信息技术有限公司 行进路线及空间模型生成方法、装置、系统

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110110248B (zh) * 2019-05-20 2021-04-13 徐书诚 一种实现电子地图沿线展示全景图像的计算机系统

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120314015A1 (en) * 2011-06-10 2012-12-13 Microsoft Corporation Techniques for multiple video source stitching in a conference room
CN110231049A (zh) * 2019-07-15 2019-09-13 腾讯科技(深圳)有限公司 导航路线显示方法、装置、终端及存储介质
CN111433809A (zh) * 2020-01-17 2020-07-17 上海亦我信息技术有限公司 行进路线及空间模型生成方法、装置、系统

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114945090A (zh) * 2022-04-12 2022-08-26 阿里巴巴达摩院(杭州)科技有限公司 视频生成方法、装置、计算机可读存储介质及计算机设备

Also Published As

Publication number Publication date
CN112204625B (zh) 2021-08-24
CN112204625A (zh) 2021-01-08

Similar Documents

Publication Publication Date Title
US10834317B2 (en) Connecting and using building data acquired from mobile devices
CN110769240B (zh) 基于拍照的3d建模系统及方法、自动3d建模装置及方法
JP6951595B2 (ja) 住宅のデータ収集およびモデル生成方法
US8488040B2 (en) Mobile and server-side computational photography
JP5659305B2 (ja) 画像生成装置および画像生成方法
US8803992B2 (en) Augmented reality navigation for repeat photography and difference extraction
JP5769813B2 (ja) 画像生成装置および画像生成方法
JP5865388B2 (ja) 画像生成装置および画像生成方法
US11632602B2 (en) Automated determination of image acquisition locations in building interiors using multiple data capture devices
WO2013069047A1 (ja) 画像生成装置および画像生成方法
TW200937348A (en) Calibration method for image capturing device
US20160050349A1 (en) Panoramic video
WO2021190649A1 (en) Method and device for collecting images of a scene for generating virtual reality data
CN108225328A (zh) 一种室内三维数据采集方法
WO2022051899A1 (zh) 移动路线的处理方法、装置、终端和存储介质
CA3069813C (en) Capturing, connecting and using building interior data from mobile devices
CN114529621A (zh) 户型图生成方法、装置、电子设备及介质
CN110191284B (zh) 对房屋进行数据采集的方法、装置、电子设备和存储介质
CN204046707U (zh) 一种便携式场景拍照装置
WO2022036512A1 (zh) 数据处理方法、装置、终端和存储介质
US11645780B2 (en) Method and device for collecting images of a scene for generating virtual reality data
CN111242107B (zh) 用于设置空间中的虚拟对象的方法和电子设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20952688

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20952688

Country of ref document: EP

Kind code of ref document: A1