Discussion:
Augmented Reality in Matlab
(too old to reply)
jordan a
2010-06-03 02:16:06 UTC
Permalink
Hi All,

Does anyone know of any way to create an augmented reality type interface with Matlab? It would be very useful in my research if I would be able to interface 3D virtual objects with the real world. I've seen projects in which these 3D objects are inserted by the computer when a specific pattern is detected. I've looked all over the web for something of this sort, but have found nothing. Can anyone point me in the right direction?

Such a system can be seen here:


Thanks,
-J
Steven Lord
2010-06-04 02:29:47 UTC
Permalink
Post by jordan a
Hi All,
Does anyone know of any way to create an augmented reality type interface
with Matlab? It would be very useful in my research if I would be able to
interface 3D virtual objects with the real world. I've seen projects in
which these 3D objects are inserted by the computer when a specific
pattern is detected. I've looked all over the web for something of this
sort, but have found nothing. Can anyone point me in the right direction?
Are you thinking of something like Simulink 3D Animation?

http://www.mathworks.com/products/3d-animation/
--
Steve Lord
***@mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
To contact Technical Support use the Contact Us link on
http://www.mathworks.com
thummarat
2014-05-21 18:25:08 UTC
Permalink
Post by Steven Lord
Post by jordan a
Hi All,
Does anyone know of any way to create an augmented reality type interface
with Matlab? It would be very useful in my research if I would be able to
interface 3D virtual objects with the real world. I've seen projects in
which these 3D objects are inserted by the computer when a specific
pattern is detected. I've looked all over the web for something of this
sort, but have found nothing. Can anyone point me in the right direction?
Are you thinking of something like Simulink 3D Animation?
http://www.mathworks.com/products/3d-animation/
--
Steve Lord
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
To contact Technical Support use the Contact Us link on
http://www.mathworks.com
Hi Jordan a.
function findScaleTransform is can not run and error.
You can help me please.
Saurabh Mahapatra
2010-06-22 18:47:25 UTC
Permalink
Hi Jordan,

I looked at the video and these are my suggestions.

The key elements of your system will be a loop that executes every "m" seconds:

1. Recognition: I am not sure if they are acquiring the images of the box or simply scanning the bar code. The recognition system definitely keeps detecting if the object is present and is also most probably responsible for the delay in the rendering.

If I had to do this in MATLAB, I would use either Instrument Control Toolbox or Image Acquisition Toolbox to acquire the data.

I am still not sure how they are capturing the orientation of the box. If that can be figured out, translating that to a 3D coordinate system mentioned in 3 is achievable.

If it is 3D or even 2D, consider using functions from the Image Processing Toolbox.

2. Database search and matching: I will only answer this for image data which would be a difficult problem to solve as 3D object recognition is not easy. If it is a bar code, then the answer is trivial. I would first start writing this algorithm to do the matches fast!

3. Rendering: Simulink 3D Animation will work just fine for this. Once the recognition is done, you can DYNAMICALLY create and delete objects from a library file that you have created. The VRML node that you will need is the PROTO node. The uniqueness of this node is that you can create a library of objects and then dynamically call them during execution from within MATLAB.

I have created a small example to explain the dynamic behavior in VRML. Follow the instructions carefully and you should be able to see the effect. I use a random variable as my signal generator for my dynamic rendering: if it is >0.5, I display a sphere or else a pyramid.

The first step is to copy paste the following code in Notepad and save it as world.wrl:


#VRML V2.0 utf8

#Created with V-Realm Builder v2.0
#Integrated Data Systems Inc.
#www.ids-net.com


SpotLight {
direction 0 0 -1
location 0 4.2 0
}
DEF transform Transform {
translation 0.577873 -0.395051 -4.21423e-008
scale 0.4 0.4 0.4
children DEF TextNode Shape {
appearance Appearance {
material Material {
}

}

geometry DEF TextString Text {
string "A"
fontStyle FontStyle {
family "SANS"
style "BOLDITALIC"
}

}

}
}


The second step would be to copy the following code into the MATLAB editor and then execute it. Make sure that world.wrl is in the current working directory:

% get the path to the wrl file with marker PROTOs. This exists in MATLAB
% installation directories
pathtomarkers = which('vr_markers.wrl');
% If you do >>edit(pathtomarkers), you should be able to view the nodes in
% the MATLAB editor. Alternatively, navigate to the folder and open it with
% VRealm Builder

world = vrworld('world.wrl', 'new');
open(world);
fig = vrfigure(world);

% use the tetrahedron shape
MarkerName1 = 'Marker_Sphere';
MarkerName2= 'Marker_Pyramid';

% create an EXTERNPROTO with specified marker
try
addexternproto(world, pathtomarkers, MarkerName1);
addexternproto(world, pathtomarkers, MarkerName2);
catch ME
% if required PROTO is already contained don't throw an exception
if ~strcmpi(ME.identifier, 'VR:protoexists')
throwAsCaller(ME);
end
end

% Initialize loop variable i for sake of demo
i=0;
while (i<10)
a=rand(1);
TextNode=vrnode(world, 'TextString');
setfield(TextNode,'string',num2str(a));
if a>0.5
newMarker = vrnode(world, sprintf('%s_%d', 'Marker', i), MarkerName1);
newMarker.markerScale=[1 1 1];
else
newMarker = vrnode(world, sprintf('%s_%d', 'Marker', i), MarkerName2);
newMarker.markerScale=[3 3 3];
newMarker.markerColor=[0 0 1];
end
vrdrawnow;
i=i+1;
pause(1)
delete(newMarker)

end

close all force;

This should show how to do this. Take a look at vrmarkers.wrl file contained in
which('vr_markers.wrl')
to see how the library of dynamic (PROTO) objects are created. Remember that during this creation, you need to define markerColor and markerScale as the nodes that reference these nodes. You may have to do this manually by editing the WRL file as a text file.

More information on PROTO declarations can be found here:

http://graphcomp.com/info/specs/sgi/vrml/spec/part1/concepts.html#Prototypes

Hope this helps.

Thanks,

Saurabh
Runa Aktar
2024-02-11 08:59:21 UTC
Permalink
✅🔴▶️▶ Really Amazing ️You Can Try This ◀️◀️🔴✅
🔴ALL>Movies✅ 📺 📱 💻 ✅ALL>Movies🔴
✅▶️▶️ CLICK HERE Full HD✅720p✅1080p✅4K✅

WATCH ✅💻📺📱👉https://co.fastmovies.org

ᗪOᗯᑎᒪOᗩᗪ ✅📺📱💻👉https://co.fastmovies.org

🔴WATCH>>ᗪOᗯᑎᒪOᗩᗪ>>HERE>👉https://co.fastmovies.org
✅WATCH>>ᗪOᗯᑎᒪOᗩᗪ>>HERE>👉https://co.fastmovies.org

💚WATCH>>ᗪOᗯᑎᒪOᗩᗪ>>HERE>👉https://co.fastmovies.org
💚WATCH>>ᗪOᗯᑎᒪOᗩᗪ>>HERE>👉https://co.fastmovies.org

🔴ALL>Movies>ALL>TIME>Save>LINK👉https://co.fastmovies.org
🔴ALL>Movies>ALL>TIME>Save>LINK👉https://co.fastmovies.org

🔴💻ALL>Movies>WATCH>ᗪOᗯᑎᒪOᗩᗪ>LINK>👉https://co.fastmovies.org
🔴📱ALL>Movies>WATCH>ᗪOᗯᑎᒪOᗩᗪ>LINK>👉https://co.fastmovies.org

🔴📺ALL>Movies>WATCH>ᗪOᗯᑎᒪOᗩᗪ>LINK>👉https://co.fastmovies.org
🔴📺ALL>Movies>WATCH>ᗪOᗯᑎᒪOᗩᗪ>LINK>👉https://co.fastmovies.org

🔴✅📺📱💻ALL>Movies>WATCH>ᗪOᗯᑎᒪOᗩᗪ>LINK>👉https://co.fastmovies.org
🔴✅📺📱💻ALL>Movies>WATCH>ᗪOᗯᑎᒪOᗩᗪ>LINK>👉https://co.fastmovies.org

🔴✅📺📱💻ALL>Movies>WATCH>ᗪOᗯᑎᒪOᗩᗪ>LINK>👉https://co.fastmovies.org
🔴✅📺📱💻ALL>Movies>WATCH>ᗪOᗯᑎᒪOᗩᗪ>LINK>👉https://co.fastmovies.org

🔴✅📺📱💻ALL>Movies>WATCH>ᗪOᗯᑎᒪOᗩᗪ>LINK>👉https://co.fastmovies.org

🔴✅📺📱💻ALL>Movies>WATCH>ᗪOᗯᑎᒪOᗩᗪ>LINK>👉https://co.fastmovies.org

🔴✅📺📱💻ALL>Movies>WATCH>ᗪOᗯᑎᒪOᗩᗪ>LINK>👉https://co.fastmovies.org

🔴✅📺📱💻ALL>Movies>WATCH>ᗪOᗯᑎᒪOᗩᗪ>LINK>👉https://co.fastmovies.org

🔴✅📺📱💻ALL>Movies>WATCH>ᗪOᗯᑎᒪOᗩᗪ>LINK>👉https://co.fastmovies.org

🔴✅📺📱💻ALL>Movies>WATCH>ᗪOᗯᑎᒪOᗩᗪ>LINK>👉https://co.fastmovies.org

🔴✅📺📱💻ALL>Movies>WATCH>ᗪOᗯᑎᒪOᗩᗪ>LINK>👉https://co.fastmovies.org

🔴✅📺📱💻ALL>Movies>WATCH>ᗪOᗯᑎᒪOᗩᗪ>LINK>👉https://co.fastmovies.org

🔴✅📺📱💻ALL>Movies>WATCH>ᗪOᗯᑎᒪOᗩᗪ>LINK>👉https://co.fastmovies.org

🔴✅📺📱💻ALL>Movies>WATCH>ᗪOᗯᑎᒪOᗩᗪ>LINK>👉https://co.fastmovies.org

🔴✅📺📱💻ALL>Movies>WATCH>ᗪOᗯᑎᒪOᗩᗪ>LINK>👉https://co.fastmovies.org

🔴✅📺📱💻ALL>Movies>WATCH>ᗪOᗯᑎᒪOᗩᗪ>LINK>👉https://co.fastmovies.org

🔴✅📺📱💻ALL>Movies>WATCH>ᗪOᗯᑎᒪOᗩᗪ>LINK>👉https://co.fastmovies.org

🔴✅📺📱💻ALL>Movies>WATCH>ᗪOᗯᑎᒪOᗩᗪ>LINK>👉https://co.fastmovies.org

🔴✅📺📱💻ALL>Movies>WATCH>ᗪOᗯᑎᒪOᗩᗪ>LINK>👉https://co.fastmovies.org

🔴✅📺📱💻ALL>Movies>WATCH>ᗪOᗯᑎᒪOᗩᗪ>LINK>👉https://co.fastmovies.org

🔴✅📺📱💻ALL>Movies>WATCH>ᗪOᗯᑎᒪOᗩᗪ>LINK>👉https://co.fastmovies.org

🔴✅📺📱💻ALL>Movies>WATCH>ᗪOᗯᑎᒪOᗩᗪ>LINK>👉http
Loading...