Category Archives: Technology

The global shutter camera arrived

The camera for the project Gene and I are working on arrived. It is pretty amazing. It cost literally 20% of the cost of what a camera with similar features would have cost only five years ago. I am dying to try it out, but in my normal bonehead manner of operation, I did not get the USB 3.0 cable I need to make it work. I was highly confident I had the right cable. It turns out I have a gazillion cables that are rapidly in the process of becoming obsolete and a gazillion more that ARE obsolete.

The value of a vision system

Yesterday I bought a machine vision camera for the project my buddy Gene and I are doing to build a (semi-)cheap little machine to inspect coffee beans. We need something called a global shutter camera because the beans will be in motion when we capture their images. In the past a camera like this would have cost in the $1000 range. Over the years they dropped to $300-$400. Yesterday, I paid $135 for this camera–quantity 1–and that included shipping. If this is coupled with a Raspberry Pi and OpenCV (~$200 with a power supply, heat sink, and other necessary stuff), it is possible to build a vision system that is faster (by a lot) and smarter (by a lot) than the vision systems we used to sell when I started at Intelledex in 1983 for $30k (~$74k in today’s dollars). The upshot is that it is now possible to do tasks for cheap that no one would have ever thought possible. There are large categories of machine vision problems that companies are accustomed to paying through the nose to solve. That is truly not necessary anymore if one is smart enough to put the pieces together. I hope we are smart enough.

Camera copy stand

A very cool new toy arrived at our door a couple of days ago. It is a camera copy stand that will hold a cellphone or other arbitrary item that fits a certain form factor. It will be invaluable in the bean sorting project, but I will be able to use it for a lot of other machine vision image capture testing tasks. We have made a lot of progress on the project and expect to start buying the actual cameras and lighting we hope to use within the next few weeks. The next difficult task is to drop the beans past a camera while we synchronize the capture and lighting of the scene so the bean is not blurry and we can see the surface of both sides very well. There are more tricky little things we need to do after that, but we cannot move forward until we know that is possible. As soon as that is figured out, I will see if Gene can help me set up a more permanent test fixture to systematically drop beans past the cameras so we can gather a test set from which to build a classifier.

Bob’s spotting scope

Bob lends us his spotting scopeThe last time Bob and Gena were here, Bob dropped off his spotting scope for us to try for a little while. We knew we had pretty bad optics on all our cameras, but now we are beginning to understand how bad they really are. The scope he brought by is nothing short of amazing and WAY too addictive. We have all been taking turns. Now if I could only figure out how to take a picture through the thing. I can hardly wait until the eagle comes back.

Sorting coffee beans

A cheap ring lightSome good news and some good news arrived yesterday. The first is that my participation in the sickle cell disease diagnostic project is wrapping up. I will still be on call for the machine vision elements of the project, but I will not be tasked with the day to day programming any longer. The second is a good friend (Gene C.) I have known since I was a child has agreed to work with me on a side project. We are going to make a “cheap but good” coffee bean inspection machine. There are lots of machines that do that, but none of them are particularly cheap in the way we want our machine to be cheap. We hope to do this for another friend who lives in Dallas.

Cheap back lightI bought two lights I plan to use for the project. One of them is a back light and one of them is a ring light. I am pretty sure we will not be able to use these in our finished instrument, but they will certainly help me with development of lighting and optics. I still need to buy (at least) a few m12 mount lenses and a cheap USB microscope. I already have a camera with the wrong lens, but it has allowed me to start writing the program I will use to do image processing and classification algorithm development. I got it to take pictures before I went to bed last night.

How to not be assimilated by the Borg–resistence is not futile

Brave browser (click here to go to their website)Google, in the minds of many, is pretty much the devil. I have started to come around to that opinion myself. There are lots of people who believe this. The problem is there has never really been any other option. After the most recent spate of ignorance and draconian overreach when Google fired a guy for expressing an idea that is objectively true, I decided to see if I could bail out of use of the Google search engine because, in my opinion, they censors what is good and true to promulgate evil. I found out that is kind of a hard thing to do. There are some searches for my work at which Google is better than anything else available. That led me to the idea that I need to minimize my Google searches to those for which there is no other alternative.

The good news is that I found a solution. I wrote earlier (here) about what I believe to be malfeasance on the part of Mozilla in their treatment of a very good man. That man, Brendan Eich, got fired from Mozilla for unconscionable pretexts. Because he believes in and supports “traditional marriage” (just marriage for non-double-speak people), he got fired from Mozilla. He immediately started a competing browser company named Brave. I tried that browser when it first came out, but it really was not ready for prime time. I tried it again today because I was so feed up with Google and Mozilla and I have to say that if it is not yet ready for prime time, it is very, very close. In addition, they have a way to set my browser (I use DuckDuckGo to avoid Google for the vast bulk of my searches) and Google only for those where it works best–stuff where they cannot impose their extreme hard left-wing bias. Brave facilitates all of this and I am grateful. Check it out. Don’t get swallowed by the Borg.

Breaking down and buying binoculars

Nikon D90 in bonus roomWe found the power cable to the charger for Christian’s Nikon D90 Camera. We set it up to take pictures of stuff going on in the yard, the area just above the Chehalis river, the town behind it, the hills behind that, and finally Mount Rainier behind that. We cannot see the river, but that draws a ton of wildlife so we absolutely benefit from its presence. We kind of have not figured out the camera yet, but eventually I will find the time to figure it out and start to take some photos.

We had a long talk with Christian about which zoom lens we should get.

He said, “What do you want to do with it?”

We said, “We want to take pictures of the mountain, stuff like deer, flowers, and birds in the yard, and birds like the bald eagle that was on the tree by the river yesterday morning.”

We got it all figured out, but we cannot afford it all for awhile, so in the meantime, I bought some binoculars with image and video capture capability. I am sure they are not great, but they are much better than what we have now and we can just use them as binoculars. Here is what we are getting. I will leave you with one more deer picture we took at dinnertime out on the deck this afternoon.

Deer in the back yard

Woo-hoo! We have Internet, it is good, and I am saying that non-ironically

DSL modemThe internet came up today. Based on my previous experience with DSL, I have to admit I was stunned the whole process was so painless and even inexpensive. We plugged it in, filled in a few lines on the screen, set up the wireless router part of the whole deal and were up and running. Not only that, I checked the upload and download speeds and they were as advertised. I was pretty sad because we do not have access to cable internet on our property. We are not so far from town, but in a little pocket where it almost certainly does not pay to run the cable out here. I should have known that since the many years that have passed since we previously had DSL, they have gotten their act together. I know some of the speed and quality issues have to do with how close one is located to a hub and we are pretty close so that might be why everything works so well. On the other hand, we ARE close. That was a dodged bullet.

Cheap cameras used for unintended purposes

Cheapy USB camerasI will have one more work week in Texas after today. I enjoy my job and the people where I work a lot and it was agonizing to turn in my notice. Part of the job I love the most is the requirement to create sophisticated machine vision and video analytics applications with cheap USB cameras and ARM embedded computers that run embedded Linux, usually Debian. We prototype a lot of the stuff on Raspberry Pi’s which is great because there is such a big user community it is easy to quickly get answers about just about anything. There are four cameras in the article accompanying this post that range in value between $20 and $50.

All of the cameras work just fine right out of the box for the purpose for which they were design–that is generally streaming video with camera controlling the capture gain and offset. Conversely, it reduces the repeatability and precision of most machine vision application if the offset, gain and lighting controls are not managed by the application. So, it has been part of my job to dive into the driver code far enough to figure out how to set the registers that need to be set to control cheap cameras well enough to work in accord with the stringent requirements of many machine vision applications. That takes a lot of patience and, although it is not exactly rocket science, it is very rewarding when the last piece of minutiae is chased down and the stuffs starts working.

One thing I have learned is that this “big data” thing is here to stay, at least in my world of machine vision, embedded computing and video analytics. There are tons of things you can almost do deterministically that become tractable when enough data and machine learning are thrown at them. I am loving working with Weka and R and the machine learning functionality in the OpenCV library because they open up new vistas, not to mention I can more frequently say, “I think I can do that” and not squint my eyes and wonder whether I am lying.

Device arrived for my project (not my day job)

Case for for medical diagnostic deviceThis ruggedized case and computer came in the mail yesterday. If is for the project to drive cost out of the diagnosis of blood pathologies that often occur in certain developing parts of the world. This is just a prototype, but for a prototype, it is very impressive. I am looking forward to firing the thing up. I am at least a week or two from being able to do that because of everything else on our plates. My hope is to eventually be able to replace the laptop computer with an embedded computer like a Raspberry Pi or one of its more industrial strength cousins.

