If you put the picture inside a node and name it you can access the positions in it. If you then have [remember picture]
as an option to your tikzpicture
you can access it from other tikzpictures
. In the example below I have put two figure environments with a picture each. In each of then there are two tikzpicture
s, one with the image and one with the overlay
stuff. (If the grid should be in the first or the second doesn't really change anything in this case, but if you for example put tick marks on it the bounding box will change, hence I put it in the overlay part.) With \usetikzlibrary{calc}
you can do derivations of the coordinates. Here the green arrow starts in the upper right corner of Figure 1 and ends at coordinate (2,3)
from the lower left corner in Figure 2. As long as you keep the two figures on the same page this should work.
\documentclass{article}
\usepackage{lipsum}
\usepackage{graphicx}
\usepackage{tikz}
\usetikzlibrary{calc}
\begin{document}
\lipsum[2]
\begin{figure}[htb]
\centering
\begin{tikzpicture}[remember picture]
\node[inner sep=0pt,anchor=south west] (A1) {\includegraphics[width=0.4\linewidth]{example-image-a}};
\end{tikzpicture}
%% Overlay part
\begin{tikzpicture}[remember picture,overlay]
\draw[red,thin] (A1.south west) grid (A1.north east);
\end{tikzpicture}
\caption{A first figure}
\label{fig:First}
\end{figure}
\lipsum[2]
\begin{figure}[htb]
\centering
\begin{tikzpicture}[remember picture]
\node[inner sep=0pt,anchor=south west] (A2) {\includegraphics[width=0.4\linewidth]{example-image-b}};
\end{tikzpicture}
%% Overlay part
\begin{tikzpicture}[remember picture,overlay]
\draw[red,thin] (A2.south west) grid (A2.north east);
\draw[green,->,line width=5pt] (A1.north east) to [bend right] ($(A2.south west)+(2,3)$);
\end{tikzpicture}
\caption{A second figure}
\label{fig:Second}
\end{figure}
\lipsum[3]
\end{document}

EDIT
To insert such coordinates in a large number of figures, the editing can be simplified. Instead of putting the graphics inside a tikzpicture
a Tikz-coordinate can be set just in front of it. Then the coordinates for the actual picture is of course lost, but you can still set a grid over in an appropriate size. Below is a complement to the example above, containing two figures and one extra tikzfigure
that sets the overlay
stuff. This last tikzpicture
can be put inside one of the figure environment or as here outside, the important is that all three are on the same page.
\begin{figure}[htb]
\centering
\tikz[remember picture,overlay] \coordinate (A3);
\includegraphics[width=0.4\linewidth]{example-image-a}
\caption{A third figure}
\label{fig:Third}
\end{figure}
\begin{figure}[htb]
\centering
\tikz[remember picture,overlay] \coordinate (A4);
\includegraphics[width=0.4\linewidth]{example-image-b}
\caption{A fourth figure}
\label{fig:Fourth}
\end{figure}
\begin{tikzpicture}[remember picture,overlay]
\begin{scope}[shift=(A4)]
\draw[thin,red] (0,0) grid +(6,5);
\end{scope}
\draw[fill=red] (A3) circle (2pt);
\draw[->,blue,thick] (A3) -- ($(A4)+(2,3)$);
\end{tikzpicture}

I need the figures to remain where they are
-- using a floating environment this can be a little bit tricky and in and addition, could lead to the connecting line running over text regions of your page