Thursday, May 30, 2013

Hyperloop

The other day I was thinking on a crazy way of transport... Not sure if that is the same that Elon Musk is thinking about:
http://www.businessinsider.com/elon-musk-is-kicking-around-an-idea-that-would-send-you-from-san-francisco-to-los-angeles-in-30-minutes-2012-7

But I thought I would just put it here. How about doing one of this for humans :)

Well, as you can see on the same link, doesn't look like a new idea (my idea). So, I am curious to learn what Mr. Musk is thinking. Sounds impressive! I wonder if one could do a simple physics calculation to see even if it is possible. I.e.,  take the energy that would take to push a person from LA to SF in 30 minutes. Can that be powered just by solar? Specially just a small area (as he is saying it would be self-powered). Maybe interpreting things different than what he said...

Anyhow... Cheers!

Sunday, May 26, 2013

OpenCV in Java/Eclipse - Quick install guide

I followed this: http://docs.opencv.org/2.4.4-beta/doc/tutorials/introduction/desktop_java/java_dev_intro.html

Here I just go through my experience and some of the stuff I got caught in...

Dowload OpenCV for Windows. In my case I got 2.4.5 version. 270MB zipped that turns into 2.7GB once extracted!! It is basically a folder with the libraries inside, which I placed in the Eclipse folder (but I don't think it matters).

Open Eclipse and follow the instructions on the top link. When adding the library look for the java at eclipse/opencv/build/java. There is a moment where the instructions get cut, talking about the native library location. Click edit and enter the location of the dll. In my case, opencv_java245.dll is located in C:\eclipse\opencv\build\java\x86.If you don't this, you'll get an error (see here)

A question I got unresolved is that I can't point to the x64 directory while my system is x64... I got to use the 32 bit version... Anyhow...

The rest should work. I ran this in a brand new installation of eclipse (basically unzip the download from http://www.eclipse.org/downloads/moreinfo/java.php in my hard drive) and it worked right away. Nevertheless, initially, I had only the C/C++/QT package installed. It had even the perspective for Java, but it was not executing. I was getting "The selection cannot be launched and there are no recent launches". I found out that JDT (Java development tools) were not installed, so, went to help > install new software, select in "work with" a place to get the software from, and then browse to Programing languages. You should click this:


and see this before clicking finish.


Now everything should work. At most, you will get that same error again when you click execute, but it is because you didn't build the project. Click build and go!

Then we go into the second part of the tutorial, when they detect the face on the picture. It looks like they want us to use SBT. Not sure why, but decided to do it the traditional way with Eclipse. Create a project, like we just did. The question is what to do with the resources (the .xml and .png files). Where to put them and how to make the code see them.

The way the code is written, is looking into the CLASSPATH, which is the path where the source is. So, we need to create a resource file in that directory. The best way that I found to do that is to right click on the project name and do New > Source File. In Folder name put "resources". Then right click again in the project name and do import which brings up this window:


 Pick file system which opens:


The funny part is that even with this, I was getting an error. It was not reporting that it didn't get the path right, but that the file was empty! I.e., the portion of the line CascadeClassifier faceDetector = new CascadeClassifier(getClass().getResource("/lbpcascade_frontalface.xml").getPath());
where we get the path (getClass().getResource("/lbpcascade_frontalface.xml").getPath()) was working but the resulting string was pointing to no file. If we just wrote the full path directly, it worked:
CascadeClassifier faceDetector = new CascadeClassifier("C:/USERDATA/MEDICAL/CODE/face_detect/resources/lbpcascade_frontalface.xml");

The problem is actually a bug!!
http://stackoverflow.com/questions/16754871/running-opencv-using-java-error

Basically the code finds the path but returns an extra "/". So, when the code goes to fetch the file, it can not find it. This is solved with the following code:
    String str;
    str = getClass().getResource("/lbpcascade_frontalface.xml").getPath();
    str = str.replace("/C:","C:");
    CascadeClassifier faceDetector = new CascadeClassifier(str);


Do the same for the 2nd file... And voila!

PS.: Click here to see the index of these series of posts on OpenCV

Friday, May 24, 2013

Use of nanoparticles

The other day I met somebody who I would call a chain inventor. He has been creating inventions his whole life. Few succesful ones that sold out and others that broke the bank. The latest is a cheap way to create nano-particles. He actually showed me a sample and it was pretty cool. What is he going to do with that? Well, that I can't say here, but I decided to have a quick look at some other possibilities listed here and there:
  1. "Further miniaturization of electronic devices". Not sure what that means, but I read it :)
  2. Nanofluids: Eastman J A, Choi S U S, Li S, Yu W and Thompson L J 2001 Appl. Phys. Lett.78, 718
  3. To enhance efficiency of heat engines,
  4. As chemical catalysts: Maye et al 2000, Kuang W, Fan Y and Chen Y 2000, Langmuir 16 5205
  5. Lasing materials Huang M H et al 2001Science 292 1897
  6. Using nano particles as fuels
  7. Improved thermal conductivity with nano-fluids (better for instance that engine oil)  But I thought the main function of engine oil is lubrication, so, not sure why exactly they bring this up... Nevertheless found this
  8. And a small list of apps
I hope he is successful :). Will keep you posted!

Saturday, May 4, 2013

Places to go

Just a list of "less famous" places I would like to visit...
Havasupai Falls, Grand Canyon.

Some start-ups to follow

Plan is to track these over the years (first post 5/4/13):

http://3drobotics.com/ Making drones/copters.
http://www.foldimate.com/ Machine to fold clothes
http://momentummachines.com/ Robotic Fast Food

http://revolverobotics.com/  Creators of the Kubi, a fix robotic holder for table/smartphone controlled remotely (for videoconferencing).
Update (4/16):  https://angel.co/revolve-robotics. Nice design, they seem to have gone through few rounds of financing. Selling a bit too pricey ($500).

http://www.gosphero.com/ R/C ball. A friend of mine and me had been talking about this for very long (he did a similar master thesis and I wanted to use something like this for hand grenades... yeah... not very peaceful :P )
http://www.ubooly.com/  A case with the shape of a stuff animal. Leaves a space so that the phone can show up and be the face of the stuff animal. I would qualify it of dummy but it may sell...
https://angel.co/harvestgeek May get interesting between hobbyist but doubt it.
https://angel.co/kinsa-1 Thought of many angles but doubt that it will catch up with enough community... Got to get easier for parents. Patch?
3Doodler let's you draw in 3D by hand. Comes from this company, with other cool stuff.
Epos This was actually bought by Qualcomm by the time I wrote this.
Aerofex: hovercraft+bike. If this works, this will really take off (no pun intended :) )
Hoverbike: this is a better looking one but doesn't fly yet.

Accessory Dwelling companies: put a mini house where you garage is or on the space you have in the yard, and rent it out. I think this should be super successful. 



A way to find start-ups:
https://angel.co/jobs