Error Resilient Image Transmission Over a Bluetooth ... - CiteSeerX

3 downloads 6619 Views 301KB Size Report
Entropy Coding (EREC) scheme for the transmission of JPEG .... 1/3 rate Forward Error Correction code ..... Images – Requirements and guidelines,” IOS/IEC.
_________________________________________________________ISSC 2003, Limerick.

July 1-2

Error Resilient Image Transmission Over a Bluetooth Network Lisa Kelly, Alan Molloy, Martin Glavin and Fearghal Morgan Department of Electronic Engineering National University of Ireland, Galway Ireland E-mail: [email protected] [email protected] [email protected] [email protected] __________________________________________________________________________________________ Abstract -- This paper proposes the use of an Error-Resilient Entropy Coding (EREC) scheme for the transmission of JPEG images across a Bluetooth wireless network. Bluetooth, being an ad-hoc networking standard, can be used in multiple environments, often under difficult conditions, leading to limited bandwidth and significant Bit Error Rates (BER). Compression and transmission provisions, that avoid catastrophic failure caused by lost, delayed, or errant packets, are crucial. This paper evaluates the transmission of JPEG images through a high BER channel with varying levels of Forward Error Correction (FEC). The EREC is presented as a method for modifying the JPEG compressed images to give increased error resilience while still maintaining a high compression ratio. Keywords – Image compression, Bluetooth, JPEG, EREC. _________________________________________________________________________________________

I

INTRODUCTION

Wireless systems, such as Bluetooth, are characterised by their limited bandwidth and high bit error rates, and sometimes cannot provide the necessary quality of service guarantees for compressed image data transmission [1]; therefore compression and transmission provisions, that avoid catastrophic failure caused by lost, delayed, or errant packets, are crucial. JPEG images are transmitted across a high BER Bluetooth network and the performance is evaluated with varying levels of Forward Error Correction. This paper proposes the EREC scheme [2] for transmission of JPEG images across a Bluetooth wireless network. Section II describes Bluetooth with emphasis on the aspects of the technology directly responsible for transmission rates and error correction . Section III describes the process of standard JPEG image compression. Section IV shows how the EREC can be applied to a standard JPEG with Huffman coding, and shows how the use of EREC increases the error resilience of the compressed image. Section V provides simulated results from image transmission through a high BER Bluetooth system.

II

BLUETOOTH TECHNOLOGY

In 1998, representatives from Intel, Ericsson, Nokia, Toshiba and IBM formed the Bluetooth Special Interest Group (SIG) to define a specification for low power, low cost, wireless devices with interoperability beinga major goal.. To aid the concept of interoperability the SIG decided to make Bluetooth an open specification, rather than keeping it restricted and proprietary. Wide acceptance among consumers is likely to lead to a larger overall market for Bluetooth devices. Bluetooth wireless technology is based on the idea of ad-hoc networking. An ad-hoc network consists of many types of consumer devices which can join and leave the network at will, without any user interaction. When Bluetooth devices come within range of each other (based on power classes, Table 1) they communicate instantly and spontaneously, and interrogate each other to see what services are offered. The Service Discovery Profile (SDP) is used to accomplish this task and connections are then established based on services offered and/or required.

2.

There are three power classes [1]: Class 1 2 3

Power Range 100 mW 2.5 mW 1mW

Distance 100m 20m 10m

Table 1. Bluetooth Power Classes The frequency range of Bluetooth is 2,400 to 2483.5 MHz with 79 1MHz RF channels. Frequency hopping, a fundamental aspect of Bluetooth technology provides a secure and robust communication link. This is essential considering Bluetooth operates in the unlicensed Industry Science and Medical (ISM) band of 2.4GHz where other devices may be transmitting. Interference from other active Bluetooth links can be a problem. A data channel hops randomly 1600 times per second between the 79 RF channels. Bluetooth defines two different types of link: an Asynchronous Connectionless Link (ACL) for data communication and a Synchronous Connection Orientated (SCO) link for voice communication. Each channel is divided into 625 microsecond timeslots. Packets can be up to five time slots in length. Bluetooth ACL packets can be designated as either data Medium (DM) or Data High (DH) type depending on the application. The DH packets achieve a higher data rate by using less error correction in the packet. Transmission for longer periods of time can achieve a higher data rate, e.g., a DH5 packet uses five time slots and can carry 723kb/s (the maximum amount of data for an asymmetric link). Data rates and error correction schemes associated with each of the packet types in an asymmetric link are summarised on Table 2. Packet Type DM1 DH1 DM3 DH3 DM5 DH5

