OCRNeuralNetwork/src/com/conordevilly/ocr/trainer/GUIController.java
@FXML protected void loadImage(ActionEvent event){
		try {
			Image img = new Image(imgList[imgListIterator].toURI().toString());
			BufferedImage bufImg = SwingFXUtils.fromFXImage(img, null);

			results.clear();
			imageView.setImage(img);
			results = nn.trainingProcess(bufImg);

			updateTable(results);
			setGuess(nn.getGuess());
			imgListIterator++;
			
			//Reset the iterator if all images ran
			//TODO: Warning text
			imgListIterator = (imgListIterator + 1 > imgList.length) ? 0 : imgListIterator++;
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
//Loads an image in the data dir
Loads an image in the data dir
Loads an image in the data dir
@FXML protected void loadImage(ActionEvent event){
		try {
			Image img = new Image(imgList[imgListIterator].toURI().toString());
			BufferedImage bufImg = SwingFXUtils.fromFXImage(img, null);
			results.clear();
			imageView.setImage(img);
			results = nn.trainingProcess(bufImg);
			updateTable(results);
			setGuess(nn.getGuess());
			imgListIterator++;
			imgListIterator = (imgListIterator + 1 > imgList.length) ? 0 : imgListIterator++;
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
@ FXML protected void loadImage ( ActionEvent event ) { try { Image img = new Image ( imgList [ imgListIterator ] . toURI ( ) . toString ( ) ) ; BufferedImage bufImg = SwingFXUtils . fromFXImage ( img , null ) ; results . clear ( ) ; imageView . setImage ( img ) ; results = nn . trainingProcess ( bufImg ) ; updateTable ( results ) ; setGuess ( nn . getGuess ( ) ) ; imgListIterator ++ ; imgListIterator = ( imgListIterator + 1 > imgList . length ) ? 0 : imgListIterator ++ ; } catch ( Exception e ) { e . printStackTrace ( ) ; } }
Loads an image in the data dir
Loads an image in the data dir
//Reset the iterator if all images ran //TODO: Warning text