You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
57 lines
1.6 KiB
57 lines
1.6 KiB
|
|
|
|
#pragma once
|
|
|
|
#ifndef _EPIPOLAR_SEARCH_H_
|
|
#define _EPIPOLAR_SEARCH_H_
|
|
|
|
#include "oc_array.h"
|
|
#include "oc_calibration.h"
|
|
#include "oc_dic.h"
|
|
#include "oc_icgn.h"
|
|
#include "oc_image.h"
|
|
#include "oc_poi.h"
|
|
#include "oc_point.h"
|
|
|
|
namespace opencorr
|
|
{
|
|
|
|
|
|
class EpipolarSearch : public DIC
|
|
{
|
|
protected:
|
|
int search_radius; //seaching radius along the epipolar
|
|
int search_step; //step of search along the epipolar
|
|
Calibration view1_cam; //intrinsics and extrinsics of the primary camera
|
|
Calibration view2_cam; //intrinsics and extrinsics of the secondary camera
|
|
Eigen::Matrix3f fundamental_matrix; //fundamental matrix of stereovision system
|
|
Point2D parallax; //parallax of the secondary view with respect to the primary view
|
|
float parallax_x[3], parallax_y[3]; //linear regression coefficients of parallax with respect to coordinates
|
|
|
|
public:
|
|
ICGN2D1* icgn1;
|
|
|
|
EpipolarSearch(Calibration& view1_cam, Calibration& view2_cam, int thread_number);
|
|
~EpipolarSearch();
|
|
|
|
int getSearchRadius() const;
|
|
int getSearchStep() const;
|
|
void setSearch(int search_radius, int search_step);
|
|
void createICGN(int subset_radius_x, int subset_radius_y, float conv_criterion, float stop_condition);
|
|
void prepareICGN();
|
|
void destoryICGN();
|
|
|
|
void setParallax(Point2D parallax);
|
|
void setParallax(float coefficient_x[3], float coefficient_y[3]);
|
|
|
|
void updateCameras(Calibration& view1_cam, Calibration& view2_cam);
|
|
void updateFundementalMatrix();
|
|
|
|
void prepare();
|
|
void compute(POI2D* poi);
|
|
void compute(std::vector<POI2D>& poi_queue);
|
|
};
|
|
|
|
}//namespace opencorr
|
|
|
|
#endif //_EPIPOLAR_SEARCH_H_
|