At the suggestion of the original poster, I am summarizing an alternate answer that has a few strengths relative to my original answer.  It is related to the question and answer at [this MathOverflow Question](http://mathoverflow.net/questions/156983/injectivity-of-matrix-fingerprint/157174).  

For any matrix $A$, define
$$ L_A(i,j)=\log\left(\frac{A_{i,j}A_{i+1,j+1}}{A_{i+1,j}A_{i,j+1}} \right)$$

Let $S$ be the set of $n\times m$ matrices with fixed row and columns sums $p_i$ and $q_j$ and positive entries.
Let $Q:S\rightarrow R^{(n-1)\times (m-1)}$ be the map where the $(i,j)$-th entry of $Q(A)$ is $L_A(i,j)$.

Then $Q$ is a bijection between $S$ and $R^{(n-1)\times (m-1)}$.  Moreover, the inverse is efficiently computable.  Mpiktas wrote an [R package called retacoro](https://github.com/mpiktas/retacoro) that appears to recover the inverse through gradient descent.  Alternately, the inversion of this projection can be expressed as a [geometric program](https://en.wikipedia.org/wiki/Geometric_programming), and geometric programs can be solved in polynomial time (and efficiently in practice).

Establishing the bijectivity of $Q$ and defining the geometric program precisely seem a bit long for a MathOverflow post.  I'll post a more detailed description to ArXiv and put a link here when I'm done.