aboutsummaryrefslogtreecommitdiffstats
path: root/camera_calib.c
diff options
context:
space:
mode:
authorPatrick Roth <roth@stettbacher.ch>2021-06-29 14:20:32 +0200
committerPatrick Roth <roth@stettbacher.ch>2021-06-29 14:20:32 +0200
commitaaa7ff32f4af51dffb5cee42eed96828abfd1484 (patch)
tree19a4a7778dbc86c7b036d7136cd7cbd25d700ffa /camera_calib.c
parentfile description header update (diff)
downloado3000-color-pipe-aaa7ff32f4af51dffb5cee42eed96828abfd1484.tar.gz
o3000-color-pipe-aaa7ff32f4af51dffb5cee42eed96828abfd1484.zip
working copy
algorithm not working and has checked
Diffstat (limited to 'camera_calib.c')
-rw-r--r--camera_calib.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/camera_calib.c b/camera_calib.c
index 4b03a12..b55f954 100644
--- a/camera_calib.c
+++ b/camera_calib.c
@@ -488,7 +488,7 @@ static void init_undistort_map_scalar(struct cam_calib_data_t *data) {
float dist_radial, dist_tang_x, dist_tang_y, dist_x, dist_y;
float _x, _y, _y_sq, _x_sq, r_sq;
float x_corr, y_corr;
- struct lense_undistort_coord_t *map;
+ struct coord_t *map;
const int scale_fact = (1 << (data->calib_map_scale_fact));
float x_resolution_scaling, y_resolution_scaling; // camera_matrix needs to be scaled depending on the camera resolution
@@ -541,8 +541,8 @@ static void init_undistort_map_scalar(struct cam_calib_data_t *data) {
x_corr = fx*dist_x + cx - fov_x_start;
y_corr = fy*dist_y + cy - fov_y_start;
- map->coord_x = (int)roundf(x_corr*scale_fact);
- map->coord_y = (int)roundf(y_corr*scale_fact);
+ map->x = (int)roundf(x_corr*scale_fact);
+ map->y = (int)roundf(y_corr*scale_fact);
map++;
}
}
@@ -700,7 +700,7 @@ static void calib_scalar(struct cam_calib_data_t *data) {
int x_corr, y_corr;
void *img_calib, *img_uncalib;
int bit_channel;
- struct lense_undistort_coord_t *map;
+ struct coord_t *map;
const int scale_fact = data->calib_map_scale_fact;
const int is_color = data->is_color;
@@ -718,8 +718,8 @@ static void calib_scalar(struct cam_calib_data_t *data) {
for(v = fov_y_start; v <= fov_y_end; v++) {
for(u = fov_x_start; u <= fov_x_end; u++) {
- x_corr = map->coord_x;
- y_corr = map->coord_y;
+ x_corr = map->x;
+ y_corr = map->y;
map++;
if(bit_channel <= 8) {