Problem while running cvGoodFeaturesToTrack

12 views
Skip to first unread message

karan

unread,
May 21, 2010, 4:25:39 AM5/21/10
to ctypes-opencv
Hi, I tried running cvgoodfeaturestotrack according to the format
given in the demo, but I got the following error:

OpenCV ERROR: Null pointer (NULL array pointer is passed)
in function cvGetMat, cxarray.cpp(2780)
Terminating the application...
called from cvUnregisterType, cxpersistence.cpp(4933)
Terminating the application...
called from cvUnregisterType, cxpersistence.cpp(4933)
Terminating the application...
called from cvUnregisterType, cxpersistence.cpp(4933)
Terminating the application...
called from cvUnregisterType, cxpersistence.cpp(4933)
Terminating the application...

What could be causing the problem?

--
You received this message because you are subscribed to the Google Groups "ctypes-opencv" group.
To post to this group, send email to ctypes...@googlegroups.com.
To unsubscribe from this group, send email to ctypes-openc...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ctypes-opencv?hl=en.

Dat Chu

unread,
May 21, 2010, 10:48:44 AM5/21/10
to ctypes...@googlegroups.com
Two things:
1- this is NOT the OpenCV C/C++ mailing list
2- Post your code.

Dat Chu

karanveer singh

unread,
May 21, 2010, 10:56:33 AM5/21/10
to ctypes...@googlegroups.com
I was actually using ctypes-opencv, not the c version.

Code:

from ctypes_opencv import *

imga = cvLoadImage('OpticalFlow0.jpg',CV_LOAD_IMAGE_GRAYSCALE)
imgb = cvLoadImage('OpticalFlow1.jpg',CV_LOAD_IMAGE_GRAYSCALE)
#img_sz = cvGetSize(imga)
img_sz = CvSize(640, 480)

win_size = 10
imgc = cvLoadImage('OpticalFlow1.jpg',CV_LOAD_IMAGE_UNCHANGED)

eig_image = cvCreateImage(img_sz, IPL_DEPTH_32F, 1)
tmp_image = cvCreateImage(img_sz, IPL_DEPTH_32F, 1)
corner_count = 500

cornersa = [[]]


cornersa[0] = cvGoodFeaturesToTrack(imga, eig_image, tmp_image, None,
corner_count, 0.01, 10)

print cornersa

Minh-Tri Pham

unread,
May 21, 2010, 3:30:28 PM5/21/10
to ctypes...@googlegroups.com
Hello Karan,

Sorry, I have been too busy as of late. As for your concern, may I suggest
you to upgrade from ctypes-opencv to PyOpenCV, and from OpenCV 1.x to OpenCV
2.x? The reason being that I have long switched to OpenCV 2.x and PyOpenCV.
My spare time is limited and thus I can't support both PyOpenCV and
ctypes-opencv at the same time.

Cheers,
Minh-Tri
Dr. Minh-Tri Pham
Research Fellow
Surrey Space Centre, University of Surrey, Guildford, GU2 7XH, UK
Mob: +44 (0) 778 774 1089 | Tel: +44 (0) 148 368 2224
Reply all
Reply to author
Forward
0 new messages