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

조회 수: 1(최근 30일)
ElizabethR
ElizabethR 2016년 3월 5일
댓글: Devi Timilsina 2017년 7월 24일
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
Devi Timilsina
Devi Timilsina 2017년 7월 24일
Hi ElizabethR, I am also looking for the answer of your question. you might have finished your zernike moments project until now. I am doing Discrete orthogonal hahn's moments and I am stuck in very early stage. Please help me. you can email me at mezerocooltimilsina@gmail.com . Please help

댓글을 달려면 로그인하십시오.

답변(1개)

Explorer
Explorer 2016년 3월 5일
편집: Explorer 2016년 3월 5일
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
ElizabethR
ElizabethR 2016년 3월 5일
편집: ElizabethR 2016년 3월 5일
Thanks for your explanation,
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 ?

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

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

Start Hunting!

Translated by