title: OpenCv CreateImage Function isn't working
body: <p>I'm trying to create an image using opencv v 2.1, but I get this error:</p>
  
  <pre><code>image=cv.CreateImage((w,h),no_of_bits,channels) 
  </code></pre>
  
  <blockquote>
    <p>AttributeError: 'module' object has no attribute 'CreateImage'</p>
  </blockquote>
  
  <p>The code is</p>
  
  <pre><code>#!/usr/bin/python
  
  import cv 
  from opencv import *
  from opencv.cv import *
  from opencv.highgui import *
  import sys
  
  import PIL
  
  w=500
  h=500
  no_of_bits=8
  channels=3
  image=cv.CreateImage((w,h),no_of_bits,channels) 
  
  cv.ShowImage('WindowName',image) 
  cvWaitKey()
  </code></pre>