PM-MVS: PatchMatch multi-view stereo

PatchMatch Stereo is a method for generating a depth map from stereo images by repeating spatial propagation and view propagation. The concept of PatchMatch Stereo can be easily extended to Multi-View Stereo (MVS). In this paper, we present PatchMatch Multi-View Stereo (PM-MVS), which is a highly accurate 3D reconstruction method that can be used in various environments. Three techniques are introduced to PM-MVS: (i) matching score evaluation, (ii) viewpoint selection, and (iii) outlier filtering. The combination of normalized cross-correlation with bilateral weights and geometric consistency between viewpoints is used to improve the estimation accuracy of depth and normal maps at object boundaries and poor-texture regions. For each pixel, viewpoints used for stereo matching are carefully selected in order to improve robustness against disturbances such as occlusion, noise, blur, and distortion. Outliers are removed from reconstructed 3D point clouds by a weighted median filter and consistency-based filters assuming multi-view geometry. Through a set of experiments using public multi-view image datasets, we demonstrate that the proposed method exhibits efficient performance compared with conventional methods.


Introduction
Stereo matching is a technique to find correspondence between two images captured by a stereo camera, and is one of fundamental processes in image processing and computer vision [17,22]. The 3D shape of a target object can be reconstructed from the correspondence obtained by stereo matching, considering the geometric relationship between cameras. Multi-View Stereo (MVS), which uses a set of images taken from multiple viewpoints for dense reconstruction of the target object, has been widely studied [22].
PatchMatch Stereo proposed by Bleyer et al. [1] is one of convincing stereo matching methods. PatchMatch Stereo generates a disparity map (and a normal map) from a binocular stereo image pair by repeatedly updating the disparity and normal maps, which are initialized with random values in advance. The update process consists of three steps: (i) spatial propagation, (ii) view propagation, and (iii) plane refinement. PatchMatch Stereo exhibits efficient performance with fewer stereo matches than brute-force B Koichi Ito ito@aoki.ecei.tohoku.ac.jp 1 Graduate School of Information Sciences, Tohoku University, 6-6-05, Aramaki Aza Aoba, Sendai-shi 980-8579, Japan matching approach by introducing realistic assumptions that take into account the characteristics of disparity map. Patch-Match Stereo can also estimate the disparity between stereo images with sub-pixel accuracy. In addition, PatchMatch Stereo estimates the normal of each pixel, enabling robust 3D reconstruction against local image deformation. With these advantages, PatchMatch Stereo is expected to become one of the most effective stereo matching methods for 3D reconstruction.
The concept of PatchMatch Stereo can be easily extended to MVS. Shen proposed a multi-view 3D reconstruction method based on PatchMatch Stereo [21]. Shen's method is very ad hoc and does not take full advantage of the potential of multi-view images; the method simply combines a set of depth maps, each derived from a pair of stereo images. On the other hand, it is well known in the field of MVS that the robustness and accuracy of 3D reconstruction from multiview images can be improved by integrating matching scores from multiple stereo image pairs [4,6,16,22]. This approach matching score integration could be applied to derive an efficient multi-view extension of Bleyer's original PatchMatch Stereo [1].
In line with this idea, Schönberger et al. proposed COLMAP [19], which uses a matching score that takes into account multi-view integration unlike Shen's method. COLMAP estimates depth and normal maps by introducing a hidden Markov model to the parameter update algorithm for PatchMatch Stereo. COLMAP is one of the most accurate multiview 3D reconstruction algorithms. On the other hand, a major concern of COLMAP is that it simplifies the depth/normal update process to reduce computational complexity. Spatial propagation, which is to propagate depth and normal parameters to neighboring pixels, is performed only on the pixels one pixel adjacent to the pixel of interest. In addition, view propagation, which is used in the original PatchMatch Stereo to propagate parameters to another viewpoint, is not used in COLMAP. Plane refinement, which is the updating of parameters using random numbers, is performed multiple times in the original PatchMatch Stereo, but only once in COLMAP. Such ad hoc simplification could degrade overall 3D reconstruction performance.
In our work [9] published earlier than COLMAP, we proposed a systematic extension of PatchMatch Stereo taking the multi-view integration into consideration. This method is different from Shen's method in the following points: (i) depth maps are updated with interaction among multiview images, (ii) matching score is calculated from multiple stereo image pairs, and (iii) view propagation is also performed among multi-view images. In this method, however, the viewpoints used for matching is selected roughly for each reference viewpoint and not for each pixel, so the reconstruction accuracy may be degraded by image occlusion and noise. The estimation accuracy of depth and normal maps at object boundaries and poor-texture regions may also be degraded since simple Normalized Cross-Correlation (NCC) is used as a measure of matching. The estimated depth and normal maps are used directly to reconstruct the object shape, so the result will be significantly affected by the areas where the estimation failed, resulting in outliers and missing points.
In this paper, we propose PatchMatch Multi-View Stereo (PM-MVS), a highly accurate 3D reconstruction method addressing the above problems and can be used in various environments. We introduce three improvement techniques into PM-MVS, related to (i) matching score evaluation, (ii) viewpoint selection, and (iii) outlier filtering. For (i), we employ NCC with bilateral weights as an advanced matching measure and reflect geometric consistency for each stereo pair to improve robustness of matching. For (ii), we modify the algorithm so that the viewpoint used to calculate the matching score can be selected for each pixel. For (iii), we remove outliers by a weighted median filter and three specially designed filters based on the consistency of multi-view geometry [26]. Through a set of experiments using public multi-view image datasets, we demonstrate that the proposed method exhibits efficient performance compared with conventional methods.

