Ask Your Question

xiaojidan's profile - activity

2020-10-05 18:07:45 -0600 received badge  Notable Question (source)
2019-04-16 02:49:56 -0600 received badge  Popular Question (source)
2013-08-13 04:19:19 -0600 commented answer Instant OpenCV Starter, who have?

Thank you.

2013-08-12 09:30:51 -0600 asked a question Instant OpenCV Starter, who have?

I see a news about a good book named "Instant OpenCV Starter", who have it? can you give me a copy??

2013-06-23 09:10:13 -0600 answered a question Make a collage with other images

something wrong with it

2013-06-05 06:29:20 -0600 commented answer Opencv sum()[]

Thank you

2013-06-04 22:14:02 -0600 asked a question Opencv sum()[]

I am new to opencv , I do not understand the function "sum".

Mat img=(Mat_<double>(3,3)<<0,-1,0,-1,5,-1,2,-1,0); double rr=sum(img)[0]; cout<<"rr"<<rr&lt;<endl;< p="">

waitKey(0);
return 0;

What is the meaning of this function "sum", sum(img)[0] is standing for?? sum(img)[1] is standing for ? sum(img)[2] is stranding for??

2013-04-12 06:17:50 -0600 commented answer Save Image Sequence real time,but cannot save Consecutive pictures ,why?

I try it , but it does not meet my needs, can you give me your email so that I would like to ask you more in-depth

2013-04-12 05:16:53 -0600 commented answer Save Image Sequence real time,but cannot save Consecutive pictures ,why?

this is right???

clock_t time;

time= clock();

double result = (float)time/CLOCKS_PER_SEC;

sprintf(file,"%s%d%d%d_%d%d%d%d%d.jpg\n","D:/Projects/vs2010/text11/", tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec,counter );

counter++;

2013-04-12 05:11:43 -0600 commented answer Save Image Sequence real time,but cannot save Consecutive pictures ,why?

Hello , I am new come. Can you tell me how to insert the code in my codes, can you give me the complete code , thank you~

2013-04-11 20:40:38 -0600 commented answer Save Image Sequence real time

sorry you give me a wrong suggestion , it does not save iamge...please

2013-04-11 20:28:25 -0600 asked a question Save Image Sequence real time,but cannot save Consecutive pictures ,why?
#include <opencv2/opencv.hpp>

#include<time.h>
int main() 
{
                      char file[256];  
        time_t mytime;
        mytime = time(NULL);
        struct tm tm = *localtime(&mytime);
        printf("now: %d-%d-%d %d:%d:%d\n", tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec);

        CvCapture* capture = cvCaptureFromCAM( CV_CAP_ANY );


       if ( !capture ) {
      fprintf( stderr, "ERROR: capture is NULL \n" );
      getchar();
      return -1;

}

 cvNamedWindow( "mywindow", CV_WINDOW_AUTOSIZE );



while ( 1 ) {
  IplImage* frame = cvQueryFrame(capture);
 if ( !frame ) {

   fprintf( stderr, "ERROR: frame is null...\n" );

   break;
 }
 cvShowImage( "mywindow", frame );

 sprintf(file,"%s%d%d%d_%d%d%d%d.jpg\n","D:/Projects/vs2010/text11/", tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec); 

 cvSaveImage(file, frame,0);

 //sleep(2);
 // Do not release the frame!
 //If ESC key pressed, Key=0x10001B under OpenCV 0.9.7(linux version),
 //remove higher bits using AND operator
 if ( (cvWaitKey(10) & 255) == 27 ) break;

}

  cvReleaseCapture( &capture );
  cvDestroyWindow( "mywindow" );
  return 0;

}

2013-04-11 09:45:51 -0600 answered a question Save Image Sequence real time

hello can you give me the complete code,I try it, but it does not work.please :

#include <opencv2 opencv.hpp="">

include<time.h>

