title: How to render from ob openCV
body: <p>In my python neat code I am using opencv to downscale and covert into gray every frame of the environment. what I want a archive is that opencv opens a window displaying the frame/ video that is it processing.</p>
  
  <p>In short I want to view the the neat algorithm learning and evolving. </p>
  
  <p>Because there are 3 environment running in parallel i want opencv to display the frame/video that is best performing right now.   </p>
  
  <p>I am working with the python neat library to do some machine learning tasks. At the moment I am doing parallel learning with 3 threads with the environment of sonic the hedgehog. I have tried to do simple open CV frame commands, but its just opening a black window. </p>
  
  <pre class="lang-py prettyprint-override"><code>
  net = neat.nn.FeedForwardNetwork.create(self.genome, self.config)
  
          fitness = 0
          xpos = 0
          xpos_max = 0
          counter = 0
          imgarray = []
  
          while not done:
              # self.env.render()
              ob = cv2.resize(ob, (inx, iny))
              ob = cv2.cvtColor(ob, cv2.COLOR_BGR2GRAY)
              ob = np.reshape(ob, (inx, iny))
  
              imgarray = np.ndarray.flatten(ob)
  
              actions = net.activate(imgarray)
  
              ob, rew, done, info = self.env.step(actions)
  
              xpos = info['x']
  
  
  
  </code></pre>
  
  <p>This is the part of the code that downscales the frame and converts it to gray scale.</p>
  
  <p>Bonus if it could only show the frame/worker that is doing the best based on the fitness value.</p>
  
  <p>View full code here:  <a href="https://gitlab.com/lucasrthompson/Sonic-Bot-In-OpenAI-and-NEAT/blob/master/neat-paralle-sonic.py" rel="nofollow noreferrer">https://gitlab.com/lucasrthompson/Sonic-Bot-In-OpenAI-and-NEAT/blob/master/neat-paralle-sonic.py</a> 
  by lucasrthompson</p>
  
  <p>The output that I expect is one window that shows the frame/ video of the environment. Awesome </p>
  
  <p>The built it render </p>
  
  <p>self.env.render()
  Pops up many many windows with past and present versions of the environment.</p>
  
  <p>thanks</p>