[Scilab-users] imrotate

Chin Luh Tan chinluh.tan at bytecode-asia.com
Wed Jun 24 10:34:59 CEST 2020


Hi,



the 3rd argument was actually for an older version of imrotate which the function is in pure Scilab script, however, it has not been used when we move to opencv implementation. 



please make a report here : https://github.com/tanchinluh/IPCV so that we could put it into our future release. 



Thanks.



Regards,

Chin Luh


---- On Wed, 24 Jun 2020 16:22:39 +0800 P M <p.muehlmann at gmail.com> wrote ----


Dear Experts,



using imrotate() from IPCV-toolbox:



imout = imrotate(im1,deg,crp)






crp : Returns only central portion output image which is the same size 
            as source if set to 1




My input image is 512x512 pixel.



The output image shall be of the same size.



For this I try crop = 1 and also crop = 0



However the output image is always of different size, depending on the rotation value.



Do I misunderstand something?



Here my code:



for i = 1:nrOrigImg
    
    img = imread(fpath_img(i));
    mask = imread(fpath_mask(i));
    
    // get a random rotation value
    rotVal = grand(1, 1, "unf", -5, 5);
    
    // rotate the input image
    cropVal = 0;
    
    img = imrotate(img,rotVal,cropVal);
    imshow(img);
    
    // rotate the mask image
    mask = imrotate(mask,rotVal,cropVal);
    imshow(mask);
    
    // add suffix : _rot
    fNameOut = baseNameImg(i) + "_rot" + extImg(i);
    imwrite(img, subDir1 + "\" + fNameOut);
    
    fNameOut = baseNameMask(i) + "_rot" + extMask(i);
    imwrite(mask, subDir2 + "\" + fNameOut);
    
end






Best Regards,

Philipp






_______________________________________________
users mailing list 
mailto: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/20200624/53c4c1cf/attachment.htm>


More information about the users mailing list