Hello,
can anyone give me (am beginner in vvv and joined some nodeforum workshops) help concerning aruco tracking? probably just a simple question, but not really simple for a beginner like me…
Depending on the different Aruco tags, I would like to display different images or videos over the entire area on the renderer / screen. I can display a picture (but not over the whole area). The marker ID is also recognized. But how do I display a different image/video with sound over the entire area depending on the (Aruco) ID?
this patch shows how you map the marker IDs to a spread of images and select always one image to draw over the camera image, when a marker is detected.
yes, in general we say: a spread consists of slices (its individual entries).
hm… the patch should actually work as is. the spread is created by the foreach loop. if your dir contains .jpgs you should see them when hovering the output splicer of the foreach loop:
hi, just checked again. unortunately it does not work…cannot see any files. but it seems that the id does not get until the spread thing (the number in [0] stays zero). the aruco meanwhile is detected by the cam and the marker detector node.
the only explanation i can assume here is that the directory does not contain any *.jpg files then. what does the output of the Dir node say? have you tried hitting the Refresh bang?
checked it again and it is working now. refresh and creating new jpg files helped.
Thanks a lot. Love vvvv and will play around more. and really clean vvvv gamma patch in comparison to the one(s) i used 2008 for the same task… (which are not working in vvvv gamma)
now trying to display videos instead of images. I guess the “Image Reader” and “Draw Image” node have to be replaced to display videos in a directory?
Is there some kind of “Video Reader” (instead of Image reader) or similar Node which can be used to access the files from the directory? And the Videoplayer Node is the one replacing the draw image node?
You just need to replace ImageReader with a VideoPlayer node, the DrawImage stays where it is. You will need to use a ToImage (OpenCV.Conversion) to be able to connect the output of VideoPlayer to DrawImage so add it inside the foreach right after the VideoPlayer.
Can the video be played from start instead of looping ?
There is probably no possibility to get the audio of the video audible with the draw image or renderer, right?
Attached the last patch which shows video but without playing from start and playing sound…1 Marker detection-video-JBx.vl (30.6 KB)
there is a videoplayer[Media Foundation] node within the vl.mediafoundation nuget.
seems that it is possible to set loop start time/loop end time and also volume there.
is this the right one for playing video sound and defining start/end time of displayed video?
unfortunately this node has an url as input and not a local directory.
if this is the right node can i define a directory instead of the url input ?
or is the direction of my thoughts wrong? (would be also a revelation ;) )
thank you.
it was not possible for me to connect the videoplayer[Media Foundation] node within the foreach.
but i integrated poligrafp´s simple directory player patch.
and: sound is playing and video start/loop time etc. can be edited.
it nearly works!
only thing is that there is still a frame of a video showing when new marker is detected.
any tip on how to “hide” this frame or where it comes from??
If i understand you correct, before showing video that belongs to marker it show last video in folder. It happens, because IndexOf when got 0 at input “item” it result output -1. -1 is the last file in folder. Then, when program detect’s a marker, it change output, but player start play the last file (because it had it on input earlier) and then start playing a correct file.
Small switch will help: 1-Marker-detection-video-starttime-sound (1).vl (22.5 KB)