## 4 Performance Evaluation in a Capsule Prototype
### Electronic Capsule  
To make the hardware modular, the capsule is divided into four boards: Imaging board, FPGA board, RF board and Power board. The overall block diagram of the capsule is shown in Figure 8. The components were chosen considering performance, power requirement and physical size to fit into a miniature capsule prototype. The size of the capsule is 16 mm \(\times\) 36 mm. However, it should be noted that the purpose of this work is to demonstrate the advantages of the proposed compression system in _in-vivo_ trial; as a result, the capsule was intended to be such that can be swallowed by pig, not humans, so, its size should not be compared with a commercial capsule which is normally 11 mm \(\times\) 28 mm. The Imaging board contains a CMOS image sensor with lens [16] and four LEDs. To support both WLI and NBI imaging modes, two white LEDs, one blue LED having a peak wavelength of 405-410 nm and one green LED having a peak wavelength of 520 nm are used in the design. The FPGA board contains a Lattice FPGA MachXO2-2000 and an RC reset circuit. The FPGA chip has physical dimension of \(8\times 8\times 1.23\) mm and contains 2112 lookup tables (LUTs), non-volatile RAM for storing configuration and built in clock generator which makes it a suitable choice for miniature capsule endoscopy application. The proposed compression algorithm is implemented in VHDL and programmed into the FPGA along with other necessary control modules. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline \multirow{2}{*}{**Work**} & \multirow{2}{*}{**Type**} & \multirow{2}{*}{**Color Space**} & \multirow{2}{*}{**Algorithm**} & \multicolumn{2}{c}{**Avg. CR \%**} \\ \cline{4-6}  & & & & **WLI** & **NBI** & \\ \hline [PERSON] [8] & RGB & DCT & 87.1 & - & 32.9 \\ \hline [PERSON] [9] & RGB & DCT & 96.8 & - & 36.5 \\ \hline [PERSON] [10] & RGB & DCT with LZ77 & 79.6 & - & 32.5 \\ \hline [PERSON] [13] & RGB & H.264 based DCT & 82.0 & - & 36.2 \\ \hline [PERSON] [14] & [PERSON] & RGB & DCT & 75.4 & - & 47.7 \\ \hline [PERSON] [12] & RGB & DCT with LZ77 & 82.3 & - & 40.7 \\ \hline [PERSON] [24] & RGB & Modified JPEG-LS & 56.7 & & 46.4 \\ \hline \multirow{2}{*}{[PERSON] [15]} & \multirow{2}{*}{YC\({}_{\text{v}}\)} & DCT with & \multirow{2}{*}{91.2} & \multirow{2}{*}{-} & \multirow{2}{*}{35.7} \\  & & Golomb-Rice & & & \\ \hline \multirow{2}{*}{[PERSON] [20]} & \multirow{2}{*}{YUV} & LPC with & \multirow{2}{*}{73.0} & \multirow{2}{*}{-} & \multirow{2}{*}{\(\infty\)} \\  & & & Golomb-Rice \& Uninary & & \\ \hline JPEG-LS [21] & Lossless & RGB &
\begin{tabular}{c} Prediction on edge \\ detection \& Golomb-Rice \\ \end{tabular} & 57.9 & - & \multirow{2}{*}{_(Lossless)_} \\ \cline{2-2} \cline{6-6} Proposed & \multirow{2}{*}{YEF} & DPCM with & \multirow{2}{*}{78.0} & \multirow{2}{*}{84.0} \\  & & Golomb-Rice\& unary & & \\ \hline \hline \end{tabular}
\end{table} 
Table 7: Compression with other compression algorithms. The RF board contains a 2.4 GHz RF transceiver by Nordic and other necessary passive components [25]. Although this wavelength shows high absorption characteristics of electromagnetic radiation of by water, previous works in [26, 27] have shown that 2.4 GHz transceivers, like Nordic, can be effectively used to transmit data wirelessly through animal body. It is noted here that, medical implantable communication service (MICS) compatible RF transceivers that work at 402-405 MHz frequency, are the most suitable choice for transmitting data through human body [28]. Pillcam capsule by Given Imaging uses a custom made MICS compatible RF transceiver from Microsemi (part ZL70081 with data-rate of 2.7 Mbps [29]). However, this unit is not offered for public purchase; instead they offer a low data-rate transceiver (part ZL70102 with data rate of 500 kbps [26]) which is not even sufficient for 2 frames per sec application. As a result, we choose to use a 2.4 GHz Nordic transceiver having a raw data-rate of 2 Mbps in our design.