|
|
|
|
[Home][17 NeuralNet Filter][17.6 1:N Implementation]
|
|
17.6 1:N Matching ImplementationDouble click menu item �NeuralNet/Matching/1:N (Key vs Source)� and enter: private void menuItem116_Click(object sender, System.EventArgs e) { this.mainMenuToAPI.neuralNet_Matching_1N ( textBox1.Text , gui.imageAbsoultePath, dataDir + "c1.txt" ); } Here, mainMenuToAPI is an object, which will implement all functions. As we discussed earlier, the main form simply links menu items to functions in the mainMenuToAPI object. The implementation is: public bool neuralNet_Matching_1N ( string key, string [] imageAbsoultePath, string c1_txt) { bool b = false;
if ( imageAbsoultePath == null ) { f.richTextBox1.Text = "Search Image Source Fail!\nPlease specify search source!\n" ; return false; }
try { script.results_1N = script.neuralNetFilter.findMatch1N ( imageAbsoultePath ) ; } catch (Exception e) { appendText ( "NeuralFilter 1:N Matching fails:\n" + e.ToString () + "\n"); return false; }
if ( script.results_1N == null ) { appendText ( "NeuralNet 1:N Matching fails!\n" ); return false; } return true; } The following code simply makes sure search source exists: if ( imageAbsoultePath == null ) { f.richTextBox1.Text = "Search Image Source Fail!\nPlease specify search source!\n" ; return false; } The next section of code makes a 1:N Match: try { script.results_1N = script.neuralNetFilter.findMatch1N ( imageAbsoultePath ) ; } catch (Exception e) { appendText ( "NeuralFilter 1:N Matching fails:\n" + e.ToString () + "\n"); return false; } Remember, the neural net is already trained with the key image at this point.
[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. |