feat: kako-jun/patcolour#2 Lab-full / LCh / xyY 色距離比較ワークフロー - #10
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Lab chroma-only(現行)に加え、Lab full / LCh / xyY の 3 つの色距離モードを追加し、同一入力で並べて比較できるワークフローを実装。
Changes
filter.py
detect_sample_color_mask_lab_full— Lab 3D ユークリッド距離detect_sample_color_mask_lch— LCh 距離(明度 weight=0.3、hue 円環差対応)detect_sample_color_mask_xyy— xyY 色度距離(Y 無視、ゼロ除算防御済み)COLOR_SPACES定数リストdetect_sample_color_mask_by_spaceディスパッチャapply_partial_colorにcolor_space引数追加(デフォルトlab-chromaで後退互換)apply_color_space_comparison— 4 モード全実行 + 横コラージュ生成(最大 4000px 幅)cli.py
--color-space {lab-chroma,lab-full,lch,xyy}--compare-color-space(--sample/--sample-rel必須、バッチ不可)docs/spec.md
## Color-distance modesセクション追加テスト
Closes #2