static inline int computeLResponse(const uchar* ptr, const int* cdata, int csize)
{
int i, csize2 = csize/2, sum = -ptr[0]*csize;
for( i = 0; i < csize2; i++ )
{
int ofs = cdata[i];
sum += ptr[ofs] + ptr[-ofs];
}
return sum;
}
static Point2f adjustCorner(const float* fval, float& fvaln)
{
double bx = (fval[3] - fval[5])*0.5;
double by = (fval[2] - fval[7])*0.5;
double Axx = fval[3] - fval[4]*2 + fval[5];
double Axy = (fval[0] - fval[2] - fval[6] + fval[8])*0.25;
double Ayy = fval[1] - fval[4]*2 + fval[7];
double D = Axx*Ayy - Axy*Axy;
D = D != 0 ? 1./D : 0;
double dx = (bx*Ayy - by*Axy)*D;
double dy = (by*Axx - bx*Axy)*D;
dx = std::min(std::max(dx, -1.), 1.);
dy = std::min(std::max(dy, -1.), 1.);
fvaln = (float)(fval[4] + (bx*dx + by*dy)*0.5);
if(fvaln*fval[4] < 0 || std::abs(fvaln) < std::abs(fval[4]))
fvaln = fval[4];
return Point2f((float)dx, (float)dy);
}
void LDetector::operator()(const Mat& image, vector& keypoints, int maxCount, bool scaleCoords) const
{
vector pyr;
buildPyramid(image, pyr, std::max(nOctaves-1, 0));
(*this)(pyr, keypoints, maxCount, scaleCoords);
}
void LDetector::operator()(const vector& pyr, vector& keypoints, int maxCount, bool scaleCoords) const
{
const int lthreshold = 3;
int L, x, y, i, j, k, tau = lthreshold;
Mat scoreBuf(pyr[0].size(), CV_16S), maskBuf(pyr[0].size(), CV_8U);
int scoreElSize = (int)scoreBuf.elemSize();
vector circle0;
vector fhcircle0, circle, fcircle_s, fcircle;
getDiscreteCircle(radius, circle0, fhcircle0);
CV_Assert(fhcircle0.size() == (size_t)(radius+1) && circle0.size() % 2 == 0);
keypoints.clear();
for( L = 0; L < nOctaves; L++ )
{
// Pyramidal keypoint detector body:
// 1. build next pyramid layer
// 2. scan points, check the circular neighborhood, compute the score
// 3. do non-maxima suppression
// 4. adjust the corners (sub-pix)
double cscale = scaleCoords ? 1 << L : 1;
Size layerSize = pyr[L].size();
if( layerSize.width < radius*2 + 3 || layerSize.height < radius*2 + 3 )
break;
Mat scoreLayer(layerSize, scoreBuf.type(), scoreBuf.data);
Mat maskLayer(layerSize, maskBuf.type(), maskBuf.data);
const Mat& pyrLayer = pyr[L];
1st Coding Challenge
20. August 2011
Leonardo Campus 18
class void Was {
Coden bis der Doktor kommt. In verschiedenen
Logik und Programmieraufgaben (bei einer
Sprache deiner Wahl) kannst du dein Geschick
beweisen und den begehrten Preis gewinnen. Um
dich nicht aus deiner gewohnten Umgebung zu
werfen, passiert das ganze am eigenen Laptop
- wenn nicht möglich bitte bei der Anmeldung
angeben. Wir suchen dir dann einen Ersatz.
Genauere Infos folgen per Mail.
}
class void Wann {
Samstag, 20. August 2011
16:00 - open end (siehe Rahmenprogramm)
}
class void Wo {
Leonardo Campus 18
48149 Münster
Öffentliche Anbindung: "Haltestelle Eissporthalle"
["Bus 13", "16", "R72", "R73"]
public onclick() {
return new GoogleMap('http://maps.google.com/maps?q=51.975123%2c7.599593&ll=51.97514%2c7.599567&spn=0.00655%2c0.016512&sll=51.97584%2c7.600329&sspn=0%2c0&num=1&t=h&z=17')
}
}
catch(WeitereFragenException e) {
coding-challenge@fileee.com
}
static
$var
}
if
{
;
//
public
for
$i
set
(
[0]
)
}
-
function
Math.pi
rand()
$test
3+7
A
system
#
%
B
C
call
E
;
str
reset
\
}
@
G
S
II
Der Gewinner bekommt ein nagelneues Samsung Galaxy S2 geschenkt!