Difference between revisions of "Aufgaben:Exercise 5.8Z: Falsification of BMP Images"

From LNTwww
 
(12 intermediate revisions by 4 users not shown)
Line 1: Line 1:
  
{{quiz-Header|Buchseite=Digitalsignalübertragung/Anwendungen bei Multimedia–Dateien
+
{{quiz-Header|Buchseite=Digital_Signal_Transmission/Applications_for_Multimedia_Files
 
}}
 
}}
  
[[File:P_ID1856__Dig_Z_5_8.png|right|frame|Verfälschte BMP–Dateien]]
+
[[File:P_ID1856__Dig_Z_5_8.png|right|frame|Falsified BMP files <br>$($"Erde" &nbsp; &rArr; &nbsp;  "earth"$)$]]
Wir gehen hier von den folgenden Bildern im Format 160x120 aus:
+
We assume here the following images in the format 160x120 (pixels):
* dem Bild &bdquo;Weiß&rdquo; mit der Farbtiefe 1 BPP (ein Bit per Pixel) und
+
* the image "White" with the color depth "1 BPP" (one bit per pixel) and
* dem Bild &bdquo;Erde&rdquo; mit 24 BPP, auch wenn hier nur wenige der $2^{24}$ möglichen Farben genutzt werden.
+
* the image "Earth" with "24 BPP", even if only a few of the $2^{24}$ possible colors are used here.
  
  
Das Bild &bdquo;W1&rdquo; ist durch Verfälschung mit einem Gilbert&ndash;Elliott&ndash;Modell unter Verwendung folgender Parameter entstanden:
+
The image "W1" was created by falsification with a Gilbert&ndash;Elliott model using the following parameters:
 
:$$p_{\rm G} \hspace{-0.1cm} \ = \ \hspace{-0.1cm} 0.001,
 
:$$p_{\rm G} \hspace{-0.1cm} \ = \ \hspace{-0.1cm} 0.001,
 
\hspace{0.2cm}p_{\rm B} = 0.1,\hspace{0.2cm}
 
\hspace{0.2cm}p_{\rm B} = 0.1,\hspace{0.2cm}
Line 16: Line 16:
 
B\hspace{0.05cm}|\hspace{0.05cm} G) = 0.01\hspace{0.05cm}.$$
 
B\hspace{0.05cm}|\hspace{0.05cm} G) = 0.01\hspace{0.05cm}.$$
  
Damit erhält man für die mittlere Fehlerwahrscheinlichkeit
+
Thus, we obtain for the mean error probability
 
:$$p_{\rm M} =  \frac{p_{\rm G} \cdot {\rm Pr}({\rm G\hspace{0.05cm}|\hspace{0.05cm} B)}+ p_{\rm B} \cdot {\rm Pr}(\rm
 
:$$p_{\rm M} =  \frac{p_{\rm G} \cdot {\rm Pr}({\rm G\hspace{0.05cm}|\hspace{0.05cm} B)}+ p_{\rm B} \cdot {\rm Pr}(\rm
 
B\hspace{0.05cm}|\hspace{0.05cm} G)}{{\rm Pr}(\rm G\hspace{0.05cm}|\hspace{0.05cm} B) + {\rm Pr}(\rm
 
B\hspace{0.05cm}|\hspace{0.05cm} G)}{{\rm Pr}(\rm G\hspace{0.05cm}|\hspace{0.05cm} B) + {\rm Pr}(\rm
 
B\hspace{0.05cm}|\hspace{0.05cm} G)} = 0.01 \hspace{0.05cm},$$
 
B\hspace{0.05cm}|\hspace{0.05cm} G)} = 0.01 \hspace{0.05cm},$$
  
und für die Fehlerkorrelationsdauer
+
and for the error correlation duration
 
:$$D_{\rm K} =\frac{1}{{\rm Pr}(\rm G\hspace{0.05cm}|\hspace{0.05cm}
 
:$$D_{\rm K} =\frac{1}{{\rm Pr}(\rm G\hspace{0.05cm}|\hspace{0.05cm}
 
B ) + {\rm Pr}(\rm B\hspace{0.05cm}|\hspace{0.05cm} G )}-1 \approx
 
B ) + {\rm Pr}(\rm B\hspace{0.05cm}|\hspace{0.05cm} G )}-1 \approx
 
8 \hspace{0.05cm}.$$
 
8 \hspace{0.05cm}.$$
  
Das Bild &bdquo;W2&rdquo; entstand nach Verfälschung mit den GE&ndash;Parametern
+
The image "W2" was obtained after falsification with the GE parameters
 
:$$p_{\rm B} = 0.2\hspace{0.05cm},\hspace{0.2cm}
 
:$$p_{\rm B} = 0.2\hspace{0.05cm},\hspace{0.2cm}
 
  {\rm Pr}({\rm
 
  {\rm Pr}({\rm
Line 33: Line 33:
 
0.0005\hspace{0.05cm}.$$
 
0.0005\hspace{0.05cm}.$$
  
Die Fehlerwahrscheinlichkeit im Zustand &bdquo;$\rm G$&rdquo; wurde so gewählt, dass sich die mittlere Fehlerwahrscheinlichkeit ebenfalls zu $p_{\rm M} = 0.01$ ergibt.
+
The error probability in the state "$\rm G$" was chosen so that the average error probability is &nbsp;$p_{\rm M} = 0.01$.&nbsp;
  
Die beiden unteren Bilder &bdquo;E3&rdquo; und &bdquo;E4&rdquo; können entstanden sein durch Verfälschung mit
+
The two lower images "E3" and "E4" may have been created by falsification with
* dem BSC&ndash;Modell $(p = 0.01)$,
+
* the BSC model&nbsp; $(p = 0.01)$,
* dem gleichen GE&ndash;Modell, das zu &bdquo;W1&rdquo; geführt hat,
+
* that GE model which led to "W1",
* dem gleichen GE&ndash;Modell, das zu &bdquo;W2&rdquo; geführt hat.
+
* the GE model that led to "W2".
  
  
Dies zu klären, ist Ihre Aufgabe. Eine der Antworten ist jeweils richtig.
+
It is your task to clarify this. One of the answers is correct in each case.
  
  
  
''Hinweise:''
 
* Die Aufgabe gehört zum Kapitel [[Digitalsignal%C3%BCbertragung/Anwendungen_bei_Multimedia%E2%80%93Dateien| Anwendungen bei Multimedia&ndash;Dateien]].
 
* Alle Bilder wurden mit dem Windows&ndash;Programm [https://en.lntwww.de/downloads/Sonstiges/Programme/DKM.zip Digitale Kanalmodelle & Multimedia] erzeugt. <br>Der angegebene Link verweist auf die Zip&ndash;Version dieses Programms.
 
* Sollte die Eingabe des Zahlenwertes &bdquo;0&rdquo; erforderlich sein, so geben Sie bitte &bdquo;0.&rdquo; ein.
 
  
  
  
===Fragebogen===
+
Notes:&nbsp;
 +
*The exercise belongs to the chapter&nbsp; [[Digital_Signal_Transmission/Applications_for_Multimedia_Files| "Applications for Multimedia Files"]].
 +
 
 +
* All images were created with the Windows program&nbsp; "Digital Channel Models & Multimedia".
 +
 +
 
 +
 
 +
 
 +
===Questions===
 
<quiz display=simple>
 
<quiz display=simple>
{Ermitteln Sie für das mit dem Gilbert&ndash;Elliott&ndash;Modell verfälschte Bild &bdquo;'''W2'''&rdquo; die Fehlerwahrscheinlichkeit im Zustand &bdquo;GOOD&rdquo;, so dass sich $p_{\rm M} = 1\%$ ergibt?
+
{For the image "W2" falsified with the Gilbert&ndash;Elliott model, determine the error probability in the state "GOOD", resulting in&nbsp; $p_{\rm M} = 1\%$?&nbsp;
 
|type="{}"}
 
|type="{}"}
 
$p_{\rm G} \ = \ ${ 0.05 3% } $\ \%$
 
$p_{\rm G} \ = \ ${ 0.05 3% } $\ \%$
  
{Wie groß ist die Korrelationsdauer der Fehler im Bild &bdquo;'''W2'''&rdquo;?
+
{What is the correlation period of the errors in the image "W2"?
 
|type="{}"}
 
|type="{}"}
 
$D_{\rm K} \ = \ ${ 94.2 3% }  
 
$D_{\rm K} \ = \ ${ 94.2 3% }  
  
{Wieviele Bitfehler $(N_{\rm (3)})$ treten (statistisch gesehen) im &bdquo;'''W2'''&rdquo; auf?
+
{How many bit errors &nbsp;$(N_{\rm W})$&nbsp; occur (statistically) in image "W1" (or "W2") at &nbsp;$p_{\rm M} = 1\%$?&nbsp;  
 
|type="{}"}
 
|type="{}"}
$N_{\rm (3)} \ = \ ${ 192 3% }  
+
$N_{\rm W} \ = \ ${ 192 3% }  
  
{Wieviele Bitfehler $(N_{\rm (4)})$ treten im Bild &bdquo;'''E3'''&rdquo; (oder &bdquo;'''E4'''&rdquo;) bei $p_{\rm M} = 1\%$ auf?
+
{How many bit errors &nbsp;$(N_{\rm E})$&nbsp; occur (statistically) in image "E3" (or "E4") at &nbsp;$p_{\rm M} = 1\%$?&nbsp;
 
|type="{}"}
 
|type="{}"}
$N_{\rm (4)} \ = \ ${ 4608 3% }
+
$N_{\rm E} \ = \ ${ 4608 3% }
  
{Welches Fehlermodell liegt dem Bild &bdquo;'''E3'''&rdquo; zugrunde?
+
{Which error model is the image "E3" based on?
 
|type="()"}
 
|type="()"}
+ BSC&ndash;Modell mit $p = 1\%$,
+
+ The BSC model with&nbsp; $p = 1\%$,
- gleiches GE&ndash;Modell wie für &bdquo;'''W1'''&rdquo;,
+
- the same GE model as for "W1",
- gleiches GE&ndash;Modell wie für &bdquo;'''W2'''&rdquo;
+
- the same GE model as for "W2"
  
{Welches Fehlermodell liegt dem Bild &bdquo;'''E4'''&rdquo; zugrunde?
+
{Which error model is the image "E4" based on?
 
|type="()"}
 
|type="()"}
- BSC&ndash;Modell mit $p = 1\%$,
+
- The BSC model with&nbsp; $p = 1\%$,
- gleiches GE&ndash;Modell wie für &bdquo;'''W1'''&rdquo;,
+
- the same GE model as for "W1",
+ gleiches GE&ndash;Modell wie für &bdquo;'''W2'''&rdquo;
+
+ the same GE model as for "W2".
 +
 
 
</quiz>
 
</quiz>
  
  
===Musterlösung===
+
===Solution===
 
{{ML-Kopf}}
 
{{ML-Kopf}}
'''(1)'''&nbsp; Die Umstellung der vorgegebenen $p_{\rm M}$&ndash;Gleichung führt zum gesuchten Ergebnis:
+
'''(1)'''&nbsp; Rearranging the given $p_{\rm M}$ equation leads to the result we are looking for:
 
:$$p_{\rm G} \hspace{-0.1cm} \ = \ \hspace{-0.1cm}  \frac{p_{\rm M}
 
:$$p_{\rm G} \hspace{-0.1cm} \ = \ \hspace{-0.1cm}  \frac{p_{\rm M}
\cdot [{\rm Pr}({\rm G\hspace{0.05cm}|\hspace{0.05cm} B)}+  {\rm Pr}(\rm B\hspace{0.05cm}|\hspace{0.05cm} G)] -
+
\cdot \big[{\rm Pr}({\rm G\hspace{0.05cm}|\hspace{0.05cm} B)}+  {\rm Pr}(\rm B\hspace{0.05cm}|\hspace{0.05cm} G)\big] -
 
p_{\rm B} \cdot {\rm Pr}(\rm B\hspace{0.05cm}|\hspace{0.05cm}
 
p_{\rm B} \cdot {\rm Pr}(\rm B\hspace{0.05cm}|\hspace{0.05cm}
 
G)}{{\rm Pr}(\rm G\hspace{0.05cm}|\hspace{0.05cm} B) } = \frac{  0.01 \cdot [0.01+0.0005] - 0.2 \cdot
 
G)}{{\rm Pr}(\rm G\hspace{0.05cm}|\hspace{0.05cm} B) } = \frac{  0.01 \cdot [0.01+0.0005] - 0.2 \cdot
 
0.0005}{0.01} \hspace{0.15cm}\underline {= 0.05\%}\hspace{0.05cm}.$$
 
0.0005}{0.01} \hspace{0.15cm}\underline {= 0.05\%}\hspace{0.05cm}.$$
  
'''(2)'''&nbsp; Mit der angegebenen Gleichung erhält man:
+
 
 +
'''(2)'''&nbsp; Using the given equation, we obtain:
 
:$$D_{\rm K} =\frac{1}{{\rm Pr}(\rm G\hspace{0.05cm}|\hspace{0.05cm}
 
:$$D_{\rm K} =\frac{1}{{\rm Pr}(\rm G\hspace{0.05cm}|\hspace{0.05cm}
 
B ) + {\rm Pr}(\rm B\hspace{0.05cm}|\hspace{0.05cm} G )}-1
 
B ) + {\rm Pr}(\rm B\hspace{0.05cm}|\hspace{0.05cm} G )}-1
Line 99: Line 105:
  
  
'''(3)'''&nbsp; Das Bild &bdquo;Weiß&rdquo; besteht aus $160 \cdot 120 = 19200 \ \rm Pixel$ und wird wegen der Farbtiefe $1 \ \rm BPP$ auch durch $19200 \ \rm Bit$ beschrieben. Mit der mittleren Bitfehlerwahrscheinlichkeit $p_{\rm M} = 0.01$ sind in beiden Bildern ('''W1''' und '''W2''') jeweils $N_{\rm (3)}  \underline{= 192}$ Bitfehler zu erwarten.
+
'''(3)'''&nbsp; The image "White" consists of $160 \cdot 120 = 19200 \ \rm pixels$ and is also described by $19200 \ \rm bits$ because of the color depth $1 \ \rm BPP$.  
 +
*With the average bit error probability $p_{\rm M} = 0.01$$N_{\rm W}  \underline{= 192}$ bit errors are expected in both images ("W1" and "W2").
  
  
'''(4)'''&nbsp; Bei gleicher Bildgröße und Fehlerwahrscheinlichkeit gibt es wegen der Farbtiefe $24 \ \rm BPP$ nun deutlich mehr Bitfehler, nämlich $N_{\rm (4)} = 24 \cdot 192 \ \underline{= 4608}$ (statistischer Wert).
+
'''(4)'''&nbsp; With the same image size and error probability, there are now significantly more bit errors because of the color depth $24 \ \rm BPP$, i.e.
 +
:$$N_{\rm E} = 24 \cdot 192 \ \underline{= 4608}.$$
  
  
'''(5)'''&nbsp; Richtig ist <u>Antwort 1</u>: Das Bild &bdquo;'''E3'''&rdquo; zeigt die typische Struktur statistisch unabhängiger Fehler.  
+
'''(5)'''&nbsp; <u>Answer 1</u> is correct:  
 +
*Image "E3" shows the typical structure of statistically independent errors.
  
  
'''(6)'''&nbsp; Richtig ist <u>Antwort 3</u>:  
+
'''(6)'''&nbsp; <u>Answer 3</u> is correct:  
*Das Bild &bdquo;'''E4'''&rdquo; zeigt eine typische Bündelfehlerstruktur.  
+
*Image "E4" shows a typical burst error structure.
*Verwendet wurde hierbei das GE&ndash;Modell mit $D_{\rm K} \approx 94$, das auch für &bdquo;'''W2'''&rdquo; verwendet wurde.  
+
*Here, the GE model with $D_{\rm K} \approx 94$, was used, which was also used for "W2".  
*Da aber nun jedes einzelne Pixel durch $24 \ \rm Bit$ dargestellt wird, ergibt sich die mittlere Fehlerkorrelationsdauer (bezogen auf Pixel) nur etwa zu ${D_{\rm K}}' = 4$.  
+
*However, since now every single pixel is represented by $24 \ \rm bits$, the average error correlation duration (related to pixels) is only about ${D_{\rm K}}' = 4$.  
*Das GE&ndash;Modell mit $D_{\rm K} \approx 8$ (bezogen auf Bit) würde bei einem $24 \ \rm BPP$&ndash;Bild etwa so aussehen wie das auf dem BSC&ndash;Modell basierende Bild &bdquo;'''E3'''&rdquo;.  
+
*The GE model with $D_{\rm K} \approx 8$ (in terms of bits) for a $24 \ \rm BPP$ image would look approximately like the image "E3" based on the BSC model.  
*Bezogen auf Pixel ergäben sich dann eher statistisch unabhängige Fehler.
+
*In terms of pixels, this would result in rather statistically independent errors.
 
{{ML-Fuß}}
 
{{ML-Fuß}}
  
Line 119: Line 128:
  
  
[[Category:Aufgaben zu Digitalsignalübertragung|^5.4 Multimedia-Dateien^]]
+
[[Category:Digital Signal Transmission: Exercises|^5.4 Multimedia Files^]]

Latest revision as of 13:49, 18 October 2022

Falsified BMP files
$($"Erde"   ⇒   "earth"$)$

We assume here the following images in the format 160x120 (pixels):

  • the image "White" with the color depth "1 BPP" (one bit per pixel) and
  • the image "Earth" with "24 BPP", even if only a few of the $2^{24}$ possible colors are used here.


The image "W1" was created by falsification with a Gilbert–Elliott model using the following parameters:

$$p_{\rm G} \hspace{-0.1cm} \ = \ \hspace{-0.1cm} 0.001, \hspace{0.2cm}p_{\rm B} = 0.1,\hspace{0.2cm} {\rm Pr}(\rm G\hspace{0.05cm}|\hspace{0.05cm} B)\hspace{-0.1cm} \ = \ \hspace{-0.1cm} 0.1, \hspace{0.2cm} {\rm Pr}(\rm B\hspace{0.05cm}|\hspace{0.05cm} G) = 0.01\hspace{0.05cm}.$$

Thus, we obtain for the mean error probability

$$p_{\rm M} = \frac{p_{\rm G} \cdot {\rm Pr}({\rm G\hspace{0.05cm}|\hspace{0.05cm} B)}+ p_{\rm B} \cdot {\rm Pr}(\rm B\hspace{0.05cm}|\hspace{0.05cm} G)}{{\rm Pr}(\rm G\hspace{0.05cm}|\hspace{0.05cm} B) + {\rm Pr}(\rm B\hspace{0.05cm}|\hspace{0.05cm} G)} = 0.01 \hspace{0.05cm},$$

and for the error correlation duration

$$D_{\rm K} =\frac{1}{{\rm Pr}(\rm G\hspace{0.05cm}|\hspace{0.05cm} B ) + {\rm Pr}(\rm B\hspace{0.05cm}|\hspace{0.05cm} G )}-1 \approx 8 \hspace{0.05cm}.$$

The image "W2" was obtained after falsification with the GE parameters

$$p_{\rm B} = 0.2\hspace{0.05cm},\hspace{0.2cm} {\rm Pr}({\rm G\hspace{0.05cm}|\hspace{0.05cm} B})= 0.01, \hspace{0.2cm} {\rm Pr}(\rm B\hspace{0.05cm}|\hspace{0.05cm} G) = 0.0005\hspace{0.05cm}.$$

The error probability in the state "$\rm G$" was chosen so that the average error probability is  $p_{\rm M} = 0.01$. 

The two lower images "E3" and "E4" may have been created by falsification with

  • the BSC model  $(p = 0.01)$,
  • that GE model which led to "W1",
  • the GE model that led to "W2".


It is your task to clarify this. One of the answers is correct in each case.




Notes: 

  • All images were created with the Windows program  "Digital Channel Models & Multimedia".



Questions

1

For the image "W2" falsified with the Gilbert–Elliott model, determine the error probability in the state "GOOD", resulting in  $p_{\rm M} = 1\%$? 

$p_{\rm G} \ = \ $

$\ \%$

2

What is the correlation period of the errors in the image "W2"?

$D_{\rm K} \ = \ $

3

How many bit errors  $(N_{\rm W})$  occur (statistically) in image "W1" (or "W2") at  $p_{\rm M} = 1\%$? 

$N_{\rm W} \ = \ $

4

How many bit errors  $(N_{\rm E})$  occur (statistically) in image "E3" (or "E4") at  $p_{\rm M} = 1\%$? 

$N_{\rm E} \ = \ $

5

Which error model is the image "E3" based on?

The BSC model with  $p = 1\%$,
the same GE model as for "W1",
the same GE model as for "W2"

6

Which error model is the image "E4" based on?

The BSC model with  $p = 1\%$,
the same GE model as for "W1",
the same GE model as for "W2".


Solution

(1)  Rearranging the given $p_{\rm M}$ equation leads to the result we are looking for:

$$p_{\rm G} \hspace{-0.1cm} \ = \ \hspace{-0.1cm} \frac{p_{\rm M} \cdot \big[{\rm Pr}({\rm G\hspace{0.05cm}|\hspace{0.05cm} B)}+ {\rm Pr}(\rm B\hspace{0.05cm}|\hspace{0.05cm} G)\big] - p_{\rm B} \cdot {\rm Pr}(\rm B\hspace{0.05cm}|\hspace{0.05cm} G)}{{\rm Pr}(\rm G\hspace{0.05cm}|\hspace{0.05cm} B) } = \frac{ 0.01 \cdot [0.01+0.0005] - 0.2 \cdot 0.0005}{0.01} \hspace{0.15cm}\underline {= 0.05\%}\hspace{0.05cm}.$$


(2)  Using the given equation, we obtain:

$$D_{\rm K} =\frac{1}{{\rm Pr}(\rm G\hspace{0.05cm}|\hspace{0.05cm} B ) + {\rm Pr}(\rm B\hspace{0.05cm}|\hspace{0.05cm} G )}-1 =\frac{1}{0.0105}-1\hspace{0.15cm}\underline {\approx 94.2}\hspace{0.05cm}.$$


(3)  The image "White" consists of $160 \cdot 120 = 19200 \ \rm pixels$ and is also described by $19200 \ \rm bits$ because of the color depth $1 \ \rm BPP$.

  • With the average bit error probability $p_{\rm M} = 0.01$, $N_{\rm W} \underline{= 192}$ bit errors are expected in both images ("W1" and "W2").


(4)  With the same image size and error probability, there are now significantly more bit errors because of the color depth $24 \ \rm BPP$, i.e.

$$N_{\rm E} = 24 \cdot 192 \ \underline{= 4608}.$$


(5)  Answer 1 is correct:

  • Image "E3" shows the typical structure of statistically independent errors.


(6)  Answer 3 is correct:

  • Image "E4" shows a typical burst error structure.
  • Here, the GE model with $D_{\rm K} \approx 94$, was used, which was also used for "W2".
  • However, since now every single pixel is represented by $24 \ \rm bits$, the average error correlation duration (related to pixels) is only about ${D_{\rm K}}' = 4$.
  • The GE model with $D_{\rm K} \approx 8$ (in terms of bits) for a $24 \ \rm BPP$ image would look approximately like the image "E3" based on the BSC model.
  • In terms of pixels, this would result in rather statistically independent errors.