It's about having fun. If you're not having fun, why are you doing it?
Great Demo for Augmented Reality.Thanks a lot.
Excellent!!!!!Thx a bunch!!!!!
Hi Chris, what about a marker recognition? Do you have some place to point for that? Have you some snippet code to show?Really Thanks!!
So glad to find this. And I echo Chris's question about marker recognition. Thanks for this.
I'm sorry, I meant Giasone's question about marker recognition.
@Giasone and Alyoshak - there's a pretty good toolkit available here that does what you want: http://www.hitl.washington.edu/artoolkit/. Unfortunately for commercial use you have to pay.What you could try doing is identifying the square in the image that contains the marker, pull it out and then pass it through one of the QR libraries - something like http://code.google.com/p/zxing/ would work.You might want to take a look at my post about Sudoku Grab - there's some information there about pulling out regions from images and perspective correcting them - http://sudokugrab.blogspot.com/2009/07/how-does-it-all-work.html
Chris, Thanks for the toolkit suggestion. By the way, I haven't been able to overcome build errors in ARDemo, all of them stemming from the inability to correctly find header files in AVFoundation framework. I know this is some kind of problem on my end, but did you have any problems with this? The AVFoundation framework is definitely added to the project. I simply downloaded the demo, expanded the compressed files, and opened it with Xcode. Any suggestions? 58 errors of stuff like "AVFoundation/AVCaptureSession.h: No such file or directory".
@Alyoshak Sounds like it's not finding the AVFoundation framework - are you building for 4.0? it wasn't introduced until then.
Also, make sure you are building for the device - it won't build for or work on the simulator.
I figured out a little earlier that I wasn't building for the device, but when I proceeded to build for it, I got even more errors (went from 19 to 58). I finally got rid of the problem, but I don't know why what I did worked. I just created a new, basic project from scratch, added the needed frameworks and added a line of code that tested whether it was finding everything it needed from the AVFoundation framework. It found it fine. So I proceeded to reconstruct the app either cutting and pasting code or importing the needed class files from the ARDemo project. She's working fine now. Sorry I couldn't figure it out. Oh, I'm building for 4.1 to answer your question.
Chris, I have another question if you have time. I've tried several times while inside captureOutput to make invocations of methods that modify ARView, but to no avail. For example, now I'm trying to change the color of a rectangle being drawn in ARView in response to having identified a certain pattern in the sampleBuffer. I try this by calling a BOOL setter on ARView and then sending it the setNeedsDisplay method so that it will redraw itself. Nothing happens because its drawRect method never gets invoked. But I learned that if I simply put the same two lines of code in the viewWasTapped method, ARView behaves as expected (updates its view with rectangle of changed color). Is there something about the captureOutput method that renders it incapable of communicating with objects of different classes? Can't find anything online about this.
@AlyoshaK - the captureOutput is running on a thread so cannot access UIKit objects. You need to use performSelectorOnMainThread.
Hi Chris nice work ! i was wondering how can i make a button that is like the shoot button of the iphone, a button somewhere that when you click it saves the image in a UIImage variable Thanks for the great code!
Thanks a lot, very helpful, any tip how to continue to recognize a marker forexample? how to analize the raw data?Thanks
Thanks a lot for this demo. To recognition question, try OpenCV library..
Thank you so much!
Thank you for this code.