minimap work

This commit is contained in:
Boki 2026-02-13 12:20:11 -05:00
parent ba8626b470
commit a152a5cead
3 changed files with 12 additions and 12 deletions

View file

@ -81,10 +81,10 @@ public class MinimapCapture : IDisposable
// --- 6. Temporal smoothing: majority vote ---
var smoothed = TemporalSmooth(classified); // classified goes into ring buffer
// --- 7. Gray for phase correlation (walls zeroed out — structural noise) ---
// --- 7. Gray for phase correlation (player zeroed — it stays centered, walls shift with map) ---
var grayForCorr = new Mat();
Cv2.CvtColor(bgr, grayForCorr, ColorConversionCodes.BGR2GRAY);
grayForCorr.SetTo(Scalar.Black, wallMask);
grayForCorr.SetTo(Scalar.Black, playerMask);
return new MinimapFrame(
GrayMat: grayForCorr,

View file

@ -74,7 +74,7 @@ public class MinimapConfig
public int WallMinSat { get; set; } = 150;
// Floor detection: minimum V to distinguish explored floor from fog-of-war
public int FloorMinValue { get; set; } = 15;
public int FloorMinValue { get; set; } = 40;
// Connected components: minimum area to keep (kills speckle)
public int WallMinArea { get; set; } = 30;

View file

@ -109,19 +109,19 @@
<!-- Minimap -->
<Border Grid.Column="1" Background="#161b22" BorderBrush="#30363d"
BorderThickness="1" CornerRadius="8" Padding="8" Width="200">
BorderThickness="1" CornerRadius="8" Padding="8" Width="300">
<DockPanel>
<StackPanel DockPanel.Dock="Top" Orientation="Horizontal" Margin="0,0,0,4">
<TextBlock Text="MINIMAP" FontSize="11" FontWeight="SemiBold"
<Grid DockPanel.Dock="Top" ColumnDefinitions="Auto,*,Auto" Margin="0,0,0,4">
<TextBlock Grid.Column="0" Text="MINIMAP" FontSize="11" FontWeight="SemiBold"
Foreground="#8b949e" VerticalAlignment="Center" />
<TextBlock Text="{Binding NavigationStateText}"
<TextBlock Grid.Column="1" Text="{Binding NavigationStateText}"
FontSize="11" Foreground="#58a6ff" Margin="8,0,0,0"
VerticalAlignment="Center" />
</StackPanel>
<ComboBox DockPanel.Dock="Top"
ItemsSource="{x:Static vm:MainWindowViewModel.MinimapStages}"
SelectedItem="{Binding SelectedMinimapStage}"
FontSize="11" Margin="0,0,0,4" />
<ComboBox Grid.Column="2"
ItemsSource="{x:Static vm:MainWindowViewModel.MinimapStages}"
SelectedItem="{Binding SelectedMinimapStage}"
FontSize="11" />
</Grid>
<Grid>
<Image Source="{Binding MinimapImage}" Stretch="Uniform"
RenderOptions.BitmapInterpolationMode="None" />