Applied Face Recognition

It’s time to roll up my sleeves to get my hands dirty with some native code.  I’ve got two ideas for applications of facial recognition, one for the desktop and the other for Windows Mobile.  I’ll need to take some time to plan these out, but these are my ideas…

Automatic Profiles

There was a time when my family members would use my computer and change my settings (Wall paper, resolution, sound scheme, and so on) and it would annoy me to no end. When Microsoft released Windows XP the problem was solved.  We had a much better implementation of user profiles that didn’t require any one to remember their user name and didn’t leave any one locked out if the previous user had forgotten to log out.  Many computers come with web cams, so why not use them to extend upon this concept.  Why cant the computer recognize who is sitting in front of it and act accordingly automatically changing profiles.

Where do I know that person from?

I encounter a lot of people that I don’t remember (I have a bad memory for faces).  Wouldn’t it be nice if I could point my camera phone at them and instantly get a reference to their name and face book profile?  All the technology and processing needed to do this exists today. Some one just needs to pull it all together.


Posts may contain products with affiliate links. When you make purchases using these links, we receive a small commission at no extra cost to you. Thank you for your support.

Mastodon: @j2inet@masto.ai
Instagram: @j2inet
Facebook: @j2inet
YouTube: @j2inet
Telegram: j2inet
Twitter: @j2inet

User Interface Metrics and Evil User Interfaces

I am finally no longer on a project that I really disliked.  I had been on the project for 5 months with my role being to configure the software to meet the user’s needs.  A huge task in this seemingly simple task was a lot of data entry; that could be entry of a user’s account information or population of a mirid of other tables and values requireed by the application.  The main problem was not so much in the volume of data that the system required but in the manner in which the system was designed to take the data. The system had a very poor user interface.  On example of where the interface failed was in the task of creating a user account.  After entering  a user’s name and moving to the next field I was immediatly prompted to save or discard that change.  Saving the change resulted in the user editor closing and I had to reopen it, find the user I was modifying, and change the next property and answer that prompt again.   I had to be able to convey the level of inefficiency of this interface to others on my team otherwise any slowness in completing a task could be percieved as being from an inadequacy on my part. 

To state “The interface in this system is bad, I don’t like it” may not be well received.  The statement sounds subjective and can be evaluated as nothing more than some one complaining.  To sufficiently communicate the state of the interface I needed to show that it was poor objectivly.  But a problem with user interface design is that much of it is performed subjectivly without much evaluation of the objective attributes of the interface.  I believe that part of this could be from people simply not knowing that there are objective evaluations for a User Interface.  There’s several methods of evaluating user interface efficiency.  I won’t bother to name them here, rather I will refer you to the book “The Humane Interface” written by Jef Raskin (the developer of he Macintosh interface, and the 31st employee of Apple Computer).   Raskin covers both interface metrics and his philosiphy when it comes to designing and comparing user interfaces. 

Being armed with this knowledge I was able to express with hard numbers the inefficiency of the user interface in this product and point out where the designers went wrong and show how it could have been improved.  While the developers of this product did not make the suggested improvements during my time on the project I was able to properly set expectations for completion.  That’s very important to me since meeting expectations is onf of the performance metrics by which I am measured. 


From the BlogEngine Archives

Posts may contain products with affiliate links. When you make purchases using these links, we receive a small commission at no extra cost to you. Thank you for your support.

Mastodon: @j2inet@masto.ai
Instagram: @j2inet
Facebook: @j2inet
YouTube: @j2inet
Telegram: j2inet
Twitter: @j2inet

Gavin Jacke’s HCCB Becomes Microsoft’s Tag

Gavin Jacke  is a Director of Engineering for Microsoft Research.  One of his inventions is the High Capacity Color Barcode. Microsoft’s applied this technology to a new Windows Mobile product called “Tag.”  In short a Tag is a color barcode that you can place on a product or in an ad, and some one with the client application on their phone can aim it at your tag to get referred to a website with more information, receive a vCard, or be connected to a phone number.  Pretty cool!


