Пример #1
0
def boundingRect(g_array):
    def custom_boundingRect_meta(array_desc):
        return cv.empty_gopaque_desc()

    op = cv.gapi_wip_op('custom.boundingRect', custom_boundingRect_meta,
                        g_array)
    return op.getGOpaque(cv.gapi.CV_RECT)
Пример #2
0
def split3(g_in):
    def custom_split3_meta(img_desc):
        out_desc = img_desc.withType(img_desc.depth, 1)
        return out_desc, out_desc, out_desc

    op = cv.gapi_wip_op('custom.split3', custom_split3_meta, g_in)

    ch1 = op.getGMat()
    ch2 = op.getGMat()
    ch3 = op.getGMat()

    return ch1, ch2, ch3
Пример #3
0
def goodFeaturesToTrack(g_in, max_corners, quality_lvl, min_distance, mask,
                        block_sz, use_harris_detector, k):
    def custom_goodFeaturesToTrack_meta(img_desc, max_corners, quality_lvl,
                                        min_distance, mask, block_sz,
                                        use_harris_detector, k):
        return cv.empty_array_desc()

    op = cv.gapi_wip_op('custom.goodFeaturesToTrack',
                        custom_goodFeaturesToTrack_meta, g_in, max_corners,
                        quality_lvl, min_distance, mask, block_sz,
                        use_harris_detector, k)
    return op.getGArray(cv.gapi.CV_POINT2F)
Пример #4
0
def add(g_in1, g_in2, dtype):
    def custom_add_meta(img_desc1, img_desc2, dtype):
        return img_desc1

    return cv.gapi_wip_op('custom.add', custom_add_meta, g_in1, g_in2,
                          dtype).getGMat()
Пример #5
0
def sizeR(g_rect):
    def custom_sizeR_meta(opaque_desc):
        return cv.empty_gopaque_desc()

    op = cv.gapi_wip_op('custom.sizeR', custom_sizeR_meta, g_rect)
    return op.getGOpaque(cv.gapi.CV_SIZE)
Пример #6
0
def size(g_in):
    def custom_size_meta(img_desc):
        return cv.empty_gopaque_desc()

    op = cv.gapi_wip_op('custom.size', custom_size_meta, g_in)
    return op.getGOpaque(cv.gapi.CV_SIZE)
Пример #7
0
def addC(g_in, g_sc, dtype):
    def custom_addC_meta(img_desc, sc_desc, dtype):
        return img_desc

    op = cv.gapi_wip_op('custom.addC', custom_addC_meta, g_in, g_sc, dtype)
    return op.getGMat()
Пример #8
0
def mean(g_in):
    def custom_mean_meta(img_desc):
        return cv.empty_scalar_desc()

    op = cv.gapi_wip_op('custom.mean', custom_mean_meta, g_in)
    return op.getGScalar()