can the size of the same image in MATLAB be shown differently? -


i entered image in matlab command a=('address of image') , created variable c c=imread('address of image') used same image in both cases. when used size command show different sizes both. how possible size(a) gave different size size(c). although used same image in both cases, both variables , c.

i assume did wrote in question. code following:

a = ('onion.png'); c = imread('onion.png'); 

this means variable a string represented chars , variable c image represented uint8-array. applying size-function on them gives different results because not same object @ all. can verified using class-function.

sizeofa  = size(a)   >>  [1 9] sizeofc  = size(c)   >>  [135 198 3] classofa = class(a)  >>  char classofc = class(c)  >>  uint8 

edit: can take string a load same image. because assigning filename variable, image not automatically read. prove creates same result, can this:

d = imread(a); isequal(c,d) 

which returns 1 meaning arrays equal. of course have same size , class image represented variable c:

sizeofd  = size(d)   >>  [135 198 3] classofd = class(d)  >>  uint8 

Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

Kivy: Swiping (Carousel & ScreenManager) -