diff --git a/bazaar/OpenCV/OpenCV.cpp b/bazaar/OpenCV/OpenCV.cpp index 940f014bf..96cf39101 100644 --- a/bazaar/OpenCV/OpenCV.cpp +++ b/bazaar/OpenCV/OpenCV.cpp @@ -9,11 +9,11 @@ IplImage *ImageToCv(Image &img, bool iscolor) { for (int y = 0; y < img.GetHeight(); y++) { uchar* ptr = (uchar*) (src->imageData + y * src->widthStep); for (int x = 0; x < img.GetWidth(); x++) { - if (iscolor) { + if (iscolor) { ptr[3*x] = img[y][x].r; ptr[3*x+1] = img[y][x].g; ptr[3*x+2] = img[y][x].b; - } else + } else ptr[x] = Grayscale(img[y][x]); } } diff --git a/bazaar/OpenCV/OpenCV.h b/bazaar/OpenCV/OpenCV.h index 60faf1693..f7eae6e87 100644 --- a/bazaar/OpenCV/OpenCV.h +++ b/bazaar/OpenCV/OpenCV.h @@ -1,17 +1,27 @@ #ifndef _OpenCV_OpenCV_h_ #define _OpenCV_OpenCV_h_ + #include + +#define int64 undef_int64 +#define uint64 undef_uint64 +#define CPU_SSE2 undef_CPU_SSE2 + #include #include -using namespace Upp; +#undef int64 +#undef uint64 +#undef CPU_SSE2 #include +using namespace Upp; + + IplImage *ImageToCv(Image &img, bool iscolor = false); Image CvToImage(IplImage *imgCV); - class ImageWindow : public TopWindow { typedef ImageWindow CLASSNAME; public: diff --git a/bazaar/OpenCV/OpenCV.upp b/bazaar/OpenCV/OpenCV.upp index 78e6ee6be..fb4bb8fa9 100644 --- a/bazaar/OpenCV/OpenCV.upp +++ b/bazaar/OpenCV/OpenCV.upp @@ -3,7 +3,7 @@ uses plugin\jpg, Controls4U; -library(WIN32) "opencv_core240d opencv_highgui240d opencv_calib3d240d opencv_features2d240d opencv_imgproc240d opencv_video240d opencv_videostab240d vfw32 libjasperd libjpegd libpngd libtiffd "; +library(WIN32) opencv_world341.lib; library(!WIN32) "opencv_core opencv_highgui opencv_calib3d opencv_features2d opencv_imgproc opencv_video"; diff --git a/bazaar/OpenCV/srcdoc.tpp/OpenCV_en-us.tpp b/bazaar/OpenCV/srcdoc.tpp/OpenCV_en-us.tpp index b4ed7a715..fb3cbd076 100644 --- a/bazaar/OpenCV/srcdoc.tpp/OpenCV_en-us.tpp +++ b/bazaar/OpenCV/srcdoc.tpp/OpenCV_en-us.tpp @@ -1,6 +1,6 @@ topic "OpenCV"; -[ $$0,0#00000000000000000000000000000000:Default] [a83;*R6 $$1,0#31310162474203024125188417583966:caption] +[ $$0,0#00000000000000000000000000000000:Default] [{_}%EN-US [s1; [+184 OpenCV]&] [s0;# [^http`:`/`/opencv`.org`/^2 OpenCV][2 is a C library for real @@ -11,24 +11,26 @@ U`+`+ and the necessary libraries.]&] [s0;#2 &] [s0;# [2 To install it please remember to set `"Build methods`" menu:]&] [s0;i150;O0; [2 INCLUDE directories]&] -[s0;l288; [2 `\plugin`\OpenCV`\include]&] -[s0;l288; [2 `\plugin`\OpenCV`\include`\opencv]&] +[s0;l288; [2 plugin`\OpenCV`\include]&] +[s0;l288; [2 plugin`\OpenCV`\include`\opencv]&] [s0;l288;2 &] [s0;i150;O0; [2 LIB directories]&] -[s0;l288; [2 `\plugin`\OpenCV`\lib]&] +[s0;l288; [2 plugin`\OpenCV`\lib]&] [s0;2 &] [s0;i150;O0; [2 PATH `- executable directories]&] -[s0;#l288; [2 `\plugin`\OpenCV`\bin]&] +[s0;#l288; [2 plugin`\OpenCV`\bin]&] [s0;#2 &] [s0;#2 &] -[s0;# [2 To ease the install there is ][^https`:`/`/sourceforge`.net`/projects`/upp`/files`/GPL`-sources`/OpenCV`_2`_2`_0`%20plugin`_BSD`.7z`/download^2 h -ere][2 a packaged 2.2.0 version (OpenCV`_2`_2`_0 plugin`_BSD.7z) -with the basic folders. Just download and copy it in your /uppsrc/plugin -folder.]&] +[s0;# [2 To ease the install there is ][^https`:`/`/sourceforge`.net`/projects`/opencvlibrary`/files`/opencv`-win`/3`.4`.1`/opencv`-3`.4`.1`-vc14`_vc15`.exe`/download^2 h +ere][2 a packaged 3.4.1 version. For Visual Studio 2015, download +and copy in your uppsrc/plugin folder:]&] +[s0;#i150;O0; [2 build`\include to plugin`\OpenCV`\include]&] +[s0;#i150;O0; [2 build`\x64`\vc15`\bin to plugin`\OpenCV`\bin]&] +[s0;#i150;O0; [2 build`\x64`\vc15`\lib to plugin`\OpenCV`\lib]&] [s0;2 &] -[s0;# [2 There is also a sample package (OpenCV`_demo) to ease even -more its use for U`+`+ users. It uses the Hough Transform to -detect straight lines in an image.]&] +[s0;# [2 There is a sample package (OpenCV`_demo) to ease its use for +U`+`+ users. It uses the Hough Transform to detect straight lines +in an image.]&] [s0;2 &] [s0;i150;O0; [2 Original image:]&] [s0;2 &]