FEC

CRC

2/3 No 2/3 No 2/3 No

Yes Yes Yes Yes Yes Yes

Max Rate Asymmetric 108.8 172.8 387.2 585.6 477.8 723.2

Table 2: Achievable asymmetric transfer rates

a) Error Correction schemes for Bluetooth There are 3 error-correction schemes defined for Bluetooth baseband controllers: 1. 1/3 rate Forward Error Correction code (FEC). A simple 3-times repetition FEC code is used for the header. The repetition code is implemented by repeating the header bits three times.

3.

2/3 rate forward error correction code (FEC). This scheme is a (15,10) shortened hamming code [1]. Automatic Repeat Request (ARQ) scheme, DM, DH and the data field of (Data & voice) DV packets are transmitted and retransmitted until acknowledgement of a successful reception is returned by the destination (or timeout is exceeded).

The purpose of any FEC scheme on the data payload is to reduce the number of retransmissions. However, in a reasonably error-free environment, FEC creates unnecessary overhead that reduces the throughput. Therefore, the packet definitions allow FEC to be modified in the payload. The packet header is always protected by a 1/3 rate FEC because it contains valuable link information and must survive bit errors. For the image transmission tests performed in this paper, the 2/3 rate FEC scheme was selected.

III

IMAGE COMPRESSION

Image compression minimises the size of a graphic file without degrading the quality of the image to an unacceptable level. Compression takes advantage of three general qualities of graphical data: redundancy, predictability or unnecessary. Compression has its trade-offs; in general, the more efficient the compression technique, the more complicated the algorithm will be. Often, this requires more computational resources or more time to decompress, which in turn affects the overall transmission speed. In most cases speed is not that important to still image transmission, but can be very important in video transmission.

a) Standard JPEG Compression The Joint Photographic Experts Group (JPEG) standard, can be applied to video. This is done by compressing each frame of video as an independent still image and transmitting them in series. Video coded in this fashion is often called Motion-JPEG[3]. In baseline JPEG, the image is divided into nonoverlapping blocks of 8x8 pixels. These blocks are transformed through a number of stages of processing (Figure 1): a. Two-dimensional Discrete Cosine Transform (DCT). b. Quantisation. c. Zig-zag ordering. d. Run length coding. e. Huffman coding.

DCT

Quantisation

Zig-Zag ordering & Run-length Coding

Huffman Coding

Output Data Stream

Figure 1: JPEG compression stages

The DCT decomposes an image from spatial information into its underlying spatial frequencies, so that the image information exists in a quantitative form that can be manipulated for compression. Forward DCT (FDCT) takes place at the encoding end and is defined as S ( v, u ) = Cv Cu 7 7 . .∑ ∑ s( y, x ) cos[(2 x + 1)uπ / 16] cos[(2 y )vπ / 16] 2 2 y =0 x =0

(1) where: S(v, u) represents the (v,u)th DCT element Cu, Cv = 1 / 2 for u, v = 0; Cu, Cv = 0 otherwise. The FDCT is performed on an 8x8 square matrix of pixel values, and it yields an 8x8 square matrix of frequency coefficients. The Inverse DCT (IDCT) occurs at the receiver where it decodes the frequency information back to the original values as follows: s( y , x ) = 1 7 ∑ 4 u =0

7

∑ CuCvS (v, u) cos[(2 x + 1)uπ / 16] cos[(2 y + 1)vπ / 16]

