Page 1 of 5

SentiSight SDK questions

PostPosted: Jun 05, 2009 01:10
by nohopeliao
hi everyone,

forgive me if you think i am asking a stupid question as i am using SentiSight for the first time.But can anyone tell me what is the link between SentiSight and C#? I sincerely need somebody to enlighten me. Thanks. :D

What is the folder name to start a SentiSight?"

PostPosted: Jun 08, 2009 10:03
by nohopeliao
hi all,

i had been a task to do a project by my supervisor to monitor and track motion object using SentiSight SDK. My supervisor just give me the SentiSight folder and tell me to work on it. But my problem is after i search the folder i can't open the application to sentisight. So i want to know what is the application name to open the SentiSight application? thanks a million. :D






with regards
Nohopeliao

Re: What is the relationship between SentiSight and C#?

PostPosted: Jun 09, 2009 07:47
by Martynas
nohopeliao wrote:hi everyone,

forgive me if you think i am asking a stupid question as i am using SentiSight for the first time.But can anyone tell me what is the link between SentiSight and C#? I sincerely need somebody to enlighten me. Thanks. :D


Hi,

If you need to use C# programming language to use SentiSight SDK you should use provided .Net wrappers. See the tutorials in tutorials\C# folder to see how it is done.

Re: What is the folder name to start a SentiSight?"

PostPosted: Jun 09, 2009 07:50
by Martynas
nohopeliao wrote:hi all,

i had been a task to do a project by my supervisor to monitor and track motion object using SentiSight SDK. My supervisor just give me the SentiSight folder and tell me to work on it. But my problem is after i search the folder i can't open the application to sentisight. So i want to know what is the application name to open the SentiSight application? thanks a million. :D

with regards
Nohopeliao


it depends what was given to you. If your supervisor gave you the whole downloaded SDK folder, then you should be able to run Sample application from the bin\win32_x86 folder, if you are Windows user. If you are receiving any errors, then, please provide more details on it or report them to support@neurotechnology.com.

Re: SentiSight SDK questions

PostPosted: Jun 10, 2009 07:20
by Sergey
Merged all SentiSight SDK topics into one.

SentiSight Tutorial

PostPosted: Jun 26, 2009 02:06
by nohopeliao
hi all,

Just want to check if anyone knows why when i open my SentiSight tutorial and debug it, it will just appear a black window screen for a few seconds and will auto stop degugging? Thank you. :D

Re: SentiSight Tutorial

PostPosted: Jun 26, 2009 06:09
by Martynas
nohopeliao wrote:hi all,

Just want to check if anyone knows why when i open my SentiSight tutorial and debug it, it will just appear a black window screen for a few seconds and will auto stop degugging? Thank you. :D


SentiSight tutorials are Console Applications. Some of them, as Camera Manager, require additional parameters to be passed during execution.

Stopping of debugging means that application finished its work. If you need, you can go through the tutorial step by step (F11 in Visual Studio) or you can set the breakpoint.

Required help for Final Year Project

PostPosted: Jun 26, 2009 06:56
by nohopeliao
Hi,

I had this final year project about tracking and monitoring of motion object using SentiSight SDK. How do i get about my webcam to detect foreign objects on a station view? Must i program it to let it learn what is the foreign object first then can detect or can i just let it detect the foreign object witthout learning? Help needed. Thank you.

Re: Required help for Final Year Project

PostPosted: Jun 26, 2009 07:03
by Martynas
nohopeliao wrote:I had this final year project about tracking and monitoring of motion object using SentiSight SDK. How do i get about my webcam to detect foreign objects on a station view? Must i program it to let it learn what is the foreign object first then can detect or can i just let it detect the foreign object witthout learning? Help needed. Thank you.


SentiSight SDK is able to recognize only learned objects. So if you need to recognize the object firstly it must be learned.

If you need to track and monitor people then you may need to use VeriLook Surveillance SDK.

Re: Required help for Final Year Project

PostPosted: Jun 26, 2009 08:06
by nohopeliao
Hi,

Firstly, thank for your reply. My first task is to program to let it detect foreign object and sound a alarm using SentSight first. So as you had said i will need to let it learn first then i can detect the object. So i tried to debug "SESample.vcproj" to learn the code from there. However, it appear a error of "fatal error C1083:Cannot open include file:'wx/wx.h':No such file or directory". I need to know what is this error and is it possible to get "SESample" code to be C# instead of C++? thank you.

Re: Required help for Final Year Project

