EasyManua.ls Logo

Velodyne HDL-64E S3 - Intensity Value Corrected by Distance

Velodyne HDL-64E S3
54 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
HDL-64E S3
High Definition LiDAR Sensor
Page 46
Velodyne LiDAR, Inc.
©
2019
63-HDL64ES3 REV K
Intensity Value Corrected by Distance
for (guint i=0; i< VLS_LASER_PER_FIRING; i++) {
guit laser = i + base;
if (!db->getEnabled(laser))
continue;
bool intensity =db->getIntensity(laser);
if (!intensity: {
glColor3fv(db->getDisplayColor(laser).rgb);
} else {
guchar minIntensity = 0, maxIntensity = 0;
fioat intensityScaie = 0;
minIntensity = db->getMinIntensity(laser);
maxIntensity = db->getMaxIntensity(laser);
//Get intensity scaie
intensityScaie = (float)(maxIntensity - minIntensity);
// Get firing “i” intensity
guchar intensityVal = it->getPoint(i)->intensity;
// Get firing “i” distance, here unit is 2mm
float distance = it->getPoint(i)->distance;
// Calculate offset according calibration
float focaloffset= 256*(l-db->getFocalDistance(laser)/l3l00)*(l-db-
>getFocalDistance(laser)/l3l00);
// get slope from calibration
float focalslope = db->getFocalSlope(laser);
// Calculate corrected intensity vs distance
float intensityVal1 = intensityVal + focalslope*(abs(focaloffset-256*(l-
distance/65535)*(l-distance/65535)));
if (intensityVal1 < minIntensity) intensityVal1=minIntensity;
if (intensityVal1 > maxIntensity) intensityVal1=maxIntensity;
// Scale to new intensity scale
float intensityColor = (float)(intensityVal1 - minIntensity) /
intensityScale;
// Convert to jet color
int rgb=(int)(intensityColor*63);
glColor3f(rcolor[rgb], gcolor[rgb], bcolor[rgb]);
}
GlVertex3fv(it->getCoord(i).xyz);
}
it->operator++();

Table of Contents

Related product manuals