\begin{tikzpicture}[spy using outlines]

    \pgfmathsetmacro{\pointnumber}{0};
    \pgfmathsetmacro{\pointnumberoffset}{\pointnumber*8};
    \pgfmathsetmacro{\offsetx}{3.1};
    \pgfmathsetmacro{\offsety}{-5.7};
    \pgfmathsetmacro{\meshnumbera}{0};
    \pgfmathsetmacro{\meshnumberb}{1};
    \pgfmathsetmacro{\meshnumberc}{2};
    \pgfmathsetmacro{\imagewidth}{0.2};
    \pgfmathsetmacro{\leftshift}{-1.5};



    \node[inner sep=0pt] (im) at (0,\offsety+1.8) {\large ground truth}; 
    \node[inner sep=0pt] (im) at (\offsetx,\offsety+1.8) {\large $\xi=0$}; 
    \node[inner sep=0pt] (im) at (2*\offsetx,\offsety+1.8) {\large $\xi=2$}; 
    \node[inner sep=0pt] (im) at (3*\offsetx,\offsety+1.8) {\large $\xi=5$}; 

    \node[inner sep=0pt] (im) at (-0.25,3*\offsety-4.6) {\includegraphics[width=0.3\textwidth,height=0.05\textwidth]{source/optical_comparison/colorbar2.png}}; 
    \foreach \i in {0,1,2}{
        \node[inner sep=0pt] (im\i) at (\offsetx*\i+\offsetx,3*\offsety-5.8) {\includegraphics[width=\imagewidth\textwidth,trim={200 50 200 50},clip]{source/optical_comparison/pc\i.png}}; 
        }

    \node[inner sep=0pt] (text1) at (0.5,3*\offsety-5.8) {\large input:};


    \node[inner sep=0pt] (im) at (0,\offsety) {\includegraphics[width=\imagewidth\textwidth,trim={400 100 400 100},clip]{source/optical_comparison/gt.png}}; 
    \foreach \i in {0,1,2}{
        \node[inner sep=0pt] (im\i) at (\offsetx*\i+\offsetx,\offsety) {\includegraphics[width=\imagewidth\textwidth,trim={400 100 400 100},clip]{source/optical_comparison/ptm\i.png}}; 
        }

    \node[inner sep=0pt] (spy_s_2) at (0*\offsetx-0.5,1*\offsety+0.1) {};
    \node[inner sep=0pt] (spy_t_2) at (0*\offsetx,1*\offsety-2.7) {};
    \spy [black,draw,height=2.2cm,width=1.8cm,magnification=2,connect spies] on (spy_s_2) in node at (spy_t_2);

    \node[inner sep=0pt] (spy_s_2_1) at (1*\offsetx-0.5,1*\offsety+0.1) {};
    \node[inner sep=0pt] (spy_t_2_1) at (1*\offsetx,1*\offsety-2.7) {};
    \spy [black,draw,height=2.2cm,width=1.8cm,magnification=2,connect spies] on (spy_s_2_1) in node at (spy_t_2_1);

    \node[inner sep=0pt] (spy_s_2_2) at (2*\offsetx-0.5,1*\offsety+0.1) {};
    \node[inner sep=0pt] (spy_t_2_2) at (2*\offsetx,1*\offsety-2.7) {};
    \spy [black,draw,height=2.2cm,width=1.8cm,magnification=2,connect spies] on (spy_s_2_2) in node at (spy_t_2_2);

    \node[inner sep=0pt] (spy_s_2_3) at (3*\offsetx-0.5,1*\offsety+0.1) {};
    \node[inner sep=0pt] (spy_t_2_3) at (3*\offsetx,1*\offsety-2.7) {};
    \spy [black,draw,height=2.2cm,width=1.8cm,magnification=2,connect spies] on (spy_s_2_3) in node at (spy_t_2_3);

    \node[inner sep=0pt, rotate=90] (text2) at (\leftshift,1.25*\offsety) {\large \ptom};

    \draw [line width=0.15mm] (\leftshift-0.5,1*\offsety-0.26*\offsety+0.05) -- (3.4*\offsetx+0.5,1*\offsety-0.26*\offsety+0.05) -- (3.4*\offsetx+0.5,2*\offsety-0.26*\offsety+0.15) -- (\leftshift-0.5,2*\offsety-0.26*\offsety+0.15) -- (\leftshift-0.5,1*\offsety-0.26*\offsety+0.05);


    \node[inner sep=0pt] (im) at (0,2*\offsety) {\includegraphics[width=\imagewidth\textwidth,trim={400 100 400 100},clip]{source/optical_comparison/gt.png}};
    \foreach \i in {0,1,2}{
        \node[inner sep=0pt] (im\i) at (\offsetx*\i+\offsetx,2*\offsety) {\includegraphics[width=\imagewidth\textwidth,trim={400 100 400 100},clip]{source/optical_comparison/ssm\i.png}}; 
        }

    \node[inner sep=0pt] (spy_s_3) at (0*\offsetx-0.5,2*\offsety+0.1) {};
    \node[inner sep=0pt] (spy_t_3) at (0*\offsetx,2*\offsety-2.7) {};
    \spy [black,draw,height=2.2cm,width=1.8cm,magnification=2,connect spies] on (spy_s_3) in node at (spy_t_3);

    \node[inner sep=0pt] (spy_s_3_1) at (1*\offsetx-0.5,2*\offsety+0.1) {};
    \node[inner sep=0pt] (spy_t_3_1) at (1*\offsetx,2*\offsety-2.7) {};
    \spy [black,draw,height=2.2cm,width=1.8cm,magnification=2,connect spies] on (spy_s_3_1) in node at (spy_t_3_1);

    \node[inner sep=0pt] (spy_s_3_2) at (2*\offsetx-0.5,2*\offsety+0.1) {};
    \node[inner sep=0pt] (spy_t_3_2) at (2*\offsetx,2*\offsety-2.7) {};
    \spy [black,draw,height=2.2cm,width=1.8cm,magnification=2,connect spies] on (spy_s_3_2) in node at (spy_t_3_2);

    \node[inner sep=0pt] (spy_s_3_3) at (3*\offsetx-0.5,2*\offsety+0.1) {};
    \node[inner sep=0pt] (spy_t_3_3) at (3*\offsetx,2*\offsety-2.7) {};
    \spy [black,draw,height=2.2cm,width=1.8cm,magnification=2,connect spies] on (spy_s_3_3) in node at (spy_t_3_3);

    \node[inner sep=0pt, rotate=90] (text3) at (\leftshift,2.25*\offsety) {\large \ssm};

    \draw [line width=0.15mm] (\leftshift-0.5,2*\offsety-0.26*\offsety+0.05) -- (3.4*\offsetx+0.5,2*\offsety-0.26*\offsety+0.05) -- (3.4*\offsetx+0.5,3*\offsety-0.26*\offsety+0.15) -- (\leftshift-0.5,3*\offsety-0.26*\offsety+0.15) -- (\leftshift-0.5,2*\offsety-0.26*\offsety+0.05);



    \node[inner sep=0pt] (im) at (0,3*\offsety) {\includegraphics[width=\imagewidth\textwidth,trim={400 100 400 100},clip]{source/optical_comparison/gt.png}}; 
    \foreach \i in {0,1,2}{
        \node[inner sep=0pt] (im\i) at (\offsetx*\i+\offsetx,3*\offsety) {\includegraphics[width=\imagewidth\textwidth,trim={400 100 400 100},clip]{source/optical_comparison/ldsdf\i.png}}; 
        }

    \node[inner sep=0pt] (spy_s_4) at (0*\offsetx-0.5,3*\offsety+0.1) {};
    \node[inner sep=0pt] (spy_t_4) at (0*\offsetx,3*\offsety-2.7) {};
    \spy [black,draw,height=2.2cm,width=1.8cm,magnification=2,connect spies] on (spy_s_4) in node at (spy_t_4);

    \node[inner sep=0pt] (spy_s_4_1) at (1*\offsetx-0.5,3*\offsety+0.1) {};
    \node[inner sep=0pt] (spy_t_4_1) at (1*\offsetx,3*\offsety-2.7) {};
    \spy [black,draw,height=2.2cm,width=1.8cm,magnification=2,connect spies] on (spy_s_4_1) in node at (spy_t_4_1);

    \node[inner sep=0pt] (spy_s_4_2) at (2*\offsetx-0.5,3*\offsety+0.1) {};
    \node[inner sep=0pt] (spy_t_4_2) at (2*\offsetx,3*\offsety-2.7) {};
    \spy [black,draw,height=2.2cm,width=1.8cm,magnification=2,connect spies] on (spy_s_4_2) in node at (spy_t_4_2);

    \node[inner sep=0pt] (spy_s_4_3) at (3*\offsetx-0.5,3*\offsety+0.1) {};
    \node[inner sep=0pt] (spy_t_4_3) at (3*\offsetx,3*\offsety-2.7) {};
    \spy [black,draw,height=2.2cm,width=1.8cm,magnification=2,connect spies] on (spy_s_4_3) in node at (spy_t_4_3);

    \node[inner sep=0pt, rotate=90] (text3) at (\leftshift,3.25*\offsety) {\large ours};

    \draw [red,line width=0.15mm] (\leftshift-0.5,3*\offsety-0.26*\offsety+0.05) -- (3.4*\offsetx+0.5,3*\offsety-0.26*\offsety+0.05) -- (3.4*\offsetx+0.5,4*\offsety-0.26*\offsety+0.15) -- (\leftshift-0.5,4*\offsety-0.26*\offsety+0.15) -- (\leftshift-0.5,3*\offsety-0.26*\offsety+0.05);


\end{tikzpicture}
