This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib.pyplot as plt | |
f, axarr = plt.subplots(3,4) | |
FIRST_IMAGE=0 | |
SECOND_IMAGE=7 | |
THIRD_IMAGE=26 | |
CONVOLUTION_NUMBER = 1 | |
from tensorflow.keras import models | |
layer_outputs = [layer.output for layer in model.layers] | |
activation_model = tf.keras.models.Model(inputs = model.input, outputs = layer_outputs) | |
for x in range(0,4): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Get texture location in fragment shader | |
GLint locTexY = glGetUniformLocation(program, "textureY"); | |
GLint locTexVU = glGetUniformLocation(program, "textureVU"); | |
// Upload YUV data to texture buffer | |
GLuint textureID[2]; | |
glGenTextures(1, &textureID[0]); | |
glActiveTexture(GL_TEXTURE0); | |
glBindTexture(GL_TEXTURE_2D, textureID[0]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#version 330 core | |
out vec4 FragColor; | |
in vec2 texCoord; | |
uniform sampler2D textureY; | |
uniform sampler2D textureVU; | |
void main() | |
{ | |
vec3 yuv, rgb; | |
vec3 yuv2r = vec3(1.164, 0.0, 1.596); | |
vec3 yuv2g = vec3(1.164, -0.391, -0.813); |