필터 지우기
필터 지우기

How to substitute p(x/a+x1,y/a+x2) to p(x,y),where p(x,y) is original image, x1 and x2 are the centroid of p(x,y),x1=​m10/m00,x2​=m01/m00,a​=sqrt(β/m0​0),β is a predetermined value. In fact, this is doing scale and translation normalization

조회 수: 1 (최근 30일)
How to substitute p(x/a+x1,y/a+x2) to p(x,y),where p(x,y) is original image, x1 and x2 are the centroid of p(x,y),x1=m10/m00,x2=m01/m00,a=sqrt(β/m00),β is a predetermined value. In fact, this is doing scale and translation normalization
  댓글 수: 4
Rik
Rik 2021년 2월 15일
Sounds like you want interpolation. The easiest way to do that is to generate a coordinate grid (e.g. with meshgrid or ndgrid).
Again, what have you tried? That might make it a bit more clear what you actually mean and what your specific problem is. What step is giving you trouble?
Abul Abbas
Abul Abbas 2021년 2월 15일
I have realized translation invariance by transforming the image into a new one whose first order moments, m01 and m10, are both equal to zero. This is done by transforming the original f (x, y) image into another one which is
f (x+x', y+y') where x' and y' are the centroid location of the original image. In summary an image function f (x, y) can be normalized with respect to scale and translation by transforming it into g (x, y), where
g(x,y) = f(x/a+x', y/a+y')

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

답변 (1개)

Bjorn Gustavsson
Bjorn Gustavsson 2021년 2월 15일
You solve that with interp2:
xi = xC + [-dx:dx]*xScale;
yi = yC + [-dy:dy]*yScale;
[xi,yi] = meshgrid(xi,yi);
p_prime = interp2(1:size(p,2),1:size(p,1),p,xi,yi);
You have to check for xi and yi falling outside of the image-coordinates, and handle that afterwards. By default you'll get nan-values. Check the help and documentation for interp2 for details. You'll also easily translate your coordinate-transformation to the one above.
HTH
  댓글 수: 7
Bjorn Gustavsson
Bjorn Gustavsson 2021년 2월 15일
If you have an image you only have information about the image intensities between the first and last pixels of the image, if you try to extrapolate intensities outside the image support [1 - sy , 1 - sx] you are only guessing. Matlab will allow you to do that type of guess-work, check the help and documentation for extrapolation-methods. Don't expect anything that is all that much worth by extrapolating, there is allways place for Occams pink elephant just outside the field-of-view.

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

카테고리

Help CenterFile Exchange에서 Images에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by