Merge pull request #21775 from luzpaz:typos/gapi
* GAPI: fix various gapi related typos Fixes source comments and documentation related to gapi code. * Fix source typos * Fixed typos requested * Follow-up typo fix
This commit is contained in:
@@ -218,7 +218,7 @@ def op(op_id, in_types, out_types):
|
||||
|
||||
for i, t in enumerate(out_types):
|
||||
if t not in [cv.GMat, cv.GScalar, *garray_types, *gopaque_types]:
|
||||
raise Exception('{} unsupported output type: {} in possition: {}'
|
||||
raise Exception('{} unsupported output type: {} in position: {}'
|
||||
.format(cls.__name__, t.__name__, i))
|
||||
|
||||
def on(*args):
|
||||
|
||||
@@ -701,7 +701,7 @@ static cv::GRunArgs run_py_kernel(cv::detail::PyObjectHolder kernel,
|
||||
PyErr_Clear();
|
||||
throw std::logic_error("Python kernel failed with error!");
|
||||
}
|
||||
// NB: In fact it's impossible situation, becase errors were handled above.
|
||||
// NB: In fact it's impossible situation, because errors were handled above.
|
||||
GAPI_Assert(result.get() && "Python kernel returned NULL!");
|
||||
|
||||
if (out_info.size() == 1)
|
||||
@@ -811,7 +811,7 @@ static GMetaArgs run_py_meta(cv::detail::PyObjectHolder out_meta,
|
||||
PyErr_Clear();
|
||||
throw std::logic_error("Python outMeta failed with error!");
|
||||
}
|
||||
// NB: In fact it's impossible situation, becase errors were handled above.
|
||||
// NB: In fact it's impossible situation, because errors were handled above.
|
||||
GAPI_Assert(result.get() && "Python outMeta returned NULL!");
|
||||
|
||||
out_metas = PyTuple_Check(result.get()) ? get_meta_args(result.get())
|
||||
|
||||
@@ -187,7 +187,7 @@ try:
|
||||
blockSize=block_sz,
|
||||
useHarrisDetector=use_harris_detector, k=k)
|
||||
# NB: The operation output is cv::GArray<cv::Pointf>, so it should be mapped
|
||||
# to python paramaters like this: [(1.2, 3.4), (5.2, 3.2)], because the cv::Point2f
|
||||
# to python parameters like this: [(1.2, 3.4), (5.2, 3.2)], because the cv::Point2f
|
||||
# according to opencv rules mapped to the tuple and cv::GArray<> mapped to the list.
|
||||
# OpenCV returns np.array with shape (n_features, 1, 2), so let's to convert it to list
|
||||
# tuples with size == n_features.
|
||||
@@ -203,7 +203,7 @@ try:
|
||||
|
||||
@staticmethod
|
||||
def outMeta(desc):
|
||||
raise NotImplementedError("outMeta isn't imlemented")
|
||||
raise NotImplementedError("outMeta isn't implemented")
|
||||
return Op
|
||||
|
||||
|
||||
@@ -605,7 +605,7 @@ try:
|
||||
img1 = np.array([1, 2, 3])
|
||||
|
||||
# FIXME: Cause Bad variant access.
|
||||
# Need to provide more descriptive error messsage.
|
||||
# Need to provide more descriptive error message.
|
||||
with self.assertRaises(Exception): comp.apply(cv.gin(img0, img1),
|
||||
args=cv.gapi.compile_args(
|
||||
cv.gapi.kernels(GAddImpl)))
|
||||
|
||||
@@ -454,7 +454,7 @@ try:
|
||||
else:
|
||||
raise unittest.SkipTest(str(e))
|
||||
except SystemError as e:
|
||||
raise unittest.SkipTest(str(e) + ", casued by " + str(e.__cause__))
|
||||
raise unittest.SkipTest(str(e) + ", caused by " + str(e.__cause__))
|
||||
|
||||
|
||||
def test_gst_multiple_sources(self):
|
||||
|
||||
Reference in New Issue
Block a user