c++ - OpenCV capturing desktop screen live -
i'm using opencv c++ coding project. i'm having difficulty of limitations in opencv, want analyse video file , observe objects. works perfectly, want analyse section of desktop screen. (live)
does have clue how accomplish this? thought of making webcam simulator captures desktop screen think thats way complicated , should much more easy.
if you're targeting windows os, alternative recommended engine seems ideal.
for linux ended using rtsp server(ffserver) videocapture input, screencasting using ffmpeg "x11grab".
ffmpeg windows take "screen-capture-recorder" application input, don't have experience setting rtsp server on windows.
for setup translated code looked this:
cv::videocapture cap; cap.open("http://localhost:8090/live.flv"); // open default photographic camera cap.set(cv_cap_prop_fourcc, cv_fourcc('f', 'l', 'v', '1'));
and
cv::resize(frame, frame, cv::size(200, 200)); cv::videowriter outstream("http://localhost:8090/feed2.ffm", cv_fourcc('f', 'l', 'v', '1'), 10, cv::size(200, 200), true);
the 200x200 resolution necessary minimize latency if can grab screen buffer straight avoid unnecessary screencasting/encoding sounds improve performance standpoint...
c++ opencv webcam
No comments:
Post a Comment