|
|
|
|
[Home][21 Video Input][21.5 Video to Images]
|
|
21.5 Converting Video to ImagesTo convert the video to images, a new button is added, “Change” (Figure 21.1). Clicking the button will bring up the form on Figure 21.2, which has a button, “*.avi To Image”. The roles of the three buttons are:
Double clicking the “*.Avi To Image” button will convert the AVI video to images, which is implemented as follows: private void button2_Click_1(object sender, System.EventArgs e) { if ( ! f.gui.script.aviVideo70.getVideoFileStatus() ) { richTextBox1.Text = "Please select a video source first.\n" + "Please click the Mode button, then click the source button.\n" + "The Mode button can looks like Dir, File, Sub Dir, ...\n"; return; }
try{ f.mainMenuToAPI.script.aviVideo70. setVideoToImagesDir (f.gui.videoLiveParameters .imageOutputFolder ); f.mainMenuToAPI.script.aviVideo70.setFrameNumberStart (f.gui.videoLiveParameters .videoStart ) ; f.mainMenuToAPI.script.aviVideo70.setFrameNumberEnd ( f.gui.videoLiveParameters .videoEnd ) ; f.mainMenuToAPI.script.aviVideo70.setFrameNumberStep (f.gui.videoLiveParameters .videoStep ); } catch (Exception ee) { richTextBox1.Text = ee.ToString () + "\n"; return; }
if ( ! f.mainMenuToAPI.script.aviVideo70.videoToImages () ) richTextBox1.Text = "Conversion fails!"; else richTextBox1.AppendText ( "Conversion completed!\n" ); } The last statement, f.mainMenuToAPI.script.aviVideo70.videoToImages () will convert the *.avi file into images.
[Home][About][1 Introduction][2 Image Recognition][3 TransApplet][4 API][5 Interface][6 Input][7 Image Display][8 Preprocessing][9 Processing][10 Normalization][11 Parameter Class][12 Image Signatures][13 Unsupervised Filters][14 BioFilters][15 NeuralFilters][16 Dynamic Library][17 NeuralNet Filter][18 Parameters][19 Input Options][20 Database Input][21 Video Input][22 Live Video Input][23 Counting & Tracking][24 Counting ][25 Batch Job][26 ImageFinder for DOS][27 ImageHunt ][28 Support Packages]
Copyright (c) 2006 - 2007 Attrasoft. All rights reserved. |