# How install emgu-cv 4.5.3 with git open source

**URL:** https://forum.opencv.org/t/how-install-emgu-cv-4-5-3-with-git-open-source/5695
**Category:** Uncategorized
**Tags:** build, emgu, csharp
**Created:** [October 18, 2021, 7:07am UTC](https://forum.opencv.org/t/how-install-emgu-cv-4-5-3-with-git-open-source/5695 "2021-10-18T07:07:10Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Mahdi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/mahdi/32/3459_2.png) [@Mahdi](https://forum.opencv.org/u/Mahdi)
#### Post date: [October 18, 2021, 7:07am UTC](https://forum.opencv.org/t/how-install-emgu-cv-4-5-3-with-git-open-source/5695/1 "2021-10-18T07:07:10Z")

</div>

EmguCV 4.5.3 — CMake 3.22 — Visual Studio 2019 16.8.3 — .NET5 — WPF

hi,! i download opencv source file from [[this link](https://github.com/opencv/opencv) ], and compile/build with CMake, It worked perfectly and no errors occurred.

but!, when i try do this work with opencv source file [[this link](https://github.com/emgucv/emgucv) ] i can use CMake, show error :

 ![1](https://us1.discourse-cdn.com/flex020/uploads/opencv/original/2X/0/00ef99e29bcb91736ef509684358fc50959c5b75.png)

i want use this class “Emgu.CV.XPhoto.TonemapDurand” but i cant, visual sutido say :

> OpenCV: This algorithm is patented and is excluded in this configuration; Set OPENCV\_ENABLE\_NONFREE CMake option and rebuild the library

That’s why I try to compile/build emgu-cv myself. [with CMake]

in emgu-cv website, this link  
[emgu-com/wiki/index.php/Download\_And\_Installation]  
, I proceeded according to the instructions, but nothing happens and an error occurs, I do not know if it is a mistake from me or …

before this i download emgu-cv from NuGet-Packages and work correctly [.NET5].

**note :** i cant send more link, site say :

> Sorry, new users can only put 2 links in a post.

---

<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: [October 18, 2021, 7:26am UTC](https://forum.opencv.org/t/how-install-emgu-cv-4-5-3-with-git-open-source/5695/2 "2021-10-18T07:26:32Z")

</div>

sorry, support for Emgu itself is a little out of scope for this forum. there _might_ be people who can help but don’t count on it. best to contact **the maintainers of Emgu**

---

<div class="post-metadata">

### Author: ![berak](https://avatars.discourse-cdn.com/v4/letter/b/85f322/32.png) [@berak](https://forum.opencv.org/u/berak)
#### Post date: [October 18, 2021, 7:41am UTC](https://forum.opencv.org/t/how-install-emgu-cv-4-5-3-with-git-open-source/5695/3 "2021-10-18T07:41:46Z")

</div>

again, we cannot help with emgu specifics, however:

> [@Mahdi](#):
>
> i want use this class “Emgu.CV.XPhoto.TonemapDurand”

- the xphoto module is in the [opencv\_contrib repo](https://github.com/opencv/opencv_contrib/blob/master/README.md) so you need to build with that

- use the search bar in cmake-gui to locate the `OPENCV_ENABLE_NONFREE` option, and enable it
