【正文】
CS223b 2022。video_writer)。 ? Just like cvShowImage(window, frame)。 ? CV_AA means draw the line antialiased. ? 0 means there are no fractional bits. Step 9: Make an AVI output CvVideoWriter *video_writer = cvCreateVideoWriter( “”, 1, frames_per_second, cvSize(w,h) )。 cvLine(frame1, p,q, line_color, line_thickness, CV_AA, 0)。 line_color = CV_RGB(255, 0, 0)。 = 2。 = 1。 ? 13 arguments total. All of the above. ? Both frames, both feature arrays, etc. ? See full implementation in handout. Step 8: Visualize the Output CvPoint p, q。 CvTermCriteria term = cvTermCriteria( CV_TERMCRIT_ITER | CV_TERMCRIT_EPS, 20, .3 )。 ? Allocate eig,temp as in handout. ? On return frame1_features is full and N is the number of features found. Step 7: Run Optical Flow char optical_flow_found_feature[]。 cvGoodFeaturesToTrack( frame1, eig_image, temp_image, frame1_features, amp。 cvConvertImage( frame, frame1 )。 ? Get frame N: IplImage *frame = cvQueryFrame(input_video)。 ? Similar construction for getting the width and the number of frames. ? See the handout. Step 3: Create a Window cvNamedWindow(“Optical Flow”, CV_WINDOW_AUTOSIZE)。 ? Failure modes: ? The file doesn’t exist. ? The AVI uses a codec OpenCV can’t read. ? Codecs like MJPEG and Cinepak are good. ? DV, in particular, is bad. Step 2: Read AVI Properties CvSize frame_size。 ./configure prefix=/usr。Introduct