Gradient Image Normalization Process

2 visualizaciones (últimos 30 días)
Matlab Student
Matlab Student el 2 de Oct. de 2018
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

Respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by