ASKSAGE: Sage Q&A Forum - Individual question feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sun, 24 Nov 2013 20:29:05 -0600How to load a local image from cloud.sagemath?https://ask.sagemath.org/question/10108/how-to-load-a-local-image-from-cloudsagemath/Hello, I tried naively to load an image in a worksheet from my cloud.sagemath account. Something like:
from scipy import ndimage as nd
image=nd.imread('~/path/to/image.jpg')
and of course that failed. Is there a way to do that?
thank you
jpThu, 09 May 2013 07:26:54 -0500https://ask.sagemath.org/question/10108/how-to-load-a-local-image-from-cloudsagemath/Comment by kcrisman for <p>Hello, I tried naively to load an image in a worksheet from my cloud.sagemath account. Something like:</p>
<pre><code>from scipy import ndimage as nd
image=nd.imread('~/path/to/image.jpg')
</code></pre>
<p>and of course that failed. Is there a way to do that?</p>
<p>thank you</p>
<p>jp</p>
https://ask.sagemath.org/question/10108/how-to-load-a-local-image-from-cloudsagemath/?comment=17725#post-id-17725In the Sage notebook, [this ask.sagemath question](http://ask.sagemath.org/question/1066/upload-data-file-to-notebook) should answer you. But maybe Sagemathcloud does it differently...Thu, 09 May 2013 07:40:03 -0500https://ask.sagemath.org/question/10108/how-to-load-a-local-image-from-cloudsagemath/?comment=17725#post-id-17725Answer by Abigail111 for <p>Hello, I tried naively to load an image in a worksheet from my cloud.sagemath account. Something like:</p>
<pre><code>from scipy import ndimage as nd
image=nd.imread('~/path/to/image.jpg')
</code></pre>
<p>and of course that failed. Is there a way to do that?</p>
<p>thank you</p>
<p>jp</p>
https://ask.sagemath.org/question/10108/how-to-load-a-local-image-from-cloudsagemath/?answer=15425#post-id-15425remove spamThu, 05 Sep 2013 18:07:59 -0500https://ask.sagemath.org/question/10108/how-to-load-a-local-image-from-cloudsagemath/?answer=15425#post-id-15425Comment by ppurka for <p>remove spam</p>
https://ask.sagemath.org/question/10108/how-to-load-a-local-image-from-cloudsagemath/?comment=17035#post-id-17035What does C# have to do with Sage and/or Python?Thu, 05 Sep 2013 21:09:32 -0500https://ask.sagemath.org/question/10108/how-to-load-a-local-image-from-cloudsagemath/?comment=17035#post-id-17035Answer by ppurka for <p>Hello, I tried naively to load an image in a worksheet from my cloud.sagemath account. Something like:</p>
<pre><code>from scipy import ndimage as nd
image=nd.imread('~/path/to/image.jpg')
</code></pre>
<p>and of course that failed. Is there a way to do that?</p>
<p>thank you</p>
<p>jp</p>
https://ask.sagemath.org/question/10108/how-to-load-a-local-image-from-cloudsagemath/?answer=12933#post-id-12933You can try this
from scipy import ndimage as nd
image=nd.imread(os.environ['HOME'] + '/path/to/image.jpg')
where your image is located in `$HOME/path/to/image.jpg`Thu, 05 Sep 2013 21:18:32 -0500https://ask.sagemath.org/question/10108/how-to-load-a-local-image-from-cloudsagemath/?answer=12933#post-id-12933Answer by arronlee for <p>Hello, I tried naively to load an image in a worksheet from my cloud.sagemath account. Something like:</p>
<pre><code>from scipy import ndimage as nd
image=nd.imread('~/path/to/image.jpg')
</code></pre>
<p>and of course that failed. Is there a way to do that?</p>
<p>thank you</p>
<p>jp</p>
https://ask.sagemath.org/question/10108/how-to-load-a-local-image-from-cloudsagemath/?answer=15718#post-id-15718remove spamSun, 24 Nov 2013 20:29:05 -0600https://ask.sagemath.org/question/10108/how-to-load-a-local-image-from-cloudsagemath/?answer=15718#post-id-15718Answer by William Stein for <p>Hello, I tried naively to load an image in a worksheet from my cloud.sagemath account. Something like:</p>
<pre><code>from scipy import ndimage as nd
image=nd.imread('~/path/to/image.jpg')
</code></pre>
<p>and of course that failed. Is there a way to do that?</p>
<p>thank you</p>
<p>jp</p>
https://ask.sagemath.org/question/10108/how-to-load-a-local-image-from-cloudsagemath/?answer=15619#post-id-15619Your question is unclear. However, if you just want to display the image, do this
salvus.file('%s/path/to/image.jpg'%os.environ['HOME'])Sun, 27 Oct 2013 19:50:33 -0500https://ask.sagemath.org/question/10108/how-to-load-a-local-image-from-cloudsagemath/?answer=15619#post-id-15619