SentiSight SDK questions

General information about Neurotechnology and its software

Re: SentiSight SDK questions

Postby Martynas » Jul 23, 2009 06:27

Hi,

I do not know what you expecting from your code, but the NImage.FromFile is expecting the path to image file. i.e. you have an image in "C:\test\1.jpg", then NImage.FromFile should look like this: NImage.FromFile("C:\\test\\1.jpg");
Best regards,

Martynas
Software Consultant
Neurotechnology
Martynas
Neurotechnology
 
Posts: 2192
Joined: Sep 19, 2008 10:02
Location: Vilnius, Lithuania

Re: SentiSight SDK questions

Postby nohopeliao » Jul 24, 2009 00:59

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?
nohopeliao
 
Posts: 33
Joined: Jun 03, 2009 03:23

Re: SentiSight SDK questions

Postby learningnewthings » Jul 24, 2009 03:02

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?


you can add the code below. It will solve your problem.

Code: Select all
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();
            }
}
learningnewthings
 
Posts: 12
Joined: Jul 16, 2009 08:39

Re: SentiSight SDK questions

Postby Martynas » Jul 24, 2009 06:21

nohopeliao, use the code that is recommended by learningnewthings.

Just one notice: CameraMan initialization is quite long procedure, so it is better to declare it outside of the timer_Tick event.
Best regards,

Martynas
Software Consultant
Neurotechnology
Martynas
Neurotechnology
 
Posts: 2192
Joined: Sep 19, 2008 10:02
Location: Vilnius, Lithuania

Re: SentiSight SDK questions

Postby nohopeliao » Jul 24, 2009 07:02

Hi,

Ok. Thank you for you guy giving me tips and recommendation on how to do video streaming and display on my webcam as i finally success in it. However, i now want to snap a picture of my choice using webcam and save it under a folder that i name it. How should i go about it?




Best regards
Nohopeliao
nohopeliao
 
Posts: 33
Joined: Jun 03, 2009 03:23

Re: SentiSight SDK questions

Postby Martynas » Jul 24, 2009 07:09

Hi,

i.e. create a button which will execute GetCurrentFrame(). Get an NImage from it and save it to your selected destination by using NImage.Save().
Best regards,

Martynas
Software Consultant
Neurotechnology
Martynas
Neurotechnology
 
Posts: 2192
Joined: Sep 19, 2008 10:02
Location: Vilnius, Lithuania

Re: SentiSight SDK questions

Postby nohopeliao » Jul 24, 2009 08:31

Hi,

How to use "NImage.Save()"? Can show me how you use "NImage.Save()" if let say i want the picture to save to "D:\MyFile\Motion Detector\Motion Detector\bin\Images" ?

Thanks

Best regard
Nohopeliao
nohopeliao
 
Posts: 33
Joined: Jun 03, 2009 03:23

Re: SentiSight SDK questions

Postby Martynas » Jul 24, 2009 09:01

Hi,

actually SentiSight has a documentation, which has API reference. Here you can find a Chapter 7.3.1.4.1.10.1 NImage.Save Method (string) and Chapter 7.3.1.4.1.10.2 NImage.Save Method (string, NImageFormat). Have you tried to read a documentation? Also you can find how to save an NImage to file in 'CameraManager' tutorial... anyway, below you will find a part of code, which shows how to save an NImage to file:

Code: Select all
NImage image = camera.GetCurrentFrame();
image.Save("D:\\MyFile\\Motion Detector\\Motion Detector\\bin\\Images\\1.jpg");
Best regards,

Martynas
Software Consultant
Neurotechnology
Martynas
Neurotechnology
 
Posts: 2192
Joined: Sep 19, 2008 10:02
Location: Vilnius, Lithuania

Re: SentiSight SDK questions

Postby learningnewthings » Jul 27, 2009 09:15

Hi

Thanks for reply all of my question and guide me to get more understanding on how to use SentiSight SDK :D . May i know what kind of the file ".seil" is and how to create that kind of file?
How i have to strat to learn the object ? :? Anyone can guide me pls :?: .....

Best regards,
learningnewthings
learningnewthings
 
Posts: 12
Joined: Jul 16, 2009 08:39

Re: SentiSight SDK questions

Postby Martynas » Jul 27, 2009 12:11

Hi,

as File.ReadAllLines is used with text files, so it can be that this .seil file is plain text file with a list of images.
learningnewthings wrote:How i have to strat to learn the object ? :? Anyone can guide me pls :?: .....


All basic steps of a SentiSight are overviewed in tutorials.
Best regards,

Martynas
Software Consultant
Neurotechnology
Martynas
Neurotechnology
 
Posts: 2192
Joined: Sep 19, 2008 10:02
Location: Vilnius, Lithuania

Re: SentiSight SDK questions

Postby nohopeliao » Jul 29, 2009 01:51

Hi,

How do you save your captured ".jpg" picture file from your webcam into ".seil" file?


Best Regards
Nohopeliao
nohopeliao
 
Posts: 33
Joined: Jun 03, 2009 03:23

Re: SentiSight SDK questions

Postby Martynas » Jul 29, 2009 07:09

I am not sure, but may thoughts is that .seil file is just a list of files. It could be edited by hands or using any otyher third party applications. Also it is nowhere mentioned that this list is saved from webcam.

If you need to load all your saved images to list from directory, you can consider to use DirectoryInfo.GetFiles.
Best regards,

Martynas
Software Consultant
Neurotechnology
Martynas
Neurotechnology
 
Posts: 2192
Joined: Sep 19, 2008 10:02
Location: Vilnius, Lithuania

Re: SentiSight SDK questions

Postby nohopeliao » Jul 29, 2009 09:09

Hi,

Can you explain to me what this error is?

    Neurotec.NException:An error in one of Neurotec modules.Code:-1
    at Neurotec.NResult.RaiseError(Int32 error)
    at Neurotec.NResult.Check(Int32 result)
    at Neurotec.Video.NvideoReader.Create(String fileName)
    at Neurotec.Video.NvideoReader..ctor(String fileName)
    at Motion_Detector.Form1.btnrecognize_Click(Object sender, EventArgs e) in D:\MyFile\Motion Detector\Motion Detector\Form1.cs:line 243
nohopeliao
 
Posts: 33
Joined: Jun 03, 2009 03:23

Re: SentiSight SDK questions

Postby Martynas » Jul 29, 2009 09:19

Hi,

error -1 could point to various issues. So we need more details how to reproduce your issue.
Best regards,

Martynas
Software Consultant
Neurotechnology
Martynas
Neurotechnology
 
Posts: 2192
Joined: Sep 19, 2008 10:02
Location: Vilnius, Lithuania

Re: SentiSight SDK questions

Postby nohopeliao » Jul 30, 2009 01:31

Hi,

My error was cause by this line:
Code: Select all
String videoFileName = @"D:\MyFile\Motion Detector\Motion Detector\bin\Video\wallet.avi";
as i don't have the "avi" video format to sting to "videoFileName". So my question now is how do i create a "avi" video format file using SentiSight SDk?

Best Regards
Nohopeliao
nohopeliao
 
Posts: 33
Joined: Jun 03, 2009 03:23

Re: SentiSight SDK questions

Postby Martynas » Jul 30, 2009 06:54

Hi,

SentiSight does not have a functionality to create a video file. If you need some examples of avi files, they are available to download from our website.
Best regards,

Martynas
Software Consultant
Neurotechnology
Martynas
Neurotechnology
 
Posts: 2192
Joined: Sep 19, 2008 10:02
Location: Vilnius, Lithuania

Re: SentiSight SDK questions

Postby nohopeliao » Jul 31, 2009 01:28

Hi,

I had manage to create a "avi" video format file that recorded the same item that i learnt from my program using SentiSight. I realise that it still prompt me the same error. May i know why?
By the way, this is the code:
    Neurotec.NException:An error in one of Neurotec modules.Code:-1
    at Neurotec.NResult.RaiseError(Int32 error)
    at Neurotec.NResult.Check(Int32 result)
    at Neurotec.Video.NvideoReader.Create(String fileName)
    at Neurotec.Video.NvideoReader..ctor(String fileName)
    at Motion_Detector.Form1.btnrecognize_Click(Object sender, EventArgs e) in D:\MyFile\Motion Detector\Motion Detector\Form1.cs:line 243

Best Regards
Nohopeliao
nohopeliao
 
Posts: 33
Joined: Jun 03, 2009 03:23

Re: SentiSight SDK questions

Postby Martynas » Jul 31, 2009 06:32

Hi,

could you send a simple compiling application which will help us to reproduce this issue. Send this sample to support@neurotechnology.com with detailed description of the issue.
Best regards,

Martynas
Software Consultant
Neurotechnology
Martynas
Neurotechnology
 
Posts: 2192
Joined: Sep 19, 2008 10:02
Location: Vilnius, Lithuania

Re: SentiSight SDK questions

