Error in image normalization
    4 次查看(过去 30 天)
  
       显示 更早的评论
    
Hello Team,
I have written this code to compute the normalization of a gradient image.
if true
  % code
function [horDiffNorm, verDiffNorm] = normalization(H, V)
    sumH = 0;
    sumV = 0; 
    [rowsH, colsH, depthH] = size(H);
    [rowsV, colsV, depthV] = size(V);
    for jH = 1:1:rowsH
        for iH = 1:1:colsH
            for zH = 1:1:colsH
                if (zH ~= iH)
                    sumH = sumH + power(H(jH, zH), 2);
                end
            end
            horDiffNorm(jH, iH) = H(jH, iH)/ sqrt(double(1/(2*(colsH-1))*sumH));
         end
    end
  end
end
I performed debugging and noticed the value of SumH reaches (255) at zH = 32 and then it stuck at 255, even though the next pixels are not 0.
Can you please help?
0 个评论
采纳的回答
更多回答(1 个)
另请参阅
类别
				在 Help Center 和 File Exchange 中查找有关 Image Processing Toolbox 的更多信息
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


