I'm trying to reference the subfloat using \ref{img1} and \ref{img2} but its not working, a ? keeps appearing in the reference location. If anyone could please advise.
\begin{figure}[t]
\subfloat[]{\includegraphics[width=.49\linewidth]{img1}}\label{img1}
\subfloat[]{\includegraphics[width=.49\linewidth]{img2}}\label{img2}
\caption{The two methods a and b.}
\label{fig:KC3}
\end{figure}
