问题
I want to create a program that can detect a marker in a real-time video stream an replace the marker with part of a picture i took before. I am using ARtoolKit to recognize the marker. First i will grab the video frame and save it as a jpg file then i will put the marker and let the video recognize the marker. After the program recognize the marker but pressing a keyboard key i will call a function hode marker() who receive the jpg and the coordenates of the marker. Maybe by using ImageMagick i will crop the image to feet the coordenates. Then i will maybe create a opengl plane with the croped image has texture. Need some help with how to code this.
回答1:
This is called tracking. There are many references on the Wikipedia page to get you started.
来源:https://stackoverflow.com/questions/8576417/following-and-replacing-a-marker-in-a-real-time-video-stream