I have a feature map that is converted from a video frame. When I plot the feature map using OpenCV VideoWriter
. It doesn't write anything to video.
out = cv2.VideoWriter('out.mp4',cv2.VideoWriter_fourcc('M','J','P','G'),30, (width,height),True)
// width=1280,height=720
output=network.extract_output() # output from openvino inference nwtwotk of shape (1, 1, 1024, 2048)
output=cv2.resize(output[0][0], (width, height)) //output frame that I want to write to video file
plt.imshow(output)
plt.show()
But when I write the same frame to the video, it doesn't show anything.
out.write(output)