The Visible Kitteh Project

My latest project isn't much of a robot in the traditional sense. That is it has virtually no moving parts. It will all told in fact have 1 single linear actuator. However since it does have at least one and is controlled by a computer brain and more importantly I think people will find it interesting I wanted to post it here. I call it The Visible Kitteh Project. The main page for the project can be found here: http://www.visiblekitteh.com Problem Description: We have a problem. His name is Timothy. He is a sweet if very _loud_ tabby cat that we love dearly. One thing we really don't love however is the carnage. Timothy is a very good hunter and his favorite thing to do with his prey after he has caught it is bring it inside and finish it off under my wife's desk. Now this poses two problems. First, cleaning blood, feathers, fur and viscera out of the carpet under the desk and off the walls. Second, some times they get away. My wife is tired of cleaning the carpet under her desk. I am tired of chasing field mice around the house with a shoebox. It is time for a change. Requirements: Prevent the cat from being able to enter the house when he has an animal in his mouth. Nice to have's: Do so in a way that doesn't terrify the other cat whom we are trying to train to use the cat door to enter the house. Methodology: Object Recognition using Haar Cascades. Implementing it using the OpenCV libraries Java bindings for Android. Ultimately I would like to try and switch back to doing this on the Arduino platform for a low cost, low power consumption solution but I just couldn't find enough reference code or documentation to learn how to do it. Source code (such as it is) is here https://github.com/omadawn/VisibleKitteh

 

Update 04/21 12:30 am TVKP Went live Phase I Data logging mode.

https://sites.google.com/a/forstersfreehold.com/visible-kitteh-project/home/announcements/champaign-phaseonedatalogginginplace

 

Update 05/01 I finally seem to have resolved the repeated problems I've been having trying to threshold pixel brightness. Thanks in no small part to help from some of the cats here on LMR.

http://bit.ly/IDmXiG


This is a companion discussion topic for the original entry at https://community.robotshop.com/robots/show/the-visible-kitteh-project

kitteh with an h?

how lovely that moggy is!

Open CV?

Just to throw it out there, it seems a better way to determine if the cat is bringing in any “extra” stuff with him, would be with weight. The cat gets weighed when it exits, and if it happens to be a few oz heaver coming in, you lock the cat door. I think you mentioned multiple cats --of which it seems only one has this hunting issue --I think the weight thing is still doable, but you would need to isolate this one cat to the microcontroller. Magnetic collar maybe?

The Visible Kitteh Project

The Visible Kitteh Project is up in Data Logging mode!!! Phase one is in place!!!


https://sites.google.com/a/forstersfreehold.com/visible-kitteh-project/home/announcements/champaign-phaseonedatalogginginplace

Thanks

Keep the updates coming.

It’s an option

But it seems like it would require too much tuning. I can see the cat getting a little chubbier. At some point he’ll cross the weight threshold and it’ll stop letting him in. Then I’ll have to tune it again. Plus some of his prey is pretty light. He’s been known to bring in small birds. That’s probably not substantially more extra weight than he might have if he just goes out in a strong downpour and gets soaked to the skin.

Technologically definately easier to implement but OpenCV has come so far that once I figured out what I actually needed to do it’s actually pretty blitheringly simple.

I’m about 1/2 way through putting together a tutorial on how to do it with zero experience.

 

Good idea though.

I need a feed

I post updates on TVKP site itself. I wish I could feed them in here directly. :slight_smile:

https://sites.google.com/a/forstersfreehold.com/visible-kitteh-project/home/announcements

Hurdles

I woke up with a solution to the tuning issue but Two otherj problems.

The solution to the calibration issue would be to weigh the cat on his way out the door and update your thresholds.

 

As far as problems go the most insurmountable one is that I can, with 100% certainty say that the cats weight would fluctuate across the weight threshold. I can guarantee this due to the simple fact that he actually eats these things. Often on the floor under my wife’s desk but also often in their entirety. I don’t want to prevent him from entering if he’s killed something. I only want to prevent him from entering if it’s still physically intact and dangling from his mouth.

 

The other problem is interesting. Difficult, probably not insumountable but I can’t think of a solution off the top of my head.

