## \section{Line speed} Edit

One of the most important parameter, which is interesting for suitable SSTV mode selection is the total time required to a transfer of an image.

Due to transmission speed the SSTV began more similar to radio facsimile. So the mode parameters are not defined by horizontal and vertical scan rates, but in number of lines transfered in one minute~-- {\em lines per minute (lpm)}.

Line speed depends on selected mode and varies in the range from 57\,lpm (Scottie DX) for high quality transmission of color image (320$\times$240) for almost five minute up to 1000\,lpm for BW image (128$\times$128) in just 8 seconds. SSTV modes and their propertis are described below.

## \section{Black \& white transmission} Edit

For black and white (BW), monochromatic image broadcast it is needed only one signal a level, which presents brightness/luminance $Y$ of each image element.

The frequency range from 1,500\,Hz (black) to 2,300\,Hz (white) transmit image information. Each frequency in this range represents specific brightness, the level of gray.

The human vision can distinguish brightness in wide range, but only adapted to the geometric mean value of actual brightness. Around this value could differentiate about 100 to 110 grey scale levels.

Based on this fact could be regarded as an ideal transmission 128 grey levels, where the average observer would not normally have seen transitions between adjacent grades.

\placefigure[][none]{The scan line of BW image.}
{
\externalfigure[sstv/obr/cbmody.pdf]
}


If we want to transmit images in 128 gray levels, it is distance of gray levels 800\,Hz\,/\,128\,=\,6.25\,Hz. The lowest frequency is for black and highest for white, the remaining 126 gray levels lay in the linear range between these two frequencies.

The transfer with more gray levels, for example 256, requires increased demands on the demodulator, which must be able to compensate frequency shift between the transmitter and receiver. In this case, the distance between the two levels of brightness is 3.125\,Hz and it is necessary relatively large distance from interference on the communication path for pure transfer of all gray scale.

Normally, we can settle for little less brightness resolution so it is possible to choose the transfer of 64 levels. This requires minor requirements to demodulator, because it must be able to clearly distinguish between 12.5\,Hz steps.

True reproduction of color image in gray scale is the second problem. Our vision doesn't perceive the brightness intensity of all three colour components in same. When we watched the three light of the same intensity, but each has another basic color, the human perception as the lightness one consider the green light, a little less red and blue would not seem so light to us.

But a BW television camera scans only intensity information and the resulting image would look like that the colors are same, they will be characterised by the same gray level depending on their intensity. Due to this fact a valid gray scale image $Y$ created from basic color components $R$, $G$ and $B$ (red, green and blue) is defined as:

$$Y= 0.30R+0.59G+0.11B$$

Note that the biggest factor 0.59 is just for the green, so nearly 60\,\% of colors that we can see depends on the green component and only 40\,\% of the remaining color components! This is used for simplicity in color scan converters for BW images. As BW image is not transmitted as true grayscale image, but the brightness signal is derived from the green component image. Brightness difference between the true BW image and the green component is insignificant in most cases.

\placefigure[][none]{Decomposition of color image to basic components.}
{
\startcombination[3*2]
{\externalfigure[sstv/obr/slozky/ara-r.jpg][width=0.3\makeupwidth]}{Red component}
{\externalfigure[sstv/obr/slozky/ara-g.jpg][width=0.3\makeupwidth]}{Green component}
{\externalfigure[sstv/obr/slozky/ara-b.jpg][width=0.3\makeupwidth]}{Blue compoment}
{\externalfigure[sstv/obr/slozky/ara-rgb.jpg][width=0.3\makeupwidth]}{True color image}
{\externalfigure[sstv/obr/slozky/ara-gray.jpg][width=0.3\makeupwidth]}{True grayscale}
{\externalfigure[sstv/obr/slozky/ara-y.jpg][width=0.3\makeupwidth]}{Intensity}
\stopcombination
}


## \section{Colour transmission} Edit

Every colour can be decomposed into three primary colors~-- red, green and blue. Additive color model produce other colours by combining these three primary colors.

For image transmission, on transmit side is an image decomposed into these independent colour components, then they are gradually transfered and on the receiving side are components composed into a colour image.

\placefigure[][none]{Decomposition of colour image into RGB signals.}{
\externalfigure[sstv/obr/modelrgb]
}


In video channel with 800\,Hz width it is possible to distinguish about 64 frequency levels. Then each colour component contains 64 brightness levels and resultant colour image then contains $64\times 64\times 64= 256144$ colors. If a demodulator distinguish 256 levels, it is possible to transfer over 16 millions $=256^3$ colors. The colour SSTV transmission meets the most demanding requirements of colour depth.

