[MacPorts] #58873: opencv 3.4.7 broken?
MacPorts
noreply at macports.org
Sat Aug 24 22:31:21 UTC 2019
#58873: opencv 3.4.7 broken?
---------------------------+----------------------
Reporter: renzresearch | Owner: (none)
Type: defect | Status: reopened
Priority: Normal | Milestone:
Component: ports | Version: 2.5.4
Resolution: | Keywords:
Port: opencv |
---------------------------+----------------------
Comment (by kencu):
So - I get the same.
This <https://answers.opencv.org/question/212409/error-in-
findtransformecc/> suggests you actually do need to pass all the
parameters, and can't skip them, when using python at least.
This version of your code doesn't generate a runtime error (but doesn't
actually compute out to a good answer, sorry):
{{{
#!/usr/bin/env python
import numpy, cv2
mode = cv2.MOTION_EUCLIDEAN
crit = (cv2.TERM_CRITERIA_EPS | cv2.TERM_CRITERIA_COUNT, 50, 0.001)
init = numpy.eye(2, 3, dtype = numpy.float32)
refe = numpy.ones([4, 5], dtype = numpy.float32)
move = numpy.ones([4, 5], dtype = numpy.float32)
cv2.findTransformECC(refe, move, init, mode, crit, None, 5)
}}}
gives:
{{{
$ ./testECC.py
Traceback (most recent call last):
File "./testECC.py", line 11, in <module>
cv2.findTransformECC(refe, move, init, mode, crit, None, 5)
cv2.error: OpenCV(3.4.7)
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_opencv/opencv/work/opencv-3.4.7/modules/video/src/ecc.cpp:557:
error: (-7:Iterations do not converge) NaN encountered. in function
'findTransformECC'
}}}
So -- looks like the function needs to have something sent along to it in
the 6 & 7 positions, and looks like the MacPorts implementation of
`opencv` is not actually broken.
--
Ticket URL: <https://trac.macports.org/ticket/58873#comment:11>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list