AlvaAR
AlvaAR copied to clipboard
Image (marker) tracking?
Hello,
Could AlvaAR be used (or adapted to be used) for recognition and tracking of images (i.e. image markers)?
Hi mate, can't answer your question but jsartoolkit or mindar are two libs for image tracking on the web.
thanks @ThorstenBux
They're interesting libraries. Do you know of any others that can enable 3D object tracking in Javascript?
Hi @skeegan,
While AlvaAR includes all the essential subroutines for NFT image tracking as part of its SLAM algorithm, they are primarily designed for SLAM within the library and are not specifically optimized for NFT image tracking. To achieve your goal, you can follow these rough steps:
- Feature Detection/Extraction: Use Harris corners to identify and extract unique feature points from a reference image.
- Feature Descriptors: Apply ORB descriptors to describe these unique features.
- Process Camera Frames: Repeat steps 1 and 2 for each camera frame to detect features and match them with the target image features.
- Select Good Matches: Use k-NN (k-nearest neighbors) to filter and keep only the good matches.
- Pose and Orientation: Find homography using RANSAC, calculate the corners, and use solvePnP with these corners to obtain rotation and translation vectors.
- Camera Projection Matrix: Create and send this matrix to your 3D environment (Three.js, Babylon, AFrame, etc.).
- Render and Update: Overlay and dynamically update digital content in your application based on the camera projection matrix.
- Continuous Tracking and Updates: Continuously track the target image and update the overlay as needed.
If you check out the library's code, you'll find that all these subroutines are present, though with a focus on SLAM rather than NFT image tracking.
I'm considering adding this feature in the future. In the meantime, you might find these additional resources, complementing what ThorstenBux suggested, helpful: OpenCv, AR.js, martins-js, Object tracking using Homography in OpenCV
Many thanks @alanross . Your response was very thorough and helpful