Initial commit with project files

This commit is contained in:
2025-06-27 14:34:11 +02:00
commit 7ea3207e63
310 changed files with 9331 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
import cv2
import numpy as np
normal = cv2.imread("../../data/lena.png", cv2.IMREAD_GRAYSCALE)
def valid_rows(N):
n = np.log2(N)
n = np.ceil(n)
N = np.power(2, n)
return N
def create_H(m, N):
...
''' Reshape to valid resolution '''
N, m = normal.shape
new_N = valid_rows(N)
print("Original Resolution:", m, "x", N)
print("New Resolution:", m, "x", new_N)
if N != new_N:
_ = np.zeros((new_N, m))
_[:N, :m] = normal
normal = _
''' Show images '''
cv2.imshow("normal", normal)
cv2.waitKey()