<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>AlexP's Weblog</title>
	<atom:link href="http://alexpopovich.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://alexpopovich.wordpress.com</link>
	<description>Software, Hardware &#38; Other Hacks...</description>
	<lastBuildDate>Sun, 06 Sep 2009 10:39:36 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='alexpopovich.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/919586334f36af687f19c3280be4ab22?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>AlexP's Weblog</title>
		<link>http://alexpopovich.wordpress.com</link>
	</image>
			<item>
		<title>The PS3Eye Multicam Driver is here!!!</title>
		<link>http://alexpopovich.wordpress.com/2009/09/04/the-ps3eye-multicam-driver-is-here/</link>
		<comments>http://alexpopovich.wordpress.com/2009/09/04/the-ps3eye-multicam-driver-is-here/#comments</comments>
		<pubDate>Fri, 04 Sep 2009 09:25:45 +0000</pubDate>
		<dc:creator>Alexander Popovich</dc:creator>
				<category><![CDATA[PS3Eye Multicam Driver]]></category>
		<category><![CDATA[Sony PS3Eye Hacks]]></category>
		<category><![CDATA[Driver]]></category>
		<category><![CDATA[Multicam]]></category>
		<category><![CDATA[PS3Eye]]></category>

		<guid isPermaLink="false">http://alexpopovich.wordpress.com/?p=271</guid>
		<description><![CDATA[Finally, here is the long awaited PS3Eye multicam driver
After a lot of testing and optimization of the internal driver code, I finally am ready to release the first version of the PS3Eye multicam driver.
For your reference, below is the diagram of the internal components of the driver. For a single camera configuration the &#8216;Image Stitching&#8217; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=alexpopovich.wordpress.com&blog=4743229&post=271&subd=alexpopovich&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><h3>Finally, here is the long awaited PS3Eye multicam driver</h3>
<p>After a lot of testing and optimization of the internal driver code, I finally am ready to release the first version of the PS3Eye multicam driver.<br />
For your reference, below is the diagram of the internal components of the driver. For a single camera configuration the &#8216;Image Stitching&#8217; component is bypassed.</p>
<p><a href="http://codelaboratories.com/images/PS3EyeMulticam.jpg"><img src="http://codelaboratories.com/images/PS3EyeMulticam.jpg" width="500" /></a></p>
<p>The driver exports simple API that allows for full control of PS3Eye cameras.<br />
I chose a C style export functions this time to allow for easier integration with different programming languages such as C#.<br />
Here is the &#8216;PS3EyeMulticam.h&#8217; file that you would normally include in your code:</p>
<pre class="brush: cpp;">
////////////////////////////////////////////////////////////////////////////////////////////
//
// This library allows you to use multiple PS3Eye cameras in your own applications.
//
// For updates, more information and downloads visit:
// http://www.alexpopovich.com or
// http://alexpopovich.wordpress.com/
//
// Copyright 2008,2009 (c) AlexP.  All rights reserved.
//
////////////////////////////////////////////////////////////////////////////////////////////
#pragma once
#include &lt;windows .h&gt;

#ifdef PS3EYEMULTICAM_EXPORTS
#define PS3EYEMULTICAM_API extern &quot;C&quot; __declspec(dllexport)
#else
#define PS3EYEMULTICAM_API extern &quot;C&quot; __declspec(dllimport)
#endif

////////////////////////////////////////////////////////////////////////////////////////////
// PS3EyeMulticam API
////////////////////////////////////////////////////////////////////////////////////////////

typedef enum{ QVGA, VGA }Resolution;

// Camera information
PS3EYEMULTICAM_API int PS3EyeMulticamGetCameraCount();

// Library initialization
PS3EYEMULTICAM_API bool PS3EyeMulticamOpen(int camCnt, Resolution res, int frameRate);
PS3EYEMULTICAM_API void PS3EyeMulticamClose();

// Capture control
PS3EYEMULTICAM_API bool PS3EyeMulticamStart();
PS3EYEMULTICAM_API void PS3EyeMulticamStop();

// Settings control
PS3EYEMULTICAM_API bool PS3EyeMulticamLoadSettings(char* fileName=&quot;settings.xml&quot;);
PS3EYEMULTICAM_API bool PS3EyeMulticamSaveSettings(char* fileName=&quot;settings.xml&quot;);
PS3EYEMULTICAM_API void PS3EyeMulticamShowSettings();

// Processed frame image data retrieval
PS3EYEMULTICAM_API bool PS3EyeMulticamGetFrameDimensions(int &amp;width, int &amp;height);
PS3EYEMULTICAM_API bool PS3EyeMulticamGetFrame(PBYTE pData, int waitTimeout=2000);

////////////////////////////////////////////////////////////////////////////////////////////
</pre>
<p>Included in the driver archive is a full source code of a simple &#8216;PS3EyeMulticamTest&#8217; application that allows you to run and test the multicamera driver. This code could also serve as a good starting point for writing your own OpenCV image processing apps.<br />
The PS3EyeMulticamTest app uses all of the API functions defined in &#8216;PS3EyeMulticam.h&#8217; file.<br />
Here is the &#8216;PS3EyeMulticamTest.cpp&#8217; file:</p>
<pre class="brush: cpp;">
//
// PS3EyeMulticamTest.cpp
//
// This is a quick test application for the
// PS3EyeMulticam driver
//
// To build it, in VS2008 create en empty window app project
// and add all the files in this folder to it.
//
#include &quot;stdafx.h&quot;

#define WINDOW_NAME		&quot;Capture Window&quot;
bool bRunning = false;
int w, h;

// Capture thread
DWORD WINAPI Capture(LPVOID)
{
	IplImage *grayImage = cvCreateImage(cvSize(w, h), IPL_DEPTH_8U, 1);
	PS3EyeMulticamStart();
	while(bRunning)
	{
		PBYTE pBuffer = NULL;
		cvGetImageRawData(grayImage, &amp;pBuffer);
		PS3EyeMulticamGetFrame(pBuffer);
		cvShowImage(WINDOW_NAME, grayImage);
	}
	PS3EyeMulticamStop();
	cvReleaseImage(&amp;grayImage);
	return 0;
}

void Program()
{
	// Query driver for number of connected PS3Eye cameras
	int camCnt = PS3EyeMulticamGetCameraCount();
	printf(&quot;Found %d PS3Eye cameras\n&quot;, camCnt);
	if(camCnt == 0)
	{
		MessageBox(NULL,&quot;No PS3Eye camera(s) found&quot;,&quot;PS3EyeMulticamTest&quot;, MB_ICONEXCLAMATION);
		return;
	}
	// Open cameras
	if(!PS3EyeMulticamOpen(camCnt, VGA, 30))
	{
		MessageBox(NULL,&quot;Could not open PS3Eye camera(s)&quot;,&quot;PS3EyeMulticamTest&quot;, MB_ICONEXCLAMATION);
		return;
	}
	// Load the default camera settings 'settings.xml' file
	// If the file is not found it will be created
	PS3EyeMulticamLoadSettings(&quot;settings.xml&quot;);

	// Get output image dimensions
	PS3EyeMulticamGetFrameDimensions(w, h);
	printf(&quot;Image dimensions (%d, %d)\n&quot;, w, h);

	// Create OpenCV main window
	cvNamedWindow(WINDOW_NAME, CV_WINDOW_AUTOSIZE);
	cvMoveWindow(WINDOW_NAME, 0, 0);
	cvResizeWindow(WINDOW_NAME, w, h);

	// Start PS3Eye image capture thread
	HANDLE hThread = CreateThread(NULL, 0, Capture, NULL, 0, 0);
	if(hThread == NULL)
	{
		MessageBox(NULL,&quot;Could not create capture thread&quot;,&quot;PS3EyeMulticamTest&quot;, MB_ICONEXCLAMATION);
		PS3EyeMulticamClose();
		return;
	}
	bRunning = true;
	// The '&lt;esc&gt;' key will exit the program
	// The 's' key will open camera settings dialog
	while(bRunning)
	{
		int key = cvWaitKey(0);
		switch(key)
		{
			case 's':
			case 'S':
				// Display settings
				PS3EyeMulticamShowSettings();
			break;
			case 0x1b:
				printf(&quot;Exiting...\n&quot;);
				// Stop the capture thread
				bRunning = false;
				// Wait for thread to exit
				WaitForSingleObject(hThread, 3000);
				printf(&quot;Thread exited\n&quot;);
			break;
		}
	}
	// Save camera settings
	printf(&quot;Saving settings\n&quot;);
	PS3EyeMulticamSaveSettings();
	printf(&quot;Closing OpenCV window\n&quot;);
	cvDestroyWindow(WINDOW_NAME);
	PS3EyeMulticamClose();
}

// This is the program entry if you link with /SUBSYSTEM:CONSOLE option
int main(int argc, char *argv[])
{
	Program();
	return 0;
}

// This is the program entry if you link with /SUBSYSTEM:WINDOWS option
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd)
{
	Program();
	return 0;
}
</pre>
<p>Last but not least, here you will find the <strong><a href="http://codelaboratories.com/files/PS3EyeMulticam.rar">PS3EyeMulticam.rar</a></strong> file.<br />
Enjoy!</p>
<p>~Alex</esc></windows></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/alexpopovich.wordpress.com/271/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/alexpopovich.wordpress.com/271/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/alexpopovich.wordpress.com/271/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/alexpopovich.wordpress.com/271/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/alexpopovich.wordpress.com/271/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/alexpopovich.wordpress.com/271/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/alexpopovich.wordpress.com/271/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/alexpopovich.wordpress.com/271/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/alexpopovich.wordpress.com/271/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/alexpopovich.wordpress.com/271/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=alexpopovich.wordpress.com&blog=4743229&post=271&subd=alexpopovich&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://alexpopovich.wordpress.com/2009/09/04/the-ps3eye-multicam-driver-is-here/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ec224ae28504df8036094b75983c7b37?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">alexpopovich</media:title>
		</media:content>

		<media:content url="http://codelaboratories.com/images/PS3EyeMulticam.jpg" medium="image" />
	</item>
		<item>
		<title>Open Source PS3Eye DirectShow driver component</title>
		<link>http://alexpopovich.wordpress.com/2009/07/20/open-source-ps3eye-directshow-driver-component/</link>
		<comments>http://alexpopovich.wordpress.com/2009/07/20/open-source-ps3eye-directshow-driver-component/#comments</comments>
		<pubDate>Mon, 20 Jul 2009 21:34:10 +0000</pubDate>
		<dc:creator>Alexander Popovich</dc:creator>
				<category><![CDATA[Sony PS3Eye Hacks]]></category>

		<guid isPermaLink="false">http://alexpopovich.wordpress.com/?p=242</guid>
		<description><![CDATA[After many requests from PS3Eye users about the PS3Eye DirectShow component I decided to release it as an open source component. Let me explain. When I wrote the PS3Eye DirectShow component I didn&#8217;t even dream that it is going to be used in so many applications. Naturally, it is very hard for me to test [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=alexpopovich.wordpress.com&blog=4743229&post=242&subd=alexpopovich&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>After many requests from PS3Eye users about the PS3Eye DirectShow component I decided to release it as an open source component. Let me explain. When I wrote the PS3Eye DirectShow component I didn&#8217;t even dream that it is going to be used in so many applications. Naturally, it is very hard for me to test and debug this component under various circumstances and in all use cases. Many of you are skilled programmers and so frequently I got requests for the source code. While initially reluctant to release it due to the nature of the code (driver component code versus a normal application code), I truly believe in open source and that by releasing the code as an open source to the community, in time, it will only get better.</p>
<p>I do believe that openly sharing knowledge (source code) will eventually make this world a better place (I did it myself many times). While this is true, the work put in throughout the design and development process has a definite value. In order to satisfy both sides of the issue, I came up with the win-win model that I think is the best suited in this particular case &#8211; the communal donation. While giving a freedom to each one of you to donate any amount you think its appropriate, you will ultimately contribute to the code eventually being open source. In this way the source code will become a property of the community as a whole (which by the definition is an open source code).</p>
<p>Based on the research, design, development efforts and time spent on this project I estimate that its total value is $15,000.</p>
<p>Below you&#8217;ll find a link to ChipIn widget that will allow you to donate and see the progress in real time. When the bar hits 100% I will release the full source code of the PS3Eye DirectShow component.</p>
<p>NOTE: Since the original chipin event has ended so I created a new one.<br />
<a href="http://widget.chipin.com/widget/id/4a5f94c3ca79bcbe">http://widget.chipin.com/widget/id/a717a49af8cdfabd</a></p>
<p>The old one:<br />
<a href="http://widget.chipin.com/widget/id/a717a49af8cdfabd">http://widget.chipin.com/widget/id/a717a49af8cdfabd</a></p>
<p>Note: Due to WordPress limitation I was not able to embed ChipIn widget into the post.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/alexpopovich.wordpress.com/242/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/alexpopovich.wordpress.com/242/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/alexpopovich.wordpress.com/242/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/alexpopovich.wordpress.com/242/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/alexpopovich.wordpress.com/242/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/alexpopovich.wordpress.com/242/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/alexpopovich.wordpress.com/242/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/alexpopovich.wordpress.com/242/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/alexpopovich.wordpress.com/242/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/alexpopovich.wordpress.com/242/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=alexpopovich.wordpress.com&blog=4743229&post=242&subd=alexpopovich&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://alexpopovich.wordpress.com/2009/07/20/open-source-ps3eye-directshow-driver-component/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ec224ae28504df8036094b75983c7b37?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">alexpopovich</media:title>
		</media:content>
	</item>
		<item>
		<title>AlexP’s Forum is up!</title>
		<link>http://alexpopovich.wordpress.com/2009/07/20/alexp%e2%80%99s-forum-is-up/</link>
		<comments>http://alexpopovich.wordpress.com/2009/07/20/alexp%e2%80%99s-forum-is-up/#comments</comments>
		<pubDate>Mon, 20 Jul 2009 20:36:55 +0000</pubDate>
		<dc:creator>Alexander Popovich</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://alexpopovich.wordpress.com/?p=238</guid>
		<description><![CDATA[I created a forum where you can find the latest news and join the discussion about various topics featured on my blog. Join the forum here.
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=alexpopovich.wordpress.com&blog=4743229&post=238&subd=alexpopovich&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I created a forum where you can find the latest news and join the discussion about various topics featured on my blog. Join the forum <a title="AlexP's Forum" href="http://www.alexpopovich.com/forum/" target="_blank">here</a>.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/alexpopovich.wordpress.com/238/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/alexpopovich.wordpress.com/238/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/alexpopovich.wordpress.com/238/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/alexpopovich.wordpress.com/238/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/alexpopovich.wordpress.com/238/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/alexpopovich.wordpress.com/238/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/alexpopovich.wordpress.com/238/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/alexpopovich.wordpress.com/238/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/alexpopovich.wordpress.com/238/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/alexpopovich.wordpress.com/238/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=alexpopovich.wordpress.com&blog=4743229&post=238&subd=alexpopovich&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://alexpopovich.wordpress.com/2009/07/20/alexp%e2%80%99s-forum-is-up/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ec224ae28504df8036094b75983c7b37?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">alexpopovich</media:title>
		</media:content>
	</item>
		<item>
		<title>Blog&#8217;s new home&#8230;</title>
		<link>http://alexpopovich.wordpress.com/2009/03/30/blogs-new-home/</link>
		<comments>http://alexpopovich.wordpress.com/2009/03/30/blogs-new-home/#comments</comments>
		<pubDate>Mon, 30 Mar 2009 20:13:04 +0000</pubDate>
		<dc:creator>Alexander Popovich</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://alexpopovich.wordpress.com/?p=235</guid>
		<description><![CDATA[I finally got around registering my own domain. This blog is therefore moved there.
I will not post any updates of my posts here  so please update your links. In addition to that on my new site I added a forum that you can join. My new site is at: http://www.alexpopovich.com/blog/
See you all there!!!
   [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=alexpopovich.wordpress.com&blog=4743229&post=235&subd=alexpopovich&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I finally got around registering my own domain. This blog is therefore moved there.</p>
<p>I will not post any updates of my posts here  so please update your links. In addition to that on my new site I added a forum that you can join. My new site is at: <a title="AlexP's Blog" href="http://www.alexpopovich.com/blog/" target="_blank">http://www.alexpopovich.com/blog/</a></p>
<p>See you all there!!!</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/alexpopovich.wordpress.com/235/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/alexpopovich.wordpress.com/235/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/alexpopovich.wordpress.com/235/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/alexpopovich.wordpress.com/235/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/alexpopovich.wordpress.com/235/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/alexpopovich.wordpress.com/235/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/alexpopovich.wordpress.com/235/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/alexpopovich.wordpress.com/235/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/alexpopovich.wordpress.com/235/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/alexpopovich.wordpress.com/235/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=alexpopovich.wordpress.com&blog=4743229&post=235&subd=alexpopovich&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://alexpopovich.wordpress.com/2009/03/30/blogs-new-home/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ec224ae28504df8036094b75983c7b37?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">alexpopovich</media:title>
		</media:content>
	</item>
		<item>
		<title>MacBook Rev. F Audio Skipping in Vista Analisys and Solution &#8211; Part 2</title>
		<link>http://alexpopovich.wordpress.com/2008/12/22/macbook-rev-f-audio-skipping-in-vista-analisys-and-solution-part-2/</link>
		<comments>http://alexpopovich.wordpress.com/2008/12/22/macbook-rev-f-audio-skipping-in-vista-analisys-and-solution-part-2/#comments</comments>
		<pubDate>Mon, 22 Dec 2008 23:13:07 +0000</pubDate>
		<dc:creator>Alexander Popovich</dc:creator>
				<category><![CDATA[MacBook Hacks]]></category>

		<guid isPermaLink="false">http://alexpopovich.wordpress.com/?p=208</guid>
		<description><![CDATA[In my previous post I talked about reducing the DPC latency in order to prevent frequent audible clicks and audio skipping. The solution was to fix the CPU affinity in the KbdMgr.exe file. This resulted in great reduction of DPC latency of the system. 
The Problem
However, I noticed that every 50-60 seconds the DPC latency spiked to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=alexpopovich.wordpress.com&blog=4743229&post=208&subd=alexpopovich&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>In my <a href="http://alexpopovich.wordpress.com/2008/10/30/macbook-rev-f-audio-skipping-in-vista-analisys-and-solution/">previous</a> post I talked about reducing the DPC latency in order to prevent frequent audible clicks and audio skipping. The solution was to fix the CPU affinity in the KbdMgr.exe file. This resulted in great reduction of DPC latency of the system. </p>
<h2 style="text-align:center;"><strong>The Problem</strong></h2>
<p>However, I noticed that every 50-60 seconds the DPC latency spiked to about 16ms. Since most professional audio software requires absolute low latency at all times, this DPC spikes will result in audible skips in those high-performance audio programs. I decided to look into this more closely.</p>
<p><img class="aligncenter size-full wp-image-211" title="latencyrevisited1" src="http://alexpopovich.files.wordpress.com/2008/12/latencyrevisited1.jpg?w=497&#038;h=161" alt="latencyrevisited1" width="497" height="161" /></p>
<p>As it turns out (by the process of elimination) this spikes are caused by the Broadcom wireless driver. As seen in devince manager:</p>
<p style="text-align:center;"><img class="aligncenter size-medium wp-image-213" title="broadcom-devmgr1" src="http://alexpopovich.files.wordpress.com/2008/12/broadcom-devmgr1.jpg?w=414&#038;h=578" alt="broadcom-devmgr1" width="414" height="578" /></p>
<p>Here are the driver details:</p>
<p style="text-align:center;"><img class="aligncenter size-medium wp-image-215" title="broadcom-driver" src="http://alexpopovich.files.wordpress.com/2008/12/broadcom-driver.jpg?w=352&#038;h=440" alt="broadcom-driver" width="352" height="440" /></p>
<p>The reason why this spikes happen every 60 seconds or so is that, when enabled, Vista is actively scanning and detecting available wireless network and managing wireless network profile. The service responsible for this is called &#8216;WLAN AutoConfig Service&#8217; which is similar to &#8216;Wireless Zero Configuration service&#8217; in XP. </p>
<p>Since this service is required in order for us to establish a wireless conection, we cannot just disable it. </p>
<h2 style="text-align:center;"><strong>The Solution</strong></h2>
<p>The quickest thing is to create two cmd files and allow user to manually turn on and off the WLAN autoconfig feature. Here is what I have done. I created two files and placed them on my desktop. After establishing a wireless connection to my access point, I double-click on the &#8217;WlanAutocfgOff.cmd&#8217;. This turns off the WLAN autoconfig feature, but keeps me connected to my access point. In order to later be able to connect to it again (eg. after Windows restart), I just double-click on &#8217;WlanAutocfgOn.cmd&#8217; and wait until I get connected. Then after establishing a wireless connection to my access point, I double-click on the &#8217;WlanAutocfgOff.cmd&#8217;to stop DPC spikes from happening again. </p>
<p>File &#8216;WlanAutocfgOn.cmd&#8217;:<br />
<code><br />
<strong><span style="color:#ffff00;">netsh wlan set autoconfig enabled=yes interface="Wireless Network Connection"</span></strong></code><br />
 <br />
File &#8216;WlanAutocfgOff.cmd&#8217;:<br />
<code><br />
<strong><span style="color:#ffff00;">netsh wlan set autoconfig enabled=no interface="Wireless Network Connection"</span></strong></code></p>
<p>As you can see each file consists of single command.</p>
<p>After running &#8216;WlanAutocfgOff.cmd&#8217;, the DPC spikes will be gone (max latency ~1ms), and you&#8217;ll be able to use your pro audio app of choice without any skipping and stuttering.</p>
<p><img class="aligncenter size-full wp-image-221" title="latencyrevisited2" src="http://alexpopovich.files.wordpress.com/2008/12/latencyrevisited2.jpg?w=497&#038;h=161" alt="latencyrevisited2" width="497" height="161" /></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/alexpopovich.wordpress.com/208/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/alexpopovich.wordpress.com/208/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/alexpopovich.wordpress.com/208/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/alexpopovich.wordpress.com/208/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/alexpopovich.wordpress.com/208/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/alexpopovich.wordpress.com/208/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/alexpopovich.wordpress.com/208/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/alexpopovich.wordpress.com/208/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/alexpopovich.wordpress.com/208/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/alexpopovich.wordpress.com/208/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=alexpopovich.wordpress.com&blog=4743229&post=208&subd=alexpopovich&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://alexpopovich.wordpress.com/2008/12/22/macbook-rev-f-audio-skipping-in-vista-analisys-and-solution-part-2/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ec224ae28504df8036094b75983c7b37?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">alexpopovich</media:title>
		</media:content>

		<media:content url="http://alexpopovich.files.wordpress.com/2008/12/latencyrevisited1.jpg" medium="image">
			<media:title type="html">latencyrevisited1</media:title>
		</media:content>

		<media:content url="http://alexpopovich.files.wordpress.com/2008/12/broadcom-devmgr1.jpg" medium="image">
			<media:title type="html">broadcom-devmgr1</media:title>
		</media:content>

		<media:content url="http://alexpopovich.files.wordpress.com/2008/12/broadcom-driver.jpg" medium="image">
			<media:title type="html">broadcom-driver</media:title>
		</media:content>

		<media:content url="http://alexpopovich.files.wordpress.com/2008/12/latencyrevisited2.jpg" medium="image">
			<media:title type="html">latencyrevisited2</media:title>
		</media:content>
	</item>
		<item>
		<title>MacBook Rev. F Audio Skipping in Vista Analisys and Solution &#8211; Part 1</title>
		<link>http://alexpopovich.wordpress.com/2008/10/30/macbook-rev-f-audio-skipping-in-vista-analisys-and-solution/</link>
		<comments>http://alexpopovich.wordpress.com/2008/10/30/macbook-rev-f-audio-skipping-in-vista-analisys-and-solution/#comments</comments>
		<pubDate>Thu, 30 Oct 2008 08:15:43 +0000</pubDate>
		<dc:creator>Alexander Popovich</dc:creator>
				<category><![CDATA[MacBook Hacks]]></category>

		<guid isPermaLink="false">http://alexpopovich.wordpress.com/?p=185</guid>
		<description><![CDATA[Last week I got the latest Apple&#8217;s 13.3&#8243; MacBook Rev. F. (aluminum unibody model)

This is an amazing looking laptop, and is one of the fastest performing laptops out there. I decided to have dual boot OS and installed Vista and Apple&#8217;s BootCamp.
Here is MacBook&#8217;s performance index in Vista:

As you can see, the overall rating is [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=alexpopovich.wordpress.com&blog=4743229&post=185&subd=alexpopovich&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Last week I got the latest Apple&#8217;s 13.3&#8243; MacBook Rev. F. (aluminum unibody model)<br />
<img class="aligncenter" src="http://www.codelaboratories.com/images/MacBook/MacBookRevF.jpg" alt="" width="500" /></p>
<p>This is an amazing looking laptop, and is one of the fastest performing laptops out there. I decided to have dual boot OS and installed Vista and Apple&#8217;s BootCamp.<br />
Here is MacBook&#8217;s performance index in Vista:<br />
<img class="aligncenter" src="http://www.codelaboratories.com/images/MacBook/MacBookPerformaceIndex.jpg" alt="" width="500" /></p>
<p>As you can see, the overall rating is pretty high and the graphics card has pretty high rating (5.4) as well. One nice thing is that at the back Apple gave us easy access to the hard drive on the back. This makes a very easy upgrade. The thing that I found is that this is the only laptop that can fit new 500GB SATA laptop drives which are thicker (12.5mm) than standard 250GB laptop drive (9.5mm). So I managed to easily upgrade mine to 500GB 5400rpm Hitachi laptop drive.</p>
<p><img class="aligncenter" src="http://www.codelaboratories.com/images/MacBook/MacBookBack.jpg" alt="" width="500" /></p>
<h2 style="text-align:center;"><strong>The Problem</strong></h2>
<p>After playing with MacBook for a while on Vista, I noticed that when playing music, frequently there are audible clicks and audio skipping. This was even more audible when I was listening streamed radio stations over shoutcast network. On top of this, I think that there is significant reduction of the MacBook battery run time as well (comparing to OSX). I decided to investigate this more closely.</p>
<p>In short, I found, the reason why this happens is because of the exceptionally high DPC latency.</p>
<p style="text-align:center;"><strong>Why Audio Drop-outs Occur?</strong></p>
<p style="text-align:center;">(Taken from <a href="http://www.thesycon.de/deu/latency_check.shtml">http://www.thesycon.de/deu/latency_check.shtml)</a></p>
<p>Processing of streaming data in real-time is a very challenging task for Windows based applications and device drivers. This is because by design Windows is not a real-time operating system. There is no guarantee that certain (periodic) actions can be executed in a timely manner.</p>
<p>Audio or video data streams transferred from or to an external device are typically handled by a kernel-mode device driver. Data processing in such device drivers is interrupt-driven. Typically, the external hardware periodically issues interrupts to request the driver to transfer the next block of data. In Windows NT based systems (Windows 2000 and better) there is a specific interrupt handling mechanism. A device driver cannot process data immediately in its interrupt routine. It has to schedule a Deferred Procedure Call (DPC) which basically is a callback routine that will be called by the operating system as soon as possible. Any data transfer performed by the device driver takes place in the context of this callback routine, named DPC for short.</p>
<p><span>The operating system maintains DPCs scheduled by device drivers in a queue. There is one DPC queue per CPU available in the system. At certain points the kernel checks the DPC queue and if no interrupt is to be processed and no DPC is currently running the first DPC will be un-queued and executed. DPC queue processing happens before the dispatcher selects a thread and assigns the CPU to it. So, a Deferred Procedure Call has a higher priority than any thread in the system.</span></p>
<p>Note that the Deferred Procedure Call concept exists in kernel mode only. Any user-mode code (Windows applications) runs in the context of a thread. Threads are managed and scheduled for execution by the dispatcher.</p>
<p>While there is a pre-emptive multitasking for threads, DPCs are executed sequentially according to the first in, first out nature of a DPC queue. Thus, a sort of cooperative multitasking scheme exists for Deferred Procedure Calls. If any DPC runs for an excessive amount of time then other DPCs will be delayed by that amount of time. Consequently, the latency of a particular DPC is defined as the sum of the execution time of all DPCs queued in front of that DPC. In order to achieve reasonable DPC latencies, in the Windows Device Driver Kit (DDK) documentation Microsoft recommends to return from a DPC routine as quick as possible. Any lengthy operation and specifically loops that wait for a hardware state change (polling) are strongly discouraged.</p>
<p>Unfortunately, many existing device drivers do not conform to this advice. Such drivers spend an excessive amount of time in their DPC routines, causing an exceptional large latency for any other driver&#8217;s DPCs. For a device driver that handles data streams in real-time it is crucial that a DPC scheduled from its interrupt routine is executed before the hardware issues the next interrupt. If the DPC is delayed and runs after the next interrupt occurred, typically a hardware buffer overrun occurs and the flow of data is interrupted. A drop-out occurs.</p>
<h2 style="text-align:center;"><strong>The Solution</strong></h2>
<p>After running the <strong><a title="DPC Latency Checker" href="http://www.thesycon.de/dpclat/dpclat.exe">DPC Latency Checker</a></strong> program, I found that the excessive DPC latency was indeed the cause of all the audio skipping. </p>
<p>Here is the DPC Latency with my MacBook idling:<br />
<img class="aligncenter" src="http://www.codelaboratories.com/images/MacBook/MacBookLatencyHigh.jpg" alt="" width="500" /><br />
At moments the latency was as high as 30.5ms!</p>
<p>After running the <strong><a title="Process Explorer" href="http://download.sysinternals.com/Files/ProcessExplorer.zip">Process Explorer</a></strong> program I was able to track down the program that was causing the problem. It was the Apple&#8217;s <strong>KbdMgr.exe</strong>. This program is responsible for managing the keyboard, handling the special keys and displaying the OSD (on-screen-display) when you, for example, change screen brightness. </p>
<p>For a program that is mostly idle the KbdMgr.exe consumes quite a lot of CPU cycles.<br />
<img class="aligncenter" src="http://www.codelaboratories.com/images/MacBook/MacBookKbdMgr.jpg" alt="" width="500" /><br />
You can see that KbdMgr has eight threads, but only one of them constantly consumes high number of CPU cycles. After inspecting the API calls that thread (TID 1352) makes, I found that the main cause for the high CPU cycles is the bad KbdMgr&#8217;s multiprocessor implementation (deadlock situation betwen CPU cores in User/Kernel mode). In another words, by simply limiting KbdMgr to a CPU core #1 (CPU affinity) and optionally setting KdbMgr&#8217;s priority to Idle, the DPC latency of my MacBook improved dramatically:<br />
<img class="aligncenter" src="http://www.codelaboratories.com/images/MacBook/MacBookLatencyLow.jpg" alt="" width="500" /></p>
<p>As you can see the latency went from whopping high 30.5ms down to 1ms. The result was smooth audio playback with no skipping, much more responsive machine and improved laptop&#8217;s battery life.</p>
<p>Here is the fix: <a href="http://www.codelaboratories.com/files/MacBook/KbdMgr.rar">KbdMgr.rar</a><br />
The new fixed version will automatically run on CPU #1 with low priority and will reduce the DPC latency of MacBook.</p>
<p>Installation:<br />
1. Go to Task Manager and kill <strong>KbdMgr.exe</strong> process<br />
2. Download and extract the contents of the <strong>KbdMgr.rar</strong> file to a temporary directory<br />
3. Backup the original <strong>KbdMgr.exe</strong> file located in <strong>C:\Program Files\Boot Camp</strong> directory<br />
4. Copy <strong>new </strong><strong>KbdMgr.exe</strong> file to <strong>C:\Program Files\Boot Camp</strong> directory<br />
5. Restart your machine</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/alexpopovich.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/alexpopovich.wordpress.com/185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/alexpopovich.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/alexpopovich.wordpress.com/185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/alexpopovich.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/alexpopovich.wordpress.com/185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/alexpopovich.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/alexpopovich.wordpress.com/185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/alexpopovich.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/alexpopovich.wordpress.com/185/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=alexpopovich.wordpress.com&blog=4743229&post=185&subd=alexpopovich&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://alexpopovich.wordpress.com/2008/10/30/macbook-rev-f-audio-skipping-in-vista-analisys-and-solution/feed/</wfw:commentRss>
		<slash:comments>39</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ec224ae28504df8036094b75983c7b37?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">alexpopovich</media:title>
		</media:content>

		<media:content url="http://www.codelaboratories.com/images/MacBook/MacBookRevF.jpg" medium="image" />

		<media:content url="http://www.codelaboratories.com/images/MacBook/MacBookPerformaceIndex.jpg" medium="image" />

		<media:content url="http://www.codelaboratories.com/images/MacBook/MacBookBack.jpg" medium="image" />

		<media:content url="http://www.codelaboratories.com/images/MacBook/MacBookLatencyHigh.jpg" medium="image" />

		<media:content url="http://www.codelaboratories.com/images/MacBook/MacBookKbdMgr.jpg" medium="image" />

		<media:content url="http://www.codelaboratories.com/images/MacBook/MacBookLatencyLow.jpg" medium="image" />
	</item>
		<item>
		<title>PS3Eye Camera SDK for use in your own applications!!!</title>
		<link>http://alexpopovich.wordpress.com/2008/10/20/ps3eye-camera-sdk-for-use-in-your-own-applications/</link>
		<comments>http://alexpopovich.wordpress.com/2008/10/20/ps3eye-camera-sdk-for-use-in-your-own-applications/#comments</comments>
		<pubDate>Mon, 20 Oct 2008 00:52:45 +0000</pubDate>
		<dc:creator>Alexander Popovich</dc:creator>
				<category><![CDATA[Sony PS3Eye Hacks]]></category>
		<category><![CDATA[TouchLib]]></category>
		<category><![CDATA[PS3Eye SDK]]></category>

		<guid isPermaLink="false">http://alexpopovich.wordpress.com/?p=148</guid>
		<description><![CDATA[Many of you asked me how can you use this camera in your applications. 
Besides the existing implementation of PS3Eye DirectShow filter, I developed the PS3EyeLib as well. 
This SDK library lets you get full access to the PS3Eye camera and allows you to configure the camera and grab video frames.
Lets look at the PS3EyeLib API: 
typedef enum
{
    R320x240,
    R640x480,
 }PS3EYE_RESOLUTION;        
typedef struct tFormat
{
    PS3EYE_RESOLUTION res;
    int width;
    int height;
    DWORD rate;
    LONGLONG period;
    char formatTxt[32];
 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=alexpopovich.wordpress.com&blog=4743229&post=148&subd=alexpopovich&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Many of you asked me how can you use this camera in your applications. <br />
Besides the existing implementation of PS3Eye DirectShow filter, I developed the PS3EyeLib as well. <br />
This SDK library lets you get full access to the PS3Eye camera and allows you to configure the camera and grab video frames.</p>
<p>Lets look at the PS3EyeLib API: </p>
<div class="codeblock"><code><span><span style="color:#ff9900;">typedef enum<br />
{<br />
    R320x240</span></span><span><span style="color:#ff9900;">,<br />
    </span></span><span><span style="color:#ff9900;">R640x480</span></span><span><span style="color:#ff9900;">,<br />
</span> </span><span><span style="color:#ff9900;">}PS3EYE_RESOLUTION</span></span><span><span style="color:#ff9900;">;    </span>    </p>
<p><span><span style="color:#ff9900;">typedef struct tFormat<br />
{<br />
    PS3EYE_RESOLUTION res</span></span><span><span style="color:#ff9900;">;<br />
    </span></span><span><span style="color:#ff9900;">int width</span></span><span><span style="color:#ff9900;">;<br />
    </span></span><span><span style="color:#ff9900;">int height</span></span><span><span style="color:#ff9900;">;<br />
    </span></span><span><span style="color:#ff9900;">DWORD rate</span></span><span><span style="color:#ff9900;">;<br />
    </span></span><span><span style="color:#ff9900;">LONGLONG period</span></span><span><span style="color:#ff9900;">;<br />
    </span></span><span><span style="color:#ff9900;">char formatTxt[32]</span></span><span><span style="color:#ff9900;">;<br />
</span> </span><span><span style="color:#ff9900;">}PS3EYE_FORMAT</span></span><span><span style="color:#ff9900;">;</span></span></p>
<p><span style="color:#ff9900;">class </span><span><span style="color:#ff9900;">PS3EYELIB_EXPORT IPS3EyeLib<br />
{<br />
</span> </span><span><span style="color:#ff9900;">public:<br />
    static </span></span><span><span style="color:#ff9900;">IPS3EyeLib </span></span><span><span style="color:#ff9900;">*</span></span><span><span style="color:#ff9900;">Create</span></span><span><span style="color:#ff9900;">();</span></span></p>
<p><span style="color:#ff9900;">    </span><span><span style="color:#ff9900;">virtual </span></span><span><span style="color:#ff9900;">~</span></span><span><span style="color:#ff9900;">IPS3EyeLib</span></span><span><span style="color:#ff9900;">();</span></span></p>
<p><span style="color:#ff9900;">    </span><span><span style="color:#ff9900;">virtual void SetFormat</span></span><span><span style="color:#ff9900;">(</span></span><span><span style="color:#ff9900;">int formatIdx</span></span><span><span style="color:#ff9900;">) = </span></span><span><span style="color:#ff9900;">0</span></span><span><span style="color:#ff9900;">;<br />
    static </span></span><span><span style="color:#ff9900;">PS3EYE_FORMAT </span></span><span><span style="color:#ff9900;">*</span></span><span><span style="color:#ff9900;">GetFormats</span></span><span><span style="color:#ff9900;">();<br />
    static </span></span><span><span style="color:#ff9900;">int GetNumFormats</span></span><span><span style="color:#ff9900;">();<br />
    </span></span><span><span style="color:#ff9900;">virtual void StartCapture</span></span><span><span style="color:#ff9900;">() = </span></span><span><span style="color:#ff9900;">0</span></span><span><span style="color:#ff9900;">;<br />
    </span></span><span><span style="color:#ff9900;">bool GetFrame</span></span><span><span style="color:#ff9900;">(</span></span><span><span style="color:#ff9900;">PBYTE buf</span></span><span><span style="color:#ff9900;">, </span></span><span><span style="color:#ff9900;">int bitsPerPixel</span></span><span><span style="color:#ff9900;">, </span></span><span><span style="color:#ff9900;">bool flip</span></span><span><span style="color:#ff9900;">);<br />
    </span></span><span><span style="color:#ff9900;">virtual void StopCapture</span></span><span><span style="color:#ff9900;">() = </span></span><span><span style="color:#ff9900;">0</span></span><span><span style="color:#ff9900;">;</span></span></p>
<p><span style="color:#ff9900;">    </span><span><span style="color:#ff9900;">virtual void DumpEEPROM</span></span><span><span style="color:#ff9900;">(</span></span><span><span style="color:#ff9900;">LPCTSTR filename</span></span><span><span style="color:#ff9900;">) = </span></span><span><span style="color:#ff9900;">0</span></span><span><span style="color:#ff9900;">;<br />
    </span></span><span><span style="color:#ff9900;">virtual void DumpRAM</span></span><span><span style="color:#ff9900;">(</span></span><span><span style="color:#ff9900;">LPCTSTR filename</span></span><span><span style="color:#ff9900;">) = </span></span><span><span style="color:#ff9900;">0</span></span><span><span style="color:#ff9900;">;<br />
    </span></span><span><span style="color:#ff9900;">virtual void LED</span></span><span><span style="color:#ff9900;">(</span></span><span><span style="color:#ff9900;">bool on</span></span><span><span style="color:#ff9900;">) = </span></span><span><span style="color:#ff9900;">0</span></span><span><span style="color:#ff9900;">;</span></span></p>
<p></span></code><code><span style="color:#ff9900;">    </span><span><span style="color:#ff9900;">virtual bool IsCapturing</span></span><span><span style="color:#ff9900;">() = </span></span><span><span style="color:#ff9900;">0</span></span><span><span style="color:#ff9900;">;<br />
    </span></span><span><span style="color:#ff9900;">virtual UINT GetWidth</span></span><span><span style="color:#ff9900;">() = </span></span><span><span style="color:#ff9900;">0</span></span><span><span style="color:#ff9900;">;<br />
    </span></span><span><span style="color:#ff9900;">virtual UINT GetHeight</span></span><span><span style="color:#ff9900;">() = </span></span><span><span style="color:#ff9900;">0</span></span><span><span style="color:#ff9900;">;<br />
    </span></span><span><span style="color:#ff9900;">virtual PS3EYE_RESOLUTION GetRes</span></span><span><span style="color:#ff9900;">() = </span></span><span><span style="color:#ff9900;">0</span></span><span><span style="color:#ff9900;">;<br />
    </span></span><span><span style="color:#ff9900;">virtual DWORD GetRate</span></span><span><span style="color:#ff9900;">() = </span></span><span><span style="color:#ff9900;">0</span></span><span><span style="color:#ff9900;">;<br />
    static </span></span><span><span style="color:#ff9900;">int GetFormatIndex</span></span><span><span style="color:#ff9900;">(</span></span><span><span style="color:#ff9900;">int width</span></span><span><span style="color:#ff9900;">, </span></span><span><span style="color:#ff9900;">int height</span></span><span><span style="color:#ff9900;">, </span></span><span><span style="color:#ff9900;">LONGLONG period</span></span><span><span style="color:#ff9900;">);<br />
    static </span></span><span><span style="color:#ff9900;">int GetFormatIndex</span></span><span><span style="color:#ff9900;">(</span></span><span><span style="color:#ff9900;">int width</span></span><span><span style="color:#ff9900;">, </span></span><span><span style="color:#ff9900;">int height</span></span><span><span style="color:#ff9900;">, </span></span><span><span style="color:#ff9900;">int rate</span></span><span><span style="color:#ff9900;">);<br />
    </span></span><span><span style="color:#ff9900;">virtual LPCTSTR GetCameraVersion</span></span><span><span style="color:#ff9900;">() = </span></span><span><span style="color:#ff9900;">0</span></span><span><span style="color:#ff9900;">;<br />
</span> </span><span><span style="color:#ff9900;">}</span></span><span><span style="color:#ff9900;">;</span></span></code></div>
<p> <br />
Here is the example of PS3EyeLib usage in you application: </p>
<div class="codeblock"><code><span style="color:#ff9900;">// Create PS3EyeLib object<br />
</span> <span><span style="color:#ff9900;">IPS3EyeLib *pCam</span></span><span><span style="color:#ff9900;">=</span></span><span><span style="color:#ff9900;">IPS3EyeLib</span></span><span><span style="color:#ff9900;">::</span></span><span><span style="color:#ff9900;">Create</span></span><span><span style="color:#ff9900;">();    </span>    </p>
<p><span><span style="color:#ff9900;">// Query supported video formats<br />
</span> </span><span><span style="color:#ff9900;">for(</span></span><span><span style="color:#ff9900;">int i</span></span><span><span style="color:#ff9900;">=</span></span><span><span style="color:#ff9900;">0</span></span><span><span style="color:#ff9900;">; </span></span><span><span style="color:#ff9900;">i</span></span><span><span style="color:#ff9900;">&lt;</span></span><span><span style="color:#ff9900;">IPS3EyeLib</span></span><span><span style="color:#ff9900;">::</span></span><span><span style="color:#ff9900;">GetNumFormats</span></span><span><span style="color:#ff9900;">(); </span></span><span><span style="color:#ff9900;">i</span></span><span><span style="color:#ff9900;">++)<br />
</span> </span><span><span style="color:#ff9900;">{<br />
    int width</span></span><span><span style="color:#ff9900;">, </span></span><span><span style="color:#ff9900;">height</span></span><span><span style="color:#ff9900;">, </span></span><span><span style="color:#ff9900;">rate</span></span><span><span style="color:#ff9900;">;<br />
    </span></span><span><span style="color:#ff9900;">char </span></span><span><span style="color:#ff9900;">*</span></span><span><span style="color:#ff9900;">description</span></span><span><span style="color:#ff9900;">;<br />
    </span></span><span><span style="color:#ff9900;">width</span></span><span><span style="color:#ff9900;">=</span></span><span><span style="color:#ff9900;">IPS3EyeLib</span></span><span><span style="color:#ff9900;">::</span></span><span><span style="color:#ff9900;">GetFormats</span></span><span><span style="color:#ff9900;">()</span></span><span><span style="color:#ff9900;">[i]</span></span><span><span style="color:#ff9900;">.</span></span><span><span style="color:#ff9900;">width</span></span><span><span style="color:#ff9900;">;<br />
    </span></span><span><span style="color:#ff9900;">height</span></span><span><span style="color:#ff9900;">=</span></span><span><span style="color:#ff9900;">IPS3EyeLib</span></span><span><span style="color:#ff9900;">::</span></span><span><span style="color:#ff9900;">GetFormats</span></span><span><span style="color:#ff9900;">()</span></span><span><span style="color:#ff9900;">[i]</span></span><span><span style="color:#ff9900;">.</span></span><span><span style="color:#ff9900;">height</span></span><span><span style="color:#ff9900;">;<br />
    </span></span><span><span style="color:#ff9900;">rate</span></span><span><span style="color:#ff9900;">=</span></span><span><span style="color:#ff9900;">IPS3EyeLib</span></span><span><span style="color:#ff9900;">::</span></span><span><span style="color:#ff9900;">GetFormats</span></span><span><span style="color:#ff9900;">()</span></span><span><span style="color:#ff9900;">[i]</span></span><span><span style="color:#ff9900;">.</span></span><span><span style="color:#ff9900;">rate</span></span><span><span style="color:#ff9900;">;<br />
    </span></span><span><span style="color:#ff9900;">description</span></span><span><span style="color:#ff9900;">=</span></span><span><span style="color:#ff9900;">IPS3EyeLib</span></span><span><span style="color:#ff9900;">::</span></span><span><span style="color:#ff9900;">GetFormats</span></span><span><span style="color:#ff9900;">()</span></span><span><span style="color:#ff9900;">[i]</span></span><span><span style="color:#ff9900;">.</span></span><span><span style="color:#ff9900;">formatTxt</span></span><span><span style="color:#ff9900;">;<br />
    </span></span><span><span style="color:#ff9900;">// Display available formats ...<br />
</span> </span><span><span style="color:#ff9900;">}</span></span></p>
<p></span></code><code><span><span style="color:#ff9900;">// Decide on the format to use (Example: 320x240 * 30fps)<br />
// Select this format<br />
</span> </span><span><span style="color:#ff9900;">pCam</span></span><span><span style="color:#ff9900;">-&gt;</span></span><span><span style="color:#ff9900;">SetFormat</span></span><span><span style="color:#ff9900;">(</span></span><span><span style="color:#ff9900;">IPS3EyeLib</span></span><span><span style="color:#ff9900;">::</span></span><span><span style="color:#ff9900;">GetFormatIndex</span></span><span><span style="color:#ff9900;">(</span></span><span><span style="color:#ff9900;">320</span></span><span><span style="color:#ff9900;">,</span></span><span><span style="color:#ff9900;">240</span></span><span><span style="color:#ff9900;">,</span></span><span><span style="color:#ff9900;">30</span></span><span><span style="color:#ff9900;">));<br />
</span> </span><span><span style="color:#ff9900;">// Allocate image buffer (we are going to capture 24bit RGB images)<br />
</span> </span><span><span style="color:#ff9900;">// The supported color depths are 16, 24 and 32</span></span><span style="color:#ff9900;"><br />
</span> <span><span style="color:#ff9900;">PBYTE pBuffer</span></span><span><span style="color:#ff9900;">=new </span></span><span><span style="color:#ff9900;">BYTE[</span></span><span><span style="color:#ff9900;">(</span></span><span><span style="color:#ff9900;">320</span></span><span><span style="color:#ff9900;">*</span></span><span><span style="color:#ff9900;">240</span></span><span><span style="color:#ff9900;">*</span></span><span><span style="color:#ff9900;">24</span></span><span><span style="color:#ff9900;">)/</span></span><span><span style="color:#ff9900;">8]</span></span><span><span style="color:#ff9900;">;<br />
</span> </span><span><span style="color:#ff9900;">// Start capturing<br />
</span> </span><span><span style="color:#ff9900;">pCam</span></span><span><span style="color:#ff9900;">-&gt;</span></span><span><span style="color:#ff9900;">StartCapture</span></span><span><span style="color:#ff9900;">();<br />
</span> </span><span><span style="color:#ff9900;">// Process frames until 'done'<br />
</span> </span><span><span style="color:#ff9900;">bool done</span></span><span><span style="color:#ff9900;">=</span></span><span><span style="color:#ff9900;">false</span></span><span><span style="color:#ff9900;">;<br />
while(!</span></span><span><span style="color:#ff9900;">done</span></span><span><span style="color:#ff9900;">)<br />
</span> </span><span><span style="color:#ff9900;">{<br />
    </span></span><span><span style="color:#ff9900;">// This function will block until a new frame is available<br />
    // It will then fill the buffer with frame image data<br />
    </span></span><span><span style="color:#ff9900;">if(</span></span><span><span style="color:#ff9900;">pCam</span></span><span><span style="color:#ff9900;">-&gt;</span></span><span><span style="color:#ff9900;">GetFrame</span></span><span><span style="color:#ff9900;">(</span></span><span><span style="color:#ff9900;">pBuffer</span></span><span><span style="color:#ff9900;">, </span></span><span><span style="color:#ff9900;">24</span></span><span><span style="color:#ff9900;">, </span></span><span><span style="color:#ff9900;">false</span></span><span><span style="color:#ff9900;">))<br />
</span> </span><span><span><span style="color:#ff9900;">    </span></span><span><span style="color:#ff9900;">{<br />
        </span></span><span><span style="color:#ff9900;">// Process/display video frame here<br />
        // ...<br />
        // If your program is done set 'done=true;'<br />
    </span></span><span><span style="color:#ff9900;">}</span></span><span style="color:#ff9900;"><br />
</span> </span><span><span style="color:#ff9900;">}<br />
</span> </span><span><span style="color:#ff9900;">// Free the image buffer<br />
</span> </span><span><span style="color:#ff9900;">delete [] pBuffer</span></span><span><span style="color:#ff9900;">;<br />
</span> </span><span><span style="color:#ff9900;">// Stop capturing<br />
</span> </span><span><span style="color:#ff9900;">pCam</span></span><span><span style="color:#ff9900;">-&gt;</span></span><span><span style="color:#ff9900;">StopCapture</span></span><span><span style="color:#ff9900;">();<br />
</span> </span><span><span style="color:#ff9900;">// Free the <br />
</span> </span><span><span style="color:#ff9900;">delete pCam</span></span><span><span style="color:#ff9900;">;</span></span></code></div>
<p> </p>
<p>The latest setup file <strong>(PS3EyeSetup.2.0b81021)</strong>, besides the PS3Eye driver, DirectShow filter and test app, includes the following files in the SDK directory:</p>
<ul>
<li>IPS3EyeLib.h &#8211; Camera API include file </li>
<li>PS3EyeLib.lib &#8211; Camera API library file </li>
<li>PS3EyeLib.dll &#8211; Camera API dynamic library file</li>
</ul>
<p>List of fixes/additions in the current release:</p>
<p>- Created DirectShow camera property page (selectable resolution and frame rate) <br />
- Support for RGB-16/24/32 color output format <br />
- Implemented both 32-bit and 64-bit versions of the PS3Eye driver <br />
- Fixed the PS3EyeCamera.inf file so that drivers (32-bit and 64-bit) install correctly<br />
- Improved capture performance and responsiveness on Vista OS</p>
<p> <br />
If you find the software useful or if you feel like supporting this project, please feel free to click the donation link below.</p>
<p style="text-align:center;"><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;hosted_button_id=248915"><img class="aligncenter" src="http://alexpopovich.files.wordpress.com/2008/10/donate.gif" alt="" /></a></p>
<p> </p>
<p>And of course, the files: <a href="http://www.codelaboratories.com/files/PS3EyeSetup.2.0b81021.exe">PS3EyeSetup</a> (v2.0b81021) and <a href="http://www.codelaboratories.com/files/TouchLibPS3Eye(rev400).rar">PS3Eye TouchLib (rev400) build</a>.</p>
<p>Enjoy!</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/alexpopovich.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/alexpopovich.wordpress.com/148/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/alexpopovich.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/alexpopovich.wordpress.com/148/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/alexpopovich.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/alexpopovich.wordpress.com/148/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/alexpopovich.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/alexpopovich.wordpress.com/148/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/alexpopovich.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/alexpopovich.wordpress.com/148/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=alexpopovich.wordpress.com&blog=4743229&post=148&subd=alexpopovich&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://alexpopovich.wordpress.com/2008/10/20/ps3eye-camera-sdk-for-use-in-your-own-applications/feed/</wfw:commentRss>
		<slash:comments>66</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ec224ae28504df8036094b75983c7b37?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">alexpopovich</media:title>
		</media:content>

		<media:content url="http://alexpopovich.files.wordpress.com/2008/10/donate.gif" medium="image" />
	</item>
		<item>
		<title>Sony PS3Eye Camera TouchLib, DirectShow and more&#8230;</title>
		<link>http://alexpopovich.wordpress.com/2008/10/17/sony-ps3eye-camera-touchlib-directshow-and-more/</link>
		<comments>http://alexpopovich.wordpress.com/2008/10/17/sony-ps3eye-camera-touchlib-directshow-and-more/#comments</comments>
		<pubDate>Fri, 17 Oct 2008 07:59:11 +0000</pubDate>
		<dc:creator>Alexander Popovich</dc:creator>
				<category><![CDATA[Sony PS3Eye Hacks]]></category>
		<category><![CDATA[TouchLib]]></category>

		<guid isPermaLink="false">http://alexpopovich.wordpress.com/?p=134</guid>
		<description><![CDATA[I’m pleased to announce the new release of the PS3Eye driver. The camera code had been completely rewritten from the ground up. The driver now uses Microsoft’s WinUSB driver. I decided to go this route since the old driver had some performance issues. It is strange that Sony have chosen to stream video over USB [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=alexpopovich.wordpress.com&blog=4743229&post=134&subd=alexpopovich&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I’m pleased to announce the new release of the PS3Eye driver. The camera code had been completely rewritten from the ground up. The driver now uses Microsoft’s WinUSB driver. I decided to go this route since the old driver had some performance issues. It is strange that Sony have chosen to stream video over USB bulk transfer pipe. Usually, video and audio USB devices use isohronous transfers since they have higher priority. On a slower systems this results in the video frame data drop resulting in shifted (out of sync) image.</p>
<p>Anyways, the good new is that this time around the driver will work with both x86 and x64 version of Windows (XP and Vista). This will hopefully make many of you who were asking for x64 version very happy.</p>
<p><strong>Installation</strong></p>
<p>Please make sure you completely remove any previous versions of PS3Eye drivers and software. <br />
You can easily check if this is done properly by plugging the camera checking if Windows detects and automatically installs the driver. <br />
If it doesn’t, the driver has been removed. To install download and run the latest <strong><a href="http://alexpopovich.wordpress.com/2008/10/02/sony-ps3eye-camera-directshow-capture-source-filter/">PS3EyeSetup</a></strong> file and follow the instructions. <br />
If your camera is not automatically detected when you plug it in, point the device manager to the <strong>Driver</strong> directory under the installation path. The driver will install and your camera is now ready. <br />
VC++ 2005 SP1 redistributable is also included in the PS3EyeSetup for your convenience.</p>
<p><strong>PS3Eye as DirectShow Capture Device</strong></p>
<p>The PS3Eye.ax is the DirectShow video capture component that is automatically registered by the PS3EyeSetup. It exposes the camera frames in the RGB24 color format for better software compatibility. Here is the list of currently supported resolutions and frame rates:</p>
<ul>
<li><strong> 320&#215;240 @ 15fps </strong></li>
<li><strong> 320&#215;240 @ 30fps </strong></li>
<li><strong> 320&#215;240 @ 60fps </strong></li>
<li><strong> 320&#215;240 @ 75fps </strong></li>
<li><strong> 320&#215;240 @ 100fps </strong></li>
<li><strong> 320&#215;240 @ 125fps </strong></li>
<li><strong> 320&#215;240 @ 150fps (experimental) </strong></li>
<li><strong> 640&#215;480 @ 30fps </strong></li>
<li><strong> 640&#215;480 @ 40fps </strong></li>
<li><strong> 640&#215;480 @ 50fps </strong></li>
<li><strong> 640&#215;480 @ 60fps </strong></li>
<li><strong> 640&#215;480 @ 75fps (experimental)</strong></li>
</ul>
<p><strong>PS3Eye TouchLib Build</strong></p>
<p>I am very excited to announce the first TouchLib build that now fully supports the PS3Eye camera. All of the above resolutions and frame rates are supported in the current build. <br />
I implemented a new TouchLib filter called <strong>ps3eyecapture</strong> that loads the PS3Eye driver directly and allows the use of this device in multitouch applications. The direct to PS3Eye camera through the driver guaranties the minimal capture latency.</p>
<p>To select the desired resolution and frame rate, just uncomment the <strong>format</strong> parameter line as shown here:</p>
<p><img src="http://www.codelaboratories.com/images/TouchLibFilterGraph.jpg" alt="TouchLibFilterGraph.jpg" /></p>
<p>NOTE: Please make sure you backup the <strong>config.xml</strong> file before running TouchLib since it will overwrite it on exit and you will lose all of the commented formats.</p>
<p>And of course, the files: <a href="http://www.codelaboratories.com/files/PS3EyeSetup.2.0b81109.exe">PS3EyeSetup</a> (v2.0b81109) and <a href="http://www.codelaboratories.com/files/TouchLibPS3Eye.rar">TouchLib (PS3Eye) build </a>.</p>
<p>Enjoy!</p>
<p>If you find the software useful or if you feel like supporting this project, please feel free to click the donation link below.</p>
<p style="text-align:center;"><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;hosted_button_id=248915"><img class="aligncenter" src="http://alexpopovich.files.wordpress.com/2008/10/donate.gif" alt="" /></a></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/alexpopovich.wordpress.com/134/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/alexpopovich.wordpress.com/134/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/alexpopovich.wordpress.com/134/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/alexpopovich.wordpress.com/134/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/alexpopovich.wordpress.com/134/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/alexpopovich.wordpress.com/134/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/alexpopovich.wordpress.com/134/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/alexpopovich.wordpress.com/134/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/alexpopovich.wordpress.com/134/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/alexpopovich.wordpress.com/134/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=alexpopovich.wordpress.com&blog=4743229&post=134&subd=alexpopovich&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://alexpopovich.wordpress.com/2008/10/17/sony-ps3eye-camera-touchlib-directshow-and-more/feed/</wfw:commentRss>
		<slash:comments>48</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ec224ae28504df8036094b75983c7b37?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">alexpopovich</media:title>
		</media:content>

		<media:content url="http://www.codelaboratories.com/images/TouchLibFilterGraph.jpg" medium="image">
			<media:title type="html">TouchLibFilterGraph.jpg</media:title>
		</media:content>

		<media:content url="http://alexpopovich.files.wordpress.com/2008/10/donate.gif" medium="image" />
	</item>
		<item>
		<title>Sony PS3Eye Camera DirectShow Capture Source Filter *Update* v3.0.0.0901</title>
		<link>http://alexpopovich.wordpress.com/2008/10/02/sony-ps3eye-camera-directshow-capture-source-filter/</link>
		<comments>http://alexpopovich.wordpress.com/2008/10/02/sony-ps3eye-camera-directshow-capture-source-filter/#comments</comments>
		<pubDate>Thu, 02 Oct 2008 22:55:27 +0000</pubDate>
		<dc:creator>Alexander Popovich</dc:creator>
				<category><![CDATA[Sony PS3Eye Hacks]]></category>
		<category><![CDATA[PS3Eye DirectShow Source Filter]]></category>

		<guid isPermaLink="false">http://alexpopovich.wordpress.com/?p=55</guid>
		<description><![CDATA[Well, here it is… 
I managed to put together a first version of the DirectShow capture filter for PS3Eye camera. 
This will allow us to use this great camera in various Windows applications (assuming they are compatible with DirectShow system) including TouchLib for use in multitouch applications.
I made single PS3EyeSetup application that will install PS3Eye driver, DirectShow [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=alexpopovich.wordpress.com&blog=4743229&post=55&subd=alexpopovich&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Well, here it is… <br />
I managed to put together a first version of the DirectShow capture filter for PS3Eye camera. <br />
This will allow us to use this great camera in various Windows applications (assuming they are compatible with DirectShow system) including TouchLib for use in multitouch applications.</p>
<p>I made single PS3EyeSetup application that will install PS3Eye driver, DirectShow filter and test applications all at once. It will also allow for clean Unistall, for those of you that are experiencing problems with Flash content in IExplorer and Mozilla browsers. Please note that before running Uninstaller you must close any application that uses PS2Eye camera or some of the camera component will not be properly removed.</p>
<p><strong>Installation Steps:</strong></p>
<p>- Unplug the PS3Eye camera from your comupter.<br />
- Uninstall any previous version of PS3Eye software.<br />
- Download and run the latest <strong>PS3EyeSetup</strong> file.<br />
- Click &#8216;Install&#8217; and follow the setup process.<br />
- Plug in the camera.</p>
<p>After successful installation, your Device Manager should look similar to this: <br />
<img src="http://www.codelaboratories.com/images/PS3EyeDMWinUSB.jpg" alt="" /></p>
<p>You can run the <strong>PS3EyeTest </strong>application from the start menu at this point to verify if camera installed properly. You&#8217;ll see something like this:<br />
<img src="http://www.codelaboratories.com/images/PS3EyeApp.jpg" alt="" width="500" /></p>
<p>I added the option of controlling the camera settings such as Gain, Exposure, White balance etc.<br />
<img src="http://www.codelaboratories.com/images/PS3EyeAppControl.jpg" alt="" width="500" /></p>
<p>DirectShow Video Source for PS3Eye camera will also be installed, registered and ready for use. To test if PS3Eye DirectShow component functions properly, run the <strong>AmCap</strong> application from the start menu.</p>
<p>After a few moments the camera will start capturing and the AMCAP will show the camera preview in its window: <br />
<img src="http://www.codelaboratories.com/images/PS3EyeAmCap.jpg" alt="" width="500" /></p>
<p>Camera properties selects video format:<img src="http://www.codelaboratories.com/images/PS3EyeAmCapFormat.jpg" alt="" width="500" /></p>
<p>Camera settings:<br />
<img src="http://www.codelaboratories.com/images/PS3EyeAmCapSettings.jpg" alt="" width="500" /></p>
<p>Currently the PS3Eye camera DirectShow component is set by default to capture uncompressed 640&#215;480 RGB (24bit) video at 30fps. </p>
<p>Now you can enjoy using this great camera in your favorite Windows app!</p>
<p>NOTE: Thank you all for your feedback. For those of you who are experiencing problems, you can now uninstall the software by running <strong>Uninstall</strong> from the start menu. If for some reason the camera DirectShow files (PS3Eye.ax and PS3EyeLib.dll) are not removed and still on your system, follow these steps to manually remove them:</p>
<p><strong>Manual removal of PS3Eye.ax and PS3EyeLib.dll files:</strong></p>
<p>- Close any program that are using PS3Eye camera.<br />
- Press <strong>&#8216;WinKey&#8217;+R</strong> on your keyboard or alternatively go to <strong>Start-&gt;Run</strong><br />
- Type the following: <strong>regsvr32 /u &#8220;C:\Program Files\AlexP\PS3Eye.ax&#8221;</strong><br />
- You will see the following dialog box confirming successful un-registration of the PS3Eye.ax file.<br />
<img src="http://www.codelaboratories.com/images/PS3EyeManualRemoval.jpg" alt="" /><br />
- Now you can safely delete PS3Eye.ax and PS3EyeLib.dll from your machine.</p>
<p>If the manual removal steps above fail for some reason, run your Windows in safe mode and repeat these steps.</p>
<p><strong>To Do List:</strong></p>
<p><span style="text-decoration:line-through;"> &#8211; Make Setup application</span><br />
<span style="text-decoration:line-through;"> &#8211; Create camera property pages</span><br />
<span style="text-decoration:line-through;"> &#8211; Add camera resolution selection (640&#215;480, 320&#215;240, 160&#215;120)</span><br />
- Add selectable camera capture window (x, y, width, height)<br />
<span style="text-decoration:line-through;"> &#8211; Add capture frame rate adjustment (640&#215;480@60fps max, 320&#215;240@120fps max)</span><br />
<span style="text-decoration:line-through;"> &#8211; Add selection of Auto/Manual camera operation modes</span><br />
<span style="text-decoration:line-through;"> &#8211; Manual adjustment for Exposure and Gain</span><br />
<span style="text-decoration:line-through;"> &#8211; Add RGB-16/24/32 color output format (this will increase compatibility with the software out there)</span><br />
<span style="text-decoration:line-through;"> &#8211; Implement 64-bit version of the PS3Eye driver</span></p>
<p>I am currently working on implementing these features. As am only working part-time on this project  please be patient and check <a href="http://alexpopovich.wordpress.com/category/sony-ps3eye-hacks/"><strong>here</strong></a> for future updates.</p>
<p><span style="color:#ffcc00;">NOTE: Since currently I do not control the PS3Eye&#8217;s microphone (detected and installed by Windows by default), there is no way for me to make sure that every program that uses both camera and microphone will work properly. I am aware that there are some issues with this when running WML and other programs on some machines. I am currently looking into this and possibly a way to find a workaround. </span></p>
<p>And most importantly, the PS3Eye Setup file:</p>
<p><span style="color:#ffcc00;">NOTE: The older setup files are crossed but still available below. For the latest setup scroll to the bottom.</span></p>
<p><a href="http://www.codelaboratories.com/files/PS3EyeSetup.1.0b81006.exe"><span style="text-decoration:line-through;">PS3EyeSetup</span></a><span style="text-decoration:line-through;"> (v1.0b81006)</span></p>
<p>Notes (v1.0b81006): I worked on major bug fix. Flash player camera capture now works properly. I successfully tested it on <a title="http://www.cameroid.com" href="http://www.cameroid.com" target="_blank">http://www.cameroid.com</a></p>
<p><a href="http://www.codelaboratories.com/files/PS3EyeSetup.1.0b81007.exe"><span style="text-decoration:line-through;">PS3EyeSetup</span></a><span style="text-decoration:line-through;"> (v1.0b81007)</span></p>
<p>Notes (v1.0b81007): Increased compatibility by setting default capture frame rate to 15fps for DirectShow filter (320&#215;240), making it fully compatible with Flash and many video conferencing programs out there. Fixed &#8216;green screen&#8217; bug.</p>
<p><a href="http://www.codelaboratories.com/files/PS3EyeSetup.1.0b81008.exe"><span style="text-decoration:line-through;">PS3EyeSetup</span></a><span style="text-decoration:line-through;"> (v1.0b81008)</span></p>
<p>Notes (v1.0b81008): Fixed preview/capture issue with AMCAP and other programs. The camera resources are properly released now.</p>
<p><a href="http://www.codelaboratories.com/files/PS3EyeSetup.2.0b81019.exe"><span style="text-decoration:line-through;">PS3EyeSetup</span></a><span style="text-decoration:line-through;"> (v2.0b81019)</span></p>
<p>Notes (v2.0b81019): Created DirectShow camera property page (selectable resolution and frame rate). Support for RGB-16/24/32 color output format. Implemented both 32-bit and 64-bit version of the PS3Eye driver. Fixed the PS3EyeCamera.inf file so that drivers install correctly. Included PS3EyeLib SDK as described <a href="http://alexpopovich.wordpress.com/2008/10/20/ps3eye-camera-sdk-for-use-in-your-own-applications/">here</a>.</p>
<p><a href="http://www.codelaboratories.com/files/PS3EyeSetup.2.0b81021.exe"><span style="text-decoration:line-through;">PS3EyeSetup</span></a><span style="text-decoration:line-through;"> (v2.0b81021)</span></p>
<p>Notes (v2.0b81021): Driver installation tested on both Vista x86 and x64 it now works properly and driver files are found correctly. As of this version (v2.0b81021) the PS3EyeLib driver uses the advanced thread scheduling features only available in Vista. This greatly improves its performance and stability on this OS.</p>
<p><a href="http://www.codelaboratories.com/files/PS3EyeSetup.2.0b81029.exe"><span style="text-decoration:line-through;">PS3EyeSetup</span></a><span style="text-decoration:line-through;"> (v2.0b81029)</span></p>
<p>Notes (v2.0b81029): New version of driver now supports resolution selection as well as the adjustment of the camera settings such as Gain, Exposure, White balance etc. Please make sure you fully uninstall any previous version of PS3Eye software you have on your machine before installing this latest release.</p>
<p><a href="http://www.codelaboratories.com/files/PS3EyeSetup.2.0b81109.exe"><span style="text-decoration:line-through;">PS3EyeSetup</span></a><span style="text-decoration:line-through;"> (v2.0b81109)</span></p>
<p>Notes (v2.0b81109): Fixed crash problems with various browsers involving Flash content, including crashes when going into &#8216;<em>Settings&#8217; </em>option in the embedded Flash player. This also fixes problems some experienced with MSN, Skype and others. Succesfully tested the new version on the Cameroid website. Please make sure you fully uninstall any previous version of PS3Eye software you have on your machine before installing this latest release.</p>
<p><a href="http://www.codelaboratories.com/files/PS3EyeSetup.2.0b81111.exe"><span style="text-decoration:line-through;">PS3EyeSetup</span></a><span style="text-decoration:line-through;"> (v2.0b81111) (MD-5: 7DCDCDBF6B0E184AEAA8E709F259E576)</span></p>
<p>Notes (v2.0b81111): Fixed bug that caused errors in AMCAP in the previous version. At the same time fixed error issues in Flash player. Some of you reported that there is a worm in a setup file. After investigating the issue I found out that my ISP&#8217;s server was infected. They fixed the issue and I uploaded the setup file again. I included the MD-5 checksum of the original file. I tested this file with both Kaspersky and Avast! and it is clean.</p>
<p>The camera was tested and works with Skype. Here are some screenshots of camera setup window in Skype.</p>
<p>Skype video:<br />
<img src="http://www.codelaboratories.com/images/PS3EyeSkype.jpg" alt="" width="500" /></p>
<p>Camera settings:<br />
<img src="http://www.codelaboratories.com/images/PS3EyeSettingsSkype.jpg" alt="" width="500" /></p>
<p><span style="text-decoration:line-through;"><a href="http://www.codelaboratories.com/files/PS3EyeSetup.2.0b81231.exe">PS3EyeSetup</a> (v2.0b81231) (MD-5: EB14A19766BE5DEC8340E78C6AC03819)</span></p>
<p>Notes (v2.0b81231): Fixed issue with &#8216;file in use&#8217; (write protected) PS3Eye.ax file. This was due to running installer/uninstaller while MSN messenger is opened. Fixed annoying &#8217;software upgrade&#8217; popup.</p>
<p><span style="text-decoration:line-through;"><a href="http://www.codelaboratories.com/files/PS3Eye Camera Setup v2.1.0.0130.exe">PS3EyeSetup</a> (v2.1.0.0130) (MD-<span id="more-55"></span><!--more--><!--more-->5: 67F0D2D4D10D3428B3D6F861AD478A12)</span></p>
<p>Notes (v2.1.0.0130): Thank you for your valuable feedback. I finally tracked down and fixed the annoying popup to upgrade the software. It was due to one of the libraries I was using in my code. I fully rewrote that part.</p>
<p><span style="text-decoration:line-through;"><a href="http://www.codelaboratories.com/files/PS3Eye Camera Setup v3.0.0.0825.exe">PS3EyeSetup</a> (v3.0.0.0825) (MD-5: EAA8EB00AE85C6F1D9B495F72B45F0B4)</span></p>
<p>Notes (v3.0.0.0825): Thank you for all your valuable feedback. Fixes in this version:<br />
- Improved driver stability (this relates to the freezing of the camera image on some machines)<br />
- Overall CPU usage was greatly reduced by optimizing the critical code. This code is now implemented using hand optimized MMX/SSE instructions.<br />
- Various fixes in PS3Eye.ax direct show component. This should improve compatibility with many programs that use this feature (i.e. Skype, MSN, Flash)<br />
- Direct show applications can now use full set of PS3Eye camera frame rate capabilities. Here is the list of supported formats: 320&#215;240 @ 15, 30, 60, 75, 100, 125 fps and 640&#215;480 @ 15, 30, 40, 50, 60 fps<br />
- Full XP/Vista/Windows 7 support</p>
<p><span style="text-decoration:line-through;"><a href="http://www.codelaboratories.com/files/PS3Eye Camera Setup v3.0.0.0827.exe">PS3EyeSetup</a> (v3.0.0.0827) (MD-5: B672686ECA42E0A15EC73E065BC9D8D3)</span></p>
<p>Notes (v3.0.0.0827): Fixes in this version:<br />
- Fixed browser crashing issue when the PS3Eye camera is not plugged in</p>
<p><span style="color:#ff0000;"><strong>&gt;&gt;&gt; <a href="http://www.codelaboratories.com/files/PS3Eye Camera Setup v3.0.0.0901.exe">PS3EyeSetup</a> (v3.0.0.0901) (MD-5: 2774325719386C063ECBCCF907F0636F) &lt;&lt;&lt;</strong></span></p>
<p><span style="color:#ff0000;">Notes (v3.0.0.0901): Fixes in this version:<br />
- Fixed camera compatibility with Skype v4.1<br />
</span></p>
<p>Please join my <a href="http://www.alexpopovich.com/forum/topic.php?id=2">forum</a> to further discuss this topic.</p>
<p style="text-align:center;"><span style="color:#ff0000;"><a href="http://alexpopovich.files.wordpress.com/2008/11/works-on-my-machine-starburst_3.png"><img class="size-full wp-image-196 aligncenter" title="works-on-my-machine-starburst_3" src="http://alexpopovich.files.wordpress.com/2008/11/works-on-my-machine-starburst_3.png?w=200&#038;h=193" alt="works-on-my-machine-starburst_3" width="200" height="193" /></a></span></p>
<p>If you find the software useful or if you feel like supporting this project, please feel free to click the donation button below.</p>
<p style="text-align:center;"><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;hosted_button_id=248915"><img class="aligncenter" src="http://alexpopovich.files.wordpress.com/2008/10/donate.gif" alt="" /></a></p>
<p style="text-align:left;"> </p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/alexpopovich.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/alexpopovich.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/alexpopovich.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/alexpopovich.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/alexpopovich.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/alexpopovich.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/alexpopovich.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/alexpopovich.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/alexpopovich.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/alexpopovich.wordpress.com/55/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=alexpopovich.wordpress.com&blog=4743229&post=55&subd=alexpopovich&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://alexpopovich.wordpress.com/2008/10/02/sony-ps3eye-camera-directshow-capture-source-filter/feed/</wfw:commentRss>
		<slash:comments>790</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ec224ae28504df8036094b75983c7b37?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">alexpopovich</media:title>
		</media:content>

		<media:content url="http://www.codelaboratories.com/images/PS3EyeDMWinUSB.jpg" medium="image" />

		<media:content url="http://www.codelaboratories.com/images/PS3EyeApp.jpg" medium="image" />

		<media:content url="http://www.codelaboratories.com/images/PS3EyeAppControl.jpg" medium="image" />

		<media:content url="http://www.codelaboratories.com/images/PS3EyeAmCap.jpg" medium="image" />

		<media:content url="http://www.codelaboratories.com/images/PS3EyeAmCapFormat.jpg" medium="image" />

		<media:content url="http://www.codelaboratories.com/images/PS3EyeAmCapSettings.jpg" medium="image" />

		<media:content url="http://www.codelaboratories.com/images/PS3EyeManualRemoval.jpg" medium="image" />

		<media:content url="http://www.codelaboratories.com/images/PS3EyeSkype.jpg" medium="image" />

		<media:content url="http://www.codelaboratories.com/images/PS3EyeSettingsSkype.jpg" medium="image" />

		<media:content url="http://alexpopovich.files.wordpress.com/2008/11/works-on-my-machine-starburst_3.png" medium="image">
			<media:title type="html">works-on-my-machine-starburst_3</media:title>
		</media:content>

		<media:content url="http://alexpopovich.files.wordpress.com/2008/10/donate.gif" medium="image" />
	</item>
		<item>
		<title>Differences Between B3.04.06.1 and B4.04.27.1 PS3Eye Camera Firmware</title>
		<link>http://alexpopovich.wordpress.com/2008/09/15/differences-between-b304061-and-b404271-ps3eye-camera-firmware/</link>
		<comments>http://alexpopovich.wordpress.com/2008/09/15/differences-between-b304061-and-b404271-ps3eye-camera-firmware/#comments</comments>
		<pubDate>Mon, 15 Sep 2008 20:30:17 +0000</pubDate>
		<dc:creator>Alexander Popovich</dc:creator>
				<category><![CDATA[Sony PS3Eye Hacks]]></category>
		<category><![CDATA[PS3Eye Camera Firmware B3.04.06.1 and B4.04.27.1]]></category>

		<guid isPermaLink="false">http://alexpopovich.wordpress.com/?p=21</guid>
		<description><![CDATA[The analysis of the differences between B3.04.06.1 and B4.04.27.1 firmware revealed that the only difference between them is the reported amount of power that the device consumes. This information is stored in configuration descriptor in the camera’s EEPROM. 
The B3.04.06.1 version reports 10mA and B4.04.27.1 reports 500mA. This change is due to the fact that in the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=alexpopovich.wordpress.com&blog=4743229&post=21&subd=alexpopovich&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>The analysis of the differences between B3.04.06.1 and B4.04.27.1 firmware revealed that the only difference between them is the reported amount of power that the device consumes. This information is stored in configuration descriptor in the camera’s EEPROM. <br />
The B3.04.06.1 version reports 10mA and B4.04.27.1 reports 500mA. This change is due to the fact that in the newer version of the camera the OV538 chip sits directly on the USB bus as opposed to OV534 chip being behind the GL850A USB2.0 hub controller chip.</p>
<p>PS3Eye firmware B3.04.06.1 dump:<br />
<img src="http://alexpopovich.files.wordpress.com/2008/10/ps3eye-b304061.jpg?w=500" alt="" width="500" /></p>
<p>PS3Eye firmware B4.04.27.1 dump:<br />
<img src="http://alexpopovich.files.wordpress.com/2008/10/ps3eye-b404271.jpg?w=500" alt="" width="500" /></p>
<p>The first two differences belong to the camera device descriptor and refer to the current consumption of this device.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/alexpopovich.wordpress.com/21/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/alexpopovich.wordpress.com/21/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/alexpopovich.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/alexpopovich.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/alexpopovich.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/alexpopovich.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/alexpopovich.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/alexpopovich.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/alexpopovich.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/alexpopovich.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/alexpopovich.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/alexpopovich.wordpress.com/21/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=alexpopovich.wordpress.com&blog=4743229&post=21&subd=alexpopovich&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://alexpopovich.wordpress.com/2008/09/15/differences-between-b304061-and-b404271-ps3eye-camera-firmware/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ec224ae28504df8036094b75983c7b37?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">alexpopovich</media:title>
		</media:content>

		<media:content url="http://alexpopovich.files.wordpress.com/2008/10/ps3eye-b304061.jpg" medium="image" />

		<media:content url="http://alexpopovich.files.wordpress.com/2008/10/ps3eye-b404271.jpg" medium="image" />
	</item>
	</channel>
</rss>