Program crahes when the function "cvCvtColor" is called (Bug #70)
Description
Program crahes when the function "cvCvtColor" is called. The crash occures only when we try to convert 3-channel image to 1-channel. Converting 3-channel to 3-channel works normally. This code crashes:
from opencv import cv from opencv import highgui as hg image=hg.cvLoadImage('D:\\system\\Desktop\\lena.jpg') gray=cv.cvCreateImage(cv.cvGetSize(image),8,1) print 1 cv.cvCvtColor(image,gray, cv.CV_RGB2GRAY) print 2
If we call this function in a new thread it works normally. But in WinXP this trick doesn@t work.
Following code doesn@t crash in Win Vista, but crashes in Win XP:
def track(): from opencv import cv from opencv import highgui as hg image=hg.cvLoadImage('D:\\system\\Desktop\\lena.jpg') gray=cv.cvCreateImage(cv.cvGetSize(image),8,1) print 1 cv.cvCvtColor(image,three, cv.CV_RGB2XYZ) print 2 if +name+ == '+main+': import threading p1=threading.Thread(target=track) p1.start()
Environment: OpenCV 2.0.0.a, Python 2.6, SWIG python bindings, 2 different mashines with Windows Vista Home Premium and Windows XP Pro SP3
Related issues
duplicated by Bug #80: Functions "CvtColor" and "Threshold" crash with the new p... | Cancelled |
Associated revisions
Merge pull request #70 from melody-rain:Added_perf_kalman_cpp
History
Updated by anonymous - about 15 years ago
Would you be able to try with the new Python bindings:
def track(): import cv image=cv.LoadImage('D:\\system\\Desktop\\lena.jpg') gray=cv.CreateImage(cv.GetSize(image),8,1) print 1 cv.CvtColor(image,three, cv.CV_RGB2XYZ) print 2 if +name+ == '+main+': import threading p1=threading.Thread(target=track) p1.start()
- Status deleted (
Open)
Updated by Илья Москвин about 15 years ago
We tried to use the new bindings, but symptoms with "CvtColor" are the same, and the majority of functions also don@t work properly as yet.
We are really sorry about our mistakes in code example. The seventh string in the second piece of code could look like this:
cv.CvtColor(image,gray, cv.CV_RGB2GRAY)
Convertion from RGB to XYZ and many other 3-channel formats always works properly.
Updated by James Bowman about 15 years ago
Please raise tickets for the functions in the Python API that don't work properly yet. Thanks.
Updated by Илья Москвин about 15 years ago
We actually saw, that functions "CvtColor", "Treshold" and "FindContours" don@t work. Also, in the Internet there are messages, that the new Python interface is immature. Of course, we will raise separate tickets for each unworking function, that we discover.
Updated by James Bowman about 15 years ago
Changing component to swig python.
suggest you switch to new bindings.
Updated by James Bowman about 15 years ago
Unclear who maintainer of swig bindings is. Assign to Vadim for triage.
Updated by Илья Москвин about 15 years ago
The new bindings after building them with MS C++VStudio are working properly, but we don@t know about the swig because we didn@t rebuild them with MSVS.
Updated by anonymous - over 14 years ago
P.S. I can't tell you how glad I am to now be able to compile OpenCV out of the box as x86_64 ... It was bugging me to have to use i386 because of Carbon. Now we get yummy, yummy Cocoa. :-)
Christian Louboutin|
Christian Louboutin boots|
Christian Louboutin discount|
Christian Louboutin boots|
owner changed from aatreya to vp153
Updated by Vadim Pisarevsky over 14 years ago
SWIG bindings are no longer supported. Use the new bindings, there cv.CvtColor works well.
- Status set to Done
- (deleted custom field) set to wontfix
Updated by Andrey Kamaev almost 13 years ago
- Status changed from Done to Cancelled
- Category set to python bindings