fprintf(out, "attrno=%d; attrname=\"%s\"(0x%08x); attrtype=\"%s\"(0x%08x)\n",
i,
jas_iccsigtostr(attr->name, &buf[0]),
- attr->name,
+ (unsigned)attr->name,
jas_iccsigtostr(attrval->type, &buf[8]),
- attrval->type
+ (unsigned)attrval->type
);
jas_iccattrval_dump(attrval, out);
fprintf(out, "---\n");
char buf[8];
jas_iccsigtostr(attrval->type, buf);
fprintf(out, "refcnt = %d; type = 0x%08x %s\n", attrval->refcnt,
- attrval->type, jas_iccsigtostr(attrval->type, &buf[0]));
+ (unsigned)attrval->type, jas_iccsigtostr(attrval->type, &buf[0]));
if (attrval->ops->dump) {
(*attrval->ops->dump)(attrval, out);
}
{
int i;
jas_icccurv_t *curv = &attrval->data.curv;
- fprintf(out, "number of entires = %d\n", curv->numents);
+ fprintf(out, "number of entires = %d\n", (int)curv->numents);
if (curv->numents == 1) {
fprintf(out, "gamma = %f\n", curv->ents[0] / 256.0);
} else {
{
jas_icctxtdesc_t *txtdesc = &attrval->data.txtdesc;
fprintf(out, "ascii = \"%s\"\n", txtdesc->ascdata);
- fprintf(out, "uclangcode = %d; uclen = %d\n", txtdesc->uclangcode,
- txtdesc->uclen);
- fprintf(out, "sccode = %d\n", txtdesc->sccode);
+ fprintf(out, "uclangcode = %d; uclen = %d\n", (int)txtdesc->uclangcode,
+ (int)txtdesc->uclen);
+ fprintf(out, "sccode = %d\n", (int)txtdesc->sccode);
fprintf(out, "maclen = %d\n", txtdesc->maclen);
}
fprintf(out, "\n");
}
fprintf(out, "numintabents=%d, numouttabents=%d\n",
- lut8->numintabents, lut8->numouttabents);
+ (int)lut8->numintabents, (int)lut8->numouttabents);
}
/******************************************************************************\
fprintf(out, "\n");
}
fprintf(out, "numintabents=%d, numouttabents=%d\n",
- lut16->numintabents, lut16->numouttabents);
+ (int)lut16->numintabents, (int)lut16->numouttabents);
}
/******************************************************************************\
for (cmptno = 0; cmptno < image->numcmpts_; ++cmptno) {
cmpt = image->cmpts_[cmptno];
fprintf(out, "prec=%d, sgnd=%d, cmpttype=%d\n", cmpt->prec_,
- cmpt->sgnd_, cmpt->type_);
+ cmpt->sgnd_, (int)cmpt->type_);
width = jas_image_cmptwidth(image, cmptno);
height = jas_image_cmptheight(image, cmptno);
n = JAS_MIN(16, width);
char sbuf[MAXLINELEN + 1];
int n;
- fprintf(out, "%d %d\n", jas_seq2d_xstart(matrix),
- jas_seq2d_ystart(matrix));
- fprintf(out, "%d %d\n", jas_matrix_numcols(matrix),
- jas_matrix_numrows(matrix));
+ fprintf(out, "%d %d\n", (int)jas_seq2d_xstart(matrix),
+ (int)jas_seq2d_ystart(matrix));
+ fprintf(out, "%d %d\n", (int)jas_matrix_numcols(matrix),
+ (int)jas_matrix_numrows(matrix));
buf[0] = '\0';
for (i = 0; i < jas_matrix_numrows(matrix); ++i) {
fprintf(out, "JP2 box: ");
fprintf(out, "type=%c%s%c (0x%08x); length=%d\n", '"', boxinfo->name,
- '"', box->type, box->len);
+ '"', (unsigned)box->type, (int)box->len);
if (box->ops->dumpdata) {
(*box->ops->dumpdata)(box, out);
}
unsigned int i;
for (i = 0; i < cdef->numchans; ++i) {
fprintf(out, "channo=%d; type=%d; assoc=%d\n",
- cdef->ents[i].channo, cdef->ents[i].type, cdef->ents[i].assoc);
+ (int)cdef->ents[i].channo, (int)cdef->ents[i].type, (int)cdef->ents[i].assoc);
}
}
(int) pclr->numchans);
for (i = 0; i < pclr->numlutents; ++i) {
for (j = 0; j < pclr->numchans; ++j) {
- fprintf(out, "LUT[%d][%d]=%d\n", i, j, pclr->lutdata[i * pclr->numchans + j]);
+ fprintf(out, "LUT[%d][%d]=%d\n", i, j, (int)pclr->lutdata[i * pclr->numchans + j]);
}
}
}
{
jpc_mstabent_t *mstabent;
mstabent = jpc_mstab_lookup(ms->id);
- fprintf(out, "type = 0x%04x (%s);", ms->id, mstabent->name);
+ fprintf(out, "type = 0x%04x (%s);", (unsigned)ms->id, mstabent->name);
if (JPC_MS_HASPARMS(ms->id)) {
- fprintf(out, " len = %d;", ms->len + 2);
+ fprintf(out, " len = %d;", (int)(ms->len + 2));
if (ms->ops->dumpparms) {
(*ms->ops->dumpparms)(ms, out);
} else {
{
jpc_sot_t *sot = &ms->parms.sot;
fprintf(out, "tileno = %d; len = %d; partno = %d; numparts = %d\n",
- sot->tileno, sot->len, sot->partno, sot->numparts);
+ (int)sot->tileno, (int)sot->len, sot->partno, sot->numparts);
return 0;
}
{
jpc_siz_t *siz = &ms->parms.siz;
unsigned int i;
- fprintf(out, "caps = 0x%02x;\n", siz->caps);
+ fprintf(out, "caps = 0x%02x;\n", (unsigned)siz->caps);
fprintf(out, "width = %d; height = %d; xoff = %d; yoff = %d;\n",
- siz->width, siz->height, siz->xoff, siz->yoff);
+ (int)siz->width, (int)siz->height, (int)siz->xoff, (int)siz->yoff);
fprintf(out, "tilewidth = %d; tileheight = %d; tilexoff = %d; "
- "tileyoff = %d;\n", siz->tilewidth, siz->tileheight, siz->tilexoff,
- siz->tileyoff);
+ "tileyoff = %d;\n", (int)siz->tilewidth, (int)siz->tileheight, (int)siz->tilexoff,
+ (int)siz->tileyoff);
for (i = 0; i < siz->numcomps; ++i) {
fprintf(out, "prec[%d] = %d; sgnd[%d] = %d; hsamp[%d] = %d; "
"vsamp[%d] = %d\n", i, siz->comps[i].prec, i,
fprintf(out, "numdlvls = %d; qmfbid = %d; mctrans = %d\n",
cod->compparms.numdlvls, cod->compparms.qmfbid, cod->mctrans);
fprintf(out, "prg = %d; numlyrs = %d;\n",
- cod->prg, cod->numlyrs);
+ cod->prg, (int)cod->numlyrs);
fprintf(out, "cblkwidthval = %d; cblkheightval = %d; "
"cblksty = 0x%02x;\n", cod->compparms.cblkwidthval, cod->compparms.cblkheightval,
cod->compparms.cblksty);
{
jpc_coc_t *coc = &ms->parms.coc;
fprintf(out, "compno = %d; csty = 0x%02x; numdlvls = %d;\n",
- coc->compno, coc->compparms.csty, coc->compparms.numdlvls);
+ (int)coc->compno, coc->compparms.csty, coc->compparms.numdlvls);
fprintf(out, "cblkwidthval = %d; cblkheightval = %d; "
"cblksty = 0x%02x; qmfbid = %d;\n", coc->compparms.cblkwidthval,
coc->compparms.cblkheightval, coc->compparms.cblksty, coc->compparms.qmfbid);
{
jpc_rgn_t *rgn = &ms->parms.rgn;
fprintf(out, "compno = %d; roisty = %d; roishift = %d\n",
- rgn->compno, rgn->roisty, rgn->roishift);
+ (int)rgn->compno, rgn->roisty, rgn->roishift);
return 0;
}
jpc_qcc_t *qcc = &ms->parms.qcc;
int i;
fprintf(out, "compno = %d; qntsty = %d; numguard = %d; "
- "numstepsizes = %d\n", qcc->compno, qcc->compparms.qntsty, qcc->compparms.numguard,
+ "numstepsizes = %d\n", (int)qcc->compno, qcc->compparms.qntsty, qcc->compparms.numguard,
qcc->compparms.numstepsizes);
for (i = 0; i < qcc->compparms.numstepsizes; ++i) {
fprintf(out, "expn[%d] = 0x%04x; mant[%d] = 0x%04x;\n",
static int jpc_sop_dumpparms(jpc_ms_t *ms, FILE *out)
{
jpc_sop_t *sop = &ms->parms.sop;
- fprintf(out, "seqno = %d;\n", sop->seqno);
+ fprintf(out, "seqno = %d;\n", (int)sop->seqno);
return 0;
}
static int jpc_ppm_dumpparms(jpc_ms_t *ms, FILE *out)
{
jpc_ppm_t *ppm = &ms->parms.ppm;
- fprintf(out, "ind=%d; len = %d;\n", ppm->ind, ppm->len);
+ fprintf(out, "ind=%d; len = %d;\n", ppm->ind, (int)ppm->len);
if (ppm->len > 0) {
fprintf(out, "data =\n");
jas_memdump(out, ppm->data, ppm->len);
static int jpc_ppt_dumpparms(jpc_ms_t *ms, FILE *out)
{
jpc_ppt_t *ppt = &ms->parms.ppt;
- fprintf(out, "ind=%d; len = %d;\n", ppt->ind, ppt->len);
+ fprintf(out, "ind=%d; len = %d;\n", ppt->ind, (int)ppt->len);
if (ppt->len > 0) {
fprintf(out, "data =\n");
jas_memdump(out, ppt->data, ppt->len);
++pchgno, ++pchg) {
fprintf(out, "po[%d] = %d; ", pchgno, pchg->prgord);
fprintf(out, "cs[%d] = %d; ce[%d] = %d; ",
- pchgno, pchg->compnostart, pchgno, pchg->compnoend);
+ pchgno, (int)pchg->compnostart, pchgno, (int)pchg->compnoend);
fprintf(out, "rs[%d] = %d; re[%d] = %d; ",
pchgno, pchg->rlvlnostart, pchgno, pchg->rlvlnoend);
- fprintf(out, "le[%d] = %d\n", pchgno, pchg->lyrnoend);
+ fprintf(out, "le[%d] = %d\n", pchgno, (int)pchg->lyrnoend);
}
return 0;
}
for (compno = 0, comp = crg->comps; compno < crg->numcomps; ++compno,
++comp) {
fprintf(out, "hoff[%d] = %d; voff[%d] = %d\n", compno,
- comp->hoff, compno, comp->voff);
+ (int)comp->hoff, compno, (int)comp->voff);
}
return 0;
}
jpc_com_t *com = &ms->parms.com;
unsigned int i;
int printable;
- fprintf(out, "regid = %d;\n", com->regid);
+ fprintf(out, "regid = %d;\n", (int)com->regid);
printable = 1;
for (i = 0; i < com->len; ++i) {
if (!isprint(com->data[i])) {
tcomp->numrlvls; ++rlvlno, ++rlvl) {
fprintf(out, "RESOLUTION LEVEL %d\n", rlvlno);
fprintf(out, "xs =%d, ys = %d, xe = %d, ye = %d, w = %d, h = %d\n",
- rlvl->xstart, rlvl->ystart, rlvl->xend, rlvl->yend, rlvl->xend -
- rlvl->xstart, rlvl->yend - rlvl->ystart);
+ (int)rlvl->xstart, (int)rlvl->ystart, (int)rlvl->xend, (int)rlvl->yend, (int)(rlvl->xend -
+ rlvl->xstart), (int)(rlvl->yend - rlvl->ystart));
for (bandno = 0, band = rlvl->bands;
bandno < rlvl->numbands; ++bandno, ++band) {
fprintf(out, "BAND %d\n", bandno);
fprintf(out, "xs =%d, ys = %d, xe = %d, ye = %d, w = %d, h = %d\n",
- jas_seq2d_xstart(band->data), jas_seq2d_ystart(band->data), jas_seq2d_xend(band->data),
- jas_seq2d_yend(band->data), jas_seq2d_xend(band->data) - jas_seq2d_xstart(band->data),
- jas_seq2d_yend(band->data) - jas_seq2d_ystart(band->data));
+ (int)jas_seq2d_xstart(band->data), (int)jas_seq2d_ystart(band->data), (int)jas_seq2d_xend(band->data),
+ (int)jas_seq2d_yend(band->data), (int)(jas_seq2d_xend(band->data) - jas_seq2d_xstart(band->data)),
+ (int)(jas_seq2d_yend(band->data) - jas_seq2d_ystart(band->data)));
for (prcno = 0, prc = band->prcs;
prcno < rlvl->numprcs; ++prcno,
++prc) {
fprintf(out, "CODE BLOCK GROUP %d\n", prcno);
fprintf(out, "xs =%d, ys = %d, xe = %d, ye = %d, w = %d, h = %d\n",
- prc->xstart, prc->ystart, prc->xend, prc->yend, prc->xend -
- prc->xstart, prc->yend - prc->ystart);
+ (int)prc->xstart, (int)prc->ystart, (int)prc->xend, (int)prc->yend, (int)(prc->xend -
+ prc->xstart), (int)(prc->yend - prc->ystart));
for (cblkno = 0, cblk =
prc->cblks; cblkno <
prc->numcblks; ++cblkno,
++cblk) {
fprintf(out, "CODE BLOCK %d\n", cblkno);
fprintf(out, "xs =%d, ys = %d, xe = %d, ye = %d, w = %d, h = %d\n",
- jas_seq2d_xstart(cblk->data), jas_seq2d_ystart(cblk->data), jas_seq2d_xend(cblk->data),
- jas_seq2d_yend(cblk->data), jas_seq2d_xend(cblk->data) - jas_seq2d_xstart(cblk->data),
- jas_seq2d_yend(cblk->data) - jas_seq2d_ystart(cblk->data));
+ (int)jas_seq2d_xstart(cblk->data), (int)jas_seq2d_ystart(cblk->data), (int)jas_seq2d_xend(cblk->data),
+ (int)jas_seq2d_yend(cblk->data), (int)(jas_seq2d_xend(cblk->data) - jas_seq2d_xstart(cblk->data)),
+ (int)(jas_seq2d_yend(cblk->data) - jas_seq2d_ystart(cblk->data)));
}
}
}
int jpc_mqenc_dump(jpc_mqenc_t *mqenc, FILE *out)
{
fprintf(out, "AREG = %08x, CREG = %08x, CTREG = %d\n",
- mqenc->areg, mqenc->creg, mqenc->ctreg);
+ (unsigned)mqenc->areg, (unsigned)mqenc->creg, (int)mqenc->ctreg);
fprintf(out, "IND = %02d, MPS = %d, QEVAL = %04x\n",
(int)(*mqenc->curctx - jpc_mqstates), (int)(*mqenc->curctx)->mps,
(int)(*mqenc->curctx)->qeval);
case TIFF_SHORT:
case TIFF_SSHORT:
{
- uint16 v[2];
+ uint16 v[2]={0,0};
return TIFFFetchShortArray(tif, dir, v)
&& TIFFSetField(tif, dir->tdir_tag, v[0], v[1]);
}
#include <stdarg.h>
#include <stdlib.h>
+#include <stdio.h>
#include <sys/stat.h>
-#ifdef HAVE_UNISTD_H
+#if defined HAVE_UNISTD_H || defined __linux__
# include <unistd.h>
#endif
static int isInstance(const void* ptr)
{
static _ClsName dummy;
- return *(const void**)&dummy == *(const void**)ptr;
+ union
+ {
+ const void* p;
+ const void** pp;
+ } a, b;
+ a.p = &dummy;
+ b.p = ptr;
+ return *a.pp == *b.pp;
}
static void release(void** dbptr)
{
{
Mat Mag = src1.getMat(), Angle = src2.getMat();
int type = Angle.type(), depth = Angle.depth(), cn = Angle.channels();
- if( !Mag.empty() )
- CV_Assert( Angle.size == Mag.size && type == Mag.type() && (depth == CV_32F || depth == CV_64F));
+ CV_Assert( Mag.empty() || (Angle.size == Mag.size && type == Mag.type() && (depth == CV_32F || depth == CV_64F)));
dst1.create( Angle.dims, Angle.size, type );
dst2.create( Angle.dims, Angle.size, type );
Mat X = dst1.getMat(), Y = dst2.getMat();
// !!! this will only work for current 64-bit MWC RNG !!!
cv::RNG& rng = _rng ? (cv::RNG&)*_rng : cv::theRNG();
rng.fill(mat, disttype == CV_RAND_NORMAL ?
- cv::RNG::NORMAL : cv::RNG::UNIFORM, (cv::Scalar&)param1, (cv::Scalar&)param2 );
+ cv::RNG::NORMAL : cv::RNG::UNIFORM, cv::Scalar(param1), cv::Scalar(param2) );
}
CV_IMPL void cvRandShuffle( CvArr* arr, CvRNG* _rng, double iter_factor )
cv::Scalar cv::mean( InputArray _src, InputArray _mask )
{
Mat src = _src.getMat(), mask = _mask.getMat();
- if( !mask.empty() )
- CV_Assert( mask.type() == CV_8U );
+ CV_Assert( mask.empty() || mask.type() == CV_8U );
int k, cn = src.channels(), depth = src.depth();
SumFunc func = sumTab[depth];
void cv::meanStdDev( InputArray _src, OutputArray _mean, OutputArray _sdv, InputArray _mask )
{
Mat src = _src.getMat(), mask = _mask.getMat();
- if( !mask.empty() )
- CV_Assert( mask.type() == CV_8U );
+ CV_Assert( mask.empty() || mask.type() == CV_8U );
int k, cn = src.channels(), depth = src.depth();
SumSqrFunc func = sumSqrTab[depth];
const Mat* arrays[] = {&src, &mask, 0};
uchar* ptrs[2];
- double result = 0;
+ union
+ {
+ double d;
+ int i;
+ float f;
+ }
+ result;
+ result.d = 0;
NAryMatIterator it(arrays, ptrs);
int j, total = (int)it.size, blockSize = total, intSumBlockSize = 0, count = 0;
bool blockSum = (normType == NORM_L1 && depth <= CV_16S) ||
(normType == NORM_L2 && depth <= CV_8S);
int isum = 0;
- int *ibuf = (int*)&result;
+ int *ibuf = &result.i;
size_t esz = 0;
if( blockSum )
count += bsz;
if( blockSum && (count + blockSize >= intSumBlockSize || (i+1 >= it.nplanes && j+bsz >= total)) )
{
- result += isum;
+ result.d += isum;
isum = 0;
count = 0;
}
if( depth == CV_64F )
;
else if( depth == CV_32F )
- result = (float&)result;
+ result.d = result.f;
else
- result = (int&)result;
+ result.d = result.i;
}
else if( normType == NORM_L2 )
- result = std::sqrt(result);
+ result.d = std::sqrt(result.d);
- return result;
+ return result.d;
}
const Mat* arrays[] = {&src1, &src2, &mask, 0};
uchar* ptrs[3];
- double result = 0;
+ union
+ {
+ double d;
+ float f;
+ int i;
+ unsigned u;
+ }
+ result;
+ result.d = 0;
NAryMatIterator it(arrays, ptrs);
int j, total = (int)it.size, blockSize = total, intSumBlockSize = 0, count = 0;
bool blockSum = (normType == NORM_L1 && depth <= CV_16S) ||
(normType == NORM_L2 && depth <= CV_8S);
- unsigned int isum = 0;
- unsigned int *ibuf = (unsigned int*)&result;
+ unsigned isum = 0;
+ unsigned *ibuf = &result.u;
size_t esz = 0;
if( blockSum )
count += bsz;
if( blockSum && (count + blockSize >= intSumBlockSize || (i+1 >= it.nplanes && j+bsz >= total)) )
{
- result += isum;
+ result.d += isum;
isum = 0;
count = 0;
}
if( depth == CV_64F )
;
else if( depth == CV_32F )
- result = (float&)result;
+ result.d = result.f;
else
- result = (int&)result;
+ result.d = result.u;
}
else if( normType == NORM_L2 )
- result = std::sqrt(result);
+ result.d = std::sqrt(result.d);
- return result;
+ return result.d;
}
{
dc1394video_modes_t videoModes;
dc1394_video_get_supported_modes(dcCam, &videoModes);
- if (userMode < videoModes.num)
+ if (userMode < (int)videoModes.num)
{
dc1394video_mode_t mode = videoModes.modes[userMode];
code = dc1394_video_set_mode(dcCam, mode);
&& dcCam)
{
if (cvRound(value) == CV_CAP_PROP_DC1394_OFF)
+ {
if ((feature_set.feature[dc1394properties[propId]-DC1394_FEATURE_MIN].on_off_capable)
&& (dc1394_feature_set_power(dcCam, (dc1394feature_t)dc1394properties[propId], DC1394_OFF)==DC1394_SUCCESS))
- {
+ {
feature_set.feature[dc1394properties[propId]-DC1394_FEATURE_MIN].is_on=DC1394_OFF;
return true;
- }
- else
+ }
return false;
+ }
//try to turn the feature ON, feature can be ON and at the same time it can be not capable to change state to OFF
if ( feature_set.feature[dc1394properties[propId]-DC1394_FEATURE_MIN].is_on == DC1394_OFF &&
(feature_set.feature[dc1394properties[propId]-DC1394_FEATURE_MIN].on_off_capable == DC1394_TRUE))
int sdepth = src.depth(), ddepth = dst.depth(), cn = src.channels();
CV_Assert( dst.size == src.size && dst.channels() == cn );
-
- if( !mask.empty() )
- CV_Assert( mask.size == src.size && mask.type() == CV_8U );
+ CV_Assert( mask.empty() || (mask.size == src.size && mask.type() == CV_8U) );
int fidx = getAccTabIdx(sdepth, ddepth);
AccFunc func = fidx >= 0 ? accTab[fidx] : 0;
int sdepth = src.depth(), ddepth = dst.depth(), cn = src.channels();
CV_Assert( dst.size == src.size && dst.channels() == cn );
-
- if( !mask.empty() )
- CV_Assert( mask.size == src.size && mask.type() == CV_8U );
+ CV_Assert( mask.empty() || (mask.size == src.size && mask.type() == CV_8U) );
int fidx = getAccTabIdx(sdepth, ddepth);
AccFunc func = fidx >= 0 ? accSqrTab[fidx] : 0;
CV_Assert( src2.size && src1.size && src2.type() == src1.type() );
CV_Assert( dst.size == src1.size && dst.channels() == cn );
-
- if( !mask.empty() )
- CV_Assert( mask.size == src1.size && mask.type() == CV_8U );
+ CV_Assert( mask.empty() || (mask.size == src1.size && mask.type() == CV_8U) );
int fidx = getAccTabIdx(sdepth, ddepth);
AccProdFunc func = fidx >= 0 ? accProdTab[fidx] : 0;
int sdepth = src.depth(), ddepth = dst.depth(), cn = src.channels();
CV_Assert( dst.size == src.size && dst.channels() == cn );
-
- if( !mask.empty() )
- CV_Assert( mask.size == src.size && mask.type() == CV_8U );
+ CV_Assert( mask.empty() || (mask.size == src.size && mask.type() == CV_8U) );
int fidx = getAccTabIdx(sdepth, ddepth);
AccWFunc func = fidx >= 0 ? accWTab[fidx] : 0;
for (i=1; i<=num; i++) {
mem[i].prev = mem+i-1;
mem[i].next = mem+i+1;
- mem[i].i = mem[i].i = -1;
+ mem[i].i = -1;
mem[i].T = FLT_MAX;
}
tail = mem+i;
float *w; /* weights */
float *r; /* square distances */
int i, j, k;
- float _line[6], _lineprev[6];
+ float _line[6]={0,0,0,0,0,0}, _lineprev[6]={0,0,0,0,0,0};
float rdelta = reps != 0 ? reps : 1.0f;
float adelta = aeps != 0 ? aeps : 0.01f;
double min_err = DBL_MAX, err = 0;
CvRNG rng = cvRNG(-1);
- memset( line, 0, 6*sizeof(line[0]) );
-
switch (dist)
{
case CV_DIST_L2:
if(!test_cpp)
cvMinEnclosingCircle( points, ¢er, &radius );
else
- cv::minEnclosingCircle(cv::cvarrToMat(points), (cv::Point2f&)center, radius);
+ {
+ cv::Point2f tmpcenter;
+ cv::minEnclosingCircle(cv::cvarrToMat(points), tmpcenter, radius);
+ center = tmpcenter;
+ }
}
double xrange = img_size.width*(1 - FLT_EPSILON);
double yrange = img_size.height*(1 - FLT_EPSILON);
- subdiv = subdiv = cvCreateSubdivDelaunay2D(
+ subdiv = cvCreateSubdivDelaunay2D(
cvRect( 0, 0, img_size.width, img_size.height ), storage );
CvSeq* seq = cvCreateSeq( 0, sizeof(*seq), sizeof(CvPoint2D32f), storage );
criteria = cvCheckTermCriteria( criteria, 0., 100 );
lpt = tree->total;
- ptr_buf = NULL;
- level_buf = NULL;
i_buf = 0;
cur_level = 0;
log_iter = (char) (criteria.type == CV_TERMCRIT_ITER ||
cvSetErrStatus(0);
}
-#define ERRCHK do { if (cvGetErrStatus() != 0) { translate_error_to_exception(); return NULL; } } while (0)
+#define ERRCHK do { if (cvGetErrStatus() != 0) { translate_error_to_exception(); return 0; } } while (0)
#define ERRWRAPN(F, N) \
do { \
try \
CvMatND *cva;
if (!convert_to_CvMatND(o, &cva, "src"))
return NULL;
- ints dims;
+ ints dims={0,0};
if (new_dims != NULL) {
if (!convert_to_ints(new_dims, &dims, "new_dims"))
return NULL;
"int": ("int", "i", "0"),
"float": ("float", "f", "0.f"),
"double": ("double", "d", "0"),
- "c_string": ("char*", "s", '""')
+ "c_string": ("char*", "s", '(char*)""')
}
class ClassProp(object):