PostPosted: Jun 26, 2009 08:41
by Martynas
nohopeliao wrote:Firstly, thank for your reply. My first task is to program to let it detect foreign object and sound a alarm using SentSight first. So as you had said i will need to let it learn first then i can detect the object. So i tried to debug "SESample.vcproj" to learn the code from there. However, it appear a error of "fatal error C1083:Cannot open include file:'wx/wx.h':No such file or directory". I need to know what is this error and is it possible to get "SESample" code to be C# instead of C++? thank you.


unfortunatelly there is no C# sample, only tutorials.

To be able to compile provided samples you have to use wxWidgets on your development computer. It can be downloaded from wxWidgets.org.

Re: SentiSight Tutorial

PostPosted: Jun 29, 2009 03:28
by nohopeliao
Hello

Martynas wrote:SentiSight tutorials are Console Applications. Some of them, as Camera Manager, require additional parameters to be passed during execution.


What do you mean by Console Applications? And what do you mean by additional parameters?

Re: Required help for Final Year Project

PostPosted: Jun 29, 2009 03:56
by nohopeliao
Hello,

Ihad tried to debug tuturial and it show this two error.:
Error 1: The type or namespace name 'Images' does not exist in the namespace 'Neurotec' (are you missing an assembly reference?)


Error :2 The type or namespace name 'Cameras' does not exist in the namespace 'Neurotec' (are you missing an assembly reference?)


May i know what are this two error and how can i solve it? Thanks a million. :D

Re: SentiSight Tutorial

PostPosted: Jun 29, 2009 07:51
by Martynas
nohopeliao wrote:What do you mean by Console Applications? And what do you mean by additional parameters?


Console Application definition can be found here.

Additional parameters are parameters that need to be passed while executing the console application. Example: "CameraManger.exe 15", where CameraManager.exe the name of the application executable, "15" is a parameter.

Re: Required help for Final Year Project

PostPosted: Jun 29, 2009 08:21
by Martynas
nohopeliao wrote:Ihad tried to debug tuturial and it show this two error.:
Error 1: The type or namespace name 'Images' does not exist in the namespace 'Neurotec' (are you missing an assembly reference?)


Error :2 The type or namespace name 'Cameras' does not exist in the namespace 'Neurotec' (are you missing an assembly reference?)


May i know what are this two error and how can i solve it? Thanks a million. :D


Check if Neurotec.Images.dll and Neurotec.Cameras.CameraMan.dll are referenced in the project.

Re: Required help for Final Year Project

PostPosted: Jun 30, 2009 04:17
by nohopeliao
Hello,

I tried and it work well. So my next question is how can i let NeruoTech SentiSight to detect my webcam? And allow it to do photo capturing and perhaps video recording? You have my million thanks.. :D

Re: SentiSight SDK questions

PostPosted: Jun 30, 2009 07:06
by Martynas
nohopeliao wrote:I tried and it work well. So my next question is how can i let NeruoTech SentiSight to detect my webcam? And allow it to do photo capturing and perhaps video recording? You have my million thanks.. :D


examine the CameraManager tutorial to see how the webcam is detected and the frames are read from it.

Re: SentiSight SDK questions

PostPosted: Jul 01, 2009 01:50
by nohopeliao
Hello,

Itried to add some reference like "CameraMan.dll" to my project but it gave me this error instead:

"A reference to 'D:\Motion Detector\Motion Detector\bin\CameraMan.dll' could not be added. Please make sure that is accessible, and that it is a valid assembly or COM component."


And some reference like "Neurotec.Cameras.CameraMan.dll" i can add to my project reference but when debugging, it gave me this error and this warning:

"Error 1: Assembly 'Neurotec.Cameras.CameraMan, Version=1.0.2.3, Culture=neutral, PublicKeyToken=ea4ecf06177ea613' uses 'Neurotec, Version=2.4.5.1, Culture=neutral, PublicKeyToken=ea4ecf06177ea613' which has a higher version than referenced assembly 'Neurotec, Version=2.4.1.1, Culture=neutral, PublicKeyToken=ea4ecf06177ea613'"


"Warning 2: Found conflicts between different versions of the same dependent assembly."


So i need your help for letting me know what are this error and warning and how can i solve. Once again thanks alot. :D

Re: SentiSight SDK questions

PostPosted: Jul 01, 2009 11:22
by Martynas
CameraMan.dll can not be referenced in .Net projects. Instead of it you should use Neurotec.Cameras.CameraMan.dll, which is .Net wrapper for CameraMan.dll.

