int main(int argc, char ** argv){ //VideoSource vs(false, "./Various.avi"); VideoSource vs(true, ""); vs.enableDisplayWindow(); SupportedImageWidths siw = W512; // Left to Right is bottom layer to top //uint centroid_counts[] = {3,3,4,3,3,3,3,5}; uint centroid_counts[] = {4,3,5,3,3,2,3,4}; bool isUniform = true; DestinNetworkAlt * network = new DestinNetworkAlt(siw, 8, centroid_counts, isUniform); Transporter t; vs.grab();//throw away first frame in case its garbage int frameCount = 0; while(vs.grab()){ frameCount++; t.setSource(vs.getOutput()); t.transport(); //move video from host to card testNan(t.getDest(), 512*512); network->doDestin(t.getDest()); if(frameCount % 2 != 0 ){ //only print every 2rd so display is not so jumpy printFPS(false); continue; } // Old clear screen method //printf("\033[2J"); // New clear screen method (might give less flickering...?) printf("\033[2J\033[1;1H"); printf("Frame: %i\n", frameCount); printFPS(true); int layer = 1; Node & n = *network->getNode(layer,0,0); printf("Node %i,0,0 winner: %i\n",layer, n.winner); printf("Node centroids: %i\n", n.nb); printf("Node starv:"); printFloatArray(n.starv, n.nb); printf("Starv coef: %f \n", n.starvCoeff); printf("\n"); // 2013.4.5 // CZT // //printf("layer %i node 0 centroid locations:\n", layer); //network->printNodeCentroidPositions(layer, 0, 0); for(int l = 0 ; l < 8 ; l++){ printf("belief graph layer: %i\n",l); network->printBeliefGraph(l,0,0); } } delete network; return 0; }