Pseudo zernike moment for an image

12 ビュー (過去 30 日間)
ancy micheal
ancy micheal 2020 年 12 月 8 日
コメント済み: Bjorn Gustavsson 2020 年 12 月 11 日
I want to extract Pseudo zernike moment for an image. I used the code from the link. https://in.mathworks.com/matlabcentral/fileexchange/33644-pseudo-zernike-functions. It works perfect for the given input but how do i extract moment fron an N*N imag

回答 (1 件)

Bjorn Gustavsson
Bjorn Gustavsson 2020 年 12 月 8 日
The Zernike functions are defined on the unit-disk, i.e. circel with radius 1. Your image is likely square, so your choise is to calculate the Zernike expansion of your image inscribed into a unit-circle, or calculate the Zernike expansion of the region of your image that is inside an inscribed circle. In the second example in the help of the function the moments are calculated of an 101-by-101 pixels image of the peaks function (inscribed circle). If you step through that example you will see how to do this. If you after running that script run this snippet for a couple of i1s you will get the moments for the corresponding pseudo-Zernike-functions:
figure
i1 = 7;
scatter(r.*cos(theta),r.*sin(theta),23,P(:,i1),'filled'),
title(sprintf('n: %d, m: %d, Z_n^m: %f',n(i1),m(i1),M(i1)))
If you use this inscribed circle your moments will obviously not depend on what's in the corners of your image...
HTH
  8 件のコメント
ancy micheal
ancy micheal 2020 年 12 月 11 日
Thank you sir for your timely response
Bjorn Gustavsson
Bjorn Gustavsson 2020 年 12 月 11 日
My pleasure.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeTracking and Motion Estimation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by