try to write some opencv
this is what I ended up with very simple but I can seem to get it to run when called externally - can anyone point to where I might be going wrong - tks M
[code]
include "stdafx.h"
include "opencv2/highgui/highgui.hpp"
include "opencv2/imgproc/imgproc.hpp"
include "opencv2/core/core.hpp"
include <iostream>
include <stdio.h>
using namespace std; using namespace cv;
extern "C" {
_declspec (dllexport) double adaptiveThreshold(unsigned __int8 *Igray, unsigned __int8 *Iat, double fixed_threshold, int adaptive_method, int threshold_type, int block_size, double offset);
} //extern "C"
_declspec (dllexport) double adaptiveThreshold(unsigned __int8 *Igray,
unsigned __int8 *Iat,
double fixed_threshold,
int adaptive_method,
int threshold_type,
int block_size,
double offset)
{
// allocate memory for example for Mat
// Mat src_baseR(rows,cols,CV_8U,&base_imageR[0]);
fixed_threshold = 255;
threshold_type = 0; //fixed_threshold invert(0=off|1=on)
adaptive_method = 0; //adaptive_type(0=mean|1=gaussian) use gaussion looks interesting
block_size = 17;
offset = 10;
//Mat Iat;
// Use the Adaptive method for testing
adaptiveThreshold(Igray,Iat,fixed_threshold,adaptive_method,threshold_type,block_size,offset);
return 0;
}; [/code]