<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.nixos.org/w/index.php?action=history&amp;feed=atom&amp;title=OpenCV</id>
	<title>OpenCV - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.nixos.org/w/index.php?action=history&amp;feed=atom&amp;title=OpenCV"/>
	<link rel="alternate" type="text/html" href="https://wiki.nixos.org/w/index.php?title=OpenCV&amp;action=history"/>
	<updated>2026-04-06T15:26:28Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.0</generator>
	<entry>
		<id>https://wiki.nixos.org/w/index.php?title=OpenCV&amp;diff=21017&amp;oldid=prev</id>
		<title>Mmkaram: minor grammatical errors</title>
		<link rel="alternate" type="text/html" href="https://wiki.nixos.org/w/index.php?title=OpenCV&amp;diff=21017&amp;oldid=prev"/>
		<updated>2025-03-20T21:56:37Z</updated>

		<summary type="html">&lt;p&gt;minor grammatical errors&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 21:56, 20 March 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[https://opencv.org/ OpenCV] is the world&#039;s largest and most popular computer vision library &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;in the world&lt;/del&gt;&amp;lt;ref name=&quot;:0&quot;&amp;gt;https://opencv.org/&amp;lt;/ref&amp;gt;. It is open source under the [[wikipedia:Apache_License|Apache License]] 2&amp;lt;ref&amp;gt;https://github.com/opencv/opencv?tab=Apache-2.0-1-ov-file#&amp;lt;/ref&amp;gt;. OpenCV interfaces with many languages such as C++, Python and Java&amp;lt;ref name=&quot;:0&quot; /&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[https://opencv.org/ OpenCV] is the world&#039;s largest and most popular computer vision library&amp;lt;ref name=&quot;:0&quot;&amp;gt;https://opencv.org/&amp;lt;/ref&amp;gt;. It is open source under the [[wikipedia:Apache_License|Apache License]] 2&amp;lt;ref&amp;gt;https://github.com/opencv/opencv?tab=Apache-2.0-1-ov-file#&amp;lt;/ref&amp;gt;. OpenCV interfaces with many languages such as C++, Python and Java&amp;lt;ref name=&quot;:0&quot; /&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Due to needing dynamically linked libraries and not having all necessary dependencies &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;being &lt;/del&gt;packaged with the base version of the package for all uses, this page was created to help with the initial hassle of getting OpenCV to run in development environments.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Due to needing dynamically linked libraries and not having all necessary dependencies packaged with the base version of the &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;OpenCV &lt;/ins&gt;package for all uses, this page was created to help with the initial hassle of getting OpenCV to run in development environments.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Python ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Python ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l127&quot;&gt;Line 127:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 127:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;It is important to note that the most popular OpenCV package for rust, [https://github.com/twistedfall/opencv-rust opencv-rust], is just a series of bindings for the C++ version of OpenCV, and is thereby unsafe. Errors that occur while trying to use these bindings may just fail quietly or return an error from the underlying C++ code. There is an effort to implement most of the main computer vision algorithms entirely in rust called [https://github.com/rust-cv/cv rust-cv]. The package has not been actively maintained since July of 2023.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;It is important to note that the most popular OpenCV package for rust, [https://github.com/twistedfall/opencv-rust opencv-rust], is just a series of bindings for the C++ version of OpenCV, and is thereby unsafe. Errors that occur while trying to use these bindings may just fail quietly or return an error from the underlying C++ code. There is an effort to implement most of the main computer vision algorithms entirely in rust called [https://github.com/rust-cv/cv rust-cv]. The package has not been actively maintained since July of 2023.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The opencv-rust package does not include the C++ bindings, thereby requiring it to be installed alongside the package itself. Luckily, it is packaged in nixpkgs and using it is just a question of getting on our system, the crate does the rest of the work.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The opencv-rust package does not include the C++ bindings, thereby requiring it to be installed alongside the package itself. Luckily, it is packaged in nixpkgs and using it is just a question of getting &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;it &lt;/ins&gt;on our system, the crate does the rest of the work.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Flake.nix Example ===&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Flake.nix Example ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key mediawiki:diff:1.41:old-20967:rev-21017:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Mmkaram</name></author>
	</entry>
	<entry>
		<id>https://wiki.nixos.org/w/index.php?title=OpenCV&amp;diff=20967&amp;oldid=prev</id>
		<title>Klinger: Category:Python Category:Rust added (page has specific information about these languages)</title>
		<link rel="alternate" type="text/html" href="https://wiki.nixos.org/w/index.php?title=OpenCV&amp;diff=20967&amp;oldid=prev"/>
		<updated>2025-03-20T14:21:26Z</updated>

		<summary type="html">&lt;p&gt;&lt;a href=&quot;/wiki/Category:Python&quot; title=&quot;Category:Python&quot;&gt;Category:Python&lt;/a&gt; &lt;a href=&quot;/wiki/Category:Rust&quot; title=&quot;Category:Rust&quot;&gt;Category:Rust&lt;/a&gt; added (page has specific information about these languages)&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 14:21, 20 March 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l192&quot;&gt;Line 192:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 192:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Python]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Rust]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Klinger</name></author>
	</entry>
	<entry>
		<id>https://wiki.nixos.org/w/index.php?title=OpenCV&amp;diff=20898&amp;oldid=prev</id>
		<title>Mmkaram: Better references</title>
		<link rel="alternate" type="text/html" href="https://wiki.nixos.org/w/index.php?title=OpenCV&amp;diff=20898&amp;oldid=prev"/>
		<updated>2025-03-14T23:31:31Z</updated>

		<summary type="html">&lt;p&gt;Better references&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 23:31, 14 March 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[https://opencv.org/ OpenCV] is the world&#039;s largest and most popular computer vision library&amp;lt;ref name=&quot;:0&quot;&amp;gt;https://opencv.org/&amp;lt;/ref&amp;gt; &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;in the world. It was originally developed by [https://www.intel.com/content/www/us/en/homepage.html Intel] in 2000&lt;/del&gt;. It is open source under the [[wikipedia:Apache_License|Apache License]] 2. OpenCV interfaces with many languages such as C++, Python and Java&amp;lt;ref name=&quot;:0&quot; /&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[https://opencv.org/ OpenCV] is the world&#039;s largest and most popular computer vision library &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;in the world&lt;/ins&gt;&amp;lt;ref name=&quot;:0&quot;&amp;gt;https://opencv.org/&amp;lt;/ref&amp;gt;. It is open source under the [[wikipedia:Apache_License|Apache License]] 2&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;ref&amp;gt;https://github.com/opencv/opencv?tab=Apache-2.0-1-ov-file#&amp;lt;/ref&amp;gt;&lt;/ins&gt;. OpenCV interfaces with many languages such as C++, Python and Java&amp;lt;ref name=&quot;:0&quot; /&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Due to needing dynamically linked libraries and not having all necessary dependencies being packaged with the base version of the package for all uses, this page was created to help with the initial hassle of getting OpenCV to run in development environments.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Due to needing dynamically linked libraries and not having all necessary dependencies being packaged with the base version of the package for all uses, this page was created to help with the initial hassle of getting OpenCV to run in development environments.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Mmkaram</name></author>
	</entry>
	<entry>
		<id>https://wiki.nixos.org/w/index.php?title=OpenCV&amp;diff=20897&amp;oldid=prev</id>
		<title>Mmkaram: Fixed grammar and improved flow</title>
		<link rel="alternate" type="text/html" href="https://wiki.nixos.org/w/index.php?title=OpenCV&amp;diff=20897&amp;oldid=prev"/>
		<updated>2025-03-14T23:27:36Z</updated>

		<summary type="html">&lt;p&gt;Fixed grammar and improved flow&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 23:27, 14 March 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[https://opencv.org/ OpenCV] is the world&#039;s largest and most popular computer vision library&amp;lt;ref name=&quot;:0&quot;&amp;gt;https://opencv.org/&amp;lt;/ref&amp;gt;. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Originally &lt;/del&gt;developed by [https://www.intel.com/content/www/us/en/homepage.html Intel] in 2000&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;, it &lt;/del&gt;is open source under the [[wikipedia:Apache_License|Apache License]] 2. OpenCV interfaces with many languages such as C++, Python and Java&amp;lt;ref name=&quot;:0&quot; /&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[https://opencv.org/ OpenCV] is the world&#039;s largest and most popular computer vision library&amp;lt;ref name=&quot;:0&quot;&amp;gt;https://opencv.org/&amp;lt;/ref&amp;gt; &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;in the world&lt;/ins&gt;. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;It was originally &lt;/ins&gt;developed by [https://www.intel.com/content/www/us/en/homepage.html Intel] in 2000&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;. It &lt;/ins&gt;is open source under the [[wikipedia:Apache_License|Apache License]] 2. OpenCV interfaces with many languages such as C++, Python and Java&amp;lt;ref name=&quot;:0&quot; /&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Due to dynamically linked libraries and not all necessary dependencies being packaged with the base version of the package for all uses, this page was created to help with the initial hassle of getting OpenCV to run in development environments.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Due to &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;needing &lt;/ins&gt;dynamically linked libraries and not &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;having &lt;/ins&gt;all necessary dependencies being packaged with the base version of the package for all uses, this page was created to help with the initial hassle of getting OpenCV to run in development environments.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Python ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Python ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;To use OpenCV with Python it is generally recommended to use the Python3XXPackage package found in [[nixpkgs]]. Although, as OpenCV is written mainly in C++&amp;lt;ref&amp;gt;https://github.com/opencv/opencv&amp;lt;/ref&amp;gt;, it relies heavily on stdlibc which is &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;generally &lt;/del&gt;a dynamically linked library. Attempting to run any OpenCV algorithms in Python may thereby lead to errors such as this:&amp;lt;syntaxhighlight lang=&quot;bash&quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;To use OpenCV with Python it is generally recommended to use the Python3XXPackage package found in [[nixpkgs]]. Although, as OpenCV is written mainly in C++&amp;lt;ref&amp;gt;https://github.com/opencv/opencv&amp;lt;/ref&amp;gt;, it relies heavily on stdlibc which is &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; &lt;/ins&gt;a dynamically linked library. Attempting to run any OpenCV algorithms in Python may thereby lead to errors such as this:&amp;lt;syntaxhighlight lang=&quot;bash&quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;ImportError: libstdc++.so.6: cannot open shared object file: No such file or directory&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;ImportError: libstdc++.so.6: cannot open shared object file: No such file or directory&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;There are two main ways of solving this issue, using a shell.nix or flakes.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;There are two main ways of solving this issue, using a shell.nix or flakes.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l66&quot;&gt;Line 66:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 66:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;Both the dev shell and flake examples only allow for the base compilation of OpenCV&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;, there are options you may want to &lt;/del&gt;enable &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;like &lt;/del&gt;gtk support to use functions like cv2.imshow()&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;. To enable said flags/features, you must use &lt;/del&gt;[https://nixos.org/guides/nix-pills/17-nixpkgs-overriding-packages.html overrides]. Beware, this may cause a full recompilation of OpenCV &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;because &lt;/del&gt;you&#039;re changing build flags and that specific combination may not be cached for your system.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;Both the dev shell and flake examples only allow for the base compilation of OpenCV&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;. You can &lt;/ins&gt;enable &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;other flags such as &lt;/ins&gt;gtk support to use functions like cv2.imshow() &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;by using &lt;/ins&gt;[https://nixos.org/guides/nix-pills/17-nixpkgs-overriding-packages.html overrides]. Beware, this may cause a full recompilation of OpenCV &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;as &lt;/ins&gt;you&#039;re changing build flags and that specific combination may not be cached for your system.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Shell.nix Override Example ===&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Shell.nix Override Example ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l127&quot;&gt;Line 127:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 127:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;It is important to note that the most popular OpenCV package for rust, [https://github.com/twistedfall/opencv-rust opencv-rust], is just a series of bindings for the C++ version of OpenCV, and is thereby unsafe. Errors that occur while trying to use these bindings may just fail quietly or return an error from the underlying C++ code. There is an effort to implement most of the main computer vision algorithms entirely in rust called [https://github.com/rust-cv/cv rust-cv]. The package has not been actively maintained since July of 2023.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;It is important to note that the most popular OpenCV package for rust, [https://github.com/twistedfall/opencv-rust opencv-rust], is just a series of bindings for the C++ version of OpenCV, and is thereby unsafe. Errors that occur while trying to use these bindings may just fail quietly or return an error from the underlying C++ code. There is an effort to implement most of the main computer vision algorithms entirely in rust called [https://github.com/rust-cv/cv rust-cv]. The package has not been actively maintained since July of 2023.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The opencv-rust package does not include the C++ bindings, thereby requiring it to be installed alongside the package itself. Luckily, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;opencv &lt;/del&gt;is packaged in nixpkgs and using it is just a question of getting on our system, the crate does the rest of the work.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The opencv-rust package does not include the C++ bindings, thereby requiring it to be installed alongside the package itself. Luckily, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;it &lt;/ins&gt;is packaged in nixpkgs and using it is just a question of getting on our system, the crate does the rest of the work.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Flake.nix Example ===&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Flake.nix Example ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Mmkaram</name></author>
	</entry>
	<entry>
		<id>https://wiki.nixos.org/w/index.php?title=OpenCV&amp;diff=20896&amp;oldid=prev</id>
		<title>Mmkaram: Added more context to the intro and rust sections</title>
		<link rel="alternate" type="text/html" href="https://wiki.nixos.org/w/index.php?title=OpenCV&amp;diff=20896&amp;oldid=prev"/>
		<updated>2025-03-14T23:23:35Z</updated>

		<summary type="html">&lt;p&gt;Added more context to the intro and rust sections&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 23:23, 14 March 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[https://opencv.org/ OpenCV] is the world&#039;s largest and most popular computer vision library&amp;lt;ref&amp;gt;https://opencv.org/&amp;lt;/ref&amp;gt;. Originally developed by [https://www.intel.com/content/www/us/en/homepage.html Intel] in 2000, it is open source under the [[wikipedia:Apache_License|Apache License]] 2. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;The purpose &lt;/del&gt;of this page &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;is &lt;/del&gt;to help with the initial hassle of getting OpenCV to run in development environments.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[https://opencv.org/ OpenCV] is the world&#039;s largest and most popular computer vision library&amp;lt;ref &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;name=&quot;:0&quot;&lt;/ins&gt;&amp;gt;https://opencv.org/&amp;lt;/ref&amp;gt;. Originally developed by [https://www.intel.com/content/www/us/en/homepage.html Intel] in 2000, it is open source under the [[wikipedia:Apache_License|Apache License]] 2. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;OpenCV interfaces with many languages such as C++, Python and Java&amp;lt;ref name=&quot;:0&quot; /&amp;gt;.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Due to dynamically linked libraries and not all necessary dependencies being packaged with the base version &lt;/ins&gt;of &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;the package for all uses, &lt;/ins&gt;this page &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;was created &lt;/ins&gt;to help with the initial hassle of getting OpenCV to run in development environments.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Python ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Python ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l124&quot;&gt;Line 124:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 126:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Rust ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Rust ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;It is important to note that the most popular OpenCV package for rust, [https://github.com/twistedfall/opencv-rust opencv-rust], is just a series of bindings for the C++ version of OpenCV, and is thereby unsafe. Errors that occur while trying to use these bindings may just fail quietly or return an error from the underlying C++ code. There is an effort to implement most of the main computer vision algorithms entirely in rust called [https://github.com/rust-cv/cv rust-cv]. The package has not been actively maintained since July of 2023.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;It is important to note that the most popular OpenCV package for rust, [https://github.com/twistedfall/opencv-rust opencv-rust], is just a series of bindings for the C++ version of OpenCV, and is thereby unsafe. Errors that occur while trying to use these bindings may just fail quietly or return an error from the underlying C++ code. There is an effort to implement most of the main computer vision algorithms entirely in rust called [https://github.com/rust-cv/cv rust-cv]. The package has not been actively maintained since July of 2023.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;The opencv-rust package does not include the C++ bindings, thereby requiring it to be installed alongside the package itself. Luckily, opencv is packaged in nixpkgs and using it is just a question of getting on our system, the crate does the rest of the work.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Flake.nix Example ===&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Flake.nix Example ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key mediawiki:diff:1.41:old-20894:rev-20896:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Mmkaram</name></author>
	</entry>
	<entry>
		<id>https://wiki.nixos.org/w/index.php?title=OpenCV&amp;diff=20894&amp;oldid=prev</id>
		<title>Mmkaram: Added OpenCV page</title>
		<link rel="alternate" type="text/html" href="https://wiki.nixos.org/w/index.php?title=OpenCV&amp;diff=20894&amp;oldid=prev"/>
		<updated>2025-03-14T23:14:39Z</updated>

		<summary type="html">&lt;p&gt;Added OpenCV page&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[https://opencv.org/ OpenCV] is the world&amp;#039;s largest and most popular computer vision library&amp;lt;ref&amp;gt;https://opencv.org/&amp;lt;/ref&amp;gt;. Originally developed by [https://www.intel.com/content/www/us/en/homepage.html Intel] in 2000, it is open source under the [[wikipedia:Apache_License|Apache License]] 2. The purpose of this page is to help with the initial hassle of getting OpenCV to run in development environments.&lt;br /&gt;
&lt;br /&gt;
== Python ==&lt;br /&gt;
To use OpenCV with Python it is generally recommended to use the Python3XXPackage package found in [[nixpkgs]]. Although, as OpenCV is written mainly in C++&amp;lt;ref&amp;gt;https://github.com/opencv/opencv&amp;lt;/ref&amp;gt;, it relies heavily on stdlibc which is generally a dynamically linked library. Attempting to run any OpenCV algorithms in Python may thereby lead to errors such as this:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ImportError: libstdc++.so.6: cannot open shared object file: No such file or directory&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;There are two main ways of solving this issue, using a shell.nix or flakes.&lt;br /&gt;
&lt;br /&gt;
=== Shell.nix Example ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nix&amp;quot;&amp;gt;&lt;br /&gt;
{ pkgs ? import &amp;lt;nixpkgs&amp;gt; {} }:&lt;br /&gt;
&lt;br /&gt;
let&lt;br /&gt;
  pythonWithOpencv = pkgs.python3.withPackages (ps: [&lt;br /&gt;
    ps.opencv4&lt;br /&gt;
  ]);&lt;br /&gt;
in&lt;br /&gt;
pkgs.mkShell {&lt;br /&gt;
  buildInputs = [&lt;br /&gt;
    pythonWithOpencv&lt;br /&gt;
    pkgs.pkg-config&lt;br /&gt;
    pkgs.stdenv.cc.cc.lib&lt;br /&gt;
  ];&lt;br /&gt;
&lt;br /&gt;
  shellHook = &amp;#039;&amp;#039;&lt;br /&gt;
    export LD_LIBRARY_PATH=${pkgs.stdenv.cc.cc.lib}/lib:$LD_LIBRARY_PATH&lt;br /&gt;
    echo &amp;quot;Python with OpenCV ready (cv2 version: $(python -c &amp;#039;import cv2; print(cv2.__version__)&amp;#039;))&amp;quot;&lt;br /&gt;
  &amp;#039;&amp;#039;;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Flake.nix Example ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nix&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  description = &amp;quot;Python development environment with OpenCV&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
  inputs = {&lt;br /&gt;
    nixpkgs.url = &amp;quot;github:NixOS/nixpkgs/nixos-unstable&amp;quot;;&lt;br /&gt;
    flake-utils.url = &amp;quot;github:numtide/flake-utils&amp;quot;;&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
  outputs = { self, nixpkgs, flake-utils, ... }:&lt;br /&gt;
    flake-utils.lib.eachDefaultSystem (system:&lt;br /&gt;
      let&lt;br /&gt;
        pkgs = import nixpkgs { inherit system; };&lt;br /&gt;
        python-with-opencv = pkgs.python3.withPackages (ps: [&lt;br /&gt;
          ps.opencv4&lt;br /&gt;
        ]);&lt;br /&gt;
      in {&lt;br /&gt;
        devShell = pkgs.mkShell {&lt;br /&gt;
          buildInputs = [&lt;br /&gt;
            python-with-opencv&lt;br /&gt;
            pkgs.pkg-config&lt;br /&gt;
            pkgs.stdenv.cc.cc.lib&lt;br /&gt;
          ];&lt;br /&gt;
&lt;br /&gt;
          shellHook = &amp;#039;&amp;#039;&lt;br /&gt;
            export LD_LIBRARY_PATH=${pkgs.stdenv.cc.cc.lib}/lib:$LD_LIBRARY_PATH&lt;br /&gt;
            echo &amp;quot;Python environment ready with OpenCV $(python -c &amp;#039;import cv2; print(cv2.__version__)&amp;#039;)&amp;quot;&lt;br /&gt;
          &amp;#039;&amp;#039;;&lt;br /&gt;
        };&lt;br /&gt;
      }&lt;br /&gt;
    );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Both the dev shell and flake examples only allow for the base compilation of OpenCV, there are options you may want to enable like gtk support to use functions like cv2.imshow(). To enable said flags/features, you must use [https://nixos.org/guides/nix-pills/17-nixpkgs-overriding-packages.html overrides]. Beware, this may cause a full recompilation of OpenCV because you&amp;#039;re changing build flags and that specific combination may not be cached for your system.&lt;br /&gt;
&lt;br /&gt;
=== Shell.nix Override Example ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nix&amp;quot;&amp;gt;&lt;br /&gt;
{ pkgs ? import &amp;lt;nixpkgs&amp;gt; {&lt;br /&gt;
    overlays = [&lt;br /&gt;
      (self: super: {&lt;br /&gt;
        opencv4 = super.opencv4.override {&lt;br /&gt;
          enableGtk3 = true;&lt;br /&gt;
          enablePython = true;&lt;br /&gt;
        };&lt;br /&gt;
      })&lt;br /&gt;
    ];&lt;br /&gt;
  }&lt;br /&gt;
}:&lt;br /&gt;
&lt;br /&gt;
pkgs.mkShell {&lt;br /&gt;
  buildInputs = [&lt;br /&gt;
    (pkgs.python3.withPackages (ps: [ pkgs.opencv4 ]))&lt;br /&gt;
    pkgs.stdenv.cc.cc.lib&lt;br /&gt;
  ];&lt;br /&gt;
  LD_LIBRARY_PATH = &amp;quot;${pkgs.stdenv.cc.cc.lib}/lib&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Flake.nix Override Example ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nix&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  inputs.nixpkgs.url = &amp;quot;github:NixOS/nixpkgs/nixos-unstable&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
  outputs = { self, nixpkgs }:&lt;br /&gt;
    let&lt;br /&gt;
      system = &amp;quot;x86_64-linux&amp;quot;;&lt;br /&gt;
      pkgs = import nixpkgs {&lt;br /&gt;
        inherit system;&lt;br /&gt;
        overlays = [&lt;br /&gt;
          (final: prev: {&lt;br /&gt;
            opencv4 = prev.opencv4.override {&lt;br /&gt;
              enableGtk3 = true;&lt;br /&gt;
              enablePython = true;&lt;br /&gt;
            };&lt;br /&gt;
          })&lt;br /&gt;
        ];&lt;br /&gt;
      };&lt;br /&gt;
    in {&lt;br /&gt;
      devShells.${system}.default = pkgs.mkShell {&lt;br /&gt;
        buildInputs = [&lt;br /&gt;
          (pkgs.python3.withPackages (ps: [ pkgs.opencv4 ]))&lt;br /&gt;
          pkgs.stdenv.cc.cc.lib&lt;br /&gt;
        ];&lt;br /&gt;
        LD_LIBRARY_PATH = &amp;quot;${pkgs.stdenv.cc.cc.lib}/lib&amp;quot;;&lt;br /&gt;
      };&lt;br /&gt;
    };&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Rust ==&lt;br /&gt;
It is important to note that the most popular OpenCV package for rust, [https://github.com/twistedfall/opencv-rust opencv-rust], is just a series of bindings for the C++ version of OpenCV, and is thereby unsafe. Errors that occur while trying to use these bindings may just fail quietly or return an error from the underlying C++ code. There is an effort to implement most of the main computer vision algorithms entirely in rust called [https://github.com/rust-cv/cv rust-cv]. The package has not been actively maintained since July of 2023.&lt;br /&gt;
&lt;br /&gt;
=== Flake.nix Example ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nix&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  inputs = {&lt;br /&gt;
    nixpkgs.url = &amp;quot;github:NixOS/nixpkgs/nixos-unstable&amp;quot;;&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
  outputs = { self, nixpkgs }:&lt;br /&gt;
    let&lt;br /&gt;
      system = &amp;quot;x86_64-linux&amp;quot;;&lt;br /&gt;
      pkgs = import nixpkgs {&lt;br /&gt;
        inherit system;&lt;br /&gt;
      };&lt;br /&gt;
    in&lt;br /&gt;
    {&lt;br /&gt;
      devShells.${system}.default = pkgs.mkShell {&lt;br /&gt;
        buildInputs = with pkgs; [&lt;br /&gt;
          glib&lt;br /&gt;
          ffmpeg&lt;br /&gt;
          libva&lt;br /&gt;
          pkg-config&lt;br /&gt;
          opencv&lt;br /&gt;
        ];&lt;br /&gt;
        shellHook = &amp;#039;&amp;#039;&lt;br /&gt;
          export LIBCLANG_PATH=&amp;quot;${pkgs.llvmPackages.libclang.lib}/lib&amp;quot;;&lt;br /&gt;
        &amp;#039;&amp;#039;;&lt;br /&gt;
      };&lt;br /&gt;
    };&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You may also want to override the base package. You can do this easily with this example:&lt;br /&gt;
&lt;br /&gt;
=== Flake.nix Override Example ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nixos&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  inputs = {&lt;br /&gt;
    nixpkgs.url = &amp;quot;github:NixOS/nixpkgs/nixos-unstable&amp;quot;;&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
  outputs = { self, nixpkgs }:&lt;br /&gt;
    let&lt;br /&gt;
      system = &amp;quot;x86_64-linux&amp;quot;;&lt;br /&gt;
      pkgs = import nixpkgs {&lt;br /&gt;
        inherit system;&lt;br /&gt;
        config.allowUnfree = true;&lt;br /&gt;
      };&lt;br /&gt;
    in&lt;br /&gt;
    {&lt;br /&gt;
      devShells.${system}.default = pkgs.mkShell {&lt;br /&gt;
        buildInputs = with pkgs; [&lt;br /&gt;
          gtk2&lt;br /&gt;
          glib&lt;br /&gt;
          ffmpeg&lt;br /&gt;
          libva&lt;br /&gt;
          pkg-config&lt;br /&gt;
          (opencv.override { enableGtk2 = true; })&lt;br /&gt;
        ];&lt;br /&gt;
        shellHook = &amp;#039;&amp;#039;&lt;br /&gt;
          export LIBCLANG_PATH=&amp;quot;${pkgs.llvmPackages.libclang.lib}/lib&amp;quot;;&lt;br /&gt;
        &amp;#039;&amp;#039;;&lt;br /&gt;
      };&lt;br /&gt;
    };&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mmkaram</name></author>
	</entry>
</feed>