Comments (7)
This issue is closed for no more updates.
Thanks~
from r3live.
Hei @aditdoshi333 . I guess that if you are in a hurry you could give it a try to this repository:, for testing your colors , not for calibration as you already did.
- You could use only the colorLidar.launch to first test that you are getting a good point cloud texture in a fix status. Then you can update the values with bayesian update as they propose in R3Live.
- Also what do you mean with noise? You can remove all points that have no color assigned. Did you limit the point cloud of fast lio 2 to only the intersection with the camara FOV?
- Share some screenshots to have a look!
from r3live.
Hey @Camilochiang ,
Thanks for the input. I am not sure about the bayesian update method in r3live. Let me share the coloring code with you and result as well.
`
auto rgb_image = Measures.rgb.back();
cv::Mat src_img = cv_bridge::toCvShare(rgb_image, "bgr8")->image; //image_raw is the image we got
cv::Mat view, rview, map1, map2;
cv::Size imageSize = src_img.size();
int image_rows = src_img.rows;
int image_cols = src_img.cols;
vector<vector<int>> color_vector;
color_vector.resize(image_rows*image_cols);
for (int v = 0; v < image_rows; ++v) {
for (int u = 0; u < image_cols; ++u) {
auto color_inst = (cv::Vec3b) src_img.at<cv::Vec3b>(v, u);
// std::cout<<"COLORS::"<<color_inst<<std::endl;
// for .bmp photo, the 3 channels are BGR
// std::cout<<"BNumbers"<<(int)color_inst[0]<<std::endl;
color_vector[v*image_cols + u].resize(3);
color_vector[v*image_cols + u][0] = color_inst[2];
color_vector[v*image_cols + u][1] = color_inst[1];
color_vector[v*image_cols + u][2] = color_inst[0];
}
}
// color_vector.resize(row*col);
for (int nidx = 0; nidx < Measures.lidar->points.size(); nidx++){
float UV[2] = {0, 0};
// void getUV(const cv::Mat &matrix_in, const cv::Mat &matrix_out, float x, float y, float z, float* UV) {
double matrix3[4][1] = {Measures.lidar->points[nidx].x, Measures.lidar->points[nidx].y, Measures.lidar->points[nidx].z, 1};
cv::Mat coordinate(4, 1, CV_64F, matrix3);
// calculate the result of u and v
cv::Mat result = intrisicMat*extrinsicMat_RT*coordinate;
float u = result.at<double>(0, 0);
float v = result.at<double>(1, 0);
float depth = result.at<double>(2, 0);
UV[0] = u / depth;
UV[1] = v / depth;
int u_internal = int(UV[0]);
int v_internal = int(UV[1]);
int32_t index = v_internal*image_cols + u_internal;
std::uint8_t r = 0, g = 255, b = 0;
if (index < image_rows*image_cols && index >= 0) {
r = color_vector[index][0];
g = color_vector[index][1];
b = color_vector[index][2];
std::uint32_t rgb = ((std::uint32_t)r << 16 | (std::uint32_t)g << 8 | (std::uint32_t)b);
Measures.lidar->points[nidx].rgb = *reinterpret_cast<float*>(&rgb);
}
}
}
`
Thanks for guiding. Appreciated
from r3live.
@aditdoshi333 Can you please add a image / rosbag ? Not a screen shoot, but an actual image from your camera. I could have a look. You can edit a rosbag and just send me a couple of messages (so just some lidar , imu and images. I want to check the images to be honest).
from r3live.
Also. I dont see that you are updating the values at all in your code...
from r3live.
Hello,
Thanks a lot for putting efforts.
Sample bag file link: https://drive.google.com/file/d/1KfcpybsyyWcvANpGxAU4fjFZ7WNf48KT/view?usp=sharing
Can you please elaborate on updating values? In preprocessing I am applying the above code block for every sync rgb image with lidar msg.
Thank a lot again.
from r3live.
Well here i see two problems:
- did you configure the camera for your actual setup? is quite dark down there and you could increase the light so is not weird that you have only "black points". See an actual screenshot of your video..
- Are you uploading the BRG values of each point? or just replacing them with the last view?
from r3live.
Related Issues (20)
- Get pointcloud data from ros messages fail HOT 6
- Image input error HOT 2
- Segmentation fault on ikd-tree algorithm HOT 1
- 您好,请问有碰到过这个问题吗? HOT 1
- Can r3live run in the AirSim? HOT 1
- 林博,你好,你有遇到过移动过程中path和odometry抖动得非常剧烈的情况吗?隔一段时间后,产生严重漂移。 HOT 1
- Is it possible to use Livox Mid 360 (a spinning lidar) and two cameras on two side of the lidar and use the algorithm to colorize 360 degrees data? HOT 4
- LIO/VIO cost time HOT 1
- Disable VIO subsystem HOT 1
- why the Per-frame cost time is much different. HOT 1
- Ouster Rosbag link not working HOT 2
- Map memory size is increasing all the time HOT 1
- Drifts even though it's not moving. HOT 1
- Compitability with lslidar? HOT 1
- [r3live_mapping -3] has died ! HOT 1
- Error accessing the Google Drive/MS OneDrive Link for the Dataset HOT 5
- 这个代码是对应r3live++ 论文还是r3live的论文? HOT 1
- pcd文件是如何保存的 HOT 1
- About r3live_config_nclt.yaml HOT 1
- Formula question HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from r3live.