Ignore roll for face orientation filtering.

This commit is contained in:
Arnaud_Cayrol 2026-02-07 10:01:11 +01:00
parent 6f8d52695c
commit 465b0cbbae
4 changed files with 11 additions and 32 deletions

View file

@ -312,21 +312,6 @@
</div>
</div>
<div class="setting-row sub-setting">
<label>
<span class="setting-label">Max Roll</span>
<span class="setting-hint">Maximum head tilt angle</span>
</label>
<div class="setting-control">
<input
type="range"
bind:value={config.processing.head_pose.max_roll}
min="5"
max="90"
step="5"
/>
<span class="value">{config.processing.head_pose.max_roll.toFixed(0)}°</span>
</div>
</div>
{/if}
</div>

View file

@ -641,12 +641,13 @@ mod tests {
#[test]
fn test_brightness_validation() {
let mut config = BrightnessConfig::default();
config.enabled = true;
let mut config = BrightnessConfig {
enabled: true,
min_brightness: 0.1,
max_brightness: 0.9,
};
// Valid config
config.min_brightness = 0.1;
config.max_brightness = 0.9;
assert!(config.validate().is_ok());
// Invalid: min >= max

View file

@ -161,8 +161,8 @@ mod tests {
fn test_input_format() {
// DMHead expects raw [0, 255] pixel values as floats, no normalization
// See: https://github.com/PINTO0309/DMHead/blob/main/demo_video.py
assert_eq!(0_u8 as f32, 0.0);
assert_eq!(255_u8 as f32, 255.0);
assert_eq!(128_u8 as f32, 128.0);
assert_eq!(0_f32, 0.0);
assert_eq!(255_f32, 255.0);
assert_eq!(128_f32, 128.0);
}
}

View file

@ -286,16 +286,9 @@ impl ProcessingStep for HeadPoseStep {
};
}
if pose.roll.abs() > head_pose_config.max_roll {
return StepOutcome::Skip {
ctx,
reason: "head_turned".to_string(),
detail: Some(format!(
"Roll {:.1}° exceeds threshold {:.1}°",
pose.roll, head_pose_config.max_roll
)),
};
}
// Note: Roll is not checked for pass/fail - only used for visualization
// Roll (head tilt) is less important for timelapse alignment since
// the alignment step can handle rotated faces
StepOutcome::Continue(ctx)
}