Processing OpenGL Tutorial Video #2- Bubbles! from Andy Best on Vimeo.

Interested in performing high-performance, high-quality video processing, computer vision, motion tracking, and analysis? And want to do it in the friendly Processing coding environment – an ideal place to start, even for non-programmers? First, you’ll want to read Andy Best’s introduction to OpenCV posted a few days ago, to get started with the topic:

Processing Tutorials: Getting Started with Video Processing via OpenCV

But we’ve got next steps for you, as well. Andy has added a second tutorial which begins to cover actual motion analysis. It’s a simple technique, one possible even in Flash – but with OpenCV and Java/Processing, it can run very efficiently, and it’s a good stepping stone to more sophisticated techniques. Andy writes:

In this tutorial, I will show you how to use a thresholded frame difference (motion) image in order to perform collision detection with objects onscreen. Essentially we will be creating something similar to one of the old webcam games where you can ‘pop bubbles’ with your hands (or indeed anything that moves).

Processing OpenCV Tutorial #2- bubbles [andybest.net]

For another trick, here’s reader naus3a playing with OpenCV’s face recognition algorithm. I’ll let you figure out what to do with this one (but it could make an interesting performance tool … hmmm).



Andy also points us to two other powerful techniques using other libraries, as seen on Bryan Chung’s blog:

Augmented Reality Library in Processing
Gesture Recognition in Processing 1

The gesture recognition toolkit uses a mouse as input, but the idea could be applied to video, as well.

Good stuff, and we’ll keep following applications and keep the tutorials coming. Let us know how you fare, and if you get stuck / have any questions.