Related work
In the following, we briefly summarize well-known multiview 3D reconstruction algorithms that are also used for performance comparison with the proposed method.
The MVS algorithms based on region expansion reconstruct the 3D shape by performing 3D reconstruction of feature points and then repeatedly propagating the results to neighboring regions [4,8,12]. One of the most well-known methods is Patch-based Multi-View Stereo (PMVS) [4]. PMVS reconstructs a sparse 3D shape based on feature points detected in the input image, and then reconstructs a dense 3D shape by repeating propagation of the reconstruction result and filtering based on consistency of visibility. Algorithms based on region expansion have the advantages of fast processing and not requiring the 3D reconstruction results obtained by other methods as initial values. There are some problems that the entire object cannot be reconstructed due to a small number of feature points, and that the reconstruction accuracy is degraded in regions where no feature points are detected since these algorithms propagate the sparse results reconstructed from the feature points. It is also difficult to reconstruct areas with small changes in intensity, such as poor-texture areas. In many cases, outliers are included in the reconstruction results from feature points, and it is important to remove them in order to perform stable 3D reconstruction.
The MVS algorithms based on depth map integration estimate depth maps for each viewpoint from multi-view images, and then integrate them to reconstruct the 3D shape of the target [2,6,13,19,23]. Depth is estimated by calculating the likelihood of the assumed depth using image matching such as NCC, and then a 3D point cloud or 3D mesh model is generated by integrating the depth maps generated for each viewpoint with consistency. Goesele et al. [6] used NCC-based window matching in the framework of planesweeping approach to generate highly accurate depth maps. Campbell et al. [2] assigned multiple depth candidates to a single pixel and selected the best depth based on the information of neighboring pixels, resulting in a highly accurate 3D shape reconstruction. Tola et al. [23] used DAISY descriptors [3] to improve the robustness against stereo images with large image deformations. Schönberger et al. [19] proposed COLMAP for fast and accurate 3D reconstruction by combining a hidden Markov model with the parameter update algorithm used in PatchMatch Stereo [1]. Goesele et al.'s method and Campbell et al.'s method are based on a planesweeping approach, which requires a full search in the depth direction to estimate the depth corresponding to a pixel. Therefore, these methods are not practical in terms of computational cost because of the large number of window matching calculations. Tola et al.'s method and COLMAP can reconstruct the shape with short processing time and high accuracy, however, a sparse 3D shape is reconstructed depending on the object since they achieve high accuracy of 3D reconstruction by excluding points with low confidence values.
In our previous work [9], we proposed an extension of PatchMatch stereo [1] to MVS as well as COLMAP. In this method, depth maps are updated with interaction among multi-view images, a matching score is calculated from multiple stereo images, and view propagation is performed among multi-view images. The reconstruction accuracy of this method can be improved by filtering based on the consistency of multi-view geometry [26]. As mentioned in Sect. 1, the reconstruction accuracy is highly dependent on the environment since the viewpoints used for matching are selected for each viewpoint and NCC is used for matching among multi-view images.

