AprilTools icon indicating copy to clipboard operation
AprilTools copied to clipboard

Multiple tags tracking

Open Dandrass opened this issue 4 years ago • 20 comments

I tried to track multiple tags, but the camera just switch from one tag to another. Will it be implemented one day ?

Thanks for this project tho ! Working great when there's only one tracker in the scene

(also coming from CGMatter's video, otherwise I'ld not have known about it haha)

Dandrass avatar Sep 29 '19 18:09 Dandrass

Hello! I like your profile pic! Yes, I am planning to do this in the next release. First, I will only support multiple tags with one object per tag. Then, I want to make an update in which you will be able to assign multiple tags to a single object. I have many ideas for improvements already, but for now I just wanted to get something out there quickly! Thank you for your interest!

thegoodhen avatar Sep 29 '19 19:09 thegoodhen

Hi! I want to compliment you for this incredible tool! it's amazing and super precise! how BlueStreamBrony pointed out the possibility to use more than one tag is the next big step to make this tool even cooler. I have a few questions about this argument tho. in the scenario in which I would like to use, let's say 2 tags, do they need to be on the same plane? what if I want to use one as my origin point and to be planar to the ground and use the other as a reference fo a wall. would it be possible?

I also see that this topic is open since 29 Sep. Would we be able to see an update any time soon? not to hurry you, I'm just really excited to use this tool at the full potential :)

grandhello avatar Nov 01 '19 14:11 grandhello

Also, it would be GREAT to be able to use one tracker as an origin point and the second to track the movable object (tracking object movement AND camera movement). However, I think that that is already possible... With pre-masking both tracks and creating separate clips with a marker visible only in one of those and then, after importing both animations, some weird parenting... But , still,iIt would be great to do that in 2 clicks

rizerphe avatar Nov 02 '19 12:11 rizerphe

Hey there! I haven't abandoned the project. :D Sorry Thank you for your kind words... I will work on it, hopefully soon. My time has been extremely limited, as I study while working as a consultant/electrician/carpenter/hardware guy/product designer for a local escape-game startup company, teaching at school, freelancing for National Museum, learning archery, learning to act in theater and other things. I really, really want to get back into it. I found a library that handles different kinds of tags (not just AprilTags) called ArUco. I think using it is the way to go, since it has a built-in support for tracking multiple tags. I would just need to write routines for determining their relative positions automatically. I need to test it in depth to make sure the positional accuracy is okay. Using this library would also allow me to compile the whole thing differently (the current library I am using need to compile under cygwin since it works only under Linux natively), allowing me to do stuff such as grabbing the frames directly from a video and more.

I should be changing the way I work at my job within one or two weeks when the escape game had been finished, which hopefully should give me more time. Since my workload now usually crosses 60 hours per week, I don't have much energy left, which shall change and then I'll continue happily!

thegoodhen avatar Nov 03 '19 23:11 thegoodhen

Thanks for your great work!

As an addition to the request of tracking multiple tags, it would be very helpful if it would be possible to assign roles to multiple (stationary) tags, e.g. "floor", "wall", "ceiling" etc. to get the orientation right. Because the tags include a dimensional component, it would make it extremely easy to get the basic setup of any room or area in Blender.

sgofferj avatar Nov 07 '19 07:11 sgofferj

Just parent the camera to the marker and rotate/move the marker - no need for updates! But auto-parenting will still simplify everything a little bit.

rizerphe avatar Nov 08 '19 04:11 rizerphe

Hey there! I haven't abandoned the project. :D Sorry Thank you for your kind words... I will work on it, hopefully soon. My time has been extremely limited, as I study while working as a consultant/electrician/carpenter/hardware guy/product designer for a local escape-game startup company, teaching at school, freelancing for National Museum, learning archery, learning to act in theater and other things. I really, really want to get back into it. I found a library that handles different kinds of tags (not just AprilTags) called ArUco. I think using it is the way to go, since it has a built-in support for tracking multiple tags. I would just need to write routines for determining their relative positions automatically. I need to test it in depth to make sure the positional accuracy is okay. Using this library would also allow me to compile the whole thing differently (the current library I am using need to compile under cygwin since it works only under Linux natively), allowing me to do stuff such as grabbing the frames directly from a video and more.

I should be changing the way I work at my job within one or two weeks when the escape game had been finished, which hopefully should give me more time. Since my workload now usually crosses 60 hours per week, I don't have much energy left, which shall change and then I'll continue happily!

