using System;
using Emgu.CV;
using Emgu.CV.Structure;
using MPI;
namespace MPIHello
{
/// <summary>
/// 测试发送图像数据
/// </summary>
class TestSendImageProgram : IProgram
{
#region Implementation of IProgram
/// <summary>
/// 应用程序入口点
/// </summary>
/// <param name="args">入口参数</param>
public void Entrance(string[] args)
{
//初始化MPI运行环境
using (new MPI.Environment(ref args))
{
//获取Communicator
var comm = Communicator.world;
if (0 == comm.Rank)
{
var obj = new YFrame
{
Image = new Image<Bgr, byte>("1.jpg")
};
//令0进程发送数据然后接收数据
comm.Send(obj, 1
C#MPI 第三课 MPI 发送图像数据
最新推荐文章于 2021-05-22 05:16:11 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)