Locate tag in threedimensional space

edited December 2016 in Library Questions

Hi! I need to locate a sheet of paper. My idea was to have one or more qr-like tags on the paper and process the webcam input to find the position relative to the cam. How can I do that? Thank you all

Answers

  • edited December 2016 Answer ✓

    My idea was to have one or more qr-like tags on the paper

    These are often called "fiducials." There are several Processing libraries and many examples -- one recent one is BoofProcessing, which uses BoofCV to detect fiducials in the webcam input stream.

    You can also search past forum discussions:

    You specifically mentioned the location in three-dimensional space. Looking at the example, I believe (?) this is the BoofProcessing "world location":

    List<FiducialFound> found = detector.detect(cam);
    image(cam, 0, 0);
    for( FiducialFound f : found ) {
      println("world location "+f.getFiducialToCamera().getT());
      detector.render(this,f);
    }
    
  • Thank you! BoofCV works great! What I need seems to be the "world location", but the problem is that I can't understand how that works. Does anyone?

  • edited December 2016

    @DeveloperITA -- Could you be more specific? "What I need seems to be" doesn't really tell me what you are trying to do.

    BoofCV comes with examples that demonstrate how to use it -- including the fiducials example that I linked earlier. Is that specific example not working for you? If it is working, what specifically are you trying to change about it that isn't working?

  • What I need is to find the location of the tag in the 3D world relative to the camera position.

  • @DeveloperITA --

    Did you test getFiducialToCamera as in the snippet linked above -- If so, please share the code you used to test it.

    With that code, what results did you get, and how do you know that they are not correct -- what results were you expecting to get instead?

  • I think what he wants is some sort of 3D location as opposed to 2D location.

Sign In or Register to comment.