如何将图像存储到数组中 [英] how to store image in to an array

查看:99
本文介绍了如何将图像存储到数组中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hai,我的任务是通过局域网将实时视频从网络摄像头发送到多个客户端,
我正在使用UDP套接字(MFC)创建服务器和客户端.
我可以编写服务器和客户端
我怀疑如何将捕获的图像/视频存储到数组中.

hai, my task is to send a live video from web cam to multiple clients over a LAN ,
i am using UDP sockets(MFC) to creation of server and client.
i can write server and client
i have one doubt how to store captured image/video in to an array.

推荐答案

制作图像或视频数组?


1.使用Directshow或VideoForWindow(这是我最喜欢的一种)或网络摄像头中的任何其他第三方类来获取图像.
2.将您的BITMAP存储到任何BYTE * []或CHAR * []数组中
3.从服务器端抽出BYTE.
4.从接收器末端接收BYTE.
5.再次将其投放到BITMAP

注意:在传输BYTE时,最好编写自己的代码,这将确保起始n结束位并确认发送和接收的字节数相同,否则您将永远无法在接收方重现图像.
1. grabe your image using Directshow or VideoForWindow(this is my favorite one) or any other third party class from the web cam.
2. stored your BITMAP into any BYTE * [] or CHAR* [] array
3. Pump your BYTE from server ends.
4. Recieve your BYTE from the receiver ends.
5. Cast it again into BITMAP

NOTE: while transmitting BYTE its better to write your own code which will ensure the start-n-end bit & also verify number of Bytes send & received are same, else you will never be able to reproduce the image at receiver side.


这篇关于如何将图像存储到数组中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