How to use methods for image processing

  • Thread starter Thread starter MustafaUysal
  • Start date Start date
M

MustafaUysal

Guest
Hi, i am new with c#

i created a class. It's name is filtreler. And i created a method in it which perfoms a filtering operation. I would like to call it from main function. But i don't know how should i call and return parameters.

Here is my method

public void meanfilter(Bitmap GirisResmi, Bitmap CikisResmi)
{


Color OkunanRenk;


int ResimGenisligi = GirisResmi.Width;
int ResimYuksekligi = GirisResmi.Height;


//some arithmetic operations


CikisResmi.SetPixel(x, y, Color.FromArgb(ortalamaR, ortalamaG, ortalamaB));


}
}



return;

}



and my main function

private void sliderKernel_MouseUp(object sender, MouseEventArgs e)
{
Filtreler f1 = new Filtreler();

Bitmap GirisResmi = new Bitmap(pBox_SOURCE.Image);
Bitmap CikisResmi= new Bitmap(GirisResmi.Width, GirisResmi.Height);

// CikisResmi = new Bitmap(pBox_PROCESSED.Image); //cikis resmine resim al
int SablonBoyutu = 5;

f1.meanfilter(GirisResmi,CikisResmi);

}
i don't know how to return image. Please help me

Continue reading...
 

Similar threads

Back
Top