Ask Your Question

richik's profile - activity

2018-04-04 17:42:58 -0500 received badge  Notable Question (source)
2017-05-31 15:14:06 -0500 received badge  Popular Question (source)
2016-01-21 04:26:50 -0500 received badge  Student (source)
2015-08-22 11:35:37 -0500 commented question Python import cv error on OpenCV 3.0.0 (no error for import cv2)

Sure, I will use something else . Thanks barak :)

2015-08-22 06:27:01 -0500 commented question Python import cv error on OpenCV 3.0.0 (no error for import cv2)

@berak is there a way I can use the RNG function with this setup? I am open to installing additional packages.

2015-08-21 11:22:27 -0500 asked a question Python import cv error on OpenCV 3.0.0 (no error for import cv2)

I am using a Windows 10 machine with Python 2.7.x and OpenCV 3.0.0 installed and both work fine. I followed the official link for installation of the same along with numpy and matplotlib. I get an error saying:

ImortError: No module named cv

when I try to run the following code:

import cv2
import numpy as np
import cv

def diceroll():
    rng = cv.RNG(np.random.randint(1,10000))
    print 'The outcome of the roll is:'
    print int(6*cv.RandReal(rng) + 1)
    return 

diceroll()

I have also tried using cv2.cv instead of cv(and not use import cv) but then I get an error saying:

AttributError: 'module' object has no attribute 'cv'

Implying cv2 does not have cv attribute. Is there a way I can get it to work? I have just followed the link given above and not appended any python path or set environment variables for openCV