Updates #2

Not much progress made today -
  • Tried SQL server compact edition (thought it might be a ripped of 3 MB edition of kam chalau SQL server), turned out something else, so back with SQL EXPRESS 2008 now.
  • Tested if the MDF database file can be accessed by ASP.NET and C# programs simultaneously - turned out that it is possible. Just have to take care of closing the connections after every small use.
  • Of course LINQ comes into picture here too, easing the access to data
  • Prabhat did major work with the Control module - is waiting for the database design to get over.
  • AVR-CDC came along with driver issues, we realized that people won't be dedicating a laptop for surveillance in most of the cases, so USB is out of question unless AVR-CDC works well.
  • If it doesn't - enter, parallel ports
  • Harsha got the Radar style motion detectors working... working on video writer too.
  • And, as I write, I feel like cooking some coffee and finishing the database and controllers by the time Prabhat wakes up.

Issues/Idea about threshold values

It seems we gotta decide how to go about fixing the threshold values for motion detection.
Some approaches -
  • Fix it, keep it constant -- doesn't give flexibility to the user
  • Let user select from
    • 3 levels of threshold, whatever suits best for the environment.
  • Let the user select from the 2
    • 3 levels, and also
    • provide advanced options, for geeks and interested beings to set it optimally for their workplace.
  • Or lets have
    • 3 levels of threshold for quick selection
    • an advanced option (slidebar/textbox) for advanced users to set it
    • A diagnostic style (question answer based) test to let user select the best
      Eg. asking the user to perform action, detect motion by increasing/decreasing the threshold on the basis of user feedback and fixing it as result of test
I believe 3rd option is good, but the 'question answer based' threshold fixing should be optional, same for 'advanced' option. Let the user see 3 levels of thresholds determined best by our experiments, by running the system under tubelight, window light, sunlight, evening, college etc.
And for seekers of perfection, the other 2 options.

Letme know your opinion over this...

just add comments / append this post

Screw Classical SQL, switch to LINQ to SQL

For SpaceLock's Web Interface, I've started using LINQ to SQL. LINQ stands for LanguageINtegratedQuery. You no longer put SQL queries into strings and drive them using various objects provided System.Data.sqlConnection. Instead, these queries become a part of your code itself. Yes, we're talking about integration as the name implies. Read more here to see how LINQ minimized the code and improved security.
While the listed code on the blog that uses classical SQL query is still vulnerable to lot of tricks.

Time for a break...

Finally the designing phase of web interface for SpaceLock is done...
Time for a short Anime break.... then probably some walk to stretch out...

Night is the time for Database and Controllers... Hope to work upon the M-Jpeg Streamer from tomorrow.

Adios

Wow that worked on IE6 on XP too



Testing a Web App on different environments is necessary. And I'm happy to announce that the design for SpaceLock's web interface looks ditto on a Windows XP machine with IE6. Here are the results-

Another section of Web Interface down the line

Settings is done... what remains is the Help section. Planning to build it later.
Todo :
  • database connectivity
  • controller codes
  • testing

Intrusions Archive interface


HTML/CSS design for Intrusions page done, now layout for Help and Settings page remains. Things are coming close to the powerpoint mockups.
After those 2, I can start planning the database and write controller snippets for Web Interface.

Header Comments for Code

Just remember to put down these comments on top of each CS, C, C++, JS, CSS, ASP files.

/*
_ _
| | | |
___ _ __ __ _ ___ ___| | ___ ___| | __
/ __| '_ \ / _` |/ __/ _ \ |/ _ \ / __| |/ /
\__ \ |_) | (_| | (_| __/ | (_) | (__| <
|___/ .__/ \__,_|\___\___|_|\___/ \___|_|\_\
| |
|_| Easy to Install, Affordable Surveillance System for everyone!

http://spacelock.madetokill.com
http://spacelock.blogspot.com

< Put Description here >
===================================================================================
*/

You can access it at - http://pastebin.ca/1370119

Control Interface Finished

Just got over with designing the Control Interface for SpaceLock.

Home section of Web Interface is done!

Things are in interface stage as of now... no logic/database implemented in background... just the interface in html/css

Web interface so far

Speed Issues with ASP.NET and firefox resolved

Had great troubles waiting to see outcome of changes on firefox while developing ASP.NET web app. Finally resolved it - http://ideamonk.blogspot.com/2009/03/speed-issues-with-aspnet-firefox.html

Updates #1

Allright, the full speed, full-time development period has started. We got some 6 great super-free days to work over the project. No worries of class tests, college and other projects. Give the best into this and soon we all would be gathered in a room to show a demo to the world.
lol.. cut the crap...
Here's the progress we made yesterday (very little)
  • Tested if two copies of Emgu CV based programs can acquire images simultaneously from the webcam. Nope, that doesn't happen. What it means is that we can't have 3 programs acquiring images form cam at same time and doing their own work. And, the solution now lies in grabbing a frame from webcam and giving it to 3 threads that would take care of
    • streaming it as m-jpeg
    • rotating cam by motion analysis
    • surveillance study
  • Started laying out some CSS and structure for the web interface. Blank templates done and main page after login has been started.
  • The other efforts went into exploring more C# for threading.
  • Godse started planning out what information to show up on the C# interface that runs on the system.
  • Harsha has bebun making an independent surveillance system using Emgu CV that would be submerged into the project later.
  • Sagi has decided onto what components to buy and would be starting soon with the rotatory mount

