Skip to content

Commit

Permalink
Merge pull request #85 from zivid/2024-04-20-update-csharp-samples
Browse files Browse the repository at this point in the history
Samples: Update CaptureHDRCompleteSettings
  • Loading branch information
andersfagerli authored Jun 17, 2024
2 parents 4827f3e + cf1f46d commit ae3a52d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ static int Main()
var settings = new Zivid.NET.Settings()
{
Engine = Zivid.NET.Settings.EngineOption.Phase,
Sampling = { Color = Zivid.NET.Settings.SamplingGroup.ColorOption.Rgb, Pixel = Zivid.NET.Settings.SamplingGroup.PixelOption.All },
Sampling = { Color = Zivid.NET.Settings.SamplingGroup.ColorOption.Rgb, Pixel = Zivid.NET.Settings.SamplingGroup.PixelOption.BlueSubsample2x2 },
RegionOfInterest = { Box = {
Enabled = true,
PointO = new Zivid.NET.PointXYZ{ x = 1000, y = 1000, z = 1000 },
Expand All @@ -58,6 +58,7 @@ static int Main()
Strength = 0.4 },
Removal = { Enabled = true,
Threshold = 0.5 } } } },
Resampling = { Mode = Zivid.NET.Settings.ProcessingGroup.ResamplingGroup.ModeOption.Upsample2x2},
Color = { Balance = { Red = 1.0, Green = 1.0, Blue = 1.0 },
Gamma = 1.0,
Experimental = { Mode = ColorModeOption.Automatic } } }
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 @@ -249,14 +249,14 @@ foreach (var aperture in new double[] { 9.57, 4.76, 2.59 })
Fully configured settings are demonstrated below.

([go to
source](https://github.com/zivid/zivid-csharp-samples/tree/master//source/Camera/Basic/CaptureHDRCompleteSettings/CaptureHDRCompleteSettings.cs#L31-L92))
source](https://github.com/zivid/zivid-csharp-samples/tree/master//source/Camera/Basic/CaptureHDRCompleteSettings/CaptureHDRCompleteSettings.cs#L31-L93))

``` sourceCode cs
Console.WriteLine("Configuring settings for capture:");
var settings = new Zivid.NET.Settings()
{
Engine = Zivid.NET.Settings.EngineOption.Phase,
Sampling = { Color = Zivid.NET.Settings.SamplingGroup.ColorOption.Rgb, Pixel = Zivid.NET.Settings.SamplingGroup.PixelOption.All },
Sampling = { Color = Zivid.NET.Settings.SamplingGroup.ColorOption.Rgb, Pixel = Zivid.NET.Settings.SamplingGroup.PixelOption.BlueSubsample2x2 },
RegionOfInterest = { Box = {
Enabled = true,
PointO = new Zivid.NET.PointXYZ{ x = 1000, y = 1000, z = 1000 },
Expand All @@ -282,6 +282,7 @@ var settings = new Zivid.NET.Settings()
Strength = 0.4 },
Removal = { Enabled = true,
Threshold = 0.5 } } } },
Resampling = { Mode = Zivid.NET.Settings.ProcessingGroup.ResamplingGroup.ModeOption.Upsample2x2},
Color = { Balance = { Red = 1.0, Green = 1.0, Blue = 1.0 },
Gamma = 1.0,
Experimental = { Mode = ColorModeOption.Automatic } } }
Expand Down Expand Up @@ -343,7 +344,7 @@ Check out
for recommended .yml files tuned for your application.

([go to
source](https://github.com/zivid/zivid-csharp-samples/tree/master//source/Camera/Basic/CaptureHDRCompleteSettings/CaptureHDRCompleteSettings.cs#L104-L109))
source](https://github.com/zivid/zivid-csharp-samples/tree/master//source/Camera/Basic/CaptureHDRCompleteSettings/CaptureHDRCompleteSettings.cs#L105-L110))

``` sourceCode cs
var settingsFile = "Settings.yml";
Expand All @@ -356,7 +357,7 @@ var settingsFromFile = new Zivid.NET.Settings(settingsFile);
You can also save settings to .yml file.

([go to
source](https://github.com/zivid/zivid-csharp-samples/tree/master//source/Camera/Basic/CaptureHDRCompleteSettings/CaptureHDRCompleteSettings.cs#L104-L106))
source](https://github.com/zivid/zivid-csharp-samples/tree/master//source/Camera/Basic/CaptureHDRCompleteSettings/CaptureHDRCompleteSettings.cs#L105-L107))

``` sourceCode cs
var settingsFile = "Settings.yml";
Expand Down

0 comments on commit ae3a52d

Please sign in to comment.