The easiest way to generate such an automorphism is to build a ring automorphism on the quaternions in general, and restrict it to the quaternions with norm 1 under multiplication. Happily, this includes all the inner automorphisms, which are, in turn, isomorphic to the quaternions mod ±1. Let's look at an element s+ti+uj+vk conjugated by a+bi+cj+dk.
(a2+b2+c2+d2)s
{ (a2+b2-c2-d2)t + 2(-ad+bc)u + 2(ac+bd)v } i
{ 2(ad+bc)t + (a2-b2+c2-d2)u + 2(-ab+cd)v } j
{ 2(-ac+bd)t + 2(ab+cd)u + (a2-b2-c2+d2)v } k
The first component is simply s. It may seem surprising that the "real" component is fixed by every inner automorphism, but 1 is fixed by every group automorphism, and the integers 1 2 3 etc are fixed by every ring automorphism. An inner automorphism extends naturally to a ring automorphism, hence the first component remains fixed.
Do you recognize the 9 coefficients on t u and v cross i j and k? You should. It is the quadratic map from the quaternions into O3. Just replace a b c and d with s t u and v. Thus conjugation is accomplished by arranging the coefficients of i j and k as a column vector, and running this vector through an appropriate matrix in O′. The resulting column gives the new coefficients for i j and k. The inner automorphisms are isomorphic to O′. This isn't surprising, since they are isomorphic to the quaternions mod the center, which is in turn isomorphic to O′, but it's nice to see the relationship confirmed explicitly with algebraic formulas.
One can extend this result to all of O3. Paste the matrix X into a block matrix B, with 1 in the upper left, and conjugate the corresponding quaternion matrix in O4 by B, as described in the previous section. Again, the coefficients on i j and k are arranged in a column and run through X. The matrices in O′ implement the inner automorphisms, while the matrices in O-O′ implement outer automorphisms, which cannot be realized through conjugation within the unit quaternions themselves.
Only the identity matrix fixes i j and k, thus each induced automorphism is nontrivial. O3 induces a group of automorphisms on the quaternions, with O′ producing the inner automorphisms.
Is this group more than just O′? Suppose Y is in O-O′, and YO′/Y is the same automorphism as ZO′/Z, where Z is in O′. Multiply by Z inverse on the left and Z on the right, and Z inverse times Y induces the trivial automorphism on O′. Thus Z inverse times Y commutes with O′. The only matrix in O that commutes with O′ is 1. Thus Z inverse times Y is 1, and Y = Z. This is a contradiction, hence O induces both inner and outer automorphisms on O′, and on the quaternions from the right.
I believe O from the left and O from the right are in fact the same batch of automorphisms. We know the inner automorphisms, O′ from the left and O′ from the right, coincide. Let's confirm this algebraically. Start with a generic matrix X in O′ and run the coefficients of i j and k through X to build an automorphism. This is an inner automorphism, conjugating by a quaternion a+bi+cj+dk, which is the pullback of X. Use this quaternion to conjugate a generic quaternion s+ti+uj+vk, and push the product out to O′, using the same map. The conjugating quaternion a+bi+cj+dk becomes X, and its inverse becomes the inverse of X. The quaternion s+ti+uj+vk becomes a matrix in O′, the matrix that is conjugated by X. Thus X from the left induces the same automorphism as X from the right. (Remember, you must use the above abcd map from the quaternions onto O′, not the original map, for this to work out.)
I don't have a formal proof that extends this result to all of O, but I believe you can hit it over the head with algebra. Take a generic quaternion s+ti+uj+vk and run it through the above map to get a matrix in O′. Then take a generic matrix X in O and follow two paths. Run the coefficients of i j and k through X to get a new quaternion, then apply the map to push it forward into O′. Following the second path, conjugate the image of our original quaternion by X. The result should be the same. If you accept my intuitive argument, or if you have done all the confirmatory algebra, then we can say that O from the left equals O from the right.
Extending O to O± on the right doesn't add anything new. After all, conjugating by -1 leaves everything fixed. Extending O on the left doesn't help either, because it moves the quaternions to a new group within O4. Apply -1, for instance, and the top row switches from a+bi+cj+dk to a-bi-cj-dk. The matrix does not have the same format. So we can set O± aside.
I think these are all the automorphisms; though I'm not sure how to prove that.