spyrit.misc.walsh_hadamard.walsh2_S_unfold

spyrit.misc.walsh_hadamard.walsh2_S_unfold(X)[source]

Unfold a signal from a ā€œ2dā€ s-transformed representation

Note: the top left (first) pixel is arbitrarily set to zero

Args:

X (np.ndarray): n-by-m image.

Returns:

X (np.ndarray): (n*n-1)-by-1 signal

Example 1:
>>> import spyrit.misc.walsh_hadamard as wh
>>> X = np.array([[1, 3, 0, 8],[7, 5, 1, 2]])
>>> wh.walsh2_S_unfold(X)