obs-lua icon indicating copy to clipboard operation
obs-lua copied to clipboard

Fish-eye shader: distortion in only x or y direction?

Open ArcadeHall opened this issue 4 years ago • 2 comments

I have a question about the fish-eye shader: is it possible to add a barrel distortion which only works in x or y direction of the image? I have looked at the formulas in the fish-eye shader, but that's over my head. I have a webcam which has a fish-eye distortion which can be corrected by a negative power in the fish-eye shader. But still the image looks a bit like this: )==(. I only need some correction in the x direction, but not y, since the lines are straight vertically. Can you give me a formula for this perhaps?

ArcadeHall avatar Dec 06 '21 09:12 ArcadeHall

can you test if 4582bad5ae68b281abc3b6277c4e18e553b629f3 works for your use case?

exeldro avatar Dec 06 '21 11:12 exeldro

Yes, now I can correct the X and Y distortion seperately, thank you very much! Unfortunately now another distortion is visible: not a barrel distortion, but a cylindrical distortion. It looks a like reading a letter through a long drink glass laid down (horizontal, I hope it makes sense). Do you have a formula for cylindrical distortion (x and y separate if possible)?

ArcadeHall avatar Dec 06 '21 14:12 ArcadeHall