<?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/"
	>

<channel>
	<title>More Than Technical &#187; Uncategorized</title>
	<atom:link href="http://www.morethantechnical.com/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.morethantechnical.com</link>
	<description>On software, code, the internet and more.</description>
	<lastBuildDate>Mon, 06 Feb 2012 23:48:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/>		<item>
		<title>Connecting a Samsung Vibrant and a pico projector</title>
		<link>http://www.morethantechnical.com/2011/08/15/connecting-a-samsung-vibrant-and-a-pico-projector/</link>
		<comments>http://www.morethantechnical.com/2011/08/15/connecting-a-samsung-vibrant-and-a-pico-projector/#comments</comments>
		<pubDate>Mon, 15 Aug 2011 20:37:55 +0000</pubDate>
		<dc:creator>Roy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.morethantechnical.com/?p=913</guid>
		<description><![CDATA[Hi, Wanted to report on some progress I made connecting the Samsung Galaxy S Vibrat smartphone and a 3M MPro110 pico (pocket) projector. It is a fairly simple process, but I couldn&#8217;t really find any schematics of the video ports on either the phone (the 3.5mm headphones jack) or the projector (3.5mm composite video-in jack). [...]]]></description>
			<content:encoded><![CDATA[<p>Hi,</p>
<p>Wanted to report on some progress I made connecting the Samsung Galaxy S Vibrat smartphone and a 3M MPro110 pico (pocket) projector.<br />
It is a fairly simple process, but I couldn&#8217;t really find any schematics of the video ports on either the phone (the 3.5mm headphones jack) or the projector (3.5mm composite video-in jack). So if anyone is trying to do this, they can find the wiring schematics here.<br />
<span id="more-913"></span><br />
So, on the phone side, the 3.5mm headphones jack also gives out PAL/NTSC TV signal if it is enabled in the system menu.<br />
<a href="http://www.morethantechnical.com/wp-content/uploads/2011/08/Screen-shot-2011-08-15-at-4.05.49-PM.png" rel="lightbox[913]"><img class="alignnone size-full wp-image-918" title="Screen shot 2011-08-15 at 4.05.49 PM" src="http://www.morethantechnical.com/wp-content/uploads/2011/08/Screen-shot-2011-08-15-at-4.05.49-PM.png" alt="" width="575" height="320" /></a></p>
<p>A 3.5mm headphones jack with 4-poles is a.k.a TRRS: Tip, Ring, Ring, Sleeve.<br />
The wiring of the 3.5mm TRRS on the Vibrant is simple:</p>
<ul>
<li>Tip: Audio 1</li>
<li>Ring: Audio 2</li>
<li>Ring: TV signal</li>
<li>Sleeve: GND</li>
</ul>
<p>Now, prepare a custom 3.5mm 4-pole connector, and solder a 4-wire cable to it.<br />
I used my own convention with the colors: Audio is Red and Yellow, TV is Green, and Ground is Black.<br />
<a href="http://www.morethantechnical.com/wp-content/uploads/2011/08/Screen-shot-2011-08-15-at-4.22.07-PM.png" rel="lightbox[913]"><img class="alignnone size-full wp-image-920" title="Screen shot 2011-08-15 at 4.22.07 PM" src="http://www.morethantechnical.com/wp-content/uploads/2011/08/Screen-shot-2011-08-15-at-4.22.07-PM.png" alt="" width="532" height="138" /></a></p>
<p>On the MPro110 projector side, I found out they only have a 2-connector 3.5mm jack for the composite video in. But &#8211; and here&#8217;s the scoop &#8211; <em><strong>the GND is not the sleeve, but the tip, and the TV signal goes on the sleeve</strong></em>.</p>
<p>Confusing&#8230; But I can understand why they do that. They want people to use their own accessory cables and not generic ones, so they flip the positions and render all generic cables obsolete.</p>
<p>Anyway, so on the other side of your custom cable, you may use a mono 3.5mm 2-connector plug because that is all you need, but if you bought bulk 3.5 4-connector you might as well use that.<br />
Now you should mind that you need the sleeve to get the signal, so connect Vibrant&#8217;s Green to MPro110&#8242;s Green, Yellow and Black.<br />
MPro110&#8242;s Red, the tip, should go to GND.<br />
<a href="http://www.morethantechnical.com/wp-content/uploads/2011/08/Screen-shot-2011-08-15-at-4.19.20-PM.png" rel="lightbox[913]"><img class="alignnone size-full wp-image-919" title="Screen shot 2011-08-15 at 4.19.20 PM" src="http://www.morethantechnical.com/wp-content/uploads/2011/08/Screen-shot-2011-08-15-at-4.19.20-PM.png" alt="" width="613" height="241" /></a></p>
<p>Now you&#8217;re all set!<br />
Vibrant&#8217;s screen should show up on MPro110&#8242;s projection.<br />
<a href="http://www.morethantechnical.com/wp-content/uploads/2011/08/2011-08-15-16.29.33.jpg" rel="lightbox[913]"><img class="alignnone size-medium wp-image-923" title="SAMSUNG" src="http://www.morethantechnical.com/wp-content/uploads/2011/08/2011-08-15-16.29.33-e1313440321884-225x300.jpg" alt="" width="225" height="300" /></a></p>
<p>Thanks for listening.</p>
<p>Roy.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.morethantechnical.com%2F2011%2F08%2F15%2Fconnecting-a-samsung-vibrant-and-a-pico-projector%2F&amp;title=Connecting%20a%20Samsung%20Vibrant%20and%20a%20pico%20projector" id="wpa2a_2"><img src="http://www.morethantechnical.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.morethantechnical.com/2011/08/15/connecting-a-samsung-vibrant-and-a-pico-projector/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Congratulations Roy &#8211; Again!</title>
		<link>http://www.morethantechnical.com/2011/06/08/congratulations-roy-again/</link>
		<comments>http://www.morethantechnical.com/2011/06/08/congratulations-roy-again/#comments</comments>
		<pubDate>Wed, 08 Jun 2011 13:45:57 +0000</pubDate>
		<dc:creator>Arnon</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.morethantechnical.com/?p=871</guid>
		<description><![CDATA[I would (again) like to publicly congratulate my friend Roy, who got accepted for a PhD program in Media Arts and Sciences, at the MIT Media Lab. I am very happy the people at MIT was able to see your great talent. I&#8217;m sure this program will get the best out of you, and that [...]]]></description>
			<content:encoded><![CDATA[<p>I would (again) like to publicly congratulate my friend Roy, who got accepted for a PhD program in<br />
Media Arts and Sciences, at the MIT Media Lab.<br />
I am very happy the people at MIT was able to see your great talent.<br />
I&#8217;m sure this program will get the best out of you, and that you will have very intense, interesting and exciting time</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.morethantechnical.com%2F2011%2F06%2F08%2Fcongratulations-roy-again%2F&amp;title=Congratulations%20Roy%20%26%238211%3B%20Again%21" id="wpa2a_4"><img src="http://www.morethantechnical.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.morethantechnical.com/2011/06/08/congratulations-roy-again/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Congratulations! Roy is going to MIT</title>
		<link>http://www.morethantechnical.com/2010/03/30/congratulations-roy/</link>
		<comments>http://www.morethantechnical.com/2010/03/30/congratulations-roy/#comments</comments>
		<pubDate>Tue, 30 Mar 2010 10:10:55 +0000</pubDate>
		<dc:creator>Arnon</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[media arts and science]]></category>
		<category><![CDATA[mit]]></category>
		<category><![CDATA[roy]]></category>

		<guid isPermaLink="false">http://www.morethantechnical.com/2010/03/30/congratulations-roy/</guid>
		<description><![CDATA[I would like to congratulate my friend Roy, who got accepted to M.I.T in the Program in Media Arts and Sciences. Starting this September, Roy will be spending the next two years in Boston. I wish him all the best and luck. I&#8217;m sure this degree will provide some interesting posts to this blog]]></description>
			<content:encoded><![CDATA[<p>I would like to congratulate my friend Roy, who got accepted to M.I.T in the Program in Media Arts and Sciences.<br />
Starting this September, Roy will be spending the next two years in Boston.</p>
<p>I wish him all the best and luck.</p>
<p>I&#8217;m sure this degree will provide some interesting posts to this blog</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.morethantechnical.com%2F2010%2F03%2F30%2Fcongratulations-roy%2F&amp;title=Congratulations%21%20Roy%20is%20going%20to%20MIT" id="wpa2a_6"><img src="http://www.morethantechnical.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.morethantechnical.com/2010/03/30/congratulations-roy/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>New Theme, New Toolbar, New Year</title>
		<link>http://www.morethantechnical.com/2009/09/17/new-theme-new-toolbar-new-year/</link>
		<comments>http://www.morethantechnical.com/2009/09/17/new-theme-new-toolbar-new-year/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 14:58:29 +0000</pubDate>
		<dc:creator>Roy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.morethantechnical.com/2009/09/17/new-theme-new-toolbar-new-year/</guid>
		<description><![CDATA[Hi dear blog readers We are trying out a new theme for the blog. We wanted to move out of the default and included themes of WordPress, and into something a bit different. You will also notice a toolbar at the bottom of the page. It should help you better spread the MoreThenTechnical word! by [...]]]></description>
			<content:encoded><![CDATA[<p>Hi dear blog readers</p>
<p>We are trying out a new theme for the blog. We wanted to move out of the default and included themes of WordPress, and into something a bit different.</p>
<p>You will also notice a toolbar at the bottom of the page. It should help you better spread the MoreThenTechnical word! by giving more social networking tools.</p>
<p>So tell us what you think of it! Should we keep it, trash it, or maybe you have an idea of your own?</p>
<p>BTW, tomorrow is new years eve by the jewish calendar, and in Israel we are celebrating the new year (&#8220;Rosh Ha&#8217;shana&#8221;). So these changes to the blog could not have come at a better time &#8211; a time for new beginnings.</p>
<p>BTW 2 &#8211; I&#8217;m working on a post regarding next-generation image editing, so keep posted.</p>
<p>Thanks!<br />
Roy &#038; Arnon</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.morethantechnical.com%2F2009%2F09%2F17%2Fnew-theme-new-toolbar-new-year%2F&amp;title=New%20Theme%2C%20New%20Toolbar%2C%20New%20Year" id="wpa2a_8"><img src="http://www.morethantechnical.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.morethantechnical.com/2009/09/17/new-theme-new-toolbar-new-year/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Qt &amp; OpenCV combined for face detecting QWidgets</title>
		<link>http://www.morethantechnical.com/2009/03/05/qt-opencv-combined-for-face-detecting-qwidgets/</link>
		<comments>http://www.morethantechnical.com/2009/03/05/qt-opencv-combined-for-face-detecting-qwidgets/#comments</comments>
		<pubDate>Thu, 05 Mar 2009 12:19:37 +0000</pubDate>
		<dc:creator>Roy</dc:creator>
				<category><![CDATA[gui]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[qt]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[face detection]]></category>
		<category><![CDATA[opencv]]></category>

		<guid isPermaLink="false">http://www.morethantechnical.com/?p=212</guid>
		<description><![CDATA[As my search for the best platform to roll-out my new face detection concept continues, I decided to give ol&#8217; Qt framework a go. I like Qt. It&#8217;s cross-platform, a clear a nice API, straightforward, and remindes me somewhat of Apple&#8217;s Cocoa. My intention is to get some serious face detection going on mobile devices. [...]]]></description>
			<content:encoded><![CDATA[<p>As my search for the best platform to roll-out my new face detection concept continues, I decided to give ol&#8217; Qt framework a go.</p>
<p>I like Qt. It&#8217;s cross-platform, a clear a nice API, straightforward, and remindes me somewhat of Apple&#8217;s Cocoa.</p>
<p>My intention is to get some serious face detection going on mobile devices. So that means either the iPhone, which so far did a crummy job performance-wise, or some other mobile device, preferably linux-based.<br />
This led me to the decision to go with Qt. I believe you can get it to work on any linux-ish platform (limo, moblin, android), and since Nokia baught Trolltech &#8211; it&#8217;s gonna work on Nokia phones soon, awesome!</p>
<p>Lets get to the details, shall we?<br />
<span id="more-212"></span><br />
First thing&#8217;s first: face detection.</p>
<p>I ripped OpenCV&#8217;s facedetect.c sample and extracted only the detect_and_draw() function. Originally the function detects the faces and draws a circle over them, but I needed only the face detection and the result bounding rectangle. So in the end I was left with this:</p>
<pre class="brush: cpp; title: ; notranslate">

CvRect detect_and_draw( IplImage* img, CvMemStorage* storage, CvHaarClassifierCascade* cascade )
{
IplImage *gray, *small_img;
int i = 0;

gray = cvCreateImage( cvSize(img-&gt;width,img-&gt;height), 8, 1 );
small_img = cvCreateImage( cvSize( cvRound (img-&gt;width/scale),
cvRound (img-&gt;height/scale)), 8, 1 );

cvCvtColor( img, gray, CV_RGB2GRAY );
cvResize( gray, small_img, CV_INTER_LINEAR );
cvEqualizeHist( small_img, small_img );
cvClearMemStorage( storage );

CvRect* r = NULL;

if( cascade )
{
double t = (double)cvGetTickCount();
CvSeq* faces = cvHaarDetectObjects( small_img, cascade, storage,
1.1, 2, 0
|CV_HAAR_FIND_BIGGEST_OBJECT
//|CV_HAAR_DO_ROUGH_SEARCH
//|CV_HAAR_DO_CANNY_PRUNING
//|CV_HAAR_SCALE_IMAGE
,
cvSize(30, 30) );
t = (double)cvGetTickCount() - t;

printf( &quot;detection time = %gms\n&quot;, t/((double)cvGetTickFrequency()*1000.) );

r = (CvRect*)cvGetSeqElem( faces, i );

cvReleaseImage( &amp;amp;amp;amp;amp;amp;gray );
cvReleaseImage( &amp;amp;amp;amp;amp;amp;small_img );

if(r) {
return cvRect(r-&gt;x,r-&gt;y,r-&gt;width,r-&gt;height);
} else {
return cvRect(-1,-1,0,0);
}

}
</pre>
<p>This can go anywhere in the code base, as it&#8217;s totally independant (as long as you train the cascade and allocate a MemStorage).Note that I am assuming only one face in the input image, and also that it will be the largest detected object. This bring my benchmark to about 25ms per frame, using the original general detection approach of facedetect.c benchmarked at about 160ms per frame.</p>
<p>OK, done with pure OpenCV, on to Qt.</p>
<p>I subclassed a QWidget, who&#8217;s sole purpose is to show the input video with the detected face. For starters, I needed to have a QImage and an IplImage instances as members, they can also share the same buffer (how awesome is that..). I also need a CvCapture, CvMemStorage and a CvHaarCalssifierCascade:</p>
<pre class="brush: cpp; title: ; notranslate">

class FaceRecognizer : public QWidget
{
Q_OBJECT

public:
FaceRecognizer(QWidget *parent = 0);
~FaceRecognizer();

private:
Ui::FaceRecognizerClass ui;

QImage m_i;

QRect faceLoc;

CvMemStorage* storage;
CvHaarClassifierCascade* cascade;
CvCapture* capture;
IplImage* m_opencvimg;

QTimer* m_timer;

void paintEvent(QPaintEvent* e);

public slots:
void queryFrame();
};
</pre>
<p>You can see that I&#8217;m gonna use a QTimer to query the frames from the CvCapture and also I override paintEvent to paint the frame onto the canvas. In fact in my QWidget I have a QFrame, that the image will painted over it. UI was generated in Qt Designer.</p>
<p>First, some initialization in the constructor:</p>
<pre class="brush: cpp; title: ; notranslate">

FaceRecognizer::FaceRecognizer(QWidget *parent)
: QWidget(parent)
{
ui.setupUi(this);

capture = cvCaptureFromAVI( &quot;/home/user/Desktop/video.avi&quot; );
//grab one frame to get width and height

IplImage* frame = cvQueryFrame( capture );

m_i = QImage(QSize(frame-&gt;width,frame-&gt;height),QImage::Format_RGB888);
ui.frame-&gt;setMinimumSize(m_i.width(),m_i.height());
ui.frame-&gt;setMaximumSize(ui.frame-&gt;minimumSize());
//create only the header, as the data buffer is shared, and was allocated by QImage

m_opencvimg = cvCreateImageHeader(cvSize(m_i.width(),m_i.height()),8,3);
m_opencvimg-&gt;imageData = (char*)m_i.bits(); // share buffers

if( frame-&gt;origin == IPL_ORIGIN_TL )
cvCopy( frame, m_opencvimg, 0 );
else
cvFlip( frame, m_opencvimg, 0 );

//images from cvQueryFrame come in BGR form and not what Qt expects - RGB

//and since the buffers are shared - format should be consistent
cvCvtColor(m_opencvimg,m_opencvimg,CV_BGR2RGB);

//we need memstorage and a cascade
storage = cvCreateMemStorage(0);
cascade = (CvHaarClassifierCascade*)cvLoad( CASCADE_NAME, 0, 0, 0 );

//set timer for 50ms intervals

m_timer = new QTimer(this);
connect(m_timer,SIGNAL(timeout()),this,SLOT(queryFrame()));
m_timer-&gt;start(50);
}
</pre>
<p>And now, querying the frame: query CvCapture, convert BGR to RGB, detect faces and update faceLoc QRect.</p>
<pre class="brush: cpp; title: ; notranslate">

void FaceRecognizer::queryFrame() {
IplImage* frame = cvQueryFrame( capture );

if( frame-&gt;origin == IPL_ORIGIN_TL )
cvCopy( frame, m_opencvimg, 0 );
else
cvFlip( frame, m_opencvimg, 0 );
cvCvtColor(m_opencvimg,m_opencvimg,CV_BGR2RGB);

CvRect r = detect_and_draw(m_opencvimg,storage,cascade);
faceLoc = QRect(QPoint(r.x,r.y),QSize(r.width,r.height));

this-&gt;update();
}

Finally - painting, which is easy:

void FaceRecognizer::paintEvent(QPaintEvent* e) {
QPainter painter(this);

painter.drawImage(QPoint(ui.frame-&gt;x(),ui.frame-&gt;y()),m_i);

if(faceLoc.x() &gt; 0 &amp;amp;amp;amp;amp;&amp;amp;amp;amp;amp; faceLoc.y() &gt; 0) {
painter.setBrush(Qt::NoBrush);
painter.setPen(QColor(255,0,0));
painter.drawRect(QRect(faceLoc.x()+ui.frame-&gt;x(),faceLoc.y()+ui.frame-&gt;y(),faceLoc.width(),faceLoc.height()));
}
}
</pre>
<p>Looks like it&#8217;s all done&#8230; Here&#8217;s a video:<br />
<object width="425" height="344" data="http://www.youtube.com/v/3eyh-jmAQR0&amp;hl=en&amp;fs=1" type="application/x-shockwave-flash"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/3eyh-jmAQR0&amp;hl=en&amp;fs=1" /><param name="allowfullscreen" value="true" /></object></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.morethantechnical.com%2F2009%2F03%2F05%2Fqt-opencv-combined-for-face-detecting-qwidgets%2F&amp;title=Qt%20%26%23038%3B%20OpenCV%20combined%20for%20face%20detecting%20QWidgets" id="wpa2a_10"><img src="http://www.morethantechnical.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.morethantechnical.com/2009/03/05/qt-opencv-combined-for-face-detecting-qwidgets/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
	</channel>
</rss>

