ncmoment.m
上传用户:zslfgd
上传日期:2010-04-06
资源大小:115k
文件大小:1k
源码类别:

图形/文字识别

开发平台:

Matlab

  1.      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2.    %%                                                            %%
  3.  %%       Prof. Sclaroff's CS585 Image avd Video Processing       %%
  4. %%                         Project  ONE                            %%
  5. %%           C H A R A C T E R   R E C O G N I T I O N             %%
  6. %%                                                                 %%
  7. %%                    by Stanislav Rost                    %%
  8.  %%                       ID:  31764117                           %%
  9.   %%                                                             %%
  10.    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  11. function result = ncmoment(j, k, matrix, width, height)
  12. % NORMCENTRALMOMENT.M
  13. %
  14. % function result = normcentralmoment(j, k, matrix, width, height)
  15. %
  16. % Returns (j,k)-th normalized central moment of 2D binary image "matrix"
  17. gamma = (j+k)/2 + 1;
  18. result = centralmoment(j, k, matrix, width, height)/...
  19.           (centralmoment(0, 0, matrix, width, height)^gamma);