• No se han encontrado resultados

La evocación y la experimentación de los alimentos en un contexto trasnacional: el

5. DE LA AÑORANZA A LA AGENCIA: LA MEMORIA SENSORIAL, LA SAZÓN Y

5.3 Las operaciones en el desarrollo de la sazón

5.3.1. La evocación y la experimentación de los alimentos en un contexto trasnacional: el

The DWT CRS MISC processor perform 2 Levels of 2-dimensional Lifting Scheme DWT filtering onto the image data (size of 64 pixels x 4 pixels) that are input to it.

For 1st Level 2-dimensional DWT, the Row (Horizontal) Filtering onto the original image data was performed first and followed by Column (Vertical) Filtering onto the L and H subband coefficients. For better visualisation, the DWT coefficients were arranged in the manner illustrated in Figure 116. However, the actual arrangement is a continuous data memory as shown in the Figure 117.

(a) Row (horizontal) filtering. (b) Column (vertical) filtering.

Figure 116 Level 1 DWT coefficients arrangement in 2D.

(a) Row (horizontal) filtering.

(b) Column (vertical) filtering.

Figure 117 Actual Level 1 DWT coefficients arrangement in memory.

129

The DWT Filter used in the DWT CRS MSC processor is the Lifting Scheme DWT Haar filter. The process of filtering is performed by subtracting the Even image pixel with the Odd image pixel (H = $R1 - $R0) to give High Pass DWT coefficient (L subband). Then the division of two is performed onto the High Pass DWT coefficients and the result is summed with the Odd image pixel (L = $R0 + ½ x H) to obtain the low pass coefficients (H subband). Algorithm 1.0 describes how the DWT CRS MISC actually performed the Level 1 DWT Filtering onto the image data that were stored in the memory. Inside the Algorithm 1.0, it also includes both Algorithm 1.1 and Algorithm 1.2 that describe the Row and Column DWT Filtering process respectively.

  Algorithm 1.0 Level 1: DWT Filtering 1: Define:

2: $R0 - odd image pixel (reads from: row filtering - $s0, column filtering - $s0) 3: $R1 - even image pixel (reads from: row filtering - $s1, column filtering - $s64) 4: $s576 - division value, 2; $s577 - half image column size, 32

5: $s578 - image row size to be processed, 4; $s579 - full image column size, 64 6: $t6 - column counter; $t5 - row counter

7: $t4 - temporary variable for use in jumping programme instruction 8: $t3 - temporary variable for storing divided value

9: $t2 - temporary variable for storing high pass coefficients 10: Initialisation data address for row filtering: $R0 = 2; $R1 = 3 11: Initialisation for row filtering: $t5 = -4

12: STEP 1: Perform level 1 row filtering onto the image 13: do level 1 DWT row filtering (Algo. 1.1)

14: STEP 2: Reset the data address back to initial settings by decreasing the data address 15: Initialisation: $t5 = -4

16: while $t5 < 0 do

17: Decrease $R0 data address by $s579 18: Decrease $R1 data address by $s579 19: $t5 = $t5 + 1

20: end while

21: Initialisation data address for column filtering: $R0 = 2; $R1 = 66 22: Initialisation for column filtering: $t5 = -2

23: STEP 3: Perform level 1 column filtering onto the image 24: do level 1 DWT column filtering (Algo. 1.2)

25: STEP 4: Reset the data address back to initial settings by decreasing the data address 26: Initialisation: $t5 = -4

27: while $t5 < 0 do

28: Decrease $R0 data address by $s579 (64) 29: Decrease $R1 data address by $s579 (64) 30: $t5 = $t5 + 1

31: end while

130   Algorithm 1.1 Level 1: DWT Filtering (Row Filtering)

1: while $t5 < 0 do

2: Initialisation: $t6 = -32 3: while $t6 < 0 do

4: STEP 1: Determine high pass coefficient, $R1 5: $R1 = $R1 - $R0

6: Initialisation: $t2 = 0; $t3 = 0; $t4 = 0 7: STEP 2: Determine low pass coefficient, $R0 8: if $R1 is positive then

9: $t2 = -$R1

10: while $t2 < 0 do

11: $t2 = $t2 - 2

12: if $t2 < 0 then

13: $t3 = $t3 + 1

14: end if

15: end while

16: $R0 = $R0 + $t3 = $R0 + 0.5*$R1

17: else

18: $t2 = $R1

19: while $t2 < 0 do

20: $t2 = $t2 - 2

21: if $t2 < 0 then

22: $t3 = $t3 + 1

23: end if

24: end while

25: $R0 = $R0 - $t3 = $R0 + 0.5*(-$R1) 26: end if

27: $t6 = $t6 + 1

28: STEP 3: Update the data address in the programme memory 29: Increase $R0 data address by 2

