Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as C++ by Roulotes ( 15 years ago )
void drawNotVRML() {
static int contF = 0;
ARUint8 *dataPtr;
ARMarkerInfo *marker_info;
int marker_num;
int j, k;
/* grab a vide frame */
if( (dataPtr = (ARUint8 *)arVideoGetImage()) == NULL ) {
arUtilSleep(2);
return;
}
if( count == 0 ) arUtilTimerReset();
count++;
//argDrawMode2D();
//argDispImage( dataPtr, 0,0 );
/* detect the markers in the video frame */
if( arDetectMarker(dataPtr, thresh, ▮_info, ▮_num) < 0 ) {
//cleanup();
exit(0);
}
arVideoCapNext();
/* check for object visibility */
k = -1;
for( j = 0; j < marker_num; j++ ) {
if( patt_id == marker_info[j].id ) {
if( k == -1 ) k = j;
else if( marker_info[k].cf < marker_info[j].cf ) k = j;
cout << "Roulotes larga o Hiro e trabalha" << endl;
}
else if( patt_id2 == marker_info[j].id ) {
if( k == -1 ) k = j;
else if( marker_info[k].cf < marker_info[j].cf ) k = j;
cout << "Pipa está a segurar o kanji" << endl;
}
//cout << marker_num << endl;
}
if( k == -1 ) {
contF = 0;
//argSwapBuffers();
return;
}
/* get the transformation between the marker and the real camera */
if( mode == 0 || contF == 0 ) {
arGetTransMat(▮_info[k], patt_center, patt_width, patt_trans);
}
else {
arGetTransMatCont(▮_info[k], patt_trans, patt_center, patt_width, patt_trans);
}
contF = 1;
//draw( patt_trans );
//argSwapBuffers();
}
Revise this Paste