The DH parameters comes from the common normal between two consecutive Z axes. Every time you're in doubt about the DH parameters, you can follow common guidelines between two consecutive axes.
In this case, $d_i$ is the distance along previous Z starting from the previous origin O to the intersection of the new X and previous Z axis, which is variable in the case of prismatic joints.
$r_i$ (or $a_i$) is the distance in current X starting from current origin O to the intersection between previous Z and current X.
$\theta_i$ is the angle in previous Z to align the previous X with the new X.
$\alpha_i$ is the angle in current X to align previous Z to current Z.
From the picture, starting with link 1:
$d$: The distance from previous O to the intersection of previous Z and current X is variable, so it's d1.
$a$: The distance in current X starting from current O to the intersection between previous Z and current X is 0.
$\theta$: The angle in previous Z to align previous X with the new X is 0.
$\alpha$: The angle in current X to align previous Z to current Z is -90 (right hand rule).
For link 2:
$d$: The distance from previous O to the intersection of previous Z and current X is variable, so it's d2.
$a$: The distance in current X starting from current O to the intersection between previous Z and current X is 0.
$\theta$: The angle in previous Z to align previous X with the new X is 90 (right hand rule).
$\alpha$: The angle in current X to align previous Z to current Z is -90 (right hand rule).
For link 3:
$d$: The distance from previous O to the intersection of previous Z and current X is variable, so it's d3.
$a$: The distance in current X starting from current O to the intersection between previous Z and current X is 0.
$\theta$: The angle in previous Z to align previous X with the new X is 0 (right hand rule).
$\alpha$: The angle in current X to align previous Z to current Z is 0 (right hand rule).
So the correct DH Table for this robot would be:
Link 1: $a=0$, $\alpha=-90$, $d=d1$, $\theta=0$
Link 2: $a=0$, $\alpha=-90$, $d=d2$, $\theta=90$
Link 3: $a=0$, $\alpha=0$, $d=d3$, $\theta=0$
You can see some guidelines here.
how did you find the picture?
...... i guess that i should have saidplease provide a link to the picture
...... the reason that i ask is that there may have been a link to an explanation regarding the calculation $\endgroup$