0

id like to make my movidius NCS1 read a IP camera. this is my code:

import cv2

#print("Before URL")
cap = cv2.VideoCapture('rtsp://admin:sphbr7410@192.168.240.151:554/cam/realmonitor?channel=1&subtype=0')
#print("After URL")

while True:

    #print('About to start the Read command')
    ret, frame = cap.read()
    #print('About to show frame of Video.')
    print(ret,frame)

    if cv2.waitKey(1) & 0xFF == ord('q'):
        break

cap.release()
cv2.destroyAllWindows()

but im my debug tests. i created a new user in my raspberry and installed the opencv for it using pip. i if run this code in this user that dont have openvino initialized it run fine. but in Openvino env it cant read the camera steam.

how to solve it?

Jasar Orion
  • 626
  • 7
  • 26

1 Answers1

0

Are you getting an "MFX can't initialize session error" while running with openvino environment?

OpenCV that comes with openvino is built with MFX enabled. MFX will be used for decoding your video frames. If you are able to decode frames in non-openvino environment, I would suggest you to disable MFX in openvino's opencv or uninstall opencv. In the setupvars file from intel/openvino/bin folder, you can change the opencv path to point to another installed opencv.

Rashmi T
  • 1
  • 1