data are created. Each VLC block ends with an endof-block (EOB) code [4]. For motion video, a common technique is to provide standardised Huffman tables that are used on all frames of the video sequence [2]. A set of commonly used Huffman codes for ac and dc coefficients determined through empirical testing and statistical analysis is provided in Annex K.3 of [5]. Baseline sequential DCT-based JPEG is the least complicated and least computationally expensive method in the JPEG specification [5]. Consequently, this method is most suitable for Motion-JPEG. Once the images are compressed using the JPEG compression algorithm, source coding and channel coding can be applied. Source coding compresses the stream, while affecting the perceived quality of reproduction as little as possible by removing both redundant and irrelevant features of the original signal. Channel coding reinserts redundancy into the source-coded stream, but this enables the channel decoder to correct errors in transmission.

b) Techniques to deal with errors in JPEG transmission caused by VLCs VLCs can cause random bit or burst errors to disastrously affect decoding through loss of synchronisation [4]. This loss of synchronisation is caused by the decoder not knowing where block delineation occurs. Fixed-length codes eliminate this problem because the decoder can synchronise easily at the start of each new block. In order for the transmitted data to be encoded with a fixed-length code, the data does not go through Huffman coding. However, this is at the expense of compression efficiency [4].

v =0

(2) Quantisation Equation (3) compresses the image data, resulting in reduced coefficient accuracy and some data loss. The loss occurs because the quantiser disregards any fractional remainder in the coefficients as follows: SQ (v, u ) = Integer Round  S (v, u )   Q ( v, u )   

(3)

where S(v, u) represents the (v,u)th DCT element as before and Q(v,u) represents the corresponding quantization table element. Huffman coding assigns each code a weight according to its frequency. If a code occurs frequently in an image, it is given a short codeword. Therefore, Variable-Length Code (VLC) blocks of

Other ways to deal with errors in VLC streams include insertion of synchronisation flags, called restart markers in JPEG, at user-defined intervals. A shorter interval improves robustness but decreases compression efficiency since the restart marker represents no image data [4], [5]. Reversible Variable-Length Codes (RVLC) [6] are uniquely decodable forwards and backwards and are useful for error location and maximising the amount of decodable data. RVLCs involve little or no efficiency loss relative to the corresponding nonreversible variable length codes. The error-resilient entropy code (EREC) [2], is a method for adapting existing schemes to give increased resilience to random and burst errors while maintaining high compression. The EREC is discussed in greater detail in Section IV.

IV

ERROR RESILIENT ENTROPY CODE

The EREC scheme protects against error propagation with very little added redundancy, by reorganising the variable-length blocks such that each block starts at a known position within the code. This helps synchronise the decoder.

Stage 2

Stage 1 (Offset 1)

si

a b c d e f g #

a b c d e f

2 3

h i

h i

l m #

l m #

4

n o p q r s t u #

n o p q r s

5

v w x y #

v w x y # t

Slot 1

j k #

Stage 3

The EREC frame structure is composed of N slots of length si bits to give a total length T =

∑s i =1

i

bits to

transmit. T and N are transmitted to the decoder as highly protected header information. A bit organisation algorithm is used to rearrange the variable-length blocks into the EREC code structure. The EREC algorithm rearranges the variable length data blocks (bits), bi, into slots, si, where i=1, 2, 3,…,N. Figure 2 shows an example of the bit reorganisation algorithm. In this example, a letter in the alphabet represents a bit of image data. The ‘#’ character represents the end of block (EOB) code word. When the decoder detects an EOB, it knows that the remaining contents of the slot correspond to data from other blocks placed at a later stage in the algorithm. All blocks to be coded search in a predetermined search sequence 0,1,2,3,…..N-1. A wrap around rule is used to ensure that each block searches every slot. If the slot number to search is greater than N, the slot “wraps” around to slot 1. Initially, there are five variable-length blocks in slots numbered 1-5 with lengths 8, 5, 3, 9 and 5. The length of si is 6 in this case. At the first stage, shown in fig. 2(a), the length of slots 1 and 4 are greater than si, therefore they are not completely coded. They both have bi - si bits remaining to be coded. Slots 2, 3 and 5 have lengths less than si, therefore they have space left to code data for blocks 1 and 4. At stage 2, the offset is 1. As a result, block 1 searches slot 2 and block 4 searches slot 5 for empty space for the remaining bits. As shown in figure 2(b), one bit from block 1 is placed in slot 2, and block 5 has yet to place any of its remaining bits. At stage 3, the offset is 2. Thus, block 1 checks slot 3 for space to place its final bit. Block 4 checks slot 1. The final bit from block 1 is placed in slot 3, figure 2(c). By the end of stage 5 every bit has been placed figure 2(e),. A random offset sequence, which searches through all offsets randomly, was proven to be the most efficient [7], but is not evaluated in this paper.

