Image Shift Search

How to find the shift and rotation between two images using the programming languages ​​vb.net or C ++ or C #?

+3
source share
5 answers

The problem you are talking about is called motion detection (or motion compensation) and is one of the most important image and video processing issues at the moment. There is no simple “here are ten lines of code that will do this”, a solution exists, with the exception of some really trivial cases.

Even your seemingly trivial case is rather complicated, because turning to an unknown angle can lead to small phased changes that cannot be easily detected without specially designed algorithms used to detect motion.

+6
source

There is no short answer. You can try using the free OpenCV library to find the relationship between the two images.

+1
source

, , . , , "", , "" A B. OpenCV, , : CalcOpticalFlowLK CalcOpticalFlowPyrLK.

. , . , , . , "", .. . , .

, , , , . .

+1

, . , . , .

, . (, 3x3 ) greyvalue z (x, y), 9 . , , . . , 90 , - .

, . ; , . .

, , , , .

0

If the images are exactly the same, it’s quite simple to extract some points of the function — for example, using SIFT — and compare the features of both images. Then you can use any two suitable functions to search for rotation and translation. A translation is simply the difference between two points of correspondence. You compensate for the translation in one image and get the rotation angle as the angle formed by the three remaining points.

0
source

Source: https://habr.com/ru/post/1716555/


All Articles