Fundamental techniques for PM-MVS
This section describes fundamental techniques for PM-MVS: (i) matching score, (ii) viewpoint selection, and (iii) outlier filtering. We use the following notations to describe each technique. We now consider a set of views V = {V 1 , V 2 , . . . , V K }. For each view V k ∈ V , let I V k (m) be a reference image, A V k be the intrinsic parameters, and R V k and t V k be the extrinsic parameters consisting of a rotation matrix and a translation vector. K is the number of images and m = (u, v) is an image coordinate. We consider the problem of generating depth maps d V k (m) and normal maps θ V k (m) and φ V k (m) for all the views in V . θ V k (m) and φ V k (m) indicate the angle of X -axis direction and Y -axis direction of the normal vector, respectively. Note that we use d V k , θ V k , and φ V k for d V k (m), θ V k (m), and φ V k (m), respectively, unless necessary in the following. Figure 1 shows geometric relationship among views and a target object when k = 3.

Matching score
We employ a confidence value proposed by Goesele et al. [6] as a matching score to utilize multiple stereo images in the framework of PM-MVS. In the most MVS algorithms [4,6,21], NCC is used to evaluate the matching of multi-view images. NCC-based matching produces wrong correspondence at object boundaries and in poor-texture regions, resulting in the estimation of discontinuous depths and normals, which cause outliers. Filtering of the 3D point cloud removes some outliers, however it cannot remove them completely, which reduces the reconstruction accuracy. The matching score in PM-MVS is based on BNCC, which is NCC with bilateral weights, used in COLMAP [19]. The differences between PM-MVS and COLMAP are as follows. The matching score in PM-MVS is obtained by subtracting a penalty calculated based on the geometric consistency between viewpoints from the similarity between windows calculated by BNCC. Also, the average of the matching scores of the top-L stereo pairs out of all stereo pairs is used to suppress the effect of occlusion. In the following, we revise the definition of BNCC and provide details on the mathematical definitions of the matching scores used in PM-MVS.
We consider the matching score for the reference view V k ∈ V in the following. Let us assume that C V k = {C n V k |n = 1, . . . , N pair } is a set of stereo pairs to be matched with V k , where N pair is the number of stereo pairs. As described in Sect. 3.2, each m has a different viewpoint to be paired, and therefore, C n V k should be written as C n V k (m) to be precise. In the following, we use the notation C n V k for ease of understanding. Given a pixel m in V k and parameter where BNCC is NCC with bilateral weights, which is defined by . (2) f and g are defined by where Crop(I , m, w) indicates a function to crop a window with w × w pixels centered on the coordinate m from the image I . Trans(I , H) indicates a function to transform I using a projective matrix H.Given parameters where a rotation matrix R, a translation vector t, a 3D coordinate M and a normal vector n are defined by respectively. In Eq. (2), i indicates a pixel in the windows. f * andḡ * indicate the weighted average calculated using the pixel values and weights b i of each window. The bilateral weight b i at pixel i is defined by where the subscript c indicates the center coordinate of the window. | f i − f c | 2 indicates the pixel value distance and m i − m c 2 2 indicates the spatial distance, whose importance is relatively scaled by their Gaussian dispersion σ f and σ m .
(1) indicates the geometric consistency between V k and C n V k at pixel m on V k . In poortexture or noisy regions, the scores obtained by BNCC are less reliable. Therefore, adding geometric consistency as a penalty improves the reliability of the matching scores for such regions. The geometric consistency is defined by the reprojection error e(m) between V k and C n V k as in [19]. The 3D point M for m on V k is calculated by as shown in Fig. 2 (a). : a m is obtained by projecting a 3D point M onto C n V k , which is reconstructed using m on V k and its parameters and bm is obtained by projecting a 3D point M on to V k , which is reconstructed using m on C n V k and its parameters. The reprojection error e(m) is calculated as the distance between m andm as shown in Fig. 2b. The reprojection error is given by wherem = (û,v). The geometric consistency is given by where ψ max indicates the maximum of the acceptable reprojection error and η indicates the constant. We obtain a set of matching scores by calculating the matching score for all the stereo pairs. The effect of occlusion can be reduced by considering the top-L matching scores [5]. Assuming that the matching score sorted in descending order isξ(V k , C n V k , p V k , m), the final matching score for pixel m on the reference view V k is calculated by

