loading
 
"Virtual Reality"
Ben Graham from United States  [17 posts]
6 years
I was wondering if there is anyway to create a "virtual reality" system.  I want to start very simple.  I want to display a circle on a webcam feed but have the circle stay in the same spot even when the camera moves.  When you normally display a circle it stays in the same spot on the screen, but what I want to do is as the webcam turns, have the circle move in the opposite direction so it stays in the same spot compared to the background.  For example, if I have a webcam feed that has a door in it and I want the circle to stay in front of the door even as the webcam pans.  I was unsure on how to do this and this is where I need some help.  I was thinking somehow of using the stabilize, visual anchor, or align image module to complete this goal.

If anyone has any help that would be greatly appreciated!

Thanks,

-Ben
Anonymous 6 years
Ben,

This is a well researched area. Have a look at the ARToolkit which specializes in this concept.

The idea instead is to use the Fiducial module and once the fiducial is recognized apply the same transform to another image and lay that ontop of the original. Its a fun thing to do and a great one for the kids to enjoy.

Even Hallmark came out with these cards that when shown to a webcam they would animate a scene ... as you move the card so will the scene. Lego does this too in some stores. You can see what the pieces will make before purchase.

STeven.
Ben Graham from United States  [17 posts] 6 years
STeven-

This is very interesting.  I guess the real name of what I want to accomplish is "Augmented Reality" not virtual reality.  While this looks awesome, the project I am doing can not use fiducials.  I tried to make my own program and it is attached.  my program is based off of the example from the visual anchor module page. It is a very simple program and is a pure prototype.  It is very jittery though and I was wondering if you had any idea how to make it less jittery.

The attached program works best with a 320x240 video input.

Thanks,

-Ben
program.robo
Anonymous 6 years
Ben,

Perhaps I can backup a bit before working with that solutions as there are many options here and it depends on what you are trying to achieve as to what the best route is to go.

Most of these types of applications will use something within the frame in a local manner and then overlay it with something else. In the previous system a fiducial is used for that ... but that could be anything. For instance you could use the object recognition module to identify a shape or texture within the image and then replace that with something else. The question is how that spot is to be identified. Will that change over time which would cause the object recognition to fail? Or is the point to be tracked somehow identified at a certain point in time? I.e. would the center of the image every 10 minutes need to be tracked?

Similar to the object recognition is tracking a spot ... which is something that the object recognition has built into it. Depending on what things you need to track that technique as a standalone module may be what you want instead of a database of objects to track ... but again, at some point that spot to be tracked must be identified. Perhaps by user interaction? I.e. they select what point in the image to track and then from then on until they change it that point will be tracked?

Perhaps you could provide a little background on what you are trying to accopmplish (if possible) and that will give us a better idea of what to suggest.

The jitter you are seeing is the issue when tracking the entire frame. Relative to a local area you will see pixelated movement ... but if you track that area more locally (i.e. a focused version of the align) then you will get much better attachment of that point to the image. This is due to global movements are in 3d and not in 2d so global tracking is not very accurate. Assuming your small area to track is more 2D-ish than the entire scene you will get a better local result.

FYI, Visual Anchor, Stabilization, Image Align and Object Recognition are all variants of similar techniques ... interesting how many aspects of the same thing can be represented in many different perspectives. There is a unifying algorithm underneath all that ... but a generalized one still escapes us!

STeven.
Anonymous 6 years
All that information sounds great.  Taking a step back, I'll describe what I want to accomplish then we can decide what the best way to do it is.


My original idea was to create a some-what "augmented reality" shooting game.  I wanted to mount a wireless camera to a person's head.  Then as the person walks around and turns their head the camera feed will turn, (no need for servo's to pan and tilt a camera).  Then I wanted to pick a random spot on the video feed and make a target sign, or some kind of dot.  As the person moves their head, the dot would stay in its original location, even if the person turned so much that the dot went out of the frame of view.  Then use a Wii controller as a gun and display another dot that corresponds to where the gun would be pointed on the display.  If the dot lines-up with the target, then the person gets a point, and a new random target is displayed.  I wanted all this video fed into a pair of VR goggles so the system could be entirety wireless.  This way you could play throughout an entire house.

This project is pretty complicated and I am sure I did not explain it to well but that is the general idea.  I think I can do the Wii controller/gun section on my own, I just need a little guidance on the virtual target part.

Thanks a lot for the help,

-Ben


Anonymous 6 years
Ben,

Thanks for the description. That helps a lot.

To make a virtual spot that doesn't move (or move much) even if the person moves the camera out of the area you'd need to use the object recognition or AVM module (fiducials would be better but that would require an actual location instead of a random spot). Note that the spot still cannot be purely random as you would not be able to select the middle of a planar wall ... as there is not much for the recognition module to recognize.

So to emulate a little of what you said you would have the person walk around, then click the Add Object in the object recognition module and select a large enough area of the image to target. The middle of which would be your 'spot'. Note that once this is recorded the person can turn away from the location and turn back and it should recognize that object again.

Hope that helps a little ...

STeven.

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index