Comments (3)
Thanks for suggestion. That looks complicated, what about client, you have example of that? I wanted to switch html to draw images with WebGL by default (there is an option now), that would further complicate everything.
Also, what about CPU usage, that would probably increase it. I guess that in Go Image At() needs to be used to get RGBA values for the pixel etc.
from cam2ip.
It isnt really much complicated, it just looks that way because of c++ and opencv library. All you would have to do is have the ability to change the pixel values of a webgl frame(?, sorry i have no idea about webgl).
-
[Server]: Send the frame size first. store into ->fsize
-
[Server & Client]: First you would have a initial previous frame in both server and client, say an all black image of size fsize. Store into -> prev
-
[Server]: fetch next image. store into -> next
-
[Server]: get the difference in the previous one and and next. Store into -> diff
-
[Server]: Jpeg compress into a buffer. Store into -> jpegbuff
-
[Server]: Send jpegbuff to client
-
[Client]: receive jpegbuff. Sotre into -> jpegbuff
-
[Client]: uncompress jpegbuff. Store into -> diff
-
[Client]: Add diff to prev. -> Store in next
-
[Client]: next is the received frame, print it out in the browser.
-
Go to 2
CPU usage isnt a worry at all, in my case I have to do an extra 307, 200 integer operations (640x480). This is obviously really tiny compared to what modern computers can do. Lets assume that we have a computer with a clock rate of 1 mega hertz, that is 1, 000, 000 cycles per second, lets also assume this cpu takes 1 cycle to add a 32 bit integer( note we use 8 bit integer in our matrix, meaning ours should be faster), we still can compute the matrix values in 0.3 seconds( Note that even in 1990 cpu speeds were about 25 Mega hertz, meaning back then we could process this in 0.012 seconds).
In conclusion cpu usage is insignificant.
I am actually writing something really similar to your project, i will update with a link after november 14th ( I have my university exams until then)
from cam2ip.
@gen2brain The process for multiple clients is actually way more complicated, you need to keep the buffers in sync, I think this approach to save bandwidth is not worth the time. Closing this issue
from cam2ip.
Related Issues (20)
- Multiple cameras HOT 1
- Random crash on Mac OS after running few minutes HOT 5
- camera: no camera at index 0 HOT 1
- Password? HOT 1
- read: camera: can not grab frame: device or resource busy HOT 2
- audio HOT 1
- Goost lib? HOT 2
- Add ability to choose camera by ID HOT 2
- jpeglib.h: No such file or directory HOT 2
- delete pls
- Can't get higher than 5FPS HOT 7
- ERROR: SampleCB() - buffer sizes do not match HOT 1
- Cannot install using go get HOT 6
- cannot retreive frame : eof HOT 1
- Timestamp Scaling? HOT 2
- fatal error: jpeglib.h: No such file or directory - Windows 10 - How to install libjpeg-turbo HOT 11
- How to change index camera HOT 1
- fails to build on some architectures.. HOT 11
- socket: read: camera: invalid JPEG format: uninitialized Huffman table HOT 1
- New Builds on Releases? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cam2ip.