Example #1
0
 def initialization(self):
     X = wvt.get_z_order(self.wv.rows * self.wv.cols)
     self.LIS = ts.CircularStack(self.wv.cols * self.wv.rows)
     self.nextLIS = ts.CircularStack(self.wv.cols * self.wv.rows)
     self.LSP = ts.CircularStack(self.wv.cols * self.wv.rows)
     s_size = (self.wv.rows * self.wv.cols / 2 ** (2 * self.wv.level))
     self.S = X[:s_size]
     del X[:s_size]
     self.I = X
     maxs = abs(self.wv.data)
     self.n = int(math.log(maxs.max(), 2))
     self.LIS.push(self.S)
     self.i_partition_size = (self.wv.rows / 2 ** self.wv.level) ** 2
     self.output = [0] * self.bit_bucket
     self.out_idx = 0
Example #2
0
 def iInitialization(self, width, height, level, wise_bit):
     self.wv = wvt.wavelet2D(np.zeros((width, height), dtype=Int), level)
     self.dt = self.wv.data
     self.wv.level = level
     X = wvt.get_z_order(self.wv.rows * self.wv.cols)
     self.LIS = ts.CircularStack(self.wv.cols * self.wv.rows)
     self.nextLIS = ts.CircularStack(self.wv.cols * self.wv.rows)
     self.LSP = ts.CircularStack(self.wv.cols * self.wv.rows)
     s_size = (self.wv.rows * self.wv.cols / 2 ** (2 * self.wv.level))
     self.S = X[:s_size]
     del X[:s_size]
     self.I = X
     self.n = wise_bit
     self.LIS.push(self.S)
     self.i_partition_size = (self.wv.rows / 2 ** self.wv.level) ** 2
     self._idx = 0
     self._logidx = 0
Example #3
0
 def printFoveaWindow(self):
     window = np.zeros((self.wavelet.rows, self.wavelet.cols))
     points = wv.get_z_order(self.wavelet.rows * self.wavelet.cols)
     for i in points:
         window[tuple(i)] = self.calculate_fovea_w(i)
     return window