using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using OpenCvSharp;
using OpenCvSharp.Extensions;
namespace WindowsFormsApp1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
Mat src = new Mat("buddle.bmp", ImreadModes.GrayScale);
Mat dst = new Mat();
Mat src1 =Cv2.ImRead("login.jpg", ImreadModes.GrayScale);
//pictureBoxIpl1.Load(src);
pictureBox1.Load("login.jpg");
pictureBox1.Image = BitmapConverter.ToBitmap(src);
Cv2.Threshold(src, dst, 120, 150, ThresholdTypes.Binary);
pictureBox1.Image = BitmapConverter.ToBitmap(dst);
using (new Window("s", dst)) ;
Cv2.WaitKey(0);
}
}
}