OpenCV Camera Calibration

Hey TD folks,

I’ve built a first version of a C++ DAT for camera calibration with a checkerboard pattern based on OpenCV:

I built it mainly because I wanted to digg into C++ development with Touchdesigner and needed to undistort a GoPro camera that I’m using through a Blackmagic capture card. You take a couple of images with a checkerboard and use a Folder DAT to get the list of images to the calibration process. After the calibration it undistorts an input TOP accordingly. There’s still some stuff I wanted to improve but I’m quite happy with this first version :slightly_smiling_face:

Does anyone has experience using threads from C++ plugins within Touchdesigner? It would be nice if the calibration process could run async and not block the TD main thread. I’ve tried to achive this with std::async but still TD is blocking when the calibration is running, could be due to shared data/objects within the CPlusPlusDAT :thinking:

Cheers from Germany


Hi Guido,
Thanks for the new asset! We are trying to get all assets uploaded now to the COMMUNITY ASSETS section of the website, as this category was imported from the old forum but going forward we’d like all assets in that one place. Any chance you can upload it there? Just go to MY ACCOUNT and click ‘Create Asset Post’.

Perhaps this category should be locked for new topics to encourage this, sorry for the confusion.

1 Like

Hey ben,

ah I’ve seen that already but wasn’t sure if I should put my post up there, thanks for the clarification! :v:

1 Like

Thanks for posting this, great to see more and more Custom OPs being created!
One note about the GPL, you need to modify the license otherwise people aren’t allowed to use your code with TouchDesigner:

1 Like

Ah thanks for pointing that out, I’ve changed the license to MIT :call_me_hand: