<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">Hi Philipp</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">Interesting ... I think this should be
part of the help available.</div>
<div class="moz-cite-prefix">I hope Chin Lun Tan sees this and feel
inspired...<br>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">Cheers,</div>
<div class="moz-cite-prefix">Claus<br>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">On 21-12-2020 21:54, P M wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CACf7ODsgeVVnsbokvzyrJS_2cCOS7rQ7ECbuP32wnVe2LbDTcQ@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div>Hi Claus,</div>
<div><br>
</div>
<div>this works for me:</div>
<div><br>
</div>
<div>
<pre style="font-family:Monospaced;font-style:normal"><span style="color:rgb(0,0,0)">imgList</span> <span style="color:rgb(92,92,92)">=</span> <span style="color:rgb(50,185,185)">list</span><span style="color:rgb(74,85,219)">(</span><span style="color:rgb(74,85,219)">)</span><span style="color:rgb(0,0,0)">;</span>
<span style="color:rgb(0,0,0)">imgList</span><span style="color:rgb(74,85,219)">(</span><span style="color:rgb(188,143,143)">1</span><span style="color:rgb(74,85,219)">)</span> <span style="color:rgb(92,92,92)">=</span> <span style="color:rgb(0,0,0)">imread</span><span style="color:rgb(74,85,219)">(</span><span style="color:rgb(50,185,185)">fullpath</span><span style="color:rgb(74,85,219)">(</span><span style="color:rgb(0,0,0)">getIPCVpath</span><span style="color:rgb(74,85,219)">(</span><span style="color:rgb(74,85,219)">)</span> <span style="color:rgb(92,92,92)">+</span> <span style="color:rgb(188,143,143)">"</span><span style="color:rgb(188,143,143)">/images/superres/input001.png</span><span style="color:rgb(188,143,143)">"</span><span style="color:rgb(74,85,219)">)</span><span style="color:rgb(74,85,219)">)</span><span style="color:rgb(0,0,0)">;</span>
<span style="color:rgb(0,0,0)">imgOut</span> <span style="color:rgb(92,92,92)">=</span> <span style="color:rgb(0,0,0)">imsuperres</span><span style="color:rgb(74,85,219)">(</span><span style="color:rgb(0,0,0)">imgList</span><span style="color:rgb(74,85,219)">)</span><span style="color:rgb(0,0,0)">;</span>
<span style="color:rgb(50,185,185)">figure</span><span style="color:rgb(74,85,219)">(</span><span style="color:rgb(74,85,219)">)</span><span style="color:rgb(0,0,0)">;</span>
<span style="color:rgb(0,0,0)">imshow</span><span style="color:rgb(74,85,219)">(</span><span style="color:rgb(0,0,0)">imgOut</span><span style="color:rgb(74,85,219)">)</span><span style="color:rgb(0,0,0)">;</span>
<span style="color:rgb(0,0,0)">outPath_1</span> <span style="color:rgb(92,92,92)">=</span> <span style="color:rgb(188,143,143)">'</span><span style="color:rgb(188,143,143)">d:\testIn.png</span><span style="color:rgb(188,143,143)">'</span><span style="color:rgb(0,0,0)">;</span>
<span style="color:rgb(0,0,0)">outPath_2</span> <span style="color:rgb(92,92,92)">=</span> <span style="color:rgb(188,143,143)">'</span><span style="color:rgb(188,143,143)">d:\testOut.png</span><span style="color:rgb(188,143,143)">'</span><span style="color:rgb(0,0,0)">;</span>
<span style="color:rgb(0,0,0)">res</span> <span style="color:rgb(92,92,92)">=</span> <span style="color:rgb(0,0,0)">imwrite</span><span style="color:rgb(74,85,219)">(</span><span style="color:rgb(0,0,0)">imgList</span><span style="color:rgb(74,85,219)">(</span><span style="color:rgb(188,143,143)">1</span><span style="color:rgb(74,85,219)">)</span><span style="color:rgb(0,0,0)">,</span> <span style="color:rgb(0,0,0)">outPath_1</span><span style="color:rgb(74,85,219)">)</span><span style="color:rgb(0,0,0)">;</span>
<span style="color:rgb(0,0,0)">res</span> <span style="color:rgb(92,92,92)">=</span> <span style="color:rgb(0,0,0)">imwrite</span><span style="color:rgb(74,85,219)">(</span><span style="color:rgb(0,0,0)">imgOut</span><span style="color:rgb(0,0,0)">,</span> <span style="color:rgb(0,0,0)">outPath_2</span><span style="color:rgb(74,85,219)">)</span><span style="color:rgb(0,0,0)">;</span>
<span style="color:rgb(50,185,185)">xdel</span><span style="color:rgb(74,85,219)">(</span><span style="color:rgb(74,85,219)">)</span><span style="color:rgb(0,0,0)">;
</span></pre>
The input file is saved as a 64x64 image.<br>
The superresolution image is saved as a 256 x 256 image.<br>
</div>
<div><br>
</div>
<div>Interestingly enough:<br>
If the output paths are set to "c:\testOut.png", imwrite would
not work...unsure why.<span style="color:rgb(0,0,0)"></span><br>
<span style="color:rgb(0,0,0)"></span><br>
Regards, Philipp</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">Am Mo., 21. Dez. 2020 um
11:37 Uhr schrieb Claus Futtrup <<a
href="mailto:cfuttrup@gmail.com" moz-do-not-send="true">cfuttrup@gmail.com</a>>:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<div>Hi Philipp</div>
<div><br>
</div>
<div>The file was saved automatically. I don't think you can
set what to save, or even the name of the file.<br>
</div>
<div>I also did a xs2png, but that only saves the current
figure. In my case a 610 x 460 pixel image (=the screen
figure).<br>
</div>
<div><br>
</div>
<div>Cheers,</div>
<div>Claus<br>
</div>
<div><br>
</div>
<div>On 21-12-2020 11:21, P M wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>Dear Claus,</div>
<div><br>
</div>
<div>the example did not include saving the image as a
file.<br>
</div>
<div><br>
</div>
<div>Best guesses:</div>
<div>- use imwrite <br>
</div>
<div>- use one of the xs2...-functions (e.g.: xs2bmp)</div>
<div><br>
</div>
<div>BR</div>
<div>Philipp<br>
</div>
<div><br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">Am Mo., 21. Dez. 2020
um 09:20 Uhr schrieb Claus Futtrup <<a
href="mailto:cfuttrup@gmail.com" target="_blank"
moz-do-not-send="true">cfuttrup@gmail.com</a>>:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px
0px 0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
<div>
<div>Hi Philipp</div>
<div><br>
</div>
<div>I see, thank you for explaining it to me. I
also see that the upscale is not 2x2 = 4, but it
is 4x4 so the upscaled image is huge. The output
file is saved - I believe - in wherever your
Scilab file browser is currently active.<br>
</div>
<div><br>
</div>
<div>Best regards,</div>
<div>Claus</div>
<div><br>
</div>
<div>On 20-12-2020 22:55, P M wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>Dear Claus,</div>
<div><br>
</div>
<div>you need to feed a list into
imsuperres()....not directly the image.</div>
<div>Following should work.</div>
<div>
<div>
<div>
<table width="100%" border="0">
<tbody>
<tr>
<td width="98%">
<pre><span style="color:rgb(0,0,0)">imgList</span> <span style="color:rgb(92,92,92)">=</span> <span style="color:rgb(50,185,185)">list</span><span style="color:rgb(74,85,219)">(</span><span style="color:rgb(74,85,219)">)</span><span style="color:rgb(0,0,0)">;</span>
<span style="color:rgb(0,0,0)">imgList</span><span style="color:rgb(74,85,219)">(</span><span style="color:rgb(188,143,143)">1</span><span style="color:rgb(74,85,219)">)</span> <span style="color:rgb(92,92,92)">=</span> <span style="color:rgb(0,0,0)">imread</span><span style="color:rgb(74,85,219)">('path_to_image'</span><span style="color:rgb(74,85,219)">)</span><span style="color:rgb(0,0,0)">;</span>
<span style="color:rgb(0,0,0)">imgOut</span> <span style="color:rgb(92,92,92)">=</span> <span style="color:rgb(0,0,0)">imsuperres</span><span style="color:rgb(74,85,219)">(</span><span style="color:rgb(0,0,0)">imgList</span><span style="color:rgb(74,85,219)">)</span><span style="color:rgb(0,0,0)">;</span><span>
<span style="color:rgb(50,185,185)">figure</span><span style="color:rgb(74,85,219)">(</span><span style="color:rgb(74,85,219)">)</span><span style="color:rgb(0,0,0)">;</span>
<span style="color:rgb(0,0,0)">imshow</span><span style="color:rgb(74,85,219)">(</span><span style="color:rgb(0,0,0)">imgList</span><span style="color:rgb(74,85,219)">(</span><span style="color:rgb(188,143,143)">1</span><span style="color:rgb(74,85,219)">)</span><span style="color:rgb(74,85,219)">)</span><span style="color:rgb(0,0,0)">;</span>
<span style="color:rgb(50,185,185)">figure</span><span style="color:rgb(74,85,219)">(</span><span style="color:rgb(74,85,219)">)</span><span style="color:rgb(0,0,0)">;</span>
<span style="color:rgb(0,0,0)">imshow</span><span style="color:rgb(74,85,219)">(</span><span style="color:rgb(0,0,0)">imgOut</span><span style="color:rgb(74,85,219)">)</span><span style="color:rgb(0,0,0)">;</span>
<font face="arial,sans-serif">BR
Philipp
</font></span></pre>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">Am So., 20.
Dez. 2020 um 19:42 Uhr schrieb Claus Futtrup
<<a href="mailto:cfuttrup@gmail.com"
target="_blank" moz-do-not-send="true">cfuttrup@gmail.com</a>>:<br>
</div>
<blockquote class="gmail_quote"
style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">Hi there<br>
<br>
I have a 4K picture, which I thought I'll try
to upscale with the <br>
imsuperres in the IPCV toolbox. The code
simply looks like this:<br>
<br>
imagefile =
'D:\Userdata\Claus\Pictures\Think_Global_4K.png';<br>
im = imread(imagefile);<br>
imout = imsuperres(im);<br>
<br>
The file is read and I get the following
response: Unsigned Integer 8 <br>
bits (2160 x 3840). Then Scilab crashes. I'm
running Scilab 6.1.0 (the <br>
original release) on Windows 10 - in a MS
Windows dialog box I get:<br>
<br>
>Scilab 6.1.0 (Desktop) has stopped
working<br>
<br>
>A problem caused the program to stop
working correctly. Windows will <br>
close the program and notify you if a solution
is available.<br>
<br>
I am not sure that I've understood how to use
imsuperres correctly. I <br>
see in the _params that rfactor = 4 is the
default, so I was expecting <br>
the image to be scaled by a factor 4 (maybe
that's 2 x 2 = I get an 8K <br>
image = 4320 x 7680 pixels). The way I
understand the documentation, I <br>
don't need to run imsuperres_params if I'm
satisified with the defaults.<br>
<br>
Kind regards,<br>
<br>
Claus<br>
<br>
_______________________________________________<br>
users mailing list<br>
<a href="mailto:users@lists.scilab.org"
target="_blank" moz-do-not-send="true">users@lists.scilab.org</a><br>
<a
href="http://lists.scilab.org/mailman/listinfo/users"
rel="noreferrer" target="_blank"
moz-do-not-send="true">http://lists.scilab.org/mailman/listinfo/users</a><br>
</blockquote>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
users mailing list
<a href="mailto:users@lists.scilab.org" target="_blank" moz-do-not-send="true">users@lists.scilab.org</a>
<a href="http://lists.scilab.org/mailman/listinfo/users" target="_blank" moz-do-not-send="true">http://lists.scilab.org/mailman/listinfo/users</a>
</pre>
</blockquote>
<p><br>
</p>
</div>
_______________________________________________<br>
users mailing list<br>
<a href="mailto:users@lists.scilab.org"
target="_blank" moz-do-not-send="true">users@lists.scilab.org</a><br>
<a
href="http://lists.scilab.org/mailman/listinfo/users"
rel="noreferrer" target="_blank"
moz-do-not-send="true">http://lists.scilab.org/mailman/listinfo/users</a><br>
</blockquote>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
users mailing list
<a href="mailto:users@lists.scilab.org" target="_blank" moz-do-not-send="true">users@lists.scilab.org</a>
<a href="http://lists.scilab.org/mailman/listinfo/users" target="_blank" moz-do-not-send="true">http://lists.scilab.org/mailman/listinfo/users</a>
</pre>
</blockquote>
<p><br>
</p>
</div>
_______________________________________________<br>
users mailing list<br>
<a href="mailto:users@lists.scilab.org" target="_blank"
moz-do-not-send="true">users@lists.scilab.org</a><br>
<a href="http://lists.scilab.org/mailman/listinfo/users"
rel="noreferrer" target="_blank" moz-do-not-send="true">http://lists.scilab.org/mailman/listinfo/users</a><br>
</blockquote>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:users@lists.scilab.org">users@lists.scilab.org</a>
<a class="moz-txt-link-freetext" href="http://lists.scilab.org/mailman/listinfo/users">http://lists.scilab.org/mailman/listinfo/users</a>
</pre>
</blockquote>
<p><br>
</p>
</body>
</html>