Scanning processing method, device, electronic device and storage medium
By performing rigid body splicing and non-rigid body verification on the current frame image and historical image data in scanning technology, the problem of scanning accuracy of non-rigid objects is solved, and the accuracy and efficiency of three-dimensional model reconstruction are improved.
Patent Information
- Application Number
- CN202210753949.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-28
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2042-06-28
AI Technical Summary
When existing scanning technology handles non-rigid objects, the real-time scanning results are not accurate enough, which affects the 3D model reconstruction effect.
Rigid body splicing is performed by acquiring the current frame image and historical image data. If the error is less than the preset threshold, non-rigid body verification is performed. After success, it is marked as a valid scanned image to improve the accuracy and reliability of 3D model reconstruction.
It realizes the rapid and effective acquisition of effective scanning images during the real-time scanning process of non-rigid bodies, and improves the accuracy and efficiency of three-dimensional model reconstruction.
Smart Images

Figure CN115115593B
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of scanning technology, and in particular to a scanning processing method, device, electronic device and storage medium. Background Art
[0002] Scanning technology is currently developing rapidly. For example, 3D scanners can realize three-dimensional scanning of objects and are widely used in machinery, medical plastic surgery and other fields.
[0003] In the related art, when scanning, it is assumed that the scanned object is a rigid body, and non-rigid factors are not considered, resulting in inaccurate real-time scanning results, which affects the subsequent three-dimensional model reconstruction effect. Summary of the invention
[0004] In order to solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides a scanning processing method, device, electronic device and storage medium.
[0005] The present disclosure provides a scanning processing method, the method comprising:
[0006] Acquire a current frame image, and rigidly stitch the current frame image and historical image data to obtain a first stitching result;
[0007] When the error of the first splicing result is less than a preset first threshold, performing a non-rigid body check on the current frame image and the historical image data to obtain a check result;
[0008] When the verification result is successful, the current frame image is marked as a valid scan image.
[0009] The present disclosure also provides a scanning processing device, the device comprising:
[0010] A first acquisition module, used to acquire a current frame image;
[0011] A splicing module, used for performing rigid splicing of the current frame image and the historical image data to obtain a first splicing result;
[0012] A first verification module, configured to perform a non-rigid verification on the current frame image and the historical image data to obtain a verification result when an error of the first splicing result is less than a preset first threshold;
[0013] The marking module is used to mark the current frame image as a valid scan image when the verification result is successful.
[0014] An embodiment of the present disclosure also provides an electronic device, which includes: a processor; a memory for storing executable instructions of the processor; the processor is used to read the executable instructions from the memory and execute the instructions to implement the scanning processing method provided by the embodiment of the present disclosure.
[0015] The embodiment of the present disclosure further provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program is used to execute the scanning processing method provided by the embodiment of the present disclosure.
[0016] The technical solution provided by the embodiment of the present disclosure has the following advantages over the prior art: the scanning processing solution provided by the embodiment of the present disclosure obtains the current frame image, rigidly splices the current frame image and the historical image data to obtain a first splicing result, and when the error of the first splicing result is less than a preset first threshold, performs a non-rigid check on the current frame image and the historical image data to obtain a check result, and when the check result is a successful check, marks the current frame image as a valid scan image. By adopting the above technical solution, during the non-rigid real-time scanning process, the current frame image can be non-rigidly checked, and when the check is successful, the current frame image can be marked as a valid scan image, so as to achieve non-rigid scanning at a faster frame rate and efficiency, and subsequent three-dimensional model reconstruction based on the valid scan image, further improving the accuracy and reliability of three-dimensional model reconstruction. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.
[0018] Figure 1 A flowchart of a scanning processing method provided by an embodiment of the present disclosure;
[0019] Figure 2 A flowchart of another scanning processing method provided by an embodiment of the present disclosure;
[0020] Figure 3 A schematic diagram of the structure of a scanning processing device provided by an embodiment of the present disclosure;
[0021] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0022] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0023] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0024] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "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". The relevant definitions of other terms will be given in the following description.
[0025] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0026] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0027] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0028] Figure 1 The present invention provides a flow chart of a scanning processing method provided by an embodiment of the present invention. The method can be executed by a scanning processing device, wherein the device can be implemented by software and / or hardware and can generally be integrated in an electronic device. Figure 1 As shown, the method includes:
[0029] Step 101: obtain a current frame image, and rigidly stitch the current frame image and historical image data to obtain a first stitching result.
[0030] The current frame image refers to the Nth frame image captured by the camera during the real-time scanning process, where N is a positive integer greater than 1, i.e., the current frame image may be the 2nd frame image, the 3rd frame image, etc. The historical image data refers to a frame image that has been effectively scanned before the current frame image is acquired, or an image that has been effectively scanned and spliced from multiple frames of images. For example, the current 3rd frame image indicates that the scanner has captured the 3rd frame image and has determined that two frames of images have been effectively scanned. The image spliced from the previous two frames of images can be selected as the historical image data.
[0031] The first stitching result refers to the result of rigid stitching of the current frame image and the historical image data, which is the stitched image frame, including the overlapping area between the current frame image and the historical image data.
[0032] In the embodiments of the present disclosure, there are many ways to rigidly stitch the current frame image and the historical image data to obtain a first stitching result. In some implementations, the same features between the current frame image and the historical image data are obtained, the overlapping area is determined based on the same features, and the current frame image and the historical image data are rigidly stitched based on the overlapping area to obtain a first stitching result.
[0033] In other embodiments, matching feature point pairs are obtained between the current frame image and historical image data, a transformation matrix is determined based on the matching feature point pairs, the current frame image is transformed based on the transformation matrix and then spliced with the historical image data to obtain a first splicing result.
[0034] The above two methods are merely examples of rigidly stitching the current frame image and historical image data to obtain the first stitching result. The present disclosure does not specifically limit the method of rigidly stitching the current frame image and historical image data to obtain the first stitching result.
[0035] Step 102: When the error of the first splicing result is less than a preset first threshold, a non-rigid body check is performed on the current frame image and the historical image data to obtain a check result.
[0036] The error of the first stitching result refers to the error between the observed position of the same point in the stitched image frame and the observed position in the stitched image frame, that is, the error between the observed positions of the same point in different image frames. The observed position is affected by the position of the image frame and the deformation field.
[0037] In the embodiment of the present disclosure, after obtaining the first stitching result, the error of the first stitching result is calculated, and the error of the first stitching result is compared with the first threshold value. When the error of the first stitching result is less than the preset first threshold value, it is necessary to perform non-rigid body verification on the current frame image and the historical image data. The first threshold value can be selected and set according to the application scenario, such as adjusting the first threshold value based on the accuracy of the scanning device.
[0038] It can be understood that rigid stitching is stitching with overlapping image areas. For example, when the scanned object is a person, when the person breathes, the scanned chest moves, and the overlapping area between the current frame image and its historical image data becomes smaller, so non-rigid verification is required. Therefore, when the error of the first stitching result is less than the preset first threshold, non-rigid verification of the current frame image and the historical image data is required.
[0039] In the disclosed embodiments, non-rigid verification is performed on the current frame image and historical image data, and there are many ways to obtain the verification results. In some implementations, the frame position and / or deformation field corresponding to the current frame image and historical image data are adjusted multiple times. After each adjustment, non-rigid splicing is performed based on the adjusted current frame image and historical image data. If the error of the adjusted splicing result is less than a certain threshold, it indicates that the verification has passed, otherwise the verification is deemed to have failed.
[0040] In other embodiments, the image frame position between the current frame image and the historical image data is adjusted, and rigid body stitching is performed based on the adjusted current frame image and historical image data. If the error of the adjusted stitching result is less than a certain threshold, it indicates that the verification has passed, otherwise the verification is deemed to have failed.
[0041] The above two methods are merely examples of performing non-rigid verification on the current frame image and historical image data to obtain verification results. The embodiments of the present disclosure do not impose specific restrictions on the methods of performing non-rigid verification on the current frame image and historical image data to obtain verification results.
[0042] Step 103: When the verification result is successful, the current frame image is marked as a valid scan image.
[0043] Among them, when the verification result is successful, it means that the current frame image obtained is valid, and the current frame image is further marked as a valid scan image, so that the three-dimensional model can be reconstructed based on the valid scan image later, thereby further improving the accuracy and reliability of the three-dimensional model reconstruction, and improving the scanning effect and efficiency of non-rigid scanning scenes.
[0044] It should be noted that when the error of the first stitching result is greater than or equal to the first threshold or the verification result is a verification failure, it is necessary to further perform matching and other processing based on the features of the current frame image and the global features, so as to further determine whether the current frame image should be retained or discarded, thereby further improving the scanning accuracy.
[0045] The scanning processing scheme provided by the embodiment of the present disclosure obtains the current frame image, rigidly stitches the current frame image and the historical image data to obtain a first stitching result, and when the error of the first stitching result is less than a preset first threshold, performs a non-rigid check on the current frame image and the historical image data to obtain a check result, and when the check result is a successful check, marks the current frame image as a valid scan image. By adopting the above technical scheme, during the non-rigid real-time scanning process, the current frame image can be non-rigidly checked, and when the check is successful, the current frame image can be marked as a valid scan image, so as to realize non-rigid scanning at a faster frame rate and efficiency, and to perform subsequent three-dimensional model reconstruction based on the valid scan image, thereby further improving the accuracy and reliability of three-dimensional model reconstruction.
[0046] Based on the description of the foregoing embodiment, when the error of the first stitching result is greater than or equal to the first threshold or the verification result is a verification failure, it is necessary to further perform matching based on the features of the current frame image and the global features, and how to calculate the global features and optimize the global features to further ensure the scanning efficiency and effect. Figure 2 Describe in detail.
[0047] Figure 2 This is a flow chart of another scanning processing method provided in an embodiment of the present disclosure. Based on the above embodiment, this embodiment further optimizes the above scanning processing method.
[0048] like Figure 2 As shown, the method includes:
[0049] Step 201: Acquire a current frame image, and rigidly stitch the current frame image and historical image data to obtain a first stitching result.
[0050] It should be noted that step 201 is the same as step 101. Please refer to the description of step 101 for details, which will not be described in detail here.
[0051] Step 202: When the error of the first stitching result is less than a preset first threshold, the frame position and deformation field corresponding to the current frame image and the historical image data are adjusted according to a preset number of adjustments. After each adjustment, rigid body stitching is performed based on the adjusted current frame image and historical image data to obtain a second stitching result.
[0052] In the disclosed embodiment, the deformation field is composed of a small number of control points, which are used to control the deformation of the point cloud. The frame image refers to the depth point cloud and landmark points seen by the camera at a certain position, and the texture map in the camera coordinate system. Each frame image contains an independent deformation field. The frame position refers to the six dimensions corresponding to the non-rigid body change (rotation and translation are possible).
[0053] In the embodiment of the present disclosure, the relationship between the image frames can be adjusted by adjusting the frame position and the deformation field, so that the second stitching result is different, wherein the preset number of adjustments can be selected and set according to the needs of the application scenario.
[0054] Specifically, the frame position and deformation field of the current frame image and the historical image data are cyclically optimized for multiple times (because the correspondence between frames will also change after the position and deformation field change; the number of times is a parameter, such as 5 times), if the error of the second stitching result can be reduced to less than a given second threshold, the non-rigid body verification is successful, otherwise the non-rigid body verification fails. The second threshold can be selected and set as needed, such as adjusted according to the accuracy of the scanning device.
[0055] In the embodiment of the present disclosure, the adjusted current frame image and historical image data are rigidly stitched to obtain the second stitching result in the same manner as that of rigidly stitching the current frame image and historical image data to obtain the first stitching result. For details, refer to the specific description of rigidly stitching the current frame image and historical image data to obtain the first stitching result, which will not be described in detail here.
[0056] Step 203: When the error of the second stitching result is less than a preset second threshold, it is determined that the verification is successful, and the current frame image is marked as a valid scan image.
[0057] Step 204: When the error of the second stitching result is greater than or equal to the second threshold, it is determined that the verification fails, and the current frame image is deleted.
[0058] In the embodiment of the present disclosure, when the error of the second stitching result is less than a preset second threshold value, it indicates that the non-rigid body verification is successful, that is, the scanned object is a non-rigid body such as a person. When the person breathes, the scanned chest moves, which will affect the stitching result of the current frame image obtained. Therefore, the non-rigid body verification is successful and the current frame image is marked as a valid scan image.
[0059] In the disclosed embodiment, when the error of the second stitching result is greater than or equal to the second threshold, it indicates that the error of the second stitching result after adjusting the relationship between the image frames is still relatively large, and therefore the verification is determined to have failed, and the current frame image is deleted.
[0060] Step 205: When the error of the first stitching result is greater than or equal to the first threshold or the verification result is a verification failure, obtain the current feature of the current frame image, match the current feature with the preset stored global feature, and obtain a matching result.
[0061] Step 206: When the matching result is successful, obtain multiple frame images that successfully match the current frame image, perform non-rigid body verification on the current frame image and the multiple frame images, and when the verification is successful, mark the current frame image as a valid scan image.
[0062] Step 207: When the matching result is a matching failure, the current frame image is deleted.
[0063] In the disclosed embodiment, the current feature may be a feature calculated from the depth point cloud, landmark points, or texture map of the current frame image, such as three-dimensional coordinates, color information or reflection intensity information in the point cloud feature, features of the landmark points, and features of the texture map, etc. The specific setting may be selected according to the needs of the application scenario.
[0064] In the embodiment of the present disclosure, the global feature refers to a feature set of all frame images that have been marked as scanned images, with redundant features removed.
[0065] In the disclosed embodiment, the current feature of the current frame image is obtained, and the current feature is matched with the preset global feature. When the matching result is a successful match, multiple frames of images that successfully match the current frame image are obtained, and the current frame image and the multiple frames are subjected to non-rigid body verification, and when the verification is successful, the current frame image is marked as a valid scan image. The non-rigid body verification method is the same as the aforementioned non-rigid body verification method for the current frame image and the historical image data. Please refer to the specific description of the non-rigid body verification for the current frame image and the historical image data, which will not be described in detail here.
[0066] Furthermore, when the verification is successful, the current frame image is marked as a valid scan image, and when the matching result is a matching failure, the current frame image is deleted.
[0067] Specifically, during the real-time scanning process, the current frame image is continuously processed with the same scheme. Taking advantage of the continuous movement of the camera, the current frame image and the historical image data are rigidly stitched. If the error of the stitching result is less than the first threshold, the current frame image and the historical image data are non-rigidly checked at the position after rigid stitching. If the non-rigid check passes, the current frame image is tracked successfully and the tracking process ends.
[0068] If the error is greater than or equal to the first threshold or the non-rigid body check fails, the features of the current frame image are calculated and matched with the global features. If the match fails, the current frame image tracking fails and is discarded. If the match succeeds, all frame images that successfully match the current frame image are selected for non-rigid body check. If the non-rigid body check passes, the current frame tracking is successful. If the non-rigid body check fails, the current frame image tracking fails and is discarded.
[0069] After step 203, step 206 or step 207, step 208, step 209 or step 210 may be executed.
[0070] Step 208: Update the global feature based on the current feature to obtain and store the updated global feature.
[0071] In the disclosed embodiment, after the current frame image is marked as a valid scan image, it indicates that the valid scan image has been increased and the global feature needs to be updated. Therefore, the global feature is updated based on the current feature to obtain the updated global feature and store it.
[0072] Specifically, the current feature is integrated into the global feature to obtain an updated global feature. In order to further improve the accuracy of subsequent processing, the updated global feature may be de-redundanted and then stored.
[0073] Step 209, obtain all valid scanned images, perform feature extraction on all valid scanned images to obtain initial global features, perform redundancy removal processing on the initial global features, obtain target global features and store them.
[0074] In the embodiments disclosed herein, all valid scanned images refer to images that have been processed and marked as valid scanned images by all the aforementioned embodiments, and feature extraction is performed on all valid scanned images to obtain initial global features. The initial global features are de-redundanted to obtain target global features and store them for direct call during subsequent matching, thereby further improving the scanning processing efficiency.
[0075] Step 210, obtain all valid scan images, and adjust the frame positions and deformation fields corresponding to all valid scan images so that the error between the observation positions of the same scan position point in different frame images is less than a preset third threshold; wherein the third threshold is less than the first threshold.
[0076] In the embodiment of the present disclosure, the third threshold may be selected and set according to the application scenario.
[0077] Specifically, by adjusting the frame position and deformation field of all currently marked valid scanned images, the error between image frames is made as small as possible, and the problem of inability to loop or loop error caused by deformation and accumulated errors is solved. The role of global feature optimization is to change the position and deformation field of all valid scanned images of frames, which is equivalent to playing the role of a global deformation field.
[0078] The scanning processing scheme provided by the embodiment of the present disclosure obtains a current frame image, rigidly stitches the current frame image and historical image data to obtain a first stitching result, and when the error of the first stitching result is less than a preset first threshold, adjusts the frame position and deformation field corresponding to the current frame image and the historical image data respectively according to a preset number of adjustments, and after each adjustment, rigidly stitches the adjusted current frame image and historical image data to obtain a second stitching result, and when the error of the second stitching result is less than a preset second threshold, determines that the verification is successful, and marks the current frame image as a valid scanned image, and when the error of the second stitching result is greater than or equal to the second threshold, determines that the verification fails, and when the error of the first stitching result is greater than or equal to the first threshold or the verification result is a verification failure, obtains the current feature of the current frame image, and stores the current feature and the preset The global features of the current frame image are matched to obtain a matching result. When the matching result is a successful match, multiple frame images that successfully match the current frame image are obtained, and non-rigid body verification is performed on the current frame image and the multiple frame images. When the verification is successful, the current frame image is marked as a valid scan image. When the matching result is a failed match or the non-rigid body verification of the current frame image and the multiple frame images fails, the current frame image is deleted, all valid scan images are obtained, and feature extraction is performed on all valid scan images to obtain initial global features. The initial global features are deduplicated to obtain target global features and stored, all valid scan images are obtained, and the frame positions and deformation fields corresponding to all valid scan images are adjusted so that the error between the observation positions of the same scan position point in different frame images is less than a preset third threshold; wherein the third threshold is less than the first threshold. In this way, non-rigid body scanning can be performed in real time, and global features can be obtained asynchronously to improve real-time scanning efficiency, and optimization of global features can solve the problem of inability to loop or loop errors caused by deformation and accumulated errors, further improve the scanning processing efficiency and effect, and meet user needs.
[0079] Figure 3 This is a schematic diagram of the structure of a scanning processing device provided by an embodiment of the present disclosure. The device can be implemented by software and / or hardware and can generally be integrated into an electronic device. Figure 3 As shown, the device comprises:
[0080] A first acquisition module 301 is used to acquire a current frame image;
[0081] A stitching module 302 is used to perform rigid stitching on the current frame image and the historical image data to obtain a first stitching result;
[0082] A first verification module 303 is used to perform a non-rigid verification on the current frame image and the historical image data to obtain a verification result when an error of the first splicing result is less than a preset first threshold;
[0083] The marking module 304 is used to mark the current frame image as a valid scan image when the verification result is successful.
[0084] Optionally, the first verification module 303 is specifically used to:
[0085] Respectively adjusting the frame positions and deformation fields corresponding to the current frame image and the historical image data according to a preset number of adjustment times;
[0086] After each adjustment, non-rigid splicing is performed based on the adjusted current frame image and the historical image data to obtain a second splicing result;
[0087] When the error of the second splicing result is less than a preset second threshold, determining that the verification is successful;
[0088] When the error of the second splicing result is greater than or equal to the second threshold, it is determined that the verification has failed.
[0089] Optionally, the device further comprises:
[0090] A second acquisition module, configured to acquire a current feature of the current frame image when an error of the first stitching result is greater than or equal to the first threshold or the verification result is a verification failure;
[0091] A matching module, used for matching the current feature with a preset stored global feature to obtain a matching result;
[0092] A third acquisition module, used for acquiring multiple frames of images that successfully match the current frame image when the matching result is a successful match;
[0093] The second verification module is used to perform non-rigid body verification on the current frame image and the multiple frame images, and when the verification is successful, mark the current frame image as a valid scan image.
[0094] Optionally, the device further includes:
[0095] The deleting module is used to delete the current frame image when the matching result is a matching failure or when the non-rigid body verification of the current frame image and the multiple frame images fails.
[0096] Optionally, the device further includes:
[0097] An updating module is used to update the global feature based on the current feature to obtain and store the updated global feature.
[0098] Optionally, the device further comprises:
[0099] A third acquisition module is used to acquire all valid scan images;
[0100] An extraction module, used for extracting features from all the valid scanned images to obtain initial global features;
[0101] The deduplication module is used to perform deduplication processing on the initial global features to obtain and store target global features.
[0102] Optionally, the device further comprises:
[0103] The fourth acquisition module is used to acquire all valid scan images;
[0104] An adjustment module is used to adjust the frame positions and deformation fields corresponding to all the valid scanned images so that the error between the observation positions of the same scanned position point in different frame images is less than a preset third threshold; wherein the third threshold is less than the first threshold.
[0105] The scanning processing device provided in the embodiments of the present disclosure can execute the scanning processing method provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.
[0106] The embodiments of the present disclosure also provide a computer program product, including a computer program / instruction, which implements the scanning processing method provided by any embodiment of the present disclosure when executed by a processor.
[0107] Figure 4 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Figure 4 , which shows a schematic diagram of the structure of an electronic device 400 suitable for implementing the embodiment of the present disclosure. The electronic device 400 in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 4 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0108] like Figure 4As shown, the electronic device 400 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 401, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 402 or a program loaded from a storage device 408 into a random access memory (RAM) 403. In the RAM 403, various programs and data required for the operation of the electronic device 400 are also stored. The processing device 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.
[0109] Typically, the following devices may be connected to the I / O interface 405: an input device 406 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 407 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 408 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 409. The communication device 409 may allow the electronic device 400 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 4 The electronic device 400 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0110] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 409, or installed from a storage device 408, or installed from a ROM 402. When the computer program is executed by the processing device 401, the above-mentioned functions defined in the scanning processing method of the embodiment of the present disclosure are executed.
[0111] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0112] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (Hyper Text Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0113] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0114] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: obtains a current frame image, rigidly stitches the current frame image and historical image data to obtain a first stitching result, and when an error of the first stitching result is less than a preset first threshold, performs a non-rigid check on the current frame image and the historical image data to obtain a check result, and when the check result is a successful check, marks the current frame image as a valid scanned image.
[0115] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0116] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0117] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, limit the unit itself.
[0118] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0119] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0120] According to one or more embodiments of the present disclosure, the present disclosure provides an electronic device, including:
[0121] processor;
[0122] a memory for storing instructions executable by the processor;
[0123] The processor is used to read the executable instructions from the memory and execute the instructions to implement any scanning processing method provided in the present disclosure.
[0124] According to one or more embodiments of the present disclosure, the present disclosure provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program is used to execute any of the scanning processing methods provided by the present disclosure.
[0125] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other.
[0126] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0127] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.
Claims
1. A scanning processing method, characterized in that: include: Acquire a current frame image, and rigidly stitch the current frame image and historical image data to obtain a first stitching result; wherein the first stitching result is an image frame obtained by rigidly stitching the current frame image and historical image data, and the image frame obtained after stitching includes an overlapping area between the current frame image and the historical image data; When the error of the first stitching result is less than a preset first threshold, a non-rigid body check is performed on the current frame image and the historical image data to obtain a check result; when the check result is a successful check, the current frame image is marked as a valid scan image; wherein the error of the first stitching result is an error between an observed position of an image frame obtained after the stitching and an observed position of an image frame before the stitching of the same point; the non-rigid body check includes multiple adjustments to the frame positions and / or deformation fields corresponding to the current frame image and the historical image data; When the error of the first stitching result is greater than or equal to the first threshold or the verification result is a verification failure, obtaining a current feature of the current frame image; Matching the current feature with the preset stored global feature to obtain a matching result; When the matching result is successful, obtaining multiple frames of images that successfully match the current frame image; Performing a non-rigid body check on the current frame image and the multiple frame images, and marking the current frame image as a valid scan image when the check succeeds; Wherein, the effective scan image is used for three-dimensional model reconstruction.
2. The scanning processing method according to claim 1, characterized in that: The performing non-rigid body verification on the current frame image and the historical image data to obtain a verification result includes: Respectively adjusting the frame positions and deformation fields corresponding to the current frame image and the historical image data according to a preset number of adjustment times; After each adjustment, non-rigid splicing is performed based on the adjusted current frame image and the historical image data to obtain a second splicing result; When the error of the second splicing result is less than a preset second threshold, determining that the verification is successful; When the error of the second splicing result is greater than or equal to the second threshold, it is determined that the verification has failed.
3. The scanning processing method according to claim 1, characterized in that: Also includes: When the matching result is a matching failure or when the non-rigid body verification of the current frame image and the multiple frame images fails, the current frame image is deleted.
4. The scanning processing method according to claim 1, characterized in that: After marking the current frame image as a valid scan image, the method further includes: The global feature is updated based on the current feature to obtain and store the updated global feature.
5. The scanning processing method according to any one of claims 1 to 4, characterized in that: Also includes: Get all valid scan images; Performing feature extraction on all the valid scanned images to obtain initial global features; The initial global features are de-redundanted to obtain target global features and store them.
6. The scanning processing method according to any one of claims 1 to 4, characterized in that: Also includes: Get all valid scan images; The frame positions and deformation fields corresponding to all the valid scanned images are adjusted so that the error between the observation positions of the same scanned position point in different frame images is less than a preset third threshold; wherein the third threshold is less than the first threshold.
7. A scanning processing device, characterized in that: include: A first acquisition module, used to acquire a current frame image; A stitching module, configured to perform rigid stitching on the current frame image and the historical image data to obtain a first stitching result; wherein the first stitching result is an image frame obtained by rigid stitching on the current frame image and the historical image data, and the image frame obtained after stitching includes an overlapping area between the current frame image and the historical image data; A first verification module is used to perform a non-rigid verification on the current frame image and the historical image data to obtain a verification result when the error of the first splicing result is less than a preset first threshold value; a marking module is used to mark the current frame image as a valid scan image when the verification result is successful; wherein the error of the first splicing result is the error between the observed position of the image frame obtained after the splicing and the observed position of the image frame before the splicing of the same point; the non-rigid verification includes multiple adjustments to the frame position and / or deformation field corresponding to the current frame image and the historical image data; A second acquisition module, configured to acquire a current feature of the current frame image when an error of the first stitching result is greater than or equal to the first threshold or the verification result is a verification failure; A matching module, used for matching the current feature with a preset stored global feature to obtain a matching result; A third acquisition module, used for acquiring multiple frames of images that successfully match the current frame image when the matching result is a successful match; A second verification module is used to perform non-rigid body verification on the current frame image and the multiple frame images, and when the verification is successful, mark the current frame image as a valid scan image; Wherein, the effective scan image is used for three-dimensional model reconstruction.
8. An electronic device, characterized in that: The electronic device comprises: processor; a memory for storing instructions executable by the processor; The processor is used to read the executable instructions from the memory and execute the instructions to implement the scanning processing method described in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and the computer program is used to execute the scanning processing method described in any one of claims 1 to 6.
