class_docstr: A DM Control Suite preprocessing wrapper for image observations.
class_docstr_tok: ["A","DM","Control","Suite","preprocessing","wrapper","for","image","observations","."]
docstr: Renders the environment and processes the image.
  
  The processing steps are:
  1. Convert the image to uint8, as expected by Dopamine's replay buffer.
  2. Resize the image to the specified size.
  
  Returns:
    An np.ndarray with the image data in rgb format.
docstr_tok: ["Renders","the","environment","and","processes","the","image",".","The","processing","steps","are",":","1",".","Convert","the","image","to","uint8",",","as","expected","by","Dopamine","'s","replay","buffer",".","2",".","Resize","the","image","to","the","specified","size",".","Returns",":","An","np.ndarray","with","the","image","data","in","rgb","format","."]
code: def _render_image(self) -> np.ndarray:
      """Renders the environment and processes the image.
  
      The processing steps are:
      1. Convert the image to uint8, as expected by Dopamine's replay buffer.
      2. Resize the image to the specified size.
  
      Returns:
        An np.ndarray with the image data in rgb format.
      """
      image = self.environment.physics.render(*self._shape, camera_id=0)
  
      if image.dtype != np.uint8:
          if image.dtype in (np.float32, np.float64):
              image = (image * 255).astype(np.uint8)
          else:
              raise ValueError(
                  "Unsupported dtype: {}".format(image.dtype)
              )
  
      return image
  
imports: import collections
  from typing import Any, Mapping, Tuple
  from dm_control import suite
  from dm_control.rl import control
  import dm_env
  from dm_env import specs
  import gin
  import gym
  from gym import spaces
  import numpy
label_desc: Use image node_id 4 for calling the DeepmindControlWithImagesPreprocessing obj's underlying member method code with example usage: obj._render_image() and returns: image