How to put frame from camera into imageBox
How to put frame from camera into imageBox
Hi, i've luckily added imageBox to my project. Now i want to put picture from jpg file put into imageBox when i click the button i put on the Form. Could somebody write me a sample code? Thanks in advance.
Re: How to put frame from camera into imageBox
On the Button Click Event, add the following code:
Code: Select all
myImageBox.Image = gcnew Image<Bgr, Byte>("MyImage.jpg");
Re: How to put frame from camera into imageBox
it doesn't work. I get 102 erors like:
error C3225: generic type argument for 'TColor' cannot be 'Emgu::CV::Bgr', it must be a value type or a handle to a reference type
error C3225: generic type argument for 'TColor' cannot be 'Emgu::CV::Bgr', it must be a value type or a handle to a reference type
Re: How to put frame from camera into imageBox
This is the syntax for Emgu CV 1.5, for version 1.4, do the following:myImageBox.Image = gcnew Image<Bgr, Byte>("MyImage.jpg");
Code: Select all
myImageBox.Image = gcnew Image<Bgr^, Byte>("MyImage.jpg");
Re: How to put frame from camera into imageBox
I can only put sometking like:
private: System::Void button3_Click(System::Object^ sender, System::EventArgs^ e) {
imageBox1->Image = gcnew Emgu::CV::Image<Bgr^,Byte>("test.jpg");
}
but it doesn't work either.
I can compile program but when i click button program breaks.
private: System::Void button3_Click(System::Object^ sender, System::EventArgs^ e) {
imageBox1->Image = gcnew Emgu::CV::Image<Bgr^,Byte>("test.jpg");
}
but it doesn't work either.
I can compile program but when i click button program breaks.