18 #ifndef PIC_JNI_FIND_CHECKER_BOARD_HPP 19 #define PIC_JNI_FIND_CHECKER_BOARD_HPP 21 #include "../filtering/filter_luminance.hpp" 22 #include "../filtering/filter_downsampler_2d.hpp" 23 #include "../filtering/filter_white_balance.hpp" 25 #include "../computer_vision/iterative_closest_point_2D.hpp" 26 #include "../computer_vision/nelder_mead_opt_ICP_2D.hpp" 28 #include "../features_matching/orb_descriptor.hpp" 30 #include "../computer_vision/find_checker_board.hpp" 32 #include "../algorithms/binarization.hpp" 33 #include "../util/mask.hpp" 34 #include "../features_matching/canny_edge_detector.hpp" 38 #ifndef PIC_DISABLE_EIGEN 65 scale = 1000.0f / float(maxLength);
68 printf(
"Down scale factor: %f\n", scale);
78 std::vector< Eigen::Vector2f > corners;
84 Eigen::Vector2f p0, p1;
88 printf(
"Pixel length: %f\n", pixel_length);
91 ret.push_back(
int(p0[0] / scale));
92 ret.push_back(
int(p0[1] / scale));
93 ret.push_back(
int(p1[0] / scale));
94 ret.push_back(
int(p1[1] / scale));
101 ret.push_back(
int(pw[0] / scale));
102 ret.push_back(
int(pw[1] / scale));
107 BBox patch(
int(pw[0]) - patchSize,
108 int(pw[0]) + patchSize,
109 int(pw[1]) - patchSize,
110 int(pw[1]) + patchSize);
111 float *white_color = work->
getMeanVal(&patch, NULL);
121 printf(
"extractCheckerBoardJNI: the image could not be written.\n");
135 #endif // PIC_JNI_FIND_CHECKER_BOARD_HPP The BBox class manages the creation of bounding boxes for images.
Definition: bbox.hpp:29
float * getMeanVal(BBox *box, float *ret)
getMeanVal computes the mean for the current Image.
PIC_INLINE Eigen::Vector2f estimateCoordinatesWhitePointFromCheckerBoard(Image *img, std::vector< Eigen::Vector2f > &corners_model, int checkerBoardSizeX=4, int checkerBoardSizeY=6)
estimateCoordinatesWhitePointFromCheckerBoard
Definition: find_checker_board.hpp:483
static Image * execute(Image *imgIn, Image *imgOut, int width, int height)
execute
Definition: filter_downsampler_2d.hpp:100
int nPixels() const
nPixels computes the number of pixels.
Definition: image.hpp:499
PIC_INLINE std::vector< int > extractCheckerBoardJNI(std::string imageInPath, std::string imageOutPath)
extractCheckerBoardJNI
Definition: find_checker_board.hpp:46
#define PIC_INLINE
Definition: base.hpp:33
The Image class stores an image as buffer of float.
Definition: image.hpp:60
static Image * execute(Image *imgIn, float *white_color, Image *out)
execute
Definition: filter_white_balance.hpp:162
Definition: dynamic_range.hpp:29
Definition: bilateral_separation.hpp:25
#define MAX(a, b)
Definition: math.hpp:73
bool Read(std::string nameFile, LDR_type typeLoad)
Read opens an Image from a file on the disk.
PIC_INLINE float estimateLengthOfCheckers(std::vector< Eigen::Vector2f > &corners_model, Eigen::Vector2f &p0, Eigen::Vector2f &p1)
estimateLengthInPixelOfCheckers
Definition: find_checker_board.hpp:446
int width
Definition: image.hpp:80
int height
Definition: image.hpp:80
bool Write(std::string nameFile, LDR_type typeWrite, int writerCounter)
Write saves an Image into a file on the disk.
PIC_INLINE void findCheckerBoard(Image *img, std::vector< Eigen::Vector2f > &corners_model, int checkerBoardSizeX=4, int checkerBoardSizeY=7)
findCheckerBoard
Definition: find_checker_board.hpp:259