Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion meshroom/aliceVision/ImageMatchingMultiSfM.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "1.0"
__version__ = "1.1"

from meshroom.core import desc
from meshroom.core.utils import VERBOSE_LEVEL
Expand Down Expand Up @@ -91,6 +91,13 @@ class ImageMatchingMultiSfM(desc.AVCommandLineNode):
value="a/a+a/b",
values=["a/a+a/b","a/ab", "a/b"],
),
desc.BoolParam(
name="removeDuplicates",
label="Remove duplicates",
description="If enabled, views that belong to both A and B will be ignored in A.",
value=True,
advanced=True
),
desc.IntParam(
name="minNbImages",
label="Voc Tree: Minimum Number Of Images",
Expand Down
2 changes: 1 addition & 1 deletion meshroom/cameraTracking.mg
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"FeatureExtraction": "1.3",
"FeatureMatching": "2.0",
"ImageMatching": "2.0",
"ImageMatchingMultiSfM": "1.0",
"ImageMatchingMultiSfM": "1.1",
"ImageSegmentationSam3": "1.0",
"IntrinsicsTransforming": "1.1",
"KeyframeSelection": "5.0",
Expand Down
2 changes: 1 addition & 1 deletion meshroom/cameraTrackingDepth.mg
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"FeatureExtraction": "1.3",
"FeatureMatching": "2.0",
"ImageMatching": "2.0",
"ImageMatchingMultiSfM": "1.0",
"ImageMatchingMultiSfM": "1.1",
"ImageSegmentationSam3": "1.0",
"IntrinsicsTransforming": "1.1",
"KeyframeSelection": "5.0",
Expand Down
2 changes: 1 addition & 1 deletion meshroom/cameraTrackingLegacy.mg
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"FeatureMatching": "2.0",
"ImageDetectionPrompt": "1.0",
"ImageMatching": "2.0",
"ImageMatchingMultiSfM": "1.0",
"ImageMatchingMultiSfM": "1.1",
"ImageSegmentationBox": "1.0",
"KeyframeSelection": "5.0",
"MeshDecimate": "1.0",
Expand Down
2 changes: 1 addition & 1 deletion meshroom/cameraTrackingWithoutCalibration.mg
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"FeatureExtraction": "1.3",
"FeatureMatching": "2.0",
"ImageMatching": "2.0",
"ImageMatchingMultiSfM": "1.0",
"ImageMatchingMultiSfM": "1.1",
"ImageSegmentationSam3": "1.0",
"IntrinsicsTransforming": "1.1",
"KeyframeSelection": "5.0",
Expand Down
2 changes: 1 addition & 1 deletion meshroom/cameraTrackingWithoutCalibrationLegacy.mg
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"FeatureMatching": "2.0",
"ImageDetectionPrompt": "1.0",
"ImageMatching": "2.0",
"ImageMatchingMultiSfM": "1.0",
"ImageMatchingMultiSfM": "1.1",
"ImageSegmentationBox": "1.0",
"KeyframeSelection": "5.0",
"MeshDecimate": "1.0",
Expand Down
2 changes: 1 addition & 1 deletion meshroom/photogrammetryAndCameraTracking.mg
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"FeatureExtraction": "1.3",
"FeatureMatching": "2.0",
"ImageMatching": "2.0",
"ImageMatchingMultiSfM": "1.0",
"ImageMatchingMultiSfM": "1.1",
"ImageSegmentationSam3": "1.0",
"IntrinsicsTransforming": "1.1",
"KeyframeSelection": "5.0",
Expand Down
2 changes: 1 addition & 1 deletion meshroom/photogrammetryAndCameraTrackingLegacy.mg
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"FeatureMatching": "2.0",
"ImageDetectionPrompt": "1.0",
"ImageMatching": "2.0",
"ImageMatchingMultiSfM": "1.0",
"ImageMatchingMultiSfM": "1.1",
"ImageSegmentationBox": "1.0",
"KeyframeSelection": "5.0",
"MeshDecimate": "1.0",
Expand Down
2 changes: 1 addition & 1 deletion meshroom/photogrammetryObjectTwoSides.mg
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"FeatureMatching": "2.0",
"ImageDetectionPrompt": "1.0",
"ImageMatching": "2.0",
"ImageMatchingMultiSfM": "1.0",
"ImageMatchingMultiSfM": "1.1",
"ImageSegmentationBox": "1.0",
"MeshFiltering": "3.0",
"Meshing": "7.0",
Expand Down
18 changes: 12 additions & 6 deletions src/software/pipeline/main_imageMatching.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
// These constants define the current software version.
// They must be updated when the command line is changed.
#define ALICEVISION_SOFTWARE_VERSION_MAJOR 1
#define ALICEVISION_SOFTWARE_VERSION_MINOR 0
#define ALICEVISION_SOFTWARE_VERSION_MINOR 1

using namespace aliceVision;
using namespace aliceVision::voctree;
Expand Down Expand Up @@ -66,6 +66,8 @@ int aliceVision_main(int argc, char** argv)
std::string weightsFilepath;
/// flag for the optional weights file
bool withWeights = false;
/// Do we remove views from A if they belong to B ?
bool removeDuplicates = true;

// multiple SfM parameters

Expand Down Expand Up @@ -119,7 +121,8 @@ int aliceVision_main(int argc, char** argv)
("matchingMode", po::value<std::string>(&matchingModeName)->default_value(matchingModeName),
EImageMatchingMode_description().c_str())
("outputCombinedSfM", po::value<std::string>(&outputCombinedSfM)->default_value(outputCombinedSfM),
"Output file path for the combined SfMData file (if empty, don't combine).");
"Output file path for the combined SfMData file (if empty, don't combine).")
("removeDuplicates", po::value<bool>(&removeDuplicates)->default_value(removeDuplicates), "Do we remove views from A if they belong to B ?");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The added command-line option line is extremely long (154 characters), which violates standard line length limits and reduces readability. Please wrap the description string to the next line to match the formatting of the other options.

        ("removeDuplicates", po::value<bool>(&removeDuplicates)->default_value(removeDuplicates),
         "Do we remove views from A if they belong to B ?");

// clang-format on

CmdLine cmdline("The objective of this software is to find images that are looking to the same areas of the scene. "
Expand Down Expand Up @@ -166,11 +169,14 @@ int aliceVision_main(int argc, char** argv)
}

// remove duplicated view
for (const auto& viewPair : sfmDataB.getViews())
if (removeDuplicates)
{
sfmData::Views::iterator it = sfmDataA.getViews().find(viewPair.first);
if (it != sfmDataA.getViews().end())
sfmDataA.getViews().erase(it);
for (const auto& viewPair : sfmDataB.getViews())
{
sfmData::Views::iterator it = sfmDataA.getViews().find(viewPair.first);
if (it != sfmDataA.getViews().end())
sfmDataA.getViews().erase(it);
}
}
}

Expand Down
Loading