Project

General

Profile

RCT Error Related to CV Module...

Added by Duncan Sousa over 7 years ago

Hi,

Our RCT bails with a CV module error on when the RCT node gets to the "CV-Stuff" line (see below). I'm hoping someone can help.

We tried recompiling OpenCV according to the following post and it didn't work.
https://emg.nysbc.org/boards/6/topics/2603?r=2604#message-2604
- The recompiled version uses numpy vrs 6 and other parts of our install use vrs 9.
- When I try testing 'detector = cv2.FeatureDetector_create("SIFT")' in python I still get the no attribute 'FeatureDetector_create' error using the newly compiled version.

Error occured on RCT node. Last operation was CV stuff.

Traceback (most recent call last):
File "/usr/local/myami/leginon/gui/wx/RasterFinder.py", line 219, in onTestButton
self.node.createRaster()
File "/usr/local/myami/leginon/rasterfinder.py", line 147, in createRaster
radians = math.pi * self.settings['raster angle'] / 180.0
TypeError: unsupported operand type(s) for *: 'float' and 'NoneType'
THRESH = 0 ============ CV stuff ============
tilt -17.9763046831
Exception in thread Thread-22:
Traceback (most recent call last):
File "/usr/lib64/python2.7/threading.py", line 811, in _bootstrap_inner
self.run()
File "/usr/lib64/python2.7/threading.py", line 764, in run
self.
_target(*self.__args, **self.__kwargs)
File "/usr/local/myami/leginon/targethandler.py", line 191, in queueProcessor
self.processTargetList(targetlist)
File "/usr/local/myami/leginon/rctacquisition.py", line 147, in processTargetList
tiltedtargetlist = self.tiltTargets(tilt0, tilt, tilt0targetlist)
File "/usr/local/myami/leginon/rctacquisition.py", line 254, in tiltTargets
matrix,tiltedimagedata = self.trackStage(image0, tilt0, tilt, tilt0targets)
File "/usr/local/myami/leginon/rctacquisition.py", line 403, in trackStage
result = self.runMatchImages(arrayold,arraynew)
File "/usr/local/myami/leginon/rctacquisition.py", line 299, in runMatchImages
result = openCVcaller.MatchImages(arrayold, arraynew)
File "/usr/local/myami/leginon/openCVcaller.py", line 86, in MatchImages
detector = cv2.FeatureDetector_create("SIFT")
AttributeError: 'module' object has no attribute 'FeatureDetector_create'


Replies (3)

RE: RCT Error Related to CV Module... - Added by Anchi Cheng over 7 years ago

Could you give the exact version of cv2, numpy ?

Found google search results referring cv 3.0 does not have SIFT. http://www.pyimagesearch.com/2015/07/16/where-did-sift-and-surf-go-in-opencv-3/
Is it possible that you are using cv3 ?

RE: RCT Error Related to CV Module... - Added by Duncan Sousa over 7 years ago

Thanks, that's probably it. cv2 versioning is somewhat confusing. What version of cv2 should I be using? cv2 version 2.4?

Current versions:
numpy version 1.9.1
cv2 version 3.2.0

RE: RCT Error Related to CV Module... - Added by Anchi Cheng almost 7 years ago

See Issue #5321 for a solution

    (1-3/3)