Some color SSTV systems also use a property of human vision, which is a different sensitivity to the primary color components. So image scan-line is not divided into three equal parts for each colour component. Because the eye is most sensitive to green, the largest part of the line takes just this part and the remainder are filled with red and blue parts. For example, the ratio is 4\,:\,2\,:\,2 for $G$\,:\,$R$\,:\,$B$.

Additive color model is a method of transmission that take more time to transmission, but it provides a transfer of true colors.

### \subsection[ycrcb]{Composite colour model} Edit

Second type of colour transmission is {\em YCrCb}. In fact it is similar system as used in colour fast-scan television, when each colour components $R$, $G$ and $B$ are transformed to {\em luminance} and {\em chrominance} (color information) signals. Unlike RGB, the time for transmission of an image is shorter. This colour coding is used for BW and colour broadcasting compatibility in television broadcast and SSTV Robot system (colour TV broadcasts can be received by black and white television).

\placefigure[][none]{Decomposition of colour image into YCrCb signals.}{
\externalfigure[sstv/obr/modelyuv]
}


The image scan-line contains a color transformed into two components~-- luminance and chrominance. The chrominance signal is composed of two differential color signals $R-Y$ and $B-Y$. Signal $Y$ is called {\em luminance} and contains the signal corresponding to brightness given by equation $Y= 0.30R + 0.59G +0.10B$. The $Y$ is for differential signals subtracted from the red and blue color components.

On the receiving side, the individual color components are restored, $R = (R-Y) + Y$ and $B = (B-Y) + Y$.

We need a third, green component the $G$, which is derived from $R-Y$ and $B-Y$ from the relation $G=Y-0.51(R-Y)-0.19(B-Y)$. Hereby we get the complete chrominance signals.

There are two formats of YCrCb color transmission used in SSTV. The first format 4\,:\,2\,:\,2 transmits both chrominance signals (with half-time in comparison with $Y$) in one line. The second format 4\,:\,2\,:\,0 contains only one chroma signal. Odd scan-lines may include, for example $R-Y$, and even then $B-Y$. The chrominance signal is then given by the average of two lines of the original image.

The advantage of this type of transfer to the RGB is significantly shorter transmission time. The YCrCb approximately took almost half of time of RGB with the almost same image quality.

Disadvantage compared with RGB moder is a loss that is still growing when the 4\,:\,2\,:\,0 format is used. Also the precise transceiver tuning is needed, otherwise the color information should became distorted. This is the reason why the YCrCb encoding is used less. According to the positive or negative deviation from the carrier, the image is strongly colored to pink or green, see \in{figure}[pic:yuv_error].

\placefigure[][pic:yuv_error]{Color distortion of YCrCb when the station is improperly tuned.}{
\externalfigure[sstv/obr/yuv_error.pdf]
}


The transmission for colour FSTV is also using YCrCb and also use of special methods and modulation (in PAL, SECAM) to eliminating this color distortion, which can occur on the transmission path. Unfortunately, something like this we do not have in SSTV and so the result of selective fading\footnote{{\em Selective fading} is a phenomenon, when the signal comes from two paths, which one is the variable and causes instability of the ionosphere layers and can be often seen in the 80\,m band in the morning and evening.} can cause color ghosts in image.

The SSTV systems using YCrCb transmission are much less resistant to interference than the RGB counterparts, see \in{fig.}[pic:rgb_error].

\placefigure[][pic:rgb_error]{Color distortion of RGB when the station is improperly tuned.}{
\externalfigure[sstv/obr/rgb_error.pdf]
}


The RGB model is distorted by a low contrast or increased brightness when there is significant deviation $\pm 200$\,Hz from the transmitter carrier and thus provides a better colours than YCrCb.

## \section{Synchronization} Edit

### \subsection[horsync]{Horizontal synchronization} Edit

There are two types of synchronization~-- {\em synchronous} and {\em asynchronous}.

Older SSTV systems use asynchronous transmission. This means that each information frame, in our case a scan-line, will be received after detection of horizontal sync.

This system detects vertical (image) and horizontal (scan-line) syncs and only after proper detection will display received lines. The asynchronous transmission has a huge disadvantage. When interference happen near 1200\,Hz frequency, then SSTV device can lost several scan-lines until interference remains.

In this respect, all new SSTV system are improved and use synchronous transmission. These systems use {\em free-run} scan. It is not necessary to receive vertical sync and it is possible to star reception from any scan-line. After initial synchronization it isn't required to detect horizontal sync. Thanks to this, synchronous systems are much more resistant to interference. Scan-line sync are still transmitted and then reception could start any time during transmission.

The disadvantage of free-run scan is in complying of very precise line speed of corresponding sides. The line speed must be {\bf absolutely} same. If the values are different then pictures take very unpleasant effects~-- slant. For more information on this subject see \in{section}[slant].

### \subsection[vis]{Vertical synchronization --- VIS code} Edit

The vertical synchronization is used for detection of transmission start. Receiving device can after vert. sync automaticly start the image scan.

The Robot Research company developed new form of vertical synchronization called {\em Vertical Interval Signaling}~-- VIS. All modern SSTV system adopted the VIS and use these longer syncs and digital header for automatic SSTV mode recognition.

The VIS contains digital code, the first and last bit are start and stop bit with 1200\,Hz frequency. Remaining 8 bits provide mode identification and one {\em parity bit}. Each bits are transmitted from the least significant bit.

\placefigure[][none]{Structure of VIS with value 42.}
{
\externalfigure[sstv/obr/viskod.pdf]
}


{\em Parity} is used as a simple error checking. SSTV use even parity. It means, that the number of logical ones must be even in whole 8bit code. If the number of ones in 7bit is odd, then parity bit is set to one. If the number is even, the parity bit is zero. Because information part of code has 7 bits it can take 128 values.

Each bit is 30\,ms long, so modulation speed is 33.3\,bauds. The frequency 1300\,Hz means state of logical zero and 1100\,Hz logical one. The first half of code (least significant bits, LSB) specifies the type of mode (BW/colour, resolution). The second half (most significant bits, MSB) contains information about system (Robot, Martin, AVT,\ldots). The last bit is reserved for parity error check.

\placetable[][tab:vis_system]{The meaning of bits in VIS code.}{
\bTABLE
\bTR
\bTH[nc=4] {\bf MSB} \eTH
\bTH[nc=4] {\bf LSB} \eTH
\bTH[nr=2] {\bf Meaning} \eTH
\eTR
\bTR
\bTH P  \eTH
\bTH 6 \eTH
\bTH 5 \eTH
\bTH 4 \eTH
\bTH 3 \eTH
\bTH 2 \eTH
\bTH 1 \eTH
\bTH 0 \eTH
\eTR
\bTABLEbody
\bTR
\bTD \eTD %P
\bTD \eTD %6
\bTD \eTD %5
\bTD \eTD %4
\bTD \eTD %3
\bTD \eTD %2
\bTD 0 \eTD %1
\bTD 0 \eTD %0
\bTD Color composite video \eTD %desc
\eTR
\bTR
\bTD \eTD %P
\bTD \eTD %6
\bTD \eTD %5
\bTD \eTD %4
\bTD \eTD %3
\bTD \eTD %2
\bTD 0 \eTD %1
\bTD 1 \eTD %0
\bTD BW, red component\eTD %desc
\eTR
\bTR
\bTD \eTD %P
\bTD \eTD %6
\bTD \eTD %5
\bTD \eTD %4
\bTD \eTD %3
\bTD \eTD %2
\bTD 1 \eTD %1
\bTD 0\eTD %0
\bTD BW, green component \eTD %desc
\eTR
\bTR
\bTD \eTD %P
\bTD \eTD %6
\bTD \eTD %5
\bTD \eTD %4
\bTD \eTD %3
\bTD \eTD %2
\bTD 1 \eTD %1
\bTD 1\eTD %0
\bTD BW, blue component\eTD %desc
\eTR
\bTR
\bTD \eTD %P
\bTD \eTD %6
\bTD \eTD %5
\bTD \eTD %4
\bTD \eTD %3
\bTD 0 \eTD %2
\bTD \eTD %1
\bTD \eTD %0
\bTD Horiz. resolution 128\,/\,160 pixels \eTD %desc
\eTR
\bTR
\bTD \eTD %P
\bTD \eTD %6
\bTD \eTD %5
\bTD \eTD %4
\bTD \eTD %3
\bTD 1 \eTD %2
\bTD \eTD %1
\bTD \eTD %0
\bTD Horiz. resolution 256\,/\,320 pixels \eTD %desc
\eTR
\bTR
\bTD \eTD %P
\bTD \eTD %6
\bTD \eTD %5
\bTD \eTD %4
\bTD 0 \eTD %3
\bTD \eTD %2
\bTD \eTD %1
\bTD \eTD %0
\bTD Vertical resolution 128\,/\,120 lines \eTD %desc
\eTR
\bTR
\bTD \eTD %P
\bTD \eTD %6
\bTD \eTD %5
\bTD \eTD %4
\bTD 1 \eTD %3
\bTD \eTD %2
\bTD \eTD %1
\bTD \eTD %0
\bTD Vertical resolution 256\,/\,240 lines \eTD %desc
\eTR
\bTR
\bTD \eTD %P
\bTD 0 \eTD %6
\bTD 0 \eTD %5
\bTD 0 \eTD %4
\bTD \eTD %3
\bTD \eTD %2
\bTD \eTD %1
\bTD \eTD %0
\bTD Robot \eTD %desc
\eTR
\bTR
\bTD  \eTD %P
\bTD 0 \eTD %6
\bTD 0 \eTD %5
\bTD 1 \eTD %4
\bTD \eTD %3
\bTD \eTD %2
\bTD \eTD %1
\bTD \eTD %0
\bTD Wraase SC-1 \eTD %desc
\eTR
\bTR
\bTD \eTD %P
\bTD 0 \eTD %6
\bTD 1 \eTD %5
\bTD 0 \eTD %4
\bTD \eTD %3
\bTD \eTD %2
\bTD \eTD %1
\bTD \eTD %0
\bTD Scottie, Wraase SC-2 \eTD %desc
\eTR
\bTR
\bTD \eTD %P
\bTD 0 \eTD %6
\bTD 1 \eTD %5
\bTD 1 \eTD %4
\bTD \eTD %3
\bTD \eTD %2
\bTD \eTD %1
\bTD \eTD %0
\bTD Scottie, Wraase SC-2 \eTD %desc
\eTR
\bTR
\bTD \eTD %P
\bTD 1 \eTD %6
\bTD 0 \eTD %5
\bTD 0 \eTD %4
\bTD \eTD %3
\bTD \eTD %2
\bTD \eTD %1
\bTD \eTD %0
\bTD AVT, Scottie DX \eTD %desc
\eTR
\bTR
\bTD \eTD %P
\bTD 1 \eTD %6
\bTD 0 \eTD %5
\bTD 1 \eTD %4
\bTD \eTD %3
\bTD \eTD %2
\bTD \eTD %1
\bTD \eTD %0
\bTD AVT, Acorn \eTD %desc
\eTR
\bTR
\bTD \eTD %P
\bTD 1 \eTD %6
\bTD 1 \eTD %5
\bTD 0 \eTD %4
\bTD \eTD %3
\bTD \eTD %2
\bTD \eTD %1
\bTD \eTD %0
\bTD Acorn \eTD %desc
\eTR
\bTR
\bTD \eTD %P
\bTD 1 \eTD %6
\bTD 1 \eTD %5
\bTD 1 \eTD %4
\bTD \eTD %3
\bTD \eTD %2
\bTD \eTD %1
\bTD \eTD %0
\bTD Pasokon TV \eTD %desc
\eTR
\bTR
\bTD X \eTD %P
\bTD  \eTD %6
\bTD  \eTD %5
\bTD  \eTD %4
\bTD \eTD %3
\bTD \eTD %2
\bTD \eTD %1
\bTD \eTD %0
\bTD Parity bit \eTD %desc
\eTR
\eTABLEbody
\eTABLE
}



The meaning of bits \in{table}[tab:vis_system] is valid for system based on Robot Research standard. Later, when number of new modes expanded, then the bit combination have no additional meaning.

\placetable[][tab:vis_kody]{The VIS codes of popular modes.}
{
\bTABLE
\setupTABLE[c][each][align=middle]
\bTR
\bTH {\bf Mode } \eTH
\bTH {\bf decimal} \eTH
\bTH {\bf hexa.} \eTH
\bTH {\bf binary} \eTH
\eTR
\bTABLEbody
\bTR \bTD Martin M1          \eTD \bTD     44    \eTD \bTD   0x2C     \eTD \bTD  0101100 \eTD \eTR
\bTR \bTD Martin M2          \eTD \bTD     40    \eTD \bTD   0x28     \eTD \bTD  0101000 \eTD \eTR
\bTR \bTD Robot 36 color     \eTD \bTD      8    \eTD \bTD   0x08     \eTD \bTD  0001000 \eTD \eTR
\bTR \bTD Robot 72 color     \eTD \bTD     12    \eTD \bTD   0x0C     \eTD \bTD  0001100 \eTD \eTR
\bTR \bTD Scottie S1         \eTD \bTD     60    \eTD \bTD   0x3C     \eTD \bTD  0111100 \eTD \eTR
\bTR \bTD Scottie S2         \eTD \bTD     56    \eTD \bTD   0x38     \eTD \bTD  0111000 \eTD \eTR
\bTR \bTD Scottie DX         \eTD \bTD     76    \eTD \bTD   0x4C     \eTD \bTD  1001100 \eTD \eTR
\bTR \bTD Wraase SC-2 180    \eTD \bTD     55    \eTD \bTD   0x37     \eTD \bTD  0110111 \eTD \eTR
\eTABLEbody
\eTABLE
}


The comprehensive table of all VIS code is on the \at{page}[biglist].

\placefigure[][fig:matin_m1_vis]{The vertical synchronization of Martin M1, the VIS code value is 44.}{
\externalfigure[sstv/obr/vis_m1.pdf]
}