reformulated irradiance to be: irradiance arround measured feature - irradiance at projection
This commit is contained in:
@ -173,7 +173,7 @@ struct Feature {
|
||||
std::vector<double>& anchorPatch_estimate,
|
||||
IlluminationParameter& estimatedIllumination) const;
|
||||
|
||||
bool MarkerGeneration(
|
||||
bool MarkerGeneration(
|
||||
ros::Publisher& marker_pub,
|
||||
const CamStateServer& cam_states) const;
|
||||
|
||||
@ -183,6 +183,17 @@ bool MarkerGeneration(
|
||||
CameraCalibration& cam0,
|
||||
const std::vector<double> photo_r,
|
||||
std::stringstream& ss) const;
|
||||
|
||||
|
||||
/* @brief takes a pure pixel position (1m from image)
|
||||
* converts to actual pixel value and returns patch irradiance
|
||||
* around this pixel
|
||||
*/
|
||||
void PatchAroundPurePixel(cv::Point2f p,
|
||||
int N,
|
||||
const CameraCalibration& cam,
|
||||
const StateIDType& cam_state_id,
|
||||
std::vector<float>& return_i) const;
|
||||
/*
|
||||
* @brief projectPixelToPosition uses the calcualted pixels
|
||||
* of the anchor patch to generate 3D positions of all of em
|
||||
@ -665,6 +676,25 @@ bool Feature::VisualizePatch(
|
||||
cvWaitKey(0);
|
||||
}
|
||||
|
||||
void Feature::PatchAroundPurePixel(cv::Point2f p,
|
||||
int N,
|
||||
const CameraCalibration& cam,
|
||||
const StateIDType& cam_state_id,
|
||||
std::vector<float>& return_i) const
|
||||
{
|
||||
int n = (int)(N-1)/2;
|
||||
cv::Mat image = cam.moving_window.find(cam_state_id)->second.image;
|
||||
cv::Point2f img_p = image_handler::distortPoint(p,
|
||||
cam.intrinsics,
|
||||
cam.distortion_model,
|
||||
cam.distortion_coeffs);
|
||||
|
||||
for(double u_run = -n; u_run <= n; u_run++)
|
||||
for(double v_run = -n; v_run <= n; v_run++)
|
||||
return_i.push_back(PixelIrradiance(cv::Point2f(img_p.x+u_run, img_p.y+v_run), image));
|
||||
|
||||
}
|
||||
|
||||
float Feature::PixelIrradiance(cv::Point2f pose, cv::Mat image) const
|
||||
{
|
||||
|
||||
|
Reference in New Issue
Block a user