sz means in image segmentation

조회 수: 2 (최근 30일)
nur hanani
nur hanani 2019년 11월 19일
답변: Erivelton Gualter 2019년 11월 19일
img=zeros(sz(1),sz(2));
can someone help me explain about this code?
  댓글 수: 2
Erivelton Gualter
Erivelton Gualter 2019년 11월 19일
what is sz meaning?
Here is a documentation for function zeros: https://www.mathworks.com/help/matlab/ref/zeros.html
nur hanani
nur hanani 2019년 11월 19일
sz is size, but sz(1) is it size 1 or what?

댓글을 달려면 로그인하십시오.

답변 (2개)

Erivelton Gualter
Erivelton Gualter 2019년 11월 19일
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)

Image Analyst
Image Analyst 2019년 11월 19일
Before that code, someone probably did
sz = size(yourImage);
  댓글 수: 1
nur hanani
nur hanani 2019년 11월 19일
so 1 is my image name? but i dont have any image named 1.

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by