-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(threeFrequencyHeterodynePattern.h/.cpp): finish code.
1. new feature that support three frequency heterodyne pattern. 2. gui has added this feature. 3. precise test and perfermance test has added. 4. rename binos to bino that word is wrong. 5. new precise test data has added into /data folder.
- Loading branch information
1 parent
517971c
commit 58e7323
Showing
52 changed files
with
646 additions
and
385 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
#include <benchmark/benchmark.h> | ||
|
||
#include <slmaster.h> | ||
|
||
using namespace slmaster; | ||
using namespace slmaster::algorithm; | ||
using namespace std; | ||
using namespace cv; | ||
|
||
const string imgsPath = "../../data/threeFrequencyHeterodyne/"; | ||
|
||
class ThreeFrequencyHeterodynePatternSuit : public benchmark::Fixture { | ||
public: | ||
void SetUp(const benchmark::State &) { | ||
for (int i = 0; i < 12; ++i) { | ||
Mat temp = imread(imgsPath + to_string(i) + ".bmp", 0); | ||
imgs.emplace_back(temp); | ||
} | ||
} | ||
|
||
vector<Mat> imgs; | ||
}; | ||
|
||
BENCHMARK_DEFINE_F(ThreeFrequencyHeterodynePatternSuit, testGenerate)(benchmark::State& state) { | ||
auto params = ThreeFrequencyHeterodynePattern::Params(); | ||
params.shiftTime = 4; | ||
params.height = 1080; | ||
params.width = 1920; | ||
params.horizontal = false; | ||
params.nbrOfPeriods = 64; | ||
|
||
auto pattern = ThreeFrequencyHeterodynePattern::create(params); | ||
|
||
vector<Mat> imgs; | ||
|
||
for (auto _ : state) { | ||
pattern->generate(imgs); | ||
} | ||
} | ||
|
||
BENCHMARK_DEFINE_F(ThreeFrequencyHeterodynePatternSuit, testGenerateUnwrap)(benchmark::State& state) { | ||
auto params = ThreeFrequencyHeterodynePattern::Params(); | ||
params.shiftTime = 4; | ||
params.height = 1080; | ||
params.width = 1920; | ||
params.horizontal = false; | ||
params.nbrOfPeriods = 70; | ||
|
||
auto pattern = ThreeFrequencyHeterodynePattern::create(params); | ||
|
||
vector<Mat> imgs; | ||
pattern->generate(imgs); | ||
|
||
|
||
for (auto _ : state) { | ||
vector<Mat> wrappedPhaseMaps; | ||
Mat floorMap, confidenceMap, unwrapPhaseMap; | ||
pattern->computePhaseMap(imgs, wrappedPhaseMaps); | ||
pattern->computeConfidenceMap(imgs, confidenceMap); | ||
pattern->computeFloorMap(wrappedPhaseMaps, confidenceMap, floorMap); | ||
pattern->unwrapPhaseMap(wrappedPhaseMaps[0], floorMap, confidenceMap, | ||
unwrapPhaseMap); | ||
} | ||
} | ||
|
||
BENCHMARK_REGISTER_F(ThreeFrequencyHeterodynePatternSuit, testGenerate) | ||
->MeasureProcessCPUTime() | ||
->UseRealTime() | ||
->Unit(benchmark::TimeUnit::kMillisecond); | ||
BENCHMARK_REGISTER_F(ThreeFrequencyHeterodynePatternSuit, testGenerateUnwrap) | ||
->MeasureProcessCPUTime() | ||
->UseRealTime() | ||
->Unit(benchmark::TimeUnit::kMillisecond); | ||
|
||
BENCHMARK_MAIN(); |
Oops, something went wrong.