[Scilab-users] IPCV upscaling of image

P M p.muehlmann at gmail.com
Mon Dec 21 21:54:10 CET 2020


Hi Claus,

this works for me:

imgList = list();imgList(1) = imread(fullpath(getIPCVpath() +
"/images/superres/input001.png"));imgOut  =
imsuperres(imgList);figure();imshow(imgOut);outPath_1 =
'd:\testIn.png';outPath_2 = 'd:\testOut.png';res = imwrite(imgList(1),
outPath_1);res = imwrite(imgOut, outPath_2);xdel();

The input file is saved as a 64x64 image.
The superresolution image is saved as a 256 x 256 image.

Interestingly enough:
If the output paths are set to "c:\testOut.png", imwrite would not
work...unsure why.

Regards, Philipp

Am Mo., 21. Dez. 2020 um 11:37 Uhr schrieb Claus Futtrup <cfuttrup at gmail.com
>:

> Hi Philipp
>
> The file was saved automatically. I don't think you can set what to save,
> or even the name of the file.
> I also did a xs2png, but that only saves the current figure. In my case a
> 610 x 460 pixel image (=the screen figure).
>
> Cheers,
> Claus
>
> On 21-12-2020 11:21, P M wrote:
>
> Dear Claus,
>
> the example did not include saving the image as a file.
>
> Best guesses:
> - use imwrite
> - use one of the xs2...-functions (e.g.: xs2bmp)
>
> BR
> Philipp
>
>
> Am Mo., 21. Dez. 2020 um 09:20 Uhr schrieb Claus Futtrup <
> cfuttrup at gmail.com>:
>
>> Hi Philipp
>>
>> 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.
>>
>> Best regards,
>> Claus
>>
>> On 20-12-2020 22:55, P M wrote:
>>
>> Dear Claus,
>>
>> you need to feed a list into imsuperres()....not directly the image.
>> Following should work.
>>
>> imgList = list();imgList(1) = imread('path_to_image');imgOut  = imsuperres(imgList);figure();imshow(imgList(1));figure();imshow(imgOut);
>> BR
>> Philipp
>>
>>
>> Am So., 20. Dez. 2020 um 19:42 Uhr schrieb Claus Futtrup <
>> cfuttrup at gmail.com>:
>>
>>> Hi there
>>>
>>> I have a 4K picture, which I thought I'll try to upscale with the
>>> imsuperres in the IPCV toolbox. The code simply looks like this:
>>>
>>> imagefile = 'D:\Userdata\Claus\Pictures\Think_Global_4K.png';
>>> im = imread(imagefile);
>>> imout  = imsuperres(im);
>>>
>>> The file is read and I get the following response: Unsigned Integer 8
>>> bits (2160 x 3840). Then Scilab crashes. I'm running Scilab 6.1.0 (the
>>> original release) on Windows 10 - in a MS Windows dialog box I get:
>>>
>>>  >Scilab 6.1.0 (Desktop) has stopped working
>>>
>>>  >A problem caused the program to stop working correctly. Windows will
>>> close the program and notify you if a solution is available.
>>>
>>> I am not sure that I've understood how to use imsuperres correctly. I
>>> see in the _params that rfactor = 4 is the default, so I was expecting
>>> the image to be scaled by a factor 4 (maybe that's 2 x 2 = I get an 8K
>>> image = 4320 x 7680 pixels). The way I understand the documentation, I
>>> don't need to run imsuperres_params if I'm satisified with the defaults.
>>>
>>> Kind regards,
>>>
>>> Claus
>>>
>>> _______________________________________________
>>> users mailing list
>>> users at lists.scilab.org
>>> http://lists.scilab.org/mailman/listinfo/users
>>>
>>
>> _______________________________________________
>> users mailing listusers at lists.scilab.orghttp://lists.scilab.org/mailman/listinfo/users
>>
>>
>> _______________________________________________
>> users mailing list
>> users at lists.scilab.org
>> http://lists.scilab.org/mailman/listinfo/users
>>
>
> _______________________________________________
> users mailing listusers at lists.scilab.orghttp://lists.scilab.org/mailman/listinfo/users
>
>
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20201221/0a53ab62/attachment.htm>


More information about the users mailing list