USB Camera?
#11
[quote pid="10450" dateline="1669142731"]
Quote:The only warning I can give with this code is that it captures a lossless file. So the file can get quite large if you let it run too long.

[/quote]


Thanks for letting me know about that.   


I'm actually only interested in capturing a single frame or image (maybe 1 per minute, roughly).   If modified, can this code work in that sort of way, or is it strictly a video capture?
Reply
#12
You should be able to modify it for snapping a photo only. I think when I first started working on that API, I started with capturing JPGs. I don't have that code now but I could look at this API some more this week, after Thanksgiving and Black Friday, and see if I can make a nice and stable capture for you.
Ask me about Windows API and maybe some Linux stuff
Reply
#13
Alternative...

1) Timer loops 60 seconds.
2) Windows API call to do a screen capture.
3) QB64 routine to save the image.

I suppose a QB64 / WIN API routine could monitor the PID of the webcam routine and if it no longer existed, exit the QB64 image capture loop. Maybe some more research would need to be done to determine if a webcam ap is active.

Pete
Reply
#14
No offense but I don't think that's a great alternative, Pete. It'd be better to just grab the frame straight from the camera rather than trying to do some screenshot of a program that shows the webcam. The code I have already grabs the raw frames. I just have to tweak the code to instead do the logic for a picture rather than a video.
Ask me about Windows API and maybe some Linux stuff
Reply
#15
(11-22-2022, 09:38 PM)Spriggsy Wrote: No offense but I don't think that's a great alternative, Pete. It'd be better to just grab the frame straight from the camera rather than trying to do some screenshot of a program that shows the webcam. The code I have already grabs the raw frames. I just have to tweak the code to instead do the logic for a picture rather than a video.

No offense? How do you ever expect to win an argument with no offense? Defense? Big Grin

I agree direct from the webcam is the better approach, and that's why I labeled it as an alternative instead of a better solution. As such, I sincerely doubt anyone other than the API King could code it, even with the code you already provided. (I love it when I post opinions and that guy Murphy shows up to prove me wrong). Anyway, that would also be a win all around, because I seldom stand on my ego... but my avatar does need to stand on a box, otherwise we just see a hat.

Pete
Reply
#16
Quote:You should be able to modify it for snapping a photo only. I think when I first started working on that API, I started with capturing JPGs. I don't have that code now but I could look at this API some more this week, after Thanksgiving and Black Friday, and see if I can make a nice and stable capture for you.


That would be incredible...thank you sir!
Reply




Users browsing this thread: 1 Guest(s)