is this code right? [modified]
-
dear all i still couldn't find problem from the code below, anyone can help me? thanks a lot. ucGrayImg was defined. ucGrayImg=m_vicGrayImg.ibuff; int *ucGauImgHArray=new int[iHW]; for (iY=0;iY { for (iX=0;iX { int iIndex=iX+iY*iWidth1; if (iX==0) { ucGauImgHArray[iIndex]=ucGrayImg[iX]*mask[1]+ucGrayImg[iX+1]*mask[2]; } else if (iX==iWidth1-1) { ucGauImgHArray[iIndex]=ucGrayImg[iX]*mask[0]+ucGrayImg[iX+1]*mask[1]; } else { ucGauImgHArray[iIndex]=ucGrayImg[iX]*mask[0]+ucGrayImg[iX+1]*mask[1]+ucGrayImg[iX+2]*mask[2]; } } ucGrayImg+=iWidthbyte2; } delete []ucGauImgHArray; here ucGrayImg +=iWidthbyte2 seems problem, but however i don't understand what is problem.thanks
modified on Thursday, March 13, 2008 12:12 AM
-
dear all i still couldn't find problem from the code below, anyone can help me? thanks a lot. ucGrayImg was defined. ucGrayImg=m_vicGrayImg.ibuff; int *ucGauImgHArray=new int[iHW]; for (iY=0;iY { for (iX=0;iX { int iIndex=iX+iY*iWidth1; if (iX==0) { ucGauImgHArray[iIndex]=ucGrayImg[iX]*mask[1]+ucGrayImg[iX+1]*mask[2]; } else if (iX==iWidth1-1) { ucGauImgHArray[iIndex]=ucGrayImg[iX]*mask[0]+ucGrayImg[iX+1]*mask[1]; } else { ucGauImgHArray[iIndex]=ucGrayImg[iX]*mask[0]+ucGrayImg[iX+1]*mask[1]+ucGrayImg[iX+2]*mask[2]; } } ucGrayImg+=iWidthbyte2; } delete []ucGauImgHArray; here ucGrayImg +=iWidthbyte2 seems problem, but however i don't understand what is problem.thanks
modified on Thursday, March 13, 2008 12:12 AM
Please review your post; the
for
loops aren't displaying properly.Steve
-
dear all i still couldn't find problem from the code below, anyone can help me? thanks a lot. ucGrayImg was defined. ucGrayImg=m_vicGrayImg.ibuff; int *ucGauImgHArray=new int[iHW]; for (iY=0;iY { for (iX=0;iX { int iIndex=iX+iY*iWidth1; if (iX==0) { ucGauImgHArray[iIndex]=ucGrayImg[iX]*mask[1]+ucGrayImg[iX+1]*mask[2]; } else if (iX==iWidth1-1) { ucGauImgHArray[iIndex]=ucGrayImg[iX]*mask[0]+ucGrayImg[iX+1]*mask[1]; } else { ucGauImgHArray[iIndex]=ucGrayImg[iX]*mask[0]+ucGrayImg[iX+1]*mask[1]+ucGrayImg[iX+2]*mask[2]; } } ucGrayImg+=iWidthbyte2; } delete []ucGauImgHArray; here ucGrayImg +=iWidthbyte2 seems problem, but however i don't understand what is problem.thanks
modified on Thursday, March 13, 2008 12:12 AM
To expand on the previous comments - read the "how to post" guideline post, and look at the pre tag Iain.
Iain Clarke appears because CPallini still cares.
-
dear all i still couldn't find problem from the code below, anyone can help me? thanks a lot. ucGrayImg was defined. ucGrayImg=m_vicGrayImg.ibuff; int *ucGauImgHArray=new int[iHW]; for (iY=0;iY { for (iX=0;iX { int iIndex=iX+iY*iWidth1; if (iX==0) { ucGauImgHArray[iIndex]=ucGrayImg[iX]*mask[1]+ucGrayImg[iX+1]*mask[2]; } else if (iX==iWidth1-1) { ucGauImgHArray[iIndex]=ucGrayImg[iX]*mask[0]+ucGrayImg[iX+1]*mask[1]; } else { ucGauImgHArray[iIndex]=ucGrayImg[iX]*mask[0]+ucGrayImg[iX+1]*mask[1]+ucGrayImg[iX+2]*mask[2]; } } ucGrayImg+=iWidthbyte2; } delete []ucGauImgHArray; here ucGrayImg +=iWidthbyte2 seems problem, but however i don't understand what is problem.thanks
modified on Thursday, March 13, 2008 12:12 AM
gentleguy wrote:
i don't understand what is problem.thanks
And we're supposed to? :doh:
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
gentleguy wrote:
i don't understand what is problem.thanks
And we're supposed to? :doh:
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
Looks like Li Zhiyuan has fooled you guys :)
I'm going to become rich when I create a device that allows me to punch people in the face over the internet. "If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer
modified on Wednesday, March 12, 2008 10:03 AM
-
Looks like Li Zhiyuan has fooled you guys :)
I'm going to become rich when I create a device that allows me to punch people in the face over the internet. "If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer
modified on Wednesday, March 12, 2008 10:03 AM
How do you figure? Just because he is posting under a new name does not necessarily mean that any one was "fooled." He received the same lame answer(s) as always.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
How do you figure? Just because he is posting under a new name does not necessarily mean that any one was "fooled." He received the same lame answer(s) as always.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
DavidCrow wrote:
He received the same lame answer(s) as always.
:laugh:
Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP
-
How do you figure? Just because he is posting under a new name does not necessarily mean that any one was "fooled." He received the same lame answer(s) as always.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
I was being facetious. Note: I just noticed that when I first posted the message I didn't use the appropriate 'Joke' icon :)
I'm going to become rich when I create a device that allows me to punch people in the face over the internet. "If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer
-
I was being facetious. Note: I just noticed that when I first posted the message I didn't use the appropriate 'Joke' icon :)
I'm going to become rich when I create a device that allows me to punch people in the face over the internet. "If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer