I wrote an application that detects a square inside an image. To give you a good idea of how such an image containing such a square, in this case a marker, might look like this:
What I get after detection is the coordinates of the four corners of my marker. Now I do not know how to display an object on my marker. The object must have the same rotation angle / angle / direction as the marker.
Are there any documents on how to achieve this, any algorithms that I can use to be strong / working enough?
This does not have to be a working solution, it can be a simple description of how to achieve this or something like that. If you point me to a library or something like that, it should work under Linux, windows are not needed, but it would be great if I need to transfer the application at some point. I already looked at ARToolkit, but they were camera parameters and more complex matrices, while I got only four corner points and one image instead of the whole video / camera stream.
I believe that you can use OpenCV cvGetPerspectiveTransformto find a transformation that can convert a square to the corners of a marker, and then cvWarpPerspectiveto warp the image.
cvGetPerspectiveTransform
cvWarpPerspective
, : 2D- 3D?
. , , , . , y cooridnates 0, . , 0-1. 0 x, 1, z - get 0 1. , . , . -
x z left: 0 ? right: 1 ? front: ? 0 back: ? 1
, ? . . , , , z 0,5. 3 -, . y , , 0,1,0 , , 2D- . , , , , , , , - .
Source: https://habr.com/ru/post/1783634/More articles:Requires .NET ORM - .netЗапуск модульных тестов Silverlight в сборке TFS 2010 - unit-testingКак я могу выбрать все записи между двумя датами без использования полей даты? - dateShould MD5 enter every letter of the password? - javaAssign an empty string to a property with a current value of nothing - stringmod_rewrite for PHP RESTful Server - restDifference between Session.Clear () and Session.Contents.Clear () - asp.netCreate a scope block in the rails helper for additional methods - ruby | fooobar.comGetting registry information in a WCF service - c #How can you distribute the color intensity of two images using your gradients? - algorithmAll Articles