Monday, February 7, 2011

Pull audio using VLC

This is more for my own convenience/memory but here goes:


vlc "input_file.ext" --sout #transcode{acodec=mp3}:duplicate{dst=std{access=file,mux=raw,dst=\""output_file.mp3"\"},select=\"novideo\"} vlc://quit


Load a file into VLC, convert to mp3, save, quit.

done.

Wednesday, January 5, 2011

Archive email in outlook

I really like the Archive function in Gmail. Unfortunately at work we use a Microsoft Exchange server which means I've been using Microsoft Outlook for the past few years. In order to clean up my inbox I've resorted to having my own "Archived email" pst files elsewhere since I can't keep all of my email on the server.

One thing that has bothered me has been the lack of the Archive button to just move all of my email to my Archived email pst. There is a "Move to folder" button, but that is a two step proces.

In the name of efficiency I produced the following macro:


Sub Archive()
Dim objFolder As Outlook.Folder
Dim objNS As Outlook.NameSpace
Dim objItem As Object

Set objNS = Application.GetNamespace("MAPI")

'Get the correct "Archive" folder
Set objFolder = objNS.Folders("- Personal Folders 2011").Folders("Archived Inbox 2011")

If objFolder Is Nothing Then
MsgBox "This folder doesn't exist!", vbOKOnly + vbExclamation, "INVALID FOLDER"
Exit Sub
End If

If Application.ActiveExplorer.Selection.Count = 0 Then
'Require that this procedure be called only when a message is selected
Exit Sub
End If

For Each objItem In Application.ActiveExplorer.Selection
objItem.Move objFolder
Next