Viewpoint selection
The original approaches of MVS with PatchMatch [9,21] select one of the viewpoints, C n V k , to make a stereo pair and match all the pixels in the image of C n V k with those of the reference viewpoint V k . Since it is assumed that the pixels of V k correspond to those of C n V k , the accuracy of depth and normal estimation is degraded by disturbances such as occlusion and noise. Therefore, the optimal viewpoint C n V k to be matched with V k has to be selected for each pixel, not for each viewpoint, as used in recent approaches [15,19,24,27] to improve the matching accuracy. In the proposed method, three metrics are introduced for pixel-wise viewpoint selection: (i) matching score, (ii) triangulation probability, and (iii) incident probability. Our approach is similar to Goesele et al. [7], although it is not pixel-wise viewpoint selection. Both approaches use convergence angles between viewpoints and an NCC-based score. In [7], the number of SIFT features shared among viewpoints and image resolution are used. On the other hand, the proposed approach uses normals and a mesh generated from a sparse 3D points obtained by SfM.

Matching score
Generally, the viewpoints are selected in the order of shortest baseline length to make a stereo pair with less image deformation, however, the effects of occlusion and noise are not taken into account in this case. To robustly select viewpoints against noise and occlusion, we employ a metric based on the matching score, which is defined by where indicates a matching score defined in Eq. (1). C j V k indicates the j-th viewpoint among the N s viewpoints. σ s is a parameter of the Gaussian function and is the threshold for determining whether a window extracted

Triangulation probability
The matching score is high if the intensity values between the windows are correlated. In general, windows extracted from viewpoints with a short baseline length with V k exhibit a high correlation since the image deformation between viewpoints is small. Note that when the angle between viewpoints is close to zero, the windows are highly correlated with each other for any given depth, resulting in inaccurate depth estimation. In order to avoid this problem and improve the accuracy of viewpoint selection, the triangulation prior P tri proposed in [19] is introduced to the proposed method, which is defined by where τ tri is a threshold and θ tri indicates a triangulation angle between viewpoints as shown in Fig. 3, which is given by indicates the camera center of V j k . P tri is low when the triangulation angle θ tri is below the threshold τ tri .

Incident probability
If the normal vector n M of the 3D point M and the eye vector of the viewpoint C j V k have the same direction, M is not visible in C j V k . In order to exclude such viewpoints and improve the accuracy of viewpoint selection, the incident prior P inc proposed in [19] is introduced to the proposed method, which is defined by where σ i is a parameter of the Gaussian function, and θ inc indicates an incident angle between n M and the eye vector of the viewpoint C j V k as shown in Fig. 4, which is given by The above three metrics are used to select a set of viewpoints C V k to be paired with the reference viewpoint V k for each pixel m. The score where C j V k indicates the j-th viewpoint in C V k . A set of viewpoints C V k consists of N s viewpoints in order of decreasing baseline length to V k . We limit the number of viewpoints to N s instead of all viewpoints in viewpoint selection to eliminate distant viewpoints and reduce the number of candidate viewpoints for reducing the processing time. Since PM-MVS is an iterative method, the accuracy of depth and normal is low at first. The accuracy of the viewpoint selection score calculated in Eq. (19) is also low, resulting in inaccurate estimation of depth and normal maps. Therefore, the sparse 3D point cloud obtained by Structure from Motion (SfM) used in the estimation of camera parameters is used. A mesh model is generated from the sparse 3D point cloud using Poisson surface reconstruction [11], and the depth and normal maps corresponding to the reference viewpoint V k are rendered from its mesh model. Equation (19) is calculated for the depth and normal from p V k and from the sparse 3D point cloud, respectively, and the larger value is used as the score for viewpoint selection.
is selected as a set of viewpoints C V k (m) that should be paired to estimate the parameters of pixel m in V k .

Filtering
The depth map and normal map estimated by MVS have wrong correspondence in poor texture regions and object boundaries, and these result in outliers and missing points in 3D reconstruction. It is necessary to remove or interpolate such wrong correspondence in depth and normal maps to obtain highly accurate reconstruction results. The proposed method uses a weighted median filter and three filters based on the consistency of multi-view geometry [26] to suppress the occurrence of outliers and missing points in the reconstruction results.

Weighted median filter
A weighted median filter [22] has been used to improve the accuracy of disparity estimation in stereo vision [14] and depth and normal estimation in MVS. The weighted median filter is introduced into PM-MVS not only to remove outliers, but also to interpolate missing points. In the proposed method, the weight for the weighted median filter is calculated from the matching score and bilateral weights. The weight w med (m) on m is calculated by

Consistency among depth maps and their visibility
This filter checks consistency among the multiple depth maps and their visibility. If a 3D point interrupts the visibility of other 3D points or its visibility is interrupted by other 3D points, this point is removed as an outlier.

Left-right consistency
This filter is similar to left-right consistency checking used in binocular stereo matching. We remove a point whose distance from each corresponding point in all other views is longer than threshold, where we use the depth instead of the distance.

