Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
homography.c File Reference
+ Include dependency graph for homography.c:

Go to the source code of this file.

Functions

int get_homography (const point_t *source, const point_t *target, float *h)
 
point_t apply_homography (point_t p, const float *h)
 
float apply_homography_scaling (point_t p, const float *h)
 

Function Documentation

◆ apply_homography()

point_t apply_homography ( point_t  p,
const float *  h 
)

Map a single point through the homography h.

Definition at line 69 of file homography.c.

References p, x, and point_t::x.

Referenced by _extract_patches(), draw_box(), draw_f_boxes(), get_corners(), and gui_post_expose().

◆ apply_homography_scaling()

float apply_homography_scaling ( point_t  p,
const float *  h 
)

The factor by which h scales AREAS at point p.

Definition at line 80 of file homography.c.

References L, p, x, and point_t::x.

Referenced by gui_post_expose().

◆ get_homography()

int get_homography ( const point_t source,
const point_t target,
float *  h 
)

Solve for the homography h (9 floats) mapping the 4 source points onto the 4 target points. Returns 0 on success.

Definition at line 28 of file homography.c.

References gauss_solve(), i, L, P, point_t::x, and point_t::y.

Referenced by draw_image_callback(), get_xyz_sample_from_image(), and update_bounding_box().