zeros(8,m,n) for a 3d image, what does 8 specify here?.

조회 수: 2 (최근 30일)
Gursheen
Gursheen 2014년 3월 21일
답변: Image Analyst 2014년 3월 21일
i have used this coding for an image..i am unable to understand as to why 8 has been used here?

답변 (2개)

Azzi Abdelmalek
Azzi Abdelmalek 2014년 3월 21일

Image Analyst
Image Analyst 2014년 3월 21일
8 is the number of rows (the "Y" dimension).
m is the number of columns (the "X" dimension).
n is the number of color channels (typically 1 for grayscale or 3 for RGB true color or some other color space such as HSV or LAB). Sometimes thought of as the "Z" dimension.
So you have a multispectral image. Each color channel of that multispectral image is an 8 by m 2D image, and you have n of them (one for each wavelength range, color channel). Though in your case everything is zero, so maybe you're just initializing and pre-allocating space.

카테고리

Help CenterFile Exchange에서 Image Filtering and Enhancement에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by