Intelligent measurement method based on AR and multiple semantic segmentation
Through AR and multiple semantic segmentation technologies, the problems of low object measurement efficiency and low accuracy in the existing technology are solved, and automatic acquisition of measurement points and accurate measurement are realized, which is suitable for a wide range of applications.
Patent Information
- Application Number
- CN202110144487.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-02-02
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2041-02-02
AI Technical Summary
Existing object measurement methods based on computer vision are inefficient and inaccurate, and require fixed camera positions and complex image acquisition processes. Manual selection of measurement points is easily affected by the surrounding environment, resulting in inaccurate measurement results.
Using an intelligent measurement method based on AR and multiple semantic segmentation, multiple images are obtained by shaking the camera slightly, and AR modeling and semantic segmentation technology are used to obtain the plane mapping and measurement points of the object, automatically eliminating surrounding interference, and realizing automatic acquisition and measurement points. Measure accurately.
It achieves object measurement with simple operation, low cost and high efficiency, avoids fixed camera position and complex image acquisition process, makes the measurement points more accurate, and is suitable for large-scale applications.
Smart Images

Figure CN112862776B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of augmented reality and computer vision technology, and in particular to an intelligent measurement method based on AR and multiple semantic segmentation. Background Art
[0002] In production and life, it is often necessary to measure the length and area of real objects. There are two main existing measurement methods: manual measurement and instrument measurement. Manual measurement mainly uses tape measures and rulers for manual measurement, which is time-consuming, labor-intensive and inefficient; instrument measurement uses laser scanners, ultrasonic technology, etc., which are highly accurate, but the equipment is expensive and not conducive to large-scale application. At present, there are also computer vision methods for measurement, which have the advantages of simple operation and labor saving.
[0003] Existing object measurement methods based on computer vision usually require the camera to be placed in a fixed position, and to capture and collect image data at irregular intervals for estimation. When collecting image data, it is necessary to shoot from multiple angles, collect photos of the object from various angles, and construct a three-dimensional image. The image acquisition process is time-consuming, and it is necessary to shoot all-round and multi-angle images of the object, and then obtain the size of the measured object through post-image processing. The requirements for the collected images are high, and the calculation process is complicated. Therefore, the measurement efficiency is low, the accuracy is not high, the measurement speed is slow, and there are certain errors.
[0004] AR (Augmented Reality) is a new technology that integrates and superimposes real-world information and virtual-world information. It uses computer technology to simulate and superimpose physical information (such as vision, hearing, touch, etc.) that is difficult to experience within a certain time and space range in the real world, and applies virtual information to the real world, which is perceived by human senses, thereby achieving a sensory experience beyond reality. AR technology can fully display the information of the real world. At present, there are measurement methods combined with AR technology. This method requires the camera to manually select the points to be measured on the screen after modeling is completed, and then display the distance between the points to be measured. Since the screen size is generally not very large, the manual selection of the points to be measured is easily affected by the surrounding environment. In addition, the different clicking habits of each person will further aggravate the inaccuracy of the measurement results. Summary of the invention
[0005] In view of the deficiencies in the prior art, the present invention provides an intelligent measurement method based on AR and multiple semantic segmentation, which adopts the multiple semantic segmentation method to obtain the measurement points of the object, eliminates the interference of the surrounding environment, and automatically realizes the automatic acquisition of measurement points. Moreover, the measurement points obtained by multiple segmentations are more accurate than those selected manually.
[0006] To achieve the above object, the present invention adopts the following technical solutions:
[0007] An intelligent measurement method based on AR and multiple semantic segmentation, the intelligent measurement method comprising the following steps:
[0008] S1, taking a certain amount of images of the area to be measured including the object to be measured, and using an AR modeling method to obtain a plane mapping G (x, y, z) of the image of the area to be measured;
[0009] S2, performing abnormality detection on the acquired image of the area to be tested and removing the interfering image;
[0010] S3, performing a first round of semantic segmentation on the image of the area to be measured after the anomaly detection process, to obtain a local image of the object to be measured;
[0011] S4, performing a second round of semantic segmentation on the local image of the object to be measured obtained in step S3, obtaining a semantic entity in the area where the measuring point is located, and then normalizing the obtained semantic entity to obtain a two-dimensional coordinate P (x, y) of the point to be measured;
[0012] S5, combining the plane mapping G(x, y, z) of the image of the area to be measured obtained in step S1, and obtaining the size parameters of the object to be measured according to the two-dimensional coordinates P(x, y) of the point to be measured.
[0013] To optimize the above technical solutions, the specific measures taken also include:
[0014] Furthermore, in step S1, a certain amount of images of the area to be measured including the object to be measured are obtained by shaking the camera.
[0015] Furthermore, in step S1, the process of obtaining the plane mapping G(x, y, z) of the image of the area to be measured by using the AR modeling method includes the following steps:
[0016] S11, extract multiple features of each image and match the same features in different images;
[0017] S12, combining the measurement results of the camera attitude sensor, triangulating each feature, comparing the difference relationship between each feature and other features in the image, and generating a plane mapping G(x, y, z).
[0018] Furthermore, in step S2, the object to be measured in the image is detected using target detection technology, the target image is classified, and whether the current image is abnormal is analyzed based on the integrity, placement characteristics and background interference of the object to be measured in the image.
[0019] Furthermore, in step S3, the process of performing a first round of semantic segmentation on the image of the area to be measured after the abnormality detection process to obtain a local image of the object to be measured includes the following steps:
[0020] S31, performing semantic segmentation on the image of the area to be tested to obtain all semantic entities in the image;
[0021] S32, selecting a semantic entity of the object to be measured, and capturing a local image according to the minimum circumscribed rectangle of the semantic entity.
[0022] Furthermore, in step S3, the process of performing a first round of semantic segmentation on the image of the area to be measured after the abnormality detection process to obtain a local image of the object to be measured further includes the following steps:
[0023] S33, replacing the background image in the partial image with a pure color.
[0024] Furthermore, in step S4, a second round of semantic segmentation is performed on the local image of the object to be measured obtained in step S3, and the semantic entity of the area where the measuring point is located is obtained according to the label of the semantic entity.
[0025] Furthermore, in step S4, the normalization process includes averaging and centroid processing.
[0026] Furthermore, in step S5, the process of obtaining the size parameters of the object to be measured according to the two-dimensional coordinates P (x, y) of the point to be measured by combining the plane mapping G (x, y, z) of the image of the area to be measured obtained in step S1 includes the following steps:
[0027] S51, establishing a connection between the coordinates of the measurement points obtained by the multiple semantic segmentation and the plane mapping established by AR, and obtaining the following connection function G(x, y, z)=f(P(x, y));
[0028] S52, obtaining the size parameters of the object to be measured according to the plane mapping calculation of the measuring points.
[0029] The beneficial effects of the present invention are:
[0030] (1) The present invention adopts a multiple semantic segmentation method to obtain the measurement points of the object. Through multiple semantic segmentations, the interference caused by the surrounding similar background can be gradually eliminated, and the measurement points can be automatically obtained. Moreover, the measurement points obtained by multiple segmentations are more accurate than those selected manually.
[0031] (2) The present invention is simple to operate, low in cost, and easy to promote. It does not require a fixed camera position, nor does it require the installation of hardware equipment such as laser scanners and ultrasonic measurements.
[0032] (3) The present invention obtains multiple images of the area to be measured by slightly shaking the camera, and then obtains the plane mapping of the area to be measured through AR technology, avoiding the time-consuming and complicated image acquisition and modeling process. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 It is a flow chart of the intelligent measurement method based on AR and multiple semantic segmentation of the present invention. DETAILED DESCRIPTION
[0034] The present invention will now be described in further detail with reference to the accompanying drawings.
[0035] It should be noted that the terms such as "upper", "lower", "left", "right", "front", "back", etc. cited in the invention are only for the convenience of description and are not used to limit the scope of implementation of the present invention. Changes or adjustments in their relative relationships should be regarded as the scope of implementation of the present invention without substantially changing the technical content.
[0036] Combination Figure 1 The present invention relates to an intelligent measurement method based on AR and multiple semantic segmentation, and the intelligent measurement method comprises the following steps:
[0037] S1, taking a certain amount of images of the area to be measured including the object to be measured, and using an AR modeling method to obtain a plane mapping G (x, y, z) of the image of the area to be measured.
[0038] S2, performing abnormality detection on the acquired image of the area to be tested and removing the interfering image.
[0039] S3, performing a first round of semantic segmentation on the image of the area to be measured after the anomaly detection processing, to obtain a local image of the object to be measured.
[0040] S4, performing a second round of semantic segmentation on the local image of the object to be measured obtained in step S3, obtaining the semantic entity of the area where the measuring point is located, and then normalizing the obtained semantic entity to obtain the two-dimensional coordinates P (x, y) of the point to be measured.
[0041] S5, combining the plane mapping G(x, y, z) of the image of the area to be measured obtained in step S1, and obtaining the size parameters of the object to be measured according to the two-dimensional coordinates P(x, y) of the point to be measured.
[0042] First, for the area where the object to be measured is located, the camera is slightly shaken to obtain multiple images of the area to be measured. AR technology can extract multiple features of each image and match the same features in different images. Combined with the information of the camera hardware sensor (gyroscope, accelerometer, etc.), each feature can be triangulated. The difference relationship between each feature and other features in the image is also compared to generate a plane mapping G(x, y, z); then the target detection technology is used to detect anomalies in the image obtained by the camera to determine whether the measured object exists, whether the placement is reasonable, whether the background interference is too large, etc.; then, through two semantic segmentations, the entities of the measured object and the area of the point to be measured are obtained in turn, and the normalization technology is used to obtain the two-dimensional coordinates P(x, y) of the measuring point; finally, the coordinates of the measuring point obtained by multiple semantic segmentations are linked to the plane mapping established by AR, G(x, y, z) = f(P(x, y)), and then the length, area, etc. are measured according to the plane mapping of the measuring point.
[0043] The above steps are explained below with reference to examples.
[0044] Step 1: AR modeling obtains the plane mapping of the image of the area to be tested. Slightly shake the camera to obtain multiple images of the area to be tested. AR technology can extract multiple features of each image, match the same features in different images, and then combine the information of the camera hardware sensor (gyroscope, accelerometer, etc.) to triangulate each feature. It also compares the difference between each feature and other features in the image to generate a plane mapping G (x, y, z).
[0045] Step 2: Abnormal image detection removes interference, performs abnormal detection on the image captured by the camera, and determines whether the object to be measured exists, whether the placement is reasonable, whether the background interference is too large, etc. In the present invention, the target detection technology can be used to detect the object to be measured in the image, and then the target image is classified to determine whether it is an abnormal image. The classification model is trained by a series of abnormal images such as correct images and incomplete, blurred, and unreasonable postures. For example, the camera shakes too much, causing the object to be measured to extend to or beyond the edge of the image, resulting in the lack of integrity of the image of the object to be measured, or the abnormal shooting angle causes the unreasonable posture of the object to be measured, etc.
[0046] Step 3: The first round of semantic segmentation obtains a partial image of the object to be measured, and performs the first round of semantic segmentation on the image verified in step 2 to obtain each semantic entity in the image. For the semantic entity to be measured, the partial image is intercepted according to the minimum circumscribed rectangle of the semantic entity, and the background around the entity is filled with a solid color with obvious contrast. For example, in the image of the area to be measured, there are partial images of a table, a cup placed on the table, a chair placed next to the table, and background objects such as the ground and a cabinet. In the first round of semantic segmentation, the system will identify the table, cup, chair, ground and cabinet based on pixel features, and then determine that the table is the corresponding object to be measured.
[0047] Step 4: The second round of semantic segmentation obtains the coordinates of the measurement point. The local image of the first round of semantic segmentation is semantically segmented again. The semantic entity of the area where the measurement point is located (such as the corner area of the table) is obtained according to the mark of the semantic entity. The entity of the second semantic segmentation is normalized to obtain the two-dimensional coordinates P (x, y) of the point to be measured.
[0048] Step 5: Obtain the plane mapping of the point to be measured to complete the measurement, and establish a connection between the coordinates of the measurement point obtained by multiple semantic segmentation and the plane mapping established by AR, G(x, y, z) = f(P(x, y)), and then perform length, area, etc. measurements based on the plane mapping of the measurement point.
[0049] The present invention is simple to operate, low in cost, and easy to promote. It does not require a fixed camera position, nor does it require the installation of hardware equipment such as laser scanners and ultrasonic measurements. The camera is slightly shaken to obtain multiple images of the area to be measured, and then the plane mapping of the area to be measured is obtained through AR technology, thereby avoiding time-consuming and complicated image acquisition and modeling processes. A multiple semantic segmentation method is used to obtain the measurement points of the object. Through multiple semantic segmentations, the interference caused by similar surrounding backgrounds can be gradually eliminated, thereby realizing automatic acquisition of measurement points. Moreover, the measurement points obtained through multiple segmentations are more accurate than those selected manually.
[0050] The above are only preferred embodiments of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should be regarded as the protection scope of the present invention.
Claims
1. An intelligent measurement method based on AR and multiple semantic segmentation, characterized in that: The intelligent measurement method comprises the following steps: S1, obtain a certain amount of images of the area to be measured including the object to be measured by shaking the camera, and obtain the plane mapping G (x, y, z) of the image of the area to be measured by using an AR modeling method. Step S1 specifically includes: S11, extract multiple features of each image and match the same features in different images; S12, combining the measurement results of the camera attitude sensor, triangulating each feature, comparing the difference relationship between each feature and other features in the image, and generating a plane mapping G(x, y, z); S2, perform abnormality detection on the acquired image of the area to be measured and remove the interfering image; use the target detection technology to detect the object to be measured in the image, classify the target image, and analyze whether the current image is abnormal based on the integrity, placement characteristics and background interference of the object to be measured in the image; S3, performing a first round of semantic segmentation on the image of the area to be measured after the anomaly detection process, to obtain a local image of the object to be measured. Step S3 specifically includes: S31, performing semantic segmentation on the image of the area to be tested to obtain all semantic entities in the image; S32, selecting a semantic entity of the object to be measured, and intercepting a local image according to the minimum circumscribed rectangle of the semantic entity; S33, replacing the background image in the partial image with a pure color; S4, performing a second round of semantic segmentation on the local image of the object to be measured obtained in step S3, obtaining a semantic entity in the area where the measuring point is located, and then normalizing the obtained semantic entity to obtain a two-dimensional coordinate P (x, y) of the point to be measured; S5, combining the plane mapping G(x, y, z) of the image of the area to be measured obtained in step S1, and obtaining the size parameters of the object to be measured according to the two-dimensional coordinates P(x, y) of the point to be measured; S51, establishing a connection between the coordinates of the measurement points obtained by the multiple semantic segmentation and the plane mapping established by AR, and obtaining the following connection function G(x, y, z)=f(P(x, y)); S52, obtaining the size parameters of the object to be measured according to the plane mapping calculation of the measuring points.
2. The intelligent measurement method based on AR and multiple semantic segmentation according to claim 1, characterized in that: In step S4, a second round of semantic segmentation is performed on the local image of the object to be measured obtained in step S3, and the semantic entity of the area where the measuring point is located is obtained according to the label of the semantic entity.
3. The intelligent measurement method based on AR and multiple semantic segmentation according to claim 1, characterized in that: In step S4, the normalization process includes averaging and centroid processing.
