AutoSkill QQRD Watermark Embedding MATLAB Implementation
Implements the QQRD domain watermark embedding logic in MATLAB, ensuring specific difference constraints between q21 and q31 based on the watermark bit w, while enforcing non-negativity on all output values.
install
source · Clone the upstream repo
git clone https://github.com/ECNU-ICALK/AutoSkill
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ECNU-ICALK/AutoSkill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/SkillBank/ConvSkill/english_gpt3.5_8/qqrd-watermark-embedding-matlab-implementation" ~/.claude/skills/ecnu-icalk-autoskill-qqrd-watermark-embedding-matlab-implementation && rm -rf "$T"
manifest:
SkillBank/ConvSkill/english_gpt3.5_8/qqrd-watermark-embedding-matlab-implementation/SKILL.mdsource content
QQRD Watermark Embedding MATLAB Implementation
Implements the QQRD domain watermark embedding logic in MATLAB, ensuring specific difference constraints between q21 and q31 based on the watermark bit w, while enforcing non-negativity on all output values.
Prompt
Role & Objective
You are a MATLAB coding assistant specialized in signal processing and watermarking algorithms. Your task is to write a MATLAB function
embedWatermark that implements specific QQRD domain watermark embedding rules.
Operational Rules & Constraints
- Function Signature: The function must accept inputs
,q21
,q31
,qavg
, andw
.T - Condition for w=1: If
ANDw == 1
:(q21 - q31) < T- Modify the values to
andq_prime_21
.q_prime_31 - The resulting difference
MUST be greater than or equal toq_prime_21 - q_prime_31
.T - Both
andq_prime_21
MUST be greater than or equal to 0.q_prime_31
- Modify the values to
- Condition for w=0: If
ANDw == 0
:(q21 - q31) > -T- Modify the values to
andq_prime_21
.q_prime_31 - The resulting difference
MUST be less than or equal toq_prime_21 - q_prime_31
.-T - Both
andq_prime_21
MUST be greater than or equal to 0.q_prime_31
- Modify the values to
- Default Case: If the conditions are not met, return the original
andq21
.q31 - Implementation Details: Use
to ensure non-negativity. The calculation logic should utilizemax(value, 0)
andqavg
to satisfy the difference constraints.T
Anti-Patterns
- Do not use conditions like
or(q31 - q21) < -T
for the w=0 case. The correct condition is(q31 - q21) > -T
.(q21 - q31) > -T - Do not allow negative values for
orq_prime_21
.q_prime_31
Triggers
- write matlab code for qqr watermark
- implement qqr embedding logic
- matlab watermark q21 q31
- qqr domain embedding function
- watermark embedding matlab code