Ja tak! (Taken with picplz.)

Ja tak! (Taken with picplz.)

0 notes

Motion Detection Considerations Part 1

This is the first of a small line of posts about my thoughts and considerations building a autonomous sentry gun.

Link to initial post about the project

The project mainly consists of two important parts. The servo controller and the video feed/motion detection. In other words you could say input and output. This post is to clarify some of my considerations concerning both the video feed and the motion detection.

I have decided to use the PS3 eye camera, because it has the ability to capture images roughly twice as fast as a ordinary camera, at 640x480 resolution and like 4 times as fast at 320x240 or something. 640x480 at 60 GPS is my goal. Which is a great resolutions for this project. Because the smaller the images, the faster processing through the frames will be.

Camera bottleneck is then eliminated, but I’m almost certain that the 60 FPS camera will drown my computer in frames. Processing will just take too long for it to go through 60 frames a sec. At 60 FPS each frame has to be processed in less than 16.6 ms, which is not alot of time.

That will either require me getting a faster computer, or to use some optimized crazy fast algorithm.

No actual benchmark has been performed yet, so I really can’t wait to try it and get some data to look at.

I have decided to use a open source machine vision library called AForge to help me with the actual processing of the frames. It is either that or another one called OpenCV. But there are some nice algorithms and other image manipulation code in aforge. Together with alot of other cool stuff like machine learning and fuzzy logic etc.

Notes

Aluminum frame with the mount on top

Aluminum frame with the mount on top

Notes

I really want to learn how to solve this little monster.. one side! Six to go… (Taken with picplz.)

I really want to learn how to solve this little monster.. one side! Six to go… (Taken with picplz.)

0 notes

Bored (Taken with picplz.)

Bored (Taken with picplz.)

0 notes

“High” speed train (Taken with picplz.)

“High” speed train (Taken with picplz.)

0 notes

School project: autonomous sentry gun

In about three weeks I am heading back to school. The first month of the next semester is focused on two of three subjects. The three subjects chosen by students is

Android development

Game development, using either xna or unity.

System administration.

Then we are supposed to pick a “end product” to finish during the month. We are then to select one or at most two of the subjects most relevant to our final product.

The final product could be a RSS reader for android. A xna game for windows phone 7 etc. A while ago we voted on which subjects we would like to attend to. And unfortunately embedded systems was not among the final three subjects.

I had been collecting parts for a year or so, to build a sentry gun, like the ones you see in a game, like team fortress or black ops.

And I told the teacher about it and he gave the green light on me building that as my final project.

I found that the most relevant subject is game development, so I chose that, and then I am going to assemble a overview of articles, tutorials and presentations on motion detection, AI, and a bunch of other stuff, I can use when programming the final product :)

Would you understand me if I said I can’t wait to go back to school? :D

Notes

Weird error in WPF

I have a class that imports some functions from a c++ dll file, using the C# keyword extern.

The class controls a webcam, contains an event that fires when a new frame is received.

In a C# console application it works great.
And in my WPF project, i created a small prototype that works aswell.

In the prototype the viewmodel is bound like this

Remember, the above way is the one that works.

Now i started implementing it in my main application, and best practice was to bind using the ViewModelLocator, and set the path like this

When i use the binding that’s using the ViewModelLocator, the camera class is retuning nothing but a black image, and it’s framerate lowers to the timeout value, so something is messing up somewhere inside it.

So the solution to my problem was to just use the “direct” binding, the one without the ViewModelLocator.

Now, i have no bloody idea why the other way of binding the viewmodel to the view is working, and i would love to hear a reason if anyone knows.

Now, this post is not just for my own benefit, if this or some of the following posts can help others, I will indeed be happy.
I just hope people will be able to find this post with the lack of keywords and proper description. English is not my main language, and even if it was, exactly what is this error called?

Don’t ruin an apology with an excuse

After thinking about the meaning for a minute or so, it makes perfect sense.

An apology is something you offer someone you hurt in some way. You are telling someone that you are either sorry about or regret something,

“I’m sorry about being jealous and keying your car”

That’s a genuine apology, but try adding “but you were really mean”. Now, not so much.

There are apologies that this doesn’t apply to, like

“I’m so sorry about crashing your car, but that aquaplanning was really crazy”

But it does apply to every apology concerning something you did on purpose.

Random thoughts ftw :)

Notes

Errors and solutions

When I stumble upon an error I usually find a solution. And after that I always think about writing the solution down somewhere, so I won’t have to go through the same steps the next time I’m facing the same error. But I always end up thinking “yeah, I should do that”… then nothing…

Until this very moment!

7 notes