How do you weigh a cat moving through a cat door? First there’s the weight shifting forward and backwards as he steps through the door. Second is he seldom stops moving on his way through the door. next time you step on a scale walk in place and see how well it handles it. Now imagine you’re stepping over a low fence and walking away.

 

The weight thing seems like it would be a great solution to some other problem. I’ve considered it in the past for other much more ambitious projects for things like identification, isolating two different people or animals from one another but hadn’t realized the difficulties until now.

 

My vote for ID is …

RFID. You might still be able to pick up an RFID kit for like $8 from Radio Shack. If not let me know, I bought the last 2 or 3 from my local Radio Shack. The one problem I forsee is knowing that you are sensing the tag on the cat that is in your entrance chamber.

More Flexibility Needed

Honestly the idea comes from a pipe dream of having a robotic house. The idea is that I want the house to be able to identify guests. New guests. They come in. You say ‘house meet james.’ The house locks on to some statistics about ‘james’ that it is now able to use to destinguish him from yourself, your wife, any other guests, etc.

I was envisioning agregating data between motion/heat sensors and weight sensors for when two bodies get too close to be destinguished. Weight could be used to determine which was which when they separate.

Of course this was back when I was in HS. Now I’d probably use computer vision. :slight_smile:

I need to move my camera back like 7 inches

Apparently

https://sites.google.com/a/forstersfreehold.com/visible-kitteh-project/home/announcements

 

Done

built a little box and stuck it on the side. Drilled and cut some holes. Let’s see how this works out

Learning the Learning

Enclosure V2 works much better. No more fur closeups.

I’ve made three or four changes since the last post and learned new things each time.

Switching to HUV made a huge difference in detecting when something is in frame. OpenCV now returns numbers than I can vagelu understand so I am able to make a decision using a simple < to determine if I should snap a learning image. There are some other challenges I’ve encountered with the phone automatically adjusting exposure based on ambient light so I’m still capturing a bunch of photos of the inside of the box I’m just not capturing 26 thousand of them every day any more.

Moving the camera back was perfect it’s far enough to actually catch a whole head instead of the tip of a nose or an ear. However even though I was feeling pretty solid in my ‘object in frame’ detection (at least at night) I noticed I wasn’t getting images when I know the cat had gone thorugh the door. I was starting to fear that he was just moving too fast to capture but I figured I should at least have a blur of torso or even tail.

 

To determine if something is in frame I’m checking the brightness of a pixel currently in the middle of the image. Right about in the center of this blue circle.

TimothyWDarkPointhighlighted.png

Which, if you look carefully, means that it's possible for him to walk almost entirely under it. In some situations only the tip of his ear might brush past it. It is entirely possible that the phone won't notice the change at even a normal gait.

 

I've moved the detection point down to where it should be in the center of his head in this image. I've also replaced the tap light with a sheet of thick white construction paper. Now almost 100% of what the camera sees should be smooth white until there is a cat in it. We'll see how those samples worked out when I collect them tonight.

 

More on this here: https://sites.google.com/a/forstersfreehold.com/visible-kitteh-project/home/announcements/learningthelearning

On your other blog

you commented about getting less of a point source from your LEDs. Have you considered filing down the lenses of the LEDs to get a more dispersed light?

No I haven’t tried that

I made some lens caps out of some old wall plug baby proofers that look like they work well but once I got all 4 LEDs spread around my aperature the light spread out pretty well so I never implemented it. I might just have to play with that and see if I can get it spread out even better. That might be cool. thanks for the idea.

What about Heartbeats?

Someone sent me an email they were thinking perhaps of using heartbeat since they are only worried about the cat bringing in live animals. That wouldn’t work out for me since I also want to avoid the carnage but it’s an interesting idea. How would you pick up the heartbeat?

 

I suppose you could use really sensitive mics and some pattern recognition to pull out something that matched a heartbeat pattern. If we were talking about humans I’m sure you could use a laser or sonic mic that used some FDM to pull out the heartbeat but those rely on physical contact w/ something reasonably solid like skin. I would assume that the fur or feathers of the cat and prey would dispurse that and screw it up. Any thoughts?