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
ae8f2eea
Commit
ae8f2eea
authored
May 06, 2011
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
restored img_proc_test main() call; removed windows.h from ml.hpp
parent
dde91811
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
91 deletions
+3
-91
test_main.cpp
modules/imgproc/test/test_main.cpp
+1
-27
ml.hpp
modules/ml/include/opencv2/ml/ml.hpp
+2
-64
No files found.
modules/imgproc/test/test_main.cpp
View file @
ae8f2eea
#include "test_precomp.hpp"
#include "test_precomp.hpp"
//CV_TEST_MAIN("cv")
CV_TEST_MAIN
(
"cv"
)
#include <opencv2/core/core.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
int
main
(
int
argc
,
char
*
argv
[])
{
cv
::
Mat
src_img
=
cv
::
imread
(
"/Users/vp/Downloads/lenna.png"
,
1
);
if
(
!
src_img
.
data
)
return
-
1
;
cv
::
Point2f
pts1
[]
=
{
cv
::
Point2f
(
150
,
150.
),
cv
::
Point2f
(
150
,
300.
),
cv
::
Point2f
(
350
,
300.
),
cv
::
Point2f
(
350
,
150.
)};
cv
::
Point2f
pts2
[]
=
{
cv
::
Point2f
(
200
,
200.
),
cv
::
Point2f
(
150
,
300.
),
cv
::
Point2f
(
350
,
300.
),
cv
::
Point2f
(
300
,
200.
)};
cv
::
Mat
perspective_matrix
=
cv
::
getPerspectiveTransform
(
pts1
,
pts2
);
cv
::
Mat
dst_img
;
dst_img
=
cv
::
Scalar
::
all
(
0
);
cv
::
warpPerspective
(
src_img
,
dst_img
,
perspective_matrix
,
src_img
.
size
(),
cv
::
INTER_LANCZOS4
);
cv
::
namedWindow
(
"src"
,
CV_WINDOW_AUTOSIZE
|
CV_WINDOW_FREERATIO
);
cv
::
namedWindow
(
"dst"
,
CV_WINDOW_AUTOSIZE
|
CV_WINDOW_FREERATIO
);
cv
::
imshow
(
"src"
,
src_img
);
cv
::
imshow
(
"dst"
,
dst_img
);
cv
::
waitKey
(
0
);
}
modules/ml/include/opencv2/ml/ml.hpp
View file @
ae8f2eea
...
@@ -41,70 +41,8 @@
...
@@ -41,70 +41,8 @@
#ifndef __OPENCV_ML_HPP__
#ifndef __OPENCV_ML_HPP__
#define __OPENCV_ML_HPP__
#define __OPENCV_ML_HPP__
// disable deprecation warning which appears in VisualStudio 8.0
#include "opencv2/core/core.hpp"
#if _MSC_VER >= 1400
#include <limits.h>
#pragma warning( disable : 4996 )
#endif
#ifndef SKIP_INCLUDES
#include "opencv2/core/core.hpp"
#include <limits.h>
#if defined WIN32 || defined _WIN32
#include <windows.h>
#endif
#else // SKIP_INCLUDES
#if defined WIN32 || defined _WIN32
#define CV_CDECL __cdecl
#define CV_STDCALL __stdcall
#else
#define CV_CDECL
#define CV_STDCALL
#endif
#ifndef CV_EXTERN_C
#ifdef __cplusplus
#define CV_EXTERN_C extern "C"
#define CV_DEFAULT(val) = val
#else
#define CV_EXTERN_C
#define CV_DEFAULT(val)
#endif
#endif
#ifndef CV_EXTERN_C_FUNCPTR
#ifdef __cplusplus
#define CV_EXTERN_C_FUNCPTR(x) extern "C" { typedef x; }
#else
#define CV_EXTERN_C_FUNCPTR(x) typedef x
#endif
#endif
#ifndef CV_INLINE
#if defined __cplusplus
#define CV_INLINE inline
#elif (defined WIN32 || defined _WIN32) && !defined __GNUC__
#define CV_INLINE __inline
#else
#define CV_INLINE static
#endif
#endif
/* CV_INLINE */
#if (defined WIN32 || defined _WIN32) && defined CVAPI_EXPORTS
#define CV_EXPORTS __declspec(dllexport)
#else
#define CV_EXPORTS
#endif
#ifndef CVAPI
#define CVAPI(rettype) CV_EXTERN_C CV_EXPORTS rettype CV_CDECL
#endif
#endif // SKIP_INCLUDES
#ifdef __cplusplus
#ifdef __cplusplus
...
...
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