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
4f2a07f5
Commit
4f2a07f5
authored
Dec 07, 2014
by
Davis King
Browse files
Added pixel_traits definitions that allow you to copy images
into complex valued images using any dlib functions.
parent
cdbc1919
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
dlib/pixel.h
dlib/pixel.h
+7
-0
No files found.
dlib/pixel.h
View file @
4f2a07f5
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
#include "algs.h"
#include "algs.h"
#include "uintn.h"
#include "uintn.h"
#include <limits>
#include <limits>
#include <complex>
#include "enable_if.h"
#include "enable_if.h"
namespace
dlib
namespace
dlib
...
@@ -468,6 +469,12 @@ namespace dlib
...
@@ -468,6 +469,12 @@ namespace dlib
template
<
>
struct
pixel_traits
<
double
>
:
public
float_grayscale_pixel_traits
<
double
>
{};
template
<
>
struct
pixel_traits
<
double
>
:
public
float_grayscale_pixel_traits
<
double
>
{};
template
<
>
struct
pixel_traits
<
long
double
>
:
public
float_grayscale_pixel_traits
<
long
double
>
{};
template
<
>
struct
pixel_traits
<
long
double
>
:
public
float_grayscale_pixel_traits
<
long
double
>
{};
// These are here mainly so you can easily copy images into complex arrays. This is
// useful when you want to do a FFT on an image or some similar operation.
template
<
>
struct
pixel_traits
<
std
::
complex
<
float
>
>
:
public
float_grayscale_pixel_traits
<
float
>
{};
template
<
>
struct
pixel_traits
<
std
::
complex
<
double
>
>
:
public
float_grayscale_pixel_traits
<
double
>
{};
template
<
>
struct
pixel_traits
<
std
::
complex
<
long
double
>
>
:
public
float_grayscale_pixel_traits
<
long
double
>
{};
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
// The following is a bunch of conversion stuff for the assign_pixel function.
// The following is a bunch of conversion stuff for the assign_pixel function.
...
...
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