Skip to content

Commit

Permalink
Samples: Update CaptureHDRCompleteSettings and ZIVID_VERSION
Browse files Browse the repository at this point in the history
This updates CaptureHDRCompleteSettings to show the resampling feature
`Zivid::Settings::Processing::Resampling`, and bumps the required SDK
version to SDK 2.12 for the C++ samples.
  • Loading branch information
csu-bot-zivid authored and andersfagerli committed Jun 17, 2024
1 parent a408982 commit e62336c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ include(CompilerOptions)
set(CMAKE_MAP_IMPORTED_CONFIG_MINSIZEREL "MinSizeRel;Release;")
set(CMAKE_MAP_IMPORTED_CONFIG_RELWITHDEBINFO "RelWithDebInfo;Release;")

set(ZIVID_VERSION 2.10.0)
set(ZIVID_VERSION 2.12.0)

option(USE_EIGEN3 "Enable samples which depend on Eigen 3" ON)
option(USE_OPENCV "Enable samples which depend on OpenCV" ON)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ int main()
Zivid::Settings settings{
Zivid::Settings::Engine::phase,
Zivid::Settings::Sampling::Color::rgb,
Zivid::Settings::Sampling::Pixel::all,
Zivid::Settings::Sampling::Pixel::blueSubsample2x2,
Zivid::Settings::RegionOfInterest::Box::Enabled::yes,
Zivid::Settings::RegionOfInterest::Box::PointO{ 1000, 1000, 1000 },
Zivid::Settings::RegionOfInterest::Box::PointA{ 1000, -1000, 1000 },
Expand Down Expand Up @@ -97,6 +97,7 @@ int main()
Zivid::Settings::Processing::Filters::Hole::Repair::Enabled::yes,
Zivid::Settings::Processing::Filters::Hole::Repair::HoleSize{ 0.2 },
Zivid::Settings::Processing::Filters::Hole::Repair::Strictness{ 1 },
Zivid::Settings::Processing::Resampling::Mode::upsample2x2,
Zivid::Settings::Processing::Color::Balance::Red{ 1.0 },
Zivid::Settings::Processing::Color::Balance::Green{ 1.0 },
Zivid::Settings::Processing::Color::Balance::Blue{ 1.0 },
Expand Down
9 changes: 5 additions & 4 deletions source/Camera/Basic/CaptureTutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,14 +248,14 @@ for(const auto aperture : { 11.31, 5.66, 2.83 })
Fully configured settings are demonstrated below.

([go to
source](https://github.com/zivid/zivid-cpp-samples/tree/master//source/Camera/Basic/CaptureHDRCompleteSettings/CaptureHDRCompleteSettings.cpp#L68-L131))
source](https://github.com/zivid/zivid-cpp-samples/tree/master//source/Camera/Basic/CaptureHDRCompleteSettings/CaptureHDRCompleteSettings.cpp#L68-L132))

``` sourceCode cpp
std::cout << "Configuring settings for capture:" << std::endl;
Zivid::Settings settings{
Zivid::Settings::Engine::phase,
Zivid::Settings::Sampling::Color::rgb,
Zivid::Settings::Sampling::Pixel::all,
Zivid::Settings::Sampling::Pixel::blueSubsample2x2,
Zivid::Settings::RegionOfInterest::Box::Enabled::yes,
Zivid::Settings::RegionOfInterest::Box::PointO{ 1000, 1000, 1000 },
Zivid::Settings::RegionOfInterest::Box::PointA{ 1000, -1000, 1000 },
Expand Down Expand Up @@ -283,6 +283,7 @@ Zivid::Settings settings{
Zivid::Settings::Processing::Filters::Hole::Repair::Enabled::yes,
Zivid::Settings::Processing::Filters::Hole::Repair::HoleSize{ 0.2 },
Zivid::Settings::Processing::Filters::Hole::Repair::Strictness{ 1 },
Zivid::Settings::Processing::Resampling::Mode::upsample2x2,
Zivid::Settings::Processing::Color::Balance::Red{ 1.0 },
Zivid::Settings::Processing::Color::Balance::Green{ 1.0 },
Zivid::Settings::Processing::Color::Balance::Blue{ 1.0 },
Expand Down Expand Up @@ -346,7 +347,7 @@ Check out
for recommended .yml files tuned for your application.

([go to
source](https://github.com/zivid/zivid-cpp-samples/tree/master//source/Camera/Basic/CaptureHDRCompleteSettings/CaptureHDRCompleteSettings.cpp#L143-L148))
source](https://github.com/zivid/zivid-cpp-samples/tree/master//source/Camera/Basic/CaptureHDRCompleteSettings/CaptureHDRCompleteSettings.cpp#L144-L149))

``` sourceCode cpp
const auto settingsFile = "Settings.yml";
Expand All @@ -359,7 +360,7 @@ const auto settingsFromFile = Zivid::Settings(settingsFile);
You can also save settings to .yml file.

([go to
source](https://github.com/zivid/zivid-cpp-samples/tree/master//source/Camera/Basic/CaptureHDRCompleteSettings/CaptureHDRCompleteSettings.cpp#L143-L145))
source](https://github.com/zivid/zivid-cpp-samples/tree/master//source/Camera/Basic/CaptureHDRCompleteSettings/CaptureHDRCompleteSettings.cpp#L144-L146))

``` sourceCode cpp
const auto settingsFile = "Settings.yml";
Expand Down

0 comments on commit e62336c

Please sign in to comment.