Function Calchist In Opencv Crashing In Python On Mac
This is code # USAGE # python grayscale_histogram.py --image ../images/beach.png # Import the necessary packages from matplotlib import pyplot as plt import argparse import cv2 #
Solution 1:
I got the same error when using another function in openCV. I also got the error using the code in your post. openCV 3.0.0 did not work either, it gave me another type of error.
What finally worked was installing openCV through Anaconda. It still uses openCV 2.4.8 so maybe that was the solution.
First I unlinked openCV in brew: "brew unlink opencv"
Then installed the Anaconda package: http://continuum.io/downloads#all
Afterwards install openCV: "conda install opencv"
Finally, update numpy: "conda update numpy"
Solution 2:
I also needed to do a pip uninstall numpy
but also had to remove the numpy directories (specifically the f2py directories) in /usr/local/bin
and /usr/local/Cellar
.
After that I did a pip install numpy
and it works ok.
Post a Comment for "Function Calchist In Opencv Crashing In Python On Mac"