minimap work
This commit is contained in:
parent
ba8626b470
commit
a152a5cead
3 changed files with 12 additions and 12 deletions
|
|
@ -81,10 +81,10 @@ public class MinimapCapture : IDisposable
|
||||||
// --- 6. Temporal smoothing: majority vote ---
|
// --- 6. Temporal smoothing: majority vote ---
|
||||||
var smoothed = TemporalSmooth(classified); // classified goes into ring buffer
|
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();
|
var grayForCorr = new Mat();
|
||||||
Cv2.CvtColor(bgr, grayForCorr, ColorConversionCodes.BGR2GRAY);
|
Cv2.CvtColor(bgr, grayForCorr, ColorConversionCodes.BGR2GRAY);
|
||||||
grayForCorr.SetTo(Scalar.Black, wallMask);
|
grayForCorr.SetTo(Scalar.Black, playerMask);
|
||||||
|
|
||||||
return new MinimapFrame(
|
return new MinimapFrame(
|
||||||
GrayMat: grayForCorr,
|
GrayMat: grayForCorr,
|
||||||
|
|
|
||||||
|
|
@ -74,7 +74,7 @@ public class MinimapConfig
|
||||||
public int WallMinSat { get; set; } = 150;
|
public int WallMinSat { get; set; } = 150;
|
||||||
|
|
||||||
// Floor detection: minimum V to distinguish explored floor from fog-of-war
|
// 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)
|
// Connected components: minimum area to keep (kills speckle)
|
||||||
public int WallMinArea { get; set; } = 30;
|
public int WallMinArea { get; set; } = 30;
|
||||||
|
|
|
||||||
|
|
@ -109,19 +109,19 @@
|
||||||
|
|
||||||
<!-- Minimap -->
|
<!-- Minimap -->
|
||||||
<Border Grid.Column="1" Background="#161b22" BorderBrush="#30363d"
|
<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>
|
<DockPanel>
|
||||||
<StackPanel DockPanel.Dock="Top" Orientation="Horizontal" Margin="0,0,0,4">
|
<Grid DockPanel.Dock="Top" ColumnDefinitions="Auto,*,Auto" Margin="0,0,0,4">
|
||||||
<TextBlock Text="MINIMAP" FontSize="11" FontWeight="SemiBold"
|
<TextBlock Grid.Column="0" Text="MINIMAP" FontSize="11" FontWeight="SemiBold"
|
||||||
Foreground="#8b949e" VerticalAlignment="Center" />
|
Foreground="#8b949e" VerticalAlignment="Center" />
|
||||||
<TextBlock Text="{Binding NavigationStateText}"
|
<TextBlock Grid.Column="1" Text="{Binding NavigationStateText}"
|
||||||
FontSize="11" Foreground="#58a6ff" Margin="8,0,0,0"
|
FontSize="11" Foreground="#58a6ff" Margin="8,0,0,0"
|
||||||
VerticalAlignment="Center" />
|
VerticalAlignment="Center" />
|
||||||
</StackPanel>
|
<ComboBox Grid.Column="2"
|
||||||
<ComboBox DockPanel.Dock="Top"
|
ItemsSource="{x:Static vm:MainWindowViewModel.MinimapStages}"
|
||||||
ItemsSource="{x:Static vm:MainWindowViewModel.MinimapStages}"
|
SelectedItem="{Binding SelectedMinimapStage}"
|
||||||
SelectedItem="{Binding SelectedMinimapStage}"
|
FontSize="11" />
|
||||||
FontSize="11" Margin="0,0,0,4" />
|
</Grid>
|
||||||
<Grid>
|
<Grid>
|
||||||
<Image Source="{Binding MinimapImage}" Stretch="Uniform"
|
<Image Source="{Binding MinimapImage}" Stretch="Uniform"
|
||||||
RenderOptions.BitmapInterpolationMode="None" />
|
RenderOptions.BitmapInterpolationMode="None" />
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue