<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/237606</link>
    <title>MATLAB Central Newsreader - Display an image in a 3d plot</title>
    <description>Feed for thread: Display an image in a 3d plot</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Wed, 15 Oct 2008 18:13:02 -0400</pubDate>
      <title>Display an image in a 3d plot</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/237606#605501</link>
      <author>David Doria</author>
      <description>I was looking to make a demo of perspective projection, so I would like to move an image along the principal axis of a camera and resize it based on the focal length, and show how a 3d point gets projected along a ray.  I saw this thread:&lt;br&gt;
&lt;br&gt;
&lt;a href=&quot;http://www.mathworks.com/matlabcentral/newsreader/view_thread/155794&quot;&gt;http://www.mathworks.com/matlabcentral/newsreader/view_thread/155794&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
But it uses pcolor - so it would have to be a data set like 'clown', not an actual image.  Is there no way to show something that you might show with imshow() but on a specific plane in 3d?&lt;br&gt;
&lt;br&gt;
Thanks,&lt;br&gt;
Dave</description>
    </item>
    <item>
      <pubDate>Wed, 15 Oct 2008 19:34:20 -0400</pubDate>
      <title>Re: Display an image in a 3d plot</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/237606#605521</link>
      <author>Walter Roberson</author>
      <description>David Doria wrote:&lt;br&gt;
&lt;br&gt;
&amp;gt; Is there no way to show something that you might show with imshow() but on a specific plane in 3d?&lt;br&gt;
&lt;br&gt;
No. image objects cannot have Z components.&lt;br&gt;
&lt;br&gt;
Try this instead:&lt;br&gt;
&lt;br&gt;
surf(Z*ones(size(TheImage)),TheImage,'EdgeColor','none')&lt;br&gt;
&lt;br&gt;
where Z is the constant Z that you want for the image.</description>
    </item>
    <item>
      <pubDate>Wed, 15 Oct 2008 19:48:02 -0400</pubDate>
      <title>Re: Display an image in a 3d plot</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/237606#605525</link>
      <author>Kenneth Eaton</author>
      <description>You can also make a surface with a texture-mapped image:&lt;br&gt;
&lt;br&gt;
surface('XData',[0 1; 0 1],'YData',[0 0; 1 1],...&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'ZData',[1 1; 1 1],'CData',flipdim(imageData,1),...&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'FaceColor','texturemap','EdgeColor','none');&lt;br&gt;
&lt;br&gt;
where imageData is the image you want to display. You would just adjust the 'ZData' property of the surface to move it.&lt;br&gt;
&lt;br&gt;
Ken</description>
    </item>
    <item>
      <pubDate>Wed, 15 Oct 2008 20:03:02 -0400</pubDate>
      <title>Re: Display an image in a 3d plot</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/237606#605530</link>
      <author>David Doria</author>
      <description>-------------&lt;br&gt;
With the first method:&lt;br&gt;
&lt;br&gt;
Z=5;&lt;br&gt;
I = imread('ImagePlane.jpg');&lt;br&gt;
surf(Z*ones(size(I)), I,'EdgeColor','none')&lt;br&gt;
&lt;br&gt;
I get &lt;br&gt;
Warning: Matrix dimensions must agree, not rendering mesh&lt;br&gt;
&lt;br&gt;
-----------&lt;br&gt;
&lt;br&gt;
Ken, perfect - that looks exactly like what I was looking for - I'll mess with it more and report back.&lt;br&gt;
&lt;br&gt;
Dave</description>
    </item>
    <item>
      <pubDate>Thu, 28 Apr 2011 23:30:08 -0400</pubDate>
      <title>Re: Display an image in a 3d plot</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/237606#833585</link>
      <author>Alexandro  McQuillan</author>
      <description>&quot;David Doria&quot; &amp;lt;daviddoria@gmail.com&amp;gt; wrote in message &amp;lt;gd5i9m$5j3$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; -------------&lt;br&gt;
&amp;gt; With the first method:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Z=5;&lt;br&gt;
&amp;gt; I = imread('ImagePlane.jpg');&lt;br&gt;
&amp;gt; surf(Z*ones(size(I)), I,'EdgeColor','none')&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I get &lt;br&gt;
&amp;gt; Warning: Matrix dimensions must agree, not rendering mesh&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; -----------&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Ken, perfect - that looks exactly like what I was looking for - I'll mess with it more and report back.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Dave&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Dave,&lt;br&gt;
&lt;br&gt;
I'm also trying to import a tif image plane in 3D space. How did you resolve the matrix dimension mismatch issue?&lt;br&gt;
&lt;br&gt;
Thanks,&lt;br&gt;
Alex</description>
    </item>
  </channel>
</rss>

