private void button1_Click(object sender, EventArgs e)
{
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
pictureBox1.Image = Bitmap.FromFile(openFileDialog1.FileName);
org = (Bitmap)pictureBox1.Image.Clone();
}
}
private void button3_Click(object sender, EventArgs e)
{
if (saveFileDialog1.ShowDialog() == DialogResult.OK)
{
pictureBox1.Image.Save(saveFileDialog1.FileName);
}
}
private void button2_Click(object sender, EventArgs e)
{
Bitmap temp = (Bitmap)org.Clone();
ot.Convert2GrayScaleFast(temp);
int otsuThreshold= ot.getOtsuThreshold((Bitmap)temp);
ot.threshold(temp,otsuThreshold);
textBox1.Text = otsuThreshold.ToString();
pictureBox1.Image = temp;
//public Blob()
//{
using (IplImage img = new IplImage( [B][U]get the threshold image[/U][/B] , LoadMode.Color))
using (IplImage chB = new IplImage(img.Size, BitDepth.U8, 1))
using (IplImage labelImg = new IplImage(img.Size, CvBlobLib.DepthLabel, 1))
{
my problem is : i have an image in the picture box. when i push the button 2 i apply the function threshold and after that i want to apply function blob in threshold image without I step other button
the problem they is that I do not know that I will say to him get the picture that has become threshold and applied above in this other interelation. I thank for the answers.