Postby nohopeliao » Jul 31, 2009 07:09

Hi,

Sorry but do you mean to send a copy of my code to support@neurotechnology.com to let them rectify the error?

Best Regards
Nohopeliao
nohopeliao
 
Posts: 33
Joined: Jun 03, 2009 03:23

Re: SentiSight SDK questions

Postby Martynas » Jul 31, 2009 07:15

Hi,

we do not need a full source of your code. We just need that you could write a very simple application which will reproduce your issue and send it to us for analysis, because the error you have posted is not common and we need to reproduce it.
Best regards,

Martynas
Software Consultant
Neurotechnology
Martynas
Neurotechnology
 
Posts: 2192
Joined: Sep 19, 2008 10:02
Location: Vilnius, Lithuania

Re: SentiSight SDK questions

Postby nohopeliao » Aug 07, 2009 06:11

Hi,

Is it possible to let the SDK recognize the object without having it to learn from "avi" video format file? As in can the SDK still able to recognize an object just by learning the object from multiple "jpg" picture format files?

Best Regards
Nohopeliao
nohopeliao
 
Posts: 33
Joined: Jun 03, 2009 03:23

Re: SentiSight SDK questions

Postby Martynas » Aug 07, 2009 07:36

Hi,

yes it is possible to learn object from the image file. It is even shown in the sample of SentiSight.
Best regards,

Martynas
Software Consultant
Neurotechnology
Martynas
Neurotechnology
 
Posts: 2192
Joined: Sep 19, 2008 10:02
Location: Vilnius, Lithuania

Re: SentiSight SDK questions

Postby nohopeliao » Aug 07, 2009 08:27

Hi,

Because as I look into the recognition tutorial, i realise that the program actually needs the help of both "jpg" picture format file and "avi" video format file to be able to recognize thing. So what I am trying to say is that is it possible to recognize the object just by the help of "jpg" picture format file?


Best Regards
Nohopeliao
nohopeliao
 
Posts: 33
Joined: Jun 03, 2009 03:23

Re: SentiSight SDK questions

Postby Martynas » Aug 07, 2009 08:30

Hi,

as I said in my previous post it is possible. Just start the SESample.exe, and you will see that it is possible to use an image for object learning. Also it is possible to use an image for object recognition.
Best regards,

Martynas
Software Consultant
Neurotechnology
Martynas
Neurotechnology
 
Posts: 2192
Joined: Sep 19, 2008 10:02
Location: Vilnius, Lithuania

Re: SentiSight SDK questions

Postby stijnfrima » Aug 09, 2009 10:58

I'm trying out sentisight SDK 30 days trial. When I was trying to run the c# Foreground/Background Separation tutorial, it gave me this exception: "An error in one of Neurotec modules. Code: -1".

I used the debugger to find out where it went wrong. With the step in and breakpoint functions of visual studio I saw that the exception was thrown after the line:

NVideoReader bgVideoReader = new NVideoReader(videoFileName);

So my guess is that the funcion NVideoReader is responsible.
I didn't change anything in the separation tutorial file. Although the tutorial solution was created in the previous version of visual studio, so Visual Studio converted the solution, so I was able to use it in Visual Studio 2008 express edition. I used the Data files for SentiSight Demo and SentiSight SDK Trial to feed to the program.

These are all the variables and the values from the exception.

Code: Select all
-      $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
stijnfrima
 
Posts: 3
Joined: Aug 09, 2009 10:21

Re: SentiSight SDK questions

Postby Martynas » Aug 10, 2009 08:21

Hi,

this error points to the problem when no codecs are installed on the computer. If the data file are used from the archive which is available on our website, then they are using "DivX" style codecs. So DivX codecs should be installed.
Best regards,

Martynas
Software Consultant
Neurotechnology
Martynas
Neurotechnology
 
Posts: 2192
Joined: Sep 19, 2008 10:02
Location: Vilnius, Lithuania

Re: SentiSight SDK questions

Postby stijnfrima » Aug 10, 2009 10:30

How do I install these codecs? I'm able to play the videos with the VCL player. Wouldn't that suggest that I already have the codecs?
stijnfrima
 
Posts: 3
Joined: Aug 09, 2009 10:21

Re: SentiSight SDK questions

Postby Martynas » Aug 10, 2009 11:21

If the video is opened with VLC, then it means that codecs are installed. Then it is possible that you are providing wrong path to NVideoReader. Please check that the file exists in the path you are providing to NVideoReader.
Best regards,

