Yes, but confederate army officers did not wear their rank on shoulder patches. Rank insignia was worn on the collar and the cuffs. That is clearly a Union Army officer's uniform.
But, do you admit that some blacks fought for the South? That's the real issue. The photo in question is simply a distraction.