30: Increase $R1 data address by 2 31: end while

32: $t5 = $t5 + 1 33: end while

131

Once the 1st Level DWT Filtering process was completed, the MISC processor continued to perform the 2nd Level DWT Filtering onto the LL1 coefficients. 2nd Level DWT Filtering process was performed as to have an additional reduction of image data size such that lower amount of image data could be transferred across the WVSNs, especially when the sensor nodes were low in energy resources (low battery power). For better visualisation, the Level 2 DWT coefficients were then arranged in the manner illustrated in Figure 118. However, the actual arrangement of Level 2 DWT coefficients is a continuous data memory as shown in the Figure 119.

  Algorithm 1.2 Level 1: DWT Filtering (Column Filtering) 1: while $t5 < 0 do

28: STEP 3: Update the data address in the programme memory 29: Increase $R0 data address by 1

132 (a) Row (horizontal) filtering. (b) Column (vertical) filtering.

Figure 118 Level 2 DWT coefficients arrangement in 2D.

(a) Row (horizontal) filtering.

(b) Column (vertical) filtering.

Figure 119 Actual Level 2 DWT coefficients arrangement in memory.

Again, the LL1 DWT coefficients undergone Row (Horizontal) Filtering and then followed by Column (Vertical) Filtering, which is described in Algorithm 2.0.

The Algorithm 2.0 shows that the algorithm is broken up into Algorithm 2.1 for DWT Row Filtering and Algorithm 2.2 for DWT Column Filtering. Once both Row and Column DWT Filtering was performed, the DWT CRS MISC processor had completed performing the 2 Levels 2-dimensional DWT Filtering onto the image data.

133   Algorithm 2.0 Level 2: DWT Filtering

1: Define:

2: $R0 - odd image pixel (reads from: row filtering - $s0, column filtering - $s0) 3: $R1 - even image pixel (reads from: row filtering - $s2, column filtering - $s128) 4: $s576 - division value, 2; $s577 - half image column size, 32

5: $s578 - image row size to be processed, 4; $s579 - full image column size, 64 6: $s580 - level 2 subband column size. 16

7: $t8 - temporary variable to store -64; $t7 - temporary variable to store -4 8: $t6 - column counter; $t5 - row counter

9: $t4 - temporary variable for use in jumping programme instruction 10: $t3 - temporary variable for storing divided value

11: $t2 - temporary variable for storing high pass coefficients 12: Initialisation data address for row filtering: $R0 = 2; $R1 = 4 13: Initialisation for row filtering: $t5 = -2

14: STEP 1: Perform level 2 row filtering onto the image 15: do level 1 DWT row filtering (Algo. 2.1)

16: STEP 2: Reset the data address back to initial settings by decreasing the data address 17: Initialisation: $t5 = -2

18: while $t5 < 0 do

19: Decrease $R0 data address by $s579 20: Decrease $R1 data address by $s579 21: $t5 = $t5 + 1

22: end while

23: Initialisation data for column filtering: $R0 = 2; $R1 = 130 24: STEP 3: Perform level 2 column filtering onto the image 25: do level 1 DWT column filtering (Algo. 2.2)

26: STEP 4: Reset the data address back to initial settings by decreasing the data address 27: Decrease $R0 data address by $s579 (64)

28: Decrease $R1 data address by $s579 (64)

134   Algorithm 2.1 Level 2: DWT Filtering (Row Filtering)

1: while $t5 < 0 do

2: Initialisation: $t6 = -16 3: while $t6 < 0 do

4: STEP 1: Determine high pass coefficient, $R1 5: $R1 = $R1 - $R0

6: Initialisation: $t2 = 0; $t3 = 0; $t4 = 0 7: STEP 2: Determine low pass coefficient, $R0 8: if $R1 is positive then

9: $t2 = -$R1

10: while $t2 < 0 do

11: $t2 = $t2 - 2

12: if $t2 < 0 then

13: $t3 = $t3 + 1

14: end if

15: end while

16: $R0 = $R0 + $t3 = $R0 + 0.5*$R1

17: else

18: $t2 = $R1

19: while $t2 < 0 do

20: $t2 = $t2 -2

21: if $t2 < 0 then

22: $t3 = $t3 + 1

23: end if

24: end while

25: $R0 = $R0 - $t3 = $R0 + 0.5*(-$R1) 26: end if

27: $t6 = $t6 + 1

28: STEP 3: Update the data address in the programme memory 29: Increase $R0 data address by 4

30: Increase $R1 data address by 4 31: end while

32: $t5 = $t5 + 1

33: STEP 4: Update the data address in the programme memory to next row of LL1 coefficients 34: Increase $R0 data address by $s579 (64)

35: Increase $R1 data address by $s579 (64) 36: end while

135

Documento similar