Stage 4 (Offset 3)

(Offset 2)

N

a b c d e f

a b c d e f

h i

h i

j k # g

l m # # n o p q r s v w x y # t (c) (Offset 4)

u #

(b)

(a)

a) The EREC Algorithm

#

j k # g

Stage 5

a b c d e f h i

j k # g

l m # #

u #

n o p q r s

u #

v w x y # t (d) # = EOB codeword

j k # g

l m # # u #

a = Bit example

n o p q r s v w x y # t

si = Length of EREC block

(e)

Figure 2: Diagram showing simple EREC bit reorganisation algorithm

b) Application of EREC to JPEG Compression for Bluetooth Transmission There are two criteria for implementing the EREC [7]. First, each variable-length block must be a prefix code. This means that the decoder knows when it has finished decoding a block without reference to any other information. The presence of EOB words in the baseline JPEG, by definition, means that the variable length code is a prefix code. Secondly, the information contained in each variable-length-block is causal, i.e. channel errors only affect current and following data. Huffman coding, as described earlier, is causal, since it is entirely made up of information from the current frame being compressed. The EREC can be considered as one of a selection of techniques for error-resilient coding as it can be used in conjunction with error correction coding and synchronisation code words. EREC could be used as a stand-alone means of increasing the resilience of an image for transmission, singularly increasing the quality of images transmitted over a high BER channel, with a minimal impact on transmission speed. It could also be used in conjunction with FEC schemes to further enhance the performance of systems requiring high quality image transmission.

(a) Recognisable image

(b) Very distorted image

(c) Unrecognisable image

Figure 3: Examples of JPEG compressed images, without hamming coding, transmitted over Bluetooth channel

(a) Perfect image

(b) Acceptable image

(c) Unrecognisable image

Figure 4: Examples of JPEG compressed images, with hamming coding, transmitted over Bluetooth channel

Redundancy R can occur when the EREC is applied (4). Each EREC frame can be used to transmit up to N variable length blocks of data, each of length bi, provided the total data to be coded does not exceed the total T bits available

Only 16% of the tested images gave a recognisable picture. 60% of the transmitted images could not be re-constructed at the receiver. Recognisable

N

R = T − ∑ bi

(4)

i =1

Very Distorted

No Picture

Sending the value of T and N as highly protected information causes overhead. The total redundancy was 72 bits per image[6]. The rose image shown in figures 3 and 4 is made up of 44064 bits. Therefore, the redundancy due to the EREC in this case is approximately 0.1%. Unrecognisable

V

SIMULATION RESULTS

Results are presented to demonstrate the effectiveness of the FEC and EREC transmission schemes. A BER of 0.1% is achieved in Bluetooth [1]. These images were tested across a channel with an equivalent BER.

Figure 5: JPEG image quality when transmitted without FEC

Acceptable

Unrecognisable

a) Transmission of JPEGs without FEC through a high BER Bluetooth channel JPEG images were sent across the high BER channel without a Bluetooth hamming code being applied, and were regenerated in the receiver. Figure 3 shows some samples of the regenerated images. The results presented here are subjective because classification of images with imperfections is difficult to numerically quantify. The results show that the images were very sensitive to errors.