Set objItem = Nothing
Set objFolder = Nothing
Set objNS = Nothing
End Sub

 Assigning this to a button on the toolbar is almost like archiving my email in Gmail. It isn't quite as efficient and searching isn't as easy if you're using outlook's search (I've given up on standard Microsoft search and replaced it with Google Desktop Search), but at least I have a "one click" button to move my email to my desired folder.

Now if only I could fix the rest of outlook.

Thursday, April 15, 2010

I've been busy

I've been busy.

Sorry for the lack of posts.

See here: Thesis

At some point I'll update again.

Sunday, January 17, 2010

Thesis

This is my current biggest fear. Sometimes I see Aiden giving me that look when he's too close to my computer.


funny pictures of cats with captions
see more Lolcats and funny pictures

Sunday, December 13, 2009

First Time To Teach

This past thursday (12/10/2009) I had to opportunity to teach the Advanced Vision class because my advisor was out of town and couldn't teach the class. It was a really great opportunity to see what it's like to lecture for the entire class compared to just giving a presentation.

I ended up being a little short on time, took a bit of the rest of it to answer questions from the class and go into further detail about my research.

Attached in the presentation I gave.

MotionTracking ACV2009 Winter

Wednesday, September 30, 2009

Invisible

Very interesting talk about the invisible.

Saturday, May 16, 2009

Used as an example

I had a neat experience recently (this past quarter). My old professor from when I took Artificial Intelligence asked if he could use my paper as an example for the class. That's the first time a professor has asked to use my work as an example for others.

Here's the link. Look for "Example Research Paper".

Friday, May 15, 2009

Computer Vision Paper

Here's a direct to the paper (pdf)

PDF Paper Link

Computer Vision Object Tracking Spring 2009

Computer Vision

Well, it's been quite a while since I've had a post.

So, what have I been up to? I guess a video would be more helpful than what I could say.


I've been working on Computer Vision. Specifically I've been working on object tracking. I did it as a small project for an Introduction to Computer Vision class and continued it with an Advanced Computer Vision class and an Independent Study. It's been quite a lot of work, and learned a lot along the way. Also, here's a YouTube playlist of some of the other results that I played around with, some better than other.

YouTube Playlist


I have a research paper as well documenting my implementation and results that I'll post soon!

Any Questions? leave a comment

Monday, November 17, 2008

First Research Paper

Hi all, Long time no content. Anyway, I've been fighting through my first quarter in grad school and all I have to show for it is a crummy research paper. Anyway, if you're interested, here's a link to it:


It's on CBIR (Content Based Image Retrieval) or being able to search images based on image content, not needing image tags or other meta data.

Enjoy

Monday, September 29, 2008

Reducing the search space

For a class I'm taking, we're looking at Constraint Satisfaction Problems or CSPs. For a homework assignment we're looking at different methods of solving these CSPs. One way to do this is to create a tree of the possible variables in the CSP and at each level assign values. One obvious optimization is to reduce the assigned values at each level to only those that meet the constraints. According to the text this reduces the search space from n!*d^n to d^n where d is the size of the domain and n is the number of variables in the CSP.

As much as I'm interested in theory, practice is very helpful in explanation. One problem is the following:

  TWO
+ TWO
------
  FOUR

This is a crypt-arithmetic puzzle where a unique value is assigned to each letter, and no word can have leading 0's. To see this for myself I quickly implemented this in ruby to see the difference between constraining the search at each level and not. Results?

Unconstrained search (should be n!*d^n):

real 0m44.690s
user 0m42.769s
sys  0m0.315s


Constrained Search (should be reduced to d^n)

real 0m0.049s
user 0m0.037s
sys  0m0.005s


As you can see, a huge difference. Even though I fully understood the math, I was surprised how much of a difference it made by reducing the search space (even though it involved more checks at each level).

In summary... reduce

Thursday, August 7, 2008

Had a really fun evening...

Had a really fun evening tonight and went to the George Eastman house and then to Charlie's Frog Pond

Powered by Jott

kitty.cat

wow... this is really cute.

source: http://kitty.cat/

Tuesday, August 5, 2008

Jott from www.jott.com....

Jott from www.jott.com. I believe it's my new best friend.

Powered by Jott

Sunday, August 3, 2008

IPC

At work the other day I had to come up with a creative solution to a linking problem. I had a library from a 3rd party vendor that used one set of C++ libraries, and I had our code that used another set of C++ libraries. Unfortunately these libraries are incompatible with each other. This is because they both define the same (or at least some of the same) symbols. i.e. they both define std::string, std::cout, std::map and so on. The problem is that they do not have the same feature set (they can't be blindly interchanged) so we can't just recompile with the other library set and vice versa. 

Either way, my managers just wanted it done. They wanted us to use theses libraries, no matter what, A.S.A.P. The only way I knew of to compile anything with those shared libraries was to have another heavy weight process. This was surprisingly much easier than I originally imagined. 

My original intent was to develop our code as if we could use their library without any problems. Then, create functions that resolve all the symbols that are "missing" when I try to compile. These functions will use one form or another of IPC to make the function calls to the other heavy weight process to do what we originally intended. Here's an example of how I did it.

The main process defines all the missing symbols as functions with the exact same signature.
I define an enumerated type with the names (Almost) of all the functions that can be called.
enum messageNames { fun1, fun2, fun3 };

I define some shared data types (structures) that will be passed between the sender and receiver. These types will be based on the passed data types to be sent between the function calls. i.e. 
typedef struct _my_sending_data_ {
messageNames message;
char key[100];
int index;
float some_data[50];
...
} MySendingData;

Now, do the same thing for data that will be returned from the functions

typedef struct _my_receiving_data_ {
char value[100];
int error_code;
float ret_float;
...
} MyReceivingData;

Now, when we define these functions in the main program side, all we do is take the passed in parameters and fill a MySendingData structure with the values that need to be sent to the function. Also we fill in the message field with the name of the function that we are calling (using the enumerated type).

Finally we write this structure to the stream that we are using for IPC (pipe, socket, etc..) and then block on a read from the stream waiting to get back a MyReceivingData structure.

The other heavy weight process will be compiled with the real versions of these functions. That process just sits in a while loop, blocking on a read, waiting for a MySendingData typed block to appear in the stream. Then it does a switch on the data.message field to see what function was meant to be called. It then calls the message, with the parameters that are inside the sent data structure, fills a MyReceivingData structure with the return values and writes that across the IPC stream.

Of course there are some more details, but they are specific to the implementation. The basic idea was to be the simplest way to get past a shared library that wouldn't compile. This is not intended to be a long term way to do message passing over IPC, but works well given the application.

Saturday, July 19, 2008

Thursday, May 15, 2008

Individually Wrapped Lemon Slices

Just so that everyone knows, I am aware of the health risks associated with unwashed hands and how hands play a major part in spreading diseases, but sometimes too much is too much. See exhibit a:
Individually wrapped lemons slices.

I'm not even sure I want to know who's job it is to cut up lemons and then put what looks like a scrub cap on them one at a time.

Mind you, this was at the Riverside Convention Center
I was there for a Microsoft Launch Event (mostly for the free swag)

Sunday, May 11, 2008

Saturday, May 10, 2008

Phone Bunny

Last night we went for a walk and were able to get really close to a bunny near our townhouse. I didn't have a real camera, so I took a couple of pictures of him with my phone.




Friday, May 2, 2008

More bacon...

Oddly enough, another bacon related post:

Thank you xkcd

Stove Ownership