Click here to Skip to main content
15,881,516 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionUsing EDCF protocol in Network Simulator program [modified] Pin
linux_00712-Apr-09 10:30
linux_00712-Apr-09 10:30 
QuestionAPPLICATIONS FOR APPLE MAC Pin
MIKEB7212-Apr-09 8:38
MIKEB7212-Apr-09 8:38 
AnswerRe: APPLICATIONS FOR APPLE MAC Pin
Maximilien12-Apr-09 11:29
Maximilien12-Apr-09 11:29 
QuestionHow to cancel serializing within CDocument::Serilize()? Pin
Joseph Marzbani12-Apr-09 8:28
Joseph Marzbani12-Apr-09 8:28 
Questionhelp with binary Pin
Aljaz11112-Apr-09 7:36
Aljaz11112-Apr-09 7:36 
AnswerRe: help with binary Pin
Luc 64801112-Apr-09 8:30
Luc 64801112-Apr-09 8:30 
GeneralRe: help with binary Pin
Aljaz11112-Apr-09 9:59
Aljaz11112-Apr-09 9:59 
Questionproblem about cvcamshift Pin
onlybluemoon12-Apr-09 5:38
onlybluemoon12-Apr-09 5:38 
hi
The orientation (θ) of the major axis and the scale of the distribution are determined by finding an equivalent rectangle that has the same moments as those measured from the 2D probability distribution image.But I can not understand clearly.
which algorithm cvcamshift choose?
thank you.


CV_CALL( cvMoments( &cur_win, &moments ));

m00 = moments.m00;
m10 = moments.m10;
m01 = moments.m01;
mu11 = moments.mu11;
mu20 = moments.mu20;
mu02 = moments.mu02;

if( fabs(m00) < DBL_EPSILON )
EXIT;

inv_m00 = 1. / m00;
xc = cvRound( m10 * inv_m00 + windowIn.x );//新计算出来的中心
yc = cvRound( m01 * inv_m00 + windowIn.y );
a = mu20 * inv_m00;//(x-x的中心)的平方*概率/总概率
b = mu11 * inv_m00;//(x-x的中心)(y-y的中心)*概率/总概率
c = mu02 * inv_m00;//(y-y的中心)的平方*概率/总概率

/* Calculating width & height */
square = sqrt( 4 * b * b + (a - c) * (a - c) );

/* Calculating orientation */
theta = atan2( 2 * b, a - c + square );

/*

原型:extern float atan2(float y, float x);

用法:#include <math.h>

功能:求y/x(弧度表示)的反正切值

说明:值域为(-π/2,+π/2)。

*/

/* Calculating width & length of figure */
cs = cos( theta );
sn = sin( theta );

rotate_a = cs * cs * mu20 + 2 * cs * sn * mu11 + sn * sn * mu02;
rotate_c = sn * sn * mu20 - 2 * cs * sn * mu11 + cs * cs * mu02;
length = sqrt( rotate_a * inv_m00 ) * 4;
width = sqrt( rotate_c * inv_m00 ) * 4;
Questionhow to delete cstring from specific index Pin
Aljaz11112-Apr-09 3:09
Aljaz11112-Apr-09 3:09 
AnswerRe: how to delete cstring from specific index Pin
Hamid_RT12-Apr-09 5:06
Hamid_RT12-Apr-09 5:06 
GeneralRe: how to delete cstring from specific index Pin
Aljaz11112-Apr-09 7:34
Aljaz11112-Apr-09 7:34 
GeneralRe: how to delete cstring from specific index Pin
Larry Mills Sr12-Apr-09 9:48
Larry Mills Sr12-Apr-09 9:48 
GeneralRe: how to delete cstring from specific index Pin
Aljaz11112-Apr-09 10:00
Aljaz11112-Apr-09 10:00 
GeneralRe: how to delete cstring from specific index Pin
Aljaz11112-Apr-09 10:04
Aljaz11112-Apr-09 10:04 
GeneralRe: how to delete cstring from specific index Pin
«_Superman_»12-Apr-09 18:40
professional«_Superman_»12-Apr-09 18:40 
QuestionRe: how to delete cstring from specific index Pin
David Crow13-Apr-09 3:44
David Crow13-Apr-09 3:44 
QuestionToo FEW Arguments in BOOL? Pin
rbwest8611-Apr-09 21:56
rbwest8611-Apr-09 21:56 
AnswerRe: Too FEW Arguments in BOOL? Pin
David Crow13-Apr-09 3:41
David Crow13-Apr-09 3:41 
AnswerRe: Too FEW Arguments in BOOL? Pin
rbwest8614-Apr-09 1:59
rbwest8614-Apr-09 1:59 
QuestionC++ FFT subroutine Pin
mrby12311-Apr-09 20:49
mrby12311-Apr-09 20:49 
AnswerRe: C++ FFT subroutine Pin
CPallini11-Apr-09 22:40
mveCPallini11-Apr-09 22:40 
Questioncan someone explain to a newby what the top line argument call. Pin
johnathan warfield11-Apr-09 19:53
johnathan warfield11-Apr-09 19:53 
AnswerRe: can someone explain to a newby what the top line argument call. Pin
«_Superman_»11-Apr-09 20:54
professional«_Superman_»11-Apr-09 20:54 
AnswerRe: can someone explain to a newby what the top line argument call. Pin
David Crow13-Apr-09 3:36
David Crow13-Apr-09 3:36 
AnswerRe: can someone explain to a newby what the top line argument call. Pin
johnathan warfield18-Apr-09 8:19
johnathan warfield18-Apr-09 8:19 

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.