79302322

Date: 2024-12-23 06:33:03
Score: 0.5
Natty:
Report link

The answer to your question is YES.

Given the example:

arr = [[x1, y1],
       [x2, y2],  
       [x3, y3]]
arr = np.array(arr, dtype='f4')
mat = arr[:, np.newaxis, :]

The resulting mat will be 3 rows, 1 column and 2 channels interpreted by OpenCV. The official numpy doc: Shape Manipulation explains more details.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: zhuoqiw