One little point on Andy’s tutorial. Andy says: “The fact that Processing is based in Java means that while it isn’t as fast as a higher level language like C, it makes up for it with the huge amount of libraries availiable to the Java platform. If speed is what you’re after though, I’d definitely recommend the C++ framework OpenFrameworks.” Now, I’m a big fan of OpenFrameWorks. But in fact, when you’re using OpenCV inside Processing, you should get performance roughly equivalent to OpenCV in OpenFrameWorks/C++, because OpenCV is built with C++. And it is possible to get high performance with Java (which is a higher-level, not lower-level language than C), though the actual variables there can be complex, having to do with the garbage collector, whether you want real-time performance, and what libraries you’re using. Anyway, best to think of these as separate tools, and certainly you should feel perfectly confident in using Java/Processing if you like!

  • http://www.danreetz.com daniel reetz

    These works with OpenCV and Processing are really exciting.

    What are the chances you'd do an "ask the community" post on the state of webcams with Processing on Windows/Mac/Linux? We could all do more vision if we had working cameras…

  • http://www.andybest.net Andy Best

    I guess it is true what you say about all of the OpenCV stuff being just as fast due to the library being in C++, but I find that the performance hit comes when writing the OpenCV image onto the Processing window (stage?). I'm not sure if it is just me, but I'm finding it a lot faster to use a blend() command to put the image into the window than just using image().

    @daniel reetz As I understand it, webcam support is pretty good on Windows (being that most webcams will have windows drivers). I believe it depends on the video capture method that you use though (you might want to try different libraies to see which one works best for you- processing.video, jMyron, OpenCV capture etc). As for OS X, I believe that the webcam usually has to be compatible with QuickTime, however, there is an open source driver that has support for quite a few webcams here http://is.gd/14jH (Support for some cams is better than others).

  • http://createdigitalmusic.com Peter Kirn

    Ah, yes — now that's because PImage and image() specifically weren't really intended for high performance or video. You can use GSVideo and GLGraphics for a much more efficient solution there.

    I'd love an ask the community on working webcams; sounds like a great idea. Was there something specific you wanted to ask, or just to see what folks are using?

  • http://www.andybest.net Andy Best

    Peter Kirn- I shall have a look into them, thanks for the tip :)

  • naus3a

    i really want to get my hands wet with GSVideo: my computer vision sketches work quite smooth, but when i add a mixed reality layers stuff begin to get heavy. by the way i'm working these days on a real world mixed reality presentation/gig tool… it could be a nice test

  • http://www.danreetz.com daniel reetz

    Andy, you're correct that most webcams have a driver on Windows but my previous experience with Processing and WinVDIG was totally miserable. I tried three different webcams, and ended up only getting one of them to work, at a miserable 320×240. I'll check out the different libraries, thanks.

    I could try to outline a question, but maybe outlining a goal makes more sense — what would be cool is if we'd all find that one model of webcam that had good enough performance (say, VGA at 30fps) and worked on and with *everything*, ideally with a "native" driver — the community model I've seen before is the way the wireless hacking community finds well-performing, permissive wireless cards that work on Windows, Linux, and Mac. Macam, linked above by Andy, looks pretty close.

    I mean, sure, I can buy the Logitech whatever, install their sheds of crapware, and it will *probably* work (or I can return it and lose only the hours of screwing around with it), but it's hard to find these experiences and this kind of information in a database or forum. Perhaps that's because for the people it works for, it works well and without much effort, and for the others, it's too frustrating to get started. Having spent hours playing with different cameras and Googling around, the input of people with working setups would be invaluable.

  • http://createdigitalmusic.com Peter Kirn

    Hey Daniel,
    WinVDIG is a disaster. Avoid at all costs. In fact, I think it's fair to say with Processing NO ONE should be using the default QuickTime library unless they're on a Mac and really desperate. The path forward I believe is going to be GSVideo wrapping native support on each platform (even QuickTime Java, on which Processing's default video library is based, doesn't really count as "native" on the Mac, because it's a deprecated, dead library).

    GSVideo or the native capture routines in OpenCV will both serve you well.

    Oh, and also avoid Logitech at all costs. (I know, I'm full of great news here.) I've seen major conflicts between their drivers and audio, and other significant sources of instability. Certainly, you don't want to install their video driver.

    But I agree absolutely — shared video knowledge would be huge. Maybe we can even have a little Processing install / test party with these libraries and cameras on IRC for cdmotion. ;)

  • http://www.danreetz.com daniel reetz

    Certainly, you don’t want to install their video driver.

    Yeah, pretty sure that's what hosed me in the end — the multiple driver installs irreversibly destroyed my ability to get new cams working. So, OK, no Logitech (no surprise, and I've had similar experiences with Creative products) and no WinVDIG (from your advice and my experience)… Which webcam to use, then?

  • http://www.danreetz.com daniel reetz

    And sure, I'd install an IRC client for such a party. ;)

  • http://createdigitalmusic.com Peter Kirn

    Well, any driverless camera is your best first bet. I think Creative and even Logitech have a class-compliant camera… mine is a Live! Cam Optia or something? I'll write it up.

  • Pingback: Bruno Campagnolo de Paula weblog » Resumo do dia para 2009-02-11

  • Pingback: R.Seiji » links for 2009-02-24

  • JasononCDM

    I've installed the Open CV folder in libraries and now I'm getting an "unexpected token:|"error.

    The line highlighted is: Go to Previous message | Go to Next message | Back to Messages

  • adambentley

    thanks for the tutorials. does anyone have experience using integrated laptop cameras with opencv and processing?

  • Pingback: kodama.pixel » Blog Archive » Digital Studio – Week 05

  • http://augmented.taba.ru/ SysGOD

    http://augmented.taba.ru/  My page with video of Ogre3D augmented reality

  • http://www.shervinemami.co.cc/openCV.html Shervin Emami

    If you want to learn how to do Face Detection and Face Recognition in OpenCV, there is a tutorial and source-code at
    http://www.shervinemami.co.cc/faceRecognition.htm
    It also has some other OpenCV tutorials that you might like.

  • Chris

    I have been trying on and off for a year to get

    OpenCV working with Processing sketches.

    I always get:

    The package “Hypermedia” does not exist etc etc warnings on compile.

    Many others have had similar problems – there’s a thread that has been discussing the problem for over a year, with no solution apparent:
    http://processing.org/discourse/yabb2/YaBB.pl?num

    I have tried all the suggestions on this thread, and many others, on four different Windows XP machines, with every version of OpenCV ever released.

    I can’t get the darn thing to work.

    Is anyone clever enough to have a solution?

  • Ultimate Colossus

    [b]Buy Toys Online: An Easy and Prompt Buying Option[/b]

    Are you one of them who want to buy toys online for kids? If your answer is affirmative, then no need to get fretted as there are a number of online stores available selling numerous types of toys at affordable rates. Some even ships the toys the very same day at the customer's doorsteps. Nowadays, toys are no longer just playing commodity, Infact, they have been proved as great products that assist in the overall development of a child. With this concept in mind, the educational toys was designed and manufactured that help child to learn with playway method.

    Buying toys from online stores

    Individuals are suggested to buy toys online. Reason being, the process is not only promt and easy, but also brings the toys at affordable rates. With the presence of online stores, no one needs to waste their time in moving around shops on their week offs. Some of the popular toys available in the online market include barbie dolls, car toys, transformers or Lego toys, etc. One can order toys according to his/her requirement and budget.

    Types of toys

    With the presence of online stores, kids can buy different types of toys such as educational toys, activity toys, learning toys, toddler toys and play toys. Most of the stores categorize as toys for boys and toys for girls; therefore buying toys for your kids is now not a hard nut to crack. Toys aid children in all round development and make them able to learn the skills of life. Buy toys online but keep in mind that the toys you are going to buy must not only be safe and sound, but also play an important role in your child's development. You also need to ensure that the store is reputed and doing well in the business of selling toys.

    Reading testimonials

    Online stores bring testimonials of customers. Before buying toys from online stores, people need to read the testimonials of parents who have already purchased such toys. And thus, they come to know about the advantages and disadvantages of the toys. In fact, environment friendly toys can also be considered as a good option for your kids.

  • http://www.grau.ru Mihail788
  • http://forums.dawnrose.net/member.php?3870-Patwykn Guiggkn

    Salutations à tous,

    En premier lieu , donnez-moi l'occasion de vous démontrer mon appréciation pour toutes les très pertinentes infos que j'ai découvertes sur cet agréable site web .

    Je ne suis pas sure d'être au meilleur section mais je n'en ai pas trouvé de meilleure .

    Je proviens de Iroquois , us . J'ai 46 années et j'ai cinq agréables enfants qui sont tous âgés entre 2 ou 16 années (1 est adoptée ). J'adore beaucoup les animaux domestiques et je fais de mon mieux de leur offrir les fournitures qui leur rendent la vie plus agréable.

    Merci dors et déjà pour toutes les superbes délibérations dans le futur et je vous remercie de votre compréhension pour mon français moins qu'idéal : ma langue maternelle est le portuguais et je tempte d'éviter les erreurs mais c'est très difficile!

    Bye bye

    Arthru

  • Trermaarrergo

    11111

  • Pingback: OpenCVことはじめ : circumstance evidence

  • Phethy

    диеты без вреда длят здоровьяотложение солей японская бессолевая диетасухари диетацентр грация для похудения г. харьковпрограмма снижения веса похудей навсегдадиета при сахарном диабете 1типадиета для похудение ног и ляжекантицеллюлитное белье какое лучшедиета ращитанная на 5 днейдиета не есть мясосвежевыжатом морковном соке кремлевская диетавидео разнообразных зарядок чтобы похудетьдиета доктора джоши под названием очищение души и теладиеты который помогают быстро похудетьпитьевая сода похудетьдиета для пожилых при диабетепродукция одобренная национальной ассоциацией диетологовврач грузин который похудел и написал об этом книгучай для похудетьшорты для похудения с завышенной талией

  • http://dieta2011.16mb.com/ ninelliya

    http://dieta2011.16mb.com/ – диета ради вас!!!

  • http://www.dsds.biz DSDS

    DSDS – Deutschland sucht den Superstar – Wer will 3 Tage auf die Malediven?

    ——–> http://www.dsds.biz

    Am 9.12.2011 wird unser erster DSDS Weihnachtskalender geöffnet:

    Den ersten Kandidat der TOP 15 im Jahr 2012 geben wir bekannt.

    Nach jedem Tag ab dem 9.12. erfolgt ein weiteres Fensterchen mit einem weiteren DSDS TOP 15 Kandidaten.

    Am Heiligabend (24.12.2011) wird dann die große Doppelpforte aufgeklappt: ALLE TOP 15 Kandidaten werden preisgegeben, d.h. jeder bekommt als Weihnachtsgeschenk den Vor und Nachnamen des Kandidaten.

    Achtung: Wer uns von den 15 Kandidaten das erste Privatfoto innerhalb von 3 Tagen zusendet bekommt eine Reise nach Malediven mit 3 Tagen Hotel, Flug von einem Flughafen innerhalb Deutschland, Austria oder Schweiz.

    Weiterhin erscheinen von Knecht Ruprecht die ersten Bilder der Malediven!

    Schaut mal rein!

    Ronny

  • newsmakl

    Geschäftszeichen: 11 IN 23/07: In dem Insolvenzverfahren über das Vermögen der

    T-C-H Service GmbH & Co. KG, Breitenstraße 37, 36251 Bad Hersfeld (AG Dresden, HRA 5714),

    vertreten durch:

    1. TCH Vermögensverwaltungs GmbH, (persönlich haftende Gesellschafterin),

    vertreten durch:

    [b]1.1. Florian Grotehans, Am Baumgarten 12, 36251 Bad Hersfeld, (Geschäftsführer),[/b]

    wird die Prüfung der nachträglich angemeldeten Forderungen im schriftlichen Verfahren gemäß § 177 Abs. 1 Satz 2 InsO angeordnet. Geprüft werden alle bislang ungeprüften Forderungen, die noch bis zum 09.08.2011 einschließlich zur Insolvenztabelle angemeldet werden.

    Die Schuldnerin, die Insolvenzgläubiger und der Insolvenzverwalter werden aufgefordert, ein eventuelles Bestreiten der Forderungen bis zum 24.08.2011 schriftlich beim Insolvenzgericht einzureichen oder zu Protokoll der Geschäftsstelle zu erklären.

    Anderenfalls gelten die Forderungen nach Ablauf dieser Frist als festgestellt. Die bereits geprüften Forderungen werden von der mit diesem Beschluss angeordneten besonderen Forderungsprüfung nicht betroffen.

    Amtsgericht Bad Hersfeld, 27.07.2011

  • neureaubataro

    Hey All,

    Greetings from Jalapa

    I’m conclusion I’m getting a everything of spam on my wordpress blog

    antispam

  • flogrohe

    Amtsgericht Bad Hersfeld Aktenzeichen: HRB 2126 Bekannt gemacht am: 18.02.2010 12:00 Uhr

    Veröffentlichungen des Amtsgerichts Bad Hersfeld In () gesetzte Angaben der Anschrift und des Geschäftszweiges erfolgen ohne Gewähr.

    Löschungen von Amts wegen

    30.12.2009

    Florian Grotehans Vermögensverwaltungs-GmbH, Bad Hersfeld, (Am Baumgarten 12, 36251 Bad Hersfeld).
    Die Gesellschaft ist gemäß § 394 Absatz 1 FamFG [b]wegen Vermögenslosigkeit[/b] von Amts wegen gelöscht.

    Florian Grotehans Vermögensverwaltungs GmbH vermögenslos!

  • http://plponsable.co.cc weiniacrame

    AIMP для Android
    HTC Sync 3,0
    Earthworm Jim Android
    лучший видеоплеер для Android
    Fm передатчик для Android
    http://twmobilia.co.cc

  • http://dieta-plus.com.ua/ PodiGdc

    Вирус может привести к ожирению
    Каждый день ученые в мире открывают все новые и новые механизмы развития ожирения у людей. Поэтому совместное заявление французских диетологов и бактериологов, можно считать обычной закономерностью.

  • KutaqBqexe

    Hello
    strongarmer imprinted dilation

  • http://jonathanmelgoza.com/blog/ Jonathan Melgoza

    Genial