wow .. man, I don't know what to tell you .. I hope you get time to go to the bathroom .. Firstly, I can't thank you enough for your amazing job at this .. you made the tracking process very accurate, fast and easy .. it's like a magic stick .. I hope you can give us an update soon .. it will really be very helpful if I could track more than one tracker .. cause it might happen to lose one of them out of the frame of the video .. I also came from CG Matter's video which is so awesome!!

BIG thanks man .. I hope you are doing well :)

adowedar88 avatar Nov 17 '19 17:11 adowedar88

@adowedar88 Thank you! Things took a bit longer to settle than I expected. But I hopefully should be able to hop right back on it over the Christmas break! I have many ideas and I can't wait to try them out. Sorry about making you guys wait, it's been too hectic.

thegoodhen avatar Dec 06 '19 22:12 thegoodhen

When is the next release going to be scheduled or when do you expect to have the multiple trackers feature ready?

btw outstanding Tracking solution!

TeamBattino avatar Jan 18 '20 20:01 TeamBattino

Hi there, are there any news from the multiple tag tracking front?

polynaught avatar May 27 '20 18:05 polynaught

is the multiple tracking update out ?

Rishabhg71 avatar Jul 23 '20 12:07 Rishabhg71

If it was, the issue would be closed I think Also you can see full repository timeline easily, where each change is commented.

rizerphe avatar Aug 05 '20 12:08 rizerphe

@RG7279805 @BohdanOpyr @polynaught @TeamBattino @adowedar88 @sgofferj @BlueStreamBrony @grandhello

I have finally managed to get some time to get back to the project, after a super long time idling.

Originally, I have used the AprilTags library, and effectively I compiled a Linux code under Windows. This was problematic for several reasons:

  • The code was a huge mess and the compilation was problematic
  • it would probably be difficult to add support for a GUI
  • since I was just using a text editor and compiler manually, the development process sucked
  • only an old version of OpenCV was available; it would be difficult to add support for multiple tag tracking, as well as support for video files, as opposed to image sequences

For those and some additional reasons, I have decided to rewrite everything in Python.

I have successfully managed to put together a proof-of-concept that scans the video for markers, automatically reconstructs their relative positions and then uses those positions to get an accurate estimation of the camera position wrt. the markers.

It is possible to reconstruct the position even when some makers are occluded; it's also possible to obtain the relative positions between the markers even when there are no frames, on which all markers are visible at the same time. That is, you can have a cube with a marker on each side and track it.

So far, I am still in a very alpha stage, but I managed to render a test video in Blender with the simulated markers, track this video and then import the resulting track back into Blender successfully, with sub-pixel tracking errors.

So far, this new test program really has no user interface and is unstable (i.e. crashes when it sees no markers on the frame, etc.) That being said, it has worked on the rendered footage and I will shortly be conducting tests on real world footage.

I will also try to include a graphical user interface and a support for video files, as opposed to just image sequences.

thegoodhen avatar Aug 24 '20 15:08 thegoodhen

i'm also really grateful for this tool and especially excited about the possibility of having multiple markers

IanFLee avatar Oct 07 '20 20:10 IanFLee

Any progress on this? I would really like to use multiple Tags because then i can add 3D Objects to different objects at once.

Nailik avatar Nov 23 '20 23:11 Nailik

The author is currently working on a rewrite of the project in python that would allow him to add such features more easily. So, for now, there is nothing useful for you.

rizerphe avatar Nov 24 '20 04:11 rizerphe

Any update ?

n005 avatar Apr 29 '21 07:04 n005

new april tag library is around, i did some testing already, and have a tracker modified, that spits out pose for every tag on the screen. Need someone with programming experience to help me out building this in.. mainly the pose to camera remap into blender. I'm a medical doctor during the day, not a programmer unfortunately. Anyone? doing this with no commercial incentive, open source

jcnwholland avatar Aug 31 '21 09:08 jcnwholland

Any progress on multiple trackers?

apprehensivetarget avatar Jan 23 '22 12:01 apprehensivetarget

I've been watching this issue since it was opened and it was never added so I finally just did it myself. I opened a pull request #44 but you can get my fork here and compile it if you want to try it: https://github.com/zorbulator/apriltools

zorbulator avatar Jan 31 '22 22:01 zorbulator