gblaha
unread,Nov 4, 2010, 5:43:30 PM11/4/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ctypes-opencv
Has anybody been successful in calling the cornerSubPix function? If
so, would you mind posting a code snippet that shows it in action?
I've tried the following without success:
from pyopencv import *
termCriteria = TermCriteria(3,30,0.1) #this works!
imGray = imread("chessBoard1.jpg",CV_LOAD_IMAGE_GRAYSCALE) #this
works!
found,corners = findChessboardCorners(imGray,Size(6,9)) #this works!
result =
cornerSubPix(imGray,corners,len(corners),Size(11,11),Size(-1,-1),termCriteria);
The exception that is raised on the final line reads:
Boost.Python.ArgumentError: Python argument types in
pyopencv.cv_hpp_ext.cornerSubPix(Mat, vector_Point2f, int, Size2i,
Size2i, TermCriteria)
did not match C++ signature:
cornerSubPix(cv::Mat image, std::vector<cv::Point_<float>,
std::allocator<cv::Point_<float> > > {lvalue} corners, cv::Size_<int>
winSize, cv::Size_<int> zeroZone, cv::TermCriteria criteria)
I'm quite new to the the pyopencv library and have zero experience
with Boost (have used SWIG in the past). My noob hunch is that the
{lvalue} for the returned sub-pixel corners is the issue with my
call. Thanks in advance for any help you can offer.