|
Page 1 of 1
|
[ 3 posts ] |
|
NXTCam V2 blob array sort order
| Author |
Message |
|
fxlj007
Rookie
Joined: Sun Jun 17, 2012 11:18 am Posts: 26
|
 NXTCam V2 blob array sort order
Hi Xander,
I have a question. In you driver of NXTCam, is the returned blob array sorted? I have a glance at the source code and it seems to be sorted in DESCENDING order of blob size. Am I right?
|
| Tue Feb 19, 2013 2:47 am |
|
 |
|
fxlj007
Rookie
Joined: Sun Jun 17, 2012 11:18 am Posts: 26
|
 Re: Getting drivers working for NXTCam V2
Besides, I think there's a bug in the driver. In line 218 of "drivers/mindsensors-nxtcam.h", a "-" seems mistyped as "*".
blobs[_i].size = abs(blobs[_i].x2 - blobs[_i].x1) * abs(blobs[_i].y2 * blobs[_i].y1); //I think here's a bug blobs[_i].size = abs(blobs[_i].x2 - blobs[_i].x1) * abs(blobs[_i].y2 - blobs[_i].y1); //It should be like this
|
| Tue Feb 19, 2013 4:17 am |
|
 |
|
mightor
Moderator
Joined: Wed Mar 05, 2008 8:14 am Posts: 2864 Location: Rotterdam, The Netherlands
|
 Re: NXTCam V2 blob array sort order
The blobs are indeed sorted, with the largest one being at index 0. Thanks for the bug report! That is indeed a mistake.
= Xander
_________________| Some people, when confronted with a problem, think, "I know, I'll use threads," | and then two they hav erpoblesms. (@nedbat)| My Blog: I'd Rather Be Building Robots| ROBOTC 3rd Party Driver Suite: [ Project Page]
|
| Tue Feb 19, 2013 5:40 am |
|
|
|
Page 1 of 1
|
[ 3 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 2 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|