From the BlogEngine Archives

Posts may contain products with affiliate links. When you make purchases using these links, we receive a small commission at no extra cost to you. Thank you for your support.

Mastodon: @j2inet@masto.ai
Instagram: @j2inet
Facebook: @j2inet
YouTube: @j2inet
Telegram: j2inet
Twitter: @j2inet

HttpGet and Web Services

I was creatting a proxy to make use of the OpenCellID web services.  There is no WSDL available for the service so I decided to create a web services solution that had the same interface as the OpenCellID proxy and then use the WSDL that it generated as a starting point for a proper WSDL file (which for me was much less effort then creating the WSDL from nothing).  After creating the initial WSDL I tried to use the WSDL command line tool to create the proxy.  I specified HttpGet protocol and to my surprise I received an empty class file.  I tried again specifying SOAP as the protocol and it worked!  Why the difference in behaviour?  After attempting to solve this for a while without success I decided to post a question on the MSDN forums and quickly received an answer.

As it turns out by default HttpGet (and HttpPost) protocol are disabled for web .Net web services. To enable them you must add them as approved protocols in the web.config file.  After adding the appropriate section things worked like a charm.


        <protocols> 
            <add name="HttpGet"/> 
            <add name="HttpPost"/> 
        </protocols> 

From the BlogEngine Archives

Posts may contain products with affiliate links. When you make purchases using these links, we receive a small commission at no extra cost to you. Thank you for your support.

Mastodon: @j2inet@masto.ai
Instagram: @j2inet
Facebook: @j2inet
YouTube: @j2inet
Telegram: j2inet
Twitter: @j2inet

Google Goggles Available

Google Goggles was just made available through the Android application store. I decided to play with it last night using a few of the objects that I had laying in the house and I have to say that it’s pretty cool.


From the BlogEngine Archives

Posts may contain products with affiliate links. When you make purchases using these links, we receive a small commission at no extra cost to you. Thank you for your support.

Mastodon: @j2inet@masto.ai
Instagram: @j2inet
Facebook: @j2inet
YouTube: @j2inet
Telegram: j2inet
Twitter: @j2inet

Dare to Dream Different Contest

Microsoft is having yet another embeded development contest.  This ons is cenetered on the .Net Microframework.  For more details see the contest web site.  The contest has three phases with each phase eliminating contestants.

  • October 8 – December 15th : Present your idea
  • January 15 – May 15th : Build your idea
  • April 15 – May 31: Present your idea.

The final round sounds tough; has to be presented before a board of industry experts.  But if you survive the first round Microsoft will provide for you the hardware and the software that you need for the next round.  The prices are worth over $100k.  I don’t know what they are but if nothing else the community recognition would make the contest worth the effort.

 

 

Windows Mobile Licensing

I saw a posting on WMExperts.com about Microsoft’s licensing fees for Windows Mobile (the information cam from Reuters).  In short the posting said that Microsoft will continue to charge licensing fees for Windows Mobile and also brings attention to the functionality packaged with Windows Mobile that isn’t available with some of the free mobile operating systems.

  • Built-in Exchange push e-mail support.
  • Support for remote device management, application deployment and device policy management.
  • Support for full device encryption (including external memory cards).
  • Free sync with Windows Live Hotmail and Live Contacts.
  • Windows Live Search.
  • Live Messenger IM Client.
  • Software for simple Internet Sharing.
  • Office files reading and editing.
  • A pretty good e-mail application with built-in smart filtering search.
  • A pretty good Bluetooth stack.
  • Access to 18000 + applications already out in the market.
  • Support by carriers and a wide developer community.
  • Security certification by recognized accreditation bodies.
  • Indemnification for the technology used.

I hadn’t considered this before. but after reading it I have to wonder whether or not I should really consider the other OSes to be free.  I see quite a few features in the above that I would really hate to be without.

 

Cell Tower Rejection?