Martynas
Software Consultant
Neurotechnology
Martynas
Neurotechnology
 
Posts: 2192
Joined: Sep 19, 2008 10:02
Location: Vilnius, Lithuania

Re: SentiSight SDK questions

Postby stijnfrima » Aug 10, 2009 12:47

.
Last edited by stijnfrima on May 02, 2010 10:29, edited 1 time in total.
stijnfrima
 
Posts: 3
Joined: Aug 09, 2009 10:21

Re: SentiSight SDK questions

Postby Martynas » Aug 10, 2009 12:51

Send your issue detailled description along with sample source code, which could help to reproduce it, to support@neurotechnology.com.
Best regards,

Martynas
Software Consultant
Neurotechnology
Martynas
Neurotechnology
 
Posts: 2192
Joined: Sep 19, 2008 10:02
Location: Vilnius, Lithuania

Re: SentiSight SDK questions

Postby nohopeliao » Aug 14, 2009 06:55

Hi,

i need to know how to recognize the object that i learn. How do i allow SentiSight to recognize the object just by the help of "jpg" picture format file using C#? Can anyone guide me along? Thank you.

best regards
Nohopeliao
nohopeliao
 
Posts: 33
Joined: Jun 03, 2009 03:23

Re: SentiSight SDK questions

Postby nohopeliao » Aug 14, 2009 08:31

Is it possible for SentiSight SDK to recognize the background,holder and the object just by using ''sem'' file instead of using "avi" video format file?

Nohopeliao
nohopeliao
 
Posts: 33
Joined: Jun 03, 2009 03:23

Re: SentiSight SDK questions

Postby learningnewthings » Aug 21, 2009 02:34

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,
learningnewthings
 
Posts: 12
Joined: Jul 16, 2009 08:39

Re: SentiSight SDK questions

Postby Povilas » Aug 24, 2009 13:25

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?
Povilas
Neurotechnology
 
Posts: 25
Joined: Aug 13, 2009 14:17

Re: SentiSight SDK questions

Postby learningnewthings » Aug 26, 2009 01:52

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?


I am using C# language and runtime error occur when using the SERecognitionDetails.IsTracked property is used. Thank you for the reply. I have another question that is it possible to track out the object after seperation of Foreground and Background without learning the object? Thank you

Best regards,
learningnewthings
 
Posts: 12
Joined: Jul 16, 2009 08:39

Re: SentiSight SDK questions

Postby Martynas » Sep 07, 2009 11:35

Hello,

it is not possible to track the object without learning of it.

Regarding error message: the updated dll is sent to you by email.
Best regards,

Martynas
Software Consultant
Neurotechnology
Martynas
Neurotechnology
 
Posts: 2192
Joined: Sep 19, 2008 10:02
Location: Vilnius, Lithuania

Re: SentiSight SDK questions

Postby learningnewthings » Sep 10, 2009 02:47

Hello Martynas,

Thanks a lot for guiding me. I received the updated dll sent to me by email. But there is another Error when replaced the updated dll with the old one. The error is
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'


could you please send me all other sentisight updated dlls to match the version of the updated one. Thanks in advance.

Best regards,
learningnewthings
learningnewthings
 
Posts: 12
Joined: Jul 16, 2009 08:39

Extract Object Information with Sentisight SDK

Postby learningnewthings » Sep 22, 2009 01:48

Hi!

I am currently doing a project with Sentisight. 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? Hope can get advice from you as soon as possible. Thanks in advance.

Best Regards,
Learningnewthings
learningnewthings
 
Posts: 12
Joined: Jul 16, 2009 08:39

Re: SentiSight SDK questions

Postby Martynas » Sep 22, 2009 13:39

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?

I would like to know that is there any method to link between Seperation and Recognition?


There are no such methods.

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?


Mask does not contain the object. You can find in a documentation of SentiSight that “mask explicitly specifies which pixels of the image present the object and which ones background” – so it is not possible to get an object from mask.
Best regards,

Martynas
Software Consultant
Neurotechnology
Martynas
Neurotechnology
 
Posts: 2192
Joined: Sep 19, 2008 10:02
Location: Vilnius, Lithuania

Re: SentiSight SDK questions

Postby learningnewthings » Sep 23, 2009 04:28

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?


Thank you very much for your reply. 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? Any possible way to extract out the information of Any Object that come into the backgruond image without learning and recognition?

Hope can get some guide from you as soon as possible. Thanks in advance.

Best Regards,
learningnewthings
learningnewthings
 
