{"id":2119,"date":"2009-02-20T03:29:00","date_gmt":"2009-02-20T03:29:00","guid":{"rendered":"http:\/\/pkmital.com\/home\/?p=27"},"modified":"2009-02-20T03:29:00","modified_gmt":"2009-02-20T03:29:00","slug":"opencv-with-processing-using-eclipse","status":"publish","type":"post","link":"https:\/\/pkmital.com\/home\/opencv-with-processing-using-eclipse\/","title":{"rendered":"OpenCV with Processing using Eclipse"},"content":{"rendered":"<p><a onblur=\"try {parent.deselectBloggerImageGracefully();} catch(e) {}\" href=\"http:\/\/3.bp.blogspot.com\/_9Vsc-xDxxKs\/SZ4msrcEEdI\/AAAAAAAAAMo\/x3I_n8_NwG4\/s1600-h\/Picture+15.png\"><img decoding=\"async\" style=\"margin: 0px auto; text-align: center; cursor: pointer; width: 600px; height: 171px;\" src=\"http:\/\/3.bp.blogspot.com\/_9Vsc-xDxxKs\/SZ4msrcEEdI\/AAAAAAAAAMo\/x3I_n8_NwG4\/s400\/Picture+15.png\" alt=\"\" id=\"BLOGGER_PHOTO_ID_5304719960105554386\" border=\"0\" \/><\/a><\/p>\n<p>My students for the <a href=\"http:\/\/sd.caad.ed.ac.uk\/dmsp\/?cat=4\">Digital Media Studio Project<\/a> here at the University of Edinburgh have asked me to present a small workshop on using some aspects of the Processing.org environment.  I&#8217;ve worked up something and thought I could share it online as well. <a href=\"http:\/\/code.google.com\/p\/processing-tutorial-opencv\/\"> I&#8217;ve setup a google code repository with the necessary files.<\/a>  The code simply highlights what you could find throughout the <a href=\"http:\/\/processing.org\/discourse\/yabb_beta\/YaBB.cgi\">Processing.org discourse<\/a> and the <a href=\"http:\/\/ubaa.net\/shared\/processing\/opencv\/download\/opencv_examples.zip\">OpenCV example files<\/a> though is more thoroughly commented and organized.<br \/><span style=\"text-decoration: underline;\"><br \/><\/span>A few notes, I really dislike the <a href=\"http:\/\/processing.org\/reference\/environment\/\">Processing IDE<\/a>. Maybe it&#8217;s just because I&#8217;ve used IDE&#8217;s like VS, Netbeans, Eclipse, XCode etc&#8230; and I haven&#8217;t really played with Processing enough to have a well founded basis in the functions available. I believe going through a few extra steps to setup an IDE like Eclipse makes the task of programming much easier though at the cost of a bulky editor that may not be so easy to setup at first&#8230;<\/p>\n<p>Eclipse is an (Integrated Development Environment) IDE for many coding languages, one of which is Java.  Some advantages:<\/p>\n<ul>\n<li>code completion &#8211; automatically see possible choices for all members belonging to a class definition, such as functions and their arguments.<\/li>\n<\/ul>\n<ul>\n<li>javadocs &#8211; javadoc is a formatting for writing code comments. by following a simple format, javadocs can produce a nice html document outlining all the functions\/members\/arguments\/what to expect etc&#8230; &#8211; while coding, having the ability to see javadocs is invaluable as memorizing all of the members of a class is often not ideal.<\/li>\n<\/ul>\n<ul>\n<li>browsing libraries &#8211; along the lines of javadocs, being able to see the definitions of a class are much easier than having to memorize all the  functions belonging to something like processing.core.PImage &#8211; and with the eclipse environment, you can view the javadocs along with the libraries.<\/li>\n<\/ul>\n<ul>\n<li>debug &#8211; step through your program and view the stack trace, threads, and all the messy hex numbers.<\/li>\n<\/ul>\n<p>The biggest disadvantages are that it takes time to setup a project, include files, and write the class definitions, none of which you will have to do in the Processing IDE. Luckily, there is a nice tutorial for setting up Eclipse to use the Processing libraries: http:\/\/processing.org\/learning\/tutorials\/eclipse\/ &#8211; I recommend going through this thoroughly.<\/p>\n<p><a href=\"http:\/\/sourceforge.net\/projects\/opencvlibrary\/\">OpenCV<\/a> is an open source, cross-platform library developed by Intel and used widely by researchers in fields such as medical imaging, artificial intelligence, and interactive art.  <a href=\"http:\/\/ubaa.net\/shared\/processing\/opencv\/\">There is a nice port available that includes a minimal though nice set of functions for the Processing and Java environment: http:\/\/ubaa.net\/shared\/processing\/opencv\/<\/a> &#8211; This page provides detailed instructions and very nice documentation on setting up the OpenCV environment.  If you are on OS X and are looking for the Java Extensions folder, try the folder: \/Library\/Java\/Extensions.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>My students for the Digital Media Studio Project here at the University of Edinburgh have asked me to present a small workshop on using some aspects of the Processing.org environment.&hellip;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[55,62,63,121,127,130,140,238,262,286,287,356],"class_list":["post-2119","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-background-subtraction","tag-blob-detection","tag-blob-tracking","tag-dmsp","tag-eclipse","tag-edinburgh","tag-face-tracking","tag-motion-analysis","tag-opencv","tag-processing","tag-processing-org","tag-university"],"acf":[],"_links":{"self":[{"href":"https:\/\/pkmital.com\/home\/wp-json\/wp\/v2\/posts\/2119","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pkmital.com\/home\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pkmital.com\/home\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pkmital.com\/home\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/pkmital.com\/home\/wp-json\/wp\/v2\/comments?post=2119"}],"version-history":[{"count":0,"href":"https:\/\/pkmital.com\/home\/wp-json\/wp\/v2\/posts\/2119\/revisions"}],"wp:attachment":[{"href":"https:\/\/pkmital.com\/home\/wp-json\/wp\/v2\/media?parent=2119"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pkmital.com\/home\/wp-json\/wp\/v2\/categories?post=2119"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pkmital.com\/home\/wp-json\/wp\/v2\/tags?post=2119"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}