Consistency of pixel intensity
This filter checks the consistency of pixel intensity among the multiple images to remove artifacts observed around the surface. We do not take care of a 3D point near other points in the filter described in Sect. 3.3.2, since it is hard to check the consistency of such a 3D point using only geometric relation. The use of pixel intensity makes it possible to classify such a 3D point into a true 3D point or an outlier. For more details on the above four filters, refer to Yodokaw et al. [26].

PatchMatch multi-view stereo (PM-MVS)
The proposed method consists of four steps: (i) initialization, (ii) spatial propagation, (iii) view propagation, and (iv) plane refinement. The flow of PM-MVS for reference view V k is shown in Fig. 5. Depth and normal maps are generated by repeating processes (ii)-(iv). The processing flow of PM-MVS follows that of [1], except that the viewpoint is updated at each iteration, although the content of each process is different. The detail of each step in PM-MVS is described in the following.

Initialization
This step consists of parameter initialization by random numbers, viewpoint selection, and calculation of the initial matching score.

Parameter initialization by random numbers
In 3D reconstruction methods using PatchMatch, the values of depth and normal maps are initialized by random numbers. It is necessary to set the appropriate range of random numbers since the range of the random numbers corresponds to the reconstruction range. In the proposed method, we employ the difference approaches for setting the range of random numbers depending on whether SfM is used to estimate the camera parameters or not.
In the case of using SfM, the camera parameters, i.e., the intrinsic and extrinsic parameters of the cameras, are estimated and the sparse 3D point cloud is reconstructed simultaneously. The 3D point could is projected onto the reference viewpoint V k to obtain a set of depth Z V k . Since Z V k includes the depth from outliers, the range of depth d V k is determined by where Z min and Z max are calculated by where x indicates the function to round the element of x to the nearest integer towards minus infinity, N Z V k is the number of elements in Z V k , min (x, i) indicates the function to get the i-th smallest element in x, and λ min , λ max , c min , and c max are parameters. We employ {λ min , λ max , c min , c max } = {0.75, 1.25, 0.01, 0.99} in this paper.
In the case where the camera parameters for each viewpoint are given in advance and SfM is not used, the depth where In both cases, the range of normal is set to ±π/3. Thus, we obtain the initial parameters

Viewpoint selection
According to the procedure of viewpoint selection mentioned in Sect. 3.2, we obtain a set of viewpoints C V k = {C n V k |n = 1, . . . , N pair } from which to calculate the matching score for each pixel in the reference viewpoint V k .

Calculation of initial matching scores
The above processes determine parameters and viewpoints to be used for each pixel in V k , and the initial matching scores are calculated according to Sect. 3.1.

Spatial propagation
This step propagates the depth and normal information in the reference viewpoint V k . As mentioned above, let are updated by comparing a matching score on the image coordinate m with matching scores on its neighboring pixels. If Score(V k , , v), m), then the parameters for (u, v) are replaced by the parameters for (u + δ, v). , v), m), then the parameters for (u, v) are replaced by the parameters for (u, v + δ). If the iteration count is odd, then spatial propagation is performed from the top-left pixel to the bottom-right pixel. Otherwise, spatial propagation is performed in the reverse order. Thus, δ indicates 1 when the iteration count is odd and −1 when the iteration count is even. The above process is performed for all the pixels in V k .

View propagation
This step propagates the depth and normal information from the reference viewpoint V k to the neighboring viewpoints C V k obtained by viewpoint selection. We compare a matching score for each pixel in V k with that for corresponding pixel in C n V k ∈ C V k (n = 1, . . . , N pair ) to keep the consistency among multi-view images. A 3D point M reconstructed from m in V k and the parameters wherem is homogeneous coordinates of m. A normal vector n in C n V k is defined by Parameters p (m ) in C n V k are calculated by The above process for all the viewpoints in C V k provides highly accurate depth and normal estimation, while significantly increasing the computational cost. Therefore, we randomly select only one viewpoint C n V k from a set of viewpoints C V k in view propagation. We found that a limited number of viewpoints can be used to estimate the depth and normal maps with the same accuracy as when the parameters are propagated to all the viewpoints [9]. The above process is performed for all the pixels in V k .