The second message could be received if you are using dlls from different releases of SDK. If you have also installed other Neurotechnology SDKs on the same computer, it could be a situation that Neurotec.dll is loaded from another location. The best way to be sure that the right dll is used is to copy it to the same folder with the referneced dll.

Re: SentiSight SDK questions

PostPosted: Jul 07, 2009 08:21
by nohopeliao
Hello, I am currently trying to understand this code but there is one part that I don't understand. This is the code:


static void Usage()
{
Console.WriteLine("usage:");
Console.WriteLine("\tCameraManager [FrameCount]");
Console.WriteLine("");
Console.WriteLine("\t[FrameCount] - number of frames to capture from each camera to current directory.");
Console.WriteLine("");
}

static void Main(string[] args)
{
string description = ((AssemblyDescriptionAttribute)System.Reflection.Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyDescriptionAttribute), false)[0]).Description;
string version = FileVersionInfo.GetVersionInfo(System.Reflection.Assembly.GetExecutingAssembly().Location).FileVersion;
string copyright = ((AssemblyCopyrightAttribute)System.Reflection.Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false)[0]).Copyright;
Console.WriteLine("{0}, Version {1}, {2}", description, version, copyright);

if (args.Length < 1)
{
Usage();
}

int frameCount = 0;

if (args.Length >= 1)
{
frameCount = int.Parse(args[0]);
}


What is the "args" means and what does it do? Thanks. =)

Re: SentiSight SDK questions

PostPosted: Jul 07, 2009 08:31
by Martynas
Hi,

the answer is here.

Re: SentiSight SDK questions

PostPosted: Jul 10, 2009 08:39
by nohopeliao
Hi

I currently had encountered a problem is that i am unable to show my webcam on my picturebox. This is my code:

CameraMan cameraMan = new CameraMan(null);
foreach (Camera camera in cameraMan.Cameras)
{
CameraVideoFormat videoFormat = camera.VideoFormat;
camera.StartCapturing();
}


Thanks
:D

Re: SentiSight SDK questions

PostPosted: Jul 10, 2009 09:10
by Martynas
Hi,

have you noticed camera.GetCurrentFrame() in CameraManager tutorial. It returns NImage, which can be used to show in your picturebox.

Re: SentiSight SDK questions

PostPosted: Jul 14, 2009 08:28
by nohopeliao
Hi,

So how do i use NImage to allow it to show at my picturebox?

Re: SentiSight SDK questions

PostPosted: Jul 15, 2009 13:01
by Martynas
i.e.

Code: Select all

NImage testImg = camera.GetCurrentFrame();
pictureBox.Image = testImg.ToBitmap();


Re: SentiSight SDK questions

PostPosted: Jul 16, 2009 03:08
by nohopeliao
Hi

i manage to allow my picturebox to display a still image. However, i want it to have a video streaming before i capture my image. So how am i be able to do that?

Re: SentiSight SDK questions

PostPosted: Jul 16, 2009 07:01
by Martynas
Hello,

you should pass captured frames to picturebox constantly. You can use i.e. System.Windows.Form.Timer Tick event to grab a frame and to pass it to picture box.

Re: What is the relationship between SentiSight and C#?

PostPosted: Jul 17, 2009 03:50
by learningnewthings
Martynas wrote:
nohopeliao wrote:hi everyone,

forgive me if you think i am asking a stupid question as i am using SentiSight for the first time.But can anyone tell me what is the link between SentiSight and C#? I sincerely need somebody to enlighten me. Thanks. :D


Hi,

If you need to use C# programming language to use SentiSight SDK you should use provided .Net wrappers. See the tutorials in tutorials\C# folder to see how it is done.


Hi!

May I know what is mean .Net wrappers cuz i m a beginer in programming language. Can anyone tell me .. thx u

Re: SentiSight SDK questions

PostPosted: Jul 17, 2009 04:24
by nohopeliao
Martynas wrote:
you should pass captured frames to picturebox constantly. You can use i.e. System.Windows.Form.Timer Tick event to grab a frame and to pass it to picture box.


But if i want to use System.Windows.Form.Timer Tick event to pass captured frame to the picturebox constantly, how should i go about doing it?

Re: What is the relationship between SentiSight and C#?

PostPosted: Jul 17, 2009 08:08
by Martynas
learningnewthings wrote:
Hi!

May I know what is mean .Net wrappers cuz i m a beginer in programming language. Can anyone tell me .. thx u



Wrappers are used when it is need to adapt one API to another one. Neurotechnology SDK dlls are written in C language and to be able to use functions from it you need to wrap them. i.e. NImages.dll provides a functionalities to work with images. To be able to use these functionalities in C# you need to use a wrapper Neurotec.NImages.dll. For this you need to add a reference to this dll in C# project.

Re: SentiSight SDK questions

PostPosted: Jul 17, 2009 08:09
by Martynas
nohopeliao wrote:But if i want to use System.Windows.Form.Timer Tick event to pass captured frame to the picturebox constantly, how should i go about doing it?


Grab frames on each Tick event and pass it to picturebox.

Re: SentiSight SDK questions

PostPosted: Jul 20, 2009 05:59
by nohopeliao
Hi,

Why is there these error: "Access to path 'D:\' denied" when i use this code: "String[] Filenames = File.ReadAllLines(@"D:\");" from the Learning console application? How can i solve it?

Re: SentiSight SDK questions

PostPosted: Jul 20, 2009 07:21
by Martynas
Hi,

actually, this question is not related to Neurotechnology SDKs. Please, take a look to msdn.com to see that FileReadAllLines is for reading all the lines of the file, but not the directory.

Re: SentiSight SDK questions

PostPosted: Jul 20, 2009 07:44
by nohopeliao
Hi,

i have an enquire. Why my program will prom me this error: "One of Neurotec modules is not registered.Code:-200" after i executed this code: "SentiSightEngine se = new SentiSightEngine();".Lastly how do i solve it?
Thank you =)

Re: SentiSight SDK questions

PostPosted: Jul 20, 2009 07:57
by Martynas
Hello,

error -200 means that SDK components are not registered. Please use Activation Wizard and generate diagnostic info. Send this info to support@neurotechnology.com.

Re: SentiSight SDK questions

PostPosted: Jul 20, 2009 09:14
by nohopeliao
Hi,

i had activate the activatewizard and it run smoothly. but while it continue running, this error came out:"Win32 error in one of Neurotec modules.Code:-91". How do i solve it?

Re: SentiSight SDK questions

PostPosted: Jul 20, 2009 09:20
by Martynas
error -91 is related to non accesible file. Check if you pass a right file path to Neurotechnology function. By the way, which function throws this exception?

Re: SentiSight SDK questions

PostPosted: Jul 20, 2009 09:40
by nohopeliao
Hi,

I am sorry but where do i check if i pass the right file path to neurotechnology function? And the function that throws this exception is "Image = NImage.FromFile(baseDirectory + Filenames[i]);"

Re: SentiSight SDK questions

PostPosted: Jul 20, 2009 10:22
by Martynas
Check if the path "baseDirectory + Filenames[i]" is existing when you receive this error.

Re: SentiSight SDK questions

PostPosted: Jul 21, 2009 02:25
by nohopeliao
Hi,

i tried to made changes and it did not prompt me error:"Win32 error in one of Neurotec modules.Code:-91". However, it prompt me a new error after these function: "Image = NImage.FromFile(baseDirectory + Filenames[i]);" and the error is these:"Not supported functionality accessed in one of Neurotec modules.Code: -6". What does it mean and how to solve it?

Re: SentiSight SDK questions

PostPosted: Jul 21, 2009 02:54
by learningnewthings
hi

I received an error while debugging the CameraManager although i have added the Neurotec.Camera.CameraMan.dll in the references

error: Unable to load DLL 'CameraMan.dll': The specified module could not be found. (Exception from HRESULT:0X8007007E)


Anyone could guide me how to solve it. thank u :)

Re: SentiSight SDK questions

PostPosted: Jul 21, 2009 09:50
by learningnewthings
Hi!