Today :
  • Hopefully as I jot these points at 6 AM, I think the HTML/CSS part of the Web Interface would be done by today.
  • And by today evening I would've started with programming controls and planning the SQL database.
  • Planning the database would become easier as by evening, completion of Views and Control Interface planning by Godse would leave me with enough inputs.
  • And of course I guess we all would start getting the clearer picture of the architecture and lot of doubts and interactions :)

Getting Compatibility of bits

I remember having a hard time fighting 64 and 32 bit issues while testing emgu.CV last month. Final conclusion was to recompile OpenCV for 64-bits and then we had class tests and T2 where this issue finally lost interest.
Well, it came up again today, when Harsha sent a compiled example from emgu.CV for test on Vista 64 bit. Ooops, 'This program has stopped working'. I tried getting the sample working on my system, but no success at all - frustation.
Google said many more are frustated like you :). And finally an article on Bytes opened my eyes into a simple oneliner -
Well, the Express Edition of Visual Studio 2008 doesn't let you choose the target platform for your build. What I mean here is that if you're on a 64 bit machine with Vista-64, you won't be finding any drop-down in Project Properties to help you change the target.
Jon Skeet [C# MVP] has an interesting solution:
In your .csproj file, just make somechanges as shown
<PlatformTargetelement >
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' ==
'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
>
That's all! for my version of VS2008 Express things look like this after the change-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>

Just below that, you've the configuration for Release version, add the PlatformTarget tag there too.


So, we would be maintaing all the modules of SpaceLock with x86 as target for now. Since the emgu & OpenCV binaries we have are in 32 bit, it would be wise and quicky to do this.

Looks like ASP.NET MVC was a good decision...

Finally ASP.NET MVC has been released as 1.0, no more Betas and "Baby" framework kind of image to this part of ASP.NET from now.

http://haacked.com/archive/2009/03/18/aspnet-mvc-rtw.aspx

Project SpaceLock - Architecture & Design

Check out this SlideShare Presentation:

The Beginning - Jan 20 2009

We've resolved almost all the issues we discussed on Jan 20 - 2009. I think once the architecture docs are done and read by everyone, the coding phase would be much smoother to proceed with. :)

SpaceLock Meetup - Plan 25 Jan 09

Guys remember this meet-up of 25 Jan ?! Just Looks how a month passed by in between and we hardly did anything to call solid development/coding... Lets get back on track after T2. All the best.

Mock-Ups for the web interface of Space Lock

Hi everyone!
I would be putting up the mock-ups of various sections of the web interface of Space Lock here. Any UX and UI tips are welcome. Do comment over / edit this for any feature that I missed. So here it is -



More coming soon...

The Next milestone - Project Design

We need to finish the project design by this Tuesday. Here's what we've gotta include in it -
  • Introduction
  • Solution Overview
  • Architectural Strategies
  • System Architecture
  • Detailed System Design
Classification
The kind of component, such as a subsystem, module, class, package, function, file, etc. ....
Definition
The specific purpose and semantic meaning of the component. This may need to refer back to the requirements specification.
Responsibilities
The primary responsibilities and/or behavior of this component. What does this component accomplish? What roles does it play? What kinds of services does it provide to its clients? For some components, this may need to refer back to the requirements specification.
Constraints
Any relevant assumptions, limitations, or constraints for this component. This can be derived from the Constraints section of the Project Planning template. However, you will have to map the constraints from that document to the exact module that is implementing or is being affected by the constraint.
Composition
A description of the use and meaning of the subcomponents that are a part of this component.
Uses/Interactions
Include the other components that his module interacts with and the components that this module is used by. Object-oriented designs should include a description of any known or anticipated subclasses, superclasses, and metaclasses.
Resources
A description of any and all resources that are managed, affected, or needed by this module such as memory, processors, printers, databases, or a software library.
Processing
A description of precisely how this components goes about performing the duties necessary to fulfill its responsibilities. This should encompass a description of any algorithms used; changes of state; relevant time or space complexity; concurrency; methods of creation, initialization, and cleanup; and handling of exceptional conditions.
Interfaces
The set of interfaces/services (resources, data, types, constants, subroutines, and exceptions) that are provided by this component. The precise definition or declaration of each such element should be present, along with comments or annotations describing the meanings of values, parameters, etc. .... This section can be provided in the code itself by providing adequate comments in the code. An advantage of providing this in the code is that most of the latest IDEs are able to use these comments to generate documentation files/help files saving the developer the trouble of developing and managing this.
Glossary
An ordered list of defined terms and concepts used throughout the document.
I think going through each part one by one would be great. So, lets have some discussion over the "Solution Overview" in next post...

Hello World!

Hi everyone, now whats this blog all about ?
Well its just another place where we would be keeping our unorganized thoughts, ideas and progress to let everyone know. Apart from one to one phone-calls and chats, we also need something more open as we stay far off and might not be able to meet so regularly.
Just accept the invitation and you too become authors in this blog.
Write anything you like... any comments welcome... this is sort of an incubator for ideas, a record of our progress n thoughts as we do the project.
Comments, criticism, brick-bats and flowers equally welcome.