diff --git a/XplorePlane/ViewModels/ImageProcessing/BgaDetectionViewModel.cs b/XplorePlane/ViewModels/ImageProcessing/BgaDetectionViewModel.cs index d4870bc..c3b901c 100644 --- a/XplorePlane/ViewModels/ImageProcessing/BgaDetectionViewModel.cs +++ b/XplorePlane/ViewModels/ImageProcessing/BgaDetectionViewModel.cs @@ -221,17 +221,18 @@ namespace XplorePlane.ViewModels.ImageProcessing private void ShowResultOnOverlay(BitmapSource resultBmp) { - if (_canvas == null || resultBmp == null) return; + if (_canvas == null) return; // 移除旧的结果图层 RemoveResultOverlay(); + if (resultBmp == null) return; + // 创建新的结果图层叠加到 canvas 上(插入到背景图之后、ROI之前) _resultOverlayImage = new System.Windows.Controls.Image { Source = resultBmp, IsHitTestVisible = false, - Opacity = 0.85, Stretch = System.Windows.Media.Stretch.Fill }; _resultOverlayImage.SetBinding(System.Windows.FrameworkElement.WidthProperty, diff --git a/XplorePlane/Views/ImageProcessing/BgaDetectionPanel.xaml b/XplorePlane/Views/ImageProcessing/BgaDetectionPanel.xaml index fb03f81..58f5366 100644 --- a/XplorePlane/Views/ImageProcessing/BgaDetectionPanel.xaml +++ b/XplorePlane/Views/ImageProcessing/BgaDetectionPanel.xaml @@ -2,174 +2,211 @@ x:Class="XplorePlane.Views.ImageProcessing.BgaDetectionPanel" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - Title="BGA检测" Width="720" Height="520" + Title="BGA检测" Width="840" Height="700" ResizeMode="CanResize" WindowStartupLocation="CenterOwner" - Topmost="True" ShowInTaskbar="False"> - + Topmost="True" ShowInTaskbar="False" + Background="#F5F5F5" FontFamily="Microsoft YaHei UI"> + + + + + + + + + + + + + - + - - - - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +