Camera foot type scanning method based on plane detection
Through the camera foot scanning method based on plane detection, the three-dimensional foot model is reconstructed using SFM and RANSAC algorithms, which solves the problem that users need to go to specific locations to obtain foot data, and achieves high-precision and convenient foot data acquisition.
Patent Information
- Application Number
- CN202311576696.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-22
- Publication Date
- 2025-07-22
AI Technical Summary
Existing three-dimensional foot scanners are not common in life. Users need to go to specific locations to obtain foot data. It is inconvenient to use and cannot complete foot scanning anytime, anywhere.
The camera foot type scanning method based on plane detection is adopted. By shooting foot videos with A4 paper and reconstructing the sparse three-dimensional model using the SFM algorithm, the plane is fitted with the RANSAC algorithm, the corner coordinates of A4 paper are obtained, the conversion relationship is calculated, the dense foot three-dimensional model is reconstructed, and the foot parameters are calculated.
It enables users to obtain high-precision foot data anytime and anywhere, reduce usage restrictions, and obtain more comprehensive and accurate foot data.
Smart Images

Figure CN120355564A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of foot type scanning, and specifically provides a camera foot type scanning method based on plane detection. Background Art
[0002] At present, in many cases, we need to obtain accurate data information such as the shape, length, width, and height of the foot. For example, in the design and customization of shoes and foot correction in the medical field. In the early days, people mainly obtained relevant foot data through manual measurement. This method can measure limited foot data and has low accuracy. With the development of technology, people began to use three-dimensional foot scanners to obtain relevant foot data. This method can obtain three-dimensional data of the foot, and the data information is more comprehensive and the accuracy is higher;
[0003] However, the current three-dimensional foot scanners are not common in life. Users need to go to specific locations to obtain their own foot data. Although the technology is relatively mature, it is not convenient for users to use conveniently. The limitations of use are large, and users cannot complete foot scanning and obtain foot data anytime and anywhere. Summary of the Invention
[0004] The present invention provides a camera foot type scanning method based on plane detection, which can effectively solve the problem that the current three-dimensional foot scanners are not common in life. Users need to go to specific locations to obtain their own foot data. Although the technology is relatively mature, it is not convenient for users to use conveniently. The limitations of use are large, and users cannot complete foot scanning and obtain foot data anytime and anywhere.
[0005] To achieve the above object, the present invention provides the following technical solution: A camera foot type scanning method based on plane detection only needs to use a shooting device to shoot a foot video with an A4 paper and input it. By calibrating the camera with the A4 paper, a high-precision 3D model of the foot can be obtained, and then the parameter information of the foot can be calculated;
[0006] The camera-based foot type scanning method specifically includes the following steps:
[0007] S1. Shoot a foot video with an A4 paper and sample frames;
[0008] S2. Use the SFM algorithm to reconstruct a sparse three-dimensional model of the scene;
[0009] S3. For all the three-dimensional points in the model obtained in step S2, use the RANSAC algorithm to fit a plane in the SFM coordinate system;
[0010] S4. Obtain the coordinates of the 4 corner points of the A4 paper in the SFM coordinate system;
[0011] S5. Obtain the conversion relationship between the real coordinate system and the SFM coordinate system;
[0012] S6. Use the SFM parameters to reconstruct a dense three-dimensional model of the foot;
[0013] S7. Convert the three-dimensional model of the foot in the SFM coordinate system to the real coordinate system according to the conversion relationship;
[0014] S8. Calculate the relevant data of the foot in the real coordinate system;
[0015] In the above S3, mainly by using the RANSAC algorithm to fit a plane from the point cloud set of the three-dimensional model of the foot. The RANSAC algorithm is an iterative algorithm for correctly estimating the parameters of a mathematical model from a set of data containing outliers;
[0016] Specifically, it includes the following implementation steps:
[0017] S301. Randomly select three non-collinear points from all the three-dimensional points and calculate a plane;
[0018] S302. Calculate the distances from all the three-dimensional points to this plane;
[0019] S303. Compare the number of inliers corresponding to the current plane with that of the previously calculated plane;
[0020] S304. Repeat the steps until the fitted plane is obtained.
[0021] According to the above technical solution, in the above S1, during the process of shooting the foot video with an A4 paper and sampling frames, specifically as follows:
[0022] Prepare an A4 paper for calibrating the camera and draw some simple graphics on it. Stand barefoot behind the A4 paper and shoot a video around it, ensuring that the foot and the A4 paper are within the video range and the foot remains stationary during the shooting process, and the camera is not too far away;
[0023] Decompose the captured video into sequential frame images, delete the invalid images, and then perform interval sampling on the remaining images, with a total of 60 frames of images sampled.
[0024] According to the above technical solution, in the above S2, specifically, using the SFM algorithm to reconstruct the sparse three-dimensional model of the scene is to use the 60 frames of sampled images as the input of the SFM algorithm, and use the SFM algorithm to reconstruct the sparse three-dimensional model of the scene to obtain a series of three-dimensional points.
[0025] According to the above technical solution, in S301, randomly select 3 points from all the three-dimensional points, and determine whether these 3 points are collinear. If they are collinear, reselect until 3 non-collinear points P1(x1, y1, z1), P2(x2, y2, z2), and P3(x3, y3, z3) are selected. Use these 3 points P1, P2, and P3 to calculate a plane ax + by + cz + d = 0. The calculation formulas for the parameters a, b, and c are as follows:
[0026] a = y1×(z2 - z3) + y2×(z3 - z1) + y3×(z1 - z2) (1);
[0027] b = z1×(x2 - x3) + z2×(x3 - x1) + z3×(x1 - x2) (2);
[0028] c = x1×(y2 - y3) + x2×(y3 - y1) + x3×(y1 - y2) (3);
[0029] d = -x1×(y2×z3 - y3×z2) - x2×(y3×z1 - y1×z3) - x3×(y1×z2 - y2×z1) (4);
[0030] In S302, after obtaining the plane equation, calculate the distances from all three-dimensional points to this plane. If the distance is less than the threshold T, then this point is an inlier; otherwise, it is an outlier. Finally, count the number of inliers.
[0031] According to the above technical solution, in S303, compare the number of inliers of the current plane with the number of inliers corresponding to the plane calculated previously, and record the parameters of the plane with the larger number of inliers and the corresponding number of inliers n;
[0032] In S304, repeat S301 - S303 until the number of inliers n is greater than a certain number N. At this time, the obtained plane is the fitted plane.
[0033] According to the above technical solution, in S4, it means to randomly select one image from 60 frames of images, and use a pre-trained neural network segmentation model to segment the A4 paper in the image to obtain the mask of the A4 paper, that is, the mask. However, the A4 paper may have curled edges, which affect the shape of the mask, so it is necessary to optimize its contour first;
[0034] When specifically performing contour optimization, mainly use the mask to determine the 4 corner points of the A4 paper, and calculate the ray equations of the 4 corner points respectively according to the pixel coordinates of these 4 corner points in the image and the internal and external parameters of the camera corresponding to this image. These 4 ray equations intersect with the plane fitted in step S3;
[0035] And this intersection point is the 4 corner points of the A4 paper in the SFM coordinate system after 3D reconstruction. By combining the 4 ray equations and the plane equation respectively, the coordinates of the 4 corner points of the A4 paper in the SFM coordinate system can be obtained.
[0036] According to the above technical solution, in step S5, obtaining the conversion relationship between the real coordinate system and the SFM coordinate system mainly uses the coordinates of the corner points of the A4 paper to obtain the conversion relationship between the SFM coordinate system and the real coordinate system;
[0037] Specifically, a real coordinate system is established with the center point of the A4 paper as the origin, where the x-axis is parallel to the long side of the A4 paper, the y-axis is parallel to the short side, and the z-axis is perpendicular to the A4 paper. In this way, the coordinates of the 4 corner points of the A4 paper in the real coordinate system are obtained. Combining the coordinates of the 4 corner points of the A4 paper in the SFM coordinate system obtained in step S4, the conversion relationship between the two coordinate systems can be calculated through these two sets of coordinates;
[0038] Generally, the conversion relationship between two 3D coordinate systems is described by a rotation matrix, a translation matrix, and a scaling factor. Through these 3 parameters, the conversion between 3D coordinate systems can be completed. Let the coordinates of the 4 corner points of the A4 paper in the real coordinate system be: The coordinates of the 4 corner points of the A4 paper in the SFM coordinate system are: Write the coordinate point P in matrix form;
[0039]
[0040] Respectively obtain the centroids centroid sfm 、centroid real of the data sets composed of the 4 corner points in the SFM coordinate system and the real coordinate system:
[0041]
[0042]
[0043] Calculate the scaling factor S in the two coordinate systems:
[0044]
[0045] where, P sfm and P real are respectively any one of the corner points in the SFM coordinate system and the real coordinate system;
[0046] Use the SVD singular value decomposition algorithm to calculate the rotation matrix R:
[0047]
[0048] [U, S, V] = SVD(H) (10);
[0049] R = VU T (11);
[0050] Where H is the covariance matrix, and U, S, and V are the three matrices obtained by decomposing H using the SVD algorithm respectively;
[0051] Calculate the translation matrix T:
[0052]
[0053] The formula for converting the coordinates in the SFM coordinate system to the coordinates in the real coordinate system is expressed as:
[0054]
[0055] According to the above technical solution, in S6, mainly for the 60 frames of images sampled from the video, using the pre-trained neural network segmentation model, all the images are segmented to segment the feet, and then the parameters in the reconstruction process of the SFM algorithm in step S2 are used to reconstruct the dense model of the feet to obtain the dense three-dimensional model of the feet in the SFM coordinate system.
[0056] According to the above technical solution, in S7, converting the three-dimensional model of the feet in the SFM coordinate system to the real coordinate system according to the conversion relationship mainly refers to converting the model of the feet in the SFM coordinate system obtained in step S6 to the real coordinate system according to the conversion relationship between the real coordinate system and the SFM coordinate system obtained in step S5.
[0057] According to the above technical solution, in S8, mainly based on the three-dimensional model of the feet in the real coordinate system, the parameter information for calculating the foot length, foot width, and foot height of the feet is obtained.
[0058] Compared with the prior art, the beneficial effects of the present invention:
[0059] This foot shape scanning method, compared with the existing means of using a three-dimensional foot shape scanner for scanning, enables users not to need to go to a specific location when they need to obtain foot data, and at the same time is convenient for users to use flexibly and conveniently, reducing the usage requirements and usage restrictions. Moreover, only by using a shooting device such as a mobile phone to shoot a foot video with an A4 paper and input it, and using the A4 paper to calibrate the camera, a high-precision 3D model of the feet can be obtained, so as to calculate the foot parameter data such as foot length, foot width, height, and whether there is flat feet, enabling users to obtain their own foot data at any time and anywhere, and the obtained foot shape data information is also more comprehensive and accurate. Description of the Drawings
[0060] The accompanying drawings are used to provide a further understanding of the present invention, and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention, and do not constitute a limitation to the present invention.
[0061] In the accompanying drawings:
[0062] Figure 1 is a flowchart of the camera foot shape scanning method of the present invention;
[0063] Figure 2 is a schematic diagram of the sparse three-dimensional model of the present invention;
[0064] Figure 3 is a schematic diagram of the intersection of four rays of the present invention with the fitted plane;
[0065] Figure 4 is a schematic diagram of establishing a real coordinate system with the center point of an A4 paper as the origin in the present invention. Specific Embodiments
[0066] The following describes the preferred embodiments of the present invention with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0067] Embodiment: As Figure 1 shown, the present invention provides a technical solution, a camera foot shape scanning method based on plane detection. Only need to use a shooting device to shoot a foot video with an A4 paper and input it, and use the A4 paper to calibrate the camera, then a high-precision foot 3D model can be obtained, so as to calculate the parameter information of the foot;
[0068] The camera-based foot shape scanning method specifically includes the following steps:
[0069] S1. Shoot a foot video with an A4 paper and sample frames;
[0070] In S1, during the process of shooting a foot video with an A4 paper and sampling frames, specifically as follows:
[0071] Prepare an A4 paper for calibrating the camera, and draw some simple graphics on it. The role of drawing simple graphics is to enhance the effect of the subsequent fitted plane. Stand barefoot behind the A4 paper and shoot a video around it, ensuring that the foot and the A4 paper are within the video range, and keep the foot still during the shooting process, and the camera should not be too far away;
[0072] Decompose the shot video into sequential frame images, and delete invalid images. Invalid images mainly refer to images in which the foot or the A4 paper is not entirely within the image and blurred images. Then perform interval sampling on the remaining images, and a total of 60 frame images are sampled.
[0073] S2. Reconstruct a sparse three-dimensional model of the scene using the SFM algorithm;
[0074] In S2, to specifically reconstruct a sparse three-dimensional model of the scene using the SFM algorithm, the 60 sampled images are used as the input of the SFM algorithm. Then, a sparse three-dimensional model of the scene is reconstructed using the SFM algorithm to obtain a series of three-dimensional points, as Figure 2 shown.
[0075] S3. Using all the three-dimensional points in the model obtained in step S2, fit a plane in the SFM coordinate system using the RANSAC algorithm;
[0076] In S3, mainly by using the RANSAC algorithm to fit a plane from the point cloud set of the three-dimensional foot model. The RANSAC algorithm is an iterative algorithm for correctly estimating the parameters of a mathematical model from a set of data containing outliers;
[0077] Specifically, it includes the following implementation steps:
[0078] S301. Randomly select three non-collinear points from all the three-dimensional points and calculate a plane;
[0079] S302. Calculate the distances from all the three-dimensional points to this plane;
[0080] S303. Compare the number of inliers corresponding to the current plane with that of the previously calculated plane;
[0081] S304. Repeat the steps until the fitted plane is obtained;
[0082] In S301, randomly select 3 points from all the three-dimensional points and determine whether these 3 points are collinear. If they are collinear, reselect until 3 non-collinear points P1(x1, y1, z1), P2(x2, y2, z2), and P3(x3, y3, z3) are selected. Then, use these 3 points P1, P2, and P3 to calculate a plane ax + by + cz + d = 0. The calculation formulas for the parameters a, b, and c are as follows:
[0083] a = y1×(z2 - z3) + y2×(z3 - z1) + y3×(z1 - z2) (1);
[0084] b = z1×(x2 - x3) + z2×(x3 - x1) + z3×(x1 - x2) (2);
[0085] c = x1×(y2 - y3) + x2×(y3 - y1) + x3×(y1 - y2) (3);
[0086] d = -x1×(y2×z3 - y3×z2) - x2×(y3×z1 - y1×z3) - x3×(y1×z2 - y2×z1) (4);
[0087] In S302, after obtaining the plane equation, calculate the distances from all three-dimensional points to this plane. If the distance is less than the threshold T, then this point is an inlier, and the inlier is normal data. Otherwise, it is an outlier, and the outlier is abnormal data. Finally, count the number of inliers.
[0088] In S303, compare the number of inliers of the current plane with the number of inliers corresponding to the previously calculated plane, and record the parameters of the plane with the larger number of inliers and the corresponding number of inliers n;
[0089] In S304, repeat S301 - S303 until the number of inliers n is greater than a certain number N. At this time, the obtained plane is the fitted plane.
[0090] S4. Obtain the coordinates of the four corner points of the A4 paper in the SFM coordinate system;
[0091] In S4, it means to select an image from 60 frames of images, use the pre-trained neural network segmentation model to segment the A4 paper in the image to obtain the mask of the A4 paper, that is, the mask. However, the A4 paper may have curled edges, which will affect the shape of the mask. Therefore, it is necessary to optimize its contour first;
[0092] When specifically optimizing the contour, mainly use the mask to determine the four corner points of the A4 paper. According to the pixel coordinates of these four corner points in the image and the internal and external parameters of the corresponding camera of this image, calculate the ray equations of the four corner points respectively. These four ray equations intersect with the plane fitted in step S3, as Figure 3 shown;
[0093] And this intersection point is the four corner points of the A4 paper in the SFM coordinate system after three-dimensional reconstruction. By combining these four ray equations and the plane equation respectively, the coordinates of the four corner points of the A4 paper in the SFM coordinate system can be obtained.
[0094] S5. Obtain the conversion relationship between the real coordinate system and the SFM coordinate system;
[0095] In S5, obtaining the conversion relationship between the real coordinate system and the SFM coordinate system mainly uses the coordinates of the A4 paper corner points to obtain the conversion relationship between the SFM coordinate system and the real coordinate system;
[0096] Specifically, establish a real coordinate system with the center point of the A4 paper as the origin, as Figure 4As shown in the figure, where the x-axis is parallel to the long side of the A4 paper, the y-axis is parallel to the short side, and the z-axis is perpendicular to the A4 paper, so as to obtain the coordinates of the four corner points of the A4 paper in the real coordinate system. Combining with the coordinates of the four corner points of the A4 paper in the SFM coordinate system obtained in step S4, the conversion relationship between the two coordinate systems can be calculated through these two sets of coordinates;
[0097] Generally, the conversion relationship between two three-dimensional coordinate systems is described by a rotation matrix, a translation matrix and a scaling factor. Through these three parameters, the conversion between three-dimensional coordinate systems can be completed. Let the coordinates of the four corner points of the A4 paper in the real coordinate system be: The coordinates of the four corner points of the A4 paper in the SFM coordinate system are: Write the coordinate point P in matrix form;
[0098]
[0099] Respectively obtain the centroids centroid sfm 、centroid real of the data sets composed of the four corner points in the SFM coordinate system and the real coordinate system:
[0100]
[0101]
[0102] Calculate the scaling factor S in the two coordinate systems:
[0103]
[0104] Among them, P sfm and P real are respectively any one of the corner points in the SFM coordinate system and the real coordinate system;
[0105] Use the SVD singular value decomposition algorithm to calculate the rotation matrix R:
[0106]
[0107] [U, S, V]=SVD(H) (10);
[0108] R = VU T (11);
[0109] Among them, H is the covariance matrix, and U, S, V are the three matrices obtained by decomposing H by the SVD algorithm respectively;
[0110] Calculate the translation matrix T:
[0111]
[0112] The formula for converting the coordinates in the SFM coordinate system to the coordinates in the real coordinate system is expressed as:
[0113]
[0114] S6. Use the SFM parameters to reconstruct a dense three-dimensional model of the foot;
[0115] In S6, for the 60 frames of images sampled from the video, using the pre-trained neural network segmentation model, all the images are segmented to segment the foot, and then the parameters in the reconstruction process of the SFM algorithm in step S2 are used to reconstruct the dense model of the foot, obtaining a dense three-dimensional model of the foot in the SFM coordinate system.
[0116] S7. Convert the three-dimensional model of the foot in the SFM coordinate system to the real coordinate system according to the conversion relationship;
[0117] In S7, converting the three-dimensional model of the foot in the SFM coordinate system to the real coordinate system according to the conversion relationship mainly means converting the foot model in the SFM coordinate system obtained in step S6 to the real coordinate system according to the conversion relationship between the real coordinate system and the SFM coordinate system obtained in step S5.
[0118] S8. Calculate the relevant data of the foot in the real coordinate system;
[0119] In S8, mainly calculate the parameter information of the foot length, foot width, and foot height of the foot according to the three-dimensional model of the foot in the real coordinate system.
[0120] Finally, it should be noted that the above are only the preferred examples of the present invention and are not used to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A camera-based foot type scanning method based on plane detection, characterized in that: Just use a shooting device to shoot a foot video with an A4 paper and input it. By calibrating the camera with the A4 paper, a high-precision 3D foot model can be obtained, and then the parameter information of the foot can be calculated; The camera-based foot shape scanning method specifically includes the following steps: S1. Shoot a foot video with an A4 paper and sample frames; S2. Use the SFM algorithm to reconstruct the sparse three-dimensional model of the scene; S3. From all the three-dimensional points in the model obtained in step S2, use the RANSAC algorithm to fit a plane in the SFM coordinate system; S4. Obtain the coordinates of the 4 corner points of the A4 paper in the SFM coordinate system; S5. Obtain the conversion relationship between the real coordinate system and the SFM coordinate system; S6. Use the SFM parameters to reconstruct the dense three-dimensional model of the foot; S7. Convert the three-dimensional foot model in the SFM coordinate system to the real coordinate system according to the conversion relationship; S8. Calculate the relevant data of the foot in the real coordinate system; In step S3, mainly use the RANSAC algorithm to fit a plane from the point cloud set of the 3D foot model. The RANSAC algorithm is an iterative algorithm for correctly estimating the parameters of a mathematical model from a set of data containing outliers; Specifically includes the following implementation steps: S301. Randomly select three non-collinear points from all the three-dimensional points and calculate a plane; S302. Calculate the distances from all the three-dimensional points to this plane; S303. Compare the current plane with the number of inliers corresponding to the previously calculated plane; S304. Repeat the steps until the fitted plane is obtained.
2. The method for camera-based foot type scanning based on plane detection according to claim 1, wherein: In step S1, during the process of shooting a foot video with an A4 paper and sampling frames, specifically as follows: Prepare an A4 paper for calibrating the camera and draw some simple graphics on it. Stand barefoot behind the A4 paper and shoot a video around it, ensuring that the foot and the A4 paper are within the video range, and keep the foot still during the shooting process, and the camera should not be too far away; Decompose the captured video into sequence frame images, delete invalid images, and then perform interval sampling on the remaining images, with a total of 60 frames of images sampled.
3. The method for scanning the foot type by a camera based on plane detection according to claim 2, characterized in that: In step S2, using the SFM algorithm to reconstruct the sparse three-dimensional model of the scene specifically takes the 60 frames of images sampled as the input of the SFM algorithm, and uses the SFM algorithm to reconstruct the sparse three-dimensional model of the scene to obtain a series of three-dimensional points.
4. A method for camera-based foot shape scanning based on plane detection according to claim 1, characterized in that: In step S301, randomly select 3 points from all the three-dimensional points, judge whether these 3 points are collinear, if they are collinear, reselect until 3 non-collinear points P1(x1, y1, z1), P2(x2, y2, z2), P3(x3, y3, z3) are selected, and use these 3 points P1, P2, P3 to calculate a plane ax + by + cz + d = 0. The calculation formulas for the parameters a, b, c are as follows: a = y1×(z2 - z3) + y2×(z3 - z1) + y3×(z1 - z2)(1); b = z1×(x2 - x3) + z2×(x3 - x1) + z3×(x1 - x2)(2); c = x1×(y2 - y3) + x2×(y3 - y1) + x3×(y1 - y2)(3); d = -x1×(y2×z3 - y3×z2) - x2×(y3×z1 - y1×z3) - x3×(y1×z2 - y2×z1) (4); In S302, after obtaining the plane equation, calculate the distances from all three-dimensional points to this plane. If the distance is less than the threshold T, then this point is an inlier; otherwise, it is an outlier. Finally, count the number of inliers.
5. A method for camera-based foot type scanning based on plane detection according to claim 4, characterized in that: In S303, compare the number of inliers of the current plane with the number of inliers corresponding to the plane calculated previously, and record the parameters of the plane with a larger number of inliers and the corresponding number of inliers n; In S304, repeat S301 - S303 until the number of inliers n is greater than a certain number N. At this time, the obtained plane is the fitted plane.
6. A method for camera-based foot shape scanning based on plane detection according to claim 4 or 5, characterized in that: In S4, it means randomly selecting one image from 60 frames of images, using the pre-trained neural network segmentation model to segment the A4 paper in the image to obtain the mask of the A4 paper, that is, the mask. However, the A4 paper may have warped edges that affect the shape of the mask, so its contour needs to be optimized first; When specifically performing contour optimization, mainly use the mask to determine the four corner points of the A4 paper. According to the pixel coordinates of these four corner points in the image and the internal and external parameters of the camera corresponding to this image, calculate the ray equations of the four corner points respectively. These four ray equations intersect with the plane fitted in step S3; And this intersection point is the four corner points of the A4 paper in the SFM coordinate system after three-dimensional reconstruction. Combining these four ray equations and the plane equation respectively can obtain the coordinates of the four corner points of the A4 paper in the SFM coordinate system.
7. A method for camera-based foot type scanning based on plane detection according to claim 6, characterized in that: In S5, obtaining the conversion relationship between the real coordinate system and the SFM coordinate system mainly uses the coordinates of the A4 paper corner points to obtain the conversion relationship between the SFM coordinate system and the real coordinate system; Specifically, establish a real coordinate system with the center point of the A4 paper as the origin, where the x-axis is parallel to the long side of the A4 paper, the y-axis is parallel to the short side, and the z-axis is perpendicular to the A4 paper. In this way, obtain the coordinates of the four corner points of the A4 paper in the real coordinate system. Combining the coordinates of the four corner points of the A4 paper in the SFM coordinate system obtained in step S4, the conversion relationship between the two coordinate systems can be calculated through these two sets of coordinates; The transformation relationship between two three-dimensional coordinate systems is generally described by a rotation matrix, a translation matrix, and a scaling factor. With these three parameters, the transformation between three-dimensional coordinate systems can be completed. Let the coordinates of the four corner points of an A4 paper in the real coordinate system be respectively: The coordinates of the four corner points of the A4 paper in the SFM coordinate system are respectively: Write the coordinate point P in matrix form; Find the centroids of the datasets composed of the four corner points in the SFM coordinate system and the true coordinate system respectively sfm 、centroid real : Calculate the scaling factor S in the two coordinate systems: where P sfm and P real are respectively any one of the corner points in the SFM coordinate system and the true coordinate system; Use the SVD singular value decomposition algorithm to calculate the rotation matrix R: [U, S, V] = SVD(H) (10); R = VU T (11); Among them, H is the covariance matrix, and U, S, and V are the three matrices obtained by decomposing H by the SVD algorithm respectively; Calculate the translation matrix T: The formula for converting the coordinates in the SFM coordinate system to the coordinates in the real coordinate system is expressed as:
8. A method for camera-based foot type scanning based on plane detection according to claim 3, characterized in that: In S6, mainly perform image segmentation on all 60 frames of images sampled in the video using the pre-trained neural network segmentation model, segment the feet, and then use the parameters in the reconstruction process of the SFM algorithm in step S2 to perform dense model reconstruction of the feet to obtain the dense three-dimensional model of the feet in the SFM coordinate system.
9. A camera-based foot type scanning method based on plane detection according to claim 7 or 8, characterized in that: In S7, the conversion of the three-dimensional foot model in the SFM coordinate system to the real coordinate system according to the conversion relationship mainly refers to converting the foot model in the SFM coordinate system obtained in step S6 to the real coordinate system according to the conversion relationship between the real coordinate system and the SFM coordinate system obtained in step S5.
10. A method for camera-based foot shape scanning based on plane detection according to claim 9, characterized in that: In S8, it is mainly to calculate the parameter information of the foot length, foot width, and foot height of the foot according to the three-dimensional foot model in the real coordinate system.