diff --git a/.gitignore b/.gitignore
index d044ede..bee7ead 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,6 +15,20 @@
packages/
*.nupkg
+[Dd]ebug/
+[Rr]elease/
+x64/
+x86/
+[Aa][Rr][Mm]/
+[Aa][Rr][Mm]64/
+bld/
+[Bb]in/
+[Oo]bj/
+[Ll]ib/ # 重点:过滤lib文件夹
+[Ll]og/
+[Ll]ogs/
+lib/
+
# 排除 Libs 目录中的 DLL 和 PDB 文件(但保留目录结构)
XplorePlane/Libs/Hardware/*.dll
XplorePlane/Libs/Hardware/*.pdb
diff --git a/ExternalLibraries/concrt140.dll b/ExternalLibraries/concrt140.dll
new file mode 100644
index 0000000..402b6ab
Binary files /dev/null and b/ExternalLibraries/concrt140.dll differ
diff --git a/ExternalLibraries/config.json b/ExternalLibraries/config.json
new file mode 100644
index 0000000..28f9fdf
--- /dev/null
+++ b/ExternalLibraries/config.json
@@ -0,0 +1,4 @@
+{
+ "Language": "zh-CN",
+ "LogLevel": "Debug"
+}
\ No newline at end of file
diff --git a/ExternalLibraries/cvextern.dll b/ExternalLibraries/cvextern.dll
new file mode 100644
index 0000000..b1ee33d
Binary files /dev/null and b/ExternalLibraries/cvextern.dll differ
diff --git a/ExternalLibraries/libusb-1.0.dll b/ExternalLibraries/libusb-1.0.dll
new file mode 100644
index 0000000..7b081af
Binary files /dev/null and b/ExternalLibraries/libusb-1.0.dll differ
diff --git a/ExternalLibraries/msvcp140.dll b/ExternalLibraries/msvcp140.dll
new file mode 100644
index 0000000..ce86727
Binary files /dev/null and b/ExternalLibraries/msvcp140.dll differ
diff --git a/ExternalLibraries/msvcp140_1.dll b/ExternalLibraries/msvcp140_1.dll
new file mode 100644
index 0000000..fa8f9fa
Binary files /dev/null and b/ExternalLibraries/msvcp140_1.dll differ
diff --git a/ExternalLibraries/msvcp140_2.dll b/ExternalLibraries/msvcp140_2.dll
new file mode 100644
index 0000000..70cb3d5
Binary files /dev/null and b/ExternalLibraries/msvcp140_2.dll differ
diff --git a/ExternalLibraries/msvcp140_atomic_wait.dll b/ExternalLibraries/msvcp140_atomic_wait.dll
new file mode 100644
index 0000000..0d36920
Binary files /dev/null and b/ExternalLibraries/msvcp140_atomic_wait.dll differ
diff --git a/ExternalLibraries/msvcp140_codecvt_ids.dll b/ExternalLibraries/msvcp140_codecvt_ids.dll
new file mode 100644
index 0000000..bea6252
Binary files /dev/null and b/ExternalLibraries/msvcp140_codecvt_ids.dll differ
diff --git a/ExternalLibraries/opencv_videoio_ffmpeg490_64.dll b/ExternalLibraries/opencv_videoio_ffmpeg490_64.dll
new file mode 100644
index 0000000..1e1f840
Binary files /dev/null and b/ExternalLibraries/opencv_videoio_ffmpeg490_64.dll differ
diff --git a/ExternalLibraries/vcruntime140.dll b/ExternalLibraries/vcruntime140.dll
new file mode 100644
index 0000000..e23644a
Binary files /dev/null and b/ExternalLibraries/vcruntime140.dll differ
diff --git a/ExternalLibraries/vcruntime140_1.dll b/ExternalLibraries/vcruntime140_1.dll
new file mode 100644
index 0000000..39c0ca9
Binary files /dev/null and b/ExternalLibraries/vcruntime140_1.dll differ
diff --git a/ExternalLibraries/version_string.inc b/ExternalLibraries/version_string.inc
new file mode 100644
index 0000000..2448c60
--- /dev/null
+++ b/ExternalLibraries/version_string.inc
@@ -0,0 +1,106 @@
+"\n"
+"General configuration for OpenCV 4.9.0 =====================================\n"
+" Version control: 4.9.0-265-g79534d600a\n"
+"\n"
+" Extra modules:\n"
+" Location (extra): G:/bb/cv_x64/build/build_x86_64/../opencv_contrib/modules\n"
+" Version control (extra): 4.9.0-66-g61e23082\n"
+"\n"
+" Platform:\n"
+" Timestamp: 2024-04-27T12:51:52Z\n"
+" Host: Windows 10.0.22000 AMD64\n"
+" CMake: 3.23.0\n"
+" CMake generator: Visual Studio 17 2022\n"
+" CMake build tool: C:/Program Files/Microsoft Visual Studio/2022/Community/MSBuild/Current/Bin/amd64/MSBuild.exe\n"
+" MSVC: 1939\n"
+" Configuration: Debug Release MinSizeRel RelWithDebInfo\n"
+"\n"
+" CPU/HW features:\n"
+" Baseline: SSE SSE2 SSE3\n"
+" requested: SSE3\n"
+"\n"
+" C/C++:\n"
+" Built as dynamic libs?: NO\n"
+" C++ standard: 11\n"
+" C++ Compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.39.33519/bin/Hostx64/x64/cl.exe (ver 19.39.33523.0)\n"
+" C++ flags (Release): /DWIN32 /D_WINDOWS /W4 /GR /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /fp:precise /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /wd4819 /MP /MD /O2 /Ob2 /DNDEBUG \n"
+" C++ flags (Debug): /DWIN32 /D_WINDOWS /W4 /GR /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /fp:precise /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /wd4819 /MP /MDd /Zi /Ob0 /Od /RTC1 \n"
+" C Compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.39.33519/bin/Hostx64/x64/cl.exe\n"
+" C flags (Release): /DWIN32 /D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /fp:precise /MP /MD /O2 /Ob2 /DNDEBUG \n"
+" C flags (Debug): /DWIN32 /D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /fp:precise /MP /MDd /Zi /Ob0 /Od /RTC1 \n"
+" Linker flags (Release): /machine:x64 /INCREMENTAL:NO \n"
+" Linker flags (Debug): /machine:x64 /debug /INCREMENTAL \n"
+" ccache: NO\n"
+" Precompiled headers: YES\n"
+" Extra dependencies: wsock32 comctl32 gdi32 ole32 setupapi ws2_32 G:/bb/cv_x64/build/build_x86_64/install/lib/freetype.lib G:/bb/cv_x64/build/build_x86_64/install/lib/harfbuzz.lib G:/bb/cv_x64/build/build_x86_64/install/lib/libhdf5.lib\n"
+" 3rdparty dependencies: libprotobuf ade ittnotify libjpeg-turbo libwebp libpng libtiff libopenjp2 IlmImf zlib\n"
+"\n"
+" OpenCV modules:\n"
+" To be built: alphamat aruco bgsegm bioinspired calib3d ccalib core datasets dnn dnn_objdetect dnn_superres dpm face features2d flann freetype fuzzy gapi hdf hfs highgui img_hash imgcodecs imgproc intensity_transform line_descriptor mcc ml objdetect optflow phase_unwrapping photo plot quality rapid reg rgbd saliency shape stereo stitching structured_light superres surface_matching text tracking ts video videoio videostab wechat_qrcode xfeatures2d ximgproc xobjdetect xphoto\n"
+" Disabled: java python_bindings_generator python_tests world\n"
+" Disabled by dependency: -\n"
+" Unavailable: cannops cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev cvv julia matlab ovis python2 python3 sfm viz\n"
+" Applications: perf_tests\n"
+" Documentation: NO\n"
+" Non-free algorithms: NO\n"
+"\n"
+" Windows RT support: NO\n"
+"\n"
+" GUI: WIN32UI\n"
+" Win32 UI: YES\n"
+" VTK support: NO\n"
+"\n"
+" Media I/O: \n"
+" ZLib: build (ver 1.3)\n"
+" JPEG: build-libjpeg-turbo (ver 2.1.3-62)\n"
+" SIMD Support Request: YES\n"
+" SIMD Support: NO\n"
+" WEBP: build (ver encoder: 0x020f)\n"
+" PNG: build (ver 1.6.37)\n"
+" TIFF: build (ver 42 - 4.2.0)\n"
+" JPEG 2000: build (ver 2.5.0)\n"
+" OpenEXR: build (ver 2.3.0)\n"
+" HDR: YES\n"
+" SUNRASTER: YES\n"
+" PXM: YES\n"
+" PFM: YES\n"
+"\n"
+" Video I/O:\n"
+" DC1394: NO\n"
+" FFMPEG: YES (prebuilt binaries)\n"
+" avcodec: YES (58.134.100)\n"
+" avformat: YES (58.76.100)\n"
+" avutil: YES (56.70.100)\n"
+" swscale: YES (5.9.100)\n"
+" avresample: YES (4.0.0)\n"
+" GStreamer: NO\n"
+" DirectShow: YES\n"
+" Media Foundation: YES\n"
+" DXVA: YES\n"
+"\n"
+" Parallel framework: Concurrency\n"
+"\n"
+" Trace: YES (with Intel ITT)\n"
+"\n"
+" Other third-party libraries:\n"
+" Eigen: YES (ver 3.4.0)\n"
+" Custom HAL: NO\n"
+" Protobuf: build (3.19.1)\n"
+" Flatbuffers: builtin/3rdparty (23.5.9)\n"
+"\n"
+" OpenCL: YES (NVD3D11)\n"
+" Include path: G:/bb/cv_x64/build/opencv/3rdparty/include/opencl/1.2\n"
+" Link libraries: Dynamic load\n"
+"\n"
+" Python (for build): C:/python-virt/python37/python.exe\n"
+"\n"
+" Java: \n"
+" ant: NO\n"
+" Java: YES (ver 1.8.0.202)\n"
+" JNI: C:/Program Files/Microsoft/jdk-11.0.16.101-hotspot/include C:/Program Files/Microsoft/jdk-11.0.16.101-hotspot/include/win32 C:/Program Files/Microsoft/jdk-11.0.16.101-hotspot/include\n"
+" Java wrappers: NO\n"
+" Java tests: NO\n"
+"\n"
+" Install to: G:/bb/cv_x64/build/build_x86_64/install\n"
+"-----------------------------------------------------------------\n"
+"\n"
diff --git a/ImageProcessing.Controls/ImageProcessing.Controls.csproj b/ImageProcessing.Controls/ImageProcessing.Controls.csproj
new file mode 100644
index 0000000..e65e58e
--- /dev/null
+++ b/ImageProcessing.Controls/ImageProcessing.Controls.csproj
@@ -0,0 +1,29 @@
+
+
+
+ net8.0-windows
+ enable
+ enable
+ true
+
+
+
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+
+
+ Resources.resx
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ImageProcessing.Controls/LocalizationHelper.cs b/ImageProcessing.Controls/LocalizationHelper.cs
new file mode 100644
index 0000000..af59030
--- /dev/null
+++ b/ImageProcessing.Controls/LocalizationHelper.cs
@@ -0,0 +1,50 @@
+using System.Globalization;
+using System.Resources;
+
+namespace ImageProcessing.Controls;
+
+///
+/// 本地化辅助类,用于管理多语言资源
+/// 与 ImageProcessing 主项目的语言设置同步
+///
+public static class LocalizationHelper
+{
+ private static ResourceManager? _resourceManager;
+
+ ///
+ /// 资源管理器
+ ///
+ private static ResourceManager ResourceManager
+ {
+ get
+ {
+ if (_resourceManager == null)
+ {
+ _resourceManager = new ResourceManager(
+ "ImageProcessing.Controls.Resources.Resources",
+ typeof(LocalizationHelper).Assembly);
+ }
+ return _resourceManager;
+ }
+ }
+
+ ///
+ /// 获取本地化字符串
+ /// 使用当前 UI 文化(与主项目同步)
+ ///
+ /// 资源键
+ /// 本地化字符串
+ public static string GetString(string key)
+ {
+ try
+ {
+ // 使用 CultureInfo.CurrentUICulture,这会自动与主项目的语言设置同步
+ var value = ResourceManager.GetString(key, CultureInfo.CurrentUICulture);
+ return value ?? key;
+ }
+ catch
+ {
+ return key;
+ }
+ }
+}
\ No newline at end of file
diff --git a/ImageProcessing.Controls/ProcessorParameterControl.xaml b/ImageProcessing.Controls/ProcessorParameterControl.xaml
new file mode 100644
index 0000000..bfaa227
--- /dev/null
+++ b/ImageProcessing.Controls/ProcessorParameterControl.xaml
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ImageProcessing.Controls/ProcessorParameterControl.xaml.cs b/ImageProcessing.Controls/ProcessorParameterControl.xaml.cs
new file mode 100644
index 0000000..e966247
--- /dev/null
+++ b/ImageProcessing.Controls/ProcessorParameterControl.xaml.cs
@@ -0,0 +1,377 @@
+using ImageProcessing.Core;
+using System.Windows;
+using System.Windows.Controls;
+
+namespace ImageProcessing.Controls;
+
+///
+/// 通用参数配置 UserControl
+/// 可以根据不同算子的参数自动生成对应的 UI 控件
+///
+public partial class ProcessorParameterControl : UserControl
+{
+ private ImageProcessorBase? _currentProcessor;
+
+ ///
+ /// 参数变化事件
+ ///
+ public event EventHandler? ParameterChanged;
+
+ public ProcessorParameterControl()
+ {
+ InitializeComponent();
+ UpdateNoProcessorText();
+ }
+
+ ///
+ /// 更新"未选择算子"的文本
+ ///
+ private void UpdateNoProcessorText()
+ {
+ txtProcessorName.Text = LocalizationHelper.GetString("NoProcessorSelected");
+ txtProcessorDescription.Text = LocalizationHelper.GetString("PleaseSelectProcessor");
+ }
+
+ ///
+ /// 触发参数变化事件
+ ///
+ protected virtual void OnParameterChanged()
+ {
+ ParameterChanged?.Invoke(this, EventArgs.Empty);
+ }
+
+ ///
+ /// 加载算子参数并生成 UI
+ ///
+ public void LoadProcessor(ImageProcessorBase? processor)
+ {
+ _currentProcessor = processor;
+ pnlParameters.Children.Clear();
+
+ if (processor == null)
+ {
+ UpdateNoProcessorText();
+ return;
+ }
+
+ // 显示算子信息
+ txtProcessorName.Text = processor.Name;
+ txtProcessorDescription.Text = processor.Description;
+
+ // 生成参数控件
+ var parameters = processor.GetParameters();
+
+ foreach (var param in parameters)
+ {
+ CreateParameterControl(param);
+ }
+ }
+
+ ///
+ /// 根据参数类型创建对应的控件
+ ///
+ private void CreateParameterControl(ProcessorParameter param)
+ {
+ // 如果参数不可见,跳过创建
+ if (!param.IsVisible)
+ {
+ return;
+ }
+
+ // 参数标签
+ var label = new TextBlock
+ {
+ Text = param.DisplayName + ":",
+ Margin = new Thickness(0, 10, 0, 5),
+ FontWeight = FontWeights.Bold,
+ FontSize = 13
+ };
+ pnlParameters.Children.Add(label);
+
+ // 根据参数类型创建不同的控件
+ UIElement? control = null;
+
+ if (param.ValueType == typeof(int))
+ {
+ control = CreateIntegerControl(param);
+ }
+ else if (param.ValueType == typeof(double) || param.ValueType == typeof(float))
+ {
+ control = CreateDoubleControl(param);
+ }
+ else if (param.ValueType == typeof(bool))
+ {
+ control = CreateBooleanControl(param);
+ }
+ else if (param.ValueType == typeof(string) && param.Options != null)
+ {
+ control = CreateComboBoxControl(param);
+ }
+ else if (param.ValueType == typeof(string))
+ {
+ control = CreateTextBoxControl(param);
+ }
+
+ if (control != null)
+ {
+ pnlParameters.Children.Add(control);
+
+ // 添加描述标签
+ if (!string.IsNullOrEmpty(param.Description))
+ {
+ var desc = new TextBlock
+ {
+ Text = param.Description,
+ Margin = new Thickness(0, 5, 0, 0),
+ FontSize = 11,
+ Foreground = System.Windows.Media.Brushes.Gray,
+ TextWrapping = TextWrapping.Wrap
+ };
+ pnlParameters.Children.Add(desc);
+ }
+ }
+ }
+
+ ///
+ /// 创建整数类型控件(Slider + TextBox 或仅 TextBox)
+ /// 当 MinValue 和 MaxValue 都为 null 时,只显示文本框,不显示滑块
+ ///
+ private UIElement CreateIntegerControl(ProcessorParameter param)
+ {
+ var panel = new StackPanel();
+
+ var textBox = new TextBox
+ {
+ Text = param.Value.ToString(),
+ Width = 100,
+ HorizontalAlignment = HorizontalAlignment.Left
+ };
+
+ if (param.MinValue != null && param.MaxValue != null)
+ {
+ var slider = new Slider
+ {
+ Minimum = Convert.ToDouble(param.MinValue),
+ Maximum = Convert.ToDouble(param.MaxValue),
+ Value = Convert.ToDouble(param.Value),
+ TickFrequency = 1,
+ IsSnapToTickEnabled = true,
+ Margin = new Thickness(0, 0, 0, 5)
+ };
+
+ slider.ValueChanged += (s, e) =>
+ {
+ int value = (int)slider.Value;
+ textBox.Text = value.ToString();
+ _currentProcessor?.SetParameter(param.Name, value);
+ OnParameterChanged();
+ };
+
+ textBox.TextChanged += (s, e) =>
+ {
+ if (int.TryParse(textBox.Text, out int value))
+ {
+ var min = Convert.ToInt32(param.MinValue);
+ var max = Convert.ToInt32(param.MaxValue);
+
+ if (value >= min && value <= max)
+ {
+ slider.Value = value;
+ }
+ }
+ };
+
+ panel.Children.Add(slider);
+ }
+ else
+ {
+ textBox.TextChanged += (s, e) =>
+ {
+ if (int.TryParse(textBox.Text, out int value))
+ {
+ _currentProcessor?.SetParameter(param.Name, value);
+ OnParameterChanged();
+ }
+ };
+ }
+
+ panel.Children.Add(textBox);
+
+ return panel;
+ }
+
+ ///
+ /// 创建浮点数类型控件(Slider + TextBox 或仅 TextBox)
+ /// 当 MinValue 和 MaxValue 都为 null 时,只显示文本框,不显示滑块
+ ///
+ private UIElement CreateDoubleControl(ProcessorParameter param)
+ {
+ var panel = new StackPanel();
+
+ var textBox = new TextBox
+ {
+ Text = Convert.ToDouble(param.Value).ToString("F2"),
+ Width = 100,
+ HorizontalAlignment = HorizontalAlignment.Left
+ };
+
+ if (param.MinValue != null && param.MaxValue != null)
+ {
+ var slider = new Slider
+ {
+ Minimum = Convert.ToDouble(param.MinValue),
+ Maximum = Convert.ToDouble(param.MaxValue),
+ Value = Convert.ToDouble(param.Value),
+ TickFrequency = 0.1,
+ Margin = new Thickness(0, 0, 0, 5)
+ };
+
+ slider.ValueChanged += (s, e) =>
+ {
+ double value = Math.Round(slider.Value, 2);
+ textBox.Text = value.ToString("F2");
+ _currentProcessor?.SetParameter(param.Name, value);
+ OnParameterChanged();
+ };
+
+ textBox.TextChanged += (s, e) =>
+ {
+ if (double.TryParse(textBox.Text, out double value))
+ {
+ var min = Convert.ToDouble(param.MinValue);
+ var max = Convert.ToDouble(param.MaxValue);
+
+ if (value >= min && value <= max)
+ {
+ slider.Value = value;
+ }
+ }
+ };
+
+ panel.Children.Add(slider);
+ }
+ else
+ {
+ textBox.TextChanged += (s, e) =>
+ {
+ if (double.TryParse(textBox.Text, out double value))
+ {
+ _currentProcessor?.SetParameter(param.Name, value);
+ OnParameterChanged();
+ }
+ };
+ }
+
+ panel.Children.Add(textBox);
+
+ return panel;
+ }
+
+ ///
+ /// 创建布尔类型控件(CheckBox)
+ ///
+ private UIElement CreateBooleanControl(ProcessorParameter param)
+ {
+ var checkBox = new CheckBox
+ {
+ Content = param.DisplayName,
+ IsChecked = Convert.ToBoolean(param.Value),
+ Margin = new Thickness(0, 5, 0, 0)
+ };
+
+ checkBox.Checked += (s, e) =>
+ {
+ _currentProcessor?.SetParameter(param.Name, true);
+ OnParameterChanged();
+ };
+
+ checkBox.Unchecked += (s, e) =>
+ {
+ _currentProcessor?.SetParameter(param.Name, false);
+ OnParameterChanged();
+ };
+
+ return checkBox;
+ }
+
+ ///
+ /// 创建下拉框控件(ComboBox)
+ ///
+ private UIElement CreateComboBoxControl(ProcessorParameter param)
+ {
+ var comboBox = new ComboBox
+ {
+ Margin = new Thickness(0, 5, 0, 0),
+ Width = 200,
+ HorizontalAlignment = HorizontalAlignment.Left
+ };
+
+ if (param.Options != null)
+ {
+ foreach (var option in param.Options)
+ {
+ comboBox.Items.Add(option);
+ }
+ }
+
+ comboBox.SelectedItem = param.Value;
+
+ comboBox.SelectionChanged += (s, e) =>
+ {
+ if (comboBox.SelectedItem != null)
+ {
+ _currentProcessor?.SetParameter(param.Name, comboBox.SelectedItem.ToString()!);
+
+ // 如果是 FilterType 参数,重新加载界面以更新参数可见性
+ if (param.Name == "FilterType")
+ {
+ LoadProcessor(_currentProcessor);
+ }
+
+ OnParameterChanged();
+ }
+ };
+
+ return comboBox;
+ }
+
+ ///
+ /// 创建文本框控件(TextBox)
+ ///
+ private UIElement CreateTextBoxControl(ProcessorParameter param)
+ {
+ var textBox = new TextBox
+ {
+ Text = param.Value?.ToString() ?? "",
+ Margin = new Thickness(0, 5, 0, 0),
+ Width = 200,
+ HorizontalAlignment = HorizontalAlignment.Left
+ };
+
+ textBox.TextChanged += (s, e) =>
+ {
+ _currentProcessor?.SetParameter(param.Name, textBox.Text);
+ OnParameterChanged();
+ };
+
+ return textBox;
+ }
+
+ ///
+ /// 获取当前配置的算子
+ ///
+ public ImageProcessorBase? GetProcessor()
+ {
+ return _currentProcessor;
+ }
+
+ ///
+ /// 清空参数控件
+ ///
+ public void Clear()
+ {
+ _currentProcessor = null;
+ pnlParameters.Children.Clear();
+ UpdateNoProcessorText();
+ }
+}
\ No newline at end of file
diff --git a/ImageProcessing.Controls/Resources/Resources.resx b/ImageProcessing.Controls/Resources/Resources.resx
new file mode 100644
index 0000000..2bd022a
--- /dev/null
+++ b/ImageProcessing.Controls/Resources/Resources.resx
@@ -0,0 +1,69 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+
+
+ No Processor Selected
+
+
+ Please select an image processor
+
+
diff --git a/ImageProcessing.Controls/Resources/Resources.zh-CN.resx b/ImageProcessing.Controls/Resources/Resources.zh-CN.resx
new file mode 100644
index 0000000..db35d1d
--- /dev/null
+++ b/ImageProcessing.Controls/Resources/Resources.zh-CN.resx
@@ -0,0 +1,69 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+
+
+ 未选择算子
+
+
+ 请选择一个图像处理算子
+
+
diff --git a/ImageProcessing.Core/ImageProcessing.Core.csproj b/ImageProcessing.Core/ImageProcessing.Core.csproj
new file mode 100644
index 0000000..1ffa374
--- /dev/null
+++ b/ImageProcessing.Core/ImageProcessing.Core.csproj
@@ -0,0 +1,14 @@
+
+
+
+ net8.0-windows
+ enable
+ enable
+
+
+
+
+
+
+
+
diff --git a/ImageProcessing.Core/ImageProcessorBase.cs b/ImageProcessing.Core/ImageProcessorBase.cs
new file mode 100644
index 0000000..2644079
--- /dev/null
+++ b/ImageProcessing.Core/ImageProcessorBase.cs
@@ -0,0 +1,181 @@
+// ============================================================================
+// Copyright © 2026 Hexagon Technology Center GmbH. All Rights Reserved.
+// 文件名: ImageProcessorBase.cs
+// 描述: 8位图像处理算子基类,定义图像处理算子的通用接口和行为
+// 功能:
+// - 定义算子的基本属性(名称、描述)
+// - 参数管理(设置、获取、验证)
+// - ROI(感兴趣区域)处理支持
+// - 输出数据管理(用于传递额外信息如轮廓等)
+// - 为所有8位图像处理算子提供统一的基础框架
+// 设计模式: 模板方法模式
+// 作者: 李伟 wei.lw.li@hexagon.com
+// ============================================================================
+
+using Emgu.CV;
+using Emgu.CV.Structure;
+using Emgu.CV.Util;
+
+namespace ImageProcessing.Core;
+
+///
+/// 图像处理算子基类
+///
+public abstract class ImageProcessorBase
+{
+ /// 算子名称
+ public string Name { get; protected set; } = string.Empty;
+
+ /// 算子描述
+ public string Description { get; protected set; } = string.Empty;
+
+ /// 参数字典
+ protected Dictionary Parameters { get; set; }
+
+ /// 输出数据(用于传递额外信息如轮廓等)
+ public Dictionary OutputData { get; protected set; }
+
+ /// ROI区域
+ public System.Drawing.Rectangle? ROI { get; set; }
+
+ /// 多边形ROI点集
+ public System.Drawing.Point[]? PolygonROIPoints { get; set; }
+
+ protected ImageProcessorBase()
+ {
+ Parameters = new Dictionary();
+ OutputData = new Dictionary();
+ InitializeParameters();
+ }
+
+ ///
+ /// 初始化算子参数(子类实现)
+ ///
+ protected abstract void InitializeParameters();
+
+ ///
+ /// 执行图像处理(子类实现)
+ ///
+ public abstract Image Process(Image inputImage);
+
+ ///
+ /// 执行图像处理(带矩形ROI支持)
+ ///
+ public Image ProcessWithROI(Image inputImage)
+ {
+ if (ROI.HasValue && ROI.Value != System.Drawing.Rectangle.Empty)
+ {
+ inputImage.ROI = ROI.Value;
+ var roiImage = inputImage.Copy();
+ inputImage.ROI = System.Drawing.Rectangle.Empty;
+
+ var processedROI = Process(roiImage);
+
+ // 将 ROI 偏移量保存到输出数据中,供轮廓绘制等使用
+ OutputData["ROIOffset"] = new System.Drawing.Point(ROI.Value.X, ROI.Value.Y);
+
+ var result = inputImage.Clone();
+ result.ROI = ROI.Value;
+ processedROI.CopyTo(result);
+ result.ROI = System.Drawing.Rectangle.Empty;
+
+ roiImage.Dispose();
+ processedROI.Dispose();
+ return result;
+ }
+ return Process(inputImage);
+ }
+
+ ///
+ /// 执行图像处理(带多边形ROI掩码支持)
+ ///
+ public Image ProcessWithPolygonROI(Image inputImage)
+ {
+ if (PolygonROIPoints == null || PolygonROIPoints.Length < 3)
+ {
+ return Process(inputImage);
+ }
+
+ // 创建掩码
+ var mask = new Image(inputImage.Width, inputImage.Height);
+ mask.SetValue(new Gray(0));
+
+ // 绘制多边形掩码(白色表示ROI区域)
+ using (var vop = new VectorOfPoint(PolygonROIPoints))
+ {
+ using (var vvop = new VectorOfVectorOfPoint(vop))
+ {
+ CvInvoke.DrawContours(mask, vvop, 0, new MCvScalar(255), -1);
+ }
+ }
+
+ // 处理整个图像
+ var processedImage = Process(inputImage);
+
+ // 创建结果图像
+ var result = inputImage.Clone();
+
+ // 使用掩码:ROI内使用处理后的像素,ROI外保持原始像素
+ for (int y = 0; y < inputImage.Height; y++)
+ {
+ for (int x = 0; x < inputImage.Width; x++)
+ {
+ if (mask.Data[y, x, 0] > 0) // 在ROI内
+ {
+ result.Data[y, x, 0] = processedImage.Data[y, x, 0];
+ }
+ }
+ }
+
+ // 保存ROI信息
+ OutputData["ROIMask"] = mask;
+ OutputData["PolygonPoints"] = PolygonROIPoints;
+ OutputData["ROIOffset"] = System.Drawing.Point.Empty;
+
+ processedImage.Dispose();
+ return result;
+ }
+
+ ///
+ /// 获取所有参数列表
+ ///
+ public List GetParameters()
+ {
+ return new List(Parameters.Values);
+ }
+
+ ///
+ /// 设置参数值
+ ///
+ public void SetParameter(string name, object value)
+ {
+ if (Parameters.ContainsKey(name))
+ {
+ Parameters[name].Value = value;
+ }
+ else
+ {
+ throw new ArgumentException($"参数 {name} 不存在");
+ }
+ }
+
+ ///
+ /// 获取参数值
+ ///
+ public T GetParameter(string name)
+ {
+ if (Parameters.ContainsKey(name))
+ {
+ return (T)Convert.ChangeType(Parameters[name].Value, typeof(T))!;
+ }
+ throw new ArgumentException($"参数 {name} 不存在");
+ }
+
+ ///
+ /// 获取单个参数
+ ///
+ public ProcessorParameter? GetParameterInfo(string name)
+ {
+ return Parameters.ContainsKey(name) ? Parameters[name] : null;
+ }
+}
\ No newline at end of file
diff --git a/ImageProcessing.Core/ProcessorParameter.cs b/ImageProcessing.Core/ProcessorParameter.cs
new file mode 100644
index 0000000..670281d
--- /dev/null
+++ b/ImageProcessing.Core/ProcessorParameter.cs
@@ -0,0 +1,60 @@
+// ============================================================================
+// Copyright © 2026 Hexagon Technology Center GmbH. All Rights Reserved.
+// 文件名: ProcessorParameter.cs
+// 描述: 图像处理算子参数定义类,用于描述算子的可配置参数
+// 功能:
+// - 定义参数的基本属性(名称、类型、默认值)
+// - 支持参数范围约束(最小值、最大值)
+// - 支持枚举类型参数(下拉选项)
+// - 提供参数描述信息用于UI显示
+// - 统一的参数管理机制
+// 作者: 李伟 wei.lw.li@hexagon.com
+// ============================================================================
+
+namespace ImageProcessing.Core;
+
+///
+/// 图像处理算子参数定义
+///
+public class ProcessorParameter
+{
+ /// 参数名称(代码中使用)
+ public string Name { get; set; }
+
+ /// 显示名称(UI中显示)
+ public string DisplayName { get; set; }
+
+ /// 参数类型
+ public Type ValueType { get; set; }
+
+ /// 当前值
+ public object Value { get; set; }
+
+ /// 最小值(可选)
+ public object? MinValue { get; set; }
+
+ /// 最大值(可选)
+ public object? MaxValue { get; set; }
+
+ /// 参数描述
+ public string Description { get; set; }
+
+ /// 可选值列表(用于下拉框)
+ public string[]? Options { get; set; }
+
+ /// 参数是否可见
+ public bool IsVisible { get; set; } = true;
+
+ public ProcessorParameter(string name, string displayName, Type valueType, object defaultValue,
+ object? minValue = null, object? maxValue = null, string description = "", string[]? options = null)
+ {
+ Name = name;
+ DisplayName = displayName;
+ ValueType = valueType;
+ Value = defaultValue;
+ MinValue = minValue;
+ MaxValue = maxValue;
+ Description = description;
+ Options = options;
+ }
+}
\ No newline at end of file
diff --git a/ImageProcessing.Processors/ImageProcessing.Processors.csproj b/ImageProcessing.Processors/ImageProcessing.Processors.csproj
new file mode 100644
index 0000000..6db6112
--- /dev/null
+++ b/ImageProcessing.Processors/ImageProcessing.Processors.csproj
@@ -0,0 +1,42 @@
+
+
+
+ net8.0-windows
+ enable
+ enable
+ true
+
+
+
+
+ PublicResXFileCodeGenerator
+ Resources.Designer.cs
+
+
+ Resources.resx
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ True
+ True
+ Resources.resx
+
+
+
+
diff --git a/ImageProcessing.Processors/LocalizationHelper.cs b/ImageProcessing.Processors/LocalizationHelper.cs
new file mode 100644
index 0000000..67d6158
--- /dev/null
+++ b/ImageProcessing.Processors/LocalizationHelper.cs
@@ -0,0 +1,50 @@
+using System.Globalization;
+using System.Resources;
+
+namespace ImageProcessing.Processors;
+
+///
+/// 本地化辅助类,用于管理多语言资源
+/// 与 ImageProcessing 主项目的语言设置同步
+///
+public static class LocalizationHelper
+{
+ private static ResourceManager? _resourceManager;
+
+ ///
+ /// 资源管理器
+ ///
+ private static ResourceManager ResourceManager
+ {
+ get
+ {
+ if (_resourceManager == null)
+ {
+ _resourceManager = new ResourceManager(
+ "ImageProcessing.Processors.Resources.Resources",
+ typeof(LocalizationHelper).Assembly);
+ }
+ return _resourceManager;
+ }
+ }
+
+ ///
+ /// 获取本地化字符串
+ /// 使用当前 UI 文化(与主项目同步)
+ ///
+ /// 资源键
+ /// 本地化字符串
+ public static string GetString(string key)
+ {
+ try
+ {
+ // 使用 CultureInfo.CurrentUICulture,这会自动与主项目的语言设置同步
+ var value = ResourceManager.GetString(key, CultureInfo.CurrentUICulture);
+ return value ?? key;
+ }
+ catch
+ {
+ return key;
+ }
+ }
+}
\ No newline at end of file
diff --git a/ImageProcessing.Processors/Resources/Resources.Designer.cs b/ImageProcessing.Processors/Resources/Resources.Designer.cs
new file mode 100644
index 0000000..79d8d5a
--- /dev/null
+++ b/ImageProcessing.Processors/Resources/Resources.Designer.cs
@@ -0,0 +1,2169 @@
+//------------------------------------------------------------------------------
+//
+// 此代码由工具生成。
+// 运行时版本:4.0.30319.42000
+//
+// 对此文件的更改可能会导致不正确的行为,并且如果
+// 重新生成代码,这些更改将会丢失。
+//
+//------------------------------------------------------------------------------
+
+namespace ImageProcessing.Processors.Resources {
+ using System;
+
+
+ ///
+ /// 一个强类型的资源类,用于查找本地化的字符串等。
+ ///
+ // 此类是由 StronglyTypedResourceBuilder
+ // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
+ // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
+ // (以 /str 作为命令选项),或重新生成 VS 项目。
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ public class Resources {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources() {
+ }
+
+ ///
+ /// 返回此类使用的缓存的 ResourceManager 实例。
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ public static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ImageProcessing.Processors.Resources.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ ///
+ /// 重写当前线程的 CurrentUICulture 属性,对
+ /// 使用此强类型资源类的所有资源查找执行重写。
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ public static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+
+ ///
+ /// 查找类似 Preserve image information within specified frequency range 的本地化字符串。
+ ///
+ public static string BandPassFilterProcessor_Description {
+ get {
+ return ResourceManager.GetString("BandPassFilterProcessor_Description", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Filter Type 的本地化字符串。
+ ///
+ public static string BandPassFilterProcessor_FilterType {
+ get {
+ return ResourceManager.GetString("BandPassFilterProcessor_FilterType", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Transition characteristics of the filter 的本地化字符串。
+ ///
+ public static string BandPassFilterProcessor_FilterType_Desc {
+ get {
+ return ResourceManager.GetString("BandPassFilterProcessor_FilterType_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 High Cutoff Radius 的本地化字符串。
+ ///
+ public static string BandPassFilterProcessor_HighCutoff {
+ get {
+ return ResourceManager.GetString("BandPassFilterProcessor_HighCutoff", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Components above this frequency will be removed 的本地化字符串。
+ ///
+ public static string BandPassFilterProcessor_HighCutoff_Desc {
+ get {
+ return ResourceManager.GetString("BandPassFilterProcessor_HighCutoff_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Low Cutoff Radius 的本地化字符串。
+ ///
+ public static string BandPassFilterProcessor_LowCutoff {
+ get {
+ return ResourceManager.GetString("BandPassFilterProcessor_LowCutoff", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Components below this frequency will be removed 的本地化字符串。
+ ///
+ public static string BandPassFilterProcessor_LowCutoff_Desc {
+ get {
+ return ResourceManager.GetString("BandPassFilterProcessor_LowCutoff_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Band Pass Filter 的本地化字符串。
+ ///
+ public static string BandPassFilterProcessor_Name {
+ get {
+ return ResourceManager.GetString("BandPassFilterProcessor_Name", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Butterworth Order 的本地化字符串。
+ ///
+ public static string BandPassFilterProcessor_Order {
+ get {
+ return ResourceManager.GetString("BandPassFilterProcessor_Order", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Order of Butterworth filter 的本地化字符串。
+ ///
+ public static string BandPassFilterProcessor_Order_Desc {
+ get {
+ return ResourceManager.GetString("BandPassFilterProcessor_Order_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Edge-preserving smoothing filter 的本地化字符串。
+ ///
+ public static string BilateralFilterProcessor_Description {
+ get {
+ return ResourceManager.GetString("BilateralFilterProcessor_Description", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Diameter 的本地化字符串。
+ ///
+ public static string BilateralFilterProcessor_Diameter {
+ get {
+ return ResourceManager.GetString("BilateralFilterProcessor_Diameter", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Diameter of each pixel neighborhood 的本地化字符串。
+ ///
+ public static string BilateralFilterProcessor_Diameter_Desc {
+ get {
+ return ResourceManager.GetString("BilateralFilterProcessor_Diameter_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Bilateral Filter 的本地化字符串。
+ ///
+ public static string BilateralFilterProcessor_Name {
+ get {
+ return ResourceManager.GetString("BilateralFilterProcessor_Name", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Sigma Color 的本地化字符串。
+ ///
+ public static string BilateralFilterProcessor_SigmaColor {
+ get {
+ return ResourceManager.GetString("BilateralFilterProcessor_SigmaColor", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Filter sigma in the color space 的本地化字符串。
+ ///
+ public static string BilateralFilterProcessor_SigmaColor_Desc {
+ get {
+ return ResourceManager.GetString("BilateralFilterProcessor_SigmaColor_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Sigma Space 的本地化字符串。
+ ///
+ public static string BilateralFilterProcessor_SigmaSpace {
+ get {
+ return ResourceManager.GetString("BilateralFilterProcessor_SigmaSpace", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Filter sigma in the coordinate space 的本地化字符串。
+ ///
+ public static string BilateralFilterProcessor_SigmaSpace_Desc {
+ get {
+ return ResourceManager.GetString("BilateralFilterProcessor_SigmaSpace_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Detect contours in image and output contour information 的本地化字符串。
+ ///
+ public static string ContourProcessor_Description {
+ get {
+ return ResourceManager.GetString("ContourProcessor_Description", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Max Area 的本地化字符串。
+ ///
+ public static string ContourProcessor_MaxArea {
+ get {
+ return ResourceManager.GetString("ContourProcessor_MaxArea", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Filter contours larger than this area 的本地化字符串。
+ ///
+ public static string ContourProcessor_MaxArea_Desc {
+ get {
+ return ResourceManager.GetString("ContourProcessor_MaxArea_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Min Area 的本地化字符串。
+ ///
+ public static string ContourProcessor_MinArea {
+ get {
+ return ResourceManager.GetString("ContourProcessor_MinArea", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Filter contours smaller than this area 的本地化字符串。
+ ///
+ public static string ContourProcessor_MinArea_Desc {
+ get {
+ return ResourceManager.GetString("ContourProcessor_MinArea_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Contour Detection 的本地化字符串。
+ ///
+ public static string ContourProcessor_Name {
+ get {
+ return ResourceManager.GetString("ContourProcessor_Name", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Target Color 的本地化字符串。
+ ///
+ public static string ContourProcessor_TargetColor {
+ get {
+ return ResourceManager.GetString("ContourProcessor_TargetColor", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Select the color of regions to find (white or black) 的本地化字符串。
+ ///
+ public static string ContourProcessor_TargetColor_Desc {
+ get {
+ return ResourceManager.GetString("ContourProcessor_TargetColor_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Line Thickness 的本地化字符串。
+ ///
+ public static string ContourProcessor_Thickness {
+ get {
+ return ResourceManager.GetString("ContourProcessor_Thickness", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Thickness of contour lines 的本地化字符串。
+ ///
+ public static string ContourProcessor_Thickness_Desc {
+ get {
+ return ResourceManager.GetString("ContourProcessor_Thickness_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Threshold Value 的本地化字符串。
+ ///
+ public static string ContourProcessor_ThresholdValue {
+ get {
+ return ResourceManager.GetString("ContourProcessor_ThresholdValue", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Threshold value for binarization (0-255) 的本地化字符串。
+ ///
+ public static string ContourProcessor_ThresholdValue_Desc {
+ get {
+ return ResourceManager.GetString("ContourProcessor_ThresholdValue_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Use Otsu Auto Threshold 的本地化字符串。
+ ///
+ public static string ContourProcessor_UseOtsu {
+ get {
+ return ResourceManager.GetString("ContourProcessor_UseOtsu", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Automatically calculate optimal threshold 的本地化字符串。
+ ///
+ public static string ContourProcessor_UseOtsu_Desc {
+ get {
+ return ResourceManager.GetString("ContourProcessor_UseOtsu_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Enable Threshold 的本地化字符串。
+ ///
+ public static string ContourProcessor_UseThreshold {
+ get {
+ return ResourceManager.GetString("ContourProcessor_UseThreshold", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Apply binary threshold before contour detection 的本地化字符串。
+ ///
+ public static string ContourProcessor_UseThreshold_Desc {
+ get {
+ return ResourceManager.GetString("ContourProcessor_UseThreshold_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Auto Contrast 的本地化字符串。
+ ///
+ public static string ContrastProcessor_AutoContrast {
+ get {
+ return ResourceManager.GetString("ContrastProcessor_AutoContrast", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Automatically stretch contrast to full range 的本地化字符串。
+ ///
+ public static string ContrastProcessor_AutoContrast_Desc {
+ get {
+ return ResourceManager.GetString("ContrastProcessor_AutoContrast_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Brightness 的本地化字符串。
+ ///
+ public static string ContrastProcessor_Brightness {
+ get {
+ return ResourceManager.GetString("ContrastProcessor_Brightness", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Brightness offset 的本地化字符串。
+ ///
+ public static string ContrastProcessor_Brightness_Desc {
+ get {
+ return ResourceManager.GetString("ContrastProcessor_Brightness_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 CLAHE Clip Limit 的本地化字符串。
+ ///
+ public static string ContrastProcessor_ClipLimit {
+ get {
+ return ResourceManager.GetString("ContrastProcessor_ClipLimit", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 CLAHE contrast limit threshold 的本地化字符串。
+ ///
+ public static string ContrastProcessor_ClipLimit_Desc {
+ get {
+ return ResourceManager.GetString("ContrastProcessor_ClipLimit_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Contrast 的本地化字符串。
+ ///
+ public static string ContrastProcessor_Contrast {
+ get {
+ return ResourceManager.GetString("ContrastProcessor_Contrast", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Contrast gain, 1.0 for original contrast 的本地化字符串。
+ ///
+ public static string ContrastProcessor_Contrast_Desc {
+ get {
+ return ResourceManager.GetString("ContrastProcessor_Contrast_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Adjust image contrast and brightness 的本地化字符串。
+ ///
+ public static string ContrastProcessor_Description {
+ get {
+ return ResourceManager.GetString("ContrastProcessor_Description", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Contrast Adjustment 的本地化字符串。
+ ///
+ public static string ContrastProcessor_Name {
+ get {
+ return ResourceManager.GetString("ContrastProcessor_Name", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Use CLAHE 的本地化字符串。
+ ///
+ public static string ContrastProcessor_UseCLAHE {
+ get {
+ return ResourceManager.GetString("ContrastProcessor_UseCLAHE", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Use Contrast Limited Adaptive Histogram Equalization 的本地化字符串。
+ ///
+ public static string ContrastProcessor_UseCLAHE_Desc {
+ get {
+ return ResourceManager.GetString("ContrastProcessor_UseCLAHE_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Perform division operation on image for background correction and normalization 的本地化字符串。
+ ///
+ public static string DivisionProcessor_Description {
+ get {
+ return ResourceManager.GetString("DivisionProcessor_Description", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Divisor 的本地化字符串。
+ ///
+ public static string DivisionProcessor_Divisor {
+ get {
+ return ResourceManager.GetString("DivisionProcessor_Divisor", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Each pixel value will be divided by this number 的本地化字符串。
+ ///
+ public static string DivisionProcessor_Divisor_Desc {
+ get {
+ return ResourceManager.GetString("DivisionProcessor_Divisor_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Division Operation 的本地化字符串。
+ ///
+ public static string DivisionProcessor_Name {
+ get {
+ return ResourceManager.GetString("DivisionProcessor_Name", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Normalize Output 的本地化字符串。
+ ///
+ public static string DivisionProcessor_Normalize {
+ get {
+ return ResourceManager.GetString("DivisionProcessor_Normalize", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Normalize result to 0-255 range 的本地化字符串。
+ ///
+ public static string DivisionProcessor_Normalize_Desc {
+ get {
+ return ResourceManager.GetString("DivisionProcessor_Normalize_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Scale Factor 的本地化字符串。
+ ///
+ public static string DivisionProcessor_Scale {
+ get {
+ return ResourceManager.GetString("DivisionProcessor_Scale", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Division result multiplied by this scale factor 的本地化字符串。
+ ///
+ public static string DivisionProcessor_Scale_Desc {
+ get {
+ return ResourceManager.GetString("DivisionProcessor_Scale_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Preserve image information within specified frequency range 的本地化字符串。
+ ///
+ public static string FilterProcessor_BandPass_Desc {
+ get {
+ return ResourceManager.GetString("FilterProcessor_BandPass_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Band Pass Filter 的本地化字符串。
+ ///
+ public static string FilterProcessor_BandPass_Name {
+ get {
+ return ResourceManager.GetString("FilterProcessor_BandPass_Name", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Band Pass Filter Type 的本地化字符串。
+ ///
+ public static string FilterProcessor_BandPassFilterType {
+ get {
+ return ResourceManager.GetString("FilterProcessor_BandPassFilterType", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Transition characteristics of the band pass filter 的本地化字符串。
+ ///
+ public static string FilterProcessor_BandPassFilterType_Desc {
+ get {
+ return ResourceManager.GetString("FilterProcessor_BandPassFilterType_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Edge-preserving smoothing filter 的本地化字符串。
+ ///
+ public static string FilterProcessor_Bilateral_Desc {
+ get {
+ return ResourceManager.GetString("FilterProcessor_Bilateral_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Bilateral Filter 的本地化字符串。
+ ///
+ public static string FilterProcessor_Bilateral_Name {
+ get {
+ return ResourceManager.GetString("FilterProcessor_Bilateral_Name", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Cutoff Frequency 的本地化字符串。
+ ///
+ public static string FilterProcessor_D0 {
+ get {
+ return ResourceManager.GetString("FilterProcessor_D0", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Cutoff frequency for frequency domain filtering 的本地化字符串。
+ ///
+ public static string FilterProcessor_D0_Desc {
+ get {
+ return ResourceManager.GetString("FilterProcessor_D0_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Integrated multiple filtering methods 的本地化字符串。
+ ///
+ public static string FilterProcessor_Description {
+ get {
+ return ResourceManager.GetString("FilterProcessor_Description", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Filter Type 的本地化字符串。
+ ///
+ public static string FilterProcessor_FilterType {
+ get {
+ return ResourceManager.GetString("FilterProcessor_FilterType", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Select filtering method 的本地化字符串。
+ ///
+ public static string FilterProcessor_FilterType_Desc {
+ get {
+ return ResourceManager.GetString("FilterProcessor_FilterType_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Smooth image and reduce Gaussian noise while preserving edges 的本地化字符串。
+ ///
+ public static string FilterProcessor_Gaussian_Desc {
+ get {
+ return ResourceManager.GetString("FilterProcessor_Gaussian_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Gaussian Filter 的本地化字符串。
+ ///
+ public static string FilterProcessor_Gaussian_Name {
+ get {
+ return ResourceManager.GetString("FilterProcessor_Gaussian_Name", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 High Cutoff Radius 的本地化字符串。
+ ///
+ public static string FilterProcessor_HighCutoff {
+ get {
+ return ResourceManager.GetString("FilterProcessor_HighCutoff", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Components above this frequency will be removed 的本地化字符串。
+ ///
+ public static string FilterProcessor_HighCutoff_Desc {
+ get {
+ return ResourceManager.GetString("FilterProcessor_HighCutoff_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Edge enhancement in frequency domain 的本地化字符串。
+ ///
+ public static string FilterProcessor_HighPass_Desc {
+ get {
+ return ResourceManager.GetString("FilterProcessor_HighPass_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 High Pass Filter 的本地化字符串。
+ ///
+ public static string FilterProcessor_HighPass_Name {
+ get {
+ return ResourceManager.GetString("FilterProcessor_HighPass_Name", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Kernel Size 的本地化字符串。
+ ///
+ public static string FilterProcessor_KernelSize {
+ get {
+ return ResourceManager.GetString("FilterProcessor_KernelSize", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Size of the filter kernel (must be odd) 的本地化字符串。
+ ///
+ public static string FilterProcessor_KernelSize_Desc {
+ get {
+ return ResourceManager.GetString("FilterProcessor_KernelSize_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Low Cutoff Radius 的本地化字符串。
+ ///
+ public static string FilterProcessor_LowCutoff {
+ get {
+ return ResourceManager.GetString("FilterProcessor_LowCutoff", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Components below this frequency will be removed 的本地化字符串。
+ ///
+ public static string FilterProcessor_LowCutoff_Desc {
+ get {
+ return ResourceManager.GetString("FilterProcessor_LowCutoff_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Remove high frequency noise in frequency domain 的本地化字符串。
+ ///
+ public static string FilterProcessor_LowPass_Desc {
+ get {
+ return ResourceManager.GetString("FilterProcessor_LowPass_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Low Pass Filter 的本地化字符串。
+ ///
+ public static string FilterProcessor_LowPass_Name {
+ get {
+ return ResourceManager.GetString("FilterProcessor_LowPass_Name", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Simple averaging smoothing filter 的本地化字符串。
+ ///
+ public static string FilterProcessor_Mean_Desc {
+ get {
+ return ResourceManager.GetString("FilterProcessor_Mean_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Mean Filter 的本地化字符串。
+ ///
+ public static string FilterProcessor_Mean_Name {
+ get {
+ return ResourceManager.GetString("FilterProcessor_Mean_Name", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Remove salt-and-pepper noise effectively 的本地化字符串。
+ ///
+ public static string FilterProcessor_Median_Desc {
+ get {
+ return ResourceManager.GetString("FilterProcessor_Median_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Median Filter 的本地化字符串。
+ ///
+ public static string FilterProcessor_Median_Name {
+ get {
+ return ResourceManager.GetString("FilterProcessor_Median_Name", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Comprehensive Filter 的本地化字符串。
+ ///
+ public static string FilterProcessor_Name {
+ get {
+ return ResourceManager.GetString("FilterProcessor_Name", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Butterworth Order 的本地化字符串。
+ ///
+ public static string FilterProcessor_Order {
+ get {
+ return ResourceManager.GetString("FilterProcessor_Order", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Order of Butterworth filter 的本地化字符串。
+ ///
+ public static string FilterProcessor_Order_Desc {
+ get {
+ return ResourceManager.GetString("FilterProcessor_Order_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Sigma 的本地化字符串。
+ ///
+ public static string FilterProcessor_Sigma {
+ get {
+ return ResourceManager.GetString("FilterProcessor_Sigma", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Standard deviation for Gaussian/Bilateral filter 的本地化字符串。
+ ///
+ public static string FilterProcessor_Sigma_Desc {
+ get {
+ return ResourceManager.GetString("FilterProcessor_Sigma_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Adjust image brightness through Gamma value 的本地化字符串。
+ ///
+ public static string GammaProcessor_Description {
+ get {
+ return ResourceManager.GetString("GammaProcessor_Description", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Gain 的本地化字符串。
+ ///
+ public static string GammaProcessor_Gain {
+ get {
+ return ResourceManager.GetString("GammaProcessor_Gain", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Output gain coefficient 的本地化字符串。
+ ///
+ public static string GammaProcessor_Gain_Desc {
+ get {
+ return ResourceManager.GetString("GammaProcessor_Gain_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Gamma Value 的本地化字符串。
+ ///
+ public static string GammaProcessor_Gamma {
+ get {
+ return ResourceManager.GetString("GammaProcessor_Gamma", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Gamma value, less than 1 darkens image, greater than 1 brightens image 的本地化字符串。
+ ///
+ public static string GammaProcessor_Gamma_Desc {
+ get {
+ return ResourceManager.GetString("GammaProcessor_Gamma_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Gamma Correction 的本地化字符串。
+ ///
+ public static string GammaProcessor_Name {
+ get {
+ return ResourceManager.GetString("GammaProcessor_Name", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Smooth image using Gaussian kernel 的本地化字符串。
+ ///
+ public static string GaussianBlurProcessor_Description {
+ get {
+ return ResourceManager.GetString("GaussianBlurProcessor_Description", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Kernel Size 的本地化字符串。
+ ///
+ public static string GaussianBlurProcessor_KernelSize {
+ get {
+ return ResourceManager.GetString("GaussianBlurProcessor_KernelSize", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Size of Gaussian kernel, must be odd 的本地化字符串。
+ ///
+ public static string GaussianBlurProcessor_KernelSize_Desc {
+ get {
+ return ResourceManager.GetString("GaussianBlurProcessor_KernelSize_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Gaussian Blur 的本地化字符串。
+ ///
+ public static string GaussianBlurProcessor_Name {
+ get {
+ return ResourceManager.GetString("GaussianBlurProcessor_Name", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Standard Deviation 的本地化字符串。
+ ///
+ public static string GaussianBlurProcessor_Sigma {
+ get {
+ return ResourceManager.GetString("GaussianBlurProcessor_Sigma", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Standard deviation of Gaussian kernel, controls blur amount 的本地化字符串。
+ ///
+ public static string GaussianBlurProcessor_Sigma_Desc {
+ get {
+ return ResourceManager.GetString("GaussianBlurProcessor_Sigma_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Convert image to grayscale 的本地化字符串。
+ ///
+ public static string GrayscaleProcessor_Description {
+ get {
+ return ResourceManager.GetString("GrayscaleProcessor_Description", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Conversion Method 的本地化字符串。
+ ///
+ public static string GrayscaleProcessor_Method {
+ get {
+ return ResourceManager.GetString("GrayscaleProcessor_Method", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Method for grayscale conversion 的本地化字符串。
+ ///
+ public static string GrayscaleProcessor_Method_Desc {
+ get {
+ return ResourceManager.GetString("GrayscaleProcessor_Method_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Grayscale Conversion 的本地化字符串。
+ ///
+ public static string GrayscaleProcessor_Name {
+ get {
+ return ResourceManager.GetString("GrayscaleProcessor_Name", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Bias 的本地化字符串。
+ ///
+ public static string HDREnhancementProcessor_Bias {
+ get {
+ return ResourceManager.GetString("HDREnhancementProcessor_Bias", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Bias for adaptive logarithmic and Drago mapping, controls dark/bright balance 的本地化字符串。
+ ///
+ public static string HDREnhancementProcessor_Bias_Desc {
+ get {
+ return ResourceManager.GetString("HDREnhancementProcessor_Bias_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 High Dynamic Range image enhancement with tone mapping 的本地化字符串。
+ ///
+ public static string HDREnhancementProcessor_Description {
+ get {
+ return ResourceManager.GetString("HDREnhancementProcessor_Description", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Detail Boost 的本地化字符串。
+ ///
+ public static string HDREnhancementProcessor_DetailBoost {
+ get {
+ return ResourceManager.GetString("HDREnhancementProcessor_DetailBoost", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Detail enhancement factor, higher values reveal more fine details 的本地化字符串。
+ ///
+ public static string HDREnhancementProcessor_DetailBoost_Desc {
+ get {
+ return ResourceManager.GetString("HDREnhancementProcessor_DetailBoost_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Gamma 的本地化字符串。
+ ///
+ public static string HDREnhancementProcessor_Gamma {
+ get {
+ return ResourceManager.GetString("HDREnhancementProcessor_Gamma", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Gamma correction value for output brightness adjustment 的本地化字符串。
+ ///
+ public static string HDREnhancementProcessor_Gamma_Desc {
+ get {
+ return ResourceManager.GetString("HDREnhancementProcessor_Gamma_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Tone Mapping Method 的本地化字符串。
+ ///
+ public static string HDREnhancementProcessor_Method {
+ get {
+ return ResourceManager.GetString("HDREnhancementProcessor_Method", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Select HDR tone mapping algorithm: LocalToneMap, AdaptiveLog, Drago, BilateralToneMap 的本地化字符串。
+ ///
+ public static string HDREnhancementProcessor_Method_Desc {
+ get {
+ return ResourceManager.GetString("HDREnhancementProcessor_Method_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 HDR Enhancement 的本地化字符串。
+ ///
+ public static string HDREnhancementProcessor_Name {
+ get {
+ return ResourceManager.GetString("HDREnhancementProcessor_Name", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Saturation 的本地化字符串。
+ ///
+ public static string HDREnhancementProcessor_Saturation {
+ get {
+ return ResourceManager.GetString("HDREnhancementProcessor_Saturation", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Contrast saturation factor for LocalToneMap method 的本地化字符串。
+ ///
+ public static string HDREnhancementProcessor_Saturation_Desc {
+ get {
+ return ResourceManager.GetString("HDREnhancementProcessor_Saturation_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Sigma Color 的本地化字符串。
+ ///
+ public static string HDREnhancementProcessor_SigmaColor {
+ get {
+ return ResourceManager.GetString("HDREnhancementProcessor_SigmaColor", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Color sigma for bilateral tone mapping, controls edge preservation 的本地化字符串。
+ ///
+ public static string HDREnhancementProcessor_SigmaColor_Desc {
+ get {
+ return ResourceManager.GetString("HDREnhancementProcessor_SigmaColor_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Sigma Space 的本地化字符串。
+ ///
+ public static string HDREnhancementProcessor_SigmaSpace {
+ get {
+ return ResourceManager.GetString("HDREnhancementProcessor_SigmaSpace", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Spatial sigma for base layer extraction, controls smoothing range 的本地化字符串。
+ ///
+ public static string HDREnhancementProcessor_SigmaSpace_Desc {
+ get {
+ return ResourceManager.GetString("HDREnhancementProcessor_SigmaSpace_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Cutoff Frequency 的本地化字符串。
+ ///
+ public static string HighPassFilterProcessor_CutoffFrequency {
+ get {
+ return ResourceManager.GetString("HighPassFilterProcessor_CutoffFrequency", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Cutoff frequency for high pass filter 的本地化字符串。
+ ///
+ public static string HighPassFilterProcessor_CutoffFrequency_Desc {
+ get {
+ return ResourceManager.GetString("HighPassFilterProcessor_CutoffFrequency_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Edge enhancement in frequency domain 的本地化字符串。
+ ///
+ public static string HighPassFilterProcessor_Description {
+ get {
+ return ResourceManager.GetString("HighPassFilterProcessor_Description", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 High Pass Filter 的本地化字符串。
+ ///
+ public static string HighPassFilterProcessor_Name {
+ get {
+ return ResourceManager.GetString("HighPassFilterProcessor_Name", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Clip Limit 的本地化字符串。
+ ///
+ public static string HistogramEqualizationProcessor_ClipLimit {
+ get {
+ return ResourceManager.GetString("HistogramEqualizationProcessor_ClipLimit", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Contrast limiting threshold for CLAHE 的本地化字符串。
+ ///
+ public static string HistogramEqualizationProcessor_ClipLimit_Desc {
+ get {
+ return ResourceManager.GetString("HistogramEqualizationProcessor_ClipLimit_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Enhance image contrast 的本地化字符串。
+ ///
+ public static string HistogramEqualizationProcessor_Description {
+ get {
+ return ResourceManager.GetString("HistogramEqualizationProcessor_Description", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Equalization Method 的本地化字符串。
+ ///
+ public static string HistogramEqualizationProcessor_Method {
+ get {
+ return ResourceManager.GetString("HistogramEqualizationProcessor_Method", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Select histogram equalization algorithm 的本地化字符串。
+ ///
+ public static string HistogramEqualizationProcessor_Method_Desc {
+ get {
+ return ResourceManager.GetString("HistogramEqualizationProcessor_Method_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Histogram Equalization 的本地化字符串。
+ ///
+ public static string HistogramEqualizationProcessor_Name {
+ get {
+ return ResourceManager.GetString("HistogramEqualizationProcessor_Name", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Tile Size 的本地化字符串。
+ ///
+ public static string HistogramEqualizationProcessor_TileSize {
+ get {
+ return ResourceManager.GetString("HistogramEqualizationProcessor_TileSize", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Tile size for CLAHE 的本地化字符串。
+ ///
+ public static string HistogramEqualizationProcessor_TileSize_Desc {
+ get {
+ return ResourceManager.GetString("HistogramEqualizationProcessor_TileSize_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Detect horizontal edges specifically 的本地化字符串。
+ ///
+ public static string HorizontalEdgeProcessor_Description {
+ get {
+ return ResourceManager.GetString("HorizontalEdgeProcessor_Description", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Detection Method 的本地化字符串。
+ ///
+ public static string HorizontalEdgeProcessor_Method {
+ get {
+ return ResourceManager.GetString("HorizontalEdgeProcessor_Method", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Select horizontal edge detection algorithm 的本地化字符串。
+ ///
+ public static string HorizontalEdgeProcessor_Method_Desc {
+ get {
+ return ResourceManager.GetString("HorizontalEdgeProcessor_Method_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Horizontal Edge Detection 的本地化字符串。
+ ///
+ public static string HorizontalEdgeProcessor_Name {
+ get {
+ return ResourceManager.GetString("HorizontalEdgeProcessor_Name", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Sensitivity 的本地化字符串。
+ ///
+ public static string HorizontalEdgeProcessor_Sensitivity {
+ get {
+ return ResourceManager.GetString("HorizontalEdgeProcessor_Sensitivity", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Edge detection sensitivity 的本地化字符串。
+ ///
+ public static string HorizontalEdgeProcessor_Sensitivity_Desc {
+ get {
+ return ResourceManager.GetString("HorizontalEdgeProcessor_Sensitivity_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Threshold 的本地化字符串。
+ ///
+ public static string HorizontalEdgeProcessor_Threshold {
+ get {
+ return ResourceManager.GetString("HorizontalEdgeProcessor_Threshold", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Edge detection threshold 的本地化字符串。
+ ///
+ public static string HorizontalEdgeProcessor_Threshold_Desc {
+ get {
+ return ResourceManager.GetString("HorizontalEdgeProcessor_Threshold_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Detect image edges using Kirsch operator 的本地化字符串。
+ ///
+ public static string KirschEdgeProcessor_Description {
+ get {
+ return ResourceManager.GetString("KirschEdgeProcessor_Description", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Kirsch Edge Detection 的本地化字符串。
+ ///
+ public static string KirschEdgeProcessor_Name {
+ get {
+ return ResourceManager.GetString("KirschEdgeProcessor_Name", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Scale Factor 的本地化字符串。
+ ///
+ public static string KirschEdgeProcessor_Scale {
+ get {
+ return ResourceManager.GetString("KirschEdgeProcessor_Scale", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Scale factor for edge intensity 的本地化字符串。
+ ///
+ public static string KirschEdgeProcessor_Scale_Desc {
+ get {
+ return ResourceManager.GetString("KirschEdgeProcessor_Scale_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Threshold 的本地化字符串。
+ ///
+ public static string KirschEdgeProcessor_Threshold {
+ get {
+ return ResourceManager.GetString("KirschEdgeProcessor_Threshold", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Edge detection threshold 的本地化字符串。
+ ///
+ public static string KirschEdgeProcessor_Threshold_Desc {
+ get {
+ return ResourceManager.GetString("KirschEdgeProcessor_Threshold_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Cutoff Frequency 的本地化字符串。
+ ///
+ public static string LowPassFilterProcessor_CutoffFrequency {
+ get {
+ return ResourceManager.GetString("LowPassFilterProcessor_CutoffFrequency", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Cutoff frequency for low pass filter 的本地化字符串。
+ ///
+ public static string LowPassFilterProcessor_CutoffFrequency_Desc {
+ get {
+ return ResourceManager.GetString("LowPassFilterProcessor_CutoffFrequency_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Remove high frequency noise in frequency domain 的本地化字符串。
+ ///
+ public static string LowPassFilterProcessor_Description {
+ get {
+ return ResourceManager.GetString("LowPassFilterProcessor_Description", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Low Pass Filter 的本地化字符串。
+ ///
+ public static string LowPassFilterProcessor_Name {
+ get {
+ return ResourceManager.GetString("LowPassFilterProcessor_Name", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Simple averaging smoothing filter 的本地化字符串。
+ ///
+ public static string MeanFilterProcessor_Description {
+ get {
+ return ResourceManager.GetString("MeanFilterProcessor_Description", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Kernel Size 的本地化字符串。
+ ///
+ public static string MeanFilterProcessor_KernelSize {
+ get {
+ return ResourceManager.GetString("MeanFilterProcessor_KernelSize", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Size of the filter kernel (must be odd) 的本地化字符串。
+ ///
+ public static string MeanFilterProcessor_KernelSize_Desc {
+ get {
+ return ResourceManager.GetString("MeanFilterProcessor_KernelSize_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Mean Filter 的本地化字符串。
+ ///
+ public static string MeanFilterProcessor_Name {
+ get {
+ return ResourceManager.GetString("MeanFilterProcessor_Name", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Remove salt-and-pepper noise effectively 的本地化字符串。
+ ///
+ public static string MedianFilterProcessor_Description {
+ get {
+ return ResourceManager.GetString("MedianFilterProcessor_Description", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Kernel Size 的本地化字符串。
+ ///
+ public static string MedianFilterProcessor_KernelSize {
+ get {
+ return ResourceManager.GetString("MedianFilterProcessor_KernelSize", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Size of the filter kernel (must be odd) 的本地化字符串。
+ ///
+ public static string MedianFilterProcessor_KernelSize_Desc {
+ get {
+ return ResourceManager.GetString("MedianFilterProcessor_KernelSize_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Median Filter 的本地化字符串。
+ ///
+ public static string MedianFilterProcessor_Name {
+ get {
+ return ResourceManager.GetString("MedianFilterProcessor_Name", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Flip image horizontally, vertically, or both 的本地化字符串。
+ ///
+ public static string MirrorProcessor_Description {
+ get {
+ return ResourceManager.GetString("MirrorProcessor_Description", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Direction 的本地化字符串。
+ ///
+ public static string MirrorProcessor_Direction {
+ get {
+ return ResourceManager.GetString("MirrorProcessor_Direction", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Flip direction: Horizontal (left-right), Vertical (up-down), Both (180° rotation) 的本地化字符串。
+ ///
+ public static string MirrorProcessor_Direction_Desc {
+ get {
+ return ResourceManager.GetString("MirrorProcessor_Direction_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Mirror 的本地化字符串。
+ ///
+ public static string MirrorProcessor_Name {
+ get {
+ return ResourceManager.GetString("MirrorProcessor_Name", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Perform morphological operations (erosion, dilation, opening, closing) 的本地化字符串。
+ ///
+ public static string MorphologyProcessor_Description {
+ get {
+ return ResourceManager.GetString("MorphologyProcessor_Description", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Iterations 的本地化字符串。
+ ///
+ public static string MorphologyProcessor_Iterations {
+ get {
+ return ResourceManager.GetString("MorphologyProcessor_Iterations", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Number of times to repeat morphological operation 的本地化字符串。
+ ///
+ public static string MorphologyProcessor_Iterations_Desc {
+ get {
+ return ResourceManager.GetString("MorphologyProcessor_Iterations_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Kernel Size 的本地化字符串。
+ ///
+ public static string MorphologyProcessor_KernelSize {
+ get {
+ return ResourceManager.GetString("MorphologyProcessor_KernelSize", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Size of structuring element 的本地化字符串。
+ ///
+ public static string MorphologyProcessor_KernelSize_Desc {
+ get {
+ return ResourceManager.GetString("MorphologyProcessor_KernelSize_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Morphology Processing 的本地化字符串。
+ ///
+ public static string MorphologyProcessor_Name {
+ get {
+ return ResourceManager.GetString("MorphologyProcessor_Name", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Operation Type 的本地化字符串。
+ ///
+ public static string MorphologyProcessor_Operation {
+ get {
+ return ResourceManager.GetString("MorphologyProcessor_Operation", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Select morphological operation type 的本地化字符串。
+ ///
+ public static string MorphologyProcessor_Operation_Desc {
+ get {
+ return ResourceManager.GetString("MorphologyProcessor_Operation_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Color Map 的本地化字符串。
+ ///
+ public static string PseudoColorProcessor_ColorMap {
+ get {
+ return ResourceManager.GetString("PseudoColorProcessor_ColorMap", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Select color mapping table for rendering 的本地化字符串。
+ ///
+ public static string PseudoColorProcessor_ColorMap_Desc {
+ get {
+ return ResourceManager.GetString("PseudoColorProcessor_ColorMap_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Map grayscale image to color image using color maps 的本地化字符串。
+ ///
+ public static string PseudoColorProcessor_Description {
+ get {
+ return ResourceManager.GetString("PseudoColorProcessor_Description", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Invert Color Map 的本地化字符串。
+ ///
+ public static string PseudoColorProcessor_InvertMap {
+ get {
+ return ResourceManager.GetString("PseudoColorProcessor_InvertMap", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Reverse the color mapping direction 的本地化字符串。
+ ///
+ public static string PseudoColorProcessor_InvertMap_Desc {
+ get {
+ return ResourceManager.GetString("PseudoColorProcessor_InvertMap_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Max Gray Value 的本地化字符串。
+ ///
+ public static string PseudoColorProcessor_MaxValue {
+ get {
+ return ResourceManager.GetString("PseudoColorProcessor_MaxValue", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Gray values above this will be clipped to maximum color 的本地化字符串。
+ ///
+ public static string PseudoColorProcessor_MaxValue_Desc {
+ get {
+ return ResourceManager.GetString("PseudoColorProcessor_MaxValue_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Min Gray Value 的本地化字符串。
+ ///
+ public static string PseudoColorProcessor_MinValue {
+ get {
+ return ResourceManager.GetString("PseudoColorProcessor_MinValue", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Gray values below this will be clipped to minimum color 的本地化字符串。
+ ///
+ public static string PseudoColorProcessor_MinValue_Desc {
+ get {
+ return ResourceManager.GetString("PseudoColorProcessor_MinValue_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Pseudo Color Rendering 的本地化字符串。
+ ///
+ public static string PseudoColorProcessor_Name {
+ get {
+ return ResourceManager.GetString("PseudoColorProcessor_Name", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Multi-scale shadow correction and illumination equalization based on Retinex 的本地化字符串。
+ ///
+ public static string RetinexProcessor_Description {
+ get {
+ return ResourceManager.GetString("RetinexProcessor_Description", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Gain 的本地化字符串。
+ ///
+ public static string RetinexProcessor_Gain {
+ get {
+ return ResourceManager.GetString("RetinexProcessor_Gain", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Output gain factor 的本地化字符串。
+ ///
+ public static string RetinexProcessor_Gain_Desc {
+ get {
+ return ResourceManager.GetString("RetinexProcessor_Gain_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Processing Method 的本地化字符串。
+ ///
+ public static string RetinexProcessor_Method {
+ get {
+ return ResourceManager.GetString("RetinexProcessor_Method", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Select Retinex algorithm type 的本地化字符串。
+ ///
+ public static string RetinexProcessor_Method_Desc {
+ get {
+ return ResourceManager.GetString("RetinexProcessor_Method_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Retinex Shadow Correction 的本地化字符串。
+ ///
+ public static string RetinexProcessor_Name {
+ get {
+ return ResourceManager.GetString("RetinexProcessor_Name", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Offset 的本地化字符串。
+ ///
+ public static string RetinexProcessor_Offset {
+ get {
+ return ResourceManager.GetString("RetinexProcessor_Offset", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Output offset value 的本地化字符串。
+ ///
+ public static string RetinexProcessor_Offset_Desc {
+ get {
+ return ResourceManager.GetString("RetinexProcessor_Offset_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Scale 1 (Small) 的本地化字符串。
+ ///
+ public static string RetinexProcessor_Sigma1 {
+ get {
+ return ResourceManager.GetString("RetinexProcessor_Sigma1", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Small scale Gaussian kernel sigma for detail enhancement 的本地化字符串。
+ ///
+ public static string RetinexProcessor_Sigma1_Desc {
+ get {
+ return ResourceManager.GetString("RetinexProcessor_Sigma1_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Scale 2 (Medium) 的本地化字符串。
+ ///
+ public static string RetinexProcessor_Sigma2 {
+ get {
+ return ResourceManager.GetString("RetinexProcessor_Sigma2", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Medium scale Gaussian kernel sigma for local illumination correction 的本地化字符串。
+ ///
+ public static string RetinexProcessor_Sigma2_Desc {
+ get {
+ return ResourceManager.GetString("RetinexProcessor_Sigma2_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Scale 3 (Large) 的本地化字符串。
+ ///
+ public static string RetinexProcessor_Sigma3 {
+ get {
+ return ResourceManager.GetString("RetinexProcessor_Sigma3", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Large scale Gaussian kernel sigma for global illumination correction 的本地化字符串。
+ ///
+ public static string RetinexProcessor_Sigma3_Desc {
+ get {
+ return ResourceManager.GetString("RetinexProcessor_Sigma3_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Angle 的本地化字符串。
+ ///
+ public static string RotateProcessor_Angle {
+ get {
+ return ResourceManager.GetString("RotateProcessor_Angle", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Rotation angle in degrees, positive is counter-clockwise 的本地化字符串。
+ ///
+ public static string RotateProcessor_Angle_Desc {
+ get {
+ return ResourceManager.GetString("RotateProcessor_Angle_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Background 的本地化字符串。
+ ///
+ public static string RotateProcessor_BackgroundValue {
+ get {
+ return ResourceManager.GetString("RotateProcessor_BackgroundValue", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Background fill value (0-255) for areas outside the original image 的本地化字符串。
+ ///
+ public static string RotateProcessor_BackgroundValue_Desc {
+ get {
+ return ResourceManager.GetString("RotateProcessor_BackgroundValue_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Rotate image by arbitrary angle with optional canvas expansion 的本地化字符串。
+ ///
+ public static string RotateProcessor_Description {
+ get {
+ return ResourceManager.GetString("RotateProcessor_Description", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Expand Canvas 的本地化字符串。
+ ///
+ public static string RotateProcessor_ExpandCanvas {
+ get {
+ return ResourceManager.GetString("RotateProcessor_ExpandCanvas", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Expand canvas to fit the entire rotated image, otherwise crop to original size 的本地化字符串。
+ ///
+ public static string RotateProcessor_ExpandCanvas_Desc {
+ get {
+ return ResourceManager.GetString("RotateProcessor_ExpandCanvas_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Interpolation 的本地化字符串。
+ ///
+ public static string RotateProcessor_Interpolation {
+ get {
+ return ResourceManager.GetString("RotateProcessor_Interpolation", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Interpolation method: Nearest (fast), Bilinear (smooth), Bicubic (high quality) 的本地化字符串。
+ ///
+ public static string RotateProcessor_Interpolation_Desc {
+ get {
+ return ResourceManager.GetString("RotateProcessor_Interpolation_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Rotate 的本地化字符串。
+ ///
+ public static string RotateProcessor_Name {
+ get {
+ return ResourceManager.GetString("RotateProcessor_Name", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Enhance image edges and details 的本地化字符串。
+ ///
+ public static string SharpenProcessor_Description {
+ get {
+ return ResourceManager.GetString("SharpenProcessor_Description", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Kernel Size 的本地化字符串。
+ ///
+ public static string SharpenProcessor_KernelSize {
+ get {
+ return ResourceManager.GetString("SharpenProcessor_KernelSize", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Size of sharpening kernel (must be odd) 的本地化字符串。
+ ///
+ public static string SharpenProcessor_KernelSize_Desc {
+ get {
+ return ResourceManager.GetString("SharpenProcessor_KernelSize_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Sharpen Method 的本地化字符串。
+ ///
+ public static string SharpenProcessor_Method {
+ get {
+ return ResourceManager.GetString("SharpenProcessor_Method", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Select sharpening algorithm 的本地化字符串。
+ ///
+ public static string SharpenProcessor_Method_Desc {
+ get {
+ return ResourceManager.GetString("SharpenProcessor_Method_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Sharpen 的本地化字符串。
+ ///
+ public static string SharpenProcessor_Name {
+ get {
+ return ResourceManager.GetString("SharpenProcessor_Name", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Strength 的本地化字符串。
+ ///
+ public static string SharpenProcessor_Strength {
+ get {
+ return ResourceManager.GetString("SharpenProcessor_Strength", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Strength of sharpening effect 的本地化字符串。
+ ///
+ public static string SharpenProcessor_Strength_Desc {
+ get {
+ return ResourceManager.GetString("SharpenProcessor_Strength_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Edge enhancement and denoising 的本地化字符串。
+ ///
+ public static string ShockFilterProcessor_Description {
+ get {
+ return ResourceManager.GetString("ShockFilterProcessor_Description", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Time Step 的本地化字符串。
+ ///
+ public static string ShockFilterProcessor_Dt {
+ get {
+ return ResourceManager.GetString("ShockFilterProcessor_Dt", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Evolution time step 的本地化字符串。
+ ///
+ public static string ShockFilterProcessor_Dt_Desc {
+ get {
+ return ResourceManager.GetString("ShockFilterProcessor_Dt_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Iterations 的本地化字符串。
+ ///
+ public static string ShockFilterProcessor_Iterations {
+ get {
+ return ResourceManager.GetString("ShockFilterProcessor_Iterations", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Number of filter iterations 的本地化字符串。
+ ///
+ public static string ShockFilterProcessor_Iterations_Desc {
+ get {
+ return ResourceManager.GetString("ShockFilterProcessor_Iterations_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Shock Filter 的本地化字符串。
+ ///
+ public static string ShockFilterProcessor_Name {
+ get {
+ return ResourceManager.GetString("ShockFilterProcessor_Name", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Threshold 的本地化字符串。
+ ///
+ public static string ShockFilterProcessor_Theta {
+ get {
+ return ResourceManager.GetString("ShockFilterProcessor_Theta", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Edge detection threshold 的本地化字符串。
+ ///
+ public static string ShockFilterProcessor_Theta_Desc {
+ get {
+ return ResourceManager.GetString("ShockFilterProcessor_Theta_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Detect image edges using Sobel operator 的本地化字符串。
+ ///
+ public static string SobelEdgeProcessor_Description {
+ get {
+ return ResourceManager.GetString("SobelEdgeProcessor_Description", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Detection Direction 的本地化字符串。
+ ///
+ public static string SobelEdgeProcessor_Direction {
+ get {
+ return ResourceManager.GetString("SobelEdgeProcessor_Direction", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Select edge detection direction 的本地化字符串。
+ ///
+ public static string SobelEdgeProcessor_Direction_Desc {
+ get {
+ return ResourceManager.GetString("SobelEdgeProcessor_Direction_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Kernel Size 的本地化字符串。
+ ///
+ public static string SobelEdgeProcessor_KernelSize {
+ get {
+ return ResourceManager.GetString("SobelEdgeProcessor_KernelSize", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Sobel operator kernel size (odd number) 的本地化字符串。
+ ///
+ public static string SobelEdgeProcessor_KernelSize_Desc {
+ get {
+ return ResourceManager.GetString("SobelEdgeProcessor_KernelSize_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Sobel Edge Detection 的本地化字符串。
+ ///
+ public static string SobelEdgeProcessor_Name {
+ get {
+ return ResourceManager.GetString("SobelEdgeProcessor_Name", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Scale Factor 的本地化字符串。
+ ///
+ public static string SobelEdgeProcessor_Scale {
+ get {
+ return ResourceManager.GetString("SobelEdgeProcessor_Scale", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Scale factor for edge intensity 的本地化字符串。
+ ///
+ public static string SobelEdgeProcessor_Scale_Desc {
+ get {
+ return ResourceManager.GetString("SobelEdgeProcessor_Scale_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Binarize image 的本地化字符串。
+ ///
+ public static string ThresholdProcessor_Description {
+ get {
+ return ResourceManager.GetString("ThresholdProcessor_Description", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Max Value 的本地化字符串。
+ ///
+ public static string ThresholdProcessor_MaxValue {
+ get {
+ return ResourceManager.GetString("ThresholdProcessor_MaxValue", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Pixels above threshold will be set to this value 的本地化字符串。
+ ///
+ public static string ThresholdProcessor_MaxValue_Desc {
+ get {
+ return ResourceManager.GetString("ThresholdProcessor_MaxValue_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Threshold Segmentation 的本地化字符串。
+ ///
+ public static string ThresholdProcessor_Name {
+ get {
+ return ResourceManager.GetString("ThresholdProcessor_Name", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Threshold 的本地化字符串。
+ ///
+ public static string ThresholdProcessor_Threshold {
+ get {
+ return ResourceManager.GetString("ThresholdProcessor_Threshold", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Binarization threshold, pixels above this value will be set to max value 的本地化字符串。
+ ///
+ public static string ThresholdProcessor_Threshold_Desc {
+ get {
+ return ResourceManager.GetString("ThresholdProcessor_Threshold_Desc", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Use Otsu Auto Threshold 的本地化字符串。
+ ///
+ public static string ThresholdProcessor_UseOtsu {
+ get {
+ return ResourceManager.GetString("ThresholdProcessor_UseOtsu", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 When enabled, optimal threshold will be calculated automatically 的本地化字符串。
+ ///
+ public static string ThresholdProcessor_UseOtsu_Desc {
+ get {
+ return ResourceManager.GetString("ThresholdProcessor_UseOtsu_Desc", resourceCulture);
+ }
+ }
+ }
+}
diff --git a/ImageProcessing.Processors/Resources/Resources.resx b/ImageProcessing.Processors/Resources/Resources.resx
new file mode 100644
index 0000000..eacc699
--- /dev/null
+++ b/ImageProcessing.Processors/Resources/Resources.resx
@@ -0,0 +1,1293 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+
+
+ Contrast Adjustment
+
+
+ Adjust image contrast and brightness
+
+
+ Contrast
+
+
+ Contrast gain, 1.0 for original contrast
+
+
+ Brightness
+
+
+ Brightness offset
+
+
+ Auto Contrast
+
+
+ Automatically stretch contrast to full range
+
+
+ Use CLAHE
+
+
+ Use Contrast Limited Adaptive Histogram Equalization
+
+
+ CLAHE Clip Limit
+
+
+ CLAHE contrast limit threshold
+
+
+
+
+ Band Pass Filter
+
+
+ Preserve image information within specified frequency range
+
+
+ Low Cutoff Radius
+
+
+ Components below this frequency will be removed
+
+
+ High Cutoff Radius
+
+
+ Components above this frequency will be removed
+
+
+ Filter Type
+
+
+ Transition characteristics of the filter
+
+
+ Butterworth Order
+
+
+ Order of Butterworth filter
+
+
+
+
+ Contour Detection
+
+
+ Detect contours in image and output contour information
+
+
+ Target Color
+
+
+ Select the color of regions to find (white or black)
+
+
+ Enable Threshold
+
+
+ Apply binary threshold before contour detection
+
+
+ Threshold Value
+
+
+ Threshold value for binarization (0-255)
+
+
+ Use Otsu Auto Threshold
+
+
+ Automatically calculate optimal threshold
+
+
+ Min Area
+
+
+ Filter contours smaller than this area
+
+
+ Max Area
+
+
+ Filter contours larger than this area
+
+
+ Line Thickness
+
+
+ Thickness of contour lines
+
+
+
+
+ Division Operation
+
+
+ Perform division operation on image for background correction and normalization
+
+
+ Divisor
+
+
+ Each pixel value will be divided by this number
+
+
+ Scale Factor
+
+
+ Division result multiplied by this scale factor
+
+
+ Normalize Output
+
+
+ Normalize result to 0-255 range
+
+
+
+
+ Gamma Correction
+
+
+ Adjust image brightness through Gamma value
+
+
+ Gamma Value
+
+
+ Gamma value, less than 1 darkens image, greater than 1 brightens image
+
+
+ Gain
+
+
+ Output gain coefficient
+
+
+
+
+ Gaussian Blur
+
+
+ Smooth image using Gaussian kernel
+
+
+ Kernel Size
+
+
+ Size of Gaussian kernel, must be odd
+
+
+ Standard Deviation
+
+
+ Standard deviation of Gaussian kernel, controls blur amount
+
+
+
+
+ Morphology Processing
+
+
+ Perform morphological operations (erosion, dilation, opening, closing)
+
+
+ Operation Type
+
+
+ Select morphological operation type
+
+
+ Kernel Size
+
+
+ Size of structuring element
+
+
+ Iterations
+
+
+ Number of times to repeat morphological operation
+
+
+
+
+ Shock Filter
+
+
+ Edge enhancement and denoising
+
+
+ Iterations
+
+
+ Number of filter iterations
+
+
+ Threshold
+
+
+ Edge detection threshold
+
+
+ Time Step
+
+
+ Evolution time step
+
+
+
+
+ Threshold Segmentation
+
+
+ Binarize image
+
+
+ Threshold
+
+
+ Binarization threshold, pixels above this value will be set to max value
+
+
+ Max Value
+
+
+ Pixels above threshold will be set to this value
+
+
+ Use Otsu Auto Threshold
+
+
+ When enabled, optimal threshold will be calculated automatically
+
+
+
+
+ Comprehensive Filter
+
+
+ Integrated multiple filtering methods
+
+
+ Filter Type
+
+
+ Select filtering method
+
+
+ Kernel Size
+
+
+ Size of the filter kernel (must be odd)
+
+
+ Sigma
+
+
+ Standard deviation for Gaussian/Bilateral filter
+
+
+ Cutoff Frequency
+
+
+ Cutoff frequency for frequency domain filtering
+
+
+ Low Cutoff Radius
+
+
+ Components below this frequency will be removed
+
+
+ High Cutoff Radius
+
+
+ Components above this frequency will be removed
+
+
+ Band Pass Filter Type
+
+
+ Transition characteristics of the band pass filter
+
+
+ Butterworth Order
+
+
+ Order of Butterworth filter
+
+
+
+
+ Gaussian Filter
+
+
+ Smooth image and reduce Gaussian noise while preserving edges
+
+
+
+
+ Median Filter
+
+
+ Remove salt-and-pepper noise effectively
+
+
+
+
+ Mean Filter
+
+
+ Simple averaging smoothing filter
+
+
+
+
+ Bilateral Filter
+
+
+ Edge-preserving smoothing filter
+
+
+
+
+ Low Pass Filter
+
+
+ Remove high frequency noise in frequency domain
+
+
+
+
+ High Pass Filter
+
+
+ Edge enhancement in frequency domain
+
+
+
+
+ Band Pass Filter
+
+
+ Preserve image information within specified frequency range
+
+
+
+
+ Median Filter
+
+
+ Remove salt-and-pepper noise effectively
+
+
+ Kernel Size
+
+
+ Size of the filter kernel (must be odd)
+
+
+
+
+ Mean Filter
+
+
+ Simple averaging smoothing filter
+
+
+ Kernel Size
+
+
+ Size of the filter kernel (must be odd)
+
+
+
+
+ Bilateral Filter
+
+
+ Edge-preserving smoothing filter
+
+
+ Diameter
+
+
+ Diameter of each pixel neighborhood
+
+
+ Sigma Color
+
+
+ Filter sigma in the color space
+
+
+ Sigma Space
+
+
+ Filter sigma in the coordinate space
+
+
+
+
+ Low Pass Filter
+
+
+ Remove high frequency noise in frequency domain
+
+
+ Cutoff Frequency
+
+
+ Cutoff frequency for low pass filter
+
+
+
+
+ High Pass Filter
+
+
+ Edge enhancement in frequency domain
+
+
+ Cutoff Frequency
+
+
+ Cutoff frequency for high pass filter
+
+
+
+
+ Grayscale Conversion
+
+
+ Convert image to grayscale
+
+
+ Conversion Method
+
+
+ Method for grayscale conversion
+
+
+
+
+ Sharpen
+
+
+ Enhance image edges and details
+
+
+ Sharpen Method
+
+
+ Select sharpening algorithm
+
+
+ Strength
+
+
+ Strength of sharpening effect
+
+
+ Kernel Size
+
+
+ Size of sharpening kernel (must be odd)
+
+
+
+
+ Histogram Equalization
+
+
+ Enhance image contrast
+
+
+ Equalization Method
+
+
+ Select histogram equalization algorithm
+
+
+ Clip Limit
+
+
+ Contrast limiting threshold for CLAHE
+
+
+ Tile Size
+
+
+ Tile size for CLAHE
+
+
+
+
+ Sobel Edge Detection
+
+
+ Detect image edges using Sobel operator
+
+
+ Detection Direction
+
+
+ Select edge detection direction
+
+
+ Kernel Size
+
+
+ Sobel operator kernel size (odd number)
+
+
+ Scale Factor
+
+
+ Scale factor for edge intensity
+
+
+
+
+ Kirsch Edge Detection
+
+
+ Detect image edges using Kirsch operator
+
+
+ Threshold
+
+
+ Edge detection threshold
+
+
+ Scale Factor
+
+
+ Scale factor for edge intensity
+
+
+
+
+ Horizontal Edge Detection
+
+
+ Detect horizontal edges specifically
+
+
+ Detection Method
+
+
+ Select horizontal edge detection algorithm
+
+
+ Sensitivity
+
+
+ Edge detection sensitivity
+
+
+ Threshold
+
+
+ Edge detection threshold
+
+
+
+
+ Retinex Shadow Correction
+
+
+ Multi-scale shadow correction and illumination equalization based on Retinex
+
+
+ Processing Method
+
+
+ Select Retinex algorithm type
+
+
+ Scale 1 (Small)
+
+
+ Small scale Gaussian kernel sigma for detail enhancement
+
+
+ Scale 2 (Medium)
+
+
+ Medium scale Gaussian kernel sigma for local illumination correction
+
+
+ Scale 3 (Large)
+
+
+ Large scale Gaussian kernel sigma for global illumination correction
+
+
+ Gain
+
+
+ Output gain factor
+
+
+ Offset
+
+
+ Output offset value
+
+
+
+
+ HDR Enhancement
+
+
+ High Dynamic Range image enhancement with tone mapping
+
+
+ Tone Mapping Method
+
+
+ Select HDR tone mapping algorithm: LocalToneMap, AdaptiveLog, Drago, BilateralToneMap
+
+
+ Gamma
+
+
+ Gamma correction value for output brightness adjustment
+
+
+ Saturation
+
+
+ Contrast saturation factor for LocalToneMap method
+
+
+ Detail Boost
+
+
+ Detail enhancement factor, higher values reveal more fine details
+
+
+ Sigma Space
+
+
+ Spatial sigma for base layer extraction, controls smoothing range
+
+
+ Sigma Color
+
+
+ Color sigma for bilateral tone mapping, controls edge preservation
+
+
+ Bias
+
+
+ Bias for adaptive logarithmic and Drago mapping, controls dark/bright balance
+
+
+
+
+ Mirror
+
+
+ Flip image horizontally, vertically, or both
+
+
+ Direction
+
+
+ Flip direction: Horizontal (left-right), Vertical (up-down), Both (180° rotation)
+
+
+
+
+ Rotate
+
+
+ Rotate image by arbitrary angle with optional canvas expansion
+
+
+ Angle
+
+
+ Rotation angle in degrees, positive is counter-clockwise
+
+
+ Expand Canvas
+
+
+ Expand canvas to fit the entire rotated image, otherwise crop to original size
+
+
+ Background
+
+
+ Background fill value (0-255) for areas outside the original image
+
+
+ Interpolation
+
+
+ Interpolation method: Nearest (fast), Bilinear (smooth), Bicubic (high quality)
+
+
+
+
+ Pseudo Color Rendering
+
+
+ Map grayscale image to color image using color maps
+
+
+ Color Map
+
+
+ Select color mapping table for rendering
+
+
+ Min Gray Value
+
+
+ Gray values below this will be clipped to minimum color
+
+
+ Max Gray Value
+
+
+ Gray values above this will be clipped to maximum color
+
+
+ Invert Color Map
+
+
+ Reverse the color mapping direction
+
+
+
+
+ Electronic Film Effect
+
+
+ Simulate traditional X-ray film display with window/level and characteristic curves
+
+
+ Window Center
+
+
+ Center gray value of the display window (Window Level)
+
+
+ Window Width
+
+
+ Width of the display window, controls visible gray range
+
+
+ Invert (Negative)
+
+
+ Invert image to negative film effect
+
+
+ Characteristic Curve
+
+
+ Film characteristic curve: Linear, Sigmoid (S-curve), Logarithmic, Exponential
+
+
+ Curve Strength
+
+
+ Strength of the characteristic curve effect
+
+
+ Edge Enhancement
+
+
+ Edge enhancement strength to simulate film sharpening, 0 to disable
+
+
+
+
+ Sub-Pixel Zoom
+
+
+ High-quality sub-pixel image magnification with multiple interpolation methods
+
+
+ Scale Factor
+
+
+ Magnification factor, supports fractional values (e.g. 1.5, 2.3)
+
+
+ Interpolation
+
+
+ Interpolation method: Nearest, Bilinear, Bicubic, Lanczos (highest quality)
+
+
+ Sharpen After Zoom
+
+
+ Apply sharpening after magnification to compensate interpolation blur
+
+
+ Sharpen Strength
+
+
+ Strength of post-zoom sharpening
+
+
+
+
+ Super Resolution (AI)
+
+
+ Deep learning based super resolution using EDSR/FSRCNN models
+
+
+ Model
+
+
+ Super resolution model: EDSR (high quality, slow) or FSRCNN (fast, lightweight)
+
+
+ Scale Factor
+
+
+ Upscaling factor: 2x, 3x, or 4x
+
+
+
+
+ Color Layer Separation
+
+
+ Separate grayscale image into distinct intensity layers
+
+
+ Layers
+
+
+ Number of intensity layers (2-16)
+
+
+ Method
+
+
+ Thresholding method: Uniform (equal intervals) or Otsu (adaptive)
+
+
+ Output Mode
+
+
+ Output mapping: EqualSpaced (evenly distributed) or MidValue (interval midpoint)
+
+
+ Target Layer
+
+
+ 0 = show all layers, 1~N = show only the specified layer (white) with others black
+
+
+
+
+ Hierarchical Enhancement
+
+
+ Enhance image details at different scales using Laplacian pyramid decomposition
+
+
+ Pyramid Levels
+
+
+ Number of pyramid decomposition levels (2-8)
+
+
+ Fine Detail Gain
+
+
+ Gain for finest detail layer (edges, textures). 1.0 = original, >1 = enhance, <1 = suppress
+
+
+ Medium Detail Gain
+
+
+ Gain for medium-scale details. 1.0 = original, >1 = enhance, <1 = suppress
+
+
+ Coarse Detail Gain
+
+
+ Gain for coarse-scale details (large structures). 1.0 = original, >1 = enhance, <1 = suppress
+
+
+ Base Layer Gain
+
+
+ Gain for the base (lowest frequency) layer, controls overall brightness
+
+
+ Clip Limit
+
+
+ Limit detail amplitude to prevent over-enhancement artifacts. 0 = no limit
+
+
+
+
+ Histogram Overlay
+
+
+ Compute grayscale histogram and overlay it on the top-left corner of the image with statistics
+
+
+
+
+ Ellipse Detection
+
+
+ Detect ellipses in image using contour analysis and ellipse fitting
+
+
+ Min Threshold
+
+
+ Minimum threshold for dual-threshold segmentation (0-255)
+
+
+ Max Threshold
+
+
+ Maximum threshold for dual-threshold segmentation (0-255)
+
+
+ Use Otsu Auto Threshold
+
+
+ When enabled, optimal threshold will be calculated automatically
+
+
+ Min Contour Points
+
+
+ Minimum number of contour points for ellipse fitting
+
+
+ Min Area
+
+
+ Filter ellipses smaller than this area
+
+
+ Max Area
+
+
+ Filter ellipses larger than this area
+
+
+ Max Eccentricity
+
+
+ Maximum eccentricity (0=circle, close to 1=flat ellipse)
+
+
+ Max Fit Error
+
+
+ Maximum fitting error in pixels
+
+
+ Line Thickness
+
+
+ Thickness of ellipse drawing lines
+
+
+
+
+ Line Measurement
+
+
+ Measure distance between two points in the image
+
+
+ Point 1 X
+
+
+ X coordinate of the first point (pixels)
+
+
+ Point 1 Y
+
+
+ Y coordinate of the first point (pixels)
+
+
+ Point 2 X
+
+
+ X coordinate of the second point (pixels)
+
+
+ Point 2 Y
+
+
+ Y coordinate of the second point (pixels)
+
+
+ Pixel Size
+
+
+ Physical size per pixel for calibrated measurement
+
+
+ Unit
+
+
+ Measurement unit: px (pixels), mm, μm, cm
+
+
+ Line Thickness
+
+
+ Thickness of the measurement line
+
+
+ Show Label
+
+
+ Display distance label on the measurement line
+
+
+
+
+ Via Fill Rate (Tilted Geometric)
+
+
+ Measure via fill rate using 4-ellipse geometric projection on tilted X-Ray image
+
+
+ THT Limit (%)
+
+
+ Minimum fill rate to pass (default 75% per IPC-610)
+
+
+ Line Thickness
+
+
+ Thickness of ROI ellipse lines
+
+
+
+
+ BGA Void Rate (Auto)
+
+
+ Auto-detect BGA solder balls and measure void rate (two-step: locate BGA → detect voids)
+
+
+ BGA Min Area
+
+
+ Minimum pixel area to identify as a BGA solder ball
+
+
+ ROI Mode
+
+
+ None: full image; Polygon: polygon ROI (draw ROI first)
+
+
+ BGA Max Area
+
+
+ Maximum pixel area to identify as a BGA solder ball
+
+
+ Blur Kernel
+
+
+ Gaussian blur kernel size for BGA detection (odd number)
+
+
+ Min Circularity
+
+
+ Minimum circularity to filter non-circular contours (0~1, 1=perfect circle)
+
+
+ Void Limit (%)
+
+
+ Maximum allowed void rate (default 25% per IPC-7095)
+
+
+ Min Threshold
+
+
+ Minimum gray value for void detection (pixels in [Min,Max] = void)
+
+
+ Max Threshold
+
+
+ Maximum gray value for void detection
+
+
+ Min Void Area
+
+
+ Minimum pixel area to count as a void (filter noise)
+
+
+ Line Thickness
+
+
+ Thickness of contour lines
+
+
+
+
+ Point-to-Line Distance
+
+
+ Measure perpendicular distance from a point to a line
+
+
+ Pixel Size
+
+
+ Physical size per pixel for calibrated measurement
+
+
+ Unit
+
+
+ Measurement unit: px / mm / μm / cm
+
+
+ Line Thickness
+
+
+ Thickness of drawing lines
+
+
+
+
+ Angle Measurement
+
+
+ Measure angle between two rays sharing a common vertex
+
+
+
+
+ Void Measurement
+
+
+ Detect voids in ROI and calculate void rate
+
+
+ Min Threshold
+
+
+ Lower grayscale bound for void detection
+
+
+ Max Threshold
+
+
+ Upper grayscale bound for void detection
+
+
+ Min Void Area
+
+
+ Voids smaller than this area are ignored (pixels)
+
+
+ Merge Radius
+
+
+ Dilation radius for merging adjacent voids (0=no merge)
+
+
+ Blur Size
+
+
+ Gaussian blur kernel size (odd number)
+
+
+ Void Limit (%)
+
+
+ Void rate above this limit is classified as FAIL
+
+
diff --git a/ImageProcessing.Processors/Resources/Resources.zh-CN.resx b/ImageProcessing.Processors/Resources/Resources.zh-CN.resx
new file mode 100644
index 0000000..d120377
--- /dev/null
+++ b/ImageProcessing.Processors/Resources/Resources.zh-CN.resx
@@ -0,0 +1,1286 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ 对比度调整
+
+
+ 调整图像的对比度和亮度
+
+
+ 对比度
+
+
+ 对比度增益,1.0为原始对比度
+
+
+ 亮度
+
+
+ 亮度偏移量
+
+
+ 自动对比度
+
+
+ 自动拉伸对比度到全范围
+
+
+ 使用CLAHE
+
+
+ 使用限制对比度自适应直方图均衡化
+
+
+ CLAHE裁剪限制
+
+
+ CLAHE的对比度限制阈值
+
+
+ 带通滤波器
+
+
+ 保留指定频率范围内的图像信息
+
+
+ 低频截止半径
+
+
+ 低于此频率的成分将被去除
+
+
+ 高频截止半径
+
+
+ 高于此频率的成分将被去除
+
+
+ 滤波器类型
+
+
+ 滤波器的过渡特性
+
+
+ 巴特沃斯阶数
+
+
+ 巴特沃斯滤波器的阶数
+
+
+ 轮廓查找
+
+
+ 检测图像中的轮廓并输出轮廓信息
+
+
+ 目标颜色
+
+
+ 选择要查找的区域颜色(白色或黑色)
+
+
+ 启用阈值分割
+
+
+ 在查找轮廓前先进行二值化处理
+
+
+ 阈值
+
+
+ 二值化的阈值(0-255)
+
+
+ 使用Otsu自动阈值
+
+
+ 自动计算最佳阈值
+
+
+ 最小面积
+
+
+ 过滤小于此面积的轮廓
+
+
+ 最大面积
+
+
+ 过滤大于此面积的轮廓
+
+
+ 线条粗细
+
+
+ 绘制轮廓的线条粗细
+
+
+ 除法运算
+
+
+ 对图像进行除法运算,可用于背景校正和归一化
+
+
+ 除数
+
+
+ 图像每个像素值将除以此数值
+
+
+ 缩放因子
+
+
+ 除法结果乘以此缩放因子
+
+
+ 归一化输出
+
+
+ 将结果归一化到0-255范围
+
+
+ Gamma校正
+
+
+ 通过Gamma值调节图像的亮暗程度
+
+
+ Gamma值
+
+
+ Gamma值,小于1图像变暗,大于1图像变亮
+
+
+ 增益
+
+
+ 输出增益系数
+
+
+ 高斯模糊
+
+
+ 使用高斯核对图像进行平滑处理
+
+
+ 核大小
+
+
+ 高斯核的大小,必须为奇数
+
+
+ 标准差
+
+
+ 高斯核的标准差,控制模糊程度
+
+
+ 形态学处理
+
+
+ 执行形态学操作(腐蚀、膨胀、开运算、闭运算)
+
+
+ 操作类型
+
+
+ 选择形态学操作类型
+
+
+ 核大小
+
+
+ 结构元素的大小
+
+
+ 迭代次数
+
+
+ 形态学操作重复执行的次数
+
+
+ 冲击滤波
+
+
+ 边缘增强和去噪
+
+
+ 迭代次数
+
+
+ 滤波迭代次数
+
+
+ 阈值
+
+
+ 边缘检测阈值
+
+
+ 时间步长
+
+
+ 演化时间步长
+
+
+ 阈值分割
+
+
+ 对图像进行二值化处理
+
+
+ 阈值
+
+
+ 二值化阈值,像素值大于此值将被设为最大值
+
+
+ 最大值
+
+
+ 超过阈值的像素将被设置为此值
+
+
+ 使用Otsu自动阈值
+
+
+ 启用后将自动计算最佳阈值
+
+
+ 综合筛选器
+
+
+ 集成多种滤波方法
+
+
+ 类型
+
+
+ 选择滤波方式
+
+
+ 核大小
+
+
+ 滤波器卷积核大小(必须为奇数)
+
+
+ Sigma
+
+
+ 高斯 / 双边滤波器的标准差
+
+
+ 截止频率
+
+
+ 频域滤波的截止频率
+
+
+ 低截止半径
+
+
+ 低于该频率的分量将被移除
+
+
+ 高截止半径
+
+
+ 高于此频率的分量将被移除
+
+
+ 类型
+
+
+ 过镀特性
+
+
+ 巴特沃斯阶数
+
+
+ 巴特沃斯滤波器阶数
+
+
+ 高斯滤波器
+
+
+ 在保留边缘细节的同时平滑图像并降低高斯噪声
+
+
+ 中值滤波器
+
+
+ 有效去除椒盐噪声
+
+
+ 均值滤波器
+
+
+ 简单平均平滑滤波器
+
+
+ 双边滤波器
+
+
+ 边缘保持平滑滤波器
+
+
+ 低通滤波器
+
+
+ 在频域中去除高频噪声
+
+
+ 高通滤波器
+
+
+ 频域边缘增强
+
+
+ 带通滤波器
+
+
+ 频率范围
+
+
+ 中值滤波
+
+
+ 有效去除椒盐噪声
+
+
+ 核大小
+
+
+ 滤波器核的大小(必须为奇数)
+
+
+ 均值滤波
+
+
+ 简单的平均平滑滤波器
+
+
+ 核大小
+
+
+ 滤波器核的大小(必须为奇数)
+
+
+ 双边滤波
+
+
+ 保持边缘清晰的平滑滤波器
+
+
+ 直径
+
+
+ 每个像素邻域的直径
+
+
+ 颜色空间标准差
+
+
+ 颜色空间中的滤波器标准差
+
+
+ 坐标空间标准差
+
+
+ 坐标空间中的滤波器标准差
+
+
+ 低通滤波
+
+
+ 在频域中去除高频噪声
+
+
+ 截止频率
+
+
+ 低通滤波器的截止频率
+
+
+ 高通滤波
+
+
+ 在频域中进行边缘增强
+
+
+ 截止频率
+
+
+ 高通滤波器的截止频率
+
+
+ 灰度转换
+
+
+ 将图像转换为灰度图
+
+
+ 转换方法
+
+
+ 灰度转换的方法
+
+
+ 锐化
+
+
+ 增强图像边缘和细节
+
+
+ 锐化方法
+
+
+ 选择锐化算法
+
+
+ 锐化强度
+
+
+ 锐化效果的强度
+
+
+ 核大小
+
+
+ 锐化核的大小(奇数)
+
+
+ 直方图均衡化
+
+
+ 增强图像对比度
+
+
+ 均衡化方法
+
+
+ 选择直方图均衡化算法
+
+
+ 裁剪限制
+
+
+ CLAHE的对比度限制阈值
+
+
+ 分块大小
+
+
+ CLAHE的分块大小
+
+
+ Sobel边缘检测
+
+
+ 使用Sobel算子检测图像边缘
+
+
+ 检测方向
+
+
+ 选择边缘检测方向
+
+
+ 核大小
+
+
+ Sobel算子的核大小(奇数)
+
+
+ 缩放系数
+
+
+ 边缘强度的缩放系数
+
+
+ Kirsch边缘检测
+
+
+ 使用Kirsch算子检测图像边缘
+
+
+ 阈值
+
+
+ 边缘检测阈值
+
+
+ 缩放系数
+
+
+ 边缘强度的缩放系数
+
+
+ 水平边缘检测
+
+
+ 专门检测水平方向的边缘
+
+
+ 检测方法
+
+
+ 选择水平边缘检测算法
+
+
+ 灵敏度
+
+
+ 边缘检测的灵敏度
+
+
+ 阈值
+
+
+ 边缘检测阈值
+
+
+ Retinex阴影校正
+
+
+ 基于Retinex的多尺度阴影校正和光照均衡
+
+
+ 处理方法
+
+
+ 选择Retinex算法类型
+
+
+ 尺度1 (小)
+
+
+ 小尺度高斯核标准差,用于细节增强
+
+
+ 尺度2 (中)
+
+
+ 中尺度高斯核标准差,用于局部光照校正
+
+
+ 尺度3 (大)
+
+
+ 大尺度高斯核标准差,用于全局光照校正
+
+
+ 增益
+
+
+ 输出增益系数
+
+
+ 偏移
+
+
+ 输出偏移量
+
+
+ 高动态范围增强
+
+
+ 基于色调映射的高动态范围图像增强
+
+
+ 色调映射方法
+
+
+ 选择HDR色调映射算法:局部色调映射、自适应对数映射、Drago映射、双边滤波色调映射
+
+
+ Gamma值
+
+
+ Gamma校正值,用于调整输出亮度
+
+
+ 饱和度
+
+
+ 对比度饱和系数,用于局部色调映射方法
+
+
+ 细节增强
+
+
+ 细节增强系数,值越大细节越丰富
+
+
+ 空间标准差
+
+
+ 基础层提取的空间标准差,控制平滑范围
+
+
+ 颜色标准差
+
+
+ 双边滤波色调映射的颜色标准差,控制保边效果
+
+
+ 偏置
+
+
+ 自适应对数映射和Drago映射的偏置参数,控制暗部/亮部平衡
+
+
+ 镜像
+
+
+ 对图像进行水平、垂直或对角镜像翻转
+
+
+ 翻转方向
+
+
+ 翻转方向:Horizontal(水平/左右翻转)、Vertical(垂直/上下翻转)、Both(对角翻转/旋转180°)
+
+
+ 图像旋转
+
+
+ 按任意角度旋转图像,支持画布自适应扩展
+
+
+ 旋转角度
+
+
+ 旋转角度(度),正值为逆时针旋转
+
+
+ 扩展画布
+
+
+ 扩展画布以容纳完整旋转图像,否则裁剪为原始尺寸
+
+
+ 背景灰度
+
+
+ 旋转后空白区域的填充灰度值(0-255)
+
+
+ 插值方法
+
+
+ 插值方法:Nearest(最近邻/快速)、Bilinear(双线性/平滑)、Bicubic(双三次/高质量)
+
+
+ 伪色彩渲染
+
+
+ 将灰度图像通过色彩映射表渲染为彩色图像
+
+
+ 色彩映射表
+
+
+ 选择用于渲染的色彩映射表
+
+
+ 最小灰度值
+
+
+ 低于此值的灰度将被裁剪到最小色彩
+
+
+ 最大灰度值
+
+
+ 高于此值的灰度将被裁剪到最大色彩
+
+
+ 反转色彩映射
+
+
+ 反转色彩映射方向
+
+
+
+
+ 电子胶片效果
+
+
+ 模拟传统X射线胶片显示效果,支持窗宽窗位和特性曲线调整
+
+
+ 窗位
+
+
+ 显示窗口的中心灰度值(Window Level)
+
+
+ 窗宽
+
+
+ 显示窗口的宽度,控制可见灰度范围
+
+
+ 反转(负片)
+
+
+ 反转图像为负片效果
+
+
+ 特性曲线
+
+
+ 胶片特性曲线:Linear(线性)、Sigmoid(S曲线)、Logarithmic(对数)、Exponential(指数)
+
+
+ 曲线强度
+
+
+ 特性曲线的效果强度
+
+
+ 边缘增强
+
+
+ 边缘增强强度,模拟胶片锐化效果,0为关闭
+
+
+
+
+ 亚像素放大
+
+
+ 通过高质量插值实现图像的亚像素级放大
+
+
+ 放大倍率
+
+
+ 放大倍率,支持小数(如1.5、2.3)
+
+
+ 插值方法
+
+
+ 插值方法:Nearest(最近邻)、Bilinear(双线性)、Bicubic(双三次)、Lanczos(最高质量)
+
+
+ 放大后锐化
+
+
+ 放大后进行锐化补偿,抵消插值产生的模糊
+
+
+ 锐化强度
+
+
+ 放大后锐化的强度
+
+
+
+
+ 超分辨率重建 (AI)
+
+
+ 基于深度学习的超分辨率重建,使用EDSR/FSRCNN模型
+
+
+ 模型
+
+
+ 超分辨率模型:EDSR(高质量/较慢)或 FSRCNN(快速/轻量)
+
+
+ 放大倍率
+
+
+ 放大倍率:2x、3x 或 4x
+
+
+
+
+ 色彩分层
+
+
+ 将灰度图像按亮度区间分为多个层级
+
+
+ 分层数
+
+
+ 灰度分层数量(2-16)
+
+
+ 分层方法
+
+
+ 分层方法:Uniform(均匀等分)或 Otsu(自适应)
+
+
+ 输出模式
+
+
+ 输出映射:EqualSpaced(等间距灰度)或 MidValue(区间中值)
+
+
+ 目标层
+
+
+ 0 = 显示全部层,1~N = 只显示指定层(白色),其余为黑色
+
+
+
+
+ 层次增强
+
+
+ 基于拉普拉斯金字塔分解,对不同尺度的图像细节独立增强
+
+
+ 金字塔层数
+
+
+ 金字塔分解层数(2-8),层数越多分解越精细
+
+
+ 精细细节增益
+
+
+ 最精细层(边缘、纹理)的增益。1.0=原始,>1=增强,<1=抑制
+
+
+ 中等细节增益
+
+
+ 中等尺度细节的增益。1.0=原始,>1=增强,<1=抑制
+
+
+ 粗糙细节增益
+
+
+ 粗尺度细节(大结构)的增益。1.0=原始,>1=增强,<1=抑制
+
+
+ 基础层增益
+
+
+ 基础层(最低频)增益,控制整体亮度
+
+
+ 裁剪限制
+
+
+ 限制细节幅度,防止过增强产生伪影。0=不限制
+
+
+
+
+ 直方图叠加
+
+
+ 计算灰度直方图,以蓝色柱状图叠加到图像左上角,并输出统计表格
+
+
+
+
+ 椭圆检测
+
+
+ 基于轮廓分析和椭圆拟合检测图像中的椭圆
+
+
+ 最小阈值
+
+
+ 双阈值分割的最小阈值(0-255)
+
+
+ 最大阈值
+
+
+ 双阈值分割的最大阈值(0-255)
+
+
+ 使用Otsu自动阈值
+
+
+ 启用后将自动计算最佳阈值
+
+
+ 最小轮廓点数
+
+
+ 椭圆拟合所需的最小轮廓点数
+
+
+ 最小面积
+
+
+ 过滤小于此面积的椭圆
+
+
+ 最大面积
+
+
+ 过滤大于此面积的椭圆
+
+
+ 最大离心率
+
+
+ 最大离心率(0=圆,接近1=扁椭圆)
+
+
+ 最大拟合误差
+
+
+ 最大拟合误差(像素)
+
+
+ 线条粗细
+
+
+ 绘制椭圆的线条粗细
+
+
+
+
+ 直线测量
+
+
+ 测量图像中两点之间的距离
+
+
+ 点1 X坐标
+
+
+ 第一个点的X坐标(像素)
+
+
+ 点1 Y坐标
+
+
+ 第一个点的Y坐标(像素)
+
+
+ 点2 X坐标
+
+
+ 第二个点的X坐标(像素)
+
+
+ 点2 Y坐标
+
+
+ 第二个点的Y坐标(像素)
+
+
+ 像素尺寸
+
+
+ 每像素对应的物理尺寸,用于标定测量
+
+
+ 单位
+
+
+ 测量单位:px(像素)、mm、μm、cm
+
+
+ 线条粗细
+
+
+ 测量线的线条粗细
+
+
+ 显示标注
+
+
+ 在测量线上显示距离标注
+
+
+
+
+ 通孔填锡率
+
+
+ 基于四椭圆倾斜投影几何法测量通孔填锡率
+
+
+ THT 限值 (%)
+
+
+ 最低合格填锡率(默认75%,参考IPC-610)
+
+
+ 线条粗细
+
+
+ ROI椭圆线条粗细
+
+
+
+
+ BGA空洞率检测(自动)
+
+
+ 自动检测BGA焊球并测量空洞率(两步法:定位焊球 → 检测气泡)
+
+
+ 焊球最小面积
+
+
+ 识别为BGA焊球的最小像素面积
+
+
+ ROI模式
+
+
+ None: 全图检测; Polygon: 多边形ROI(需先绘制ROI)
+
+
+ 焊球最大面积
+
+
+ 识别为BGA焊球的最大像素面积
+
+
+ 模糊核大小
+
+
+ BGA检测时的高斯模糊核大小(奇数)
+
+
+ 最小圆度
+
+
+ 过滤非圆形轮廓的最小圆度(0~1,1=完美圆形)
+
+
+ 气泡率限值 (%)
+
+
+ 最大允许气泡率(默认25%,参考IPC-7095)
+
+
+ 最小阈值
+
+
+ 气泡检测的最小灰度值(灰度在[最小,最大]范围内判为气泡)
+
+
+ 最大阈值
+
+
+ 气泡检测的最大灰度值
+
+
+ 最小气泡面积
+
+
+ 小于此面积的区域视为噪点忽略(像素)
+
+
+ 线条粗细
+
+
+ 轮廓线条粗细
+
+
+
+
+ 点到直线距离
+
+
+ 测量点到直线的垂直距离
+
+
+ 像素尺寸
+
+
+ 每像素对应的物理尺寸
+
+
+ 单位
+
+
+ 测量单位:px / mm / μm / cm
+
+
+ 线条粗细
+
+
+ 绘制线条粗细
+
+
+
+
+ 角度测量
+
+
+ 测量共端点两条射线的夹角
+
+
+
+
+ 空隙测量
+
+
+ 检测ROI内气泡并计算空隙率
+
+
+ 最小阈值
+
+
+ 气泡灰度下限
+
+
+ 最大阈值
+
+
+ 气泡灰度上限
+
+
+ 最小气泡面积
+
+
+ 小于此面积的气泡将被忽略(像素)
+
+
+ 合并半径
+
+
+ 相邻气泡合并的膨胀半径(0=不合并)
+
+
+ 模糊核大小
+
+
+ 高斯模糊核大小(奇数)
+
+
+ 空隙率限值(%)
+
+
+ 超过此限值判定为FAIL
+
+
\ No newline at end of file
diff --git a/ImageProcessing.Processors/其他/FilmEffectProcessor.cs b/ImageProcessing.Processors/其他/FilmEffectProcessor.cs
new file mode 100644
index 0000000..2a2c831
--- /dev/null
+++ b/ImageProcessing.Processors/其他/FilmEffectProcessor.cs
@@ -0,0 +1,197 @@
+// ============================================================================
+// Copyright © 2026 Hexagon Technology Center GmbH. All Rights Reserved.
+// 文件名: FilmEffectProcessor.cs
+// 描述: 电子胶片效果算子,模拟传统X射线胶片的显示效果
+// 功能:
+// - 窗宽窗位(Window/Level)调整
+// - 胶片反转(正片/负片)
+// - 多种胶片特性曲线(线性、S曲线、对数、指数)
+// - 边缘增强(模拟胶片锐化效果)
+// - 使用查找表(LUT)加速处理
+// 算法: 窗宽窗位映射 + 特性曲线变换
+// 作者: 李伟 wei.lw.li@hexagon.com
+// ============================================================================
+
+using Emgu.CV;
+using Emgu.CV.CvEnum;
+using Emgu.CV.Structure;
+using ImageProcessing.Core;
+using Serilog;
+
+namespace ImageProcessing.Processors;
+
+///
+/// 电子胶片效果算子
+///
+public class FilmEffectProcessor : ImageProcessorBase
+{
+ private static readonly ILogger _logger = Log.ForContext();
+ private byte[] _lut = new byte[256];
+
+ public FilmEffectProcessor()
+ {
+ Name = LocalizationHelper.GetString("FilmEffectProcessor_Name");
+ Description = LocalizationHelper.GetString("FilmEffectProcessor_Description");
+ }
+
+ protected override void InitializeParameters()
+ {
+ Parameters.Add("WindowCenter", new ProcessorParameter(
+ "WindowCenter",
+ LocalizationHelper.GetString("FilmEffectProcessor_WindowCenter"),
+ typeof(int),
+ 128,
+ 0,
+ 255,
+ LocalizationHelper.GetString("FilmEffectProcessor_WindowCenter_Desc")));
+
+ Parameters.Add("WindowWidth", new ProcessorParameter(
+ "WindowWidth",
+ LocalizationHelper.GetString("FilmEffectProcessor_WindowWidth"),
+ typeof(int),
+ 255,
+ 1,
+ 255,
+ LocalizationHelper.GetString("FilmEffectProcessor_WindowWidth_Desc")));
+
+ Parameters.Add("Invert", new ProcessorParameter(
+ "Invert",
+ LocalizationHelper.GetString("FilmEffectProcessor_Invert"),
+ typeof(bool),
+ false,
+ null,
+ null,
+ LocalizationHelper.GetString("FilmEffectProcessor_Invert_Desc")));
+
+ Parameters.Add("Curve", new ProcessorParameter(
+ "Curve",
+ LocalizationHelper.GetString("FilmEffectProcessor_Curve"),
+ typeof(string),
+ "Linear",
+ null,
+ null,
+ LocalizationHelper.GetString("FilmEffectProcessor_Curve_Desc"),
+ new string[] { "Linear", "Sigmoid", "Logarithmic", "Exponential" }));
+
+ Parameters.Add("CurveStrength", new ProcessorParameter(
+ "CurveStrength",
+ LocalizationHelper.GetString("FilmEffectProcessor_CurveStrength"),
+ typeof(double),
+ 1.0,
+ 0.1,
+ 5.0,
+ LocalizationHelper.GetString("FilmEffectProcessor_CurveStrength_Desc")));
+
+ Parameters.Add("EdgeEnhance", new ProcessorParameter(
+ "EdgeEnhance",
+ LocalizationHelper.GetString("FilmEffectProcessor_EdgeEnhance"),
+ typeof(double),
+ 0.0,
+ 0.0,
+ 3.0,
+ LocalizationHelper.GetString("FilmEffectProcessor_EdgeEnhance_Desc")));
+
+ _logger.Debug("InitializeParameters");
+ }
+
+ public override Image Process(Image inputImage)
+ {
+ int windowCenter = GetParameter("WindowCenter");
+ int windowWidth = GetParameter("WindowWidth");
+ bool invert = GetParameter("Invert");
+ string curve = GetParameter("Curve");
+ double curveStrength = GetParameter("CurveStrength");
+ double edgeEnhance = GetParameter("EdgeEnhance");
+
+ // 构建查找表
+ BuildLUT(windowCenter, windowWidth, invert, curve, curveStrength);
+
+ // 应用 LUT
+ var result = inputImage.Clone();
+ int width = result.Width;
+ int height = result.Height;
+
+ for (int y = 0; y < height; y++)
+ {
+ for (int x = 0; x < width; x++)
+ {
+ result.Data[y, x, 0] = _lut[result.Data[y, x, 0]];
+ }
+ }
+
+ // 边缘增强(模拟胶片锐化)
+ if (edgeEnhance > 0.01)
+ {
+ using var blurred = inputImage.SmoothGaussian(3);
+ using var detail = new Image(width, height);
+
+ for (int y = 0; y < height; y++)
+ {
+ for (int x = 0; x < width; x++)
+ {
+ float diff = inputImage.Data[y, x, 0] - blurred.Data[y, x, 0];
+ float enhanced = result.Data[y, x, 0] + (float)(diff * edgeEnhance);
+ result.Data[y, x, 0] = (byte)Math.Clamp((int)enhanced, 0, 255);
+ }
+ }
+ }
+
+ _logger.Debug("Process: WC={WC}, WW={WW}, Invert={Inv}, Curve={Curve}, Strength={Str}, Edge={Edge}",
+ windowCenter, windowWidth, invert, curve, curveStrength, edgeEnhance);
+
+ return result;
+ }
+
+ private void BuildLUT(int wc, int ww, bool invert, string curve, double strength)
+ {
+ double halfW = ww / 2.0;
+ double low = wc - halfW;
+ double high = wc + halfW;
+
+ for (int i = 0; i < 256; i++)
+ {
+ // 窗宽窗位映射到 [0, 1]
+ double normalized;
+ if (ww <= 1)
+ normalized = i >= wc ? 1.0 : 0.0;
+ else
+ normalized = Math.Clamp((i - low) / (high - low), 0.0, 1.0);
+
+ // 应用特性曲线
+ double mapped = curve switch
+ {
+ "Sigmoid" => ApplySigmoid(normalized, strength),
+ "Logarithmic" => ApplyLogarithmic(normalized, strength),
+ "Exponential" => ApplyExponential(normalized, strength),
+ _ => normalized // Linear
+ };
+
+ // 反转(负片效果)
+ if (invert)
+ mapped = 1.0 - mapped;
+
+ _lut[i] = (byte)Math.Clamp((int)(mapped * 255.0), 0, 255);
+ }
+ }
+
+ /// S曲线(Sigmoid):增强中间调对比度
+ private static double ApplySigmoid(double x, double strength)
+ {
+ double k = strength * 10.0;
+ return 1.0 / (1.0 + Math.Exp(-k * (x - 0.5)));
+ }
+
+ /// 对数曲线:提亮暗部,压缩亮部
+ private static double ApplyLogarithmic(double x, double strength)
+ {
+ double c = strength;
+ return Math.Log(1.0 + c * x) / Math.Log(1.0 + c);
+ }
+
+ /// 指数曲线:压缩暗部,增强亮部
+ private static double ApplyExponential(double x, double strength)
+ {
+ double c = strength;
+ return (Math.Exp(c * x) - 1.0) / (Math.Exp(c) - 1.0);
+ }
+}
\ No newline at end of file
diff --git a/ImageProcessing.Processors/其他/PseudoColorProcessor.cs b/ImageProcessing.Processors/其他/PseudoColorProcessor.cs
new file mode 100644
index 0000000..e1af058
--- /dev/null
+++ b/ImageProcessing.Processors/其他/PseudoColorProcessor.cs
@@ -0,0 +1,149 @@
+// ============================================================================
+// Copyright © 2026 Hexagon Technology Center GmbH. All Rights Reserved.
+// 文件名: PseudoColorProcessor.cs
+// 描述: 伪色彩渲染算子,将灰度图像映射为彩色图像
+// 功能:
+// - 支持多种 OpenCV 内置色彩映射表(Jet、Hot、Cool、Rainbow 等)
+// - 可选灰度范围裁剪,突出感兴趣的灰度区间
+// - 可选反转色彩映射方向
+// 算法: 查找表(LUT)色彩映射
+// 作者: 李伟 wei.lw.li@hexagon.com
+// ============================================================================
+
+using Emgu.CV;
+using Emgu.CV.CvEnum;
+using Emgu.CV.Structure;
+using ImageProcessing.Core;
+using Serilog;
+
+namespace ImageProcessing.Processors;
+
+///
+/// 伪色彩渲染算子
+///
+public class PseudoColorProcessor : ImageProcessorBase
+{
+ private static readonly ILogger _logger = Log.ForContext();
+
+ public PseudoColorProcessor()
+ {
+ Name = LocalizationHelper.GetString("PseudoColorProcessor_Name");
+ Description = LocalizationHelper.GetString("PseudoColorProcessor_Description");
+ }
+
+ protected override void InitializeParameters()
+ {
+ Parameters.Add("ColorMap", new ProcessorParameter(
+ "ColorMap",
+ LocalizationHelper.GetString("PseudoColorProcessor_ColorMap"),
+ typeof(string),
+ "Jet",
+ null,
+ null,
+ LocalizationHelper.GetString("PseudoColorProcessor_ColorMap_Desc"),
+ new string[] { "Jet", "Hot", "Cool", "Rainbow", "HSV", "Turbo", "Inferno", "Magma", "Plasma", "Bone", "Ocean", "Spring", "Summer", "Autumn", "Winter" }));
+
+ Parameters.Add("MinValue", new ProcessorParameter(
+ "MinValue",
+ LocalizationHelper.GetString("PseudoColorProcessor_MinValue"),
+ typeof(int),
+ 0,
+ 0,
+ 255,
+ LocalizationHelper.GetString("PseudoColorProcessor_MinValue_Desc")));
+
+ Parameters.Add("MaxValue", new ProcessorParameter(
+ "MaxValue",
+ LocalizationHelper.GetString("PseudoColorProcessor_MaxValue"),
+ typeof(int),
+ 255,
+ 0,
+ 255,
+ LocalizationHelper.GetString("PseudoColorProcessor_MaxValue_Desc")));
+
+ Parameters.Add("InvertMap", new ProcessorParameter(
+ "InvertMap",
+ LocalizationHelper.GetString("PseudoColorProcessor_InvertMap"),
+ typeof(bool),
+ false,
+ null,
+ null,
+ LocalizationHelper.GetString("PseudoColorProcessor_InvertMap_Desc")));
+
+ _logger.Debug("InitializeParameters");
+ }
+
+ public override Image Process(Image inputImage)
+ {
+ string colorMapName = GetParameter("ColorMap");
+ int minValue = GetParameter("MinValue");
+ int maxValue = GetParameter("MaxValue");
+ bool invertMap = GetParameter("InvertMap");
+
+ OutputData.Clear();
+
+ // 灰度范围裁剪与归一化
+ Image normalized;
+ if (minValue > 0 || maxValue < 255)
+ {
+ // 将 [minValue, maxValue] 映射到 [0, 255]
+ normalized = inputImage.Clone();
+ double scale = 255.0 / Math.Max(maxValue - minValue, 1);
+ for (int y = 0; y < normalized.Height; y++)
+ {
+ for (int x = 0; x < normalized.Width; x++)
+ {
+ int val = normalized.Data[y, x, 0];
+ val = Math.Clamp(val, minValue, maxValue);
+ normalized.Data[y, x, 0] = (byte)((val - minValue) * scale);
+ }
+ }
+ }
+ else
+ {
+ normalized = inputImage.Clone();
+ }
+
+ // 反转灰度(反转色彩映射方向)
+ if (invertMap)
+ {
+ CvInvoke.BitwiseNot(normalized, normalized);
+ }
+
+ // 应用色彩映射
+ ColorMapType cmType = colorMapName switch
+ {
+ "Hot" => ColorMapType.Hot,
+ "Cool" => ColorMapType.Cool,
+ "Rainbow" => ColorMapType.Rainbow,
+ "HSV" => ColorMapType.Hsv,
+ "Turbo" => ColorMapType.Turbo,
+ "Inferno" => ColorMapType.Inferno,
+ "Magma" => ColorMapType.Magma,
+ "Plasma" => ColorMapType.Plasma,
+ "Bone" => ColorMapType.Bone,
+ "Ocean" => ColorMapType.Ocean,
+ "Spring" => ColorMapType.Spring,
+ "Summer" => ColorMapType.Summer,
+ "Autumn" => ColorMapType.Autumn,
+ "Winter" => ColorMapType.Winter,
+ _ => ColorMapType.Jet
+ };
+
+ using var colorMat = new Mat();
+ CvInvoke.ApplyColorMap(normalized.Mat, colorMat, cmType);
+
+ var colorImage = colorMat.ToImage();
+
+ // 将彩色图像存入 OutputData,供 UI 显示
+ OutputData["PseudoColorImage"] = colorImage;
+
+ _logger.Debug("Process: ColorMap={ColorMap}, MinValue={Min}, MaxValue={Max}, InvertMap={Invert}",
+ colorMapName, minValue, maxValue, invertMap);
+
+ normalized.Dispose();
+
+ // 返回原始灰度图像(彩色图像通过 OutputData 传递)
+ return inputImage.Clone();
+ }
+}
\ No newline at end of file
diff --git a/ImageProcessing.Processors/图像变换/GrayscaleProcessor.cs b/ImageProcessing.Processors/图像变换/GrayscaleProcessor.cs
new file mode 100644
index 0000000..6fb7b53
--- /dev/null
+++ b/ImageProcessing.Processors/图像变换/GrayscaleProcessor.cs
@@ -0,0 +1,80 @@
+// ============================================================================
+// Copyright © 2026 Hexagon Technology Center GmbH. All Rights Reserved.
+// 文件名: GrayscaleProcessor.cs
+// 描述: 灰度图转换算子,用于将彩色图像转换为灰度图像
+// 功能:
+// - 标准灰度转换(加权平均)
+// - 平均值法
+// - 最大值法
+// - 最小值法
+// 算法: 加权平均法 Gray = 0.299*R + 0.587*G + 0.114*B
+// 作者: 李伟 wei.lw.li@hexagon.com
+// ============================================================================
+
+using Emgu.CV;
+using Emgu.CV.Structure;
+using ImageProcessing.Core;
+using Serilog;
+
+namespace ImageProcessing.Processors;
+
+///
+/// 灰度图转换算子
+///
+public class GrayscaleProcessor : ImageProcessorBase
+{
+ private static readonly ILogger _logger = Log.ForContext();
+
+ public GrayscaleProcessor()
+ {
+ Name = LocalizationHelper.GetString("GrayscaleProcessor_Name");
+ Description = LocalizationHelper.GetString("GrayscaleProcessor_Description");
+ }
+
+ protected override void InitializeParameters()
+ {
+ Parameters.Add("Method", new ProcessorParameter(
+ "Method",
+ LocalizationHelper.GetString("GrayscaleProcessor_Method"),
+ typeof(string),
+ "Weighted",
+ null,
+ null,
+ LocalizationHelper.GetString("GrayscaleProcessor_Method_Desc"),
+ new string[] { "Weighted", "Average", "Max", "Min" }));
+ _logger.Debug("InitializeParameters");
+ }
+
+ public override Image Process(Image inputImage)
+ {
+ string method = GetParameter("Method");
+
+ // 如果输入已经是灰度图,根据方法进行处理
+ var result = inputImage.Clone();
+
+ switch (method)
+ {
+ case "Average":
+ // 对于已经是灰度的图像,平均值法不改变图像
+ break;
+
+ case "Max":
+ // 增强亮度
+ result = result * 1.2;
+ break;
+
+ case "Min":
+ // 降低亮度
+ result = result * 0.8;
+ break;
+
+ case "Weighted":
+ default:
+ // 保持原样
+ break;
+ }
+
+ _logger.Debug("Process: Method = {Method}", method);
+ return result;
+ }
+}
\ No newline at end of file
diff --git a/ImageProcessing.Processors/图像变换/MirrorProcessor.cs b/ImageProcessing.Processors/图像变换/MirrorProcessor.cs
new file mode 100644
index 0000000..39dcd74
--- /dev/null
+++ b/ImageProcessing.Processors/图像变换/MirrorProcessor.cs
@@ -0,0 +1,67 @@
+// ============================================================================
+// Copyright © 2026 Hexagon Technology Center GmbH. All Rights Reserved.
+// 文件名: MirrorProcessor.cs
+// 描述: 镜像算子,用于图像翻转
+// 功能:
+// - 水平镜像(左右翻转)
+// - 垂直镜像(上下翻转)
+// - 对角镜像(水平+垂直翻转,等效180°旋转)
+// 算法: 像素坐标映射
+// 作者: 李伟 wei.lw.li@hexagon.com
+// ============================================================================
+
+using Emgu.CV;
+using Emgu.CV.CvEnum;
+using Emgu.CV.Structure;
+using ImageProcessing.Core;
+using Serilog;
+
+namespace ImageProcessing.Processors;
+
+///
+/// 镜像算子
+///
+public class MirrorProcessor : ImageProcessorBase
+{
+ private static readonly ILogger _logger = Log.ForContext();
+
+ public MirrorProcessor()
+ {
+ Name = LocalizationHelper.GetString("MirrorProcessor_Name");
+ Description = LocalizationHelper.GetString("MirrorProcessor_Description");
+ }
+
+ protected override void InitializeParameters()
+ {
+ Parameters.Add("Direction", new ProcessorParameter(
+ "Direction",
+ LocalizationHelper.GetString("MirrorProcessor_Direction"),
+ typeof(string),
+ "Horizontal",
+ null,
+ null,
+ LocalizationHelper.GetString("MirrorProcessor_Direction_Desc"),
+ new string[] { "Horizontal", "Vertical", "Both" }));
+
+ _logger.Debug("InitializeParameters");
+ }
+
+ public override Image Process(Image inputImage)
+ {
+ string direction = GetParameter("Direction");
+
+ var result = inputImage.Clone();
+
+ FlipType flipType = direction switch
+ {
+ "Vertical" => FlipType.Vertical,
+ "Both" => FlipType.Both,
+ _ => FlipType.Horizontal
+ };
+
+ CvInvoke.Flip(inputImage, result, flipType);
+
+ _logger.Debug("Process: Direction = {Direction}", direction);
+ return result;
+ }
+}
\ No newline at end of file
diff --git a/ImageProcessing.Processors/图像变换/RotateProcessor.cs b/ImageProcessing.Processors/图像变换/RotateProcessor.cs
new file mode 100644
index 0000000..bf64c8b
--- /dev/null
+++ b/ImageProcessing.Processors/图像变换/RotateProcessor.cs
@@ -0,0 +1,140 @@
+// ============================================================================
+// Copyright © 2026 Hexagon Technology Center GmbH. All Rights Reserved.
+// 文件名: RotateProcessor.cs
+// 描述: 图像旋转算子
+// 功能:
+// - 任意角度旋转
+// - 支持保持原始尺寸或自适应扩展画布
+// - 可选背景填充值
+// - 支持双线性插值
+// 算法: 仿射变换旋转
+// 作者: 李伟 wei.lw.li@hexagon.com
+// ============================================================================
+
+using Emgu.CV;
+using Emgu.CV.CvEnum;
+using Emgu.CV.Structure;
+using ImageProcessing.Core;
+using Serilog;
+using System.Drawing;
+
+namespace ImageProcessing.Processors;
+
+///
+/// 图像旋转算子
+///
+public class RotateProcessor : ImageProcessorBase
+{
+ private static readonly ILogger _logger = Log.ForContext();
+
+ public RotateProcessor()
+ {
+ Name = LocalizationHelper.GetString("RotateProcessor_Name");
+ Description = LocalizationHelper.GetString("RotateProcessor_Description");
+ }
+
+ protected override void InitializeParameters()
+ {
+ Parameters.Add("Angle", new ProcessorParameter(
+ "Angle",
+ LocalizationHelper.GetString("RotateProcessor_Angle"),
+ typeof(double),
+ 90.0,
+ -360.0,
+ 360.0,
+ LocalizationHelper.GetString("RotateProcessor_Angle_Desc")));
+
+ Parameters.Add("ExpandCanvas", new ProcessorParameter(
+ "ExpandCanvas",
+ LocalizationHelper.GetString("RotateProcessor_ExpandCanvas"),
+ typeof(bool),
+ false,
+ null,
+ null,
+ LocalizationHelper.GetString("RotateProcessor_ExpandCanvas_Desc")));
+
+ Parameters.Add("BackgroundValue", new ProcessorParameter(
+ "BackgroundValue",
+ LocalizationHelper.GetString("RotateProcessor_BackgroundValue"),
+ typeof(int),
+ 0,
+ 0,
+ 255,
+ LocalizationHelper.GetString("RotateProcessor_BackgroundValue_Desc")));
+
+ Parameters.Add("Interpolation", new ProcessorParameter(
+ "Interpolation",
+ LocalizationHelper.GetString("RotateProcessor_Interpolation"),
+ typeof(string),
+ "Bilinear",
+ null,
+ null,
+ LocalizationHelper.GetString("RotateProcessor_Interpolation_Desc"),
+ new string[] { "Nearest", "Bilinear", "Bicubic" }));
+
+ _logger.Debug("InitializeParameters");
+ }
+
+ public override Image Process(Image inputImage)
+ {
+ double angle = GetParameter("Angle");
+ bool expandCanvas = GetParameter("ExpandCanvas");
+ int bgValue = GetParameter("BackgroundValue");
+ string interpolation = GetParameter("Interpolation");
+
+ Inter interMethod = interpolation switch
+ {
+ "Nearest" => Inter.Nearest,
+ "Bicubic" => Inter.Cubic,
+ _ => Inter.Linear
+ };
+
+ int srcW = inputImage.Width;
+ int srcH = inputImage.Height;
+ PointF center = new PointF(srcW / 2.0f, srcH / 2.0f);
+
+ // 获取旋转矩阵
+ using var rotMat = new Mat();
+ CvInvoke.GetRotationMatrix2D(center, angle, 1.0, rotMat);
+
+ int dstW, dstH;
+
+ if (expandCanvas)
+ {
+ // 计算旋转后能容纳整幅图像的画布尺寸
+ double rad = Math.Abs(angle * Math.PI / 180.0);
+ double sinA = Math.Abs(Math.Sin(rad));
+ double cosA = Math.Abs(Math.Cos(rad));
+ dstW = (int)Math.Ceiling(srcW * cosA + srcH * sinA);
+ dstH = (int)Math.Ceiling(srcW * sinA + srcH * cosA);
+
+ // 调整旋转矩阵的平移分量,使图像居中
+ double[] m = new double[6];
+ rotMat.CopyTo(m);
+ m[2] += (dstW - srcW) / 2.0;
+ m[5] += (dstH - srcH) / 2.0;
+
+ // 写回矩阵
+ using var adjusted = new Mat(2, 3, Emgu.CV.CvEnum.DepthType.Cv64F, 1);
+ System.Runtime.InteropServices.Marshal.Copy(m, 0, adjusted.DataPointer, 6);
+
+ var result = new Image(dstW, dstH, new Gray(bgValue));
+ CvInvoke.WarpAffine(inputImage, result, adjusted, new Size(dstW, dstH),
+ interMethod, Warp.Default, BorderType.Constant, new MCvScalar(bgValue));
+
+ _logger.Debug("Process: Angle={Angle}, ExpandCanvas=true, Size={W}x{H}", angle, dstW, dstH);
+ return result;
+ }
+ else
+ {
+ dstW = srcW;
+ dstH = srcH;
+ var result = new Image(dstW, dstH, new Gray(bgValue));
+ CvInvoke.WarpAffine(inputImage, result, rotMat, new Size(dstW, dstH),
+ interMethod, Warp.Default, BorderType.Constant, new MCvScalar(bgValue));
+
+ _logger.Debug("Process: Angle={Angle}, ExpandCanvas=false", angle);
+ return result;
+ }
+ }
+}
\ No newline at end of file
diff --git a/ImageProcessing.Processors/图像变换/ThresholdProcessor.cs b/ImageProcessing.Processors/图像变换/ThresholdProcessor.cs
new file mode 100644
index 0000000..327100d
--- /dev/null
+++ b/ImageProcessing.Processors/图像变换/ThresholdProcessor.cs
@@ -0,0 +1,106 @@
+// ============================================================================
+// Copyright © 2026 Hexagon Technology Center GmbH. All Rights Reserved.
+// 文件名: ThresholdProcessor.cs
+// 描述: 阈值分割算子,用于图像二值化处理
+// 功能:
+// - 固定阈值二值化
+// - Otsu自动阈值计算
+// - 可调节阈值和最大值
+// - 将灰度图像转换为二值图像
+// 算法: 阈值分割、Otsu算法
+// 作者: 李伟 wei.lw.li@hexagon.com
+// ============================================================================
+
+using Emgu.CV;
+using Emgu.CV.CvEnum;
+using Emgu.CV.Structure;
+using ImageProcessing.Core;
+using Serilog;
+
+namespace ImageProcessing.Processors;
+
+///
+/// 阈值分割算子
+///
+public class ThresholdProcessor : ImageProcessorBase
+{
+ private static readonly ILogger _logger = Log.ForContext();
+
+ public ThresholdProcessor()
+ {
+ Name = LocalizationHelper.GetString("ThresholdProcessor_Name");
+ Description = LocalizationHelper.GetString("ThresholdProcessor_Description");
+ }
+
+ protected override void InitializeParameters()
+ {
+ Parameters.Add("MinThreshold", new ProcessorParameter(
+ "MinThreshold",
+ LocalizationHelper.GetString("ThresholdProcessor_MinThreshold"),
+ typeof(int),
+ 64,
+ 0,
+ 255,
+ LocalizationHelper.GetString("ThresholdProcessor_MinThreshold_Desc")));
+
+ Parameters.Add("MaxThreshold", new ProcessorParameter(
+ "MaxThreshold",
+ LocalizationHelper.GetString("ThresholdProcessor_MaxThreshold"),
+ typeof(int),
+ 192,
+ 0,
+ 255,
+ LocalizationHelper.GetString("ThresholdProcessor_MaxThreshold_Desc")));
+
+ Parameters.Add("UseOtsu", new ProcessorParameter(
+ "UseOtsu",
+ LocalizationHelper.GetString("ThresholdProcessor_UseOtsu"),
+ typeof(bool),
+ false,
+ null,
+ null,
+ LocalizationHelper.GetString("ThresholdProcessor_UseOtsu_Desc")));
+ _logger.Debug("InitializeParameters");
+ }
+
+ public override Image Process(Image inputImage)
+ {
+ int minThreshold = GetParameter("MinThreshold");
+ int maxThreshold = GetParameter("MaxThreshold");
+ bool useOtsu = GetParameter("UseOtsu");
+
+ var result = new Image(inputImage.Size);
+
+ if (useOtsu)
+ {
+ // 使用Otsu算法
+ CvInvoke.Threshold(inputImage, result, minThreshold, 255, ThresholdType.Otsu);
+ _logger.Debug("Process: UseOtsu = true");
+ }
+ else
+ {
+ // 双阈值分割:介于MinThreshold和MaxThreshold之间的为前景(255),其他为背景(0)
+ byte[,,] inputData = inputImage.Data;
+ byte[,,] outputData = result.Data;
+
+ int height = inputImage.Height;
+ int width = inputImage.Width;
+
+ for (int y = 0; y < height; y++)
+ {
+ for (int x = 0; x < width; x++)
+ {
+ byte pixelValue = inputData[y, x, 0];
+ outputData[y, x, 0] = (pixelValue >= minThreshold && pixelValue <= maxThreshold)
+ ? (byte)255
+ : (byte)0;
+ }
+ }
+
+ _logger.Debug("Process: MinThreshold = {MinThreshold}, MaxThreshold = {MaxThreshold}",
+ minThreshold, maxThreshold);
+ }
+
+ return result;
+ }
+}
\ No newline at end of file
diff --git a/ImageProcessing.Processors/图像增强/ColorLayerProcessor.cs b/ImageProcessing.Processors/图像增强/ColorLayerProcessor.cs
new file mode 100644
index 0000000..7d0ba64
--- /dev/null
+++ b/ImageProcessing.Processors/图像增强/ColorLayerProcessor.cs
@@ -0,0 +1,257 @@
+// ============================================================================
+// Copyright © 2026 Hexagon Technology Center GmbH. All Rights Reserved.
+// 文件名: ColorLayerProcessor.cs
+// 描述: 色彩分层算子,将灰度图像按亮度区间分层
+// 功能:
+// - 将灰度图像按指定层数均匀分层
+// - 支持自定义分层数(2~16层)
+// - 支持均匀分层和基于 Otsu 的自适应分层
+// - 可选保留原始灰度或映射为等间距灰度
+// 算法: 灰度量化 / 多阈值分割
+// 作者: 李伟 wei.lw.li@hexagon.com
+// ============================================================================
+
+using Emgu.CV;
+using Emgu.CV.CvEnum;
+using Emgu.CV.Structure;
+using ImageProcessing.Core;
+using Serilog;
+
+namespace ImageProcessing.Processors;
+
+///
+/// 色彩分层算子,将灰度图像按亮度区间分为多个层级
+///
+public class ColorLayerProcessor : ImageProcessorBase
+{
+ private static readonly ILogger _logger = Log.ForContext();
+
+ public ColorLayerProcessor()
+ {
+ Name = LocalizationHelper.GetString("ColorLayerProcessor_Name");
+ Description = LocalizationHelper.GetString("ColorLayerProcessor_Description");
+ }
+
+ protected override void InitializeParameters()
+ {
+ Parameters.Add("Layers", new ProcessorParameter(
+ "Layers",
+ LocalizationHelper.GetString("ColorLayerProcessor_Layers"),
+ typeof(int),
+ 4,
+ 2,
+ 16,
+ LocalizationHelper.GetString("ColorLayerProcessor_Layers_Desc")));
+
+ Parameters.Add("Method", new ProcessorParameter(
+ "Method",
+ LocalizationHelper.GetString("ColorLayerProcessor_Method"),
+ typeof(string),
+ "Uniform",
+ null,
+ null,
+ LocalizationHelper.GetString("ColorLayerProcessor_Method_Desc"),
+ new string[] { "Uniform", "Otsu" }));
+
+ Parameters.Add("OutputMode", new ProcessorParameter(
+ "OutputMode",
+ LocalizationHelper.GetString("ColorLayerProcessor_OutputMode"),
+ typeof(string),
+ "EqualSpaced",
+ null,
+ null,
+ LocalizationHelper.GetString("ColorLayerProcessor_OutputMode_Desc"),
+ new string[] { "EqualSpaced", "MidValue" }));
+
+ Parameters.Add("TargetLayer", new ProcessorParameter(
+ "TargetLayer",
+ LocalizationHelper.GetString("ColorLayerProcessor_TargetLayer"),
+ typeof(int),
+ 0,
+ 0,
+ 16,
+ LocalizationHelper.GetString("ColorLayerProcessor_TargetLayer_Desc")));
+
+ _logger.Debug("InitializeParameters");
+ }
+
+ public override Image Process(Image inputImage)
+ {
+ int layers = GetParameter("Layers");
+ string method = GetParameter("Method");
+ string outputMode = GetParameter("OutputMode");
+ int targetLayer = GetParameter("TargetLayer");
+
+ // 限制 targetLayer 范围
+ if (targetLayer < 0 || targetLayer > layers)
+ targetLayer = 0;
+
+ _logger.Debug("Process: Layers={Layers}, Method={Method}, OutputMode={OutputMode}, TargetLayer={TargetLayer}",
+ layers, method, outputMode, targetLayer);
+
+ // 计算分层阈值
+ byte[] thresholds = method == "Otsu"
+ ? ComputeOtsuMultiThresholds(inputImage, layers)
+ : ComputeUniformThresholds(layers);
+
+ // 计算每层的输出灰度值
+ byte[] layerValues = ComputeLayerValues(thresholds, layers, outputMode);
+
+ // 应用分层映射
+ int width = inputImage.Width;
+ int height = inputImage.Height;
+ var result = new Image(width, height);
+ var srcData = inputImage.Data;
+ var dstData = result.Data;
+
+ if (targetLayer == 0)
+ {
+ // 输出全部层
+ Parallel.For(0, height, y =>
+ {
+ for (int x = 0; x < width; x++)
+ {
+ byte pixel = srcData[y, x, 0];
+ int layerIdx = GetLayerIndex(pixel, thresholds);
+ dstData[y, x, 0] = layerValues[layerIdx];
+ }
+ });
+ }
+ else
+ {
+ // 只输出指定层:选中层为 255(白),其余为 0(黑)
+ int target = targetLayer - 1; // 参数从1开始,内部索引从0开始
+ Parallel.For(0, height, y =>
+ {
+ for (int x = 0; x < width; x++)
+ {
+ byte pixel = srcData[y, x, 0];
+ int layerIdx = GetLayerIndex(pixel, thresholds);
+ dstData[y, x, 0] = (layerIdx == target) ? (byte)255 : (byte)0;
+ }
+ });
+ }
+
+ _logger.Debug("Process completed: {Layers} layers, target={TargetLayer}", layers, targetLayer);
+ return result;
+ }
+
+ ///
+ /// 均匀分层阈值:将 [0, 255] 等分
+ ///
+ private static byte[] ComputeUniformThresholds(int layers)
+ {
+ var thresholds = new byte[layers - 1];
+ double step = 256.0 / layers;
+ for (int i = 0; i < layers - 1; i++)
+ thresholds[i] = (byte)Math.Clamp((int)((i + 1) * step), 0, 255);
+ return thresholds;
+ }
+
+ ///
+ /// 基于 Otsu 的多阈值分层:递归二分
+ ///
+ private static byte[] ComputeOtsuMultiThresholds(Image image, int layers)
+ {
+ // 计算直方图
+ int[] histogram = new int[256];
+ var data = image.Data;
+ int h = image.Height, w = image.Width;
+ for (int y = 0; y < h; y++)
+ for (int x = 0; x < w; x++)
+ histogram[data[y, x, 0]]++;
+
+ // 递归 Otsu 分割
+ var thresholds = new List();
+ RecursiveOtsu(histogram, 0, 255, layers, thresholds);
+ thresholds.Sort();
+ return thresholds.ToArray();
+ }
+
+ ///
+ /// 递归 Otsu:在 [low, high] 范围内找最佳阈值,然后递归分割
+ ///
+ private static void RecursiveOtsu(int[] histogram, int low, int high, int layers, List thresholds)
+ {
+ if (layers <= 1 || low >= high)
+ return;
+
+ // 在 [low, high] 范围内找 Otsu 阈值
+ long totalPixels = 0;
+ long totalSum = 0;
+ for (int i = low; i <= high; i++)
+ {
+ totalPixels += histogram[i];
+ totalSum += (long)i * histogram[i];
+ }
+
+ if (totalPixels == 0) return;
+
+ long bgPixels = 0, bgSum = 0;
+ double maxVariance = 0;
+ int bestThreshold = (low + high) / 2;
+
+ for (int t = low; t < high; t++)
+ {
+ bgPixels += histogram[t];
+ bgSum += (long)t * histogram[t];
+
+ long fgPixels = totalPixels - bgPixels;
+ if (bgPixels == 0 || fgPixels == 0) continue;
+
+ double bgMean = (double)bgSum / bgPixels;
+ double fgMean = (double)(totalSum - bgSum) / fgPixels;
+ double variance = (double)bgPixels * fgPixels * (bgMean - fgMean) * (bgMean - fgMean);
+
+ if (variance > maxVariance)
+ {
+ maxVariance = variance;
+ bestThreshold = t;
+ }
+ }
+
+ thresholds.Add((byte)bestThreshold);
+
+ // 递归分割左右两半
+ int leftLayers = layers / 2;
+ int rightLayers = layers - leftLayers;
+ RecursiveOtsu(histogram, low, bestThreshold, leftLayers, thresholds);
+ RecursiveOtsu(histogram, bestThreshold + 1, high, rightLayers, thresholds);
+ }
+
+ ///
+ /// 计算每层的输出灰度值
+ ///
+ private static byte[] ComputeLayerValues(byte[] thresholds, int layers, string outputMode)
+ {
+ var values = new byte[layers];
+ if (outputMode == "EqualSpaced")
+ {
+ // 等间距输出:0, 255/(n-1), 2*255/(n-1), ..., 255
+ for (int i = 0; i < layers; i++)
+ values[i] = (byte)Math.Clamp((int)(255.0 * i / (layers - 1)), 0, 255);
+ }
+ else // MidValue
+ {
+ // 每层取区间中值
+ values[0] = (byte)(thresholds.Length > 0 ? thresholds[0] / 2 : 128);
+ for (int i = 1; i < layers - 1; i++)
+ values[i] = (byte)((thresholds[i - 1] + thresholds[i]) / 2);
+ values[layers - 1] = (byte)(thresholds.Length > 0 ? (thresholds[^1] + 255) / 2 : 128);
+ }
+ return values;
+ }
+
+ ///
+ /// 根据阈值数组确定像素所属层级
+ ///
+ private static int GetLayerIndex(byte pixel, byte[] thresholds)
+ {
+ for (int i = 0; i < thresholds.Length; i++)
+ {
+ if (pixel < thresholds[i])
+ return i;
+ }
+ return thresholds.Length;
+ }
+}
\ No newline at end of file
diff --git a/ImageProcessing.Processors/图像增强/ContrastProcessor.cs b/ImageProcessing.Processors/图像增强/ContrastProcessor.cs
new file mode 100644
index 0000000..de0e216
--- /dev/null
+++ b/ImageProcessing.Processors/图像增强/ContrastProcessor.cs
@@ -0,0 +1,172 @@
+// ============================================================================
+// Copyright © 2026 Hexagon Technology Center GmbH. All Rights Reserved.
+// 文件名: ContrastProcessor.cs
+// 描述: 对比度调整算子,用于增强图像对比度
+// 功能:
+// - 线性对比度和亮度调整
+// - 自动对比度拉伸
+// - CLAHE(对比度受限自适应直方图均衡化)
+// - 支持多种对比度增强方法
+// 算法: 线性变换、直方图均衡化、CLAHE
+// 作者: 李伟 wei.lw.li@hexagon.com
+// ============================================================================
+
+using Emgu.CV;
+using Emgu.CV.Structure;
+using ImageProcessing.Core;
+using Serilog;
+using System.Drawing;
+
+namespace ImageProcessing.Processors;
+
+///
+/// 对比度调整算子
+///
+public class ContrastProcessor : ImageProcessorBase
+{
+ private static readonly ILogger _logger = Log.ForContext();
+
+ public ContrastProcessor()
+ {
+ Name = LocalizationHelper.GetString("ContrastProcessor_Name");
+ Description = LocalizationHelper.GetString("ContrastProcessor_Description");
+ }
+
+ protected override void InitializeParameters()
+ {
+ Parameters.Add("Contrast", new ProcessorParameter(
+ "Contrast",
+ LocalizationHelper.GetString("ContrastProcessor_Contrast"),
+ typeof(double),
+ 1.0,
+ 0.1,
+ 3.0,
+ LocalizationHelper.GetString("ContrastProcessor_Contrast_Desc")));
+
+ Parameters.Add("Brightness", new ProcessorParameter(
+ "Brightness",
+ LocalizationHelper.GetString("ContrastProcessor_Brightness"),
+ typeof(int),
+ 0,
+ -100,
+ 100,
+ LocalizationHelper.GetString("ContrastProcessor_Brightness_Desc")));
+
+ Parameters.Add("AutoContrast", new ProcessorParameter(
+ "AutoContrast",
+ LocalizationHelper.GetString("ContrastProcessor_AutoContrast"),
+ typeof(bool),
+ false,
+ null,
+ null,
+ LocalizationHelper.GetString("ContrastProcessor_AutoContrast_Desc")));
+
+ Parameters.Add("UseCLAHE", new ProcessorParameter(
+ "UseCLAHE",
+ LocalizationHelper.GetString("ContrastProcessor_UseCLAHE"),
+ typeof(bool),
+ false,
+ null,
+ null,
+ LocalizationHelper.GetString("ContrastProcessor_UseCLAHE_Desc")));
+
+ Parameters.Add("ClipLimit", new ProcessorParameter(
+ "ClipLimit",
+ LocalizationHelper.GetString("ContrastProcessor_ClipLimit"),
+ typeof(double),
+ 2.0,
+ 1.0,
+ 10.0,
+ LocalizationHelper.GetString("ContrastProcessor_ClipLimit_Desc")));
+ _logger.Debug("InitializeParameters");
+ }
+
+ public override Image Process(Image inputImage)
+ {
+ double contrast = GetParameter("Contrast");
+ int brightness = GetParameter("Brightness");
+ bool autoContrast = GetParameter("AutoContrast");
+ bool useCLAHE = GetParameter("UseCLAHE");
+ double clipLimit = GetParameter("ClipLimit");
+
+ var result = inputImage.Clone();
+
+ if (useCLAHE)
+ {
+ result = ApplyCLAHE(inputImage, clipLimit);
+ }
+ else if (autoContrast)
+ {
+ result = AutoContrastStretch(inputImage);
+ }
+ else
+ {
+ result = inputImage * contrast + brightness;
+ }
+ _logger.Debug("Process: Contrast = {contrast},Brightness = {brightness}," +
+ "AutoContrast = {autoContrast},UseCLAHE = {useCLAHE}, ClipLimit = {clipLimit}", contrast, brightness, autoContrast, useCLAHE, clipLimit);
+ return result;
+ }
+
+ private Image AutoContrastStretch(Image inputImage)
+ {
+ double minVal = 0, maxVal = 0;
+ Point minLoc = new Point();
+ Point maxLoc = new Point();
+ CvInvoke.MinMaxLoc(inputImage, ref minVal, ref maxVal, ref minLoc, ref maxLoc);
+
+ if (minVal == 0 && maxVal == 255)
+ {
+ return inputImage.Clone();
+ }
+
+ var floatImage = inputImage.Convert();
+
+ if (maxVal > minVal)
+ {
+ floatImage = (floatImage - minVal) * (255.0 / (maxVal - minVal));
+ }
+ _logger.Debug("AutoContrastStretch");
+ return floatImage.Convert();
+ }
+
+ private Image ApplyCLAHE(Image inputImage, double clipLimit)
+ {
+ int tileSize = 8;
+ int width = inputImage.Width;
+ int height = inputImage.Height;
+
+ int tilesX = (width + tileSize - 1) / tileSize;
+ int tilesY = (height + tileSize - 1) / tileSize;
+
+ var result = new Image(width, height);
+
+ for (int ty = 0; ty < tilesY; ty++)
+ {
+ for (int tx = 0; tx < tilesX; tx++)
+ {
+ int x = tx * tileSize;
+ int y = ty * tileSize;
+ int w = Math.Min(tileSize, width - x);
+ int h = Math.Min(tileSize, height - y);
+
+ var roi = new System.Drawing.Rectangle(x, y, w, h);
+ inputImage.ROI = roi;
+ var tile = inputImage.Copy();
+ inputImage.ROI = System.Drawing.Rectangle.Empty;
+
+ var equalizedTile = new Image(tile.Size);
+ CvInvoke.EqualizeHist(tile, equalizedTile);
+
+ result.ROI = roi;
+ equalizedTile.CopyTo(result);
+ result.ROI = System.Drawing.Rectangle.Empty;
+
+ tile.Dispose();
+ equalizedTile.Dispose();
+ }
+ }
+ _logger.Debug("ApplyCLAHE");
+ return result;
+ }
+}
\ No newline at end of file
diff --git a/ImageProcessing.Processors/图像增强/GammaProcessor.cs b/ImageProcessing.Processors/图像增强/GammaProcessor.cs
new file mode 100644
index 0000000..c9a85d7
--- /dev/null
+++ b/ImageProcessing.Processors/图像增强/GammaProcessor.cs
@@ -0,0 +1,100 @@
+// ============================================================================
+// Copyright © 2026 Hexagon Technology Center GmbH. All Rights Reserved.
+// 文件名: GammaProcessor.cs
+// 描述: Gamma校正算子,用于调整图像亮度和对比度
+// 功能:
+// - Gamma非线性校正
+// - 增益调整
+// - 使用查找表(LUT)加速处理
+// - 适用于图像显示和亮度调整
+// 算法: Gamma校正公式 output = (input^(1/gamma)) * gain
+// 作者: 李伟 wei.lw.li@hexagon.com
+// ============================================================================
+
+using Emgu.CV;
+using Emgu.CV.Structure;
+using ImageProcessing.Core;
+using Serilog;
+
+namespace ImageProcessing.Processors;
+
+///
+/// Gamma校正算子
+///
+public class GammaProcessor : ImageProcessorBase
+{
+ private byte[] _lookupTable;
+ private static readonly ILogger _logger = Log.ForContext();
+
+ public GammaProcessor()
+ {
+ Name = LocalizationHelper.GetString("GammaProcessor_Name");
+ Description = LocalizationHelper.GetString("GammaProcessor_Description");
+ _lookupTable = new byte[256];
+ }
+
+ protected override void InitializeParameters()
+ {
+ Parameters.Add("Gamma", new ProcessorParameter(
+ "Gamma",
+ LocalizationHelper.GetString("GammaProcessor_Gamma"),
+ typeof(double),
+ 1.0,
+ 0.1,
+ 5.0,
+ LocalizationHelper.GetString("GammaProcessor_Gamma_Desc")));
+
+ Parameters.Add("Gain", new ProcessorParameter(
+ "Gain",
+ LocalizationHelper.GetString("GammaProcessor_Gain"),
+ typeof(double),
+ 1.0,
+ 0.1,
+ 3.0,
+ LocalizationHelper.GetString("GammaProcessor_Gain_Desc")));
+ _logger.Debug("InitializeParameters");
+ }
+
+ public override Image Process(Image inputImage)
+ {
+ double gamma = GetParameter("Gamma");
+ double gain = GetParameter("Gain");
+
+ BuildLookupTable(gamma, gain);
+
+ var result = inputImage.Clone();
+ ApplyLookupTable(result);
+ _logger.Debug("Process:Gamma = {0}, Gain = {1}", gamma, gain);
+ return result;
+ }
+
+ private void BuildLookupTable(double gamma, double gain)
+ {
+ double invGamma = 1.0 / gamma;
+
+ for (int i = 0; i < 256; i++)
+ {
+ double normalized = i / 255.0;
+ double corrected = Math.Pow(normalized, invGamma) * gain;
+ int value = (int)(corrected * 255.0);
+
+ _lookupTable[i] = (byte)Math.Max(0, Math.Min(255, value));
+ }
+ _logger.Debug("Gamma and gain values recorded: gamma = {Gamma}, gain = {Gain}", gamma, gain);
+ }
+
+ private void ApplyLookupTable(Image image)
+ {
+ int width = image.Width;
+ int height = image.Height;
+
+ for (int y = 0; y < height; y++)
+ {
+ for (int x = 0; x < width; x++)
+ {
+ byte pixelValue = image.Data[y, x, 0];
+ image.Data[y, x, 0] = _lookupTable[pixelValue];
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/ImageProcessing.Processors/图像增强/HDREnhancementProcessor.cs b/ImageProcessing.Processors/图像增强/HDREnhancementProcessor.cs
new file mode 100644
index 0000000..b4730cc
--- /dev/null
+++ b/ImageProcessing.Processors/图像增强/HDREnhancementProcessor.cs
@@ -0,0 +1,549 @@
+// ============================================================================
+// Copyright © 2026 Hexagon Technology Center GmbH. All Rights Reserved.
+// 文件名: HDREnhancementProcessor.cs
+// 描述: 高动态范围(HDR)图像增强算子
+// 功能:
+// - 局部色调映射(Local Tone Mapping)
+// - 自适应对数映射(Adaptive Logarithmic Mapping)
+// - Drago色调映射
+// - 双边滤波色调映射
+// - 增强图像暗部和亮部细节
+// 算法: 基于色调映射的HDR增强
+// 作者: 李伟 wei.lw.li@hexagon.com
+// ============================================================================
+
+using Emgu.CV;
+using Emgu.CV.Structure;
+using ImageProcessing.Core;
+using Serilog;
+
+namespace ImageProcessing.Processors;
+
+///
+/// 高动态范围图像增强算子
+///
+public class HDREnhancementProcessor : ImageProcessorBase
+{
+ private static readonly ILogger _logger = Log.ForContext();
+
+ public HDREnhancementProcessor()
+ {
+ Name = LocalizationHelper.GetString("HDREnhancementProcessor_Name");
+ Description = LocalizationHelper.GetString("HDREnhancementProcessor_Description");
+ }
+
+ protected override void InitializeParameters()
+ {
+ Parameters.Add("Method", new ProcessorParameter(
+ "Method",
+ LocalizationHelper.GetString("HDREnhancementProcessor_Method"),
+ typeof(string),
+ "LocalToneMap",
+ null,
+ null,
+ LocalizationHelper.GetString("HDREnhancementProcessor_Method_Desc"),
+ new string[] { "LocalToneMap", "AdaptiveLog", "Drago", "BilateralToneMap" }));
+
+ Parameters.Add("Gamma", new ProcessorParameter(
+ "Gamma",
+ LocalizationHelper.GetString("HDREnhancementProcessor_Gamma"),
+ typeof(double),
+ 1.0,
+ 0.1,
+ 5.0,
+ LocalizationHelper.GetString("HDREnhancementProcessor_Gamma_Desc")));
+
+ Parameters.Add("Saturation", new ProcessorParameter(
+ "Saturation",
+ LocalizationHelper.GetString("HDREnhancementProcessor_Saturation"),
+ typeof(double),
+ 1.0,
+ 0.0,
+ 3.0,
+ LocalizationHelper.GetString("HDREnhancementProcessor_Saturation_Desc")));
+
+ Parameters.Add("DetailBoost", new ProcessorParameter(
+ "DetailBoost",
+ LocalizationHelper.GetString("HDREnhancementProcessor_DetailBoost"),
+ typeof(double),
+ 1.5,
+ 0.0,
+ 5.0,
+ LocalizationHelper.GetString("HDREnhancementProcessor_DetailBoost_Desc")));
+
+ Parameters.Add("SigmaSpace", new ProcessorParameter(
+ "SigmaSpace",
+ LocalizationHelper.GetString("HDREnhancementProcessor_SigmaSpace"),
+ typeof(double),
+ 20.0,
+ 1.0,
+ 100.0,
+ LocalizationHelper.GetString("HDREnhancementProcessor_SigmaSpace_Desc")));
+
+ Parameters.Add("SigmaColor", new ProcessorParameter(
+ "SigmaColor",
+ LocalizationHelper.GetString("HDREnhancementProcessor_SigmaColor"),
+ typeof(double),
+ 30.0,
+ 1.0,
+ 100.0,
+ LocalizationHelper.GetString("HDREnhancementProcessor_SigmaColor_Desc")));
+
+ Parameters.Add("Bias", new ProcessorParameter(
+ "Bias",
+ LocalizationHelper.GetString("HDREnhancementProcessor_Bias"),
+ typeof(double),
+ 0.85,
+ 0.0,
+ 1.0,
+ LocalizationHelper.GetString("HDREnhancementProcessor_Bias_Desc")));
+
+ _logger.Debug("InitializeParameters");
+ }
+
+ public override Image Process(Image inputImage)
+ {
+ string method = GetParameter("Method");
+ double gamma = GetParameter("Gamma");
+ double saturation = GetParameter("Saturation");
+ double detailBoost = GetParameter("DetailBoost");
+ double sigmaSpace = GetParameter("SigmaSpace");
+ double sigmaColor = GetParameter("SigmaColor");
+ double bias = GetParameter("Bias");
+
+ Image result;
+
+ switch (method)
+ {
+ case "AdaptiveLog":
+ result = AdaptiveLogarithmicMapping(inputImage, gamma, bias);
+ break;
+
+ case "Drago":
+ result = DragoToneMapping(inputImage, gamma, bias);
+ break;
+
+ case "BilateralToneMap":
+ result = BilateralToneMapping(inputImage, gamma, sigmaSpace, sigmaColor, detailBoost);
+ break;
+
+ default: // LocalToneMap
+ result = LocalToneMapping(inputImage, gamma, sigmaSpace, detailBoost, saturation);
+ break;
+ }
+
+ _logger.Debug("Process: Method={Method}, Gamma={Gamma}, Saturation={Saturation}, DetailBoost={DetailBoost}, SigmaSpace={SigmaSpace}, SigmaColor={SigmaColor}, Bias={Bias}",
+ method, gamma, saturation, detailBoost, sigmaSpace, sigmaColor, bias);
+ return result;
+ }
+
+ ///
+ /// 局部色调映射
+ /// 将图像分解为基础层(光照)和细节层,分别处理后合成
+ /// Base = GaussianBlur(log(I))
+ /// Detail = log(I) - Base
+ /// Output = exp(Base_compressed + Detail * boost)
+ ///
+ private Image LocalToneMapping(Image inputImage,
+ double gamma, double sigmaSpace, double detailBoost, double saturation)
+ {
+ int width = inputImage.Width;
+ int height = inputImage.Height;
+
+ // 转换为浮点并归一化到 (0, 1]
+ var floatImage = inputImage.Convert();
+ for (int y = 0; y < height; y++)
+ for (int x = 0; x < width; x++)
+ floatImage.Data[y, x, 0] = floatImage.Data[y, x, 0] / 255.0f + 0.001f;
+
+ // 对数域
+ var logImage = new Image(width, height);
+ for (int y = 0; y < height; y++)
+ for (int x = 0; x < width; x++)
+ logImage.Data[y, x, 0] = (float)Math.Log(floatImage.Data[y, x, 0]);
+
+ // 基础层:大尺度高斯模糊提取光照分量
+ int kernelSize = (int)(sigmaSpace * 6) | 1;
+ if (kernelSize < 3) kernelSize = 3;
+ var baseLayer = new Image(width, height);
+ CvInvoke.GaussianBlur(logImage, baseLayer, new System.Drawing.Size(kernelSize, kernelSize), sigmaSpace);
+
+ // 细节层
+ var detailLayer = logImage - baseLayer;
+
+ // 压缩基础层的动态范围
+ double baseMin = double.MaxValue, baseMax = double.MinValue;
+ for (int y = 0; y < height; y++)
+ {
+ for (int x = 0; x < width; x++)
+ {
+ float v = baseLayer.Data[y, x, 0];
+ if (v < baseMin) baseMin = v;
+ if (v > baseMax) baseMax = v;
+ }
+ }
+
+ double baseRange = baseMax - baseMin;
+ if (baseRange < 0.001) baseRange = 0.001;
+
+ // 目标动态范围(对数域)
+ double targetRange = Math.Log(256.0);
+ double compressionFactor = targetRange / baseRange;
+
+ var compressedBase = new Image(width, height);
+ for (int y = 0; y < height; y++)
+ {
+ for (int x = 0; x < width; x++)
+ {
+ float normalized = (float)((baseLayer.Data[y, x, 0] - baseMin) / baseRange);
+ compressedBase.Data[y, x, 0] = (float)(normalized * targetRange + Math.Log(0.01));
+ }
+ }
+
+ // 合成:压缩后的基础层 + 增强的细节层
+ var combined = new Image(width, height);
+ for (int y = 0; y < height; y++)
+ {
+ for (int x = 0; x < width; x++)
+ {
+ float val = compressedBase.Data[y, x, 0] + detailLayer.Data[y, x, 0] * (float)detailBoost;
+ combined.Data[y, x, 0] = val;
+ }
+ }
+
+ // 指数变换回线性域
+ var linearResult = new Image(width, height);
+ for (int y = 0; y < height; y++)
+ for (int x = 0; x < width; x++)
+ linearResult.Data[y, x, 0] = (float)Math.Exp(combined.Data[y, x, 0]);
+
+ // Gamma校正
+ if (Math.Abs(gamma - 1.0) > 0.01)
+ {
+ double invGamma = 1.0 / gamma;
+ double maxVal = 0;
+ for (int y = 0; y < height; y++)
+ for (int x = 0; x < width; x++)
+ if (linearResult.Data[y, x, 0] > maxVal) maxVal = linearResult.Data[y, x, 0];
+
+ if (maxVal > 0)
+ {
+ for (int y = 0; y < height; y++)
+ for (int x = 0; x < width; x++)
+ {
+ double normalized = linearResult.Data[y, x, 0] / maxVal;
+ linearResult.Data[y, x, 0] = (float)(Math.Pow(normalized, invGamma) * maxVal);
+ }
+ }
+ }
+
+ // 饱和度增强(对比度微调)
+ if (Math.Abs(saturation - 1.0) > 0.01)
+ {
+ double mean = 0;
+ for (int y = 0; y < height; y++)
+ for (int x = 0; x < width; x++)
+ mean += linearResult.Data[y, x, 0];
+ mean /= (width * height);
+
+ for (int y = 0; y < height; y++)
+ for (int x = 0; x < width; x++)
+ {
+ double diff = linearResult.Data[y, x, 0] - mean;
+ linearResult.Data[y, x, 0] = (float)(mean + diff * saturation);
+ }
+ }
+
+ // 归一化到 [0, 255]
+ var result = NormalizeToByteImage(linearResult);
+
+ floatImage.Dispose();
+ logImage.Dispose();
+ baseLayer.Dispose();
+ detailLayer.Dispose();
+ compressedBase.Dispose();
+ combined.Dispose();
+ linearResult.Dispose();
+
+ return result;
+ }
+
+ ///
+ /// 自适应对数映射
+ /// 根据场景的整体亮度自适应调整对数映射曲线
+ /// L_out = (log(1 + L_in) / log(1 + L_max)) ^ (1/gamma)
+ /// 使用局部自适应:L_max 根据邻域计算
+ ///
+ private Image AdaptiveLogarithmicMapping(Image inputImage,
+ double gamma, double bias)
+ {
+ int width = inputImage.Width;
+ int height = inputImage.Height;
+
+ var floatImage = inputImage.Convert();
+
+ // 归一化到 [0, 1]
+ for (int y = 0; y < height; y++)
+ for (int x = 0; x < width; x++)
+ floatImage.Data[y, x, 0] /= 255.0f;
+
+ // 计算全局最大亮度
+ float globalMax = 0;
+ for (int y = 0; y < height; y++)
+ for (int x = 0; x < width; x++)
+ if (floatImage.Data[y, x, 0] > globalMax)
+ globalMax = floatImage.Data[y, x, 0];
+
+ if (globalMax < 0.001f) globalMax = 0.001f;
+
+ // 计算对数平均亮度
+ double logAvg = 0;
+ int count = 0;
+ for (int y = 0; y < height; y++)
+ {
+ for (int x = 0; x < width; x++)
+ {
+ float v = floatImage.Data[y, x, 0];
+ if (v > 0.001f)
+ {
+ logAvg += Math.Log(v);
+ count++;
+ }
+ }
+ }
+ logAvg = Math.Exp(logAvg / Math.Max(count, 1));
+
+ // 自适应对数映射
+ // bias 控制暗部和亮部的平衡
+ double logBase = Math.Log(2.0 + 8.0 * Math.Pow(logAvg / globalMax, Math.Log(bias) / Math.Log(0.5)));
+
+ var result = new Image(width, height);
+ for (int y = 0; y < height; y++)
+ {
+ for (int x = 0; x < width; x++)
+ {
+ float lum = floatImage.Data[y, x, 0];
+ double mapped = Math.Log(1.0 + lum) / logBase;
+ result.Data[y, x, 0] = (float)mapped;
+ }
+ }
+
+ // Gamma校正
+ if (Math.Abs(gamma - 1.0) > 0.01)
+ {
+ double invGamma = 1.0 / gamma;
+ for (int y = 0; y < height; y++)
+ for (int x = 0; x < width; x++)
+ result.Data[y, x, 0] = (float)Math.Pow(Math.Max(0, result.Data[y, x, 0]), invGamma);
+ }
+
+ var byteResult = NormalizeToByteImage(result);
+
+ floatImage.Dispose();
+ result.Dispose();
+
+ return byteResult;
+ }
+
+ ///
+ /// Drago色调映射
+ /// 使用自适应对数基底进行色调映射
+ /// L_out = log_base(1 + L_in) / log_base(1 + L_max)
+ /// base = 2 + 8 * (L_in / L_max) ^ (ln(bias) / ln(0.5))
+ ///
+ private Image DragoToneMapping(Image inputImage,
+ double gamma, double bias)
+ {
+ int width = inputImage.Width;
+ int height = inputImage.Height;
+
+ var floatImage = inputImage.Convert();
+
+ // 归一化到 [0, 1]
+ for (int y = 0; y < height; y++)
+ for (int x = 0; x < width; x++)
+ floatImage.Data[y, x, 0] /= 255.0f;
+
+ // 全局最大亮度
+ float maxLum = 0;
+ for (int y = 0; y < height; y++)
+ for (int x = 0; x < width; x++)
+ if (floatImage.Data[y, x, 0] > maxLum)
+ maxLum = floatImage.Data[y, x, 0];
+
+ if (maxLum < 0.001f) maxLum = 0.001f;
+
+ double biasP = Math.Log(bias) / Math.Log(0.5);
+ double divider = Math.Log10(1.0 + maxLum);
+ if (divider < 0.001) divider = 0.001;
+
+ var result = new Image(width, height);
+ for (int y = 0; y < height; y++)
+ {
+ for (int x = 0; x < width; x++)
+ {
+ float lum = floatImage.Data[y, x, 0];
+ // 自适应对数基底
+ double adaptBase = 2.0 + 8.0 * Math.Pow(lum / maxLum, biasP);
+ double logAdapt = Math.Log(1.0 + lum) / Math.Log(adaptBase);
+ double mapped = logAdapt / divider;
+ result.Data[y, x, 0] = (float)Math.Max(0, Math.Min(1.0, mapped));
+ }
+ }
+
+ // Gamma校正
+ if (Math.Abs(gamma - 1.0) > 0.01)
+ {
+ double invGamma = 1.0 / gamma;
+ for (int y = 0; y < height; y++)
+ for (int x = 0; x < width; x++)
+ result.Data[y, x, 0] = (float)Math.Pow(result.Data[y, x, 0], invGamma);
+ }
+
+ var byteResult = NormalizeToByteImage(result);
+
+ floatImage.Dispose();
+ result.Dispose();
+
+ return byteResult;
+ }
+
+ ///
+ /// 双边滤波色调映射
+ /// 使用双边滤波分离基础层和细节层
+ /// 双边滤波保边特性使得细节层更加精确
+ ///
+ private Image BilateralToneMapping(Image inputImage,
+ double gamma, double sigmaSpace, double sigmaColor, double detailBoost)
+ {
+ int width = inputImage.Width;
+ int height = inputImage.Height;
+
+ // 转换为浮点并取对数
+ var floatImage = inputImage.Convert();
+ var logImage = new Image(width, height);
+ for (int y = 0; y < height; y++)
+ for (int x = 0; x < width; x++)
+ logImage.Data[y, x, 0] = (float)Math.Log(floatImage.Data[y, x, 0] / 255.0f + 0.001);
+
+ // 双边滤波提取基础层(保边平滑)
+ int diameter = (int)(sigmaSpace * 2) | 1;
+ if (diameter < 3) diameter = 3;
+ if (diameter > 31) diameter = 31;
+
+ var baseLayer = new Image(width, height);
+ // 转换为 byte 进行双边滤波,再转回 float
+ var logNorm = NormalizeToByteImage(logImage);
+ var baseNorm = new Image(width, height);
+ CvInvoke.BilateralFilter(logNorm, baseNorm, diameter, sigmaColor, sigmaSpace);
+
+ // 将基础层转回浮点对数域
+ double logMin = double.MaxValue, logMax = double.MinValue;
+ for (int y = 0; y < height; y++)
+ for (int x = 0; x < width; x++)
+ {
+ float v = logImage.Data[y, x, 0];
+ if (v < logMin) logMin = v;
+ if (v > logMax) logMax = v;
+ }
+
+ double logRange = logMax - logMin;
+ if (logRange < 0.001) logRange = 0.001;
+
+ for (int y = 0; y < height; y++)
+ for (int x = 0; x < width; x++)
+ baseLayer.Data[y, x, 0] = (float)(baseNorm.Data[y, x, 0] / 255.0 * logRange + logMin);
+
+ // 细节层 = 对数图像 - 基础层
+ var detailLayer = logImage - baseLayer;
+
+ // 压缩基础层
+ double baseMin = double.MaxValue, baseMax = double.MinValue;
+ for (int y = 0; y < height; y++)
+ for (int x = 0; x < width; x++)
+ {
+ float v = baseLayer.Data[y, x, 0];
+ if (v < baseMin) baseMin = v;
+ if (v > baseMax) baseMax = v;
+ }
+
+ double bRange = baseMax - baseMin;
+ if (bRange < 0.001) bRange = 0.001;
+ double targetRange = Math.Log(256.0);
+ double compression = targetRange / bRange;
+
+ // 合成
+ var combined = new Image(width, height);
+ for (int y = 0; y < height; y++)
+ for (int x = 0; x < width; x++)
+ {
+ float compBase = (float)((baseLayer.Data[y, x, 0] - baseMin) * compression + Math.Log(0.01));
+ combined.Data[y, x, 0] = compBase + detailLayer.Data[y, x, 0] * (float)detailBoost;
+ }
+
+ // 指数变换回线性域
+ var linearResult = new Image(width, height);
+ for (int y = 0; y < height; y++)
+ for (int x = 0; x < width; x++)
+ linearResult.Data[y, x, 0] = (float)Math.Exp(combined.Data[y, x, 0]);
+
+ // Gamma校正
+ if (Math.Abs(gamma - 1.0) > 0.01)
+ {
+ double invGamma = 1.0 / gamma;
+ double maxVal = 0;
+ for (int y = 0; y < height; y++)
+ for (int x = 0; x < width; x++)
+ if (linearResult.Data[y, x, 0] > maxVal) maxVal = linearResult.Data[y, x, 0];
+
+ if (maxVal > 0)
+ for (int y = 0; y < height; y++)
+ for (int x = 0; x < width; x++)
+ linearResult.Data[y, x, 0] = (float)(Math.Pow(linearResult.Data[y, x, 0] / maxVal, invGamma) * maxVal);
+ }
+
+ var result = NormalizeToByteImage(linearResult);
+
+ floatImage.Dispose();
+ logImage.Dispose();
+ logNorm.Dispose();
+ baseNorm.Dispose();
+ baseLayer.Dispose();
+ detailLayer.Dispose();
+ combined.Dispose();
+ linearResult.Dispose();
+
+ return result;
+ }
+
+ ///
+ /// 归一化浮点图像到字节图像
+ ///
+ private Image NormalizeToByteImage(Image floatImage)
+ {
+ double minVal = double.MaxValue;
+ double maxVal = double.MinValue;
+
+ for (int y = 0; y < floatImage.Height; y++)
+ for (int x = 0; x < floatImage.Width; x++)
+ {
+ float val = floatImage.Data[y, x, 0];
+ if (val < minVal) minVal = val;
+ if (val > maxVal) maxVal = val;
+ }
+
+ var result = new Image(floatImage.Size);
+ double range = maxVal - minVal;
+ if (range > 0)
+ {
+ for (int y = 0; y < floatImage.Height; y++)
+ for (int x = 0; x < floatImage.Width; x++)
+ {
+ int normalized = (int)((floatImage.Data[y, x, 0] - minVal) / range * 255.0);
+ result.Data[y, x, 0] = (byte)Math.Max(0, Math.Min(255, normalized));
+ }
+ }
+
+ return result;
+ }
+}
\ No newline at end of file
diff --git a/ImageProcessing.Processors/图像增强/HierarchicalEnhancementProcessor.cs b/ImageProcessing.Processors/图像增强/HierarchicalEnhancementProcessor.cs
new file mode 100644
index 0000000..db04325
--- /dev/null
+++ b/ImageProcessing.Processors/图像增强/HierarchicalEnhancementProcessor.cs
@@ -0,0 +1,213 @@
+// ============================================================================
+// Copyright © 2026 Hexagon Technology Center GmbH. All Rights Reserved.
+// 文件名: HierarchicalEnhancementProcessor.cs
+// 描述: 层次增强算子,基于多尺度高斯分解对不同尺度细节独立增强
+// 功能:
+// - 将图像分解为多层细节层 + 基础层
+// - 对每层细节独立控制增益
+// - 支持基础层亮度调整和对比度限制
+// 算法: 多尺度高斯差分分解与重建
+// 作者: 李伟 wei.lw.li@hexagon.com
+// ============================================================================
+
+using Emgu.CV;
+using Emgu.CV.CvEnum;
+using Emgu.CV.Structure;
+using ImageProcessing.Core;
+using Serilog;
+
+namespace ImageProcessing.Processors;
+
+///
+/// 层次增强算子,基于多尺度高斯差分对不同尺度的图像细节进行独立增强
+///
+public class HierarchicalEnhancementProcessor : ImageProcessorBase
+{
+ private static readonly ILogger _logger = Log.ForContext();
+
+ public HierarchicalEnhancementProcessor()
+ {
+ Name = LocalizationHelper.GetString("HierarchicalEnhancementProcessor_Name");
+ Description = LocalizationHelper.GetString("HierarchicalEnhancementProcessor_Description");
+ }
+
+ protected override void InitializeParameters()
+ {
+ Parameters.Add("Levels", new ProcessorParameter(
+ "Levels",
+ LocalizationHelper.GetString("HierarchicalEnhancementProcessor_Levels"),
+ typeof(int),
+ 4,
+ 2,
+ 8,
+ LocalizationHelper.GetString("HierarchicalEnhancementProcessor_Levels_Desc")));
+
+ Parameters.Add("FineGain", new ProcessorParameter(
+ "FineGain",
+ LocalizationHelper.GetString("HierarchicalEnhancementProcessor_FineGain"),
+ typeof(double),
+ 2.0,
+ 0.0,
+ 10.0,
+ LocalizationHelper.GetString("HierarchicalEnhancementProcessor_FineGain_Desc")));
+
+ Parameters.Add("MediumGain", new ProcessorParameter(
+ "MediumGain",
+ LocalizationHelper.GetString("HierarchicalEnhancementProcessor_MediumGain"),
+ typeof(double),
+ 1.5,
+ 0.0,
+ 10.0,
+ LocalizationHelper.GetString("HierarchicalEnhancementProcessor_MediumGain_Desc")));
+
+ Parameters.Add("CoarseGain", new ProcessorParameter(
+ "CoarseGain",
+ LocalizationHelper.GetString("HierarchicalEnhancementProcessor_CoarseGain"),
+ typeof(double),
+ 1.0,
+ 0.0,
+ 10.0,
+ LocalizationHelper.GetString("HierarchicalEnhancementProcessor_CoarseGain_Desc")));
+
+ Parameters.Add("BaseGain", new ProcessorParameter(
+ "BaseGain",
+ LocalizationHelper.GetString("HierarchicalEnhancementProcessor_BaseGain"),
+ typeof(double),
+ 1.0,
+ 0.0,
+ 3.0,
+ LocalizationHelper.GetString("HierarchicalEnhancementProcessor_BaseGain_Desc")));
+
+ Parameters.Add("ClipLimit", new ProcessorParameter(
+ "ClipLimit",
+ LocalizationHelper.GetString("HierarchicalEnhancementProcessor_ClipLimit"),
+ typeof(double),
+ 0.0,
+ 0.0,
+ 50.0,
+ LocalizationHelper.GetString("HierarchicalEnhancementProcessor_ClipLimit_Desc")));
+
+ _logger.Debug("InitializeParameters");
+ }
+
+ public override Image Process(Image inputImage)
+ {
+ int levels = GetParameter("Levels");
+ double fineGain = GetParameter("FineGain");
+ double mediumGain = GetParameter("MediumGain");
+ double coarseGain = GetParameter("CoarseGain");
+ double baseGain = GetParameter("BaseGain");
+ double clipLimit = GetParameter("ClipLimit");
+
+ _logger.Debug("Process: Levels={Levels}, Fine={Fine}, Medium={Medium}, Coarse={Coarse}, Base={Base}, Clip={Clip}",
+ levels, fineGain, mediumGain, coarseGain, baseGain, clipLimit);
+
+ int h = inputImage.Height;
+ int w = inputImage.Width;
+
+ // === 多尺度高斯差分分解(全部在原始分辨率上操作,无需金字塔上下采样) ===
+ // 用递增 sigma 的高斯模糊生成平滑层序列:G0(原图), G1, G2, ..., G_n(基础层)
+ // 细节层 D_i = G_i - G_{i+1}
+ // 重建:output = sum(D_i * gain_i) + G_n * baseGain
+
+ // 计算每层的高斯 sigma(指数递增)
+ var sigmas = new double[levels];
+ for (int i = 0; i < levels; i++)
+ sigmas[i] = Math.Pow(2, i + 1); // 2, 4, 8, 16, ...
+
+ // 生成平滑层序列(float 数组,避免 Emgu float Image 的问题)
+ var smoothLayers = new float[levels + 1][]; // [0]=原图, [1..n]=高斯模糊
+ smoothLayers[0] = new float[h * w];
+ var srcData = inputImage.Data;
+ Parallel.For(0, h, y =>
+ {
+ int row = y * w;
+ for (int x = 0; x < w; x++)
+ smoothLayers[0][row + x] = srcData[y, x, 0];
+ });
+
+ for (int i = 0; i < levels; i++)
+ {
+ int ksize = ((int)(sigmas[i] * 3)) | 1; // 确保奇数
+ if (ksize < 3) ksize = 3;
+
+ using var src = new Image(w, h);
+ // 从上一层 float 转 byte 做高斯模糊
+ var prevLayer = smoothLayers[i];
+ var sd = src.Data;
+ Parallel.For(0, h, y =>
+ {
+ int row = y * w;
+ for (int x = 0; x < w; x++)
+ sd[y, x, 0] = (byte)Math.Clamp((int)Math.Round(prevLayer[row + x]), 0, 255);
+ });
+
+ using var dst = new Image(w, h);
+ CvInvoke.GaussianBlur(src, dst, new System.Drawing.Size(ksize, ksize), sigmas[i]);
+
+ smoothLayers[i + 1] = new float[h * w];
+ var dd = dst.Data;
+ var nextLayer = smoothLayers[i + 1];
+ Parallel.For(0, h, y =>
+ {
+ int row = y * w;
+ for (int x = 0; x < w; x++)
+ nextLayer[row + x] = dd[y, x, 0];
+ });
+ }
+
+ // === 计算增益插值并直接重建 ===
+ var gains = new double[levels];
+ for (int i = 0; i < levels; i++)
+ {
+ double t = levels <= 1 ? 0.0 : (double)i / (levels - 1);
+ if (t <= 0.5)
+ {
+ double t2 = t * 2.0;
+ gains[i] = fineGain * (1.0 - t2) + mediumGain * t2;
+ }
+ else
+ {
+ double t2 = (t - 0.5) * 2.0;
+ gains[i] = mediumGain * (1.0 - t2) + coarseGain * t2;
+ }
+ }
+
+ // 重建:output = baseGain * G_n + sum(gain_i * (G_i - G_{i+1}))
+ float fBaseGain = (float)baseGain;
+ float fClip = (float)clipLimit;
+ var baseLayerData = smoothLayers[levels];
+
+ var result = new Image(w, h);
+ var resultData = result.Data;
+
+ // 预转换 gains 为 float
+ var fGains = new float[levels];
+ for (int i = 0; i < levels; i++)
+ fGains[i] = (float)gains[i];
+
+ Parallel.For(0, h, y =>
+ {
+ int row = y * w;
+ for (int x = 0; x < w; x++)
+ {
+ int idx = row + x;
+ float val = baseLayerData[idx] * fBaseGain;
+
+ for (int i = 0; i < levels; i++)
+ {
+ float detail = smoothLayers[i][idx] - smoothLayers[i + 1][idx];
+ detail *= fGains[i];
+ if (fClip > 0)
+ detail = Math.Clamp(detail, -fClip, fClip);
+ val += detail;
+ }
+
+ resultData[y, x, 0] = (byte)Math.Clamp((int)Math.Round(val), 0, 255);
+ }
+ });
+
+ _logger.Debug("Process completed: {Levels} levels, output={W}x{H}", levels, w, h);
+ return result;
+ }
+}
diff --git a/ImageProcessing.Processors/图像增强/HistogramEqualizationProcessor.cs b/ImageProcessing.Processors/图像增强/HistogramEqualizationProcessor.cs
new file mode 100644
index 0000000..c964049
--- /dev/null
+++ b/ImageProcessing.Processors/图像增强/HistogramEqualizationProcessor.cs
@@ -0,0 +1,142 @@
+// ============================================================================
+// Copyright © 2026 Hexagon Technology Center GmbH. All Rights Reserved.
+// 文件名: HistogramEqualizationProcessor.cs
+// 描述: 直方图均衡化算子,用于增强图像对比度
+// 功能:
+// - 全局直方图均衡化
+// - 自适应直方图均衡化(CLAHE)
+// - 限制对比度增强
+// - 改善图像的整体对比度
+// 算法: 直方图均衡化、CLAHE
+// 作者: 李伟 wei.lw.li@hexagon.com
+// ============================================================================
+
+using Emgu.CV;
+using Emgu.CV.Structure;
+using ImageProcessing.Core;
+using Serilog;
+
+namespace ImageProcessing.Processors;
+
+///
+/// 直方图均衡化算子
+///
+public class HistogramEqualizationProcessor : ImageProcessorBase
+{
+ private static readonly ILogger _logger = Log.ForContext();
+
+ public HistogramEqualizationProcessor()
+ {
+ Name = LocalizationHelper.GetString("HistogramEqualizationProcessor_Name");
+ Description = LocalizationHelper.GetString("HistogramEqualizationProcessor_Description");
+ }
+
+ protected override void InitializeParameters()
+ {
+ Parameters.Add("Method", new ProcessorParameter(
+ "Method",
+ LocalizationHelper.GetString("HistogramEqualizationProcessor_Method"),
+ typeof(string),
+ "Global",
+ null,
+ null,
+ LocalizationHelper.GetString("HistogramEqualizationProcessor_Method_Desc"),
+ new string[] { "Global", "CLAHE" }));
+
+ Parameters.Add("ClipLimit", new ProcessorParameter(
+ "ClipLimit",
+ LocalizationHelper.GetString("HistogramEqualizationProcessor_ClipLimit"),
+ typeof(double),
+ 2.0,
+ 1.0,
+ 10.0,
+ LocalizationHelper.GetString("HistogramEqualizationProcessor_ClipLimit_Desc")));
+
+ Parameters.Add("TileSize", new ProcessorParameter(
+ "TileSize",
+ LocalizationHelper.GetString("HistogramEqualizationProcessor_TileSize"),
+ typeof(int),
+ 8,
+ 4,
+ 32,
+ LocalizationHelper.GetString("HistogramEqualizationProcessor_TileSize_Desc")));
+ _logger.Debug("InitializeParameters");
+ }
+
+ public override Image Process(Image inputImage)
+ {
+ string method = GetParameter("Method");
+ double clipLimit = GetParameter("ClipLimit");
+ int tileSize = GetParameter("TileSize");
+
+ Image result;
+
+ if (method == "CLAHE")
+ {
+ result = ApplyCLAHE(inputImage, clipLimit, tileSize);
+ }
+ else // Global
+ {
+ result = new Image(inputImage.Size);
+ CvInvoke.EqualizeHist(inputImage, result);
+ }
+
+ _logger.Debug("Process: Method = {Method}, ClipLimit = {ClipLimit}, TileSize = {TileSize}",
+ method, clipLimit, tileSize);
+ return result;
+ }
+
+ private Image ApplyCLAHE(Image inputImage, double clipLimit, int tileSize)
+ {
+ int width = inputImage.Width;
+ int height = inputImage.Height;
+
+ int tilesX = (width + tileSize - 1) / tileSize;
+ int tilesY = (height + tileSize - 1) / tileSize;
+
+ var result = new Image(width, height);
+
+ // 对每个tile进行直方图均衡化
+ for (int ty = 0; ty < tilesY; ty++)
+ {
+ for (int tx = 0; tx < tilesX; tx++)
+ {
+ int x = tx * tileSize;
+ int y = ty * tileSize;
+ int w = Math.Min(tileSize, width - x);
+ int h = Math.Min(tileSize, height - y);
+
+ var roi = new System.Drawing.Rectangle(x, y, w, h);
+ inputImage.ROI = roi;
+ var tile = inputImage.Copy();
+ inputImage.ROI = System.Drawing.Rectangle.Empty;
+
+ // 应用直方图均衡化
+ var equalizedTile = new Image(tile.Size);
+ CvInvoke.EqualizeHist(tile, equalizedTile);
+
+ // 应用限制(简化版本)
+ var floatTile = tile.Convert();
+ var floatEqualized = equalizedTile.Convert();
+ var diff = floatEqualized - floatTile;
+ var limited = floatTile + diff * Math.Min(clipLimit / 10.0, 1.0);
+ var limitedByte = limited.Convert();
+
+ // 复制到结果图像
+ result.ROI = roi;
+ limitedByte.CopyTo(result);
+ result.ROI = System.Drawing.Rectangle.Empty;
+
+ tile.Dispose();
+ equalizedTile.Dispose();
+ floatTile.Dispose();
+ floatEqualized.Dispose();
+ diff.Dispose();
+ limited.Dispose();
+ limitedByte.Dispose();
+ }
+ }
+
+ return result;
+ }
+}
\ No newline at end of file
diff --git a/ImageProcessing.Processors/图像增强/HistogramOverlayProcessor.cs b/ImageProcessing.Processors/图像增强/HistogramOverlayProcessor.cs
new file mode 100644
index 0000000..a9a545c
--- /dev/null
+++ b/ImageProcessing.Processors/图像增强/HistogramOverlayProcessor.cs
@@ -0,0 +1,266 @@
+// ============================================================================
+// Copyright © 2026 Hexagon Technology Center GmbH. All Rights Reserved.
+// 文件名: HistogramOverlayProcessor.cs
+// 描述: 直方图叠加算子,计算灰度直方图并以蓝色柱状图绘制到结果图像左上角
+// 功能:
+// - 计算输入图像的灰度直方图
+// - 将直方图绘制为蓝色半透明柱状图叠加到图像左上角
+// - 输出直方图统计表格数据
+// 算法: 灰度直方图统计 + 彩色图像叠加
+// 作者: 李伟 wei.lw.li@hexagon.com
+// ============================================================================
+
+using Emgu.CV;
+using Emgu.CV.CvEnum;
+using Emgu.CV.Structure;
+using ImageProcessing.Core;
+using Serilog;
+using System.Drawing;
+using System.Text;
+
+namespace ImageProcessing.Processors;
+
+///
+/// 直方图叠加算子,计算灰度直方图并以蓝色柱状图绘制到结果图像左上角,同时输出统计表格
+///
+public class HistogramOverlayProcessor : ImageProcessorBase
+{
+ private static readonly ILogger _logger = Log.ForContext();
+
+ // 固定参数
+ private const int ChartWidth = 256; // 柱状图绘图区宽度
+ private const int ChartHeight = 200; // 柱状图绘图区高度
+ private const int AxisMarginLeft = 50; // Y轴标签预留宽度
+ private const int AxisMarginBottom = 25; // X轴标签预留高度
+ private const int Padding = 8; // 背景额外内边距
+ private const int PaddingRight = 25; // 右侧额外内边距(容纳X轴末尾刻度文字)
+ private const int Margin = 10; // 距图像左上角边距
+ private const float BgAlpha = 0.6f;
+ private const double FontScale = 0.35;
+ private const int FontThickness = 1;
+
+ public HistogramOverlayProcessor()
+ {
+ Name = LocalizationHelper.GetString("HistogramOverlayProcessor_Name");
+ Description = LocalizationHelper.GetString("HistogramOverlayProcessor_Description");
+ }
+
+ protected override void InitializeParameters()
+ {
+ // 无可调参数
+ }
+
+ public override Image Process(Image inputImage)
+ {
+ int h = inputImage.Height;
+ int w = inputImage.Width;
+ var srcData = inputImage.Data;
+
+ // === 1. 计算灰度直方图 ===
+ var hist = new int[256];
+ for (int y = 0; y < h; y++)
+ for (int x = 0; x < w; x++)
+ hist[srcData[y, x, 0]]++;
+
+ int maxCount = 0;
+ long totalPixels = (long)h * w;
+ for (int i = 0; i < 256; i++)
+ if (hist[i] > maxCount) maxCount = hist[i];
+
+ // === 2. 计算统计信息 ===
+ double mean = 0, variance = 0;
+ int minVal = 255, maxVal = 0;
+ int modeVal = 0, modeCount = 0;
+ long medianTarget = totalPixels / 2, cumulative = 0;
+ int medianVal = 0;
+ bool medianFound = false;
+
+ for (int i = 0; i < 256; i++)
+ {
+ if (hist[i] > 0)
+ {
+ if (i < minVal) minVal = i;
+ if (i > maxVal) maxVal = i;
+ }
+ if (hist[i] > modeCount) { modeCount = hist[i]; modeVal = i; }
+ mean += (double)i * hist[i];
+ cumulative += hist[i];
+ if (!medianFound && cumulative >= medianTarget) { medianVal = i; medianFound = true; }
+ }
+ mean /= totalPixels;
+ for (int i = 0; i < 256; i++)
+ variance += hist[i] * (i - mean) * (i - mean);
+ variance /= totalPixels;
+ double stdDev = Math.Sqrt(variance);
+
+ // === 3. 输出表格数据 ===
+ var sb = new StringBuilder();
+ sb.AppendLine("=== 灰度直方图统计 ===");
+ sb.AppendLine($"图像尺寸: {w} x {h}");
+ sb.AppendLine($"总像素数: {totalPixels}");
+ sb.AppendLine($"最小灰度: {minVal}");
+ sb.AppendLine($"最大灰度: {maxVal}");
+ sb.AppendLine($"平均灰度: {mean:F2}");
+ sb.AppendLine($"中位灰度: {medianVal}");
+ sb.AppendLine($"众数灰度: {modeVal} (出现 {modeCount} 次)");
+ sb.AppendLine($"标准差: {stdDev:F2}");
+ sb.AppendLine();
+ sb.AppendLine("灰度值\t像素数\t占比(%)");
+ for (int i = 0; i < 256; i++)
+ {
+ if (hist[i] > 0)
+ sb.AppendLine($"{i}\t{hist[i]}\t{(double)hist[i] / totalPixels * 100.0:F4}");
+ }
+
+ OutputData["HistogramTable"] = sb.ToString();
+ OutputData["Histogram"] = hist;
+
+ // === 4. 生成彩色叠加图像(蓝色柱状图 + XY轴坐标) ===
+ var colorImage = inputImage.Convert();
+ var colorData = colorImage.Data;
+
+ // 布局:背景区域包含 Padding + Y轴标签 + 绘图区 + Padding(水平)
+ // Padding + 绘图区 + X轴标签 + Padding(垂直)
+ int totalW = Padding + AxisMarginLeft + ChartWidth + PaddingRight;
+ int totalH = Padding + ChartHeight + AxisMarginBottom + Padding;
+ int bgW = Math.Min(totalW, w - Margin);
+ int bgH = Math.Min(totalH, h - Margin);
+
+ if (bgW > Padding + AxisMarginLeft && bgH > Padding + AxisMarginBottom)
+ {
+ int plotW = Math.Min(ChartWidth, bgW - Padding - AxisMarginLeft - PaddingRight);
+ int plotH = Math.Min(ChartHeight, bgH - Padding - AxisMarginBottom - Padding);
+ if (plotW <= 0 || plotH <= 0) goto SkipOverlay;
+
+ // 绘图区左上角在图像中的坐标
+ int plotX0 = Margin + Padding + AxisMarginLeft;
+ int plotY0 = Margin + Padding;
+
+ // 计算每列柱高
+ double binWidth = (double)plotW / 256.0;
+ var barHeights = new int[plotW];
+ for (int px = 0; px < plotW; px++)
+ {
+ int bin = Math.Min((int)(px / binWidth), 255);
+ barHeights[px] = maxCount > 0 ? (int)((long)hist[bin] * (plotH - 1) / maxCount) : 0;
+ }
+
+ float alpha = BgAlpha;
+ float inv = 1.0f - alpha;
+
+ // 绘制半透明黑色背景(覆盖整个区域含坐标轴和内边距)
+ Parallel.For(0, bgH, dy =>
+ {
+ int imgY = Margin + dy;
+ if (imgY >= h) return;
+ for (int dx = 0; dx < bgW; dx++)
+ {
+ int imgX = Margin + dx;
+ if (imgX >= w) break;
+ colorData[imgY, imgX, 0] = (byte)(int)(colorData[imgY, imgX, 0] * inv);
+ colorData[imgY, imgX, 1] = (byte)(int)(colorData[imgY, imgX, 1] * inv);
+ colorData[imgY, imgX, 2] = (byte)(int)(colorData[imgY, imgX, 2] * inv);
+ }
+ });
+
+ // 绘制蓝色柱状图
+ Parallel.For(0, plotH, dy =>
+ {
+ int imgY = plotY0 + dy;
+ if (imgY >= h) return;
+ int rowFromBottom = plotH - 1 - dy;
+
+ for (int dx = 0; dx < plotW; dx++)
+ {
+ int imgX = plotX0 + dx;
+ if (imgX >= w) break;
+
+ if (rowFromBottom < barHeights[dx])
+ {
+ byte curB = colorData[imgY, imgX, 0];
+ byte curG = colorData[imgY, imgX, 1];
+ byte curR = colorData[imgY, imgX, 2];
+ colorData[imgY, imgX, 0] = (byte)Math.Clamp(curB + (int)(255 * alpha), 0, 255);
+ colorData[imgY, imgX, 1] = (byte)Math.Clamp(curG + (int)(50 * alpha), 0, 255);
+ colorData[imgY, imgX, 2] = (byte)Math.Clamp(curR + (int)(50 * alpha), 0, 255);
+ }
+ }
+ });
+
+ // === 5. 绘制坐标轴线和刻度标注 ===
+ var white = new MCvScalar(255, 255, 255);
+ var gray = new MCvScalar(180, 180, 180);
+
+ // Y轴线
+ CvInvoke.Line(colorImage,
+ new Point(plotX0, plotY0),
+ new Point(plotX0, plotY0 + plotH),
+ white, 1);
+
+ // X轴线
+ CvInvoke.Line(colorImage,
+ new Point(plotX0, plotY0 + plotH),
+ new Point(plotX0 + plotW, plotY0 + plotH),
+ white, 1);
+
+ // X轴刻度: 0, 64, 128, 192, 255
+ int[] xTicks = { 0, 64, 128, 192, 255 };
+ foreach (int tick in xTicks)
+ {
+ int tx = plotX0 + (int)(tick * binWidth);
+ if (tx >= w) break;
+ CvInvoke.Line(colorImage,
+ new Point(tx, plotY0 + plotH),
+ new Point(tx, plotY0 + plotH + 4),
+ white, 1);
+ string label = tick.ToString();
+ CvInvoke.PutText(colorImage, label,
+ new Point(tx - 8, plotY0 + plotH + 18),
+ FontFace.HersheySimplex, FontScale, white, FontThickness);
+ }
+
+ // Y轴刻度: 0%, 25%, 50%, 75%, 100%
+ for (int i = 0; i <= 4; i++)
+ {
+ int val = maxCount * i / 4;
+ int ty = plotY0 + plotH - (int)((long)plotH * i / 4);
+ CvInvoke.Line(colorImage,
+ new Point(plotX0 - 4, ty),
+ new Point(plotX0, ty),
+ white, 1);
+ // 网格虚线
+ if (i > 0 && i < 4)
+ {
+ for (int gx = plotX0 + 2; gx < plotX0 + plotW; gx += 6)
+ {
+ int gxEnd = Math.Min(gx + 2, plotX0 + plotW);
+ CvInvoke.Line(colorImage,
+ new Point(gx, ty),
+ new Point(gxEnd, ty),
+ gray, 1);
+ }
+ }
+ string label = FormatCount(val);
+ CvInvoke.PutText(colorImage, label,
+ new Point(Margin + Padding, ty + 4),
+ FontFace.HersheySimplex, FontScale, white, FontThickness);
+ }
+ }
+
+ SkipOverlay:
+ OutputData["PseudoColorImage"] = colorImage;
+
+ _logger.Debug("Process completed: histogram overlay, mean={Mean:F2}, stdDev={Std:F2}", mean, stdDev);
+ return inputImage.Clone();
+ }
+
+ ///
+ /// 格式化像素计数为紧凑字符串(如 12345 → "12.3K")
+ ///
+ private static string FormatCount(int count)
+ {
+ if (count >= 1_000_000) return $"{count / 1_000_000.0:F1}M";
+ if (count >= 1_000) return $"{count / 1_000.0:F1}K";
+ return count.ToString();
+ }
+}
diff --git a/ImageProcessing.Processors/图像增强/RetinexProcessor.cs b/ImageProcessing.Processors/图像增强/RetinexProcessor.cs
new file mode 100644
index 0000000..8414907
--- /dev/null
+++ b/ImageProcessing.Processors/图像增强/RetinexProcessor.cs
@@ -0,0 +1,320 @@
+// ============================================================================
+// Copyright © 2026 Hexagon Technology Center GmbH. All Rights Reserved.
+// 文件名: RetinexProcessor.cs
+// 描述: 基于Retinex的多尺度阴影校正算子
+// 功能:
+// - 单尺度Retinex (SSR)
+// - 多尺度Retinex (MSR)
+// - 带色彩恢复的多尺度Retinex (MSRCR)
+// - 光照不均匀校正
+// - 阴影去除
+// 算法: Retinex理论 - 将图像分解为反射分量和光照分量
+// 作者: 李伟 wei.lw.li@hexagon.com
+// ============================================================================
+
+using Emgu.CV;
+using Emgu.CV.Structure;
+using ImageProcessing.Core;
+using Serilog;
+
+namespace ImageProcessing.Processors;
+
+///
+/// Retinex多尺度阴影校正算子
+///
+public class RetinexProcessor : ImageProcessorBase
+{
+ private static readonly ILogger _logger = Log.ForContext();
+
+ public RetinexProcessor()
+ {
+ Name = LocalizationHelper.GetString("RetinexProcessor_Name");
+ Description = LocalizationHelper.GetString("RetinexProcessor_Description");
+ }
+
+ protected override void InitializeParameters()
+ {
+ Parameters.Add("Method", new ProcessorParameter(
+ "Method",
+ LocalizationHelper.GetString("RetinexProcessor_Method"),
+ typeof(string),
+ "MSR",
+ null,
+ null,
+ LocalizationHelper.GetString("RetinexProcessor_Method_Desc"),
+ new string[] { "SSR", "MSR", "MSRCR" }));
+
+ Parameters.Add("Sigma1", new ProcessorParameter(
+ "Sigma1",
+ LocalizationHelper.GetString("RetinexProcessor_Sigma1"),
+ typeof(double),
+ 15.0,
+ 1.0,
+ 100.0,
+ LocalizationHelper.GetString("RetinexProcessor_Sigma1_Desc")));
+
+ Parameters.Add("Sigma2", new ProcessorParameter(
+ "Sigma2",
+ LocalizationHelper.GetString("RetinexProcessor_Sigma2"),
+ typeof(double),
+ 80.0,
+ 1.0,
+ 200.0,
+ LocalizationHelper.GetString("RetinexProcessor_Sigma2_Desc")));
+
+ Parameters.Add("Sigma3", new ProcessorParameter(
+ "Sigma3",
+ LocalizationHelper.GetString("RetinexProcessor_Sigma3"),
+ typeof(double),
+ 250.0,
+ 1.0,
+ 500.0,
+ LocalizationHelper.GetString("RetinexProcessor_Sigma3_Desc")));
+
+ Parameters.Add("Gain", new ProcessorParameter(
+ "Gain",
+ LocalizationHelper.GetString("RetinexProcessor_Gain"),
+ typeof(double),
+ 1.0,
+ 0.1,
+ 5.0,
+ LocalizationHelper.GetString("RetinexProcessor_Gain_Desc")));
+
+ Parameters.Add("Offset", new ProcessorParameter(
+ "Offset",
+ LocalizationHelper.GetString("RetinexProcessor_Offset"),
+ typeof(int),
+ 0,
+ -100,
+ 100,
+ LocalizationHelper.GetString("RetinexProcessor_Offset_Desc")));
+ _logger.Debug("InitializeParameters");
+ }
+
+ public override Image Process(Image inputImage)
+ {
+ string method = GetParameter("Method");
+ double sigma1 = GetParameter("Sigma1");
+ double sigma2 = GetParameter("Sigma2");
+ double sigma3 = GetParameter("Sigma3");
+ double gain = GetParameter("Gain");
+ int offset = GetParameter("Offset");
+
+ Image result;
+
+ if (method == "SSR")
+ {
+ // 单尺度Retinex
+ result = SingleScaleRetinex(inputImage, sigma2, gain, offset);
+ }
+ else if (method == "MSR")
+ {
+ // 多尺度Retinex
+ result = MultiScaleRetinex(inputImage, new[] { sigma1, sigma2, sigma3 }, gain, offset);
+ }
+ else // MSRCR
+ {
+ // 带色彩恢复的多尺度Retinex
+ result = MultiScaleRetinexCR(inputImage, new[] { sigma1, sigma2, sigma3 }, gain, offset);
+ }
+
+ _logger.Debug("Process: Method = {Method}, Sigma1 = {Sigma1}, Sigma2 = {Sigma2}, Sigma3 = {Sigma3}, Gain = {Gain}, Offset = {Offset}",
+ method, sigma1, sigma2, sigma3, gain, offset);
+ return result;
+ }
+
+ ///
+ /// 单尺度Retinex (SSR)
+ /// R(x,y) = log(I(x,y)) - log(I(x,y) * G(x,y))
+ ///
+ private Image SingleScaleRetinex(Image inputImage, double sigma, double gain, int offset)
+ {
+ // 转换为浮点图像并添加小常数避免log(0)
+ Image floatImage = inputImage.Convert();
+ floatImage = floatImage + 1.0f;
+
+ // 计算log(I)
+ Image logImage = new Image(inputImage.Size);
+ for (int y = 0; y < inputImage.Height; y++)
+ {
+ for (int x = 0; x < inputImage.Width; x++)
+ {
+ logImage.Data[y, x, 0] = (float)Math.Log(floatImage.Data[y, x, 0]);
+ }
+ }
+
+ // 高斯模糊得到光照分量
+ Image blurred = new Image(inputImage.Size);
+ int kernelSize = (int)(sigma * 6) | 1; // 确保为奇数
+ if (kernelSize < 3) kernelSize = 3;
+ CvInvoke.GaussianBlur(floatImage, blurred, new System.Drawing.Size(kernelSize, kernelSize), sigma);
+
+ // 计算log(I * G)
+ Image logBlurred = new Image(inputImage.Size);
+ for (int y = 0; y < inputImage.Height; y++)
+ {
+ for (int x = 0; x < inputImage.Width; x++)
+ {
+ logBlurred.Data[y, x, 0] = (float)Math.Log(blurred.Data[y, x, 0]);
+ }
+ }
+
+ // R = log(I) - log(I*G)
+ Image retinex = logImage - logBlurred;
+
+ // 应用增益和偏移
+ retinex = retinex * gain + offset;
+
+ // 归一化到0-255
+ Image result = NormalizeToByteImage(retinex);
+
+ floatImage.Dispose();
+ logImage.Dispose();
+ blurred.Dispose();
+ logBlurred.Dispose();
+ retinex.Dispose();
+
+ return result;
+ }
+
+ ///
+ /// 多尺度Retinex (MSR)
+ /// MSR = Σ(w_i * SSR_i) / N
+ ///
+ private Image MultiScaleRetinex(Image inputImage, double[] sigmas, double gain, int offset)
+ {
+ // 转换为浮点图像
+ Image floatImage = inputImage.Convert();
+ floatImage = floatImage + 1.0f;
+
+ // 计算log(I)
+ Image logImage = new Image(inputImage.Size);
+ for (int y = 0; y < inputImage.Height; y++)
+ {
+ for (int x = 0; x < inputImage.Width; x++)
+ {
+ logImage.Data[y, x, 0] = (float)Math.Log(floatImage.Data[y, x, 0]);
+ }
+ }
+
+ // 累加多个尺度的结果
+ Image msrResult = new Image(inputImage.Size);
+ msrResult.SetZero();
+
+ foreach (double sigma in sigmas)
+ {
+ // 高斯模糊
+ Image blurred = new Image(inputImage.Size);
+ int kernelSize = (int)(sigma * 6) | 1;
+ if (kernelSize < 3) kernelSize = 3;
+ CvInvoke.GaussianBlur(floatImage, blurred, new System.Drawing.Size(kernelSize, kernelSize), sigma);
+
+ // 计算log(I*G)
+ Image logBlurred = new Image(inputImage.Size);
+ for (int y = 0; y < inputImage.Height; y++)
+ {
+ for (int x = 0; x < inputImage.Width; x++)
+ {
+ logBlurred.Data[y, x, 0] = (float)Math.Log(blurred.Data[y, x, 0]);
+ }
+ }
+
+ // 累加 SSR
+ msrResult = msrResult + (logImage - logBlurred);
+
+ blurred.Dispose();
+ logBlurred.Dispose();
+ }
+
+ // 平均
+ msrResult = msrResult / sigmas.Length;
+
+ // 应用增益和偏移
+ msrResult = msrResult * gain + offset;
+
+ // 归一化
+ Image result = NormalizeToByteImage(msrResult);
+
+ floatImage.Dispose();
+ logImage.Dispose();
+ msrResult.Dispose();
+
+ return result;
+ }
+
+ ///
+ /// 带色彩恢复的多尺度Retinex (MSRCR)
+ /// 对于灰度图像,使用简化版本
+ ///
+ private Image MultiScaleRetinexCR(Image inputImage, double[] sigmas, double gain, int offset)
+ {
+ // 先执行MSR
+ Image msrResult = MultiScaleRetinex(inputImage, sigmas, gain, offset);
+
+ // 对于灰度图像,色彩恢复简化为对比度增强
+ Image floatMsr = msrResult.Convert();
+ Image floatInput = inputImage.Convert();
+
+ // 简单的色彩恢复:增强局部对比度
+ Image enhanced = new Image(inputImage.Size);
+ for (int y = 0; y < inputImage.Height; y++)
+ {
+ for (int x = 0; x < inputImage.Width; x++)
+ {
+ float msr = floatMsr.Data[y, x, 0];
+ float original = floatInput.Data[y, x, 0];
+
+ // 色彩恢复因子
+ float c = (float)Math.Log(original + 1.0) / (float)Math.Log(128.0);
+ enhanced.Data[y, x, 0] = msr * c;
+ }
+ }
+
+ Image result = NormalizeToByteImage(enhanced);
+
+ msrResult.Dispose();
+ floatMsr.Dispose();
+ floatInput.Dispose();
+ enhanced.Dispose();
+
+ return result;
+ }
+
+ ///
+ /// 归一化浮点图像到字节图像
+ ///
+ private Image NormalizeToByteImage(Image floatImage)
+ {
+ // 找到最小值和最大值
+ double minVal = double.MaxValue;
+ double maxVal = double.MinValue;
+
+ for (int y = 0; y < floatImage.Height; y++)
+ {
+ for (int x = 0; x < floatImage.Width; x++)
+ {
+ float val = floatImage.Data[y, x, 0];
+ if (val < minVal) minVal = val;
+ if (val > maxVal) maxVal = val;
+ }
+ }
+
+ // 归一化到0-255
+ Image result = new Image(floatImage.Size);
+ double range = maxVal - minVal;
+ if (range > 0)
+ {
+ for (int y = 0; y < floatImage.Height; y++)
+ {
+ for (int x = 0; x < floatImage.Width; x++)
+ {
+ float val = floatImage.Data[y, x, 0];
+ int normalized = (int)((val - minVal) / range * 255.0);
+ result.Data[y, x, 0] = (byte)Math.Max(0, Math.Min(255, normalized));
+ }
+ }
+ }
+
+ return result;
+ }
+}
\ No newline at end of file
diff --git a/ImageProcessing.Processors/图像增强/SharpenProcessor.cs b/ImageProcessing.Processors/图像增强/SharpenProcessor.cs
new file mode 100644
index 0000000..f46b24c
--- /dev/null
+++ b/ImageProcessing.Processors/图像增强/SharpenProcessor.cs
@@ -0,0 +1,141 @@
+// ============================================================================
+// Copyright © 2026 Hexagon Technology Center GmbH. All Rights Reserved.
+// 文件名: SharpenProcessor.cs
+// 描述: 锐化算子,用于增强图像边缘和细节
+// 功能:
+// - 拉普拉斯锐化
+// - 非锐化掩蔽(Unsharp Masking)
+// - 可调节锐化强度
+// - 支持多种锐化核
+// 算法: 拉普拉斯算子、非锐化掩蔽
+// 作者: 李伟 wei.lw.li@hexagon.com
+// ============================================================================
+
+using Emgu.CV;
+using Emgu.CV.CvEnum;
+using Emgu.CV.Structure;
+using ImageProcessing.Core;
+using Serilog;
+
+namespace ImageProcessing.Processors;
+
+///
+/// 锐化算子
+///
+public class SharpenProcessor : ImageProcessorBase
+{
+ private static readonly ILogger _logger = Log.ForContext();
+
+ public SharpenProcessor()
+ {
+ Name = LocalizationHelper.GetString("SharpenProcessor_Name");
+ Description = LocalizationHelper.GetString("SharpenProcessor_Description");
+ }
+
+ protected override void InitializeParameters()
+ {
+ Parameters.Add("Method", new ProcessorParameter(
+ "Method",
+ LocalizationHelper.GetString("SharpenProcessor_Method"),
+ typeof(string),
+ "Laplacian",
+ null,
+ null,
+ LocalizationHelper.GetString("SharpenProcessor_Method_Desc"),
+ new string[] { "Laplacian", "UnsharpMask" }));
+
+ Parameters.Add("Strength", new ProcessorParameter(
+ "Strength",
+ LocalizationHelper.GetString("SharpenProcessor_Strength"),
+ typeof(double),
+ 1.0,
+ 0.1,
+ 5.0,
+ LocalizationHelper.GetString("SharpenProcessor_Strength_Desc")));
+
+ Parameters.Add("KernelSize", new ProcessorParameter(
+ "KernelSize",
+ LocalizationHelper.GetString("SharpenProcessor_KernelSize"),
+ typeof(int),
+ 3,
+ 1,
+ 15,
+ LocalizationHelper.GetString("SharpenProcessor_KernelSize_Desc")));
+ _logger.Debug("InitializeParameters");
+ }
+
+ public override Image Process(Image inputImage)
+ {
+ string method = GetParameter("Method");
+ double strength = GetParameter("Strength");
+ int kernelSize = GetParameter("KernelSize");
+
+ if (kernelSize % 2 == 0) kernelSize++;
+
+ Image result;
+
+ if (method == "UnsharpMask")
+ {
+ result = ApplyUnsharpMask(inputImage, kernelSize, strength);
+ }
+ else // Laplacian
+ {
+ result = ApplyLaplacianSharpening(inputImage, strength);
+ }
+
+ _logger.Debug("Process: Method = {Method}, Strength = {Strength}, KernelSize = {KernelSize}",
+ method, strength, kernelSize);
+ return result;
+ }
+
+ private Image ApplyLaplacianSharpening(Image inputImage, double strength)
+ {
+ // 计算拉普拉斯算子
+ var laplacian = new Image(inputImage.Size);
+ CvInvoke.Laplacian(inputImage, laplacian, DepthType.Cv32F, 1);
+
+ // 转换为字节类型
+ var laplacianByte = laplacian.Convert();
+
+ // 将拉普拉斯结果加到原图上进行锐化
+ var floatImage = inputImage.Convert();
+ var sharpened = floatImage + laplacian * strength;
+
+ // 限制范围并转换回字节类型
+ var result = sharpened.Convert();
+
+ laplacian.Dispose();
+ laplacianByte.Dispose();
+ floatImage.Dispose();
+ sharpened.Dispose();
+
+ return result;
+ }
+
+ private Image ApplyUnsharpMask(Image inputImage, int kernelSize, double strength)
+ {
+ // 创建模糊图像
+ var blurred = new Image(inputImage.Size);
+ CvInvoke.GaussianBlur(inputImage, blurred,
+ new System.Drawing.Size(kernelSize, kernelSize), 0);
+
+ // 计算差异(细节)
+ var floatInput = inputImage.Convert();
+ var floatBlurred = blurred.Convert();
+ var detail = floatInput - floatBlurred;
+
+ // 将细节加回原图
+ var sharpened = floatInput + detail * strength;
+
+ // 转换回字节类型
+ var result = sharpened.Convert();
+
+ blurred.Dispose();
+ floatInput.Dispose();
+ floatBlurred.Dispose();
+ detail.Dispose();
+ sharpened.Dispose();
+
+ return result;
+ }
+}
\ No newline at end of file
diff --git a/ImageProcessing.Processors/图像增强/SubPixelZoomProcessor.cs b/ImageProcessing.Processors/图像增强/SubPixelZoomProcessor.cs
new file mode 100644
index 0000000..b9a0ce5
--- /dev/null
+++ b/ImageProcessing.Processors/图像增强/SubPixelZoomProcessor.cs
@@ -0,0 +1,127 @@
+// ============================================================================
+// Copyright © 2016-2025 Hexagon Technology Center GmbH. All Rights Reserved.
+// 文件名: SubPixelZoomProcessor.cs
+// 描述: 亚像素放大算子,通过高质量插值实现图像的亚像素级放大
+// 功能:
+// - 支持任意倍率放大(含小数倍率如 1.5x、2.3x)
+// - 多种插值方法(最近邻、双线性、双三次、Lanczos)
+// - 可选锐化补偿(抵消插值模糊)
+// - 可选指定输出尺寸
+// 算法: 基于 OpenCV Resize 的高质量插值放大
+// 作者: 李伟 wei.lw.li@hexagon.com
+// ============================================================================
+
+using Emgu.CV;
+using Emgu.CV.CvEnum;
+using Emgu.CV.Structure;
+using ImageProcessing.Core;
+using Serilog;
+using System.Drawing;
+
+namespace ImageProcessing.Processors;
+
+///
+/// 亚像素放大算子
+///
+public class SubPixelZoomProcessor : ImageProcessorBase
+{
+ private static readonly ILogger _logger = Log.ForContext();
+
+ public SubPixelZoomProcessor()
+ {
+ Name = LocalizationHelper.GetString("SubPixelZoomProcessor_Name");
+ Description = LocalizationHelper.GetString("SubPixelZoomProcessor_Description");
+ }
+
+ protected override void InitializeParameters()
+ {
+ Parameters.Add("ScaleFactor", new ProcessorParameter(
+ "ScaleFactor",
+ LocalizationHelper.GetString("SubPixelZoomProcessor_ScaleFactor"),
+ typeof(double),
+ 2.0,
+ 1.0,
+ 16.0,
+ LocalizationHelper.GetString("SubPixelZoomProcessor_ScaleFactor_Desc")));
+
+ Parameters.Add("Interpolation", new ProcessorParameter(
+ "Interpolation",
+ LocalizationHelper.GetString("SubPixelZoomProcessor_Interpolation"),
+ typeof(string),
+ "Lanczos",
+ null,
+ null,
+ LocalizationHelper.GetString("SubPixelZoomProcessor_Interpolation_Desc"),
+ new string[] { "Nearest", "Bilinear", "Bicubic", "Lanczos" }));
+
+ Parameters.Add("SharpenAfter", new ProcessorParameter(
+ "SharpenAfter",
+ LocalizationHelper.GetString("SubPixelZoomProcessor_SharpenAfter"),
+ typeof(bool),
+ false,
+ null,
+ null,
+ LocalizationHelper.GetString("SubPixelZoomProcessor_SharpenAfter_Desc")));
+
+ Parameters.Add("SharpenStrength", new ProcessorParameter(
+ "SharpenStrength",
+ LocalizationHelper.GetString("SubPixelZoomProcessor_SharpenStrength"),
+ typeof(double),
+ 0.5,
+ 0.1,
+ 3.0,
+ LocalizationHelper.GetString("SubPixelZoomProcessor_SharpenStrength_Desc")));
+
+ _logger.Debug("InitializeParameters");
+ }
+
+ public override Image Process(Image inputImage)
+ {
+ double scaleFactor = GetParameter("ScaleFactor");
+ string interpolation = GetParameter("Interpolation");
+ bool sharpenAfter = GetParameter("SharpenAfter");
+ double sharpenStrength = GetParameter("SharpenStrength");
+
+ Inter interMethod = interpolation switch
+ {
+ "Nearest" => Inter.Nearest,
+ "Bilinear" => Inter.Linear,
+ "Bicubic" => Inter.Cubic,
+ _ => Inter.Lanczos4
+ };
+
+ int newWidth = (int)Math.Round(inputImage.Width * scaleFactor);
+ int newHeight = (int)Math.Round(inputImage.Height * scaleFactor);
+
+ // 确保最小尺寸为 1
+ newWidth = Math.Max(1, newWidth);
+ newHeight = Math.Max(1, newHeight);
+
+ var result = new Image(newWidth, newHeight);
+ CvInvoke.Resize(inputImage, result, new Size(newWidth, newHeight), 0, 0, interMethod);
+
+ // 锐化补偿
+ if (sharpenAfter)
+ {
+ // Unsharp Masking: result = result + strength * (result - blur)
+ int ksize = Math.Max(3, (int)(scaleFactor * 2) | 1); // 奇数核
+ using var blurred = result.SmoothGaussian(ksize);
+
+ for (int y = 0; y < newHeight; y++)
+ {
+ for (int x = 0; x < newWidth; x++)
+ {
+ float val = result.Data[y, x, 0];
+ float blur = blurred.Data[y, x, 0];
+ float sharpened = val + (float)(sharpenStrength * (val - blur));
+ result.Data[y, x, 0] = (byte)Math.Clamp((int)sharpened, 0, 255);
+ }
+ }
+ }
+
+ _logger.Debug("Process: Scale={Scale}, Interp={Interp}, Size={W}x{H}, Sharpen={Sharpen}",
+ scaleFactor, interpolation, newWidth, newHeight, sharpenAfter);
+
+ return result;
+ }
+}
diff --git a/ImageProcessing.Processors/图像增强/SuperResolutionProcessor.cs b/ImageProcessing.Processors/图像增强/SuperResolutionProcessor.cs
new file mode 100644
index 0000000..dc57cc2
--- /dev/null
+++ b/ImageProcessing.Processors/图像增强/SuperResolutionProcessor.cs
@@ -0,0 +1,319 @@
+// ============================================================================
+// Copyright © 2026 Hexagon Technology Center GmbH. All Rights Reserved.
+// 文件名: SuperResolutionProcessor.cs
+// 描述: 基于深度学习的超分辨率算子
+// 功能:
+// - 支持 EDSR 和 FSRCNN 超分辨率模型(ONNX 格式)
+// - 支持 2x、3x、4x 放大倍率
+// - 灰度图像自动转换为三通道输入,推理后转回灰度
+// - 模型文件自动搜索,支持自定义路径
+// - 使用 Microsoft.ML.OnnxRuntime 进行推理
+// 算法: EDSR (Enhanced Deep Residual SR) / FSRCNN (Fast SR CNN)
+// 作者: 李伟 wei.lw.li@hexagon.com
+// ============================================================================
+
+using Emgu.CV;
+using Emgu.CV.CvEnum;
+using Emgu.CV.Structure;
+using ImageProcessing.Core;
+using Microsoft.ML.OnnxRuntime;
+using Microsoft.ML.OnnxRuntime.Tensors;
+using Serilog;
+using System.IO;
+
+namespace ImageProcessing.Processors;
+
+///
+/// 基于深度学习的超分辨率算子(EDSR / FSRCNN),使用 ONNX Runtime 推理
+///
+public class SuperResolutionProcessor : ImageProcessorBase
+{
+ private static readonly ILogger _logger = Log.ForContext();
+
+ // 会话缓存,避免重复加载
+ private static InferenceSession? _cachedSession;
+ private static string _cachedModelKey = string.Empty;
+
+ public SuperResolutionProcessor()
+ {
+ Name = LocalizationHelper.GetString("SuperResolutionProcessor_Name");
+ Description = LocalizationHelper.GetString("SuperResolutionProcessor_Description");
+ }
+
+ protected override void InitializeParameters()
+ {
+ Parameters.Add("Model", new ProcessorParameter(
+ "Model",
+ LocalizationHelper.GetString("SuperResolutionProcessor_Model"),
+ typeof(string),
+ "FSRCNN",
+ null,
+ null,
+ LocalizationHelper.GetString("SuperResolutionProcessor_Model_Desc"),
+ new string[] { "EDSR", "FSRCNN" }));
+
+ Parameters.Add("Scale", new ProcessorParameter(
+ "Scale",
+ LocalizationHelper.GetString("SuperResolutionProcessor_Scale"),
+ typeof(string),
+ "2",
+ null,
+ null,
+ LocalizationHelper.GetString("SuperResolutionProcessor_Scale_Desc"),
+ new string[] { "2", "3", "4" }));
+
+ _logger.Debug("InitializeParameters");
+ }
+
+ public override Image Process(Image inputImage)
+ {
+ string model = GetParameter("Model");
+ int scale = int.Parse(GetParameter("Scale"));
+
+ // 查找模型文件
+ string modelPath = FindModelFile(model, scale);
+ if (string.IsNullOrEmpty(modelPath))
+ {
+ _logger.Error("Model file not found: {Model}_x{Scale}.onnx", model, scale);
+ throw new FileNotFoundException(
+ $"超分辨率模型文件未找到: {model}_x{scale}.onnx\n" +
+ $"请将模型文件放置到以下任一目录:\n" +
+ $" 1. 程序目录/Models/\n" +
+ $" 2. 程序目录/\n" +
+ $"模型需要 ONNX 格式。\n" +
+ $"可使用 tf2onnx 从 .pb 转换:\n" +
+ $" pip install tf2onnx\n" +
+ $" python -m tf2onnx.convert --input {model}_x{scale}.pb --output {model}_x{scale}.onnx --inputs input:0 --outputs output:0");
+ }
+
+ // 加载或复用会话
+ string modelKey = $"{model}_{scale}";
+ InferenceSession session;
+ if (_cachedModelKey == modelKey && _cachedSession != null)
+ {
+ session = _cachedSession;
+ _logger.Debug("Reusing cached session: {ModelKey}", modelKey);
+ }
+ else
+ {
+ _cachedSession?.Dispose();
+ var options = new SessionOptions();
+ options.GraphOptimizationLevel = GraphOptimizationLevel.ORT_ENABLE_ALL;
+ try
+ {
+ options.AppendExecutionProvider_CUDA(0);
+ _logger.Information("Using CUDA GPU for inference");
+ }
+ catch
+ {
+ _logger.Warning("CUDA not available, falling back to CPU");
+ }
+ session = new InferenceSession(modelPath, options);
+ _cachedSession = session;
+ _cachedModelKey = modelKey;
+ // 记录实际使用的 Execution Provider
+ var providers = session.ModelMetadata?.CustomMetadataMap;
+ _logger.Information("Loaded ONNX model: {ModelPath}, Providers: {Providers}",
+ modelPath, string.Join(", ", session.GetType().Name));
+ }
+
+ int h = inputImage.Height;
+ int w = inputImage.Width;
+ _logger.Information("Input image size: {W}x{H}, Model: {Model}, Scale: {Scale}", w, h, model, scale);
+
+ // 对大图使用分块推理策略,避免单次推理过慢/OOM
+ const int TileSize = 256;
+ bool useTiling = (model.StartsWith("EDSR", StringComparison.OrdinalIgnoreCase)) && (h > TileSize || w > TileSize);
+
+ if (useTiling)
+ {
+ return ProcessTiled(session, inputImage, scale, TileSize);
+ }
+
+ return ProcessSingle(session, inputImage, scale);
+ }
+
+ ///
+ /// 单次推理(小图或 FSRCNN)
+ ///
+ private Image ProcessSingle(InferenceSession session, Image inputImage, int scale)
+ {
+ int h = inputImage.Height;
+ int w = inputImage.Width;
+
+ // 获取模型输入信息
+ string inputName = session.InputMetadata.Keys.First();
+ var inputMeta = session.InputMetadata[inputName];
+ int[] dims = inputMeta.Dimensions;
+ // dims 格式: [1, H, W, C] (NHWC),C 可能是 1 或 3
+ int inputChannels = dims[^1]; // 最后一维是通道数
+
+ // 构建输入 tensor: [1, H, W, C] (NHWC)
+ // 使用底层数组 + Parallel.For 避免逐元素索引开销
+ DenseTensor inputTensor;
+ if (inputChannels == 1)
+ {
+ // FSRCNN: 单通道灰度输入
+ inputTensor = new DenseTensor(new[] { 1, h, w, 1 });
+ float[] buf = inputTensor.Buffer.ToArray();
+ var imgData = inputImage.Data;
+ Parallel.For(0, h, y =>
+ {
+ int rowOffset = y * w;
+ for (int x = 0; x < w; x++)
+ buf[rowOffset + x] = imgData[y, x, 0];
+ });
+ inputTensor = new DenseTensor(buf, new[] { 1, h, w, 1 });
+ }
+ else
+ {
+ // EDSR: 三通道 BGR 输入
+ using var colorInput = new Image(w, h);
+ CvInvoke.CvtColor(inputImage, colorInput, ColorConversion.Gray2Bgr);
+ var buf = new float[h * w * 3];
+ var imgData = colorInput.Data;
+ Parallel.For(0, h, y =>
+ {
+ int rowOffset = y * w * 3;
+ for (int x = 0; x < w; x++)
+ {
+ int px = rowOffset + x * 3;
+ buf[px] = imgData[y, x, 0];
+ buf[px + 1] = imgData[y, x, 1];
+ buf[px + 2] = imgData[y, x, 2];
+ }
+ });
+ inputTensor = new DenseTensor(buf, new[] { 1, h, w, 3 });
+ }
+
+ // 推理
+ var inputs = new List
+ {
+ NamedOnnxValue.CreateFromTensor(inputName, inputTensor)
+ };
+
+ using var results = session.Run(inputs);
+ var outputTensor = results.First().AsTensor();
+
+ // 输出 shape: [1, C, H*scale, W*scale] (NCHW,模型输出经过 Transpose)
+ var shape = outputTensor.Dimensions;
+ int outC = shape[1];
+ int outH = shape[2];
+ int outW = shape[3];
+
+ // 转换为灰度图像
+ // 使用 Parallel.For + 直接内存操作
+ Image result;
+ if (outC == 1)
+ {
+ // FSRCNN: 单通道输出 [1, 1, outH, outW]
+ result = new Image(outW, outH);
+ var outData = result.Data;
+ Parallel.For(0, outH, y =>
+ {
+ for (int x = 0; x < outW; x++)
+ outData[y, x, 0] = (byte)Math.Clamp((int)outputTensor[0, 0, y, x], 0, 255);
+ });
+ }
+ else
+ {
+ // EDSR: 三通道输出 [1, 3, outH, outW] → 灰度
+ // 直接计算灰度值,跳过中间 BGR 图像分配
+ result = new Image(outW, outH);
+ var outData = result.Data;
+ Parallel.For(0, outH, y =>
+ {
+ for (int x = 0; x < outW; x++)
+ {
+ float b = outputTensor[0, 0, y, x];
+ float g = outputTensor[0, 1, y, x];
+ float r = outputTensor[0, 2, y, x];
+ // BT.601 灰度公式: 0.299*R + 0.587*G + 0.114*B
+ int gray = (int)(0.299f * r + 0.587f * g + 0.114f * b);
+ outData[y, x, 0] = (byte)Math.Clamp(gray, 0, 255);
+ }
+ });
+ }
+
+ _logger.Debug("ProcessSingle: Scale={Scale}, Output={W}x{H}", scale, outW, outH);
+
+ return result;
+ }
+
+ ///
+ /// 分块推理(大图 EDSR),将图像切成小块分别推理后拼接
+ ///
+ private Image ProcessTiled(InferenceSession session, Image inputImage, int scale, int tileSize)
+ {
+ int h = inputImage.Height;
+ int w = inputImage.Width;
+ int overlap = 8; // 重叠像素,减少拼接边缘伪影
+
+ var result = new Image