I figured it out. The problem was the misunderstanding of the code in the imagerecognition.jsl. This is how it works for me:
this.tracker = new AR.Tracker("assets/carAdPC.wtc", { // name of the target collection onLoaded: this.worldLoaded });
// Create overlay for page one var imgOne = new AR.ImageResource("assets/imageOne.png"); // name of the image to show var overlayOne = new AR.ImageDrawable(imgOne, 1, { offsetX: -0.15, offsetY: 0 });
var pageOne = new AR.Trackable2DObject(this.tracker, "carAd", { // name of the image that was uploaded to create the target collection and not the name of the target collection itself // at this point I was a bit confused drawables: { cam: overlayOne } });
Thank you so much for your help!
M
Markus Eder
said
about 9 years ago
Hi there!
You are right the wtc file you attached is corrupted as well. However it obviously is not a problem with the image as i could successfully create a wtc file and track the target using your image. So again i think it's a problem with your network. Have you already tried it out on a different workstation?
r
rafiq alzair
said
about 9 years ago
Hi Markus,
thank you for your answer. I tried again to create a wtc-file using the wikitude target management tool on your server. But the file I got, seems to be corrupted as well. I used the following combinations to upload the image and download the wtc-file:
Mac OSX + Chrome and
Windows 8.1 + FireFox.
M
Markus Eder
said
about 9 years ago
Hi there!
I investigated the issue with your wtc file and it seems that the file is corrupted. Maybe something happened to the file while downloading from the server or the image you are sending to the server is already corrupted. Please try to recreate and download the wtc file using the Target management tool on our server.
Thx,
Markus
r
rafiq alzair
said
about 9 years ago
Hi, I have the same problem. The wtc-files, I generated and downloaded with the Target Manager seems to be not valid.
What can I do to get a valid wtc-file. Maybe there is a work-around?
Thanks in advance
N
Nicolas Goell
said
about 9 years ago
Hi,
I had a look at the files you posted. The image you posted should work all right for image recognition but it seems that your magazine.wtc is not valid (maybe it got corrupted during download).
Additionally, there is an error in your imagerecognition.js: when you name the image to be recognized surfer.png, your target will be named "surfer" and you have to set the according name for the AR.Trackable2DObject in line 24:
var pageOne = new AR.Trackable2DObject(this.tracker, "surfer", {
drawables: {
cam: overlayOne
}
});
Please update your .js accordingly and try the validated magazine.wtc attached to this post. If this is working within your sample, please try to re-generate the magazine.wtc yourself and cross-check if that is working as well.
If you encounter any more issues, please reply to this post.
Regards, Nicolas
n
nimna devassy
said
about 9 years ago
I have edited the wikitude sample program with different images and i have named them with same filename and image name. Still the traget image is not caught .
nimna devassy