Can it be cause error if the platform is not the same(examlple: CameraManger Tutorial's platform is Active(x86) but when i copy n paste the tutorial into a new project with the Platform:Active(Any CPU) ).

Because there's a msg pop-up when debug the step "CameraMan cameraMan = new CameraMan(null);", althuogh i have added the Neurotec.Camera.CameraMan.dll in the references .....

[quote][/quote]error: Unable to load DLL 'CameraMan.dll': The specified module could not be found. (Exception from HRESULT:0X8007007E)

Anyone can Pls guide me how to slove it . thank a lot :D

Best regards

Re: SentiSight SDK questions

PostPosted: Jul 21, 2009 10:39
by Martynas
nohopeliao wrote:Hi,

i tried to made changes and it did not prompt me error:"Win32 error in one of Neurotec modules.Code:-91". However, it prompt me a new error after these function: "Image = NImage.FromFile(baseDirectory + Filenames[i]);" and the error is these:"Not supported functionality accessed in one of Neurotec modules.Code: -6". What does it mean and how to solve it?


Maybe you a trying to load a wrong format image? Could you check it?

Re: SentiSight SDK questions

PostPosted: Jul 21, 2009 10:41
by Martynas
learningnewthings wrote:Hi!

Can it be cause error if the platform is not the same(examlple: CameraManger Tutorial's platform is Active(x86) but when i copy n paste the tutorial into a new project with the Platform:Active(Any CPU) ).

Because there's a msg pop-up when debug the step "CameraMan cameraMan = new CameraMan(null);", althuogh i have added the Neurotec.Camera.CameraMan.dll in the references .....

error: Unable to load DLL 'CameraMan.dll': The specified module could not be found. (Exception from HRESULT:0X8007007E)

Anyone can Pls guide me how to slove it . thank a lot :D

Best regards


Add the path to your SentiSight folder with dlls to PATH user environmental variable. Or just copy all dlls from SentiSght folder to the folder where your application resides.

Re: SentiSight SDK questions

PostPosted: Jul 22, 2009 08:03
by learningnewthings
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

Re: SentiSight SDK questions

PostPosted: Jul 22, 2009 08:32
by nohopeliao
Hi,

I don't think i got wrong. Anyway this is my code:

Code: Select all
String[] Filenames = File.ReadAllLines(@"..\Pic\List\Wallet.seil");
         String baseDirectory = @"..\..\Pic\Image\";
         SentiSightEngine se = new SentiSightEngine();
         uint[] refIds;
         SEModel mdl = se.CreateModel();

         for (int i = 0; i < Filenames.Length; i += 2)
        {
                 NImage Image, Temp;
                 NImage[] Mask = new NImage[1];
                 Image = NImage.FromFile(baseDirectory + Filenames[i]);
        }

Because
Code: Select all
String[] Filenames = File.ReadAllLines(@"..\Pic\List\Wallet.seil");
is read a 'seil' file of the object and
Code: Select all
String baseDirectory = @"..\..\Pic\Image\";
read 'jpg' file of the same object and
Code: Select all
Image = NImage.FromFile(baseDirectory + Filenames[i]);
is to form them to 'Image'. Is my understanding correct? or am i wrong with my explantion?


Best Regard
Nohopeliao

Re: SentiSight SDK questions

PostPosted: Jul 22, 2009 08:36
by Martynas
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();
      }

Re: SentiSight SDK questions

PostPosted: Jul 22, 2009 09:02
by Martynas
nohopeliao wrote:Hi,

I don't think i got wrong. Anyway this is my code:

Because
Code: Select all
String[] Filenames = File.ReadAllLines(@"..\Pic\List\Wallet.seil");
is read a 'seil' file of the object and
Code: Select all
String baseDirectory = @"..\..\Pic\Image\";
read 'jpg' file of the same object and
Code: Select all
Image = NImage.FromFile(baseDirectory + Filenames[i]);
is to form them to 'Image'. Is my understanding correct? or am i wrong with my explantion?


Best Regard
Nohopeliao


Please be sure that you pass an image to NImage.FromFile. Check in debug mode what exact file it was, when the error -6 is rised. As this error is rised with NImage.FromFile only when not an image file is sent to it.

Re: SentiSight SDK questions

PostPosted: Jul 23, 2009 06:06
by learningnewthings
Thanks a lot for the reply and guide ..... I have another question is when i try to debug the Recognition tutorial, the debugging stop at the step

NVideoReader boxVideoReader = new NVideoReader(videoFileName);

and jump to the exception and return the exception error message

An error in one of the Neurotec modules. Code: -1


what is that error mean? Thanks :D

Re: SentiSight SDK questions

PostPosted: Jul 23, 2009 06:24
by nohopeliao
Hi,

i had checked my code and it seems that this code:
Code: Select all
String[] Filenames = File.ReadAllLines(@"..\Pic\List\Wallet.seil");
give out an value of "{string[64]}". I suspect that it is this code that cause the program to prompt me the "error code: -6" after executing this code:
Code: Select all
Image = NImage.FromFile(baseDirectory + Filenames[i]);
Is my code given out the correct value?

best regards
Nohopeliao