Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gradient structure tensor size #14

Open
TingfengTang opened this issue Oct 10, 2020 · 1 comment
Open

Gradient structure tensor size #14

TingfengTang opened this issue Oct 10, 2020 · 1 comment

Comments

@TingfengTang
Copy link

The paper said that the gradient is computed at a quater of the full resolution(In section 5.1.2, we create a single pixel from a 2 × 2 Bayer quad by combining four different color channels together. This way, we can operate on single channel luminance images and perform the computation at a quarter of the full resolution cost and with improved signal-to-noise ratio), but the code allocation size is still the RawWidth*Rawheight(the snippet in class prepareAccumulation : _structureTensor4=new NPPImage_32fC4(_pefFiles[refImage].RawWidth,_pefFiles[refImage].Height)). Can you tell me what is the difference between your relization and the description in the paper, thanks!

@kunzmi
Copy link
Owner

kunzmi commented Oct 10, 2020

There are two main differences: First I'm doing all calculations at full resolution, and second is the averaging of the structure tensor: In the original paper they seem to take a 2x2 box and take the average of the x^2-derivative, y^2-derivative and the xy-diagonals. So they obtain one tensor for a 2x2 block of an image of half the size: that makes the quarter of full resolution.
Me on the other hand, as I said, I compute the derivatives on a gaussian smoothed full resolution image and then I apply another gaussian filter to the x^2,y^2,xy components of the structure tensor for the averaging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants