how to write f(x,y) (digital image) in matlab code ?

3 visualizaciones (últimos 30 días)
ElizabethR el 5 de Mzo. de 2016
Comentada: Devi Timilsina el 24 de Jul. de 2017
i want to make a function for feature extraction, in the method there is a formula f(x,y) that express the value intensity in (x,y) coordinat pixel. How i write f(x,y) in matlab code? thank you
1 comentarioMostrar -1 comentarios más antiguosOcultar -1 comentarios más antiguos
Devi Timilsina el 24 de Jul. de 2017

Iniciar sesión para comentar.

Respuestas (1)

Explorer el 5 de Mzo. de 2016
Editada: Explorer el 5 de Mzo. de 2016
I don't know what formula you are talking about but the general method to make a function in MATLAB is as follows:
Let' say you want to make a function for finding voltage using Ohms Law
Open script file, write:
function [v]=ohm(i,r) % 'i' and 'r' will be inputs
v=i*r
end
save it as ohm.m
Now, you can call your function in command windows as follows:
i=2; r=4;
ohm(i,r)
1 comentarioMostrar -1 comentarios más antiguosOcultar -1 comentarios más antiguos
ElizabethR el 5 de Mzo. de 2016
Editada: ElizabethR el 5 de Mzo. de 2016
i want to make Zernike moments function to extraction feature of an image.
here the formula :
z_pq= (p+1)/π ∑_x ∑_x f(y,x) V_pq (y,x)
f(y,x) is the value intensity pixel in coordinate (y,x). So how to translate it to matlab code ?

Iniciar sesión para comentar.

Categorías

Más información sobre Zernike Polynomials 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