WO2024001960A1 - 位置调整方法、装置、设备及存储介质 - Google Patents

位置调整方法、装置、设备及存储介质 Download PDF

Info

Publication number
WO2024001960A1
WO2024001960A1 PCT/CN2023/102126 CN2023102126W WO2024001960A1 WO 2024001960 A1 WO2024001960 A1 WO 2024001960A1 CN 2023102126 W CN2023102126 W CN 2023102126W WO 2024001960 A1 WO2024001960 A1 WO 2024001960A1
Authority
WO
WIPO (PCT)
Prior art keywords
feature point
frame
frames
current position
camera
Prior art date
Application number
PCT/CN2023/102126
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 先临三维科技股份有限公司
Publication of WO2024001960A1 publication Critical patent/WO2024001960A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • G06T7/73Determining position or orientation of objects or cameras using feature-based methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/40Analysis of texture
    • G06T7/41Analysis of texture based on statistical description of texture
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • G06T2207/10008Still image; Photographic image from scanner, fax or copier

Definitions

  • the embodiments of the present disclosure relate to the field of three-dimensional scanning technology, and in particular, to a position adjustment method, device, equipment and storage medium.
  • the present disclosure provides a position adjustment method, device, equipment and storage medium.
  • An embodiment of the present disclosure provides a position adjustment method, which method includes:
  • the current position of the camera is adjusted until the global error corresponding to the adjusted current position meets the preset optimization conditions, and the camera is obtained. Adjusted current position.
  • An embodiment of the present disclosure also provides a position adjustment device, which includes:
  • the scanning frame acquisition module is used to acquire all scanning frames collected by the camera in the target scanner at the current position
  • the global error calculation module is used to calculate the global error of all scanning frames at the current position based on the feature point pairs in adjacent scanning frames and the center of gravity point pair in each scanning frame, where the center of gravity point pair includes each scanning frame.
  • the real center of gravity and the theoretical center of gravity obtained through the inertial acquisition unit in the target scanner;
  • the position adjustment module is used to adjust the current position of the camera if the global error does not meet the preset optimization conditions until the global error corresponding to the adjusted current position meets the preset optimization conditions to obtain the adjusted current position of the camera.
  • An embodiment of the present disclosure also provides an electronic device, which includes:
  • processors one or more processors
  • a storage device for storing one or more programs
  • one or more processors When one or more programs are executed by one or more processors, one or more processors are caused to implement the position adjustment method provided in the first aspect.
  • Embodiments of the present disclosure also provide a computer-readable storage medium, the storage medium stores a computer program, and the computer program is used to execute the position adjustment method provided by the embodiments of the present disclosure.
  • the position adjustment method, device, equipment and storage medium obtained all scanning frames collected by the camera in the target scanner at the current position; based on the feature point pairs in adjacent scanning frames and the center of gravity in each scanning frame Point pair, calculate the global error of all scanning frames at the current position, where the center of gravity point pair includes the true center of gravity of each scanning frame and the theoretical center of gravity obtained through the inertial acquisition unit in the target scanner; if the global error does not meet the preset optimization conditions, the current position of the camera is adjusted until the global error corresponding to the adjusted current position meets the preset optimization conditions, and the adjusted current position of the camera is obtained.
  • this adjustment method is consistent with the real scanning situation, therefore, it can ensure the accuracy of the camera position adjustment. .
  • Figure 1 is a schematic flowchart of a position adjustment method in one or more embodiments of the present disclosure
  • Figure 2 is a schematic flowchart of another position adjustment method in one or more embodiments of the present disclosure.
  • Figure 3 is a schematic structural diagram of a position adjustment device in one or more embodiments of the present disclosure.
  • Figure 4 is a schematic structural diagram of an electronic device in one or more embodiments of the present disclosure.
  • Embodiments of the present disclosure provide a position adjustment method, device, equipment and storage medium.
  • the position adjustment method may be executed by an electronic device or a server.
  • electronic devices may include tablets, desktop computers, laptops and other devices with communication functions, and may also include devices simulated by virtual machines or simulators.
  • the server can be a server cluster or a cloud server. This embodiment uses electronic equipment as the execution subject for detailed explanation.
  • Figure 1 shows a schematic flowchart of a position adjustment method provided by an embodiment of the present disclosure.
  • the position adjustment method may include the following steps.
  • the target scanner can scan the object to be scanned, and use the camera to photograph the object to be scanned, and obtain all the scanning frames collected by the camera at the current position, and combine all the frames at the current position.
  • the scanning frame is sent to the electronic device, and the electronic device can obtain all scanning frames at the current location, where each scanning frame includes characteristic information of the object to be scanned.
  • the target scanner may be a handheld scanner, used for mobile scanning of objects to be scanned.
  • the feature information of the scanned object may include landmark point features, texture features, geometric features, etc.
  • the camera may include a black and white camera or a texture camera.
  • the black-and-white camera can be used to collect the geometric features and landmark point features of the scanned object
  • the texture camera can be used to collect texture features to obtain all scanned frames at the current location.
  • the current position refers to the position of the camera where the scan frame is acquired. Specifically, the current position can be used as the preliminary position for position adjustment. If the current position is not suitable, the current position needs to be adjusted to adjust the camera to a standard position, so that a more accurate three-dimensional model can be constructed using the standard position.
  • the electronic device searches for feature point pairs from adjacent scanning frames and searches for centroid point pairs from each scanning frame, and then calculates the global error of all scanning frames based on each feature point pair and each centroid point pair. , so that it can be judged based on the global error whether the current position of the camera is an accurate position. If it is not an accurate position, the current position of the camera needs to be adjusted.
  • the feature point pairs are composed of actual feature points on the scanned object.
  • the feature point pairs may include one or more of landmark point feature point pairs, texture feature point pairs, and geometric feature point pairs.
  • the feature points in the scanning frame may include any one of landmark points, texture feature points, and geometric feature points.
  • the true center of gravity of each scan frame can be determined by the distribution of feature points in the scan frame.
  • the inertial measurement unit can track the pose of the camera in real time, and the pose can be the center of gravity of each scan frame acquired by the camera, that is, the theoretical center of gravity.
  • local errors of feature point pairs in adjacent scanning frames and center-of-gravity point pairs in each scanning frame are calculated respectively, and then the obtained local errors are weighted and summed to obtain the global error of all scanning frames.
  • local errors of feature point pairs in adjacent scanning frames are calculated, and then the local errors are corrected based on the centroid point pair in each scanning frame to obtain the global error of all scanning frames.
  • the local error of the centroid point pair in each scan frame is calculated, and then the local error is corrected based on the feature point pairs in adjacent scan frames to obtain the global error of all scan frames.
  • the global error is calculated by considering the characteristic information of adjacent scanning frames and the center of gravity of each scanning frame, ensuring the calculation accuracy of the global error.
  • the electronic device determines whether the global error meets the preset optimization conditions. If not, the target scanner is continuously adjusted to adjust the current position of the camera until the adjusted current position corresponds to The global error satisfies the preset optimization conditions, and the current position of the camera after adjustment is obtained.
  • the preset optimization condition is a preset condition used to determine whether to adjust the camera position.
  • the preset optimization conditions include: the global error is less than or equal to the preset error The threshold value, and/or, the change value of the global error within the preset adjustment number is less than the preset value.
  • the preset error threshold is a preset error value used to determine whether to adjust the camera position.
  • the preset number of adjustments refers to the number of consecutive adjustments, and the preset value refers to the position change value used to determine whether to adjust the camera position.
  • a position adjustment method in an embodiment of the present disclosure obtains all scan frames collected by the camera in the target scanner at the current position; calculates the current position based on the feature point pairs in adjacent scan frames and the center of gravity point pair in each scan frame The global error of all scanning frames at the location, where the center of gravity point pair includes the true center of gravity of each scanning frame and the theoretical center of gravity obtained through the inertial acquisition unit in the target scanner; if the global error does not meet the preset optimization conditions, then if the global error If the preset optimization conditions are not met, the current position of the camera is adjusted until the global error corresponding to the adjusted current position meets the preset optimization conditions, and the adjusted current position of the camera is obtained.
  • the characteristic information of adjacent scanning frames and the center of gravity of each scanning frame are considered to calculate the global error, and the current position of the camera is adjusted based on the global error.
  • This adjustment method is consistent with the real world Scanning conditions, therefore, can ensure the accuracy of camera position adjustment.
  • the method may also include the following steps:
  • each scanned frame is spliced to generate a three-dimensional model of the target.
  • the adjusted current position of the camera can also refer to the adjusted current position of all scanning frames.
  • position A is the first coordinate data of each scanning frame in the camera coordinate system.
  • Individual scans can be acquired based on the camera in an optimized world coordinate system "position A" at frame time, and splice all scanned frames to obtain the target three-dimensional model.
  • the target three-dimensional model is a virtual model of the scanned object displayed on the electronic device.
  • the adjusted camera position to stitch each scanned frame, a three-dimensional model with higher accuracy can be obtained.
  • the corresponding local errors can be calculated separately based on the feature point pair and the center point pair, and then the two local errors can be fused to obtain the global error of all scanning frames.
  • FIG. 2 shows a schematic flowchart of another position adjustment method provided by an embodiment of the present disclosure.
  • the position adjustment method may include the following steps.
  • S210 is similar to S110 and will not be described in detail here.
  • S220 Calculate the first local error of the feature point pairs in adjacent scanning frames, and calculate the second local error of the center of gravity point pair in each scanning frame, where the center of gravity point pair includes the true center of gravity of each scanning frame and the passing target.
  • the theoretical center of gravity acquired by the inertial acquisition unit in the scanner.
  • the feature point pairs include landmark point feature point pairs, texture feature point pairs, and geometric feature point pairs; accordingly, the calculation method of the first local error specifically includes the following steps:
  • the landmark point feature point pairs are composed of landmark points pre-pasted on the scanned object.
  • the texture feature point pairs are composed of texture feature points on the scanned object.
  • the texture feature can be a color feature.
  • the geometric feature point pairs are composed of geometric feature points on the scanned object.
  • the geometric features may be point cloud features of the scanned object.
  • the first distance, the second distance and the third distance may be the squared Euclidean distance.
  • the first local error is used to characterize the distance between feature point pairs on adjacent scanning frames.
  • the feature point pairs include any one of landmark point feature point pairs, texture feature point pairs, and geometric feature point pairs. Then the distance corresponding to each feature point pair can be calculated, and the calculated distance can be calculated as The first local error.
  • the feature point pairs include any two of landmark feature point pairs, texture feature point pairs, and geometric feature point pairs. Then the distances corresponding to the two feature point pairs can be calculated, and then the two The feature points perform a weighted summation of corresponding distances to obtain the first local error.
  • the calculation method of the second local error specifically includes the following steps:
  • the fourth distance can be the square of the Euclidean distance. It can be understood that due to the low accuracy of the data collected by the IMU, if the fourth distance is small, a smaller weight can be set for the fourth distance, thereby obtaining a smaller second local error, thereby avoiding the impact of the data collected by the IMU Camera position adjustment accuracy.
  • the electronic device can obtain the weights corresponding to the first local error and the second local error respectively, and then perform a weighted sum of the first local error and the second local error according to the respective corresponding weights, and use the weighted summation result as global error.
  • At least one feature point pair and a centroid point pair are used to calculate the distance and fuse the two distances.
  • This calculation method can ensure the calculation accuracy of the global error and at the same time improve Provides flexibility in calculation methods.
  • S240 is similar to S130 and will not be described in detail here.
  • Feature points can be searched for corresponding feature points from another frame in different ways to form feature point pairs in adjacent scanning frames.
  • the feature point pairs include landmark point feature point pairs; accordingly, the determination method of the feature point pairs in adjacent scanning frames includes:
  • the electronic device can use the radius search method, using the landmark point as the center of the circle and the first preset radius as the search range, from the adjacent scanning frames. Search the corresponding landmark point in another frame to obtain the landmark point feature point pair in the adjacent scanning frame.
  • the first preset radius is a search range used for searching for landmark points.
  • the feature point pairs include texture feature point pairs; accordingly, the determination method of the feature point pairs in adjacent scanning frames includes:
  • the electronic device can use the radius search method, using the texture feature point as the center of the circle and the second preset radius as the search range, from the adjacent The corresponding texture feature points are searched in another frame of the scanning frame, thereby obtaining pairs of texture feature points in adjacent scanning frames.
  • the second preset radius is a search range used for searching texture feature points.
  • each texture feature point in one frame and the corresponding texture feature point in the other frame constitute the texture feature point in the adjacent scanning frame. Texture feature point pairs.
  • S2 may specifically include the following steps:
  • the texture feature point pairs in S21 are preliminary feature point pairs.
  • feature similarity is used to characterize the distance of each texture feature point pair.
  • the greater the feature similarity the smaller the distance between each texture feature point pair.
  • the smaller the feature similarity the greater the distance between each texture feature point pair.
  • feature similarity can be Hamming distance, Euclidean distance, etc.
  • the feature point pairs include geometric feature point pairs; accordingly, the determination method of the feature point pairs in adjacent scanning frames includes:
  • the electronic device can use the nearest neighbor search method, with the geometric feature point as the center of the circle, to search for the same geometric feature point in another adjacent scanning frame.
  • the geometric feature point closest to the center of the circle is obtained to obtain the geometric feature point pair in adjacent scanning frames.
  • the position adjustment device may be an electronic device or a server.
  • electronic devices may include tablets, desktop computers, laptops and other devices with communication functions, and may also include devices simulated by virtual machines or simulators.
  • the server can be a server cluster or a cloud server.
  • Figure 3 shows a schematic structural diagram of a position adjustment device provided by an embodiment of the present disclosure.
  • the position adjustment device 300 may include:
  • the scanning frame acquisition module 310 is used to acquire all scanning frames collected by the camera in the target scanner at the current position;
  • the global error calculation module 320 is used to calculate the feature points based on the feature point pairs in adjacent scanning frames and each A center-of-gravity point pair in a scanning frame is used to calculate the global error of all scanning frames at the current position, where the center-of-gravity point pair includes the true center of gravity of each scanning frame and the theoretical center of gravity obtained through the inertial acquisition unit in the target scanner;
  • the position adjustment module 330 is used to adjust the current position of the camera if the global error does not meet the preset optimization conditions until the global error corresponding to the adjusted current position meets the preset optimization conditions to obtain the adjusted current position of the camera.
  • a position adjustment device acquires all scan frames collected by the camera in the target scanner at the current position; calculates the current position based on the feature point pairs in adjacent scan frames and the center of gravity point pair in each scan frame.
  • the characteristic information of adjacent scanning frames and the center of gravity of each scanning frame are considered to calculate the global error, and the camera position is adjusted based on the global error.
  • This adjustment method is consistent with real scanning. situation, therefore, the position adjustment accuracy of the camera can be guaranteed.
  • the global error calculation module 320 may include:
  • a local error calculation unit used to calculate the first local error of the feature point pair in adjacent scanning frames, and calculate the second local error of the center of gravity point pair in each scanning frame;
  • the global error calculation unit is used to perform a weighted sum of the first local error and the second local error to obtain the global error of all scanning frames at the current position.
  • feature point pairs include landmark point feature point pairs, texture feature point pairs, and geometric feature point pairs;
  • the local error calculation unit is specifically configured to calculate the first distance between the landmark point feature point pairs in adjacent scanning frames
  • the first distance, the second distance and the third distance are weighted and summed to obtain the first local error.
  • the local error calculation unit is specifically configured to calculate each Scan the fourth distance of the centroid point pair in the frame to obtain the second local error.
  • the feature point pairs include landmark point feature point pairs
  • the device also includes: a landmark point feature point pair determination module;
  • the landmark point feature point pair determination module is used for each landmark point in one of the adjacent scanning frames to search for the corresponding landmark point from another adjacent scanning frame according to the first preset radius to obtain the corresponding landmark point. Pairs of landmark point feature points in neighboring scan frames.
  • the feature point pairs include texture feature point pairs
  • the device also includes: a texture feature point pair determination module;
  • the texture feature point pair determination module is used to search for each texture feature point in one of the adjacent scanning frames according to the second preset radius for the corresponding texture feature point in another frame of the adjacent scanning frame to obtain Pairs of texture feature points in adjacent scan frames.
  • the texture feature point pair determination module includes:
  • a texture feature point search unit used to obtain multiple texture feature point pairs in the adjacent scan frame if multiple corresponding texture feature points are searched from another frame of the adjacent scan frame;
  • a feature similarity calculation unit is used to calculate feature similarity for each pair of texture feature points in adjacent scanning frames
  • the texture feature point pair determination unit is used to determine the texture feature point pair with the largest feature similarity in the adjacent scanning frames as the final texture feature point pair in the adjacent scanning frames.
  • the feature point pairs include geometric feature point pairs
  • the device also includes: a geometric feature point pair determination module;
  • the geometric feature point pair determination module is used to search for the nearest geometric feature point from another frame of the adjacent scanning frame for each geometric feature point in one of the adjacent scanning frames to obtain the geometric feature point in the adjacent scanning frame. Geometric feature point pairs.
  • the preset optimization conditions include: the global error is less than or equal to the preset error threshold, and/or the change value of the global error within the preset number of adjustments is less than the preset value.
  • the device further includes:
  • the model generation module is used to splice each scanned frame based on the adjusted current position of the camera to generate a three-dimensional model of the target.
  • position adjustment device 300 shown in FIG. 3 can perform the steps of FIGS. 1 to 2
  • the various steps in the method embodiment shown and the various processes and effects in the method embodiment shown in Figures 1 to 2 are achieved and will not be described again here.
  • FIG. 4 shows a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure.
  • the electronic device may include a processor 401 and a memory 402 storing computer program instructions.
  • processor 401 may include a central processing unit (CPU), or an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), or may be configured to implement one or more integrated circuits according to the embodiments of the present application.
  • CPU central processing unit
  • ASIC Application Specific Integrated Circuit
  • Memory 402 may include bulk storage for information or instructions.
  • the memory 402 may include a hard disk drive (HDD), a floppy disk drive, flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a Universal Serial Bus (USB) drive or both. A combination of the above.
  • Memory 402 may include removable or non-removable (or fixed) media, where appropriate.
  • Memory 402 may be internal or external to the integrated gateway device, where appropriate.
  • memory 402 is non-volatile solid-state memory.
  • memory 402 includes read-only memory (ROM).
  • the ROM can be a mask-programmed ROM, programmable ROM (Programmable ROM, PROM), erasable PROM (Electrical Programmable ROM, EPROM), electrically erasable PROM (Electrically Erasable Programmable ROM, EEPROM) ), electrically rewritable ROM (Electrically Alterable ROM, EAROM) or flash memory, or a combination of two or more of these.
  • the processor 401 reads and executes the computer program instructions stored in the memory 402 to execute the steps of the position adjustment method provided by the embodiment of the present disclosure.
  • the electronic device may also include a transceiver 403 and a bus 404.
  • the processor 401, the memory 402 and the transceiver 403 are connected through the bus 404 and complete communication with each other.
  • Bus 404 includes hardware, software, or both.
  • the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side BUS (FSB), an Ultra Hyper Transport, HT) interconnect, Industrial Standard Architecture (Industrial Standard Architecture, ISA) bus, unlimited bandwidth interconnect, Low Pin Count (LPC) bus, memory bus, Micro Channel Architecture (Micro Channel Architecture, MCA) bus, Peripheral Component Interconnect (PCI) bus, PCI-Express (PCI-X) bus, Serial Advanced Technology Attachment (SATA) bus, Video Electronics Standards Association Local Bus , VLB) bus or other suitable bus or a combination of two or more of these.
  • bus 404 may include one or more buses.
  • the following is an example of a computer-readable storage medium provided by an embodiment of the present disclosure.
  • the computer-readable storage medium and the position adjustment method of the above-mentioned embodiments belong to the same inventive concept, and are not detailed in the embodiments of the computer-readable storage medium. For description details, reference may be made to the above embodiments of the position adjustment method.
  • This embodiment provides a storage medium containing computer-executable instructions. When executed by a computer processor, the computer-executable instructions are used to perform a position adjustment method.
  • the method includes:
  • the current position of the camera is adjusted until the global error corresponding to the adjusted current position meets the preset optimization conditions, and the adjusted current position of the camera is obtained.
  • embodiments of the present disclosure provide a storage medium containing computer-executable instructions.
  • the computer-executable instructions are not limited to the above method operations, and can also perform related operations in the position adjustment method provided by any embodiment of the disclosure. .
  • the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk or a read-only memory ( Read-Only Memory (ROM), Random Access Memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions to enable a computer cloud platform (which can be a personal computer, server, or Network cloud platform, etc.) execute the location adjustment method provided by various embodiments of the present disclosure.
  • a computer-readable storage medium such as a computer floppy disk or a read-only memory ( Read-Only Memory (ROM), Random Access Memory (RAM), flash memory (FLASH), hard disk or optical disk, etc.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • FLASH flash memory
  • hard disk or optical disk etc.
  • the position adjustment method provided by the present disclosure takes into account the characteristic information of adjacent scan frames and the center of gravity of each scan frame to calculate the global error, and adjusts the camera position based on the global error, which can ensure that the camera position adjustment accuracy.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Probability & Statistics with Applications (AREA)
  • Image Input (AREA)
  • Image Analysis (AREA)

Abstract

本公开涉及一种位置调整方法、装置、设备及存储介质。获取目标扫描仪中相机在当前位置采集的所有扫描帧;基于相邻扫描帧中的特征点对以及每一扫描帧中的重心点对,计算当前位置处所有扫描帧的全局误差,其中,重心点对包括每一扫描帧的真实重心和通过目标扫描仪中惯性采集单元获取的理论重心;若全局误差不满足预设的优化条件,则调整相机的当前位置,直至调整后的当前位置对应的全局误差满足预设的优化条件,得到相机调整后的当前位置。由此,在进行相机位置调整的过程中,考虑了相邻扫描帧的特征信息以及每一扫描帧的重心来计算全局误差,并基于全局误差调整相机的位置,能够保证相机的位置调整精度。

Description

位置调整方法、装置、设备及存储介质
本公开要求2022年6月30日提交中国专利局、申请号为2022107709988、发明名称为“位置调整方法、装置、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本公开中。
技术领域
本公开实施例涉及三维扫描技术领域,尤其涉及一种位置调整方法、装置、设备及存储介质。
背景技术
在利用扫描仪进行扫描的过程中,需要时刻调整扫描仪中相机的位置,方便后续基于调整后的相机的位置对扫描帧拼接,从而构建出更准确的三维模型,使得调整扫描仪中相机的位置成为扫描过程中一项重要环节。因此,提出一种扫描仪中相机的位置调整方法,是目前亟需解决的技术问题。
发明内容
(一)要解决的技术问题
为了解决上述技术问题,本公开提供了一种位置调整方法、装置、设备及存储介质。
(二)技术方案
本公开实施例提供了一种位置调整方法,所述方法包括:
获取目标扫描仪中相机在当前位置采集的所有扫描帧;
基于相邻扫描帧中的特征点对以及每一扫描帧中的重心点对,计算当前位置处所有扫描帧的全局误差,其中,重心点对包括每一扫描帧的真实重心和通过目标扫描仪中惯性采集单元获取的理论重心;
若全局误差不满足预设的优化条件,则调整相机的当前位置,直至调整后的当前位置对应的全局误差满足预设的优化条件,得到相机 调整后的当前位置。
本公开实施例还提供了一种位置调整装置,所述装置包括:
扫描帧获取模块,用于获取目标扫描仪中相机在当前位置采集的所有扫描帧;
全局误差计算模块,用于基于相邻扫描帧中的特征点对以及每一扫描帧中的重心点对,计算当前位置处所有扫描帧的全局误差,其中,重心点对包括每一扫描帧的真实重心和通过目标扫描仪中惯性采集单元获取的理论重心;
位置调整模块,用于若全局误差不满足预设的优化条件,则调整相机的当前位置,直至调整后的当前位置对应的全局误差满足预设的优化条件,得到相机调整后的当前位置。
本公开实施例还提供了一种电子设备,该设备包括:
一个或多个处理器;
存储装置,用于存储一个或多个程序,
当一个或多个程序被一个或多个处理器执行,使得一个或多个处理器实现第一方面所提供的位置调整方法。
本公开实施例还提供了一种计算机可读存储介质,所述存储介质存储有计算机程序,所述计算机程序用于执行如本公开实施例提供的位置调整方法。
(三)有益效果
本公开实施例提供的上述技术方案与现有技术相比具有如下优点:
本公开实施例提供的位置调整方法、装置、设备及存储介质,获取目标扫描仪中相机在当前位置采集的所有扫描帧;基于相邻扫描帧中的特征点对以及每一扫描帧中的重心点对,计算当前位置处所有扫描帧的全局误差,其中,重心点对包括每一扫描帧的真实重心和通过目标扫描仪中惯性采集单元获取的理论重心;若全局误差不满足预设的优化条件,则调整相机的当前位置,直至调整后的当前位置对应的全局误差满足预设的优化条件,得到相机调整后的当前位置。通过上述方式,在进行相机位置调整的过程中,考虑了相邻扫描帧的特征信息以及每一扫描帧的重心来计算全局误差,并基于全局误差调整相机 的位置,这种调整方式符合真实扫描情况,因此,能够保证相机的位置调整精度。。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理。
为了更清楚地说明本公开实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,对于本领域普通技术人员而言,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1是本公开一个或多个实施例中的一种位置调整方法的流程示意图;
图2是本公开一个或多个实施例中的另一种位置调整方法的流程示意图;
图3是本公开一个或多个实施例中的一种位置调整装置的结构示意图;
图4是本公开一个或多个实施例中的一种电子设备的结构示意图。
具体实施方式
为使本公开实施例的目的、技术方案和优点更加清楚,下面将对本公开实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本公开的一部分实施例,而不是全部的实施例。基于本公开中的实施例,本领域普通技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都属于本公开保护的范围。
本公开实施例提供了一种位置调整方法、装置、设备及存储介质。
下面结合图1至图2对本公开实施例提供的位置调整方法进行说明。在本公开实施例中,该位置调整方法可以由电子设备或服务器执行。其中,电子设备可以包括平板电脑、台式计算机、笔记本电脑等具有通信功能的设备,也可以包括虚拟机或者模拟器模拟的设备。服 务器可以是服务器集群也可以是云服务器。本实施例以电子设备为执行主体进行具体的解释。
图1示出了本公开实施例提供的一种位置调整方法的流程示意图。
如图1所示,该位置调整方法可以包括如下步骤。
S110、获取目标扫描仪中相机在当前位姿采集的所有扫描帧。
实际应用时,在目标扫描仪工作的过程中,目标扫描仪可以向被扫描物进行扫描,并利用相机对被扫描物进行拍摄,得到相机在当前位置采集的所有扫描帧,将当前位置的所有扫描帧发送至电子设备,则电子设备能够获取到当前位置的所有扫描帧,其中,每个扫描帧上包括被扫描物的特征信息。
在本公开实施例中,目标扫描仪可以是一种手持式扫描仪,用于移动式对被扫描物进行扫描。
在本公开实施例中,被扫描物的特征信息可以包括标志点特征、纹理特征、几何特征等。
其中,相机可以包括黑白相机或者纹理相机。其中,黑白相机可以用于采集被扫描物的几何特征和标志点特征,纹理相机可以用于采集纹理特征,从而得到当前位置处的所有扫描帧。
在本公开实施例中,当前位置是指相机的获取扫描帧的位置。具体的,可以将当前位置作为进行位置调整的初步位置,若当前位置不合适,则需要对当前位置进行调整,从而将相机调整至标准位置,便于利用标准的位置构建更准确的三维模型。
S120、基于相邻扫描帧中的特征点对以及每一扫描帧中的重心点对,计算当前位置处所有扫描帧的全局误差,其中,重心点对包括每一扫描帧的真实重心和通过目标扫描仪中惯性采集单元获取的理论重心。
实际应用时,电子设备从相邻扫描帧中搜索特征点对,以及从每一扫描帧中搜索重心点对,然后基于每个特征点对以及每个重心点对来计算所有扫描帧的全局误差,使得基于全局误差判断相机所在的当前位置是否是准确的位置,若不是准确的位置,还需调整相机所在的当前位置。
在本公开实施例中,特征点对由被扫描物上的实际特征点构成。可选的,特征点对可以包括标志点特征点对、纹理特征点对以及几何特征点对中的一种或多种。相应的,该扫描帧中的特征点可以包括标志点、纹理特征点以及几何特征点中的任意一种。
在本公开实施例中,每一扫描帧的真实重心可以由该扫描帧中特征点的分布情况确定。
在本公开实施例中,惯性采集单元(Inertial Measurement Unit,IMU)可以实时跟踪相机的位姿,该位姿可以是相机获取的每一扫描帧的重心,即理论重心。
在一些实施例中,分别计算相邻扫描帧中的特征点对以及每一扫描帧中的重心点对的局部误差,然后对得到的局部误差进行加权求和,得到所有扫描帧的全局误差。
在另一些实施例中,计算相邻扫描帧中的特征点对的局部误差,然后基于每一扫描帧中的重心点对修正局部误差,得到所有扫描帧的全局误差。
在又一些实施例中,计算每一扫描帧中的重心点对的局部误差,然后基于相邻扫描帧中的特征点对修正局部误差,得到所有扫描帧的全局误差。
由此,在本公开实施例中,考虑了相邻扫描帧的特征信息以及每一扫描帧的重心来计算全局误差,保证了全局误差的计算精度。
S130、若全局误差不满足预设的优化条件,则调整相机的当前位置,直至调整后的当前位置对应的全局误差满足预设的优化条件,得到相机调整后的当前位置。
实际应用时,电子设备在得到当前位置对应的全局误差之后,判断全局误差是否满足预设的优化条件,若不满足,则不断调整目标扫描仪调整相机的当前位置,直至调整后的当前位置对应的全局误差满足预设的优化条件,得到相机调整后的当前位置。
在本公开实施例中,预设的优化条件是用于判断是否调整相机位置的预设条件。
具体的,预设的优化条件包括:全局误差小于或等于预设的误差 阈值,和/或,全局误差在预设调整次数内的变化值小于预设值。
其中,预设的误差阈值是预先设置的用于判断是否调整相机位置的误差值。预设调整次数是指连续的调整次数,预设值是指用于判断是否调整相机位置的位置变化值。
本公开实施例的一种位置调整方法,获取目标扫描仪中相机在当前位置采集的所有扫描帧;基于相邻扫描帧中的特征点对以及每一扫描帧中的重心点对,计算当前位置处所有扫描帧的全局误差,其中,重心点对包括每一扫描帧的真实重心和通过目标扫描仪中惯性采集单元获取的理论重心;若全局误差不满足预设的优化条件,则若全局误差不满足预设的优化条件,则调整相机的当前位置,直至调整后的当前位置对应的全局误差满足预设的优化条件,得到相机调整后的当前位置。通过上述方式,在进行相机位置调整的过程中,考虑了相邻扫描帧的特征信息以及每一扫描帧的重心来计算全局误差,并基于全局误差调整相机的当前位置,这种调整方式符合真实扫描情况,因此,能够保证相机的位置调整精度。
进一步的,在得到相机调整后的当前位置之后,该方法还可以包括如下步骤:
基于相机调整后的当前位置,对各扫描帧进行拼接,生成目标三维模型。
需要说明的是,相机调整后的当前位置也可以指调整后的所有扫描帧的当前位置。
在实际场景下,若相机在当前位置采集各个扫描帧时的位置是A,位置A是各个扫描帧在相机坐标系下第一坐标数据,电子设备获取到位置A之后,利用相机坐标系和世界坐标系之间的转换关系,将位置A由相机坐标系转换到世界坐标系下,得到世界坐标系下的相机采集各个扫描帧时的位置A’,其中,A’=A*RT,进一步的,可以基于各个扫描帧的位置A’对各个扫描帧进行拼接,得到一个初始模型。
再基于步骤S120和步骤S130优化后,得到优化后的世界坐标系下的相机采集各个扫描帧时的位置A”,其中,A”=A*RT’或者A”=A’*RT,最后,可以基于优化后的世界坐标系下的相机采集各个扫描 帧时的位置A”,对所有的扫描帧进行拼接,得到目标三维模型。
其中,目标三维模型是在电子设备上展示的被扫描对象的虚拟模型。由此,通过利用位置调整后的相机位置对各个扫描帧进行拼接,从而得到精度较高的三维模型。
在本公开另一种实施方式中,可以根据特征点对和中心点对分别计算对应的局部误差,然后融合两个局部误差,得到所有扫描帧的全局误差。
图2示出了本公开实施例提供的另一种位置调整方法的流程示意图。
如图2所示,该位置调整方法可以包括如下步骤。
S210、获取目标扫描仪中相机在当前位置采集的所有扫描帧。
其中,S210与S110相似,在此不做赘述。
S220、计算相邻扫描帧中特征点对的第一局部误差,以及计算每一扫描帧中的重心点对的第二局部误差,其中,重心点对包括每一扫描帧的真实重心和通过目标扫描仪中惯性采集单元获取的理论重心。
在一些实施例中,特征点对包括标志点特征点对、纹理特征点对以及几何特征点对;相应的,第一局部误差的计算方法具体包括如下步骤:
S2201、计算相邻扫描帧中标志点特征点对的第一距离;
S2202、计算相邻扫描帧中纹理特征点对的第二距离;
S2203、计算相邻扫描帧中几何特征点对的第三距离;
S2204、对第一距离、第二距离以及第三距离进行加权求和,得到第一局部误差。
其中,标志点特征点对由被扫描物上预先粘贴的标志点构成。
其中,纹理特征点对由被扫描物上的纹理特征点构成。可选的,纹理特征可以是颜色特征。
其中,几何特征点对由被扫描物上的几何特征点构成。可选的,几何特征可以是被扫描物的点云特征。
其中,第一距离、第二距离以及第三距离可以是欧几里得距离平方。
其中,第一局部误差用于表征相邻扫描帧上特征点对之间的距离远近。
在另一些实施例中,特征点对包括标志点特征点对、纹理特征点对以及几何特征点对中的任意一种,则可以计算每种特征点对对应的距离,将计算得到的距离作为第一局部误差。
在又一些实施例中,特征点对包括标志点特征点对、纹理特征点对以及几何特征点对中的任意两种,则可以计算这两种特征点对对应的距离,然后将这两种特征点对分别对应的距离进行加权求和,得到第一局部误差。
在本公开实施例中,可选的,第二局部误差的计算方法具体包括如下步骤:
S2205、计算每一扫描帧中的重心点对的第四距离,得到第二局部误差。
其中,第四距可以是欧几里得距离平方。可以理解的是,由于IMU采集的数据精度较低,若第四距离较小,则可以对第四距离设置较小的权重,从而得到较小的第二局部误差,从而避免IMU采集的数据影响相机的位置调整精度。
S230、对第一局部误差和第二局部误差进行加权求和,得到当前位置处所有扫描帧的全局误差。
实际应用时,电子设备可以分别获取第一局部误差和第二局部误差分别对应的权重,然后根据各自对应的权重对第一局部误差和第二局部误差进行加权求和,将加权求和结果作为全局误差。
由此,在本公开实施例中,在计算全局误差时,利用至少一种特征点对以及重心点对进行距离计算并融合两个距离,这种计算方式能够保证全局误差的计算精度,同时提高了计算方式的灵活性。
S240、若全局误差不满足预设的优化条件,则调整相机的当前位置,直至调整后的当前位置对应的全局误差满足预设的优化条件,得到相机调整后的当前位置。
其中,S240与S130相似,在此不做赘述。
在本公开又一种实施方式中,针对相邻扫描帧的其中一帧内的特 征点,可以采用不同方式从另一帧内搜索对应的特征点,来构成相邻扫描帧中的特征点对。
在本公开一些实施例中,特征点对包括标志点特征点对;相应地,相邻扫描帧中的特征点对的确定方式,包括:
S1、针对相邻扫描帧的其中一帧内的每个标志点,根据第一预设半径从相邻扫描帧的另一帧内搜索对应的标志点,得到相邻扫描帧中的特征点对。
实际应用时,针对相邻扫描帧的其中一帧内的每个标志点,电子设备可以通过半径搜索方式,以该标志点为圆心,以第一预设半径为搜索范围,从相邻扫描帧的另一帧内搜索对应的标志点,从而得到相邻扫描帧中的标志点特征点对。
其中,第一预设半径是用于进行标志点搜索的搜索范围。
在本公开另一些实施例中,特征点对包括纹理特征点对;相应地,相邻扫描帧中的特征点对的确定方式,包括:
S2、针对相邻扫描帧的其中一帧内的每个纹理特征点,根据第二预设半径从相邻扫描帧的另一帧内搜索对应的纹理特征点,得到相邻扫描帧中的纹理特征点对。
实际应用时,针对相邻扫描帧的其中一帧内的每个纹理特征点,电子设备可以通过半径搜索方式,以该纹理特征点为圆心,以第二预设半径为搜索范围,从相邻扫描帧的另一帧内搜索对应的纹理特征点,从而得到相邻扫描帧中的纹理特征点对。
其中,第二预设半径是用于进行纹理特征点搜索的搜索范围。
在一些实施例中,若从另一帧内搜索到一个纹理特征点,则由其中一帧内的每个纹理特征点及另一帧内对应的一个纹理特征点,构成相邻扫描帧中的纹理特征点对。
在另一些实施例中,若从另一帧内搜索到多个纹理特征点,则从另一帧内寻找最相似的纹理特征点,构成相邻扫描帧中的纹理特征点对。针对这种情况,S2具体可以包括如下步骤:
S21、若从相邻扫描帧的另一帧内搜索到多个对应的纹理特征点,得到相邻扫描帧中的多个纹理特征点对;
S22、对相邻扫描帧中的每个纹理特征点对计算特征相似度;
S23、将相邻扫描帧中的特征相似度最大的纹理特征点对,作为相邻扫描帧中最终的纹理特征点对。
其中,S21中的纹理特征点对是初步得出的特征点对。
其中,特征相似度用于表征每个纹理特征点对的距离。特征相似度越大,每个纹理特征点对的距离越小,相反的,特征相似度越小,每个纹理特征点对的距离越大。
可选的,特征相似度可以是汉明距离、欧式距离等。
在本公开又一些实施例中,特征点对包括几何特征点对;相应地,相邻扫描帧中的特征点对的确定方式,包括:
S3、针对相邻扫描帧的其中一帧内的每个几何特征点,从相邻扫描帧的另一帧中搜索距离最近的几何特征点,得到相邻扫描帧中的几何特征点对。
实际应用时,针对相邻扫描帧的其中一帧内的每个几何特征点,电子设备可以通过最近邻搜索方式,以该几何特征点为圆心,从相邻扫描帧的另一帧内搜索与圆心最近的几何特征点,从而得到相邻扫描帧中的几何特征点对。
由此,在本公开实施例中,对于不同的特征点,能够采用不同方式从另一帧内搜索对应的特征点,来构成相邻扫描帧中的特征点对,保证各种特征点对确定方式符合实际情况。
本公开实施例还提供了一种用于实现上述的位置调整方法的位置调整装置,下面结合图3进行说明。在本公开实施例中,该位置调整装置可以为电子设备或服务器。其中,电子设备可以包括平板电脑、台式计算机、笔记本电脑等具有通信功能的设备,也可以包括虚拟机或者模拟器模拟的设备。服务器可以是服务器集群或者云服务器。
图3示出了本公开实施例提供的一种位置调整装置的结构示意图。
如图3所示,位置调整装置300可以包括:
扫描帧获取模块310,用于获取目标扫描仪中相机在当前位置采集的所有扫描帧;
全局误差计算模块320,用于基于相邻扫描帧中的特征点对以及每 一扫描帧中的重心点对,计算当前位置处所有扫描帧的全局误差,其中,重心点对包括每一扫描帧的真实重心和通过目标扫描仪中惯性采集单元获取的理论重心;
位置调整模块330,用于若全局误差不满足预设的优化条件,则调整相机的当前位置,直至调整后的当前位置对应的全局误差满足预设的优化条件,得到相机调整后的当前位置。
本公开实施例的一种位置调整装置,获取目标扫描仪中相机在当前位置采集的所有扫描帧;基于相邻扫描帧中的特征点对以及每一扫描帧中的重心点对,计算当前位置处所有扫描帧的全局误差,其中,重心点对包括每一扫描帧的真实重心和通过目标扫描仪中惯性采集单元获取的理论重心;若全局误差不满足预设的优化条件,则调整相机的当前位置,直至调整后的当前位置对应的全局误差满足预设的优化条件,得到相机调整后的当前位置。通过上述方式,在进行相机位置调整的过程中,考虑了相邻扫描帧的特征信息以及每一扫描帧的重心来计算全局误差,并基于全局误差调整相机的位置,这种调整方式符合真实扫描情况,因此,能够保证相机的位置调整精度。
在本公开一些实施例中,全局误差计算模块320,可以包括:
局部误差计算单元,用于计算相邻扫描帧中特征点对的第一局部误差,以及计算每一扫描帧中的重心点对的第二局部误差;
全局误差计算单元,用于对第一局部误差和第二局部误差进行加权求和,得到当前位置处所有扫描帧的全局误差。
在本公开一些实施例中,特征点对包括标志点特征点对、纹理特征点对以及几何特征点对;
相应地,局部误差计算单元具体用于,计算相邻扫描帧中标志点特征点对的第一距离;
计算相邻扫描帧中纹理特征点对的第二距离;
计算相邻扫描帧中几何特征点对的第三距离;
对第一距离、第二距离以及第三距离进行加权求和,得到第一局部误差。
在本公开一些实施例中,局部误差计算单元具体用于,计算每一 扫描帧中的重心点对的第四距离,得到第二局部误差。
在本公开一些实施例中,特征点对包括标志点特征点对;
相应地,该装置还包括:标志点特征点对确定模块;
标志点特征点对确定模块,用于针对相邻扫描帧的其中一帧内的每个标志点,根据第一预设半径从相邻扫描帧的另一帧内搜索对应的标志点,得到相邻扫描帧中的标志点特征点对。
在本公开一些实施例中,特征点对包括纹理特征点对;
相应地,该装置还包括:纹理特征点对确定模块;
纹理特征点对确定模块,用于针对相邻扫描帧的其中一帧内的每个纹理特征点,根据第二预设半径从相邻扫描帧的另一帧内搜索对应的纹理特征点,得到相邻扫描帧中的纹理特征点对。
在本公开一些实施例中,纹理特征点对确定模块,包括:
纹理特征点搜索单元,用于若从相邻扫描帧的另一帧内搜索到多个对应的纹理特征点,得到相邻扫描帧中的多个纹理特征点对;
特征相似度计算单元,用于对相邻扫描帧中的每个纹理特征点对计算特征相似度;
纹理特征点对确定单元,用于将相邻扫描帧中的特征相似度最大的纹理特征点对,作为相邻扫描帧中最终的纹理特征点对。
在本公开一些实施例中,特征点对包括几何特征点对;
相应地,该装置还包括:几何特征点对确定模块;
几何特征点对确定模块,用于针对相邻扫描帧的其中一帧内的每个几何特征点,从相邻扫描帧的另一帧中搜索距离最近的几何特征点,得到相邻扫描帧中的几何特征点对。
在本公开一些实施例中,预设的优化条件包括:全局误差小于或等于预设的误差阈值,和/或,全局误差在预设调整次数内的变化值小于预设值。
在本公开一些实施例中,该装置还包括:
模型生成模块,用于基于相机调整后的当前位置,对各扫描帧进行拼接,生成目标三维模型。
需要说明的是,图3所示的位置调整装置300可以执行图1至图2 所示的方法实施例中的各个步骤,并且实现图1至图2所示的方法实施例中的各个过程和效果,在此不做赘述。
图4示出了本公开实施例提供的一种电子设备的结构示意图。
如图4所示,该电子设备可以包括处理器401以及存储有计算机程序指令的存储器402。
具体地,上述处理器401可以包括中央处理器(CPU),或者特定集成电路(Application Specific Integrated Circuit,ASIC),或者可以被配置成实施本申请实施例的一个或多个集成电路。
存储器402可以包括用于信息或指令的大容量存储器。举例来说而非限制,存储器402可以包括硬盘驱动器(Hard Disk Drive,HDD)、软盘驱动器、闪存、光盘、磁光盘、磁带或通用串行总线(Universal Serial Bus,USB)驱动器或者两个及其以上这些的组合。在合适的情况下,存储器402可包括可移除或不可移除(或固定)的介质。在合适的情况下,存储器402可在综合网关设备的内部或外部。在特定实施例中,存储器402是非易失性固态存储器。在特定实施例中,存储器402包括只读存储器(Read-Only Memory,ROM)。在合适的情况下,该ROM可以是掩模编程的ROM、可编程ROM(Programmable ROM,PROM)、可擦除PROM(Electrical Programmable ROM,EPROM)、电可擦除PROM(Electrically Erasable Programmable ROM,EEPROM)、电可改写ROM(Electrically Alterable ROM,EAROM)或闪存,或者两个或及其以上这些的组合。
处理器401通过读取并执行存储器402中存储的计算机程序指令,以执行本公开实施例所提供的位置调整方法的步骤。
在一个示例中,该电子设备还可包括收发器403和总线404。其中,如图4所示,处理器401、存储器402和收发器403通过总线404连接并完成相互间的通信。
总线404包括硬件、软件或两者。举例来说而非限制,总线可包括加速图形端口(Accelerated Graphics Port,AGP)或其他图形总线、增强工业标准架构(Extended Industry Standard Architecture,EISA)总线、前端总线(Front Side BUS,FSB)、超传输(Hyper Transport, HT)互连、工业标准架构(Industrial Standard Architecture,ISA)总线、无限带宽互连、低引脚数(Low Pin Count,LPC)总线、存储器总线、微信道架构(Micro Channel Architecture,MCA)总线、外围控件互连(Peripheral Component Interconnect,PCI)总线、PCI-Express(PCI-X)总线、串行高级技术附件(Serial Advanced Technology Attachment,SATA)总线、视频电子标准协会局部(Video Electronics Standards Association Local Bus,VLB)总线或其他合适的总线或者两个或更多个以上这些的组合。在合适的情况下,总线404可包括一个或多个总线。尽管本申请实施例描述和示出了特定的总线,但本申请考虑任何合适的总线或互连。
以下是本公开实施例提供的计算机可读存储介质的实施例,该计算机可读存储介质与上述各实施例的位置调整方法属于同一个发明构思,在计算机可读存储介质的实施例中未详尽描述的细节内容,可以参考上述位置调整方法的实施例。
本实施例提供一种包含计算机可执行指令的存储介质,计算机可执行指令在由计算机处理器执行时用于执行一种位置调整方法,该方法包括:
获取目标扫描仪中相机在当前位置采集的所有扫描帧;
基于相邻扫描帧中的特征点对以及每一扫描帧中的重心点对,计算当前位置处所有扫描帧的全局误差,其中,重心点对包括每一扫描帧的真实重心和通过目标扫描仪中惯性采集单元获取的理论重心;
若全局误差不满足预设的优化条件,则调整相机的当前位置,直至调整后的当前位置对应的全局误差满足预设的优化条件,得到相机调整后的当前位置。
当然,本公开实施例所提供的一种包含计算机可执行指令的存储介质,其计算机可执行指令不限于如上的方法操作,还可以执行本公开任意实施例所提供的位置调整方法中的相关操作。
通过以上关于实施方式的描述,所属领域的技术人员可以清楚地了解到,本公开可借助软件及必需的通用硬件来实现,当然也可以通过硬件实现,但很多情况下前者是更佳的实施方式。基于这样的理解, 本公开的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如计算机的软盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、闪存(FLASH)、硬盘或光盘等,包括若干指令用以使得一台计算机云平台(可以是个人计算机,服务器,或者网络云平台等)执行本公开各个实施例所提供的位置调整方法。
注意,上述仅为本公开的较佳实施例及所运用技术原理。本领域技术人员会理解,本公开不限于这里的特定实施例,对本领域技术人员来说能够进行各种明显的变化、重新调整和替代而不会脱离本公开的保护范围。因此,虽然通过以上实施例对本公开进行了较为详细的说明,但是本公开不仅仅限于以上实施例,在不脱离本公开构思的情况下,还可以包括更多其他等效实施例,而本公开的范围由所附的权利要求范围决定。
工业实用性
本公开提供的位置调整方法,在进行相机位置调整的过程中,考虑了相邻扫描帧的特征信息以及每一扫描帧的重心来计算全局误差,并基于全局误差调整相机的位置,能够保证相机的位置调整精度。

Claims (13)

  1. 一种位置调整方法,其特征在于,包括:
    获取目标扫描仪中相机在当前位置采集的所有扫描帧;
    基于相邻所述扫描帧中的特征点对以及每一所述扫描帧中的重心点对,计算所述当前位置处所有所述扫描帧的全局误差,其中,所述重心点对包括每一所述扫描帧的真实重心和通过所述目标扫描仪中惯性采集单元获取的理论重心;
    若所述全局误差不满足预设的优化条件,则调整所述相机的当前位置,直至调整后的当前位置对应的全局误差满足所述预设的优化条件,得到所述相机调整后的当前位置。
  2. 根据权利要求1所述的方法,其特征在于,所述基于相邻所述扫描帧中的特征点对以及每一所述扫描帧中的重心点对,计算所述当前位置处所有所述扫描帧的全局误差,包括:
    计算相邻所述扫描帧中所述特征点对的第一局部误差,以及计算每一所述扫描帧中的重心点对的第二局部误差;
    对所述第一局部误差和所述第二局部误差进行加权求和,得到所述当前位置处所有所述扫描帧的全局误差。
  3. 根据权利要求2所述的方法,其特征在于,所述特征点对包括标志点特征点对、纹理特征点对以及几何特征点对;
    相应地,所述计算相邻所述扫描帧中所述特征点对的第一局部误差,包括:
    计算相邻所述扫描帧中所述标志点特征点对的第一距离;
    计算相邻所述扫描帧中所述纹理特征点对的第二距离;
    计算相邻所述扫描帧中所述几何特征点对的第三距离;
    对所述第一距离、所述第二距离以及所述第三距离进行加权求和, 得到所述第一局部误差。
  4. 根据权利要求2所述的方法,其特征在于,所述计算每一所述扫描帧中的重心点对的第二局部误差,包括:
    计算每一所述扫描帧中的重心点对的第四距离,得到所述第二局部误差。
  5. 根据权利要求1所述的方法,其特征在于,所述特征点对包括标志点特征点对;
    相应地,相邻所述扫描帧中的特征点对的确定方式,包括:
    针对相邻所述扫描帧的其中一帧内的每个标志点,根据第一预设半径从相邻所述扫描帧的另一帧内搜索对应的标志点,得到相邻所述扫描帧中的标志点特征点对。
  6. 根据权利要求1所述的方法,其特征在于,所述特征点对包括纹理特征点对;
    相应地,相邻所述扫描帧中的特征点对的确定方式,包括:
    针对相邻所述扫描帧的其中一帧内的每个纹理特征点,根据第二预设半径从相邻所述扫描帧的另一帧内搜索对应的纹理特征点,得到相邻所述扫描帧中的纹理特征点对。
  7. 根据权利要求6所述的方法,其特征在于,所述针对相邻所述扫描帧的其中一帧内的每个纹理特征点,根据第二预设半径从相邻所述扫描帧的另一帧内搜索对应的纹理特征点,得到相邻所述扫描帧中的纹理特征点对,包括:
    若从相邻所述扫描帧的另一帧内搜索到多个对应的纹理特征点,得到相邻所述扫描帧中的多个纹理特征点对;
    对相邻所述扫描帧中的每个纹理特征点对计算特征相似度;
    将相邻所述扫描帧中的特征相似度最大的纹理特征点对,作为相邻所述扫描帧中最终的纹理特征点对。
  8. 根据权利要求1所述的方法,其特征在于,所述特征点对包括几何特征点对;
    相应地,相邻所述扫描帧中的特征点对的确定方式,包括:
    针对相邻所述扫描帧的其中一帧内的每个几何特征点,从相邻所述扫描帧的另一帧中搜索距离最近的几何特征点,得到相邻所述扫描帧中的几何特征点对。
  9. 根据权利要求1所述的方法,其特征在于,所述预设的优化条件包括:所述全局误差小于或等于预设的误差阈值,和/或,所述全局误差在预设调整次数内的变化值小于预设值。
  10. 根据权利要求1~9任一项所述的方法,其特征在于,还包括:
    基于所述相机调整后的当前位置,对各所述扫描帧进行拼接,生成目标三维模型。
  11. 一种位置调整装置,其特征在于,包括:
    扫描帧获取模块,用于获取目标扫描仪中相机在当前位置采集的所有扫描帧;
    全局误差计算模块,用于基于相邻所述扫描帧中的特征点对以及每一所述扫描帧中的重心点对,计算所述当前位置处所有所述扫描帧的全局误差,其中,所述重心点对包括每一所述扫描帧的真实重心和通过所述目标扫描仪中惯性采集单元获取的理论重心;
    位置调整模块,用于若所述全局误差不满足预设的优化条件,则调整所述相机的当前位置,直至调整后的当前位置对应的全局误差满足所述预设的优化条件,得到所述相机调整后的当前位置。
  12. 一种电子设备,其特征在于,包括:
    处理器;
    存储器,用于存储可执行指令;
    其中,所述处理器用于从所述存储器中读取所述可执行指令,并 执行所述可执行指令以实现上述权利要求1-10中任一项所述的方法。
  13. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述存储介质存储有计算机程序,当所述计算机程序被处理器执行时,使得处理器实现上述权利要求1-10中任一项所述的方法。
PCT/CN2023/102126 2022-06-30 2023-06-25 位置调整方法、装置、设备及存储介质 WO2024001960A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210770998.8 2022-06-30
CN202210770998.8A CN115187664A (zh) 2022-06-30 2022-06-30 位置调整方法、装置、设备及存储介质

Publications (1)

Publication Number Publication Date
WO2024001960A1 true WO2024001960A1 (zh) 2024-01-04

Family

ID=83515885

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/102126 WO2024001960A1 (zh) 2022-06-30 2023-06-25 位置调整方法、装置、设备及存储介质

Country Status (2)

Country Link
CN (1) CN115187664A (zh)
WO (1) WO2024001960A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115187664A (zh) * 2022-06-30 2022-10-14 先临三维科技股份有限公司 位置调整方法、装置、设备及存储介质
CN118071941A (zh) * 2024-04-24 2024-05-24 先临三维科技股份有限公司 三维扫描方法、装置、设备及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120195523A1 (en) * 2011-01-27 2012-08-02 Guoyi Fu System And Method For Real-Time Image Retensioning And Loop Error Correction
CN106651942A (zh) * 2016-09-29 2017-05-10 苏州中科广视文化科技有限公司 基于特征点的三维旋转运动检测与旋转轴定位方法
CN113313763A (zh) * 2021-05-26 2021-08-27 珠海深圳清华大学研究院创新中心 一种基于神经网络的单目相机位姿优化方法及装置
CN115187664A (zh) * 2022-06-30 2022-10-14 先临三维科技股份有限公司 位置调整方法、装置、设备及存储介质

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120195523A1 (en) * 2011-01-27 2012-08-02 Guoyi Fu System And Method For Real-Time Image Retensioning And Loop Error Correction
CN106651942A (zh) * 2016-09-29 2017-05-10 苏州中科广视文化科技有限公司 基于特征点的三维旋转运动检测与旋转轴定位方法
CN113313763A (zh) * 2021-05-26 2021-08-27 珠海深圳清华大学研究院创新中心 一种基于神经网络的单目相机位姿优化方法及装置
CN115187664A (zh) * 2022-06-30 2022-10-14 先临三维科技股份有限公司 位置调整方法、装置、设备及存储介质

Also Published As

Publication number Publication date
CN115187664A (zh) 2022-10-14

Similar Documents

Publication Publication Date Title
WO2024001960A1 (zh) 位置调整方法、装置、设备及存储介质
US10455152B2 (en) Panoramic video processing method and device and non-transitory computer-readable medium
CN112733820B (zh) 障碍物信息生成方法、装置、电子设备和计算机可读介质
CN105744138B (zh) 快速对焦方法和电子设备
CN108010059B (zh) 电子防抖算法的性能分析方法及装置
WO2024001916A1 (zh) 扫描仪姿态定位方法、装置、设备及存储介质
WO2020253616A1 (zh) 音频采集设备定位方法及装置、说话人识别方法及系统
CN111222509B (zh) 目标检测方法、装置及电子设备
CN115205925A (zh) 表情系数确定方法、装置、电子设备及存储介质
CN111881740B (zh) 人脸识别方法、装置、电子设备及介质
CN111986214A (zh) 一种地图中人行横道的构建方法和电子设备
CN114627244A (zh) 三维重建方法及装置、电子设备、计算机可读介质
CN110782472B (zh) 点云地面点的识别方法及装置
CN111210506A (zh) 一种三维还原方法、系统、终端设备和存储介质
WO2023103285A1 (zh) 定位方法、装置、机器人及计算机可读存储介质
WO2024056030A1 (zh) 一种图像深度估计方法、装置、电子设备及存储介质
CN110097061B (zh) 一种图像显示方法及装置
WO2023237065A1 (zh) 回环检测方法、装置、电子设备及介质
CN110781809A (zh) 基于注册特征更新的识别方法、装置及电子设备
CN115144843A (zh) 一种物体位置的融合方法及装置
US11315265B2 (en) Fingertip detection method, fingertip detection device, and medium
CN113887290A (zh) 单目3d检测方法、装置、电子设备及存储介质
WO2023207360A1 (zh) 图像分割方法、装置、电子设备及存储介质
CN113657311B (zh) 识别区域排序方法、系统、电子设备及存储介质
WO2023179523A1 (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: 23830138

Country of ref document: EP

Kind code of ref document: A1