Borrar filtros
Borrar filtros

three types of correlation coefficients for an image

8 visualizaciones (últimos 30 días)
faiz
faiz el 26 de Oct. de 2016
Respondida: Ranjit Shrestha el 31 de En. de 2022
i want to find the correlation cofficients for adjacent pixels in an image. i write this code and it give 2x2 matrix, now i don't know how to get horizantal, vertical and diagonal values for any image?
a=image;
a1=a(:,1:end-1);
a2=a(:,2:end);
cor=corrcoef(double(a1(:)),double(a2(:)));

Respuesta aceptada

Thorsten
Thorsten el 26 de Oct. de 2016
I = im2double(imread('cameraman.tif'));
c_diag = corrcoef(I(1:end-1, 1:end-1), I(2:end, 2:end))
c_vert = corrcoef(I(1:end-1, :), I(2:end, :))
c_horz = corrcoef(I(:, 1:end-1, :), I(:, 2:end))
  2 comentarios
faiz
faiz el 26 de Oct. de 2016
thanks a lot sir
omar A.alghafoor
omar A.alghafoor el 11 de Jul. de 2020
How are you draw this options ? for solution above
c_diag,c_vert and c_horz

Iniciar sesión para comentar.

Más respuestas (1)

Ranjit Shrestha
Ranjit Shrestha el 31 de En. de 2022
what if we have more than two images? I mean a sequence of images.

Categorías

Más información sobre Read, Write, and Modify Image en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by