I created a table that represented a 5x5 confusion matrix, and gave it the label tab:shape_confusion. The table is different than a regular table because it uses 10 figures to represent the descriptions of the data. Below is what the final generated table looks like.
However, when I tried both \autoref{tab:shape_confusion} and Table~\ref{tab:shape_confusion} in the text, the output PDF file shows ?? instead of the autogenerated number. I also receive the following warning:
You have referenced something which has not yet been labelled. If you have labelled it already, make sure that what is written inside \ref{...} is the same as what is written inside \label{...}.
The document already has half a dozen other tables that correctly generate their table numbers, and it is only this table that is having this issue. I was editing the table line by line, and discovered that the table number was generating correctly with a few figures, but stops generating the table number after adding more figures.
Below is the entire code of the table causing this issue.
\begin{table}[!ht]
\centering
\caption{Confusion matrix for distinguishing between the 5 hand shapes using shape context.}
\label{tab:shape_confusion}
\begin{tabular}{|c|c|c|c|c|c|}
\hline
&
\multicolumn{5}{c|}{Classified As }\\
\hline
\thead{Hand Shape} &
\includegraphics[scale=0.48]{figures/hand_shape/ok.png} &
\includegraphics[scale=0.48]{figures/hand_shape/thumbsup.png} &
\includegraphics[scale=0.48]{figures/hand_shape/hand.png} &
\includegraphics[scale=0.48]{figures/hand_shape/idp.png} &
\includegraphics[scale=0.48]{figures/hand_shape/v.png} \\
\hline
\includegraphics[scale=0.48]{figures/hand_shape/ok.png} &
\cellcolor{Blackone}{\textcolor{white}{95}} &
\cellcolor{Graytwo}{4} &
0 &
\cellcolor{Graytwo}{1} &
0 \\
\hline
\includegraphics[scale=0.48]{figures/hand_shape/thumbsup.png} &
0 &
\cellcolor{Blackone}{\textcolor{white}{98}} &
0 &
\cellcolor{Graytwo}{1} &
\cellcolor{Graytwo}{1} \\
\hline
\includegraphics[scale=0.48]{figures/hand_shape/hand.png} &
\cellcolor{Graytwo}{6} &
0 &
\cellcolor{Blackone}{\textcolor{white}{93}} &
\cellcolor{Graytwo}{1} &
0 \\
\hline
\includegraphics[scale=0.48]{figures/hand_shape/idp.png} &
\cellcolor{Graytwo}{2} &
\cellcolor{Graytwo}{7} &
0 &
\cellcolor{Blackone}{\textcolor{white}{91}} &
0 \\
\hline
\includegraphics[scale=0.48]{figures/hand_shape/v.png} &
\cellcolor{Graytwo}{1} &
\cellcolor{Graytwo}{1} &
0 &
\cellcolor{Graytwo}{1} &
\cellcolor{Blackone}{\textcolor{white}{97}} \\
\hline
\end{tabular}
\end{table}
I was wondering if someone was familiar with this problem and knew how to get the table number properly displayed instead of with "??"?