Plane refinement
This step is to refine parameters p V k . Increasing the resolution of parameters is necessary to accurately estimate depths and normals. Although the accuracy of parameter estimation can be improved by increasing the resolution of the initial random numbers, it also significantly increases processing time. Plane refinement reduces processing time by refining the parameters by adding random numbers to the parameters with a finer resolution than the resolution of the random numbers generated by the initialization. For a given parameter, we add a random number generated at a finer resolution than the random number used for initialization. Note that one random number is added for each of the parameters. The matching scores are obtained before and after adding the random numbers, and if the addition of a random number increases the score, the parameter is replaced with the parameter to which the random number was added. Thus, for where p indicates a random number generated for each pixel. In this paper, the range of random numbers is set to 1/4 of the range in initialization described in Sect. 4.1. It is expected to improve the accuracy by performing this process repeatedly. To reduce the processing time, we perform the above procedure three times in one plane refinement in this paper. In addition, the range of p is reduced by 1/2 for each time.

3D reconstruction
After repeating spatial propagation, view propagation, and plane refinement N itr times and applying filters to the depth and normal maps, the depth and normal maps for V k are obtained as shown in Fig. 5. For a viewpoint V k ∈ V , let the depth of pixel m be d V k (m), the intrinsic parameters be A V k , and the extrinsic parameters be R V k and t V k . In this case, the 3D point M reconstructed from m is calculated by where M is the coordinate of a 3D point in the world coordinate system. For every pixel m in viewpoint V k , we reconstruct a 3D point by Eq. (30). By computing this process for all the viewpoints and integrating the point clouds, we obtain a 3D point cloud that is reconstructed from the input images V . First, we evaluate the effectiveness of each techniques proposed in this paper for PM-MVS through the ablation study. Next, we demonstrate the effectiveness of the proposed method by comparing it with some typical conventional MVS methods using the ETH3D dataset [20] including multi-view images taken in indoor and outdoor environment. Finally, we demonstrate that the proposed method can reconstruct dense and accurate 3D point clouds from multi-view images regardless of the environment and object types through the experiments using the DTU dataset [10] including multi-view images taken in an indoor environment.

Ablation study
We apply different combinations of the improvements in the proposed method and check their effectiveness. In this experiment, we use "courtyard" in the ETH3D dataset [20]. The "courtyard" set consists of images taken by Nikon D3X from 38 viewpoints. Three types of images are provided in the dataset: RAW images, JPEG images, and distortioncorrected JPEG images. In this experiment, we use only the distortion-corrected JPEG images. Although the image size is approximately 6, 048 × 4, 032 pixels, the image size is reduced by a quarter in this experiment to reduce the processing time. An example of the input image used in the experiment is shown in Fig. 7. For accuracy evaluation, the ETH3D dataset provides a 3D point cloud measured by the FARO Focus X 330 laser scanner. The camera parameters for each viewpoint are provided as the parameters estimated by the SfM tool COLMAP [18] and scaled to match the ground-truth 3D point cloud. In this experiment, the camera parameters for each viewpoint are scaled to fit the image size. In addition, the sparse 3D point cloud reconstructed by SfM of COLMAP is also provided. In the proposed method, a mesh model is generated from this point cloud and used for viewpoint selection. The parameters of the proposed method used in this experiment are set as follows. We set the matching window size to 10 × 10 pixels and the number of iterations N itr to 4. The parameters of the viewpoint selection process are set to {N pair , N s , σ s , τ tri , σ i } = {2, 10, 0.6, π/180, 45.0}. The parameters for BNCC and Geometric Consistency are set to {σ f , σ m , η, ψ max } = {12.0, 3.0, 0.01, 3.0}. The parameters of the weighted median filter are set to 11 for the window size, σ f = 2.0 and σ n = 0.6 for b i . Only pixels with a matching score greater than 0.5 are reconstructed as having reliable depth and normal. The above settings of parameters in PM-MVS have been experimentally confirmed to be applicable to other datasets as well. We evaluate the proposed method using the quantitative metrics of accuracy, completeness, and F 1 -score [20]. "Accuracy" is the ratio of 3D points included in the reconstruction result whose distance to the groundtruth 3D point is less than or equal to the tolerance (tol.). This is a metric that indicates how accurately each point has been reconstructed. "Completeness" is the ratio of groundtruth 3D points whose distance to the reconstruction result is less than or equal to tol. It is a metric that indicates how much of the region has been reconstructed. F 1 -score is the harmonic mean of accuracy and completeness, and is a metric that indicates the overall accuracy of the reconstruction result. Since some 3D reconstruction methods have a tradeoff between accuracy and completeness, the F 1 score, which is the combination of these two factors, is a good indicator to measure the performance of the methods. The higher the value of each of these metrics, the better the reconstruction result.
The methods to be compared in this experiment are summarized in Table 1. A is our previous method [9] with filtering based on the consistency of multi-view geometry [26]. B is a modified version of A with improved matching score calculation and filtering. C is a modified version of A with improved viewpoint selection method and filtering. D is a modified version of A with improved viewpoint selection and matching score calculation. E is the proposed method in this paper with all the improvements. Table 2 shows the accuracy (A), completeness (C), and F 1 -score (F 1 ) of each method, and Fig. 8 shows the reconstruction results of each method. Note that Fig. 8 shows a magnified view of a part of the reconstruction results. Therefore, there may be a gap between the appearance and the number of reconstructed points in Fig. 8 Fig. 8 D has many missing parts that are not shown in the figure, and the upper right corner is sparser than in C and E, resulting in fewer reconstructed points. A and B do not use pixel-wise viewpoint selection, which results in degraded matching accuracy, missing regions on the wall, and the small number of reconstructed 3D points. On the other hand, for C, D, and E, which use pixel-wise viewpoint selection, the missing regions in A and B are recovered and the reconstruction results are dense. Compared with C, which uses only NCC to calculate the matching scores, and D, which does not use a weighted median filter, E shows higher or comparable F 1 -scores. The above results show the effectiveness of the proposed method, which employs all the improvement techniques.

