fixed several warnings from Xcode 4 LLVM compiler; fixed bug #920
This commit is contained in:
parent
92852ca06e
commit
23a9b7bb9c
2
3rdparty/libjasper/jas_debug.c
vendored
2
3rdparty/libjasper/jas_debug.c
vendored
@ -125,7 +125,7 @@ int jas_memdump(FILE *out, void *data, size_t len)
|
|||||||
uchar *dp;
|
uchar *dp;
|
||||||
dp = data;
|
dp = data;
|
||||||
for (i = 0; i < len; i += 16) {
|
for (i = 0; i < len; i += 16) {
|
||||||
fprintf(out, "%04x:", i);
|
fprintf(out, "%04x:", (int)i);
|
||||||
for (j = 0; j < 16; ++j) {
|
for (j = 0; j < 16; ++j) {
|
||||||
if (i + j < len) {
|
if (i + j < len) {
|
||||||
fprintf(out, " %02x", dp[i + j]);
|
fprintf(out, " %02x", dp[i + j]);
|
||||||
|
8
3rdparty/libjasper/jp2_cod.c
vendored
8
3rdparty/libjasper/jp2_cod.c
vendored
@ -490,18 +490,18 @@ int jp2_box_put(jp2_box_t *box, jas_stream_t *out)
|
|||||||
box->len = jas_stream_tell(tmpstream) + JP2_BOX_HDRLEN(false);
|
box->len = jas_stream_tell(tmpstream) + JP2_BOX_HDRLEN(false);
|
||||||
jas_stream_rewind(tmpstream);
|
jas_stream_rewind(tmpstream);
|
||||||
}
|
}
|
||||||
extlen = (box->len >= (((uint_fast64_t)1) << 32)) != 0;
|
//extlen = (box->len >= (((uint_fast64_t)1) << 32)) != 0;
|
||||||
if (jp2_putuint32(out, extlen ? 1 : box->len)) {
|
if (jp2_putuint32(out, /*extlen ? 1 :*/ box->len)) {
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
if (jp2_putuint32(out, box->type)) {
|
if (jp2_putuint32(out, box->type)) {
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
if (extlen) {
|
/*if (extlen) {
|
||||||
if (jp2_putuint64(out, box->len)) {
|
if (jp2_putuint64(out, box->len)) {
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
|
||||||
if (dataflag) {
|
if (dataflag) {
|
||||||
if (jas_stream_copy(out, tmpstream, box->len - JP2_BOX_HDRLEN(false))) {
|
if (jas_stream_copy(out, tmpstream, box->len - JP2_BOX_HDRLEN(false))) {
|
||||||
|
3
3rdparty/libjasper/jpc_cs.c
vendored
3
3rdparty/libjasper/jpc_cs.c
vendored
@ -240,8 +240,7 @@ jpc_ms_t *jpc_getms(jas_stream_t *in, jpc_cstate_t *cstate)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Get the marker type. */
|
/* Get the marker type. */
|
||||||
if (jpc_getuint16(in, &ms->id) || ms->id < JPC_MS_MIN ||
|
if (jpc_getuint16(in, &ms->id) || ms->id < JPC_MS_MIN /*|| ms->id > JPC_MS_MAX*/) {
|
||||||
ms->id > JPC_MS_MAX) {
|
|
||||||
jpc_ms_destroy(ms);
|
jpc_ms_destroy(ms);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
6
3rdparty/libjasper/jpc_mqdec.c
vendored
6
3rdparty/libjasper/jpc_mqdec.c
vendored
@ -300,7 +300,7 @@ void jpc_mqdec_dump(jpc_mqdec_t *mqdec, FILE *out)
|
|||||||
fprintf(out, "MQDEC A = %08lx, C = %08lx, CT=%08lx, ",
|
fprintf(out, "MQDEC A = %08lx, C = %08lx, CT=%08lx, ",
|
||||||
(unsigned long) mqdec->areg, (unsigned long) mqdec->creg,
|
(unsigned long) mqdec->areg, (unsigned long) mqdec->creg,
|
||||||
(unsigned long) mqdec->ctreg);
|
(unsigned long) mqdec->ctreg);
|
||||||
fprintf(out, "CTX = %d, ", mqdec->curctx - mqdec->ctxs);
|
fprintf(out, "CTX = %d, ", (int)(mqdec->curctx - mqdec->ctxs));
|
||||||
fprintf(out, "IND %d, MPS %d, QEVAL %x\n", *mqdec->curctx -
|
fprintf(out, "IND %d, MPS %d, QEVAL %x\n", (int)(*mqdec->curctx -
|
||||||
jpc_mqstates, (*mqdec->curctx)->mps, (*mqdec->curctx)->qeval);
|
jpc_mqstates), (int)(*mqdec->curctx)->mps, (int)(*mqdec->curctx)->qeval);
|
||||||
}
|
}
|
||||||
|
4
3rdparty/libjasper/jpc_mqenc.c
vendored
4
3rdparty/libjasper/jpc_mqenc.c
vendored
@ -386,7 +386,7 @@ int jpc_mqenc_dump(jpc_mqenc_t *mqenc, FILE *out)
|
|||||||
fprintf(out, "AREG = %08x, CREG = %08x, CTREG = %d\n",
|
fprintf(out, "AREG = %08x, CREG = %08x, CTREG = %d\n",
|
||||||
mqenc->areg, mqenc->creg, mqenc->ctreg);
|
mqenc->areg, mqenc->creg, mqenc->ctreg);
|
||||||
fprintf(out, "IND = %02d, MPS = %d, QEVAL = %04x\n",
|
fprintf(out, "IND = %02d, MPS = %d, QEVAL = %04x\n",
|
||||||
*mqenc->curctx - jpc_mqstates, (*mqenc->curctx)->mps,
|
(int)(*mqenc->curctx - jpc_mqstates), (int)(*mqenc->curctx)->mps,
|
||||||
(*mqenc->curctx)->qeval);
|
(int)(*mqenc->curctx)->qeval);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
2
3rdparty/libjasper/jpc_t2dec.c
vendored
2
3rdparty/libjasper/jpc_t2dec.c
vendored
@ -574,7 +574,7 @@ long jpc_dec_lookahead(jas_stream_t *in)
|
|||||||
jas_stream_ungetc(in, x >> 8) == EOF) {
|
jas_stream_ungetc(in, x >> 8) == EOF) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (x >= JPC_MS_INMIN && x <= JPC_MS_INMAX) {
|
if (x >= JPC_MS_INMIN /*&& x <= JPC_MS_INMAX*/) {
|
||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
4
3rdparty/libjpeg/transupp.c
vendored
4
3rdparty/libjpeg/transupp.c
vendored
@ -1309,6 +1309,8 @@ jtransform_adjust_parameters (j_decompress_ptr srcinfo,
|
|||||||
case JXFORM_ROT_270:
|
case JXFORM_ROT_270:
|
||||||
transpose_critical_parameters(dstinfo);
|
transpose_critical_parameters(dstinfo);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Adjust Exif properties */
|
/* Adjust Exif properties */
|
||||||
@ -1446,6 +1448,8 @@ jtransform_perfect_transform(JDIMENSION image_width, JDIMENSION image_height,
|
|||||||
if (image_height % (JDIMENSION) MCU_height)
|
if (image_height % (JDIMENSION) MCU_height)
|
||||||
result = FALSE;
|
result = FALSE;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
2
3rdparty/libtiff/tif_predict.c
vendored
2
3rdparty/libtiff/tif_predict.c
vendored
@ -584,7 +584,7 @@ PredictorEncodeTile(TIFF* tif, tidata_t bp0, tsize_t cc0, tsample_t s)
|
|||||||
{
|
{
|
||||||
TIFFErrorExt(tif->tif_clientdata, module,
|
TIFFErrorExt(tif->tif_clientdata, module,
|
||||||
"Out of memory allocating %d byte temp buffer.",
|
"Out of memory allocating %d byte temp buffer.",
|
||||||
cc0 );
|
(int)cc0 );
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
memcpy( working_copy, bp0, cc0 );
|
memcpy( working_copy, bp0, cc0 );
|
||||||
|
12
3rdparty/libtiff/tif_unix.c
vendored
12
3rdparty/libtiff/tif_unix.c
vendored
@ -51,25 +51,25 @@
|
|||||||
static tsize_t
|
static tsize_t
|
||||||
_tiffReadProc(thandle_t fd, tdata_t buf, tsize_t size)
|
_tiffReadProc(thandle_t fd, tdata_t buf, tsize_t size)
|
||||||
{
|
{
|
||||||
return ((tsize_t) read((int) fd, buf, (size_t) size));
|
return ((tsize_t) read((int) (size_t)fd, buf, (size_t) size));
|
||||||
}
|
}
|
||||||
|
|
||||||
static tsize_t
|
static tsize_t
|
||||||
_tiffWriteProc(thandle_t fd, tdata_t buf, tsize_t size)
|
_tiffWriteProc(thandle_t fd, tdata_t buf, tsize_t size)
|
||||||
{
|
{
|
||||||
return ((tsize_t) write((int) fd, buf, (size_t) size));
|
return ((tsize_t) write((int) (size_t)fd, buf, (size_t) size));
|
||||||
}
|
}
|
||||||
|
|
||||||
static toff_t
|
static toff_t
|
||||||
_tiffSeekProc(thandle_t fd, toff_t off, int whence)
|
_tiffSeekProc(thandle_t fd, toff_t off, int whence)
|
||||||
{
|
{
|
||||||
return ((toff_t) lseek((int) fd, (off_t) off, whence));
|
return ((toff_t) lseek((int) (size_t)fd, (off_t) off, whence));
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
_tiffCloseProc(thandle_t fd)
|
_tiffCloseProc(thandle_t fd)
|
||||||
{
|
{
|
||||||
return (close((int) fd));
|
return (close((int) (size_t)fd));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -81,7 +81,7 @@ _tiffSizeProc(thandle_t fd)
|
|||||||
return ((fsize = lseek((int) fd, 0, SEEK_END)) < 0 ? 0 : fsize);
|
return ((fsize = lseek((int) fd, 0, SEEK_END)) < 0 ? 0 : fsize);
|
||||||
#else
|
#else
|
||||||
struct stat sb;
|
struct stat sb;
|
||||||
return (toff_t) (fstat((int) fd, &sb) < 0 ? 0 : sb.st_size);
|
return (toff_t) (fstat((int) (size_t)fd, &sb) < 0 ? 0 : sb.st_size);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -133,7 +133,7 @@ TIFFFdOpen(int fd, const char* name, const char* mode)
|
|||||||
TIFF* tif;
|
TIFF* tif;
|
||||||
|
|
||||||
tif = TIFFClientOpen(name, mode,
|
tif = TIFFClientOpen(name, mode,
|
||||||
(thandle_t) fd,
|
(thandle_t) (size_t)fd,
|
||||||
_tiffReadProc, _tiffWriteProc,
|
_tiffReadProc, _tiffWriteProc,
|
||||||
_tiffSeekProc, _tiffCloseProc, _tiffSizeProc,
|
_tiffSeekProc, _tiffCloseProc, _tiffSizeProc,
|
||||||
_tiffMapProc, _tiffUnmapProc);
|
_tiffMapProc, _tiffUnmapProc);
|
||||||
|
@ -73,7 +73,7 @@ void CirclesGridClusterFinder::hierarchicalClustering(const vector<Point2f> poin
|
|||||||
}
|
}
|
||||||
|
|
||||||
int patternClusterIdx = 0;
|
int patternClusterIdx = 0;
|
||||||
while(clusters[patternClusterIdx].size() < patternSize.area() && countNonZero(distsMask == 255) > 0)
|
while((int)clusters[patternClusterIdx].size() < patternSize.area() && countNonZero(distsMask == 255) > 0)
|
||||||
{
|
{
|
||||||
Point minLoc;
|
Point minLoc;
|
||||||
minMaxLoc(dists, 0, 0, &minLoc, 0, distsMask);
|
minMaxLoc(dists, 0, 0, &minLoc, 0, distsMask);
|
||||||
@ -93,7 +93,7 @@ void CirclesGridClusterFinder::hierarchicalClustering(const vector<Point2f> poin
|
|||||||
}
|
}
|
||||||
|
|
||||||
patternPoints.clear();
|
patternPoints.clear();
|
||||||
if(clusters[patternClusterIdx].size() != patternSize.area())
|
if((int)clusters[patternClusterIdx].size() != patternSize.area())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -481,10 +481,9 @@ protected:
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
string name;
|
||||||
const DistanceType maxDist;
|
const DistanceType maxDist;
|
||||||
const float prevTime;
|
const float prevTime;
|
||||||
|
|
||||||
string name;
|
|
||||||
Ptr<DescriptorExtractor> dextractor;
|
Ptr<DescriptorExtractor> dextractor;
|
||||||
Distance distance;
|
Distance distance;
|
||||||
|
|
||||||
@ -516,7 +515,7 @@ class CV_DescriptorMatcherTest : public cvtest::BaseTest
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CV_DescriptorMatcherTest( const string& _name, const Ptr<DescriptorMatcher>& _dmatcher, float _badPart ) :
|
CV_DescriptorMatcherTest( const string& _name, const Ptr<DescriptorMatcher>& _dmatcher, float _badPart ) :
|
||||||
name(_name), badPart(_badPart), dmatcher(_dmatcher)
|
badPart(_badPart), name(_name), dmatcher(_dmatcher)
|
||||||
{}
|
{}
|
||||||
protected:
|
protected:
|
||||||
static const int dim = 500;
|
static const int dim = 500;
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include "opencv2/flann/object_factory.h"
|
#include "opencv2/flann/object_factory.h"
|
||||||
|
#include "opencv2/flann/logger.h"
|
||||||
|
|
||||||
namespace cvflann {
|
namespace cvflann {
|
||||||
|
|
||||||
@ -58,13 +59,6 @@ enum flann_centers_init_t {
|
|||||||
FLANN_CENTERS_KMEANSPP = 2
|
FLANN_CENTERS_KMEANSPP = 2
|
||||||
};
|
};
|
||||||
|
|
||||||
enum flann_log_level_t {
|
|
||||||
FLANN_LOG_NONE = 0,
|
|
||||||
FLANN_LOG_FATAL = 1,
|
|
||||||
FLANN_LOG_ERROR = 2,
|
|
||||||
FLANN_LOG_WARN = 3,
|
|
||||||
FLANN_LOG_INFO = 4
|
|
||||||
};
|
|
||||||
|
|
||||||
enum flann_distance_t {
|
enum flann_distance_t {
|
||||||
FLANN_DIST_EUCLIDEAN = 1,
|
FLANN_DIST_EUCLIDEAN = 1,
|
||||||
|
@ -31,15 +31,20 @@
|
|||||||
#ifndef _OPENCV_LOGGER_H_
|
#ifndef _OPENCV_LOGGER_H_
|
||||||
#define _OPENCV_LOGGER_H_
|
#define _OPENCV_LOGGER_H_
|
||||||
|
|
||||||
|
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include "opencv2/flann/general.h"
|
|
||||||
|
|
||||||
|
|
||||||
namespace cvflann
|
namespace cvflann
|
||||||
{
|
{
|
||||||
|
|
||||||
|
enum flann_log_level_t {
|
||||||
|
FLANN_LOG_NONE = 0,
|
||||||
|
FLANN_LOG_FATAL = 1,
|
||||||
|
FLANN_LOG_ERROR = 2,
|
||||||
|
FLANN_LOG_WARN = 3,
|
||||||
|
FLANN_LOG_INFO = 4
|
||||||
|
};
|
||||||
|
|
||||||
class CV_EXPORTS Logger
|
class CV_EXPORTS Logger
|
||||||
{
|
{
|
||||||
FILE* stream;
|
FILE* stream;
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
|
|
||||||
#include "opencv2/flann/dist.h"
|
#include "opencv2/flann/dist.h"
|
||||||
#include "opencv2/flann/index_testing.h"
|
#include "opencv2/flann/index_testing.h"
|
||||||
#include "opencv2/flann/logger.h"
|
|
||||||
#include "opencv2/flann/saving.h"
|
#include "opencv2/flann/saving.h"
|
||||||
#include "opencv2/flann/general.h"
|
#include "opencv2/flann/general.h"
|
||||||
|
|
||||||
|
@ -122,7 +122,7 @@ static bool wasInitialized = false;
|
|||||||
- (void)createSliderWithName:(const char *)name maxValue:(int)max value:(int *)value callback:(CvTrackbarCallback)callback;
|
- (void)createSliderWithName:(const char *)name maxValue:(int)max value:(int *)value callback:(CvTrackbarCallback)callback;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
static void icvCocoaCleanup(void)
|
/*static void icvCocoaCleanup(void)
|
||||||
{
|
{
|
||||||
//cout << "icvCocoaCleanup" << endl;
|
//cout << "icvCocoaCleanup" << endl;
|
||||||
if( application )
|
if( application )
|
||||||
@ -132,7 +132,7 @@ static void icvCocoaCleanup(void)
|
|||||||
application = 0;
|
application = 0;
|
||||||
[pool release];
|
[pool release];
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
|
||||||
CV_IMPL int cvInitSystem( int argc, char** argv)
|
CV_IMPL int cvInitSystem( int argc, char** argv)
|
||||||
{
|
{
|
||||||
|
@ -62,7 +62,7 @@ static const uint8 Alog[256] = { 1,2,4,8,16,32,64,128,45,90,180,69,138,57,114,22
|
|||||||
169,127,254,209,143,51,102,204,181,71,142,49,98,196,165,103,206,177,79,158,17,34,68,136,61,122,244,197,167,99,
|
169,127,254,209,143,51,102,204,181,71,142,49,98,196,165,103,206,177,79,158,17,34,68,136,61,122,244,197,167,99,
|
||||||
198,161,111,222,145,15,30,60,120,240,205,183,67,134,33,66,132,37,74,148,5,10,20,40,80,160,109,218,153,31,62,
|
198,161,111,222,145,15,30,60,120,240,205,183,67,134,33,66,132,37,74,148,5,10,20,40,80,160,109,218,153,31,62,
|
||||||
124,248,221,151,3,6,12,24,48,96,192,173,119,238,241,207,179,75,150,1 };
|
124,248,221,151,3,6,12,24,48,96,192,173,119,238,241,207,179,75,150,1 };
|
||||||
static const uint8 Log[256] = { -255,255,1,240,2,225,241,53,3,38,226,133,242,43,54,210,4,195,39,
|
static const uint8 Log[256] = { (uchar)-255,255,1,240,2,225,241,53,3,38,226,133,242,43,54,210,4,195,39,
|
||||||
114,227,106,134,28,243,140,44,23,55,118,211,234,5,219,196,96,40,222,115,103,228,78,107,125,
|
114,227,106,134,28,243,140,44,23,55,118,211,234,5,219,196,96,40,222,115,103,228,78,107,125,
|
||||||
135,8,29,162,244,186,141,180,45,99,24,49,56,13,119,153,212,199,235,91,6,76,220,217,197,11,97,
|
135,8,29,162,244,186,141,180,45,99,24,49,56,13,119,153,212,199,235,91,6,76,220,217,197,11,97,
|
||||||
184,41,36,223,253,116,138,104,193,229,86,79,171,108,165,126,145,136,34,9,74,30,32,163,84,245,
|
184,41,36,223,253,116,138,104,193,229,86,79,171,108,165,126,145,136,34,9,74,30,32,163,84,245,
|
||||||
@ -161,9 +161,9 @@ int Sampler::hasbars()
|
|||||||
|
|
||||||
void Sampler::timing()
|
void Sampler::timing()
|
||||||
{
|
{
|
||||||
uint8 dark = getpixel(9, 0);
|
uint8 light, dark = getpixel(9, 0);
|
||||||
for (int i = 1; i < 3; i += 2) {
|
for (int i = 1; i < 3; i += 2) {
|
||||||
uint8 light = getpixel(9, i);
|
light = getpixel(9, i);
|
||||||
// if (light <= dark)
|
// if (light <= dark)
|
||||||
// goto endo;
|
// goto endo;
|
||||||
dark = getpixel(9, i + 1);
|
dark = getpixel(9, i + 1);
|
||||||
|
@ -1394,7 +1394,7 @@ static void cvsubdiv2dpoint_specials(void)
|
|||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
/* convert_to_X: used after PyArg_ParseTuple in the generated code */
|
/* convert_to_X: used after PyArg_ParseTuple in the generated code */
|
||||||
|
|
||||||
static int convert_to_PyObjectPTR(PyObject *o, PyObject **dst, const char *name = "no_name")
|
/*static int convert_to_PyObjectPTR(PyObject *o, PyObject **dst, const char *name = "no_name")
|
||||||
{
|
{
|
||||||
*dst = o;
|
*dst = o;
|
||||||
return 1;
|
return 1;
|
||||||
@ -1404,7 +1404,7 @@ static int convert_to_PyCallableObjectPTR(PyObject *o, PyObject **dst, const cha
|
|||||||
{
|
{
|
||||||
*dst = o;
|
*dst = o;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
static int convert_to_char(PyObject *o, char *dst, const char *name = "no_name")
|
static int convert_to_char(PyObject *o, char *dst, const char *name = "no_name")
|
||||||
{
|
{
|
||||||
@ -2097,7 +2097,7 @@ static int convert_to_CvArrs(PyObject *o, CvArrs *dst, const char *name = "no_na
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int convert_to_floatPTRPTR(PyObject *o, float*** dst, const char *name = "no_name")
|
/*static int convert_to_floatPTRPTR(PyObject *o, float*** dst, const char *name = "no_name")
|
||||||
{
|
{
|
||||||
PyObject *fi = PySequence_Fast(o, name);
|
PyObject *fi = PySequence_Fast(o, name);
|
||||||
if (fi == NULL)
|
if (fi == NULL)
|
||||||
@ -2113,7 +2113,7 @@ static int convert_to_floatPTRPTR(PyObject *o, float*** dst, const char *name =
|
|||||||
}
|
}
|
||||||
*dst = r;
|
*dst = r;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
static int convert_to_CvFontPTR(PyObject *o, CvFont** dst, const char *name = "no_name")
|
static int convert_to_CvFontPTR(PyObject *o, CvFont** dst, const char *name = "no_name")
|
||||||
{
|
{
|
||||||
@ -2126,7 +2126,7 @@ static int convert_to_CvFontPTR(PyObject *o, CvFont** dst, const char *name = "n
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int convert_to_CvContourTreePTR(PyObject *o, CvContourTree** dst, const char *name = "no_name")
|
/*static int convert_to_CvContourTreePTR(PyObject *o, CvContourTree** dst, const char *name = "no_name")
|
||||||
{
|
{
|
||||||
if (PyType_IsSubtype(o->ob_type, &cvcontourtree_Type)) {
|
if (PyType_IsSubtype(o->ob_type, &cvcontourtree_Type)) {
|
||||||
(*dst) = ((cvcontourtree_t*)o)->a;
|
(*dst) = ((cvcontourtree_t*)o)->a;
|
||||||
@ -2135,7 +2135,7 @@ static int convert_to_CvContourTreePTR(PyObject *o, CvContourTree** dst, const c
|
|||||||
(*dst) = NULL;
|
(*dst) = NULL;
|
||||||
return failmsg("Expected CvContourTree for argument '%s'", name);
|
return failmsg("Expected CvContourTree for argument '%s'", name);
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
|
||||||
static int convert_to_CvRNGPTR(PyObject *o, CvRNG** dst, const char *name = "no_name")
|
static int convert_to_CvRNGPTR(PyObject *o, CvRNG** dst, const char *name = "no_name")
|
||||||
{
|
{
|
||||||
@ -2607,12 +2607,12 @@ static PyObject *FROM_CvRNG(CvRNG r)
|
|||||||
return (PyObject*)m;
|
return (PyObject*)m;
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *FROM_CvContourTreePTR(CvContourTree *r)
|
/*static PyObject *FROM_CvContourTreePTR(CvContourTree *r)
|
||||||
{
|
{
|
||||||
cvcontourtree_t *m = PyObject_NEW(cvcontourtree_t, &cvcontourtree_Type);
|
cvcontourtree_t *m = PyObject_NEW(cvcontourtree_t, &cvcontourtree_Type);
|
||||||
m->a = r;
|
m->a = r;
|
||||||
return (PyObject*)m;
|
return (PyObject*)m;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
static PyObject *FROM_generic(generic r)
|
static PyObject *FROM_generic(generic r)
|
||||||
{
|
{
|
||||||
@ -3690,8 +3690,7 @@ static PyObject *pyfinddatamatrix(PyObject *self, PyObject *args)
|
|||||||
ERRWRAP(codes = cvFindDataMatrix(image));
|
ERRWRAP(codes = cvFindDataMatrix(image));
|
||||||
|
|
||||||
PyObject *pycodes = PyList_New(codes.size());
|
PyObject *pycodes = PyList_New(codes.size());
|
||||||
int i;
|
for (size_t i = 0; i < codes.size(); i++) {
|
||||||
for (i = 0; i < codes.size(); i++) {
|
|
||||||
DataMatrixCode *pc = &codes[i];
|
DataMatrixCode *pc = &codes[i];
|
||||||
PyList_SetItem(pycodes, i, Py_BuildValue("(sOO)", pc->msg, FROM_CvMat(pc->corners), FROM_CvMat(pc->original)));
|
PyList_SetItem(pycodes, i, Py_BuildValue("(sOO)", pc->msg, FROM_CvMat(pc->corners), FROM_CvMat(pc->original)));
|
||||||
}
|
}
|
||||||
|
@ -555,7 +555,6 @@ template<typename _Tp> static inline PyObject* pyopencv_from(const vector<_Tp>&
|
|||||||
}
|
}
|
||||||
|
|
||||||
static PyObject* pyopencv_from(const KeyPoint&);
|
static PyObject* pyopencv_from(const KeyPoint&);
|
||||||
static bool pyopencv_from(PyObject*,KeyPoint&,const char*);
|
|
||||||
|
|
||||||
template<typename _Tp> static inline bool pyopencv_to_generic_vec(PyObject* obj, vector<_Tp>& value, const char* name="<unknown>")
|
template<typename _Tp> static inline bool pyopencv_to_generic_vec(PyObject* obj, vector<_Tp>& value, const char* name="<unknown>")
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user