MATLAB Answers

0

sz means in image segmentation

Asked by nur hanani on 19 Nov 2019 at 3:33
Latest activity Answered by Erivelton Gualter on 19 Nov 2019 at 3:49
img=zeros(sz(1),sz(2));
can someone help me explain about this code?

  2 Comments

Erivelton Gualter on 19 Nov 2019 at 3:35
what is sz meaning?
Here is a documentation for function zeros: https://www.mathworks.com/help/matlab/ref/zeros.html
nur hanani on 19 Nov 2019 at 3:41
sz is size, but sz(1) is it size 1 or what?

Sign in to comment.

2 Answers

Answer by Erivelton Gualter on 19 Nov 2019 at 3:49

Let's say you have size = [300 400]. So, img is a matrix of zeros with this size. than you might show.
Try the following code:
sz = [300 400];
img=zeros(sz(1),sz(2));
imshow(img)

  0 Comments

Sign in to comment.


Answer by Image Analyst
on 19 Nov 2019 at 3:40

Before that code, someone probably did
sz = size(yourImage);

  1 Comment

nur hanani on 19 Nov 2019 at 3:42
so 1 is my image name? but i dont have any image named 1.

Sign in to comment.