I often use TikZ to draw paths above another picture, say a photograph. For this I use
\node[anchor=south west,inner sep=0] (image) at (0,0) {\includegraphics{somepicture.jpg}};
\begin{scope}[x={(image.south east)},y={(image.north west)}]
% draw your things here
\end{scope}
It creates a node called 'image' and with the scope command, the image's lower left corner gets coordinates (0,0) while the upper right corner is (1,1). So you can use coordinates relative to the image to place your nodes etc.
If you need to find coordinates of certain points you want to use in your picture, you can use
\draw[help lines, very thin, step=0.02] (0,0) grid (1,1);
\draw[help lines,thin,xstep=.1,ystep=.1] (0,0) grid (1,1);
\foreach \x in {0,1,...,9} { \node [anchor=north] at (\x/10,0) {0.\x}; }
\foreach \y in {0,1,...,9} { \node [anchor=east] at (0,\y/10) {0.\y}; }
this will draw a grid with coordinate labels on top of your image, which allows you to figure out the proper coordinates. When you are done, just remove the grid.
Here is an example with the grid:
\begin{tikzpicture}
\node[anchor=south west,inner sep=0] (image) at (0,0) {\includegraphics[width=5cm]{qOr3L.png}};
\begin{scope}[x={(image.south east)},y={(image.north west)}]
\draw[help lines, very thin, step=0.02] (0,0) grid (1,1);
\draw[help lines,thin,xstep=.1,ystep=.1] (0,0) grid (1,1);
\foreach \x in {0,1,...,9} { \node [anchor=north] at (\x/10,0) {0.\x}; }
\foreach \y in {0,1,...,9} { \node [anchor=east] at (0,\y/10) {0.\y}; }
\draw[<-] (0.45,0.4) -- (1.1,1.1) node[above] {marmot's crystal ball};
\end{scope}
\end{tikzpicture}
Produces:
I use these commands to put labels on different things in photographs.
node
(in which your image is contained) is centered at (0,0), which lines up with the bottom-left end of the line. To have the origin in the bottom left, try\node[anchor=south west,inner sep=0]
, per the top answer to this question: tex.stackexchange.com/questions/9559/…\begin{scope}[shift={(pic node.south west)},x=\linewidth/3500,y=...]
but the problem here is that the labels are also part of the graphics so that the trick won't work without manual adjustment that gets rid of the space occupied by the labels.\includegraphics[width=\linewidth]{...}
would make \resizebox redundant.tikzgraphicx
package (eigenheimstrasse.de/~ben/tikzgraphicx) could be helpful to determine suitable coordinated for your additions