Beirut – Day 1

Posted in News | 1 Comment

ofxOpenCviPhone with OpenCV2.0

At this point I can’t remember why I went with OpenCV1.0 to bundle with the oF extension, but Timothy Llewellynn was nice enough to point out that I could upgrade, so I did!

http://4u.jeffcrouse.info/of/ofxOpenCviPhone.zip
— This version has OpenCV2.0 compiled for armv6 and armv7 in a single universal. I didn’t bother to compile for i386 because the camera doesn’t work in the simulator and that’s what I was using it for. But if someone wants to throw that into the universal too, please let me know.

Also, Timothy was nice enough to send me OpenCV1.1 – apparently the most stable version ATM? — compiled for arm, so if you want to get these and replace them, you can do that also.

Posted in Howtus | 2 Comments

Searching WordPress.com with PHP

One of my students wants to search WordPress.com entries in her project.  Here’s how!

<?php
// Change this!
$query = "There's no such name as Brahbrah";

// WordPress supplies search results in JSON format.
$url = "http://en.search.wordpress.com/?f=json&q=".urlencode($query);
$contents = file_get_contents($url);
$posts = json_decode($contents);

// Now loop through all of the results
if($posts != NULL)
foreach($posts as $post):
?>
	<!-- Here is where all of the entries get printed out -->
	<h2><a href="<?php echo $post->link; ?>"><?php echo $post->title; ?></a></h2>

	<p>by <?php echo $post->author; ?> on
	<?php echo date('l jS \of F Y h:i:s A', $post->epoch_time); ?></p>

	<p><?php echo $post->content; ?></p>

<?php endforeach; ?>

PS: If your server complains about ‘file_get_contents’, paste in this function and replace ‘file_get_contents’ with ‘curl_get_contents’

function curl_get_contents($url) {
	$ch = curl_init();
	curl_setopt($ch, CURLOPT_HEADER, 0);
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
	curl_setopt($ch, CURLOPT_URL, $url);
	curl_setopt($ch, CURLOPT_USERAGENT, 'Googlebot/2.1 (+http://www.google.com/bot.html)');
	curl_setopt($ch, CURLOPT_REFERER, 'http://www.google.com');
	curl_setopt($ch, CURLOPT_ENCODING, 'gzip,deflate');
	curl_setopt($ch, CURLOPT_AUTOREFERER, true);
	$data = curl_exec($ch);
	curl_close($ch);
	return $data;
}
Posted in Howtus | Leave a comment

ofxiPhoneVidGrabber and ofxOpenCviPhone

UPDATEsee this post.

The 4.0 release of the iPhone OS has introduced access to the pixel data of the live camera stream through the AVCaptureDevice class in the AVFoundation framework.  Want to use it?  OK!

If you want the SUPER SIMPLE way and just want to start playing around immediately, get this version of oF that I fixed up for the 4.0 OS.

http://4u.jeffcrouse.info/of/of_preRelease_v0061_iPhone4_FAT.zip
otherwise (and I recommend it), read on.

Read More »

Posted in Howtus | Leave a comment

Invisible Threads in Greece

Esse, Nosse, Posse

common wealth for common people

Posted in News | Leave a comment

Gucci Group Interactive Screen

Here is a quick little project I did for Dave, who now goes by Fever Creative.

I wasn’t able to go to Miami, where it was used, but Jacob Milam took some videos and pictures.  A video of a runway show floats around the screen, following the users face, while the liquid simulation (thanks Memo! www.memo.tv/ofxmsafluid) in the background reacts to the users silhouette.

I’m now trying to figure out what I should release that would actually be useful for people.  I ended up making a kind of comprehensive ComputerVision class that does

  1. smile detection
  2. Face detection (using ofxCvHaarTracker)
  3. optical flow (using ofxCvOpticalFlowPyrLK)
  4. FERN detection
  5. blob detection w/background subtraction

It’s all pretty well optimized, and easily configurable.  Of course, it can’t do all of these things at once — too much CV!  Eh – nothing special, but if you want it, it’s yours!


Posted in Projects | Tagged | Leave a comment

ofxJSON

A couple of students also asked about using JSON in openFrameworks.  Here is a quick example of using json-cpp.

JSONExample: using json-cpp in openFrameworks. XCode format

NOTE: you will need this updated version of ofxHttpUtils_03 and ofxThread (which comes with the FAT version of oF) to run the example.

Posted in Howtus | Tagged , , | Leave a comment

mis/information technology professional

Is this my new job title?

I wish I could take credit for putting this into some form at some point, but I honestly don’t remember.

Posted in News | Leave a comment