I make business trips to Scottsdale, Arizona about once ever two – three months.  When I came to Scottsdale on Monday I brought my AT&T Tilt (HTC TyTn II) with me.  This is the first 3G phone that I’ve owned.  The phone has been fitting my needs well for the past couple of months.  Before I got on the plane to Arizona I made a few phone calls, turned off the phone, and boarded the plane.  After landing my coworker and I caught a taxi to the hotel and I called home to let my family know that I had safely arrived.

Some time later I was looking at my phone and noticed it was searching for a signal.  It found one and showed 5 bars for about 15 seconds then went back to looking for a signal.  I watched it do this for about 30 minutes writing writing down the times the device went from having a tower fix to searching for a tower. It would get a fix 15 seconds after the devices clock changed to a time that had an even number for minutes.  In this state the device was almost useless; I could send a SMS as long as it was sent during this 20 second window, but I could do nothing more.

I spoke with AT&T and a representative told me the problem was with my SIM card and that the 64k AT&T SIM cards could not be used in 3G devices.  Not quite believing this I removed the SIM from the 3G data card for my laptop and saw it used the same type of SIM card.  I swapped the SIMs and found that the problem followed the phone and not the SIM.  After a lot of web research I found other customers that had experienced the same problem and some one pointed out that the problem was specific to phones acting in 3G mode. The theory was that some phones were being inexplicably rejected by some towers in 3G mode.

