Snit,

Not to be rude but I think you're slowly alienating yourself from everyone in 
the group. :(

If previous messages weren't clear enough, you need to try a lot harder and dig 
into other online documentation before begging to the group for assistance.




________________________________
From: Snit Roy <[email protected]>
To: [email protected]
Sent: Saturday, April 25, 2009 5:03:46 PM
Subject: Re: [c-prog] noobs question on list stl........................





i searched msdn lot & become fed up.another thing i want to select the middle 
most or just one value among the neighboring element.shall i give you total 
code??ok.its here:::::::: ::::::::: ::::::::: ::::::::: :::::

#include<list>

#pragma once
typedef class position_values
{
public:
int row_pos_start;
int row_pos_end;
intcol_pos;
//std::list< position_ values> l;
//std::iterator< list> it;
//int *arr;
public:
position_values( ){/*it=l. end();*/}
position_values( int row_s,int row_e,int col){
row_pos_start= row_s;
row_pos_end= row_e;
col_pos=col;
//black_space_ val=space_ val;
}
} pv;

typedef std::list<pv> UList;

#include "stdafx.h"
#include "cv_test_used_ header_threshval ues.h"
#include "cv_test_for_ functions. h"
#include"cv_ test_data_ structures. h"

using namespace std;
//using namespace std::tr1;

//typedef std::tr1::unordered _multimap< int, class position_values> UMymap; 
//class position_values;
//typedef std::list<class position_values> UList;
class position_values;

void col_sep(IplImage *img)
{
IplImage * image=cvCreateImage (cvSize(( img->width) ,img->height) ,img->depth, 
img->nChannels) ;
int i=0,j=0,var= 0,temp=0, k=0,count= 0,mode=0, p=0,flag= 0;
int step1 = img->widthStep/ sizeof(uchar) ;

int tval=0,loop= 0,t;

UList l;
//UMymap m1;
//class postion_value *ptr;
IplImage * con_string=converti ng_to_connected_ string(img, 20);
//int ThreshValue= mode_calculation (con_string) ;

int ThreshValue_ for_col=350; //5*ThreshValue;
printf("%d", ThreshValue_ for_col);
int count1=0;
for(i=0;i<img- >width;i+ +)
{count=0;
for(p=0;p<img- >height;p+ +)
{
//printf("%d\ n",count1+ +);
if(CV_IMAGE_ ELEM(con_ string,uchar, p,i)==255) count++;

if(count>=ThreshVal ue_for_col)
{//count1++;
k=(int)sqrt( (double)( (p-count) *(p-count) ))+30;
l.push_back( pv(k,p-30, i));
//m1.insert( UMymap::value_ type(i,position_ values(i, k+30,p-30) ));
for(k=(int)sqrt( (double)( (p-count) *(p-count) ))+30;k<( p-30);k++ )
img->imageData[ k*step1+i] =0;
}
if(CV_IMAGE_ ELEM(con_ string,uchar, p,i)==0)
count=0;
}
}
//count=adjacent_ difference( l.begin() ->col_pos, l.end()-> col_pos,t) ;
count=0;
UList::iterator it2=l.begin( );
for(UList::iterator it=l.begin() ;it!=l.end( );it++)
{
if(it->col_pos= =(it++->col_ pos-1)) count++;//// ///this if statment not 
working
else if(count>=50) {
t=((it->col_ pos-count) +it->col_ pos)/2;
for(k=it->row_ pos_start; k<it->row_ pos_end;k+ +)
img->imageData[ k*step1+t] =0;
count=0;
}
}

/*count=0;
for (UMymap::const_ iterator it = m1.begin(); it != m1.end(); ++it) 
{
if(it->second. col_pos== (it++)->second. col_pos-1)
count=m1.count( it++->second. col_pos-count) ;//m1.erase( m1.
if(count>=0) {
for(k=it->second. row_pos_start; k<it->second. row_pos_end; k++)
img->imageData[ k*step1+( it->second. col_pos-( count)/2) ]=0;
count=0;
}
}*/
cvSaveImage( "D:/outdir/ im23c2.jpg" ,con_string) ;
show_image(con_ string);
show_image(img) ;
cvSaveImage( "D:/outdir/ im23c2col. jpg",img) ;
}

____________ _________ _________ __
From: Tyler Littlefield <ty...@tysdomain. com>
To: c-p...@yahoogroups. com
Sent: Sunday, April 26, 2009 2:16:47 AM
Subject: Re: [c-prog] noobs question on list stl......... ......... ......

I suggest two things.
First, I'm not clear on what you want. sounded like you wanted the number of 
elements in a list.
cplusplus.com/ ref would give you that answer.
Two, I suggest getting a spell checker.
I'm willing to help if I see you've done the work, but when you've mangled a 
message like that it really makes it rough on my reader. I'm not going to take 
20 minutes to play hangman and try to figure out what you wanted to say when 
you could take two and run a spell checker. Maybe someone who can read your 
messages easier will help.

Thanks,
Tyler Littlefield
Web: tysdomain.com
email: ty...@tysdomain. com
My programs don't have bugs, they're called randomly added features.

----- Original Message ----- 
From: Snit Roy 
To: c-p...@yahoogroups. com 
Sent: Saturday, April 25, 2009 2:21 PM
Subject: Re: [c-prog] noobs question on list stl......... ......... ......

the program is doing nothing but scaning an image vertically and loading 
col_pos,row_ start_position and end position.now i got all the column now i 
need to select the middle most coloumn (of 10just taken as threshold value) of 
neighborhood couloumn and mark it.i searched lot really but found nothing till 
now.the if statement is not working.
i tried with adjascent_differenc () but it s not worked for me.plz suggest..... 
......... ...

____________ _________ _________ __
From: Tyler Littlefield <ty...@tysdomain. com>
To: c-p...@yahoogroups. com
Sent: Sunday, April 26, 2009 1:33:28 AM
Subject: Re: [c-prog] noobs question on list stl......... ......... .......

um. look at the documentation for lists. I have no idea what that code is 
supposed to do, but I believe the list has a count or similar property

Thanks,
Tyler Littlefield
Web: tysdomain.com
email: ty...@tysdomain. com
My programs don't have bugs, they're called randomly added features.

----- Original Message ----- 
From: Snit Roy 
To: c-p...@yahoogroups. com 
Sent: Saturday, April 25, 2009 1:53 PM
Subject: [c-prog] noobs question on list stl......... ......... ......

i just want to count the neighbourhood of it->col_pos value and count them.how 
can i do it???i know its very easy stuff for u.but help me.......... ...

count=0;
for(UList::const_ iterator it=l.begin() ,;it!=l.end( );it++)
{
if(it->col_pos= =(it++)-> col_pos)count+ +;
else if(count>=10) {
t=((it->col_ pos-count) +it->col_ pos)/2;
for(k=it->row_ pos_start; k<it->row_ pos_end;k+ +)
img->imageData[ k*step1+t] =0;
count=0;
}
}

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]





      

Reply via email to