Updates about the project here.
Announcements and Updates
So I can only assume that the judges decided my project wasn't 'recycled' enough. I struggled with the idea when deciding to enter since the main component is an old cell phone but since EVERYTHING in there is recycled (except for the LEDs) I went ahead and entered anyway.
That's the only reason I can think of because honestly. A bicycle bumper made out of a plastic bottle made it to the top five. So did rings made from 'recycled' christmas cards. Quoty fingers are intentional there because they're not like household recycled the author of that one worked at Borders and grabbed a bunch of packs of brand spanking new christmas cards from the trash when the company pitched the ones that didn't sell for the holidays.
Yeah, that's way cooler than a computer vision cat door. Really.
<not bitter at all no.>
There's an EE (Electrical Engineering) Idiom "It's the Amps that kill you."
I stumbled across a post over on the science forum where someone called that a play on words and claimed that categorically it's the voltage. I was so enciced that I created an account on the science forum to dispute. Then I decided that was a little ass-hatty and refrained however I have too much to say on it so I'm posting it here.
Technically and specifically it is the current (amperage) flowing through your body that does the damage. It is entirely possible for a human body to hold a charge in the thousands of volts without feeling any ill effect other than frizzy hair. In fact it's not even uncommon. We call it static electricity and notice it when we get really close to some ground source like a door knob and just before we touch it the tremendous voltage in our body passes the breakdown voltage of air converting it from an insulator into a conductor and creating that tiny (and painful) arc between us and said ground.
I think Mr. Stanley514 was trying to make a good point I just don't thing the way to correct a slightly innacurate statement is by making a wildly inacurate stagement.
I like to phrase this idiom "it's the amps that kill you.... But the voltage helps."
As someone else points out in the above post voltage, amperage and resistance are all directly related. So when stanley514 says "this is just a play on words." he's correct. Because it's a WHOLE LOT easer to be killed by high voltage than by low. The idiom exists for two reasons. One, because it's technically true and was probably coined by an OCD engineer. Two, to remind you to pay attention you can be seriously injured by voltages down as low as about 5volts and killed by stuff around 9 or 12. You know those painfull assed gag toys that look like a stick of gum but shock you? those run on 1.5v.
Thing is, it's like being hit by a car. The car has mass. That's your voltage. it's not the mass of the car that's hurting you. You can stand up against a parked car without being injured in any way. it's the fact that, that mass is hurtling towards you at 40+ miles per hour when it strikes you that smears your brains all over the wall. I could kill you with a trycycle if it was moving fast enough. Bullets, for example weigh about as much as a pencil. I don't think anyone would deny that when they hit a human body at several hundred feet per second the effect is someone dramatic.
The thing is if I throw that bullet at you pretty gently. Say it's travelling at about 20 miles per hour. it just might sting a tiny bit if you're real sensitive. If I smack you directly in the eye it might even hurt. Now, imagine being hit by a semi at 20 miles an hour. That could, quite possibly be fatal.
Tt's not the mass of the thing hitting you that kills you. Yeah, well the mass helps.
So I entered TVKP into the Make/Schick Xtreme3 Eco Project Remake contest earlier this month. I was hoping they'd notify us ahead of time if we were in the top 5 or not but apparently they haven't since I haven't gotten any emails yet letting me know I've won. ^_^
Since registration for the contest closed the URL above has said that the Remake contest was closed and to "Please check back on 5/30/12."
Well 5/30/12 started HOURS ago. Especially if you are thinking east coast time which is when registration closed. I have, of course, been clicking ctrl+f5 like a crack rat waiting to see if I'm in the top five. At ~9am pacific time (which make more sense since O'Rielly is based out of Sebastopol California) The site changed. YAY!
Instead of a 'Vote Now' button, which by it's nature would imply that it would have the top five finalists listed, there is text that says "VOTE SOON ON THE TOP 5"
But it's not a button or anything.
Wow, I just got back from Maker Faire. The fam went up for the weekend. It was one of the best weekends of my life for a couple of reasons.
Firstly, as you may have guessed. I'm sort of into the whole maker/DIY thing. Secondly because I went with both of my kids and they had a blast. I got there with a list of a whole bunch of crap I wanted to see. A few talks I wanted to catch, some interesting sounding shows I wanted to see. We got through the main gate and found the bathrooms, obviously the most important step. Then I turned to my 8 and 10 year old and said "O.K. let's check the schedule and see where we're going." Then it hit me. I'm going to be dragging these kids around a hot fairegrounds for two days with no rides to distract them. If I wanted to get through this without the days ending in tears I had to make it fun for them.
So I put my phone back in my pocket led us into the main building and said "I want to see two or three people while we're here. Other than that just keep your eyes open and you tell me what we're going to do." Watching them get excited about making was WAY better than seeing any of the talks. Apologies to anyone who gave a talk but I'm sure most of you would agree with me.
My 8 year old daughter asked me to make a robot with her.
I mean come on! How much better can it get for a maker dad am I right?
So I missed eepybird, Arcattack and Adam Savage yet again this year. I was even too distracted making stuffed robots with my kids to stalk^H^H^Htalk to Jeri Ellsworth for very long. ^_^
Also it was a great event for me personally. Like I said I'm sort of into the maker thing. For a while now I've had a goal of becoming one of those people who do projects that make you want to replicate them. With TVKP I did which, is kinda neat. Well the next step of that is to start hanging out with some of my maker heroes. Well instead of walking around maker faire and just staring at people like the otaku fanboy I am I was actually having discussions about projects. It felt like I was attending Maker Faire as a Maker.
As Robotgrrl put it Achievement unlocked!
I really don't like this site. Partially just because I think it's really ugly but also partially because the customization interface for Google Sites is kinda crap. Lastly, I screwed around a while but was never able to figure out how to make the Google Sites site respond as something like www.visiblekitteh.com. Which sorta defeats the purpose of having registered that domain.
The point of this is that I'm evaluating other free online hosts. I've built the site over on a host called weebly. It's currently living at http://beta.visiblekitteh.com. It, of course, doesn't really look a whole lot better than this one does but it's a little cleaner. Give it a look, Drop me an email at firstname.lastname@example.org or via the contact page if you have any feedback on it.
One thing I'm hoping will be a good end result of this is that perhaps now when I share a link via google plus or facebook it might actually use the current summary. Or even better the summary of the actual post instead of what it does now which is use a very old version of the text on the main page.
I'm currently migrating my announcements(blog posts) from the google sites location to the new weebly site. Unfortunately that's a painfully manual process. I'm about 1/3 of the way done and will likely change www.visiblekitteh.com to point to weebly when I am through.
Moar better even.
This is working out far better than I had expected. I shaved off the back side of the doorbell bumper till it was flat. I then put a little sheet of metal in as a stop to keep the pin from coming out any further and to keep it straight. It looks like I"m going to have to shave the tip of the pin down at a more dramatic angle so that the door will push it out of the way when it swings past but other than that it's working really well. A little more filing to get the pin to resess a little smoother and I'm GTG.
Here's my first run of the actual door flap. Hopefully it won't be too heavy. The door itself is cut from the case of an old VCR. The wood is cut from scraps of other projects. The door latch is the coil and bumper from an old doorbell I had to replace and of course a small spring from something I took apart. I will need to do something to make sure that the shaft doesn't turn and I'm either going to grind it down so that it's just a wedge or build up the back side with something. Either way it will need to be flat on the door side so that the cat pushing against it won't cause the pin to lower. All told the whole pin mechanism is way larger than I had planned but my experiments with the bobbins weren't working out very well. I think ultimately the magnets I'm using just aren't powerful enough to really give the coil something to grab a hold of. The metal bumper pin from the doorbell gives it far more traction and thus it is actually able to overcome the spring that would otherwise hold it in place.
So having the code fixed AND having the android package built on a working version of eclipse seems to be a big help.
I just grabbed the phone to look at the samples I've collected and for the first time I have zero captures of the background image. Nothing but cats! (and some other wild creatures, see below.)
My last version of code actually seems to have been fine but when I built it, I built it with a version of eclipse that was apparently having some issues. My computer crashed while it had a full hard drive. Largely due to all the sample captures I had which included nothing but the background. Crashing while your disk is 100% full often does bad things to the integrity of the disk. This is what it did in my case and a lot of files were corrupted. I've had to re-install a number of applications and still have many that are still broken. My whole printing subsystem for example is still hozed. I was surprised that the code I pushed to the phone seemed to work fine when there were a couple of other quirky issues with eclipse. I couldn't create new projects for example or modify any of the android preferences in either a project or globally. Reinstalling the Android SDK did not solve these problems.
So Monday I reinstalled eclipse and configured the SDK in it. I pushed the code with virtually no changes (the new code does have <= instead of just <) and it looked like it was working properly. I even put backed out the code change (to <) and tested it successfully. I've changed it back to <=. Why? I'm not sure, just seemed like the way to go.
And today for the first time, no captures of the empty inside of the VKP enclosure. Not even during the day when the phone auto adjusts its brightness and a shadow is cast across the pixel I'm measuring. At night the brightest point cast by the LEDs is the actual point I'm measuring and I'm getting an intensity value of 255 (which is the max.) During the day when a shadow is cast across it, it only drops to 239. The cats both seem to be coming in, in the high thirties at most so my threshold at 100 seems perfect. I was a little concerned that my measurement might catch a glimpse of a shiny part of the cat and cross above 100 but I haven't seen it yet. I will continue to monitor for it just in case.
I have been capturing valid cat head images to train with but until now they have been mostly accidental. This had two down sides. A) I had to wade through 8-20 thousand images to pull out images of cats and B) There are times when the cat has walked past the camera during the ~3 seconds it takes to write the image and it has thus not been captured. The result being that I have fewer sample images for that day than I should. now that I am _only_ capturing images when something actually walks in front of the camera the number of valid images that I get should go up.
BAM! This is perfect, this is exactly where I want to
I evaluate the pixel on every frame that comes through so after this image I also capture a couple of his body and tail but those are easy enough to ignore that I don't see a lot of benefit in trying to minimize those by setting a timer or waiting until we cross to bright before testing again or some similar mitigation method which might just result in me actually missing a few good pictures (like if the cat changes his/her mind and backs out.)
As you can see the phone is still auto brightness adjusting. When the overall image brightness is low the phone automatically increases the amount of time that the aperture is open. This results in brighter pictures but makes it less tolerant to movement as you can see by looking at the night time captures which can be quite blurry.
Timothy at night
There does not seem to be a way to disable this in API version 7 which I am using. I've tried a couple of flags which seemed appropriate. However _many_ new methods for enabling/disabling camera features were added in API version 8 which will run on Froyo. I am trying to avoid installing a custom version of android on the phone because I want this to work for regular folks. I'd like to put it up in the android market for anyone who chooses to duplicate the project when I'm done. (If you want to kick in a couple of bucks for the developer license I'll need to do that let me know. ^_-)
The pixel values should be H, U and V respectively. Where V is intensity (I don't know why it's a V.) I should probably move the pixel tag to the top of the image where the cat is less likely to be. Ultimately I will disable that function and also move the camera down another couple of inches but for now I seem to have a lot of free space at the top instead of the bottom.
I also caught a few images of some other wild creatures investigating the cat door.
I've seen these creatures around my yard before. I think my wife has been feeding them so they keep coming back. I should talk to her about that.
I also caught my first red handed.. er.. mouthed? image
Nothing useful in the logs about this. Either the logcat viewer I'm using doesn't go back far enough or the logging facility I'm logging at isn't active when the phone isn't connected to a debugger. Either way I think I'm going to have to start logging to a separate file instead of using the built in logcat facility. I haven't evaluated that yet since I'm not really worried about the accuracy of the object recognition portion until I re-train it.
I still have a few issues to work through in my development environment. For example the new version of eclipse doesn't know that VKP is a git project anymore. Bummer.
The Great North American Blue Spade is a wiley fast moving creature difficult to capture on film.
I'm still shocked at how much re-work that this seemingly simple portion of the code has taken. Part of that is obviously due to the fact that the Android version of OpenCV is very much an afterthought. Part of that is equally obviously due to my lack of development skills. And part of it also due to the fact that I almost exclusively work on TVKP on weekends.
So I have been struggling with detecting if something is in the frame. Ultimately this turned out to be because the Mat.Get() method is returning unsigned values but Java doesn't have unsigned numbers. only signed. If this just meant that I was going -128 to +128 that would have been easy but in fact it was completely random. Black was still 0 200 is something like -52. I couldn't figure out what was wrong there. Once I got that taken care of I have a linear number that represents brightness. Yay!
So I put out the new code yesterday with a value of 100. Seemed like a good place. The White paper on the back was giving me usually > 200. So I grabbed it today and had >21k images captured. All I could think was that I had used a > instead of a <. Apparently the threshold was correct because I didn't have any pictures with a cat across the detection pixel.
So I jumped in to look and lo and behold it's <. I don't get it. All I can think is that I pushed it from a broken version of eclipse. It must have messed with something. I changed it to <= and it seemed to work fine. So I changed it back to < and it again worked fine. It's back out there now with the version newly compiled on a fresh eclipse install.