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, 0);
// receive th
C#MPI 第三课 MPI 发送图像数据
最新推荐文章于 2023-04-23 20:22:32 发布