GLBasic forum

Main forum => GLBasic - en => Topic started by: Marmor on 2022-May-29

Title: how to get the pic from my cam
Post by: Marmor on 2022-May-29

hi,
i bought a cheap sony cam from ebay in the hope i can get the picture from.

the url works in firefox and edge , "http://192.168.0.127/image?speed=20" - it call a javascript i think.

any tips?
Title: Re: how to get the pic from my cam
Post by: Schranz0r on 2022-May-31
OpenCV:

https://docs.opencv.org/4.x/d8/dfe/classcv_1_1VideoCapture.html

Small example:
https://www.opencv-srf.com/2017/12/play-video-from-file-or-camera.html
Title: Re: how to get the pic from my cam
Post by: Kitty Hello on 2022-Jun-01
You want that picture in glbasic? Try netgetweb (is it called that?) and print what you get. I guess it returns html code. See where ghe img tag points to and try netgetweb on that address again. It should be a jpeg.    Or, its a video. On windows, download ffmpeg and grab one frame to extract a jpg, then.
Title: Re: how to get the pic from my cam
Post by: dreamerman on 2022-Jun-02
First it depends what such call returns, is it html code with encoded image, raw jpeg or something.
Check 'programmer console/options/view' in your browser what does it do after going to this site, or use http debug tool/spy like Fiddler to get all needed info, as it may require to use some specific http headers to force some behavior. If you would need to get that image asynchronously best would be custom http handing code with network commands. If you would have any problems let us know.