mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 23:33:05 +04:00
Merge branch 4.x
This commit is contained in:
@@ -470,6 +470,7 @@ public class Mat {
|
||||
* Element-wise multiplication with scale factor
|
||||
* @param m operand with with which to perform element-wise multiplication
|
||||
* @param scale scale factor
|
||||
* @return reference to a new Mat object
|
||||
*/
|
||||
public Mat mul(Mat m, double scale) {
|
||||
return new Mat(n_mul(nativeObj, m.nativeObj, scale));
|
||||
@@ -478,6 +479,7 @@ public class Mat {
|
||||
/**
|
||||
* Element-wise multiplication
|
||||
* @param m operand with with which to perform element-wise multiplication
|
||||
* @return reference to a new Mat object
|
||||
*/
|
||||
public Mat mul(Mat m) {
|
||||
return new Mat(n_mul(nativeObj, m.nativeObj));
|
||||
@@ -487,6 +489,7 @@ public class Mat {
|
||||
* Matrix multiplication
|
||||
* @param m operand with with which to perform matrix multiplication
|
||||
* @see Core#gemm(Mat, Mat, double, Mat, double, Mat, int)
|
||||
* @return reference to a new Mat object
|
||||
*/
|
||||
public Mat matMul(Mat m) {
|
||||
return new Mat(n_matMul(nativeObj, m.nativeObj));
|
||||
|
||||
@@ -1,12 +1,18 @@
|
||||
__all__ = []
|
||||
|
||||
import sys
|
||||
import numpy as np
|
||||
import cv2 as cv
|
||||
from typing import TYPE_CHECKING, Any
|
||||
|
||||
# Same as cv2.typing.NumPyArrayGeneric, but avoids circular dependencies
|
||||
if TYPE_CHECKING:
|
||||
_NumPyArrayGeneric = np.ndarray[Any, np.dtype[np.generic]]
|
||||
else:
|
||||
_NumPyArrayGeneric = np.ndarray
|
||||
|
||||
# NumPy documentation: https://numpy.org/doc/stable/user/basics.subclassing.html
|
||||
|
||||
class Mat(np.ndarray):
|
||||
class Mat(_NumPyArrayGeneric):
|
||||
'''
|
||||
cv.Mat wrapper for numpy array.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user