Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
ImageINSA_Tanguy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tanguy.Raufflet
ImageINSA_Tanguy
Commits
51774932
Commit
51774932
authored
12 years ago
by
Sacha Percot-Tétu
Browse files
Options
Downloads
Patches
Plain Diff
Some ajdustments to FFT operations outputs
parent
ba39fdcc
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/Operations/FFTOp.cpp
+5
-2
5 additions, 2 deletions
app/Operations/FFTOp.cpp
app/Operations/IFFTOp.cpp
+10
-6
10 additions, 6 deletions
app/Operations/IFFTOp.cpp
with
15 additions
and
8 deletions
app/Operations/FFTOp.cpp
+
5
−
2
View file @
51774932
...
...
@@ -59,6 +59,7 @@ void FFTOp::operator()(const imagein::Image* image, const map<const imagein::Ima
}
FFT2D
(
data
,
width
,
height
,
1
);
for
(
unsigned
int
j
=
0
;
j
<
height
;
++
j
)
{
for
(
unsigned
int
i
=
0
;
i
<
width
;
++
i
)
{
const
double
real
=
data
[
i
][
j
].
real
();
...
...
@@ -77,8 +78,10 @@ void FFTOp::operator()(const imagein::Image* image, const map<const imagein::Ima
}
}
this
->
outDoubleImage
(
phaseImg
,
" - FFT (phase)"
,
true
,
false
);
this
->
outDoubleImage
(
magnitudeImg
,
" - FFT (magnitude)"
,
true
,
true
);
this
->
outDoubleImage
(
phaseImg
,
"FFT (phase)"
,
true
,
false
);
this
->
outDoubleImage
(
magnitudeImg
,
"FFT (magnitude)"
,
true
,
true
);
// this->outDoubleImage(realImg, "FFT (real)", true, true);
// this->outDoubleImage(imagImg, "FFT (imag)", true, true);
// result.push_back(new DoubleImgWidget(phaseImg, " - FFT : phase", true, false));
// result.push_back(new DoubleImgWidget(magnitudeImg, " - FFT : magnitude", true, true));
// result.push_back(new DoubleImgWidget(realImg, " - FFT : real", true, true));
...
...
This diff is collapsed.
Click to expand it.
app/Operations/IFFTOp.cpp
+
10
−
6
View file @
51774932
...
...
@@ -70,8 +70,8 @@ void IFFTOp::operator()(const imagein::Image_t<double>*, const map<const imagein
unsigned
int
channels
=
min
(
magnitudeImg
->
getNbChannels
(),
phaseImg
->
getNbChannels
());
Image
*
resImg
=
new
Image
(
width
,
height
,
channels
);
// Image_t<double>* realImg = new Image_t<double>(width, height,
image->getNbC
hannels
()
);
// Image_t<double>* imagImg = new Image_t<double>(width, height,
image->getNbC
hannels
()
);
// Image_t<double>* realImg = new Image_t<double>(width, height,
c
hannels);
// Image_t<double>* imagImg = new Image_t<double>(width, height,
c
hannels);
complex
<
double
>**
data
=
new
complex
<
double
>*
[
width
];
for
(
unsigned
int
i
=
0
;
i
<
width
;
++
i
)
data
[
i
]
=
new
complex
<
double
>
[
height
];
...
...
@@ -94,14 +94,18 @@ void IFFTOp::operator()(const imagein::Image_t<double>*, const map<const imagein
FFT2D
(
data
,
width
,
height
,
-
1
);
for
(
unsigned
int
j
=
0
;
j
<
height
;
++
j
)
{
for
(
unsigned
int
i
=
0
;
i
<
width
;
++
i
)
{
//
const double real = data[i][j].real();
//
const double imag = data[i][j].imag();
Image
::
depth_t
value
=
floor
(
data
[
i
][
j
].
real
()
+
0.5
);
value
=
min
(
255
,
max
(
0
,
value
));
const
double
real
=
data
[
i
][
j
].
real
();
const
double
imag
=
data
[
i
][
j
].
imag
();
double
value
=
floor
(
data
[
i
][
j
].
real
()
+
0.5
);
value
=
min
(
255
.0
,
max
(
0
.0
,
value
));
resImg
->
setPixel
(
i
,
j
,
c
,
value
);
// realImg->setPixel(i, j, c, real);
// imagImg->setPixel(i, j, c, imag);
}
}
}
this
->
outImage
(
resImg
,
"DFT-reconstructed image"
);
// this->outDoubleImage(realImg, "DFT-reconstructed image (real)");
// this->outDoubleImage(imagImg, "DFT-reconstructed image (imag)");
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment