|
@@ -36,6 +36,8 @@ std::thread * gpthread;
|
|
|
std::string gstrinput;
|
|
|
std::string gstroutput;
|
|
|
|
|
|
+double g_intensityajust = 0;
|
|
|
+
|
|
|
bool gbUseMultiCNN = false;
|
|
|
|
|
|
static iv::lidar::PointXYZ pcltoprotopoint(pcl::PointXYZ x)
|
|
@@ -404,6 +406,9 @@ void ListenPointCloud(const char * strdata,const unsigned int nSize,const unsign
|
|
|
// {
|
|
|
memcpy(&xp,p,sizeof(pcl::PointXYZI));
|
|
|
xp.z = xp.z;
|
|
|
+ xp.intensity = xp.intensity + g_intensityajust;
|
|
|
+ if(xp.intensity>255)xp.intensity = 255;
|
|
|
+ if(xp.intensity<0)xp.intensity = 0;
|
|
|
point_cloud->push_back(xp);
|
|
|
|
|
|
// }
|
|
@@ -576,12 +581,15 @@ int main(int argc, char *argv[])
|
|
|
gstrinput = xparam.GetParam("input","lidar_pc");
|
|
|
gstroutput = xparam.GetParam("output","lidar_cnn_dectect");
|
|
|
|
|
|
+
|
|
|
double range,width,height;
|
|
|
range = xparam.GetParam("range",60.0);
|
|
|
width = xparam.GetParam("width",1024);
|
|
|
height = xparam.GetParam("height",1024);
|
|
|
int ncnn = xparam.GetParam("ncnn",2);
|
|
|
|
|
|
+ g_intensityajust = xparam.GetParam("intensityajust",0.0);
|
|
|
+
|
|
|
// std::string protofile = "/home/yuchuli/qt/bq/models/lidar/model.prototxt";
|
|
|
// std::string weightfile = "/home/yuchuli/qt/bq/models/lidar/model.caffemodel";
|
|
|
gcnn.init(protofile,weightfile,range,0.6,width,height,false,true,0);
|