Fixed build with MSVC

pull/2/head
Andrey Kamaev 13 years ago
parent d48d7b2b46
commit 988c405f79
  1. 6
      samples/c/contours.c
  2. 4
      samples/c/fback_c.c
  3. 6
      samples/c/morphology.c

@ -19,10 +19,11 @@ CvSeq* contours = 0;
static void on_trackbar(int pos)
{
(void)pos;
IplImage* cnt_img = cvCreateImage( cvSize(w,w), 8, 3 );
CvSeq* _contours = contours;
int _levels = levels - 3;
(void)pos;
if( _levels <= 0 ) // get to the nearest face to make it look more funny
_contours = _contours->h_next->h_next->h_next;
cvZero( cnt_img );
@ -53,13 +54,14 @@ static void findCComp( IplImage* img )
int main(int argc, char* argv[])
{
(void)argc; (void)argv;
int i, j;
CvMemStorage* storage = cvCreateMemStorage(0);
IplImage* img = cvCreateImage( cvSize(w,w), 8, 1 );
IplImage* img32f = cvCreateImage( cvSize(w,w), IPL_DEPTH_32F, 1 );
IplImage* img32s = cvCreateImage( cvSize(w,w), IPL_DEPTH_32S, 1 );
IplImage* img3 = cvCreateImage( cvSize(w,w), 8, 3 );
(void)argc; (void)argv;
help();
cvZero( img );

@ -16,8 +16,8 @@ static void help(void)
static void drawOptFlowMap(const CvMat* flow, CvMat* cflowmap, int step,
double scale, CvScalar color)
{
(void)scale;
int x, y;
(void)scale;
for( y = 0; y < cflowmap->rows; y += step)
for( x = 0; x < cflowmap->cols; x += step)
{
@ -30,9 +30,9 @@ static void drawOptFlowMap(const CvMat* flow, CvMat* cflowmap, int step,
int main( int argc, char** argv )
{
(void)argc; (void)argv;
CvCapture* capture = cvCreateCameraCapture(0);
CvMat* prevgray = 0, *gray = 0, *flow = 0, *cflow = 0;
(void)argc; (void)argv;
help();

@ -17,9 +17,10 @@ int erode_dilate_pos = 0;
// callback function for open/close trackbar
static void OpenClose(int pos)
{
(void)pos;
int n = open_close_pos - max_iters;
int an = n > 0 ? n : -n;
(void)pos;
element = cvCreateStructuringElementEx( an*2+1, an*2+1, an, an, element_shape, 0 );
if( n < 0 )
{
@ -38,9 +39,10 @@ static void OpenClose(int pos)
// callback function for erode/dilate trackbar
static void ErodeDilate(int pos)
{
(void)pos;
int n = erode_dilate_pos - max_iters;
int an = n > 0 ? n : -n;
(void)pos;
element = cvCreateStructuringElementEx( an*2+1, an*2+1, an, an, element_shape, 0 );
if( n < 0 )
{

Loading…
Cancel
Save