added saving exposure time from the frame ID, where the TUM dataset saves it
This commit is contained in:
@ -30,6 +30,11 @@ struct CameraCalibration{
|
||||
cv::Vec4d distortion_coeffs;
|
||||
};
|
||||
|
||||
struct Frame{
|
||||
cv::Mat image;
|
||||
double exposureTime_ms;
|
||||
};
|
||||
|
||||
/*
|
||||
* @brief CAMState Stored camera state in order to
|
||||
* form measurement model.
|
||||
@ -50,6 +55,7 @@ struct CAMState {
|
||||
// Position of the camera frame in the world frame.
|
||||
Eigen::Vector3d position;
|
||||
|
||||
// Illumination Information of the frame
|
||||
IlluminationParameter illumination;
|
||||
|
||||
// These two variables should have the same physical
|
||||
@ -80,9 +86,9 @@ typedef std::map<StateIDType, CAMState, std::less<int>,
|
||||
Eigen::aligned_allocator<
|
||||
std::pair<const StateIDType, CAMState> > > CamStateServer;
|
||||
|
||||
typedef std::map<StateIDType, cv::Mat, std::less<StateIDType>,
|
||||
typedef std::map<StateIDType, Frame, std::less<StateIDType>,
|
||||
Eigen::aligned_allocator<
|
||||
std::pair<StateIDType, cv::Mat> > > movingWindow;
|
||||
std::pair<StateIDType, Frame> > > movingWindow;
|
||||
} // namespace msckf_vio
|
||||
|
||||
#endif // MSCKF_VIO_CAM_STATE_H
|
||||
|
@ -361,7 +361,7 @@ bool Feature::IrradianceOfAnchorPatch(
|
||||
for (auto point : anchorPatch_3d)
|
||||
{
|
||||
cv::Point2f p_in_c0 = projectPositionToCamera(cam_state, cam_state_id, cam, point);
|
||||
uint8_t irradiance = Irradiance(p_in_c0 , cam0_moving_window.find(cam_state_id)->second);
|
||||
uint8_t irradiance = Irradiance(p_in_c0 , cam0_moving_window.find(cam_state_id)->second.image);
|
||||
anchorPatch_measurement.push_back(irradiance);
|
||||
}
|
||||
}
|
||||
@ -425,7 +425,7 @@ bool Feature::initializeAnchor(
|
||||
if(cam0_moving_window.find(anchor->first) == cam0_moving_window.end())
|
||||
return false;
|
||||
|
||||
cv::Mat anchorImage = cam0_moving_window.find(anchor->first)->second;
|
||||
cv::Mat anchorImage = cam0_moving_window.find(anchor->first)->second.image;
|
||||
auto u = anchor->second(0)*cam.intrinsics[0] + cam.intrinsics[2];
|
||||
auto v = anchor->second(1)*cam.intrinsics[1] + cam.intrinsics[3];
|
||||
int count = 0;
|
||||
|
@ -145,8 +145,8 @@ class MsckfVio {
|
||||
std_srvs::Trigger::Response& res);
|
||||
|
||||
void manageMovingWindow(
|
||||
const cv_bridge::CvImageConstPtr& cam0_image_ptr,
|
||||
const cv_bridge::CvImageConstPtr& cam1_image_ptr,
|
||||
const sensor_msgs::ImageConstPtr& cam0_img,
|
||||
const sensor_msgs::ImageConstPtr& cam1_img,
|
||||
const CameraMeasurementConstPtr& feature_msg);
|
||||
|
||||
// Filter related functions
|
||||
|
Reference in New Issue
Block a user