Update of
/cvsroot/playerstage/code/player/server/drivers/blobfinder/artoolkitplus
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25734/artoolkitplus
Modified Files:
artoolkitplus.cc
Log Message:
updated artoolkitplus to support v 2.1 base library
Index: artoolkitplus.cc
===================================================================
RCS file:
/cvsroot/playerstage/code/player/server/drivers/blobfinder/artoolkitplus/artoolkitplus.cc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** artoolkitplus.cc 2 May 2006 10:26:28 -0000 1.1
--- artoolkitplus.cc 9 Jul 2006 01:11:03 -0000 1.2
***************
*** 109,114 ****
int ProcessFrame();
! int LastFrameWidth;
! int LastFrameHeight;
// ar toolkit plus bits
--- 109,114 ----
int ProcessFrame();
! unsigned int LastFrameWidth;
! unsigned int LastFrameHeight;
// ar toolkit plus bits
***************
*** 157,165 ****
// - 6x6 sized marker images
// - samples at a maximum of 6x6
- // - works with luminance (gray) images
// - can load a maximum of 1 patterns
// - can detect a maximum of 8 patterns in one image
// - with an arbitrary default image size
! tracker = new
ARToolKitPlus::TrackerSingleMarkerImpl<6,6,6,ARToolKitPlus::PIXEL_FORMAT_LUM,
1, 8>(LastFrameWidth,LastFrameHeight);
// set a logger so we can output error messages
--- 157,164 ----
// - 6x6 sized marker images
// - samples at a maximum of 6x6
// - can load a maximum of 1 patterns
// - can detect a maximum of 8 patterns in one image
// - with an arbitrary default image size
! tracker = new ARToolKitPlus::TrackerSingleMarkerImpl<6,6,6, 1,
8>(LastFrameWidth,LastFrameHeight);
// set a logger so we can output error messages
***************
*** 202,206 ****
{
// convert to grayscale
! for (int i = 0; i < stored_data.width * stored_data.height; ++i)
{
stored_data.image[i] = (stored_data.image[i*3] +
stored_data.image[i*3+1] + stored_data.image[i*3+2]) / 3;
--- 201,205 ----
{
// convert to grayscale
! for (unsigned int i = 0; i < stored_data.width *
stored_data.height; ++i)
{
stored_data.image[i] = (stored_data.image[i*3] +
stored_data.image[i*3+1] + stored_data.image[i*3+2]) / 3;
***************
*** 245,264 ****
blobs.blobs[blobs.blobs_count].color = 0x000000FF;
blobs.blobs[blobs.blobs_count].area = tmp_markers[i].area;
! blobs.blobs[blobs.blobs_count].x = (tmp_markers[i].vertex[0][0]
+ tmp_markers[i].vertex[2][0])/2;
! blobs.blobs[blobs.blobs_count].y = (tmp_markers[i].vertex[0][1]
+ tmp_markers[i].vertex[2][1])/2;
! blobs.blobs[blobs.blobs_count].left =
tmp_markers[i].vertex[0][0];
! blobs.blobs[blobs.blobs_count].right =
tmp_markers[i].vertex[0][0];
! blobs.blobs[blobs.blobs_count].top =
tmp_markers[i].vertex[0][1];
! blobs.blobs[blobs.blobs_count].bottom =
tmp_markers[i].vertex[0][1];
for (int j = 1; j < 4; ++j)
{
if (tmp_markers[i].vertex[j][0] <
blobs.blobs[blobs.blobs_count].left)
! blobs.blobs[blobs.blobs_count].left =
tmp_markers[i].vertex[j][0];
if (tmp_markers[i].vertex[j][0] >
blobs.blobs[blobs.blobs_count].right)
! blobs.blobs[blobs.blobs_count].right =
tmp_markers[i].vertex[j][0];
if (tmp_markers[i].vertex[j][1] <
blobs.blobs[blobs.blobs_count].top)
! blobs.blobs[blobs.blobs_count].top =
tmp_markers[i].vertex[j][1];
if (tmp_markers[i].vertex[j][1] >
blobs.blobs[blobs.blobs_count].bottom)
! blobs.blobs[blobs.blobs_count].bottom =
tmp_markers[i].vertex[j][1];
}
--- 244,263 ----
blobs.blobs[blobs.blobs_count].color = 0x000000FF;
blobs.blobs[blobs.blobs_count].area = tmp_markers[i].area;
! blobs.blobs[blobs.blobs_count].x = static_cast<unsigned int>
((tmp_markers[i].vertex[0][0] + tmp_markers[i].vertex[2][0])/2);
! blobs.blobs[blobs.blobs_count].y = static_cast<unsigned int>
((tmp_markers[i].vertex[0][1] + tmp_markers[i].vertex[2][1])/2);
! blobs.blobs[blobs.blobs_count].left = static_cast<unsigned int>
(tmp_markers[i].vertex[0][0]);
! blobs.blobs[blobs.blobs_count].right = static_cast<unsigned
int> (tmp_markers[i].vertex[0][0]);
! blobs.blobs[blobs.blobs_count].top = static_cast<unsigned int>
(tmp_markers[i].vertex[0][1]);
! blobs.blobs[blobs.blobs_count].bottom = static_cast<unsigned
int> (tmp_markers[i].vertex[0][1]);
for (int j = 1; j < 4; ++j)
{
if (tmp_markers[i].vertex[j][0] <
blobs.blobs[blobs.blobs_count].left)
! blobs.blobs[blobs.blobs_count].left =
static_cast<unsigned int> (tmp_markers[i].vertex[j][0]);
if (tmp_markers[i].vertex[j][0] >
blobs.blobs[blobs.blobs_count].right)
! blobs.blobs[blobs.blobs_count].right =
static_cast<unsigned int> (tmp_markers[i].vertex[j][0]);
if (tmp_markers[i].vertex[j][1] <
blobs.blobs[blobs.blobs_count].top)
! blobs.blobs[blobs.blobs_count].top =
static_cast<unsigned int> (tmp_markers[i].vertex[j][1]);
if (tmp_markers[i].vertex[j][1] >
blobs.blobs[blobs.blobs_count].bottom)
! blobs.blobs[blobs.blobs_count].bottom =
static_cast<unsigned int> (tmp_markers[i].vertex[j][1]);
}
***************
*** 267,271 ****
Publish(device_addr,NULL,PLAYER_MSGTYPE_DATA,PLAYER_BLOBFINDER_DATA_BLOBS,&blobs,sizeof(blobs));
!
return 0;
}
--- 266,270 ----
Publish(device_addr,NULL,PLAYER_MSGTYPE_DATA,PLAYER_BLOBFINDER_DATA_BLOBS,&blobs,sizeof(blobs));
!
return 0;
}
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit