Martynas wrote:learningnewthings wrote:Hi
how to grab frames from the Getcurrentframe() on each Tick event and pass it to picturebox in order to let the picturebox show the stream image before capturing. Pls guide me ..... Thanks
Place a System.Windows.Forms.Timer component on your form. Rename it to 'timer'. Add the code below to your application.
- Code: Select all
private void timer_Tick(object sender, EventArgs e)
{
NImage image = camera.GetCurrentFrame();
picturebox.Image = image.ToBitmap();
}
nohopeliao wrote:Martynas wrote:learningnewthings wrote:Hi
how to grab frames from the Getcurrentframe() on each Tick event and pass it to picturebox in order to let the picturebox show the stream image before capturing. Pls guide me ..... Thanks
Place a System.Windows.Forms.Timer component on your form. Rename it to 'timer'. Add the code below to your application.
- Code: Select all
private void timer_Tick(object sender, EventArgs e)
{
NImage image = camera.GetCurrentFrame();
picturebox.Image = image.ToBitmap();
}
I have another question. I tired to follow your this method to grab a frame to the timer ticker but it prompt me this error:"The name 'camera' does not exist in the current context". I know is i never declare but may i ask how i can declare?
private void timer_Tick(object sender, EventArgs e)
{
CameraMan cameraMan = new CameraMan(null);
foreach (Camera camera in cameraMan.Cameras)
{
NImage testImg = camera.GetCurrentFrame();
pictBox.Image = testImg.ToBitmap();
}
}
NImage image = camera.GetCurrentFrame();
image.Save("D:\\MyFile\\Motion Detector\\Motion Detector\\bin\\Images\\1.jpg");
learningnewthings wrote:How i have to strat to learn the object ?Anyone can guide me pls
.....
String videoFileName = @"D:\MyFile\Motion Detector\Motion Detector\bin\Video\wallet.avi";
- $exception {"An error in one of Neurotec modules. Code: -1"} System.Exception {Neurotec.NException}
+ [Neurotec.NException] {"An error in one of Neurotec modules. Code: -1"} Neurotec.NException
+ Data {System.Collections.ListDictionaryInternal} System.Collections.IDictionary {System.Collections.ListDictionaryInternal}
HelpLink null string
+ InnerException null System.Exception
Message "An error in one of Neurotec modules. Code: -1" string
Source "Neurotec" string
StackTrace " bij Neurotec.NResult.RaiseError(Int32 error)\r\n bij Neurotec.NResult.Check(Int32 result)\r\n bij Neurotec.Video.NVideoReader.Create(String fileName)\r\n bij Neurotec.Video.NVideoReader..ctor(String fileName)\r\n bij Neurotec.Tutorials.Program.Main(String[] args) in C:\\Users\\Stijn Frima\\Downloads\\SentiSight_SDK_Trial\\SentiSight_2_0_SDK_Trial\\SE20Trial\\tutorials\\C#\\Separation\\Program.cs:regel 26" string
+ TargetSite {Void RaiseError(Int32)} System.Reflection.MethodBase {System.Reflection.RuntimeMethodInfo}
+ Static members
+ Non-Public members
Unable to find an entry point named 'SERecDetailsIsTracked' in DLL 'SentiSight.dll'.
learningnewthings wrote:Hi
Could anyone tell me what is this runtime error means when I debuge the recognition tutorial?Unable to find an entry point named 'SERecDetailsIsTracked' in DLL 'SentiSight.dll'.
Thank you
Best regards,
Povilas wrote:learningnewthings wrote:Hi
Could anyone tell me what is this runtime error means when I debuge the recognition tutorial?Unable to find an entry point named 'SERecDetailsIsTracked' in DLL 'SentiSight.dll'.
Thank you
Best regards,
What programming language are you using?
Assembly 'Neurotec.SentiSight, Version=2.0.0.2, Culture=neutral, PublicKey Token=ea4ecf06177ea613' uses 'Neurotec.Images, Version = 2.4.1.3, Culture=neutral, PublicKeyToken=ea4ecf06177ea613'which has a higher version than referenced assembly 'Neurotec.Images, Version = 2.4.1.2, Culture=neutral, PublicKeyToken=ea4ecf06177ea613'
My project requirement is to extract the information of any Objects that come into the background image.
I would like to know that is there any method to link between Seperation and Recognition?
One more question want to seek an advice is that is it possible to extract the Object from the Mask after Seperating the Background and Foreground? As I understand that "255" value in the grid place is the Object in the extracted mask, what is the method for extracting the Object from the Mask?
Martynas wrote:My project requirement is to extract the information of any Objects that come into the background image.
What information do you want to extract from the object?
The information like Position of the Object by mean of X and Y coordinate, Area or Size of the Object in pixel. Just want to know how far is the object and how big is the object.
I would like to know what is the purpose of the seperation Model for?
Coder wrote:How would I implement SEShape.PointCollection in C#.
I need guidance on how to initialize the class.
NImage Image, Temp;
NImage[] Mask = new NImage[1];
Image = NImage.FromFile(baseDirectory + Filenames[i]);
Temp = NImage.FromFile(baseDirectory + Filenames[i + 1]);
Mask[0] = NImage.FromImage(NPixelFormat.Grayscale, 0, Temp);
Temp.Dispose();
se.Learning.AddToModel(mdl, Image, Mask, null, out refIds);
Image.Dispose();
Mask[0].Dispose();
Win32 error in one of Neurotec modules. Code: -91
private void timer2_Tick(object sender, EventArgs e)
{
String[] Filenames = File.ReadAllLines(@"F:\fyp\done\List\background.seil");
String baseDirectory = @"F:\fyp\done\background\";
SentiSightEngine se = new SentiSightEngine();
uint[] refIds;
SEModel mdl = se.CreateModel();
String modelFile = @"F:\fyp.done\list\image.sem";
for (int i = 0; i < Filenames.Length; i + 1)
{
NImage Nbkground, NTemp;
NImage[] Mask = new NImage[1];
[color=#FF8000] Nbkground = NImage.FromFile(baseDirectory + Filenames[i++])[/color]
NTemp = NImage.FromFile(baseDirectory + Filenames[i++]);
Mask[0] = NImage.FromImage(NPixelFormat.Grayscale, 0, NTemp);
se.Learning.AddToModel(mdl, Nbkground , Mask, null, out refIds);
se.Learning.GeneralizeModel(mdl, 0);
byte[] Buffer = new byte[mdl.GetSize()];
mdl.Save(Buffer);
File.WriteAllBytes(modelFile, Buffer);
Nbkground.Dispose();
NTemp.Dispose();
Mask[0].Dispose();
mdl.Dispose();
se.Dispose();
..
Users browsing this forum: No registered users and 3 guests