From 6eff24e27be01f477f294903016e2dca316d5555 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E4=BC=9F?= Date: Wed, 29 Apr 2026 10:34:40 +0800 Subject: [PATCH] =?UTF-8?q?BGA=E6=A3=80=E6=B5=8B=E9=9D=A2=E6=9D=BF:=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=97=A0=E6=A3=80=E6=B5=8B=E7=BB=93=E6=9E=9C?= =?UTF-8?q?=E6=97=B6=E5=8F=A0=E5=8A=A0=E5=B1=82=E6=9C=AA=E6=B8=85=E9=99=A4?= =?UTF-8?q?=E3=80=81=E7=BB=93=E6=9E=9C=E5=9B=BE=E4=B8=8D=E9=80=8F=E6=98=8E?= =?UTF-8?q?=E3=80=81=E7=AA=97=E5=8F=A3=E5=B0=BA=E5=AF=B8=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ImageProcessing/BgaDetectionViewModel.cs | 5 +- .../ImageProcessing/BgaDetectionPanel.xaml | 343 ++++++++++-------- 2 files changed, 193 insertions(+), 155 deletions(-) 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"> + + + + + + + + + + + + + - + - - - - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +