2026-06-26 07:23:52 +00:00
|
|
|
export type MaskSemanticColor = {
|
|
|
|
|
name: string;
|
|
|
|
|
hex: string;
|
2026-07-02 02:07:32 +00:00
|
|
|
/** reference color (BGR, consistent with mask buffer channel) */
|
2026-06-26 07:23:52 +00:00
|
|
|
bgr: {
|
|
|
|
|
b: number;
|
|
|
|
|
g: number;
|
|
|
|
|
r: number;
|
|
|
|
|
};
|
|
|
|
|
};
|
2026-07-02 02:07:32 +00:00
|
|
|
/** mask semantic color table (consistent with backend partition color reference) */
|
2026-06-26 07:23:52 +00:00
|
|
|
export declare const MASK_SEMANTIC_COLORS: MaskSemanticColor[];
|
|
|
|
|
export declare const BASEBOARD_SEMANTIC_NAME = "baseboard";
|
2026-07-02 02:07:32 +00:00
|
|
|
/** classify mask pixel to the nearest semantic color (baseboard only strictly hit orange) */
|
2026-06-26 07:23:52 +00:00
|
|
|
export declare function classifyBgrPixelToSemantic(b: number, g: number, r: number): string;
|
|
|
|
|
export declare function getSemanticColorByName(name: string): MaskSemanticColor | undefined;
|
|
|
|
|
/**
|
2026-07-02 02:07:32 +00:00
|
|
|
* The baseboard must be closer to #F58231 and significantly better than the yellow cabinet / blue wall, to avoid being mistakenly judged as a whole yellow area.
|
2026-06-26 07:23:52 +00:00
|
|
|
*/
|
|
|
|
|
export declare function isStrictBaseboardPixel(b: number, g: number, r: number): boolean;
|
|
|
|
|
export declare function isBaseboardPixel(b: number, g: number, r: number): boolean;
|
2026-07-02 02:07:32 +00:00
|
|
|
/** quantized color of the wall/cabinet junction strip on the mask */
|
2026-06-26 07:23:52 +00:00
|
|
|
export declare const BASEBOARD_STRIP_QUANT_KEYS: Set<string>;
|
2026-07-02 02:07:32 +00:00
|
|
|
/** quantized color of the wall on the mask */
|
2026-06-26 07:23:52 +00:00
|
|
|
export declare const WALL_QUANT_KEYS: Set<string>;
|
2026-07-02 02:07:32 +00:00
|
|
|
/** quantized color of the cabinet/floor on the mask */
|
2026-06-26 07:23:52 +00:00
|
|
|
export declare const CABINET_QUANT_KEYS: Set<string>;
|
|
|
|
|
export declare function getBaseboardStripQuantKeys(): Set<string>;
|
|
|
|
|
export declare function getWallQuantKeys(): Set<string>;
|
|
|
|
|
export declare function getCabinetQuantKeys(): Set<string>;
|