Skip to content
Advertisement

Convert image from PIL to openCV format

I’m trying to convert image from PIL to OpenCV format. I’m using OpenCV 2.4.3. here is what I’ve attempted till now.

JavaScript

But I think the image is not getting converted to CV format. The Window shows me a large brown image. Where am I going wrong in Converting image from PIL to CV format?

Also , why do i need to type cv.cv to access functions?

Advertisement

Answer

use this:

JavaScript
Advertisement