Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
478af745
"tests/python/vscode:/vscode.git/clone" did not exist on "a2234d60752631d92f46fed9d8be1612c4acbbfd"
Commit
478af745
authored
Nov 13, 2013
by
Davis King
Browse files
Added inv() that invert point transformation functions.
parent
01fa1f22
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
0 deletions
+41
-0
dlib/geometry/point_transforms.h
dlib/geometry/point_transforms.h
+19
-0
dlib/geometry/point_transforms_abstract.h
dlib/geometry/point_transforms_abstract.h
+22
-0
No files found.
dlib/geometry/point_transforms.h
View file @
478af745
...
@@ -126,6 +126,16 @@ namespace dlib
...
@@ -126,6 +126,16 @@ namespace dlib
dlib
::
vector
<
double
,
2
>
b
;
dlib
::
vector
<
double
,
2
>
b
;
};
};
// ----------------------------------------------------------------------------------------
inline
point_transform_affine
inv
(
const
point_transform_affine
&
trans
)
{
matrix
<
double
,
2
,
2
>
im
=
inv
(
trans
.
get_m
());
return
point_transform_affine
(
im
,
-
im
*
trans
.
get_b
());
}
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
template
<
typename
T
>
template
<
typename
T
>
...
@@ -203,6 +213,15 @@ namespace dlib
...
@@ -203,6 +213,15 @@ namespace dlib
matrix
<
double
,
3
,
3
>
m
;
matrix
<
double
,
3
,
3
>
m
;
};
};
// ----------------------------------------------------------------------------------------
inline
point_transform_projective
inv
(
const
point_transform_projective
&
trans
)
{
return
point_transform_projective
(
inv
(
trans
.
get_m
()));
}
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
namespace
impl_proj
namespace
impl_proj
...
...
dlib/geometry/point_transforms_abstract.h
View file @
478af745
...
@@ -57,6 +57,17 @@ namespace dlib
...
@@ -57,6 +57,17 @@ namespace dlib
};
};
// ----------------------------------------------------------------------------------------
point_transform_affine
inv
(
const
point_transform_affine
&
trans
);
/*!
ensures
- If trans is an invertible transformation then this function returns a new
transformation that is the inverse of trans.
!*/
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
template
<
typename
T
>
template
<
typename
T
>
...
@@ -134,6 +145,17 @@ namespace dlib
...
@@ -134,6 +145,17 @@ namespace dlib
};
};
// ----------------------------------------------------------------------------------------
point_transform_projective
inv
(
const
point_transform_projective
&
trans
);
/*!
ensures
- If trans is an invertible transformation then this function returns a new
transformation that is the inverse of trans.
!*/
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
point_transform_projective
find_projective_transform
(
point_transform_projective
find_projective_transform
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment