# Translate python code to c#/c++

**URL:** <https://forum.opencv.org/t/translate-python-code-to-c-c/10126>\
**Category:** Uncategorized\
**Tags:** core, csharp, programming\
**Created:** [September 9, 2022, 7:09am UTC](https://forum.opencv.org/t/translate-python-code-to-c-c/10126 "2022-09-09T07:09:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![andife](https://avatars.discourse-cdn.com/v4/letter/a/85e7bf/32.png) [@andife](https://forum.opencv.org/u/andife)\
**Post date:** [September 9, 2022, 7:09am UTC](https://forum.opencv.org/t/translate-python-code-to-c-c/10126/1 "2022-09-09T07:09:15Z")

</div>

Hello,

I wonder if there is an easy to translate the following python code to c# without looping over all indices?

normPic = Pic - min(Pic(:));  
normPic = normPic ./ max(normPic(:));  
imagesc(normPic.^(1/4))  
colormap jet

---

<div class="post-metadata">

**Author:** ![crackwitz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/crackwitz/32/14_2.png) [@crackwitz](https://forum.opencv.org/u/crackwitz)\
**Post date:** [September 9, 2022, 9:44am UTC](https://forum.opencv.org/t/translate-python-code-to-c-c/10126/2 "2022-09-09T09:44:22Z")

</div>

that’s not python code. that might be matlab

and what _specific_ issue do you have in understanding that code or translating it to C++ or C# (pick one, they aren’t equivalent)
