Click here to Skip to main content
15,892,927 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CFILE::READ replacing x20's with x0a x0a Pin
ForNow22-Jan-12 18:44
ForNow22-Jan-12 18:44 
GeneralRe: CFILE::READ replacing x20's with x0a x0a Pin
«_Superman_»22-Jan-12 19:34
professional«_Superman_»22-Jan-12 19:34 
GeneralRe: CFILE::READ replacing x20's with x0a x0a Pin
ForNow22-Jan-12 20:04
ForNow22-Jan-12 20:04 
GeneralRe: CFILE::READ replacing x20's with x0a x0a Pin
Richard MacCutchan22-Jan-12 22:44
mveRichard MacCutchan22-Jan-12 22:44 
QuestionBinary serialization Pin
mutpan19-Jan-12 19:01
mutpan19-Jan-12 19:01 
AnswerRe: Binary serialization Pin
«_Superman_»19-Jan-12 19:28
professional«_Superman_»19-Jan-12 19:28 
AnswerRe: Binary serialization Pin
Richard MacCutchan19-Jan-12 22:57
mveRichard MacCutchan19-Jan-12 22:57 
QuestionUpdated question( What's wrong in previous location of an object ? ) Pin
love bird19-Jan-12 3:17
love bird19-Jan-12 3:17 
<big><b>
Hy Guys
</b></big>


<pre lang="text">
I wants to maintain previous location of blob.
I have coordinates struct some thing like this
</pre>


<pre lang="c++">
struct coordinate
{
unsigned int x;
unsigned int y;
unsigned int prevX;
unsigned int prevY;

void * data;
};
</pre>


<pre lang="text">
and blob struct like this ,.
</pre>


<pre lang="c++">

struct blob
{
//unsigned int blobId;
coordinate min, max;
coordinate center;
};

</pre>


<pre lang="text">
inside loop for video
</pre>


<pre lang="c++">

// Calculate center
for(map<unsigned int, blob>::iterator i = blobs.begin(); i != blobs.end(); ++i)
{
(*i).second.center.prevX = (*i).second.center.x;
(*i).second.center.prevY = (*i).second.center.y;

(*i).second.center.x = (*i).second.min.x + ((*i).second.max.x - (*i).second.min.x) / 2;
(*i).second.center.y = (*i).second.min.y + ((*i).second.max.y - (*i).second.min.y) / 2;

}
</pre>


<pre lang="text">
But problem is my previous location of blobs always appeared 0 .

you can see in this image attached image :

What am i doing mistake , could any one please help me

</pre>
AnswerRe: Updated question( What's wrong in previous location of an object ? ) Pin
Richard MacCutchan19-Jan-12 3:26
mveRichard MacCutchan19-Jan-12 3:26 
GeneralRe: Updated question( What's wrong in previous location of an object ? ) Pin
love bird19-Jan-12 3:29
love bird19-Jan-12 3:29 
GeneralRe: Updated question( What's wrong in previous location of an object ? ) Pin
Richard MacCutchan19-Jan-12 3:53
mveRichard MacCutchan19-Jan-12 3:53 
GeneralRe: Updated question( What's wrong in previous location of an object ? ) Pin
jschell19-Jan-12 8:29
jschell19-Jan-12 8:29 
GeneralRe: Updated question( What's wrong in previous location of an object ? ) Pin
Richard MacCutchan19-Jan-12 8:48
mveRichard MacCutchan19-Jan-12 8:48 
GeneralRe: Updated question( What's wrong in previous location of an object ? ) Pin
Albert Holguin19-Jan-12 4:06
professionalAlbert Holguin19-Jan-12 4:06 
GeneralRe: Updated question( What's wrong in previous location of an object ? ) Pin
love bird19-Jan-12 4:12
love bird19-Jan-12 4:12 
GeneralRe: Updated question( What's wrong in previous location of an object ? ) Pin
Richard MacCutchan20-Jan-12 1:59
mveRichard MacCutchan20-Jan-12 1:59 
QuestionWhat's wrong in previous location of an object ? Pin
love bird19-Jan-12 2:09
love bird19-Jan-12 2:09 
QuestionRe: What's wrong in previous location of an object ? Pin
CPallini19-Jan-12 2:16
mveCPallini19-Jan-12 2:16 
AnswerRe: What's wrong in previous location of an object ? Pin
love bird19-Jan-12 2:38
love bird19-Jan-12 2:38 
GeneralRe: What's wrong in previous location of an object ? Pin
CPallini19-Jan-12 2:48
mveCPallini19-Jan-12 2:48 
AnswerRe: What's wrong in previous location of an object ? Pin
CPallini19-Jan-12 2:45
mveCPallini19-Jan-12 2:45 
GeneralRe: What's wrong in previous location of an object ? Pin
David Crow19-Jan-12 3:02
David Crow19-Jan-12 3:02 
GeneralRe: What's wrong in previous location of an object ? Pin
Richard MacCutchan19-Jan-12 3:55
mveRichard MacCutchan19-Jan-12 3:55 
GeneralRe: What's wrong in previous location of an object ? Pin
David Crow19-Jan-12 4:09
David Crow19-Jan-12 4:09 
Questionhow to maintain previous location of an object using maps in c++ ? Pin
love bird19-Jan-12 1:15
love bird19-Jan-12 1:15 

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.