3D reconstruction from multi-view images of ETH3D dataset
We compare the reconstruction accuracy of the proposed method with that of conventional MVS methods through experiments using the ETH3D dataset [20]. The conventional methods are PMVS [4], COLMAP [19], and Yodokawa et al. [26], which is the method A in Table 1 with filtering based on the consistency of multi-view geometry. In this experiment, we use 12 datasets from the training data of High-res multiview, where we exclude "facade" from this experiment since it has larger number of images then other datasets and some of the methods are out-of-memory. An example of the input images selected from the datasets "delivery area" and "terrace" is shown in Fig. 9. The other experimental conditions are the same as those described in the previous section. Table 3 shows a summary of experimental results for the ETH3D dataset, where we indicate the results for tol. = 2 cm. COLMAP has the highest accuracy for all the datasets, while the F 1 score is not necessarily high due to the low completeness. The accuracy of the reconstructed 3D points is high, while the range of the reconstructed area is narrow. Yodokawa et al.'s method has a higher completeness than COLMAP on some datasets, although its overall performance is lower than that of COLMAP. The proposed method, PM-MVS, has the highest completeness for all the datasets. The accuracy is lower than COLMAP since the reconstructed area is larger than COLMAP and includes 3D points with lower reconstruction accuracy. While PM-MVS can reconstruct areas with poor texture and far from the camera that cannot be reconstructed by COLMAP, these areas are difficult to be recovered by MVS, resulting in a lower accuracy for PM-MVS. Since there is a trade-off between accuracy and completeness for each method, the F1 score, which is the combination of accuracy and completeness, indicates the performance of each method in MVS. The F 1 score for PM-MVS is the highest in most cases, indicating that the reconstruction effectiveness is high.
We focus on the results of "delivery_area" and "terrace" in the following to analyze the experimental results of each method in detail. Tables 4 and 5 summarize the results for accuracy (A), completeness (C), and F 1 -score (F 1 ) in "deliv-ery_area" and "terrace," respectively. Figures 10 and 11 show reconstruction results of each method in "delivery_area" and "terrace," respectively. The second and third columns of Figs. 10 and 11 show the 3D points colored based on the class of 3D points used in the evaluation of accuracy and completeness, respectively. In accuracy, the reconstructed point cloud is classified into three types: accurate point, inaccurate point, and unobserved point. An accurate point (green) is a point that is accurately reconstructed, an inaccurate point (red) is a point that is inaccurately reconstructed, and an unobserved point (blue) is a point that is not included in the set of groundtruth points. Note that unobserved points are not used for evaluation. More accurate points indicate higher accuracy of the reconstruction. In completeness, ground-truth points are classified into two types: complete points and incomplete points. A complete point (green) is a point where the corresponding 3D point of the reconstruction result exists. An incomplete point (red) is a point where the corresponding 3D point of the reconstruction result does not exist. More complete points indicate higher accuracy of the reconstruction. Fig. 9 Example of input images in "delivery_area" and "terrace" of the ETH3D dataset     The reconstruction results by the proposed method contain more outliers and inaccurate points than those by the conventional methods as shown in Figs. 10 and 11. The proposed method can reconstruct 3D points that are not included in the ground truth, and can also reconstruct areas with poor texture and far from the camera, which cannot be reconstructed by COLMAP and other methods. Therefore, when visualizing the accuracy of the proposed method, there are more inaccurate points and unobserved points than other methods. On the other hand, visualization of the completeness of the proposed method shows that the number of complete points is larger than that of other methods, indicating that the proposed method can reconstruct a dense point cloud. PMVS has relatively high accuracy, while it has the lowest completeness among all the methods. This is because PMVS is based on patch expansion, which makes it difficult to recon- struct regions with poor texture, such as walls. COLMAP has the highest accuracy, while it has the lower completeness. On the other hand, the proposed method has the highest F 1 -score in many tol. and the highest completeness in almost all the cases. As a result, the proposed method can reconstruct the 3D point clouds more densely and accurately than the conventional methods.

