This forum is disabled, please visit https://forum.opencv.org

1 | initial version |

The gradients should have the opposite direction. That is, the orientation `ori' = (ori + 180) % 360`

.

Following that the resulting SIFT descriptor of the inverted image is a permutation of the original SIFT descriptor. To obtain it you have to swap the contents of gradient bins of the original bin and the bin with associated with the opposite direction.

2 | No.2 Revision |

The gradients should have the opposite direction. That is, the orientation `ori' = (ori + 180) % 360`

.

Following that the resulting SIFT descriptor of the inverted image is a permutation of the original SIFT descriptor. To obtain it you have to swap the contents of gradient bins of the original bin and the bin ~~with ~~associated with the opposite direction.

3 | clarifications |

The gradients should have the opposite direction. That is, the orientation `ori' = (ori + 180) % 360`

~~.~~ (assuming that `ori`

is in `[0°, 360°]`

. Most likely the orientation is in `[-180°, 180°]`

; you have to adapt the equation appropriately.)

Following that the resulting SIFT descriptor of the inverted image is a permutation of the original SIFT descriptor. To obtain it you have to swap the ~~contents of gradient ~~descriptor bins of the original bin and the bin associated with the opposite ~~direction.~~direction.
It is probably the easiest to draw it first an sheet of paper to see the effect of gradient inversion.

Copyright OpenCV foundation, 2012-2018. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.