Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
4408423c
Commit
4408423c
authored
Aug 21, 2011
by
Alexandre Benoit
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
waiting for optimisation at Retina::_convertCvMat2ValarrayBuffer
parent
bd198d2b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
retina.cpp
modules/contrib/src/retina.cpp
+8
-3
No files found.
modules/contrib/src/retina.cpp
View file @
4408423c
...
...
@@ -373,17 +373,22 @@ void Retina::_convertValarrayBuffer2cvMat(const std::valarray<float> &grayMatrix
}
}
const
bool
Retina
::
_convertCvMat2ValarrayBuffer
(
const
cv
::
Mat
input
MatToConvert
,
std
::
valarray
<
float
>
&
outputValarrayMatrix
)
const
bool
Retina
::
_convertCvMat2ValarrayBuffer
(
const
cv
::
Mat
input
Frame
,
std
::
valarray
<
float
>
&
outputValarrayMatrix
)
{
// first check input consistency
if
(
input
MatToConvert
.
empty
())
if
(
input
Frame
.
empty
())
throw
cv
::
Exception
(
-
1
,
"Retina cannot be applied, input buffer is empty"
,
"Retina::run"
,
"Retina.h"
,
0
);
// retreive color mode from image input
bool
colorMode
=
input
MatToConvert
.
channels
()
>=
3
;
bool
colorMode
=
input
Frame
.
channels
()
>=
3
;
// convert to float AND fill the valarray buffer
const
int
dsttype
=
CV_32F
;
// output buffer is float format
// buffer format conversion... will be removed soon but WAITING for code error correction
cv
::
Mat
inputMatToConvert
;
inputFrame
.
convertTo
(
inputMatToConvert
,
dsttype
);
if
(
colorMode
)
{
// create a cv::Mat table (for RGB planes)
...
...
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