Assign AsImage (OpenCV) to a different thread

Hi guys! I have a 1920x1080 texture from which I would like to get some contour coordinates. I thought that AsImage + Contour are the right nodes for the task. However, the AsImage node is extremely heavy, thus I get a very low frame rate. Is there any solution, like assigning only this part of the patch to a different CPU core? Like with SetProcessAffinityMask - or is it only applicable to whole patches and not to individual nodes?
The AsImage section is a small part of a very large main patch - so “outsourcing” this node would already help a lot.
Any help is very much appreciated!
MESSIAEN Vitrail multiple rotate changed noise_2023.01.15-14.58.24

This is only possible in vvvv gamma, having more control over things like this, is one of the reasons why it was developed.

In beta, you can try to use two vvvv instances and distribute the work in that way and communicate locally over shared texture, memory, or network…

Ok, thanks. And two instances means two different patches? How can I share data between them?

Or is there maybe something similar to AsImage + Contour running on the GPU?

There Value Network Send, and Value Network Recive, you can use that. Multiple instances means you need to open two actual vvvv.exe instances, you can do it via flag /allowmultiple

Your best bet is to run stand-alone vvvv gamma with VL.OpenCV contour and send result via udp to beta

Thank you for your replies.
I made a kind of a workaround (without solving the actual problem though) by storing all the resulting Contour points in a spread and deactivating the OpenCV nodes because I get along without them working in real-time.
This is off-topic but maybe you can help: Is there a way to save this large value spread as an additional file (separately from the patch) and load this file to a buffer in order to acces the slices with GetSlice(Buffer)? Because the spread is really heavy I would like to avoid evaluating the whole spread. Thanks!

Well you have Writer (String) for that. And yes it’s possible. Not sure about GetSlice (Buffer) that would need more work i guess. I would recommend just store every buffer as separate file, read them all at once, and just use GetSlice (Value) with Bin Size specified

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.