# How do I implement OpenCVLensDistortion in UnrealEngine in c++?

**URL:** <https://forums.unrealengine.com/t/how-do-i-implement-opencvlensdistortion-in-unrealengine-in-c/741700>\
**Category:** Rendering\
**Tags:** opencv, unreal-engine, api, Rendering, render-target, Plugins, CPP\
**Created:** [January 4, 2023, 5:26am UTC](https://forums.unrealengine.com/t/how-do-i-implement-opencvlensdistortion-in-unrealengine-in-c/741700 "2023-01-04T05:26:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alessia\_sox](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Alessia\_sox](https://forums.unrealengine.com/u/Alessia_sox)\
**Post date:** [January 4, 2023, 5:26am UTC](https://forums.unrealengine.com/t/how-do-i-implement-opencvlensdistortion-in-unrealengine-in-c/741700/1 "2023-01-04T05:26:53Z")

</div>

I want to write a script to implement the camera model with the distortion coefficients and it seems I could use the Open Cv Lens Distortion plugin. But I want it to be applied to the scenes I have in my simulation and I want to do it by scripting and not blueprint. Anyone knows how?
