添加C#实现

This commit is contained in:
ShaoHua
2025-12-27 20:36:56 +08:00
parent a5303d6f3e
commit ce394c0646
21 changed files with 1312 additions and 0 deletions
@@ -0,0 +1,32 @@
using Com.Lmc.ShuiYin.One.Converter;
using Com.Lmc.ShuiYin.One.Util;
using OpenCvSharp;
namespace Com.Lmc.ShuiYin.One.Dencoder
{
public class Decoder
{
private Converter.Converter converter;
public Decoder(Converter.Converter converter)
{
this.converter = converter;
}
public Converter.Converter GetConverter()
{
return converter;
}
public void SetConverter(Converter.Converter converter)
{
this.converter = converter;
}
public void Decode(string image, string output)
{
// CV_8U is 0
Cv2.ImWrite(output, this.converter.ShowWatermark(this.converter.Start(Utils.Read(image, 0))));
}
}
}