3 n = 10^5; % size of the cover
\r
4 h = 10; % constraint height - default is 10 - drives the complexity/quality tradeof
\r
6 e = zeros(19, 1); % embedding efficiency
\r
9 for i = 2:20 % inverse relative payload 1/alpha
\r
11 m = floor(n / i); % number of message bits
\r
12 cover = uint8(rand(n, 1));
\r
13 message = uint8(rand(m, 1));
\r
14 profile = 1:n; % linear profile
\r
15 profile = profile(randperm(n)) / sum(profile); % create a random permutation and normalize
\r
17 dist = stc_embed(cover, message, profile, h);
\r
19 e(i) = m / (n * dist);
\r
23 title('Embedding efficiency for linear profile');
\r
24 xlabel('Inverse payload 1/\alpha');
\r
25 ylabel('Embedding efficiency e');