// === Debug image display methods. === // Displays the image of the matrix to the forward window. void Network::DisplayForward(const NetworkIO& matrix) { Pix* image = matrix.ToPix(); ClearWindow(false, name_.string(), pixGetWidth(image), pixGetHeight(image), &forward_win_); DisplayImage(image, forward_win_); forward_win_->Update(); }
// Displays the image of the matrix to the backward window. void Network::DisplayBackward(const NetworkIO& matrix) { Pix* image = matrix.ToPix(); STRING window_name = name_ + "-back"; ClearWindow(false, window_name.string(), pixGetWidth(image), pixGetHeight(image), &backward_win_); DisplayImage(image, backward_win_); backward_win_->Update(); }
// Displays the forward results in a window with the characters and // boundaries as determined by the labels and label_coords. void LSTMRecognizer::DisplayForward(const NetworkIO& inputs, const GenericVector<int>& labels, const GenericVector<int>& label_coords, const char* window_name, ScrollView** window) { #ifndef GRAPHICS_DISABLED // do nothing if there's no graphics Pix* input_pix = inputs.ToPix(); Network::ClearWindow(false, window_name, pixGetWidth(input_pix), pixGetHeight(input_pix), window); int line_height = Network::DisplayImage(input_pix, *window); DisplayLSTMOutput(labels, label_coords, line_height, *window); #endif // GRAPHICS_DISABLED }