<?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:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Rockanjan's Weblog</title>
	<atom:link href="http://rockanjan.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://rockanjan.wordpress.com</link>
	<description>Just another WordPress.com weblog</description>
	<lastBuildDate>Tue, 09 Dec 2008 17:34:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='rockanjan.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Rockanjan's Weblog</title>
		<link>http://rockanjan.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://rockanjan.wordpress.com/osd.xml" title="Rockanjan&#039;s Weblog" />
	<atom:link rel='hub' href='http://rockanjan.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Integer and String in C++ (concatenation and conversion)</title>
		<link>http://rockanjan.wordpress.com/2008/12/09/string-and-integer-conversion-and-concatenation-in-c-plus-plu/</link>
		<comments>http://rockanjan.wordpress.com/2008/12/09/string-and-integer-conversion-and-concatenation-in-c-plus-plu/#comments</comments>
		<pubDate>Tue, 09 Dec 2008 17:14:25 +0000</pubDate>
		<dc:creator>rockanjan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://rockanjan.wordpress.com/?p=4</guid>
		<description><![CDATA[C++ integer to string conversion, integer and string concatenation<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rockanjan.wordpress.com&amp;blog=1452370&amp;post=4&amp;subd=rockanjan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>We want to convert integet to string in many cases. But, it is difficult to find help on how to do it. Here is a simple tip on how it can be done. This will not only convert integer to string but also concatenate strings and integers easily.</p>
<p>[Reference: http://www.yolinux.com/TUTORIALS/LinuxTutorialC++StringClass.html]</p>
<p>#include &lt;stdio.h&gt;<br />
#include &lt;string.h&gt;<br />
#include &lt;iostream&gt;<br />
#include &lt;sstream&gt;<br />
#include &lt;string&gt;<br />
using namespace std;<br />
int main ()<br />
{<br />
string a(&#8220;merging&#8221;);<br />
string b(&#8221; successful\n&#8221;);<br />
cout&lt;&lt;a+b;<br />
ostringstream oss;<br />
oss&lt;&lt;1000;<br />
cout&lt;&lt;a+b+oss.str();<br />
return 0;<br />
}<br />
This technique is used to extract images from vec files in openCV, which is included in my other <a title="Extract images from vec file in OpenCV" href="http://rockanjan.wordpress.com/2008/12/09/opencv-extract-images-from-vec-file/" target="_blank">blog</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rockanjan.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rockanjan.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rockanjan.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rockanjan.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/rockanjan.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/rockanjan.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/rockanjan.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/rockanjan.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rockanjan.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rockanjan.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rockanjan.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rockanjan.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rockanjan.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rockanjan.wordpress.com/4/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rockanjan.wordpress.com&amp;blog=1452370&amp;post=4&amp;subd=rockanjan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://rockanjan.wordpress.com/2008/12/09/string-and-integer-conversion-and-concatenation-in-c-plus-plu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4ba5192e11653bc9108540b521fd98ba?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">rockanjan</media:title>
		</media:content>
	</item>
		<item>
		<title>OpenCV: extract images from .vec file</title>
		<link>http://rockanjan.wordpress.com/2008/12/09/opencv-extract-images-from-vec-file/</link>
		<comments>http://rockanjan.wordpress.com/2008/12/09/opencv-extract-images-from-vec-file/#comments</comments>
		<pubDate>Tue, 09 Dec 2008 17:07:11 +0000</pubDate>
		<dc:creator>rockanjan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://rockanjan.wordpress.com/?p=7</guid>
		<description><![CDATA[OpenCV, extract images from vec file<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rockanjan.wordpress.com&amp;blog=1452370&amp;post=7&amp;subd=rockanjan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In OpenCV haartraining, .vec files are given as input as the positive training examples. We can view the images inside the vec file using opencv-createsamples, but I wanted to extract images out of it. This is what is did.</p>
<p>I edited the file &lt;opencvfolder&gt;/apps/haartraining/src/cvsamples.cpp</p>
<p>first, include the following headers</p>
<p>#include &lt;stdio.h&gt;<br />
#include &lt;iostream&gt;<br />
#include &lt;sstream&gt;<br />
#include &lt;string&gt;</p>
<p>function edited is cvShowVecSamples, in the for-loop for showing the images, edit as following</p>
<p>std::ostringstream stm;       //added<br />
icvGetHaarTraininDataFromVecCallback( sample, &amp;file );<br />
stm&lt;&lt;&#8221;/temp/vecextracted/&#8221;;       //added folder in which to extract images<br />
stm &lt;&lt; i;            //added filename which will be given to save image, integer to string conversion<br />
stm &lt;&lt; &#8220;.pgm&#8221;; //added<br />
std::cout&lt;&lt;&#8221;\n&#8221;; //added<br />
std::cout&lt;&lt;stm.str(); //added<br />
const char *filename = stm.str().c_str(); //added<br />
std::cout&lt;&lt;filename; //added<br />
cvSaveImage(filename, sample); //added<br />
if( scale != 1.0 ) cvResize( sample, scaled_sample, CV_INTER_LINEAR);<br />
cvShowImage(&#8220;Sample&#8221;, scaled_sample );<br />
cvWaitKey(50);</p>
<p>//added == these are the lines that i have added, other lines are the default of OpenCV</p>
<p>Now, you have to rebuild the files. So, in the command line type</p>
<p>make all</p>
<p>Now, when you execute opencv-createsample -vec vecfile.vec, the images are extracted too.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rockanjan.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rockanjan.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rockanjan.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rockanjan.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/rockanjan.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/rockanjan.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/rockanjan.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/rockanjan.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rockanjan.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rockanjan.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rockanjan.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rockanjan.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rockanjan.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rockanjan.wordpress.com/7/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rockanjan.wordpress.com&amp;blog=1452370&amp;post=7&amp;subd=rockanjan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://rockanjan.wordpress.com/2008/12/09/opencv-extract-images-from-vec-file/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4ba5192e11653bc9108540b521fd98ba?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">rockanjan</media:title>
		</media:content>
	</item>
		<item>
		<title>Connect to the internet using ZTE CDMA mobile phone in linux</title>
		<link>http://rockanjan.wordpress.com/2007/08/18/connect-to-the-internet-using-zte-cdma-mobile-phone-in-linux/</link>
		<comments>http://rockanjan.wordpress.com/2007/08/18/connect-to-the-internet-using-zte-cdma-mobile-phone-in-linux/#comments</comments>
		<pubDate>Sat, 18 Aug 2007 07:35:19 +0000</pubDate>
		<dc:creator>rockanjan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://rockanjan.wordpress.com/2007/08/18/connect-to-the-internet-using-zte-cdma-mobile-phone-in-linux/</guid>
		<description><![CDATA[zte cdma internet, cdma linux connect to internet, <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rockanjan.wordpress.com&amp;blog=1452370&amp;post=3&amp;subd=rockanjan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p class="content">Here are the steps:<br />
* connect your mobile with the cable to serial port<br />
* run this command in the terminal: wvdialconf /etc/wvdial.conf.new<br />
* this will show the message if your modem has been detected. If it has been decteced, it gives you the various information relating to your modem. This was the output in mine.<br />
[root@localhost ~]# wvdialconf /etc/wvdial.conf.new<br />
Scanning your serial ports for a modem.</p>
<p>ttyS0&lt;*1&gt;: ATQ0 V1 E1 &#8212; failed with 2400 baud, next try: 9600 baud<br />
ttyS0&lt;*1&gt;: ATQ0 V1 E1 &#8212; failed with 9600 baud, next try: 115200 baud<br />
ttyS0&lt;*1&gt;: ATQ0 V1 E1 &#8212; and failed too at 115200, giving up.<br />
ttyS1&lt;*1&gt;: ATQ0 V1 E1 &#8212; failed with 2400 baud, next try: 9600 baud<br />
ttyS1&lt;*1&gt;: ATQ0 V1 E1 &#8212; failed with 9600 baud, next try: 115200 baud<br />
ttyS1&lt;*1&gt;: ATQ0 V1 E1 &#8212; and failed too at 115200, giving up.<br />
ttyS2&lt;*1&gt;: ATQ0 V1 E1 &#8212; failed with 2400 baud, next try: 9600 baud<br />
ttyS2&lt;*1&gt;: ATQ0 V1 E1 &#8212; failed with 9600 baud, next try: 115200 baud<br />
ttyS2&lt;*1&gt;: ATQ0 V1 E1 &#8212; and failed too at 115200, giving up.<br />
ttyS3&lt;*1&gt;: ATQ0 V1 E1 &#8212; failed with 2400 baud, next try: 9600 baud<br />
ttyS3&lt;*1&gt;: ATQ0 V1 E1 &#8212; failed with 9600 baud, next try: 115200 baud<br />
ttyS3&lt;*1&gt;: ATQ0 V1 E1 &#8212; and failed too at 115200, giving up.<br />
WvModem&lt;*1&gt;: Cannot get information for serial port.<br />
ttyUSB0&lt;*1&gt;: ATQ0 V1 E1 &#8212; failed with 2400 baud, next try: 9600 baud<br />
ttyUSB0&lt;*1&gt;: ATQ0 V1 E1 &#8212; failed with 9600 baud, next try: 115200 baud<br />
ttyUSB0&lt;*1&gt;: ATQ0 V1 E1 &#8212; OK<br />
ttyUSB0&lt;*1&gt;: ATQ0 V1 E1 Z &#8212; OK<br />
ttyUSB0&lt;*1&gt;: ATQ0 V1 E1 S0=0 &#8212; OK<br />
ttyUSB0&lt;*1&gt;: ATQ0 V1 E1 S0=0 &amp;C1 &#8212; OK<br />
ttyUSB0&lt;*1&gt;: ATQ0 V1 E1 S0=0 &amp;C1 &amp;D2 &#8212; OK<br />
ttyUSB0&lt;*1&gt;: ATQ0 V1 E1 S0=0 &amp;C1 &amp;D2 +FCLASS=0 &#8212; OK<br />
ttyUSB0&lt;*1&gt;: Modem Identifier: ATI &#8212; ERROR<br />
ttyUSB0&lt;*1&gt;: Speed 230400: AT &#8212; Speed 230400: AT &#8212; Speed 230400: AT &#8212; Max speed is 115200; that should be safe.<br />
ttyUSB0&lt;*1&gt;: ATQ0 V1 E1 S0=0 &amp;C1 &amp;D2 +FCLASS=0 &#8212; and failed too at 115200, giving up.</p>
<p>Sorry, no modem was detected!  Is it in use by another program?<br />
Did you configure it properly with setserial?</p>
<p>Please read the FAQ at <a title="http://open.nit.ca/wvdial/" href="http://open.nit.ca/wvdial/">http://open.nit.ca/wvdial/</a></p>
<p>If you still have problems, send mail to <a href="mailto:wvdial-list@lists.nit.ca">????????@lists.nit.ca</a>.</p>
<p>* Looking at the output message, you can find that your modem has been detected at ttyUSB0 and it&#8217;s init string is ATQ0 V1 E1 S0=0 &amp;C1 &amp;D2 +FCLASS=0, Max speed is 115200 and various other info. But in my case(model ZTE G218) this init string caused problem, so i replaced it with at+crm=150, which i was using in windows. The initial strings are different for different models. For our internal modems, a default string ATZ is used.<br />
* next, you have to create a modem and the connection. You can do this in the GUI or if you have experience, edit the /etc/wvdial.conf file according to the information above. This way you can connect to the computer using CDMA mobile in linux.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/rockanjan.wordpress.com/3/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/rockanjan.wordpress.com/3/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rockanjan.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rockanjan.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rockanjan.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rockanjan.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/rockanjan.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/rockanjan.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/rockanjan.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/rockanjan.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rockanjan.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rockanjan.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rockanjan.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rockanjan.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rockanjan.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rockanjan.wordpress.com/3/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rockanjan.wordpress.com&amp;blog=1452370&amp;post=3&amp;subd=rockanjan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://rockanjan.wordpress.com/2007/08/18/connect-to-the-internet-using-zte-cdma-mobile-phone-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4ba5192e11653bc9108540b521fd98ba?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">rockanjan</media:title>
		</media:content>
	</item>
		<item>
		<title>My first post on my first blog: Good topic to start with</title>
		<link>http://rockanjan.wordpress.com/2007/08/01/hello-world/</link>
		<comments>http://rockanjan.wordpress.com/2007/08/01/hello-world/#comments</comments>
		<pubDate>Wed, 01 Aug 2007 17:00:11 +0000</pubDate>
		<dc:creator>rockanjan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[It&#8217;s the first time I have been able to use internet from my linux box, using the CDMA mobile&#8230; I had tried to do this for a long time, but finally yesterday I was able to do so. Thanks to the book &#8220;Linux Bible&#8221; by Christopher Negus.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rockanjan.wordpress.com&amp;blog=1452370&amp;post=1&amp;subd=rockanjan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s the first time I have been able to use internet from my linux box, using the CDMA mobile&#8230; I had tried to do this for a long time, but finally yesterday I was able to do so. Thanks to the book &#8220;Linux Bible&#8221; by Christopher Negus.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/rockanjan.wordpress.com/1/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/rockanjan.wordpress.com/1/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rockanjan.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rockanjan.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rockanjan.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rockanjan.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/rockanjan.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/rockanjan.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/rockanjan.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/rockanjan.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rockanjan.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rockanjan.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rockanjan.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rockanjan.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rockanjan.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rockanjan.wordpress.com/1/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rockanjan.wordpress.com&amp;blog=1452370&amp;post=1&amp;subd=rockanjan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://rockanjan.wordpress.com/2007/08/01/hello-world/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4ba5192e11653bc9108540b521fd98ba?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">rockanjan</media:title>
		</media:content>
	</item>
	</channel>
</rss>
