From a7ebf6016a940c06d522c59452dfdad054068321 Mon Sep 17 00:00:00 2001
From: Yosra Jelassi <yosra.jelassi@grenoble-inp.org>
Date: Sun, 4 Feb 2024 15:28:10 +0100
Subject: [PATCH] Upload New File

---
 src/methods/Yosra_Jelassi/reconstruct.py | 56 ++++++++++++++++++++++++
 1 file changed, 56 insertions(+)
 create mode 100644 src/methods/Yosra_Jelassi/reconstruct.py

diff --git a/src/methods/Yosra_Jelassi/reconstruct.py b/src/methods/Yosra_Jelassi/reconstruct.py
new file mode 100644
index 0000000..02bba03
--- /dev/null
+++ b/src/methods/Yosra_Jelassi/reconstruct.py
@@ -0,0 +1,56 @@
+"""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
+from src.methods.Yosra_Jelassi.new_reconstruction import new_interpolation
+
+
+
+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)
+    res = new_interpolation(op, y)
+
+    return res
+
+
+####
+####
+####
+
+####      ####                ####        #############
+####      ######              ####      ##################
+####      ########            ####      ####################
+####      ##########          ####      ####        ########
+####      ############        ####      ####            ####
+####      ####  ########      ####      ####            ####
+####      ####    ########    ####      ####            ####
+####      ####      ########  ####      ####            ####
+####      ####  ##    ######  ####      ####          ######
+####      ####  ####      ##  ####      ####    ############
+####      ####  ######        ####      ####    ##########
+####      ####  ##########    ####      ####    ########
+####      ####      ########  ####      ####
+####      ####        ############      ####
+####      ####          ##########      ####
+####      ####            ########      ####
+####      ####              ######      ####
+
+# 2023
+# Authors: Mauro Dalla Mura and Matthieu Muller
-- 
GitLab