Tesi Robotica Un co-processore per Stereo-Matching: Architettura | Page 63

i i “LP_Tesi” — 2011/9/9 — 21:20 — page 63 — #63 i 4.1. PACKAGE STRUCT 1 2 3 4 5 6 7 P3 #Formato 4 4 #Lunghezza Altezza 15 #Profondità Colore 0 0 0 0 0 0 0 0 0 0 0 15 7 0 0 0 0 0 0 0 0 15 0 15 0 0 0 0 i 63 0 0 15 0 0 0 7 0 15 0 0 0 0 0 0 0 15 0 0 0 che restituisce come immagine (scala a parte): A questo punto non rimane che descrivere le strutture definite (Alg:4.10). In particolare abbiamo a disposizione: Algoritmo 4.10 Struct: data struct 1 2 3 4 5 6 typedef enum{ NA, RED, GREEN, BLUE }Channel deriving (Bits, Eq); 7 8 9 10 11 12 typedef struct{ Bit#(8) red; Bit#(8) green; Bit#(8) blue; }Pixel deriving (Bits, Eq); 13 14 15 16 17 typedef struct{ Channel dir; BitF addr; }DirAddr deriving (Bits, Eq); 18 19 20 21 22 23 typedef struct{ BitF disp; BitF addr; Channel color; }DispAddr deriving (Bits, Eq); i i i i