After hearing that I began searching for programs that I could use to disable the 3G mode in my phone and stubled on something I had seen a few weeks ago but had ignored. It is called CommMgrPro. I used the program to disable 3G mode depending on what tower the phone was connected to it afterwards I was able to make phone calls again.  I don’t have confidence in the theory I received from the AT&T rep about the problem being caused by the type of SIM card that I am using.  I can’t completely accept compromising the functionality of my phone as a solution to the problem.  I’ve forwarded the information I have on the problem to Mickey at The Cell Phone Junkie (http://thecellphonejunkie.com). He will be recording his next podcast on Sunday night and hopefully he will be able to give insight to the problem with his podcast is made available on Monday morning.

 

Microsoft’s Windows Mobile, Apple’s iPhone, and RIM’s Blackberry

In the past week I’ve seen several post on the MSDN Smart Device forums asking essentially the same question.  Some one has developed (or will develop) a program for one platform (Windows Mobile, Blackberry, iPhone) and wants to make the program run on the other.  I’ve answered the questions as I’ve encountered them, but since it is a frequent question I decided to write a post about it so that I can refer people back to an answer as the question comes up.

What is a Platform?

A platform is a collection of functionality along with the methods for accessing that functionality provided to support an application. Traditionally platforms have been viewed as a combination of hardware and software; a software application would require a certain software platform (the operating system) running on a certain hardware platform (the physical computer with a certain processor).  While that definition is still applicable presently we also have what would be considered pure software platforms; a developer targeting a browser can target a specific web standard as their platform with little to no concern for the hardware on which it is run.  It is important to also note that platforms can be layered; one platform can exists on top of another. For mobile devices I can name 5 platforms; Windows Mobile, iPhone OS X, Blackberry, Android, and Symbian.  As I type this

How do I make this program developed on platform X run on platform Y.

Unfortunately in most cases the answer to this question is “you don’t.”  You will need to rewrite your application for the other platforms on which you need for it to run. What’s the workaround for this?  Well, as I mentioned in my definition for a platform, “platforms can be layered; one platform can exists on top of another.”  If you have two dissimilar platforms and if those two platforms can support the same software platform then you can target that common platform and end up with a single application that runs on multiple platforms.

Web browsers are going to be the most common platform that you can target.  But browser applications have their limitations (those limitations are diminishing).  The two most populate virtual machine platforms are .Net and Java, but you will find that presently different devices have different levels of support for these two platforms.

So What are you Saying

After reading the above you should be able to infer what I am about to conclude.  IF you need to run a single application for multiple platforms make it a web app and adapt it to the browsers (or browser standards) that you wish to support.  If it absolutely has to be a native application then you will not be able to create a single application that runs on Windows Mobile, iPhone, Symbian, Blackberry, and OS X.

/www.j2i.net.html

 

.Net Micro Framework Development Board

The Windows Embeded Blog had a post about a .Net Micro framework development solution that cost under 100.00 USD. For the pricepoint and the functionality this is an incredible package!  I may have to pull out my notebooks for some of the automotive projects I wanted to do (I had been considering a Windows CE device for those projects but I think this package should be more than adaquate).  If you are interested you can grab one of these from GHI Electronics.

Update [2008-09-18 23:20 UTC] – feeling that this is such a power product I’ve already submitted an order for one for myself.

 

New Tilt Firmware Buggy?

The Tilt firmware update was welcomed with open arms.  I installed it, and after a few failed attempts I figured out how to prevent the bloatware from installing.   But the 6.1 firmware for the Tilt is not working as well as I had hoped.  The most annoying problem is that if the device is suspended for more than a certain amount of time upon turning it on the device turns off again.  I just found out that I am not the only one experiencing problems.  Over at Tilt Site (a subsite of the Mobility Site) users are reporting many of the same problems that I have experienced since the upgrade.  I’m not optimistic that another firmware update is forthcoming since AT&T must approve all firmware updates and they are planning to EOL (End of Life) the device. I may end up returning to the previous Windows Mobile 6.0 firmware image (so long threaded messages).

 

What Tools do I Need to Develop for Windows Mobile?

Several times in the past two weeks I’ve seen users on the MSDN forum ask what software tools are needed to develop for Windows Mobile.   It’s possible to develop for Windows Mobile devices using the .Net Compact Framework SDK and the command line compiler.  I would never suggest that some one do that; IDEs provide a much better debugging and development experience. The chart collowing this paragraph will let you know what versions of Visual Studio that you can use for each Windows Mobile and .Net version.  Note that no Visual Studio express version is lited here.

Visual Studio Version Supported Windows Mobile Versions
Visual Studio .Net 2003 Supports .Net Compact Framework 1.0 for Pocket PC 2002 and Windows Mobile 2003
Visual Studio 2005 Standard Edition or Better .Net 1.0 and .Net 2.0 from Windows Mobile 2003 to Windows Mobile 6
Visual Studio 2008 Professional .Net 2.0 and 3.5 from Windows Mobile 5 to Windows Mobile 6

Programs that you cannot presently use for Windows Mobile development include the express editions of Visual Studio and Visual Studio 2008 Standard.

 

SMS Economics

I was thinking of making a Windows Mobile multiplayer game using SMS.  One of the considerations is that not all of those playing will have an unlimited SMS plan so one must be thoughtful in minimizing the amount of SMS traffic that is generated by the game.

Let us assume for a moment that the 160 character limit is more than sufficient for transmitting all of the status information that needs to be known for the people playing in the game (I’t may not be, but I will address this later on. But ignore the message’s capacity for now).  One non-centralize method of ensuring that every one knows every one elses status is to have all the devices communicate with each other.  The number of messages needed to do this is dependent on the number of players.  Games ranging from 1 player to 5 players would require the following number of messages (note that the arrows represent a message being sent).

Number of Players Number of Messages Nodes and Arcs
1 0
2 2
3 6
4 12
5 20

The number of messages is increasing at a rather alarming rate. For n number of playeyers the number of messages needed can be calculated from the following equation.

Presently in the United States the price of a text message is 0.20 USD to 0.30 USD dependong on ones carrier.  I will use the midway point of 0.25 USD for calculating total cost.  Games written in this manner can quickly cost some one a significant amount of money.  When we calculate the total cost of these messages we must take into account that both the sender and the receiver of a message are charged.  So a message is collectivly costing the parties 0.50 USD.
Number of Players Cost of all messages
1 0.00 USD
2 1.00 USD
3 3.00 USD
4 6.00 USD
5 10.00 USD
6 15.00 USD
7 21.00 USD

At such an astronomical rate of cost growth the number of people allowed in a game will quickly become cost prohibitive. For a turned base game these would be the collective cost of each turn. A better model is needed.  Let’s consider a centralized model in which one player is designated the leader and all other players only communicate with the leader.  The leader will collect information from all players, accumulate it, then broadcast it to all players.

Number of Players Number of Messages Cost
1 0 0.00 USD
2 2 1.00 USD
3 6 3.00 USD
4 8 4.00 USD
5 10 5.00 USD
6 12 6.00 USD
7 14 7.00 USD

This organization looks deceptively better. The rate of growth for the messages is 2n and the total cost of the messages is n.Now if you consider the cost distribution you will see something unfair.  The leader takes on a large chunk of the cst.  50% of the cost to be exact.  Each one of the other players will only have a cost of 1.00 USD per turn.  Who would want to be leader under such an imbalanced Better balance may be achievable with a rotating leader assignment.

If the game being written for the phone is a turned based and thus the players are not taking their turns simultaneously then an even more economic SMS graph can be created.  Organize the players in a circuit.  Player one sends a message to player to, player to on to the next player, and continue this pathway until all players have received a message.  At the end of this pathway send a message back to player one. The cost per turn is finally capped!

Number of Players Messages Cost
1 0 0.00 USD
2 1 1.00 USD
3 1 1.00 USD
4 1 1.00 USD
5 1 1.00 USD
6 1 1.00 USD
7 1 1.00 USD

Notice that across all three models the communication in two player games is exactly the same.  For that reason I will suspend the idea of supporting more than two players (I may revisit it later).

I earlier mentioned that we are assuming that any data transmitted would fit in one message.  If we find that 2 or 3 messages are required to transmit a chunk of data then our message count and cost will increase linearly.  Being the last significant and the less complex part of the calculation I find it easier to leave that out until the end.

Next time around I will consider how much it cost to have a game with players that have no unlimited data plan.

 

Windows Mobile Current Directory

Another area when programming on Windows CE/Mobile devices is “How do I find the current directory?”  CE devices don’t have a concept of a current directory.  This means that relative paths don’t have meaning on a CE device (all paths are absolute).  Because of the lack or relative paths  some files (such as help files) are loaded to the Windows directory (personally I absolutely hate copying anything specific to an application to the Windows Directory).

It follows that since there is no concept of a current directory on a Windows Mobile device how would one locate a resource for which only a relative path is known?  A .Net program always has access to the modules of which it is composed (usually a .Net component is composed of one module packaged in a DLL or EXE file). The following line will return the absolute path to the currently executing assembly.

string modulePath = this.GetType().Assembly.GetModules()[0].FullyQualifiedName;

To get the absolute path to the folder that contains the assembly simple string manipulation is required.  The assembly name appears after the last directory seperator. While the directory seperator is usually the backslash (\) character, for better compatibility across other operating systems that may run .Net (ex: Mono[^] on Linux, OS X, or Solaris) use System.IO.Path.DirectorySeparator to represent the directory separator charactor.

string solutionFolder = modulePath.Substring(0, modulePath.LastIndexOf(Path.DirectorySeparatorChar) );

Once the folder to your program is known use Path.Combine to build the fully qualified file name for files in your folder.  Path.Combine takes into account the directory separator for the operating system on which your program is run.  So if you had data in a file named MyFile.txt you would use

string myFilePath = Path.Combine(solutionFolder,”MyFile.txt”);

Update 1 : I received a simpler way to accomplish the same thing from John Spraul in the comment section.  Thanks. John!

Update 2: If you are developing using the native APIS use the following:
GetModuleFileName(GetModuleHandle(NULL),    pszFullPath, MAX_PATH);

Path.GetDirectoryName(this.GetType().Assembly.GetModules()[0].FullyQualifiedName)

or

Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetModules()[0].FullyQualifiedName)

if you do not want to load the type.