Gradient Image Normalization Process

조회 수: 2 (최근 30일)
Matlab Student
Matlab Student 2018년 10월 2일
Hello Team,
I need to follow the below equation (attached as an image) in order to normalize the gradient image after calculating the absolute difference between horizontally adjacent pixels.
This normalization method was proposed in "A no-reference blocking artifact measure for adaptive video processing" for Muijs, R. and Kirenko in 2005.
So I have written this code but I wonder how can I verify if this will work correctly? It did not display any error, but how can I confirm if the results are correct?
if true
% code
imageArray = imread('index.jpg');
Diff_H = abs(diff(imageArray,1,2))
[rows_H cols_H] = size(Diff_H)
sum = 0
Diff_H_norm = zeros(rows_H, cols_H)
for j=1:1:rows_H
for i=1:1:cols_H
for z=1:1:cols_H
if (z ~= i)
sum = sum + power(Diff_H(z,y),2)
end
end
Diff_H_norm(i,j) = Diff_H(i,j)/sqrt((1/(2*cols_H))*sum)
end
end
end

답변 (0개)

카테고리

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