# Recreate position of subfigures in a table above figure caption

I need to recreate a particular style of captioning a "figure".

Main characteristics of this style are:

• No subcaptions included in the subfigures.
• The position of the subfigures is recreated in a table (using tabular is an option?) above the caption of the figure. I hope the MWE and the picture help to get the idea

Note that the position of the subfigures may follow any type of positioning e.g. in the figure is a 2-2 alignment. Other type of alignment might be 2-2-1, 1-2-2, and so on.

A MWE follows with my work so far. The table can be (obvioulsy) improved. In addition, the table must still be included in the Figure caption starting directly above the letter "F" of "Figure".

\documentclass{article}
\usepackage{graphicx}
\usepackage{subcaption}
\usepackage{booktabs}
\usepackage{array}

\newcolumntype{M}{>{\centering\arraybackslash}p{.3cm}}
\renewcommand\arraystretch{1.5}

\usepackage{tikz}
\usepackage[framemethod=default]{mdframed}

\newcommand{\mybox}[1]{
\begin{tikzpicture}
\node[draw,rectangle,line width =0.5pt,text width=0.4cm,
minimum width=0.4cm,minimum height=0.4cm]{#1};
\end{tikzpicture}
}

\begin{document}
\begin{figure}
\centering

\begin{subfigure}[b]{0.4\textwidth}
\includegraphics[width=\textwidth]{example-image-a}
\begin{subfigure}[b]{0.4\textwidth}
\centering
\includegraphics[width=\textwidth]{example-image-b}
\end{subfigure}

\begin{subfigure}[b]{0.4\textwidth}
\centering
\includegraphics[width=\textwidth]{example-image-c}
\end{subfigure}

\mybox{a} \mybox{b} \\
\mybox{c}

\caption{TOF depth cameras a) Letter A, b) Letter B and c) Letter C}\label{fig:TOF}

\end{figure}

\end{document}

Any help will be greatly appreciated. You can find an example of such figure in:

-
 – Claudio Fiandrino Jan 17 at 8:14 Thank you Claudio for the edition! – Marcelino Minero Jan 17 at 17:17