During the campaign, Colonel Riker was wounded at the Battle of Pine Mountain, Georgia, in late June, 1864. He was carried back from the front line by another soldier who was actually discovered, in 2372, to be a Q who eventually referred to himself as Quinn. They were photographed together shortly after this incident.
Without the actions of Quinn, there would have been no William T. Riker, which would have allowed the Borg to assimilate the Federation. (VOY: "Death Wish")
Although there was never a real Colonel Thaddius Riker, much less one who commanded a regiment that participated in the Battle of Pine Mountain, there was a 102nd New York Regiment that did fight in the Atlanta Campaign under Sherman in 1864. There was also a Colonel John Lafayette Riker, who was killed in 1862 at the Battle of Fair Oaks. John Riker's last words were, "We're surrounded, boys – give them the cold steel!"
The person in the photograph is actually Major L.R. Stegman of the 102nd New York Regiment, as can be seen on page 289 of F. Miller's The Photographic History of the Civil War, vol. 7 (1911). He was standing next to a Lieutenant Donner from Ohio, although an image of Gerrit Graham as Quinn was imposed over Donner. The photograph can be viewed here.
The US insignia for a colonel was a silver embroidery shaped like a stylized eagle, holding olive branches in one claw and arrows in the other, with the eagle's beak facing the side he held his arrows (the so-called "war eagle"). The colonel's insignia was displayed on two epaulet shoulder straps with colored backgrounds. While Thaddius Riker was not seen wearing his uniform insignia, as an infantry colonel, his eagle would have been on a field of medium blue.