mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
OpenCV: Updated version
git-svn-id: svn://ultimatepp.org/upp/trunk@11867 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
d269f96936
commit
e3e4c84bea
4 changed files with 29 additions and 17 deletions
|
|
@ -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]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,17 +1,27 @@
|
|||
#ifndef _OpenCV_OpenCV_h_
|
||||
#define _OpenCV_OpenCV_h_
|
||||
|
||||
|
||||
#include <CtrlLib/CtrlLib.h>
|
||||
|
||||
#define int64 undef_int64
|
||||
#define uint64 undef_uint64
|
||||
#define CPU_SSE2 undef_CPU_SSE2
|
||||
|
||||
#include <opencv/cv.h>
|
||||
#include <opencv/highgui.h>
|
||||
|
||||
using namespace Upp;
|
||||
#undef int64
|
||||
#undef uint64
|
||||
#undef CPU_SSE2
|
||||
|
||||
#include <Controls4U/Controls4U.h>
|
||||
|
||||
using namespace Upp;
|
||||
|
||||
|
||||
IplImage *ImageToCv(Image &img, bool iscolor = false);
|
||||
Image CvToImage(IplImage *imgCV);
|
||||
|
||||
class ImageWindow : public TopWindow {
|
||||
typedef ImageWindow CLASSNAME;
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
||||
|
|
|
|||
|
|
@ -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 &]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue