I’ve been working with WCF in my new position at carefulproducts.com. I really like WCF and the new job. I’m reading this book about creating and using WCF RESTful implementations with .NET 3.5 SP1. I’m also new to Windows 7, skipped the Vista fun. For a while, I’ve been struggling on Windows 7 and especially its security. Why do they move everything with every release.??? Argh!!

I never really understood the uses of an application manifest file exactly, but this article really helped me get it at least for what I’m working on. Now I don’t have to keep punching holes into the firewall for my WCF hosting applications and figure out where they moved stuff in Windows 7…b**tards!

While I’m at it, I’ll put a plug in 😉 for this code project article. Anything to avoid learning IIS….again! Sorry, but I think I have Mono.

This weekend, I’m coding up what I call a RESTful Content Exchange Service (CES). What this service does, is provide access to and the ability to create remote ZIP files of content. Content being media files, software updates, etc… all balled up in zip files.


My 2nd Law of Vision is called Kenny’s Rule of Fist. It’s a pun on a rule of thumb, as each of my Laws of Vision really are. The idea behind the Rule of Fist is that vision systems can get difficult or complicated when the object being analyzed is larger than your fist. Again, as with the 3rd law, it means you may have to make special choices, play tricks, purchase expensive hardware, etc…

Why a fist?

Well you don’t want to cut off your thumb!

It’s because your fist is pretty big and the resolution in the standard camera is not that great, so as objects get bigger you can not evaluate things that are significant relative to human vision. When you want to look at things larger than your fist you will be looking at courser details or measurements.. People, or worse customers, ask “Why can’t it see that, it’s obviously wrong!”.

Objects being big also bring into play and can create parallax problems of z-order measurements as you have to move the camera toward and away from objects. In addition, they can also create distortion problems of the lens if you try to use wide angle lenses. One tool to help solve z-order parallax is a telecentric lens which is a really cool thing, but you have to get a really big and really expensive lens if the object is as big or bigger than your fist.

Objects larger than your fist can be problematic for machine vision system design. So always consider my 2nd law or the Rule of Fist.


My 3rd Law of Vision isn’t related to my current task, so I thought I would logically discuss it first…. huh? Yeah, that’s how my mind works, sorry.

The 3rd law is called Kenny’s Eye Rule. The idea behind it is that vision system can get difficult or complicated when the object(s) being analyzed are moving faster than the eye can see. By being difficult, it means you may have to make special choices, play tricks, purchase expensive hardware, etc…

Many people don’t realize it but our eyes cannot see things that have a periodic frequency of not much greater than 50 Hertz (Hz) or objects that move back and forth 50 times per second. It’s true! The video we watch typically comes at us in discrete or digital frames. It’s true, even if it’s an analog TV. You can see this with any TV/computer, where you can can get temporal aliasing. You know, that effect when it looks like spokes on a wheel are spinning backwards. This is our natural humanity given built-in 50Hz threshold and it’s why TVs and monitors run at, or better than that frame rate.

The original analog TV system didn’t. Those systems actually run at a 30Hz frame rate (US), which would be really annoying if they didn’t pull out a trick on us. What those tricky engineers did was transmit half of the picture, the so-called even lines, and then the odd lines of the frame. These are often called the old and even fields, but what it gives us a 60Hz field rate, which spatially tricks our eyes to not notice, as much, the 30Hz frame rate that would be bothersome. Good trick, smart guys.

Why the history? Well the tools we tend to use in machine vision are based on standard video cameras and thus that 30Hz frame rate sepratated by two fields. There are special cameras, but as you might suspect, they are expen$ive and we try to avoid them, if we can. Hell, if a $50 camera does the job, use it! Sometimes they don’t, so…..

That’s where Kenny’s Eye Law comes in. We most often use those cameras and thus are bound by their limitations of frame and field rate.

I developed Rule of Eye, when I was helping a client develop a system that inspected the top and inside sides of bottle caps in Italy. Yes, the bottle caps that seal the top of beer bottles and the like. This was about 15 years ago and those machines were a mechanical wonder for me. The machine formed these bottle caps from flat metal and applied the inner seal at >50 caps per second. At that speed, the caps look like a continuous piece of metal. This system had two cameras: one inspecting the printer on the top and one inspecting the ‘crowns’ or desired number of folds in the metal and the quality of the inner seal.