Uber’s self driving car rolls in front of Christian’s house

Uber's self-driving car wrecked flipped right in front of where Christian livesChristian sent us this article about how Uber has suspended all use of their self-driving cars. It is literally right in front of where Christian lives. He said it would even be possible to see the street sign of the street name where he lives if it had not been stolen by thugs. Actually, it is a pretty great place for a college student–half a block from the light rail that picks him up and drops him off in front of the building where he works at Arizona State. I told him I would probably hold off on using Uber self-driving cars for awhile. Come to think of it, when they end the suspension, it might not be that safe to walk to the train anymore.

Cool job: Linux, Yeti cups and thermal cameras

I love my job. That is not an unusual thing. I think I have written here on this blog about how Grandpa Milo’s frequently reminded us we might as well love our jobs because we have to go do it whether we love it or not anyway and its corollary with food that we were going to eat it and we were going to like it whether we liked it or not. My current job, however, is not one that is hard to love. Yesterday, one of the VP’s walked into my office (an office with a door!!!) and saw I had one of the old stainless steel cups with the company logo (the one on the left in the photo with the blue top).

He said, “Man, you don’t have a YETI cup yet.”

I did not realize that YETI products were a thing, but I really like the new cup he gave me (the one on the right with the YETI logo at the top). I have to admit I was pretty happy with my original blue-topped cup, but now I am doubly happy.

xubuntu logoAt the bottom of the picture, there is a camouflage thing that looks a lot like a cellphone. That is a Seek thermal camera. It is interesting, fun anddebian logo I get to work with it to do cool stuff in my day to day job. I have not run a Windows computer at my work since I started as everything I develop is for use on a Debian embedded system. I am doing some Windows develop as part of my contribution to the CWRU sickle cell disease diagnosis project, but I do all my development for that project just like I do for my day job, on a Xubuntu box. The sickle cell stuff will eventually go onto a Raspberry Pi so I am doing the development cross platform and building installers for both Windows computers and Ubuntu/Debian computers.

It is truly a gift to love your job and my current job is not like pulling green chain at the mill, I do not have to force myself to do it.

Working on sickle cell disease

sickle cell disease vision softwareThis weekend, I put the final touches on the prototype/demo version of the sickle cell disease software I am developing for Case Western Reserve University and HemexHealth. It will be demonstrated to potential partners in this week. I am not sure how much longer I will be needed for this project other than some tweaks to make it work better and easier to use, but it has been one of the most gratifying projects on which I have ever worked. It has huge potential to do good. I hope I get the opportunity to do more projects like this again in my lifetime.

Another whirlwind trip to Washington

Lorena at McDonaldsLorena took me to McDonald’s early this morning then dropped me off at the airport. If all goes well, I will have a look at our (hopefully) new house along with my real estate agent and my builder (thank you Mark P. for driving up from Oregon). Then I will get on a plane at midnight and arrive back in Dallas just in time to go to work on Tuesday morning when we are going to make the first major new installation of some machine vision/machine learning/video analytics software.

In the mean time, the working I am doing on finding low cost new methods to diagnose sickle cell disease in developing countries is getting to a critical juncture. I need to put some finishing touches on the work I am doing on that project so they can start real tests. I will have to work on that on the airplane ride to Seattle and in the hotel room so I can deliver it to the team that needs it at Case Western Reserve University in Cleveland. Thankfully, that is something that can be done by email and dropbox.

A great video on one of the great sadnesses of our times

I saw the video below that a friend posted this video on Facebook last night about challenges for millennials in the workplace. I think it says some important things that has caused me to think I need to work on some of my own behaviors.  He talks about addiction to social media–on cell phones in particular and the dopamine high that is triggered. He talks about what a great disservice it was to tell children they were great when they were not great. He talks about the idea of delayed gratification that seems to be completely missing in an entire generation of young people. He talks about the increase in suicide and accidental drug overdose in that generation that is most probably a result of this. I think he is exactly right on all that. The video is truly a worth 15 minutes of your time.