Perfect

No Picture

Figure 6: JPEG image quality when transmitted with FEC

b) Transmission of FEC JPEG through a high BER Bluetooth channel In Bluetooth, the payload can be encoded with a shortened hamming code. JPEG images were transmitted with a standard Bluetooth (15,11) hamming code across the high BER channel and reconstructed at the receiver. The hamming code adds 50% redundancy data to the image file. Figure 4 shows the classification of regenerated images. 75% of the images were visibly perfect. Only 1% resulted in no picture being regenerated (Figure 6). Although the Hamming code makes the images more robust to errors, the added redundancy is a high price to pay.

.V

CONCLUSIONS

This paper presents the Error-Resilient Entropy Code (EREC) as a method that provides error resilience for JPEG transmission across a Bluetooth channel. Forward Error Correction coding is also proven to be an effective form of error correction, though with the cost of 50% added redundancy. Simulation results show that the EREC can avoid catastrophic failure caused by lost, delayed or errant packets. Use of the EREC can yield performance levels approaching that of FEC, without the inherent overhead with FEC. Future work will involve implementation of the EREC algorithm and testing the EREC with Bluetooth hardware in a noisy environment.

c) Transmission of JPEG with EREC but without FEC

ACKNOWLEDGEMENTS

The EREC coding technique is proposed as a means of optimising the throughput of a Bluetooth wireless motion JPEG stream while still maintaining an acceptable image quality with high BERs. The overhead associated with using the EREC algorithm is typically less than 1% [2]. This is significantly less than the 50% overhead associated with the standard Bluetooth (15,10) Hamming Code.

[1] “Specification of the Bluetooth System: Core,” www.bluetooth.com/dev/specifications.asp

Simulation results indicate that the use of EREC significantly reduces the number of corrupted images, where the images are being transmitted through a high BER channel. This makes EREC a good choice for encoding JPEG images through a Bluetooth Channel without FEC. The simplicity of the implementation of the EREC algorithm makes it attractive for embedded applications, because the algorithm does not require significant processing power when compared to the implementation of the JPEG compression algorithm itself, or other error correction schemes that might be employed. If a synchronisation problem should occur with a system using the EREC, the variable-length block ends are more prone to errors because the algorithm only modifies the latter part of the blocks. Due to the configuration of a standard JPEG image, the ends of blocks contain the high frequency information. However, errors in high frequency regions of a JPEG are less noticeable than errors that might occur at the lower frequencies. This makes the EREC scheme very suitable to JPEG compressed images.

This research is funded by Connaught Electronics Ltd., CELTRAK Ltd. and Enterprise Ireland under the Innovation Partnerships scheme.

REFERENCES

[2] D.W. Redmill and N.G Kingsbury, “The EREC: An error resilient technique for coding variable length blocks of data”, IEEE Trans. On Image Processing, vol. 5, pp. 565-574, April 1996. [3] P.E. Matteson, “Practical digital video with programming examples in C,” Chapter 10, pg. 313 [4] S.S. Hemami, Cornell University, “Robust Image Communication over Wireless Channel,” IEEE, Comms Magazine, Nov 2001, pp. 120-124. [5] “Information Technology – Digital Compression and Coding of Continuous-tone Still Images – Requirements and guidelines,” IOS/IEC IS10918-1, Oct. 20, 1992. [5] Weerackody, C. Podilchuk, and A. Estrella, “Transmission of JPEG Coded Images over Wireless Channels,” Bell Labs Technical Journal, autumn 1996 [6] J. Wen and J. D. Villasenor, University of California, “Reversible variable-length codes for robust image and video transmission,” Proc. 31st Asilomar Conf. Sig., Sys. And Comp., vol. 2, Nov. 1997, pp. 9. [7] “The ERPC: An Efficient Error-Resilient Technique for Encoding Positional Information of Sparse Data,” IEEE Transactions on Communications, vol. 40, no.1, January 1992.