int main() {

char file[256];

time_t mytime; mytime = time(NULL); struct tm tm = *localtime(&mytime); printf("now: %d-%d-%d %d:%d:%d\n", tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec);

CvCapture* capture = cvCaptureFromCAM( CV_CAP_ANY ); if ( !capture ) { fprintf( stderr, "ERROR: capture is NULL \n" ); getchar(); return -1; } int counter = 0; cvNamedWindow( "mywindow", CV_WINDOW_AUTOSIZE ); while ( 1 ) { IplImage* frame = cvQueryFrame(capture); if ( !frame ) {

   fprintf( stderr, "ERROR: frame is null...\n" );

   break;
 }
 cvShowImage( "mywindow", frame );

 sprintf(file,"%s%d%d%d_%d%d%d%d.jpg\n","D:/Projects/vs2010/text11/", tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec); 

 cvSaveImage(file, frame,0);

 //sleep(2);
 // Do not release the frame!
 //If ESC key pressed, Key=0x10001B under OpenCV 0.9.7(linux version),
 //remove higher bits using AND operator
 if ( (cvWaitKey(10) & 255) == 27 ) break;

} // Release the capture device housekeeping cvReleaseCapture( &capture ); cvDestroyWindow( "mywindow" ); return 0; }

2013-04-11 09:44:52 -0600 commented answer Save Image Sequence real time

hello can you give me the complete code,I try it, but it does not work.please :

include <opencv2/opencv.hpp>

include<time.h>

int main() {

char file[256];

time_t mytime; mytime = time(NULL); struct tm tm = *localtime(&mytime); printf("now: %d-%d-%d %d:%d:%d\n", tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec);

CvCapture* capture = cvCaptureFromCAM( CV_CAP_ANY ); if ( !capture ) { fprintf( stderr, "ERROR: capture is NULL \n" ); getchar(); return -1; } int counter = 0; cvNamedWindow( "mywindow", CV_WINDOW_AUTOSIZE ); while ( 1 ) { IplImage* frame = cvQueryFrame(capture); if ( !frame ) {

   fprintf( stderr, "ERROR: frame is null...\n" );

   break;
 }
 cvShowImage( "mywindow", frame )
2013-04-10 22:23:09 -0600 answered a question Save Image Sequence real time

I copy your code ,but it does not work, I can not save the picture in the folder --"D:/Projects/vs2010/text11/"
can you tell me the reason,please...

int main() {

char file[256];

time_t mytime; mytime = time(NULL); struct tm tm = *localtime(&mytime);

CvCapture* capture = cvCaptureFromCAM( CV_CAP_ANY ); if ( !capture ) { fprintf( stderr, "ERROR: capture is NULL \n" ); getchar(); return -1; } int counter = 0; cvNamedWindow( "mywindow", CV_WINDOW_AUTOSIZE ); while ( 1 ) { IplImage* frame = cvQueryFrame(capture); if ( !frame ) {

   fprintf( stderr, "ERROR: frame is null...\n" );

   break;
 }
 cvShowImage( "mywindow", frame );
 sprintf(file,"%d%d%d_%d%d%d_%d.pgm\n", tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec, clock() );
 sprintf(file,"%s","D:/Projects/vs2010/text11/");
 sprintf(file,"%d%d%d_%d%d%d.pgm\n", tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec); 

 cvSaveImage(file, frame,0);

 //sleep(2);
 // Do not release the frame!
 //If ESC key pressed, Key=0x10001B under OpenCV 0.9.7(linux version),
 //remove higher bits using AND operator
 if ( (cvWaitKey(10) & 255) == 27 ) break;

} // Release the capture device housekeeping cvReleaseCapture( &capture ); cvDestroyWindow( "mywindow" ); return 0; }

2013-01-14 20:09:00 -0600 received badge  Editor (source)
2013-01-14 20:07:14 -0600 answered a question how to use cv::setMouseCallback in a c++ class

Good!!! could you give me a complete code? I am interested in it, so I want to understand deeply.
My email is [email protected].

2013-01-09 08:03:44 -0600 answered a question Installation issues OpenCV 2.4.3 (Win 7, 64Bit) and Visual Studio 2012 Pro

I suggest you should use vs2010