It was kind of depressing though that in about the last third of the video he espouses the idea that the corporations need to take responsibility for fixing this. That is a completely different subject, but he is objectively wrong on that. The corporations might need to address the issues associated with this large problem because it prevents them from finding good, long term employees that facilitate them meeting achieving their purpose–to make money. Corporations should not be tasked with social engineering. They should, like government, achieve their purposes without meddling in peoples’ in areas where they are so patently unqualified. They really, really have competing interests with respect to what is good for individuals and that is not necessarily a bad thing. The individuals themselves, their families and, most importantly, God and their spiritual communities are the only ones who have the truly worthwhile answers to these kinds of challenges. Disinterested third parties whether they are government school teachers, coaches, bureaucrats, academics and even bad parents are the ones who trained them in this wrong thinking in the first place.

Link to video on Millenials in the workplace

A weekend with the Raspberry Pi

11.4 of 60

This weekend, I am finally getting to the place where I will be able to work on some of my side projects. I have decided to put a system together to do the things I normally have to do for small, cheap control projects. I did a drawing for one of the people I am helping so he can show people how we plan to make things easy to use in addition to making them work well at a cheap price. The idea is to put a framework together that runs on a Raspberry Pi. The Raspberry Pi runs as a secure server that can be accessed via a secure web browser either locally or over the internet to control hardware and execute machine vision tasks. I have done a lot of work on this already, but now I have a first “real” application that will provide the incentive to turn it all into a commercial quality, reusable framework. This could be used for the medical device apps I am working on as well as some side projects I use as to learn new stuff. Should be fun.

Raspberry Pi control system

Sickle cell disease diagnosis project

HemexHealth sickle cell Anemia diagnosis deviceDown 7.4 of 60

After things started to settle down a little in our lives since the funeral, I had been trying to figure out what to do next. The folks were gone and the kids are on their own and are way too low maintenance for our taste (still going through withdrawal from their going off to college three years ago). Fortunately, I was recently selected to help a group of researchers at Case Western Reserve University and a company named HemexHealth develop a product with an incredible social mission. I really do not know much about how it all works (after all, I type for a living), but the product is designed to rapidly and inexpensively diagnosis sickle cell disease. I DO know how to do my part of the product and am thankful for the opportunity to contribute to such a noble endeavor.

It is going to be a ton of work, but this is exactly the type of project I love. If this is not a good hobby project, I do not know what is. The other thing it will do is take up enough time that maybe Lorena will fill some modicum of guilt about browbeating me into exercising so much. “It’s for a good cause honey and you know I program better with a belly full of biscuits and gravy!”

Christian gets a Google Pixel phone

Christian gets a new Google Pixel cellphoneChristian uses his phone so much for the stuff he does at school that after two and a half years with his Samsung Note 4, he about wore it out. He wanted to get a new one, but the deals are so bad at Sprint these days for decent smart phones–about all they have available for a reasonable price are iphones, but who in their right mind would want one of those–that he decided to get the Google Pixel phone because he had heard good things about. The first thing he found was that, while the back camera is just awesome, the selfie camera is really pretty mediocre (see the picture below). The screen is great and the phone does everything he wants it toChristian's first (and probably only) selfie on his new Google Pixel phone do (which for him is a lot), but the main feature is that the phone is not so locked down you cannot do what you want. Christian says the phone is about the same size as our current Samsung Note 4’s and then he says the following:

It’s not as ‘impressive’ looking as some of the other phones because it has the bezels. It is also very bland, 0 features 0 bling, but that is the point. Its a good phone with no garbage.

I think that is the whole point. Most of the service and phone companies try to control what  you do with “their” phones so much that you cannot use it the way you want. At any rate, it is great he got the phone when he did because I, for the third time, got him an AM ticket when I thought I was getting a PM ticket so he is getting in to the airport WAY early and will have something with which to entertain himself while he is waiting. I think Kelly will probably show up early and take him to dinner.

Continued work on Gaugecam

Kiwi and Dad work on GaugeCam togetherKiwi continues to help me with my work on the Gaugecam project. We all recevied an email yesterday describing some of the new information that will appear in the next refereed journal article. Some of it will have an impact on my work–we will know what to do to make the system even more accurate under changing conditions. It is slow work since I have so much other stuff going, but my hope is that I can turn this into my retirement project. I hope to have a demo of some of the stuff we are doing to put up here within the next few months.