3D reconstruction from multi-View images of DTU dataset
We demonstrate the effectiveness of the proposed method through experiments using the DTU dataset [10].  [23] are also provided. The multiview images are taken from 49 or 64 viewpoints, and each image has a size of 1, 600×1, 200 pixels. In this experiment, we compare the accuracy of the proposed method with that of PMVS [4], COLMAP [19], and Yodokawa et al. [26] as in Sect. 5.2, in addition to the MVS algorithms provided by the dataset. Note that in the multi-view images provided in the DTU dataset, the camera position and pose of the object change automatically, and the light source environment is constant in all the images. Therefore, the proposed method does not use pixel-wise viewpoint selection, but viewpoint selection based on the baseline length as in our previous work [9] in this experiment. In this experiment, we use "scan2" and "scan34" among 128 objects. Both scan sets are taken from 49 viewpoints. Figure 12 shows an example of the input images.
The parameters of the proposed method used in this experiment are almost the same as those in the other experiments, except for the matching window size and N pair . The images in the DTU dataset contain poor-texture regions, therefore, a larger window size and a larger N pair improve the accuracy of the reconstruction. We set the matching window size to 16 × 16 pixels and the parameters of the viewpoint selection process to N pair = 4.
We evaluate the reconstruction accuracy by three metrics: accuracy, completeness, and overall [25], using the evaluation tools provided in the DTU dataset. Note that the definitions of accuracy and completeness are different from those of metrics of the same name in the ETH3D dataset. Accuracy in the DTU dataset is the distance from each point of the reconstructed 3D point cloud to the nearest neighbor point of the ground-truth point cloud. This is a measure of how accurate the reconstructed points are. Completeness in the DTU dataset is the distance from each point in the groundtruth point cloud to the nearest neighbor of the reconstructed   point cloud. This is a measure of how much of the region of the ground-truth point cloud is reconstructed by the resultant point cloud. Overall was defined as the arithmetic mean of accuracy and completeness, and is a measure of the overall accuracy of the reconstruction results. The lower these metrics are, the higher the accuracy of the reconstruction results. Table 6 summarizes the median values of accuracy (Acc.), completeness (Comp.), and overall for scan2 and scan34. Figure 13 shows the reconstruction results for each method, Fig. 14  On the other hand, overall of the proposed method is the lowest among all methods as well as scan2. As shown in Figs. 14 and 15, the results of Tola et al.'s method include many points with small Acc. errors, but also many points with large Comp. errors. The results of Campbell et al.'s method include many points with small Comp. errors, but also many points with large Acc. errors. On the other hand, the results of the proposed method include both points with small Acc. and points with small Comp. in a balanced manner, resulting in the most accurate reconstruction results. These results indicate that the proposed method is also effective for 3D reconstruction using data taken in indoor environments.

Conclusion
In this paper, we proposed a highly accurate multi-view 3D reconstruction method, PatchMatch Multi-View Stereo (PM-MVS), by introducing three improvement techniques for the extension of PatchMatch Stereo to MVS. In the first technique, the combination of NCC with bilateral weights and geometric consistency between viewpoints was used to improve the estimation accuracy of depth and normal maps at object boundaries and poor-texture regions. In the second technique, the viewpoint to be used for calculating matching scores was selected for each pixel to be robust against disturbances such as occlusion and noise. In the third technique, outliers in the reconstructed 3D point cloud are removed by a weighted median filter and filters based on the consistency of multi-view geometry. Through a set of experiments using public multi-view image datasets, we demonstrated that the proposed method exhibited efficient performance compared with conventional methods. In the future, we will develop a simple and accurate 3D reconstruction system and explore a mesh model generation method using the proposed method.