Posts: 12
Joined: Jul 16, 2009 08:39

Re: SentiSight SDK questions

Postby Martynas » Sep 23, 2009 10:49

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.


It is not possible to get these properties in SentiSight, unless you will implement this by your self. For this you can use connected components to get object area or coordinates, or something else on mask. As SentiSight do not provide functionality to find connected components, it will not be discussed here. More information on connected components you can find here.

I would like to know what is the purpose of the seperation Model for?


Quote from documentation of SentiSight: In order to recognize an object in an image, the appearance of the object should be memorized. The process of memorizing an appearance of the object from images with various poses is called object learning. A set of images containing the object should be provided to the algorithm and the algorithm extracts so called model - a symbolic representation of the object. It is highly recommended to provide information about exact location of the object in the image. This can be done by the image with a mask of the object. Mask explicitly specifies which pixels of the image present the object and which ones background. Thus, only object specific information will be included into model template.
Best regards,

Martynas
Software Consultant
Neurotechnology
Martynas
Neurotechnology
 
Posts: 2192
Joined: Sep 19, 2008 10:02
Location: Vilnius, Lithuania

SentiSight

Postby Coder » Oct 20, 2009 05:59

How would I implement SEShape.PointCollection in C#.

I need guidance on how to initialize the class.
Coder
 
Posts: 1
Joined: Oct 19, 2009 11:58

Re: SentiSight

Postby Martynas » Oct 20, 2009 07:37

Coder wrote:How would I implement SEShape.PointCollection in C#.

I need guidance on how to initialize the class.


Answered by email. If someone else needs information on SEShape.PointCollection, please write to support@neurotechnology.com.
Best regards,

Martynas
Software Consultant
Neurotechnology
Martynas
Neurotechnology
 
Posts: 2192
Joined: Sep 19, 2008 10:02
Location: Vilnius, Lithuania

sentisight: image seperation

Postby hhanyuan » Mar 25, 2010 09:58

Hi,
i have problem trying to do image cropping, seperation and learning.
From the tutorials,i could not understand the codings .
would you give me some advise...
:?

Thanks and regards,
Alvin
hhanyuan
 
Posts: 9
Joined: Mar 24, 2010 01:58

Re: SentiSight SDK questions

Postby Martynas » Mar 26, 2010 07:47

Hello,

there is no tutorial "Image Cropping", did you mean the "ImageComparisson" tutorial?

What regards other tutorials, please specify what is not understandable in the coding.
Best regards,

Martynas
Software Consultant
Neurotechnology
Martynas
Neurotechnology
 
Posts: 2192
Joined: Sep 19, 2008 10:02
Location: Vilnius, Lithuania

Re: SentiSight SDK questions

Postby hhanyuan » Mar 29, 2010 06:57

Sorry,
Its image comparison. these are the parts that i don't understand:
Learning:
Code: Select all
 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();
hhanyuan
 
Posts: 9
Joined: Mar 24, 2010 01:58

Re: SentiSight SDK questions

Postby Martynas » Mar 30, 2010 14:46

Hello,

this tutorial shows how to separate foreground (an object) and background. Separation process is intended for automatic mask extraction of the object. More information about this process can be found in Section Foreground/Background Separation from Images in documentation.
Best regards,

Martynas
Software Consultant
Neurotechnology
Martynas
Neurotechnology
 
Posts: 2192
Joined: Sep 19, 2008 10:02
Location: Vilnius, Lithuania

Re: SentiSight SDK questions

Postby hhanyuan » Apr 06, 2010 09:07

hi,
i am having a error of -91.

Code: Select all
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();
..

i've tried my very best to solve this..
please advise me..

thanks and regards,
Alvin
hhanyuan
 
Posts: 9
Joined: Mar 24, 2010 01:58

Re: SentiSight SDK questions

Postby Martynas » Apr 06, 2010 09:51

Hello Alvin,

please check if the path to the file is correct and the file exists, which you are trying to load in the source code.
Best regards,

Martynas
Software Consultant
Neurotechnology
Martynas
Neurotechnology
 
Posts: 2192
Joined: Sep 19, 2008 10:02
Location: Vilnius, Lithuania

Re: SentiSight SDK questions

Postby hhanyuan » Apr 06, 2010 10:04

sorry,
i doubled check every path ..
is there anything wrong with my coding..

regards,
alvin
hhanyuan
 
Posts: 9
Joined: Mar 24, 2010 01:58

PreviousNext

Return to Public

Who is online

Users browsing this forum: No registered users and 3 guests