I have two class Mainwindow and Mini_Screen which derive from Window class.i want to access image variable to another class and how video stream.here is the code
public partial class MainWindow : Window
{
public static Image<Bgr, Byte> contour_Frame;
public void Bu_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
FinalFrame = new VideoCaptureDevice(CaptureDevice[Camera_ComboBox.SelectedIndex].MonikerString);
FinalFrame.NewFrame += new NewFrameEventHandler(FinalFrame_NewFrame);
FinalFrame.Start();
}
void FinalFrame_NewFrame(object sender, NewFrameEventArgs eventArgs)
{
Imgbox1.Image = skin;
}
}
second class
public partial class Mini_Screen : Window
{
public Mini_Screen()
{ InitializeComponent();
Imgbox2.Image = MainWindow.emgu_img;
}
}
i did that but i just see one capture image in Imgbox2. I want video streaming like in imgbox1. Plz Help, i hope you understand my question
You don't say where you're instantiating your 2 screens from but as it's MainWindow I'll assume that Mini_Screen is instantiated there.
It's very simple to achieve with a Property.
Here's your adjusted MainWindow
Then your adjusted Mini_Screen
Now when the NewFrame event fires it will set the DisplayImage property to your new image which in turn will set the ImgBox2.Image to the generated image.