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
33447e0b
Commit
33447e0b
authored
May 21, 2010
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed mixed-type exp and log functions, used in HMMs (thanks to V. Mityaev)
parent
d199100d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
compat_c.h
modules/imgproc/include/opencv2/imgproc/compat_c.h
+7
-6
No files found.
modules/imgproc/include/opencv2/imgproc/compat_c.h
View file @
33447e0b
...
...
@@ -50,6 +50,7 @@
#ifndef __OPENCV_IMGPROC_COMPAT_C_H__
#define __OPENCV_IMGPROC_COMPAT_C_H__
#include <math.h>
#include <string.h>
#ifdef __cplusplus
...
...
@@ -318,17 +319,17 @@ CV_INLINE void cvbReciprocal( const float* x, float* y, int len )
CV_INLINE
void
cvbFastExp
(
const
float
*
x
,
double
*
y
,
int
len
)
{
CvMat
mx
=
cvMat
(
1
,
len
,
CV_32F
,
(
void
*
)
x
)
;
CvMat
my
=
cvMat
(
1
,
len
,
CV_64F
,
y
);
cvExp
(
&
mx
,
&
my
);
int
i
;
for
(
i
=
0
;
i
<
len
;
i
++
)
y
[
i
]
=
exp
((
double
)
x
[
i
]
);
}
CV_INLINE
void
cvbFastLog
(
const
double
*
x
,
float
*
y
,
int
len
)
{
CvMat
mx
=
cvMat
(
1
,
len
,
CV_64F
,
(
void
*
)
x
)
;
CvMat
my
=
cvMat
(
1
,
len
,
CV_32F
,
y
);
cvLog
(
&
mx
,
&
my
);
int
i
;
for
(
i
=
0
;
i
<
len
;
i
++
)
y
[
i
]
=
(
float
)
log
(
x
[
i
]
);
}
...
...
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