From 3018ff009c1b12e11b8604285c4394fa73e6d27a Mon Sep 17 00:00:00 2001 From: Matthieu Muller <matthieu.muller@gipsa-lab.grenoble-inp.fr> Date: Mon, 29 Jan 2024 10:30:05 +0100 Subject: [PATCH] Post merge changes --- src/methods/template/reconstruct.py | 53 +++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100755 src/methods/template/reconstruct.py diff --git a/src/methods/template/reconstruct.py b/src/methods/template/reconstruct.py new file mode 100755 index 0000000..a97bd3f --- /dev/null +++ b/src/methods/template/reconstruct.py @@ -0,0 +1,53 @@ +"""The main file for the reconstruction. +This file should NOT be modified except the body of the 'run_reconstruction' function. +Students can call their functions (declared in others files of src/methods/your_name). +""" + + +import numpy as np + +from src.forward_model import CFA + + +def run_reconstruction(y: np.ndarray, cfa: str) -> np.ndarray: + """Performs demosaicking on y. + + Args: + y (np.ndarray): Mosaicked image to be reconstructed. + cfa (str): Name of the CFA. Can be bayer or quad_bayer. + + Returns: + np.ndarray: Demosaicked image. + """ + # Performing the reconstruction. + # TODO + input_shape = (y.shape[0], y.shape[1], 3) + op = CFA(cfa, input_shape) + + return np.zeros(op.input_shape) + + +#### +#### +#### + +#### #### #### ############# +#### ###### #### ################## +#### ######## #### #################### +#### ########## #### #### ######## +#### ############ #### #### #### +#### #### ######## #### #### #### +#### #### ######## #### #### #### +#### #### ######## #### #### #### +#### #### ## ###### #### #### ###### +#### #### #### ## #### #### ############ +#### #### ###### #### #### ########## +#### #### ########## #### #### ######## +#### #### ######## #### #### +#### #### ############ #### +#### #### ########## #### +#### #### ######## #### +#### #### ###### #### + +# 2023 +# Authors: Mauro Dalla Mura and Matthieu Muller -- GitLab