Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
4f2a07f5
Commit
4f2a07f5
authored
Dec 07, 2014
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added pixel_traits definitions that allow you to copy images
into complex valued images using any dlib functions.
parent
cdbc1919
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
pixel.h
dlib/pixel.h
+7
-0
No files found.
dlib/pixel.h
View file @
4f2a07f5
...
...
@@ -9,6 +9,7 @@
#include "algs.h"
#include "uintn.h"
#include <limits>
#include <complex>
#include "enable_if.h"
namespace
dlib
...
...
@@ -468,6 +469,12 @@ namespace dlib
template
<>
struct
pixel_traits
<
double
>
:
public
float_grayscale_pixel_traits
<
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.
...
...
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