plz help me to understand this loop

for color_idx=1:3
img_tmp = img_in_lin(:,:,color_idx);
img_tmp = img_tmp(textureless_map);
% Estimate the veiling-light to be the median value in the region.
A(color_idx) = img_tmp(idx_median);
end

回答 (1 件)

KSSV
KSSV 2018 年 9 月 25 日

0 投票

for color_idx=1:3 % loop for each color channel Red, Blue, GReen
img_tmp = img_in_lin(:,:,color_idx); % This extracts the color channel
img_tmp = img_tmp(textureless_map); % From the color channle pick the pixel values at indices textureless_map
% Estimate the veiling-light to be the median value in the region.
A(color_idx) = img_tmp(idx_median);
end

カテゴリ

ヘルプ センター および File ExchangeImages についてさらに検索

質問済み:

2018 年 9 月 25 日

回答済み:

2018 年 9 月 25 日

Community Treasure Hunt

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

Start Hunting!

Translated by