//图像显示privatestaticvoidshowImg(string w_name,Mat img,int flg=0){
Cv2.NamedWindow(w_name,0);
Cv2.ImShow(w_name, img);
Cv2.WaitKey(flg);}privatestaticvoidSubMat(){var src = Cv2.ImRead("./images/Lenna.png");if(src.Empty()){
Console.WriteLine("请检查图像输入!\n");}else{
Console.WriteLine("读取图像大小:["+ src.Rows +","+ src.Cols +"]");}showImg("src", src);// Assign small image to matvar small =newMat();
Cv2.Resize(src, small,newSize(100,100));
src[10,110,10,110]= small;showImg("src1", src);
src[370,470,400,500]= small.T();showImg("src2", src);// ↑ This is same as the following://small.T().CopyTo(src[370, 470, 400, 500]);// Get partial mat (similar to cvSetImageROI)Mat part = src[200,400,200,360];// Invert partial pixel values
Cv2.BitwiseNot(part, part);// Fill the region (50..100, 100..150) with color (128, 0, 0)
part = src.SubMat(50,100,400,450);
part.SetTo(128);using(newWindow("SubMat", src)){
Cv2.WaitKey();}
part.Dispose();}
近年来,VOLE(向量不经意线性评估)被用于构造各种高效安全多方计算协议,具有较低的通信复杂度。最近的CipherGPT则是基于VOLE对线性层进行计算。
1 VOLE总体设计
VOLE的功能如下,VOLE发送 Δ \Delta Δ和 b b b给send…