So, that system worked faster than a standard video camera of 30 frames per second. How did we do it? We used the reverse trick of the original TV engineers, we just used 1/2 of the image and we used both the even and odd halves. That way way we could capture 60 images per second with a standard camera. Pretty cool, eh!

Another system, I worked on for a client more recently (ah um 8 years ago?), was a adaptive mirror control system. This company’s product was used in fancy pants telescopes. Its clients including thos looking up into space, often scientists, and those looking down from space to earth, often the military or spies. The goal of the adaptive optical systems was to adjust and remove as much of the optical distortion caused by our atmosphere and produce a clearer image. Wow! Don’t ask me about the physics of it or the optical system worked. But, I was able to help with the machine vision task they needed to do.

What we needed to do was track a number of dots where each represented a mirror position in XY or tilt or distortion in this case. The first and primary system I worked on had 37 mirrors or dots across the field of view, each moving slightly betwen the frames of the images. To do the system’s job, we had to track each of those dot positions and feed the XY cordinates into it’s closed loop control system. That control system would calculate and set an adjustment of the tilt for each of the mirrors with every new image and new XY positions of the dots. To effectively manage this control system, they needed to track these positions at almost 1000 image per second. A kiloframe per second! (think Doc in Back to the Future) Huh, we can’t do that can we? Yup, but we had to buy a very expensive camera that could capture images at the rate.

Needless to say, I hope! Having a system that moves faster than your eye can see complicates the development of a machine vision system. That’s called Kenny’s Eye Rule and my 3rd Law of Vision.


Kenny’s Laws of Vision

31 January 2009

Years ago, 2 and 1/2 and since 1990, I developed many machine/computer vision applications for a number of clients and at some companies. Most of that work was for clients through my consulting company Imachines. This last week, as I noted before, I’ve rejoined with my past and I’ll be developing machine vision solutions again with carefulproducts.com.

During my career with vision, I developed what I affectionately called Kenny’s Laws of Vision. I have three that I remember:

  1. Kenny’s Law of Light
  2. Kenny’s Rule of Fist
  3. Kenny’s Eye Rule

I’ll describe my Laws of Vision (LOV, yes it’s sweet)  in more detail in future posts. Two have relevance to my current task and I’ll describe why I need to be careful at Careful Products. Sorry ;>)

Our goal at carefulproducts.com is a computer monitoring and social networking for seniors with a really easy to use gestured based touch screen system. It will provide tools for family and friends to keep in touch, communicate easily, schedule setting/monitoring and to monitor their meds compliance. Or as Amy at my Starbucks came up with when I described it, NanaNet.

We don’t want to have the computer decide about medication compliance, but we want to be able to communicate, (e.g. email, PicMsg, Facebook wall post, etc..) with concerned or interested parties images where they can determine whether or not the medication has been removed as well as their patterns of communication, etc…

More soon…



3 January 2009

Trying out animoto.com… Pretty fun! Here’s a little Holiday Card e-video that Liz and I did pretty quickly.

[clearspring_widget title=”Animoto.com” wid=”46928cc51133af17″ pid=”495f885843889c5d” width=”432″ height=”260″ domain=”widgets.clearspring.com”]

OSX in the Moonlight

17 December 2008


I’m pretty jazzed. I got up this morning and I decided to get up on running on OSX and developing with Silverlight, errr Moonlight?, and Mono. I’ve met my goals, so I’m off to get a coffee after putting this out.

This article made doing it very easy. But I’ve now modified and written simple .NET programs under Mono and MonoDevelop. MonoDevelop needs some work but the simple stuff I’ve done so far work. I’ve also modified some Moonlight programs and download and run some Silverlight stuff (duh!). Pretty cool all in all.

I’m now going to move on to installing the Expression software that I won at the MSDN Roadshow Monday in Waltham and says it runs on OSX. That should allow me to me to get more fancy with the lack of XAML tools in MonoDevelop or on OSX in general. In fact, with Expression & TextMate that I’ve been playing with too, this may be a great development platform for me.

Anyone know any TextMate plugins for XAML, Sliverlight, C#, etc…?


%d bloggers like this: