With the arrival of version 3.0, OpenCV can now be interfaced from Python 3.5 making it possible for TouchDesigner to access the OpenCV functions as well.
Installing OpenCV 3 to use with TouchDesigner099
- install Python 3.5
- install numpy via pip from a command prompt
pip install numpy
- install OpenCV via pip from command prompt in the folder you downloaded OpenCV to
pip install opencv_python-3.1.0-cp35-cp35m-win_amd64.whl
- open TouchDesigner099
- go to Edit>Preferences and enter the path to your external Python installation under General>Python 64-bit Module Path. Something like
- restart TouchDesigner099
- open the Textport with Alt+t
- run following script:
TouchDesigner 64-Bit 099 Build 2016.1760 compile on Mon Oct 3 14:50:27 2016 Python 3.5.1+ (default, Apr 21 2016, 11:06:11) [MSC v.1900 64 bit (AMD64)] python >>> import cv2 python >>> image = cv2.imread(app.samplesFolder+'/Map/Trillium.jpg') python >>> print(image)
- if the output is an array of numbers and no errors, OpenCV is successfully installed.
There is a selection of introductory tutorials on the OpenCV website.
OpenCV License Agreement
TouchDesigner uses parts of OpenCV (the Blob Track TOP) under the following license.
Intel License Agreement.
Copyright (C) 2000, Intel Corporation, rights reserved. Third party copyrights are property of their respective owners.
Redistribution of OpenCV and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistribution's of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistribution's in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- The name of Intel Corporation may not be used to endorse or promote products derived from this software without specific prior written permission.
The OpenCV software is provided by the copyright holders and contributors "as is" and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the Intel Corporation or contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.