Click here to Skip to main content
16,007,504 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionUINT64 behavior VC6 C++ Pin
uli200015-Jul-08 23:09
uli200015-Jul-08 23:09 
AnswerRe: UINT64 behavior VC6 C++ Pin
Chris Losinger16-Jul-08 1:20
professionalChris Losinger16-Jul-08 1:20 
GeneralRe: UINT64 behavior VC6 C++ Pin
uli200016-Jul-08 4:26
uli200016-Jul-08 4:26 
Questiondynamic array use? Pin
gentleguy15-Jul-08 23:09
gentleguy15-Jul-08 23:09 
AnswerRe: dynamic array use? Pin
CPallini15-Jul-08 23:16
mveCPallini15-Jul-08 23:16 
GeneralRe: dynamic array use? Pin
gentleguy16-Jul-08 1:37
gentleguy16-Jul-08 1:37 
AnswerRe: dynamic array use? Pin
CPallini16-Jul-08 1:59
mveCPallini16-Jul-08 1:59 
GeneralRe: dynamic array use? Pin
gentleguy16-Jul-08 15:03
gentleguy16-Jul-08 15:03 
thanks

however i couldn't get nColumnCOunts4,5 arrays value. what is problem. i corrected as per your remind.thanks a lot.

int *nColumnCounts = new int[_iBoundwidth]; //whole image
	int *nColumnCounts1 = new int[_iBoundwidth]; //1st part
	int *nColumnCounts2 = new int[_iBoundwidth]; //2nd part
	int *nColumnCounts3 = new int[_iBoundwidth]; //3rd part
	int *nColumnCounts4 = new int[_iBoundwidth];
	int *nColumnCounts5 = new int[_iBoundwidth];

	for (int i=0;i<_iBoundwidth;i++)
	{
		nColumnCounts1[i]=0;
		nColumnCounts2[i]=0;
		nColumnCounts3[i]=0;
        nColumnCounts4[i]=0;
		nColumnCounts5[i]=0;
		nColumnCounts[i]=0;
	}
int a = _iBoundheight%3; // remainder 		for(iY=0;iY<(a+(static_cast<int>(_iBoundheight/3)));iY++)	{		for (iX=_iBoundx;iX<_iBoundwidth;iX++)		{			if (ImgArray[iX+iY*_iBoundwidth] == 255)          			{							nColumnCounts1[iX]++;  			}		}	}		for(iY=(a+(static_cast<int>(_iBoundheight/3)));iY<(a+2*(static_cast<int>(_iBoundheight/3)));iY++)	{		for(iX=_iBoundx; iX<_iBoundwidth; iX++)		{			if (ImgArray[iX+iY*_iBoundwidth] == 255)          			{							nColumnCounts2[iX]++;  			}		}			}		for(iY=(a+2*(static_cast<int>(_iBoundheight/3)));iY<_iBoundheight;iY++)	{		for(iX=_iBoundx; iX<_iBoundwidth; iX++)		{			if (ImgArray[iX+iY*_iBoundwidth] == 255)          			{					nColumnCounts3[iX]++;  			}		}			}		// Average	int a1,a2,a4,a5,s1,s2,s3,r1,r2,r3,av1,av2;	a4=a5=0;	s1=s2=0;	r1=r2=0;	av1=av2=0;			// Standard deviation	for (int m=0;m<_iBoundwidth;m++)	{		nColumnCounts4[m]=abs(nColumnCounts1[m]-nColumnCounts2[m]);                nColumnCounts5[m]=abs(nColumnCounts2[m]-nColumnCounts3[m]);		a4=a4+nColumnCounts4[m];		a5=a5+nColumnCounts5[m];	}			av1=a4/_iBoundwidth;	av2=a5/_iBoundwidth;		for (int m2=0;m2<_iBoundwidth;m2++)	{		s1=s1+pow(nColumnCounts4[m2]-av1,2.0);                s2=s2+pow(nColumnCounts5[m2]-av2,2.0);	}		_fFeature[0] = sqrt(s1/_iBoundwidth);	_fFeature[1] = sqrt(s2/_iBoundwidth);				delete[] ImgArray;	delete[] nColumnCounts1;	delete[] nColumnCounts2;	delete[] nColumnCounts3;	delete[] nColumnCounts;	delete[] nColumnCounts4;	delete[] nColumnCounts5;		return true;}


gentleguy




GeneralRe: dynamic array use? [modified] Pin
CPallini16-Jul-08 21:02
mveCPallini16-Jul-08 21:02 
QuestionButton Notification Pin
bhanu_850915-Jul-08 22:47
bhanu_850915-Jul-08 22:47 
QuestionRe: Button Notification Pin
Rajesh R Subramanian15-Jul-08 23:02
professionalRajesh R Subramanian15-Jul-08 23:02 
AnswerRe: Button Notification Pin
bhanu_850915-Jul-08 23:04
bhanu_850915-Jul-08 23:04 
GeneralRe: Button Notification Pin
Rajesh R Subramanian15-Jul-08 23:24
professionalRajesh R Subramanian15-Jul-08 23:24 
AnswerRe: Button Notification Pin
Naveen15-Jul-08 23:09
Naveen15-Jul-08 23:09 
GeneralRe: Button Notification Pin
bhanu_850915-Jul-08 23:29
bhanu_850915-Jul-08 23:29 
GeneralRe: Button Notification Pin
Naveen15-Jul-08 23:38
Naveen15-Jul-08 23:38 
GeneralRe: Button Notification Pin
bhanu_850916-Jul-08 0:22
bhanu_850916-Jul-08 0:22 
GeneralRe: Button Notification Pin
Naveen16-Jul-08 14:09
Naveen16-Jul-08 14:09 
QuestionMSMQ ReStart Problem [modified] Pin
sudhir_Kumar15-Jul-08 21:52
sudhir_Kumar15-Jul-08 21:52 
QuestionImage Processing with Goole Earth [modified] Pin
Blade_Bao15-Jul-08 21:03
Blade_Bao15-Jul-08 21:03 
AnswerRe: Image Processing with Goole Earth [modified] Pin
Blade_Bao15-Jul-08 21:09
Blade_Bao15-Jul-08 21:09 
AnswerRe: Image Processing with Goole Earth PinPopular
Stephen Hewitt15-Jul-08 21:31
Stephen Hewitt15-Jul-08 21:31 
GeneralRe: Image Processing with Goole Earth Pin
Blade_Bao15-Jul-08 21:44
Blade_Bao15-Jul-08 21:44 
GeneralRe: Image Processing with Goole Earth Pin
Rajesh R Subramanian15-Jul-08 21:45
professionalRajesh R Subramanian15-Jul-08 21:45 
GeneralRe: Image Processing with Goole Earth Pin
Blade_Bao15-Jul-08 22:49
Blade_Bao15-Jul-08 22:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.